From ef53c7d9d5304f7358b4a985c0c467682e6b8993 Mon Sep 17 00:00:00 2001 From: Noel Cothren Date: Thu, 26 Feb 2026 14:21:01 -0700 Subject: [PATCH 1/3] new flink sql openapi spec + apigen changes --- src/clients/docker/apis/ConfigApi.ts | 415 ++- src/clients/docker/apis/ContainerApi.ts | 2598 +++++++--------- src/clients/docker/apis/DistributionApi.ts | 100 +- src/clients/docker/apis/ExecApi.ts | 387 ++- src/clients/docker/apis/ImageApi.ts | 1642 +++++----- src/clients/docker/apis/NetworkApi.ts | 606 ++-- src/clients/docker/apis/NodeApi.ts | 348 +-- src/clients/docker/apis/PluginApi.ts | 933 +++--- src/clients/docker/apis/SecretApi.ts | 415 ++- src/clients/docker/apis/ServiceApi.ts | 631 ++-- src/clients/docker/apis/SessionApi.ts | 77 +- src/clients/docker/apis/SwarmApi.ts | 564 ++-- src/clients/docker/apis/SystemApi.ts | 548 ++-- src/clients/docker/apis/TaskApi.ts | 295 +- src/clients/docker/apis/VolumeApi.ts | 508 ++-- src/clients/docker/apis/index.ts | 30 +- src/clients/docker/index.ts | 6 +- src/clients/docker/models/Address.ts | 72 +- src/clients/docker/models/AuthConfig.ts | 106 +- src/clients/docker/models/BuildCache.ts | 265 +- src/clients/docker/models/BuildInfo.ts | 207 +- .../docker/models/BuildPruneResponse.ts | 79 +- src/clients/docker/models/ChangeType.ts | 40 +- src/clients/docker/models/ClusterInfo.ts | 263 +- src/clients/docker/models/ClusterVolume.ts | 218 +- .../docker/models/ClusterVolumeInfo.ts | 131 +- .../models/ClusterVolumePublishStatusInner.ts | 134 +- .../docker/models/ClusterVolumeSpec.ts | 106 +- .../models/ClusterVolumeSpecAccessMode.ts | 324 +- ...SpecAccessModeAccessibilityRequirements.ts | 99 +- ...lusterVolumeSpecAccessModeCapacityRange.ts | 99 +- ...ClusterVolumeSpecAccessModeSecretsInner.ts | 103 +- src/clients/docker/models/Commit.ts | 76 +- src/clients/docker/models/Config.ts | 146 +- .../docker/models/ConfigCreateRequest.ts | 124 +- src/clients/docker/models/ConfigReference.ts | 69 +- src/clients/docker/models/ConfigSpec.ts | 119 +- src/clients/docker/models/ContainerConfig.ts | 508 ++-- .../docker/models/ContainerCreateRequest.ts | 563 ++-- .../docker/models/ContainerCreateResponse.ts | 81 +- .../docker/models/ContainerInspectResponse.ts | 533 ++-- .../docker/models/ContainerPruneResponse.ts | 79 +- src/clients/docker/models/ContainerState.ts | 297 +- src/clients/docker/models/ContainerSummary.ts | 340 +-- .../models/ContainerSummaryHostConfig.ts | 67 +- .../models/ContainerSummaryNetworkSettings.ts | 83 +- .../docker/models/ContainerTopResponse.ts | 81 +- .../docker/models/ContainerUpdateRequest.ts | 822 +++-- .../docker/models/ContainerUpdateResponse.ts | 61 +- .../docker/models/ContainerWaitExitError.ts | 61 +- .../docker/models/ContainerWaitResponse.ts | 91 +- src/clients/docker/models/CreateImageInfo.ts | 168 +- src/clients/docker/models/DeviceMapping.ts | 88 +- src/clients/docker/models/DeviceRequest.ts | 126 +- .../docker/models/DistributionInspect.ts | 109 +- src/clients/docker/models/Driver.ts | 74 +- .../docker/models/EndpointIPAMConfig.ts | 95 +- .../docker/models/EndpointPortConfig.ts | 168 +- src/clients/docker/models/EndpointSettings.ts | 289 +- src/clients/docker/models/EndpointSpec.ts | 107 +- .../docker/models/EngineDescription.ts | 111 +- .../models/EngineDescriptionPluginsInner.ts | 83 +- src/clients/docker/models/ErrorDetail.ts | 74 +- src/clients/docker/models/ErrorResponse.ts | 58 +- src/clients/docker/models/EventActor.ts | 76 +- src/clients/docker/models/EventMessage.ts | 193 +- src/clients/docker/models/ExecConfig.ts | 234 +- .../docker/models/ExecInspectResponse.ts | 236 +- src/clients/docker/models/ExecStartConfig.ts | 95 +- src/clients/docker/models/FilesystemChange.ts | 99 +- .../docker/models/GenericResourcesInner.ts | 111 +- ...nericResourcesInnerDiscreteResourceSpec.ts | 91 +- .../GenericResourcesInnerNamedResourceSpec.ts | 91 +- src/clients/docker/models/GraphDriverData.ts | 91 +- src/clients/docker/models/Health.ts | 133 +- src/clients/docker/models/HealthConfig.ts | 150 +- .../docker/models/HealthcheckResult.ts | 131 +- .../docker/models/HistoryResponseItem.ts | 153 +- src/clients/docker/models/HostConfig.ts | 1722 +++++------ .../docker/models/HostConfigAllOfLogConfig.ts | 106 +- src/clients/docker/models/IPAM.ts | 109 +- src/clients/docker/models/IPAMConfig.ts | 106 +- src/clients/docker/models/IdResponse.ts | 58 +- src/clients/docker/models/ImageConfig.ts | 611 ++-- .../docker/models/ImageDeleteResponseItem.ts | 79 +- src/clients/docker/models/ImageID.ts | 56 +- src/clients/docker/models/ImageInspect.ts | 530 ++-- .../docker/models/ImageInspectMetadata.ts | 73 +- .../docker/models/ImageInspectRootFS.ts | 81 +- .../docker/models/ImagePruneResponse.ts | 97 +- .../docker/models/ImageSearchResponseItem.ts | 127 +- src/clients/docker/models/ImageSummary.ts | 312 +- src/clients/docker/models/IndexInfo.ts | 134 +- src/clients/docker/models/JoinTokens.ts | 78 +- src/clients/docker/models/Limit.ts | 87 +- src/clients/docker/models/LocalNodeState.ts | 50 +- src/clients/docker/models/ManagerStatus.ts | 109 +- src/clients/docker/models/Mount.ts | 235 +- src/clients/docker/models/MountBindOptions.ts | 112 +- src/clients/docker/models/MountPoint.ts | 239 +- .../docker/models/MountTmpfsOptions.ts | 77 +- .../docker/models/MountVolumeOptions.ts | 108 +- .../models/MountVolumeOptionsDriverConfig.ts | 81 +- src/clients/docker/models/Network.ts | 394 ++- .../docker/models/NetworkAttachmentConfig.ts | 101 +- .../docker/models/NetworkConnectRequest.ts | 92 +- src/clients/docker/models/NetworkContainer.ts | 127 +- .../docker/models/NetworkCreateRequest.ts | 313 +- .../docker/models/NetworkCreateResponse.ts | 79 +- .../docker/models/NetworkDisconnectRequest.ts | 87 +- .../docker/models/NetworkPruneResponse.ts | 63 +- src/clients/docker/models/NetworkSettings.ts | 546 ++-- src/clients/docker/models/NetworkingConfig.ts | 83 +- src/clients/docker/models/Node.ts | 235 +- src/clients/docker/models/NodeDescription.ts | 175 +- src/clients/docker/models/NodeSpec.ts | 129 +- src/clients/docker/models/NodeState.ts | 36 +- src/clients/docker/models/NodeStatus.ts | 106 +- src/clients/docker/models/OCIDescriptor.ts | 96 +- src/clients/docker/models/OCIPlatform.ts | 138 +- src/clients/docker/models/ObjectVersion.ts | 60 +- src/clients/docker/models/PeerInfo.ts | 74 +- src/clients/docker/models/PeerNode.ts | 74 +- src/clients/docker/models/Platform.ts | 80 +- src/clients/docker/models/Plugin.ts | 168 +- src/clients/docker/models/PluginConfig.ts | 418 +-- src/clients/docker/models/PluginConfigArgs.ts | 119 +- .../docker/models/PluginConfigInterface.ts | 120 +- .../docker/models/PluginConfigLinux.ts | 113 +- .../docker/models/PluginConfigNetwork.ts | 65 +- .../docker/models/PluginConfigRootfs.ts | 79 +- src/clients/docker/models/PluginConfigUser.ts | 79 +- src/clients/docker/models/PluginDevice.ts | 114 +- src/clients/docker/models/PluginEnv.ts | 114 +- .../docker/models/PluginInterfaceType.ts | 101 +- src/clients/docker/models/PluginMount.ts | 168 +- src/clients/docker/models/PluginPrivilege.ts | 95 +- src/clients/docker/models/PluginSettings.ts | 141 +- src/clients/docker/models/PluginsInfo.ts | 110 +- src/clients/docker/models/Port.ts | 116 +- src/clients/docker/models/PortBinding.ts | 74 +- src/clients/docker/models/ProcessConfig.ts | 122 +- src/clients/docker/models/ProgressDetail.ts | 79 +- src/clients/docker/models/PushImageInfo.ts | 119 +- src/clients/docker/models/Reachability.ts | 34 +- .../docker/models/RegistryServiceConfig.ts | 280 +- src/clients/docker/models/ResourceObject.ts | 117 +- src/clients/docker/models/Resources.ts | 786 +++-- .../models/ResourcesBlkioWeightDeviceInner.ts | 87 +- .../docker/models/ResourcesUlimitsInner.ts | 95 +- src/clients/docker/models/RestartPolicy.ts | 105 +- src/clients/docker/models/Runtime.ts | 86 +- src/clients/docker/models/Secret.ts | 146 +- .../docker/models/SecretCreateRequest.ts | 146 +- src/clients/docker/models/SecretSpec.ts | 141 +- src/clients/docker/models/Service.ts | 262 +- .../docker/models/ServiceCreateRequest.ts | 260 +- .../docker/models/ServiceCreateResponse.ts | 79 +- src/clients/docker/models/ServiceEndpoint.ts | 143 +- .../models/ServiceEndpointVirtualIPsInner.ts | 83 +- src/clients/docker/models/ServiceJobStatus.ts | 96 +- .../docker/models/ServiceServiceStatus.ts | 115 +- src/clients/docker/models/ServiceSpec.ts | 253 +- src/clients/docker/models/ServiceSpecMode.ts | 143 +- .../models/ServiceSpecModeReplicated.ts | 67 +- .../models/ServiceSpecModeReplicatedJob.ts | 89 +- .../models/ServiceSpecRollbackConfig.ts | 192 +- .../docker/models/ServiceSpecUpdateConfig.ts | 188 +- .../docker/models/ServiceUpdateRequest.ts | 260 +- .../docker/models/ServiceUpdateResponse.ts | 63 +- .../docker/models/ServiceUpdateStatus.ts | 122 +- src/clients/docker/models/Swarm.ts | 286 +- src/clients/docker/models/SwarmInfo.ts | 237 +- src/clients/docker/models/SwarmInitRequest.ts | 245 +- src/clients/docker/models/SwarmJoinRequest.ts | 167 +- src/clients/docker/models/SwarmSpec.ts | 250 +- .../docker/models/SwarmSpecCAConfig.ts | 161 +- .../SwarmSpecCAConfigExternalCAsInner.ts | 148 +- .../docker/models/SwarmSpecDispatcher.ts | 63 +- .../models/SwarmSpecEncryptionConfig.ts | 69 +- .../docker/models/SwarmSpecOrchestration.ts | 66 +- src/clients/docker/models/SwarmSpecRaft.ts | 149 +- .../docker/models/SwarmSpecTaskDefaults.ts | 76 +- .../models/SwarmSpecTaskDefaultsLogDriver.ts | 91 +- .../docker/models/SwarmUnlockRequest.ts | 63 +- .../docker/models/SystemAuthResponse.ts | 81 +- .../docker/models/SystemDataUsageResponse.ts | 188 +- src/clients/docker/models/SystemInfo.ts | 1464 +++++---- .../SystemInfoDefaultAddressPoolsInner.ts | 91 +- src/clients/docker/models/SystemVersion.ts | 295 +- .../models/SystemVersionComponentsInner.ts | 119 +- .../docker/models/SystemVersionPlatform.ts | 65 +- src/clients/docker/models/TLSInfo.ts | 97 +- src/clients/docker/models/Task.ts | 335 +- src/clients/docker/models/TaskSpec.ts | 318 +- .../docker/models/TaskSpecContainerSpec.ts | 672 ++--- .../TaskSpecContainerSpecConfigsInner.ts | 162 +- .../TaskSpecContainerSpecConfigsInnerFile.ts | 129 +- .../models/TaskSpecContainerSpecDNSConfig.ts | 103 +- .../models/TaskSpecContainerSpecPrivileges.ts | 115 +- ...ecContainerSpecPrivilegesCredentialSpec.ts | 167 +- ...ecContainerSpecPrivilegesSELinuxContext.ts | 137 +- .../TaskSpecContainerSpecSecretsInner.ts | 132 +- .../TaskSpecContainerSpecSecretsInnerFile.ts | 125 +- .../docker/models/TaskSpecLogDriver.ts | 79 +- .../models/TaskSpecNetworkAttachmentSpec.ts | 71 +- .../docker/models/TaskSpecPlacement.ts | 203 +- .../TaskSpecPlacementPreferencesInner.ts | 90 +- ...TaskSpecPlacementPreferencesInnerSpread.ts | 77 +- .../docker/models/TaskSpecPluginSpec.ts | 133 +- .../docker/models/TaskSpecResources.ts | 101 +- .../docker/models/TaskSpecRestartPolicy.ts | 132 +- src/clients/docker/models/TaskState.ts | 60 +- src/clients/docker/models/TaskStatus.ts | 151 +- .../models/TaskStatusContainerStatus.ts | 99 +- src/clients/docker/models/ThrottleDevice.ts | 79 +- .../docker/models/UnlockKeyResponse.ts | 63 +- src/clients/docker/models/Volume.ts | 268 +- .../docker/models/VolumeCreateOptions.ts | 146 +- .../docker/models/VolumeListResponse.ts | 90 +- .../docker/models/VolumePruneResponse.ts | 79 +- .../docker/models/VolumeUpdateRequest.ts | 73 +- src/clients/docker/models/VolumeUsageData.ts | 95 +- src/clients/docker/models/index.ts | 412 +-- src/clients/docker/runtime.ts | 649 ++-- .../apis/FlinkArtifactsArtifactV1Api.ts | 906 +++--- .../apis/PresignedUrlsArtifactV1Api.ts | 101 +- src/clients/flinkArtifacts/apis/index.ts | 4 +- src/clients/flinkArtifacts/index.ts | 6 +- .../models/ArtifactV1FlinkArtifact.ts | 317 +- .../models/ArtifactV1FlinkArtifactList.ts | 166 +- .../ArtifactV1FlinkArtifactListDataInner.ts | 336 +-- .../ArtifactV1FlinkArtifactListMetadata.ts | 137 +- .../models/ArtifactV1FlinkArtifactMetadata.ts | 129 +- .../models/ArtifactV1FlinkArtifactVersion.ts | 159 +- ...ifactV1FlinkArtifactVersionUploadSource.ts | 82 +- .../models/ArtifactV1PresignedUrl.ts | 200 +- .../models/ArtifactV1PresignedUrlRequest.ts | 203 +- .../ArtifactV1PresignedUrlRequestMetadata.ts | 136 +- .../ArtifactV1UploadSourcePresignedUrl.ts | 183 +- ...ifactV1UploadSourcePresignedUrlMetadata.ts | 136 +- ...reateArtifactV1FlinkArtifact201Response.ts | 335 +- .../CreateArtifactV1FlinkArtifactRequest.ts | 241 +- ...ifactV1FlinkArtifactRequestUploadSource.ts | 82 +- .../flinkArtifacts/models/ErrorSource.ts | 70 +- src/clients/flinkArtifacts/models/Failure.ts | 56 +- .../GetArtifactV1FlinkArtifact200Response.ts | 341 +-- src/clients/flinkArtifacts/models/ListMeta.ts | 118 +- .../flinkArtifacts/models/ModelError.ts | 146 +- .../flinkArtifacts/models/ObjectMeta.ts | 112 +- .../flinkArtifacts/models/ObjectReference.ts | 137 +- ...oadUrlArtifactV1PresignedUrl200Response.ts | 214 +- ...dUploadUrlArtifactV1PresignedUrlRequest.ts | 222 +- src/clients/flinkArtifacts/models/index.ts | 48 +- src/clients/flinkArtifacts/runtime.ts | 647 ++-- .../apis/ComputePoolsFcpmV2Api.ts | 628 ++-- .../flinkComputePool/apis/RegionsFcpmV2Api.ts | 134 +- src/clients/flinkComputePool/apis/index.ts | 4 +- src/clients/flinkComputePool/index.ts | 6 +- .../CreateFcpmV2ComputePool202Response.ts | 205 +- .../models/CreateFcpmV2ComputePoolRequest.ts | 195 +- ...CreateFcpmV2ComputePoolRequestAllOfSpec.ts | 89 +- .../models/EnvScopedObjectReference.ts | 113 +- .../flinkComputePool/models/ErrorSource.ts | 70 +- .../flinkComputePool/models/Failure.ts | 56 +- .../models/FcpmV2ComputePool.ts | 191 +- .../models/FcpmV2ComputePoolList.ts | 156 +- .../models/FcpmV2ComputePoolListDataInner.ts | 188 +- .../models/FcpmV2ComputePoolListMetadata.ts | 129 +- .../models/FcpmV2ComputePoolMetadata.ts | 125 +- .../models/FcpmV2ComputePoolSpec.ts | 187 +- .../models/FcpmV2ComputePoolStatus.ts | 74 +- .../flinkComputePool/models/FcpmV2Region.ts | 210 +- .../models/FcpmV2RegionList.ts | 156 +- .../models/FcpmV2RegionListDataInner.ts | 229 +- .../models/FcpmV2RegionListMetadata.ts | 129 +- .../models/FcpmV2RegionMetadata.ts | 121 +- .../models/GetFcpmV2ComputePool200Response.ts | 207 +- .../models/GlobalObjectReference.ts | 93 +- .../ListFcpmV2ComputePools200Response.ts | 166 +- ...V2ComputePools200ResponseAllOfDataInner.ts | 88 +- ...mputePools200ResponseAllOfDataInnerSpec.ts | 89 +- .../flinkComputePool/models/ListMeta.ts | 118 +- .../flinkComputePool/models/ModelError.ts | 146 +- .../flinkComputePool/models/ObjectMeta.ts | 112 +- .../models/ObjectReference.ts | 137 +- .../models/UpdateFcpmV2ComputePoolRequest.ts | 195 +- ...UpdateFcpmV2ComputePoolRequestAllOfSpec.ts | 75 +- src/clients/flinkComputePool/models/index.ts | 58 +- src/clients/flinkComputePool/runtime.ts | 647 ++-- src/clients/flinkSql/.openapi-generator/FILES | 45 + src/clients/flinkSql/apis/AgentsSqlV1Api.ts | 397 +++ .../flinkSql/apis/ConnectionsSqlV1Api.ts | 676 ++--- .../apis/MaterializedTableVersionsSqlV1Api.ts | 196 ++ .../apis/MaterializedTablesSqlV1Api.ts | 400 +++ .../apis/StatementExceptionsSqlV1Api.ts | 148 +- .../flinkSql/apis/StatementResultsSqlV1Api.ts | 153 +- .../flinkSql/apis/StatementsSqlV1Api.ts | 857 +++--- src/clients/flinkSql/apis/ToolsSqlV1Api.ts | 292 ++ src/clients/flinkSql/apis/index.ts | 12 +- src/clients/flinkSql/index.ts | 6 +- src/clients/flinkSql/models/ColumnDetails.ts | 86 +- .../models/CreateSqlv1AgentRequest.ts | 154 + .../CreateSqlv1Connection201Response.ts | 193 +- .../models/CreateSqlv1ConnectionRequest.ts | 187 +- ...CreateSqlv1MaterializedTable201Response.ts | 155 + .../CreateSqlv1MaterializedTableRequest.ts | 154 + .../models/CreateSqlv1Statement201Response.ts | 251 +- .../models/CreateSqlv1StatementRequest.ts | 247 +- .../flinkSql/models/CreateSqlv1ToolRequest.ts | 136 + src/clients/flinkSql/models/DataType.ts | 243 +- src/clients/flinkSql/models/ErrorSource.ts | 70 +- .../flinkSql/models/ExceptionListMeta.ts | 59 +- src/clients/flinkSql/models/Failure.ts | 56 +- .../models/GetSqlv1Connection200Response.ts | 190 +- .../models/GetSqlv1Statement200Response.ts | 252 +- .../GetSqlv1StatementResult200Response.ts | 158 +- .../models/GetSqlv1Tool200Response.ts | 139 + .../models/JsonPatchRequestAddReplace.ts | 114 +- .../models/JsonPatchRequestMoveCopy.ts | 112 +- .../flinkSql/models/JsonPatchRequestRemove.ts | 88 +- src/clients/flinkSql/models/ListMeta.ts | 70 +- src/clients/flinkSql/models/ModelError.ts | 146 +- src/clients/flinkSql/models/ObjectMeta.ts | 120 +- .../flinkSql/models/PatchRequestInner.ts | 112 +- src/clients/flinkSql/models/ResultListMeta.ts | 89 +- src/clients/flinkSql/models/RowFieldType.ts | 104 +- src/clients/flinkSql/models/SqlV1Agent.ts | 161 + src/clients/flinkSql/models/SqlV1AgentList.ts | 122 + .../flinkSql/models/SqlV1AgentMetadata.ts | 114 + src/clients/flinkSql/models/SqlV1AgentSpec.ts | 97 + .../flinkSql/models/SqlV1AgentStatus.ts | 70 + .../flinkSql/models/SqlV1ColumnCommon.ts | 91 + .../flinkSql/models/SqlV1ComputedColumn.ts | 118 + .../flinkSql/models/SqlV1Connection.ts | 189 +- .../flinkSql/models/SqlV1ConnectionList.ts | 156 +- .../models/SqlV1ConnectionListDataInner.ts | 194 +- .../models/SqlV1ConnectionListMetadata.ts | 129 +- .../models/SqlV1ConnectionMetadata.ts | 143 +- .../flinkSql/models/SqlV1ConnectionSpec.ts | 106 +- .../models/SqlV1ConnectionSpecAuthData.ts | 80 +- .../flinkSql/models/SqlV1ConnectionStatus.ts | 86 +- .../flinkSql/models/SqlV1MaterializedTable.ts | 161 + .../SqlV1MaterializedTableColumnDetails.ts | 84 + .../SqlV1MaterializedTableConstraint.ts | 89 + .../SqlV1MaterializedTableDistribution.ts | 73 + .../models/SqlV1MaterializedTableList.ts | 122 + .../models/SqlV1MaterializedTableMetadata.ts | 114 + .../models/SqlV1MaterializedTableSpec.ts | 174 ++ .../models/SqlV1MaterializedTableStatus.ts | 120 + .../models/SqlV1MaterializedTableVersion.ts | 148 + .../SqlV1MaterializedTableVersionList.ts | 122 + .../SqlV1MaterializedTableVersionMetadata.ts | 98 + .../SqlV1MaterializedTableVersionSpec.ts | 89 + .../models/SqlV1MaterializedTableWarning.ts | 99 + .../models/SqlV1MaterializedTableWatermark.ts | 73 + .../flinkSql/models/SqlV1MetadataColumn.ts | 118 + .../flinkSql/models/SqlV1PhysicalColumn.ts | 101 + .../flinkSql/models/SqlV1PlaintextProvider.ts | 100 +- .../flinkSql/models/SqlV1ResourceChange.ts | 102 + .../flinkSql/models/SqlV1ResultSchema.ts | 77 +- .../flinkSql/models/SqlV1ScalingStatus.ts | 84 +- .../flinkSql/models/SqlV1StateLimitStatus.ts | 87 + src/clients/flinkSql/models/SqlV1Statement.ts | 249 +- .../models/SqlV1StatementException.ts | 112 +- .../models/SqlV1StatementExceptionList.ts | 160 +- .../flinkSql/models/SqlV1StatementList.ts | 156 +- .../models/SqlV1StatementListDataInner.ts | 258 +- .../models/SqlV1StatementListMetadata.ts | 129 +- .../flinkSql/models/SqlV1StatementMetadata.ts | 159 +- .../flinkSql/models/SqlV1StatementResult.ts | 155 +- .../models/SqlV1StatementResultResults.ts | 101 +- .../flinkSql/models/SqlV1StatementSpec.ts | 143 +- .../flinkSql/models/SqlV1StatementStatus.ts | 293 +- .../SqlV1StatementStatusAffectedResource.ts | 98 + .../flinkSql/models/SqlV1StatementTraits.ts | 143 +- .../flinkSql/models/SqlV1StatementWarning.ts | 99 + src/clients/flinkSql/models/SqlV1Tool.ts | 145 + src/clients/flinkSql/models/SqlV1ToolList.ts | 128 + .../flinkSql/models/SqlV1ToolListDataInner.ts | 140 + .../flinkSql/models/SqlV1ToolListMetadata.ts | 97 + .../flinkSql/models/SqlV1ToolMetadata.ts | 106 + src/clients/flinkSql/models/SqlV1ToolSpec.ts | 73 + .../flinkSql/models/SqlV1ToolStatus.ts | 79 + .../flinkSql/models/StatementObjectMeta.ts | 141 +- .../models/UpdateSqlv1AgentRequest.ts | 154 + .../models/UpdateSqlv1ConnectionRequest.ts | 176 +- .../UpdateSqlv1MaterializedTableRequest.ts | 154 + .../models/UpdateSqlv1StatementRequest.ts | 236 +- src/clients/flinkSql/models/index.ts | 135 +- src/clients/flinkSql/runtime.ts | 647 ++-- .../flinkWorkspaces/apis/WorkspacesWsV1Api.ts | 819 +++-- src/clients/flinkWorkspaces/apis/index.ts | 2 +- src/clients/flinkWorkspaces/index.ts | 6 +- .../models/CreateWsV1Workspace201Response.ts | 211 +- .../models/CreateWsV1WorkspaceRequest.ts | 229 +- .../CreateWsV1WorkspaceRequestAllOfSpec.ts | 137 +- .../models/EnvScopedObjectReference.ts | 111 +- .../flinkWorkspaces/models/ErrorSource.ts | 70 +- src/clients/flinkWorkspaces/models/Failure.ts | 56 +- .../models/GetWsV1Workspace200Response.ts | 223 +- .../GetWsV1Workspace200ResponseAllOfSpec.ts | 153 +- .../models/GlobalObjectReference.ts | 93 +- .../models/JSONPatchRequestAddReplace.ts | 114 +- .../models/JSONPatchRequestMoveCopy.ts | 112 +- .../models/JSONPatchRequestRemove.ts | 88 +- .../flinkWorkspaces/models/ListMeta.ts | 70 +- .../flinkWorkspaces/models/ModelError.ts | 146 +- .../flinkWorkspaces/models/ObjectMeta.ts | 126 +- .../models/PatchRequestInner.ts | 112 +- .../models/PutWsV1WorkspaceRequest.ts | 223 +- .../PutWsV1WorkspaceRequestAllOfMetadata.ts | 75 +- .../PutWsV1WorkspaceRequestAllOfSpec.ts | 89 +- .../flinkWorkspaces/models/WsV1Block.ts | 108 +- .../flinkWorkspaces/models/WsV1CodeOptions.ts | 61 +- .../flinkWorkspaces/models/WsV1Workspace.ts | 222 +- .../models/WsV1WorkspaceList.ts | 156 +- .../models/WsV1WorkspaceListDataInner.ts | 207 +- .../models/WsV1WorkspaceMetadata.ts | 136 +- .../models/WsV1WorkspaceSpec.ts | 171 +- .../models/WsV1WorkspaceSpecBlocksInner.ts | 121 +- .../models/WsV1WorkspaceStatus.ts | 66 +- src/clients/flinkWorkspaces/models/index.ts | 56 +- src/clients/flinkWorkspaces/runtime.ts | 647 ++-- src/clients/kafkaRest/apis/ACLV3Api.ts | 635 ++-- .../kafkaRest/apis/ClusterLinkingV3Api.ts | 2688 +++++++---------- src/clients/kafkaRest/apis/ClusterV3Api.ts | 109 +- src/clients/kafkaRest/apis/ConfigsV3Api.ts | 1538 ++++------ .../kafkaRest/apis/ConsumerGroupV3Api.ts | 908 +++--- src/clients/kafkaRest/apis/PartitionV3Api.ts | 273 +- src/clients/kafkaRest/apis/RecordsV3Api.ts | 145 +- src/clients/kafkaRest/apis/TopicV3Api.ts | 612 ++-- src/clients/kafkaRest/apis/index.ts | 16 +- src/clients/kafkaRest/index.ts | 6 +- .../kafkaRest/models/AbstractConfigData.ts | 247 +- src/clients/kafkaRest/models/AclData.ts | 246 +- src/clients/kafkaRest/models/AclDataList.ts | 118 +- .../kafkaRest/models/AclResourceType.ts | 52 +- .../models/AlterBrokerReplicaExclusionData.ts | 235 +- .../AlterBrokerReplicaExclusionDataList.ts | 135 +- .../models/AlterConfigBatchRequestData.ts | 95 +- .../AlterConfigBatchRequestDataDataInner.ts | 107 +- .../models/AlterMirrorStatusResponseData.ts | 181 +- .../AlterMirrorStatusResponseDataList.ts | 135 +- .../models/AlterMirrorsRequestData.ts | 78 +- .../kafkaRest/models/AnyUnevenLoadData.ts | 242 +- .../kafkaRest/models/BalancerStatusData.ts | 209 +- .../kafkaRest/models/BrokerConfigData.ts | 265 +- .../kafkaRest/models/BrokerConfigDataList.ts | 123 +- src/clients/kafkaRest/models/BrokerData.ts | 220 +- .../kafkaRest/models/BrokerDataList.ts | 123 +- .../kafkaRest/models/BrokerRemovalData.ts | 177 +- .../kafkaRest/models/BrokerRemovalDataList.ts | 123 +- .../BrokerReplicaExclusionBatchRequestData.ts | 87 +- .../models/BrokerReplicaExclusionData.ts | 181 +- .../models/BrokerReplicaExclusionDataList.ts | 127 +- .../BrokerReplicaExclusionRequestData.ts | 93 +- .../kafkaRest/models/BrokerTaskData.ts | 307 +- .../kafkaRest/models/BrokerTaskDataList.ts | 123 +- .../kafkaRest/models/BrokerTaskType.ts | 42 +- .../kafkaRest/models/ClusterConfigData.ts | 265 +- .../kafkaRest/models/ClusterConfigDataList.ts | 123 +- src/clients/kafkaRest/models/ClusterData.ts | 243 +- .../kafkaRest/models/ClusterDataList.ts | 123 +- src/clients/kafkaRest/models/ConfigData.ts | 76 +- .../kafkaRest/models/ConfigSynonymData.ts | 97 +- .../models/ConsumerAssignmentData.ts | 231 +- .../models/ConsumerAssignmentDataList.ts | 127 +- src/clients/kafkaRest/models/ConsumerData.ts | 206 +- .../kafkaRest/models/ConsumerDataList.ts | 123 +- .../kafkaRest/models/ConsumerGroupData.ts | 247 +- .../kafkaRest/models/ConsumerGroupDataList.ts | 123 +- .../models/ConsumerGroupLagSummaryData.ts | 307 +- .../kafkaRest/models/ConsumerLagData.ts | 271 +- .../kafkaRest/models/ConsumerLagDataList.ts | 123 +- .../kafkaRest/models/CreateAclRequestData.ts | 185 +- .../models/CreateAclRequestDataList.ts | 79 +- .../kafkaRest/models/CreateLinkRequestData.ts | 140 +- .../models/CreateMirrorTopicRequestData.ts | 129 +- .../models/CreateTopicRequestData.ts | 145 +- .../CreateTopicRequestDataConfigsInner.ts | 91 +- .../models/DeleteKafkaAcls200Response.ts | 79 +- src/clients/kafkaRest/models/LinkTask.ts | 106 +- src/clients/kafkaRest/models/LinkTaskError.ts | 76 +- .../models/ListLinkConfigsResponseData.ts | 241 +- .../models/ListLinkConfigsResponseDataList.ts | 131 +- .../kafkaRest/models/ListLinksResponseData.ts | 290 +- .../models/ListLinksResponseDataList.ts | 127 +- .../models/ListMirrorTopicsResponseData.ts | 283 +- .../ListMirrorTopicsResponseDataList.ts | 135 +- src/clients/kafkaRest/models/MirrorLag.ts | 95 +- .../kafkaRest/models/MirrorTopicStatus.ts | 58 +- src/clients/kafkaRest/models/ModelError.ts | 76 +- src/clients/kafkaRest/models/PartitionData.ts | 206 +- .../kafkaRest/models/PartitionDataList.ts | 123 +- .../kafkaRest/models/ProduceRequest.ts | 155 +- .../kafkaRest/models/ProduceRequestData.ts | 126 +- .../kafkaRest/models/ProduceRequestHeader.ts | 79 +- .../kafkaRest/models/ProduceResponse.ts | 203 +- .../kafkaRest/models/ProduceResponseData.ts | 81 +- .../kafkaRest/models/ReassignmentData.ts | 213 +- .../kafkaRest/models/ReassignmentDataList.ts | 123 +- src/clients/kafkaRest/models/Relationship.ts | 58 +- .../kafkaRest/models/RemoveBrokerTaskData.ts | 272 +- .../models/RemoveBrokerTaskDataList.ts | 127 +- .../models/RemoveBrokersRequestData.ts | 67 +- src/clients/kafkaRest/models/ReplicaData.ts | 226 +- .../kafkaRest/models/ReplicaDataList.ts | 123 +- .../kafkaRest/models/ReplicaStatusData.ts | 344 ++- .../kafkaRest/models/ReplicaStatusDataList.ts | 123 +- src/clients/kafkaRest/models/Resource.ts | 88 +- .../kafkaRest/models/ResourceCollection.ts | 93 +- .../models/ResourceCollectionMetadata.ts | 83 +- .../kafkaRest/models/ResourceMetadata.ts | 79 +- .../kafkaRest/models/TopicConfigData.ts | 265 +- .../kafkaRest/models/TopicConfigDataList.ts | 123 +- src/clients/kafkaRest/models/TopicData.ts | 262 +- src/clients/kafkaRest/models/TopicDataList.ts | 118 +- .../models/UpdateConfigRequestData.ts | 61 +- .../models/UpdateLinkConfigRequestData.ts | 67 +- .../models/UpdatePartitionCountRequestData.ts | 71 +- src/clients/kafkaRest/models/index.ts | 174 +- src/clients/kafkaRest/runtime.ts | 647 ++-- src/clients/medusa/apis/BatchManagementApi.ts | 227 +- .../apis/ConfluentProducerControllerApi.ts | 71 +- src/clients/medusa/apis/EventThrottlersApi.ts | 82 +- src/clients/medusa/apis/ExampleDatasetsApi.ts | 81 +- .../medusa/apis/SchemaManagementApi.ts | 282 +- .../medusa/apis/StreamManagementApi.ts | 361 +-- src/clients/medusa/apis/ValueGeneratorsApi.ts | 315 +- src/clients/medusa/apis/index.ts | 14 +- src/clients/medusa/index.ts | 6 +- .../medusa/models/AvroSchemaResponse.ts | 61 +- .../medusa/models/AvroSchemaResponseList.ts | 139 +- src/clients/medusa/models/CategoryList.ts | 161 +- .../medusa/models/CollectionMetadata.ts | 77 +- src/clients/medusa/models/ColumnDTO.ts | 95 +- src/clients/medusa/models/DatasetDTO.ts | 100 +- src/clients/medusa/models/EventDTO.ts | 165 +- src/clients/medusa/models/EventMessage.ts | 72 +- src/clients/medusa/models/EventMessageList.ts | 133 +- .../medusa/models/EventStreamSimulation.ts | 94 +- .../models/EventStreamSimulationList.ts | 143 +- .../medusa/models/EventThrottlerDTO.ts | 88 +- .../medusa/models/EventThrottlerDetails.ts | 111 +- .../models/EventThrottlerDetailsList.ts | 143 +- src/clients/medusa/models/ExampleDataset.ts | 105 +- .../medusa/models/ExampleDatasetList.ts | 135 +- .../medusa/models/ExpectedArgumentDetails.ts | 109 +- src/clients/medusa/models/FieldDTO.ts | 104 +- src/clients/medusa/models/GenerationDTO.ts | 233 +- src/clients/medusa/models/ProducerHealth.ts | 61 +- src/clients/medusa/models/RowDTO.ts | 58 +- src/clients/medusa/models/StreamDetails.ts | 56 +- src/clients/medusa/models/TableDTO.ts | 133 +- src/clients/medusa/models/TableLinkDTO.ts | 89 +- .../medusa/models/ValueGeneratorDetails.ts | 188 +- .../models/ValueGeneratorDetailsList.ts | 143 +- src/clients/medusa/models/index.ts | 52 +- src/clients/medusa/runtime.ts | 647 ++-- .../apis/TemplateCollectionsScaffoldV1Api.ts | 192 +- .../apis/TemplatesScaffoldV1Api.ts | 325 +- src/clients/scaffoldingService/apis/index.ts | 4 +- src/clients/scaffoldingService/index.ts | 6 +- .../models/ApplyScaffoldV1TemplateRequest.ts | 67 +- .../scaffoldingService/models/ErrorSource.ts | 72 +- .../scaffoldingService/models/Failure.ts | 58 +- .../GetScaffoldV1Template200Response.ts | 155 +- ...ScaffoldV1TemplateCollection200Response.ts | 157 +- .../models/GlobalObjectReference.ts | 95 +- .../scaffoldingService/models/ListMeta.ts | 120 +- .../scaffoldingService/models/ModelError.ts | 148 +- .../scaffoldingService/models/ObjectMeta.ts | 114 +- .../models/ObjectReference.ts | 139 +- .../models/ScaffoldV1Template.ts | 149 +- .../models/ScaffoldV1TemplateCollection.ts | 155 +- .../ScaffoldV1TemplateCollectionList.ts | 172 +- ...affoldV1TemplateCollectionListDataInner.ts | 152 +- ...caffoldV1TemplateCollectionListMetadata.ts | 139 +- .../ScaffoldV1TemplateCollectionMetadata.ts | 138 +- .../ScaffoldV1TemplateCollectionSpec.ts | 105 +- .../models/ScaffoldV1TemplateList.ts | 156 +- .../models/ScaffoldV1TemplateListDataInner.ts | 148 +- .../models/ScaffoldV1TemplateListMetadata.ts | 131 +- .../models/ScaffoldV1TemplateMetadata.ts | 127 +- .../models/ScaffoldV1TemplateOption.ts | 230 +- .../models/ScaffoldV1TemplateSpec.ts | 206 +- .../scaffoldingService/models/index.ts | 46 +- src/clients/scaffoldingService/runtime.ts | 649 ++-- .../apis/CompatibilityV1Api.ts | 302 +- .../schemaRegistryRest/apis/ConfigV1Api.ts | 719 ++--- .../schemaRegistryRest/apis/ContextsV1Api.ts | 90 +- .../apis/DataEncryptionKeysV1Api.ts | 1327 ++++---- .../schemaRegistryRest/apis/ExportersV1Api.ts | 1248 ++++---- .../apis/KeyEncryptionKeysV1Api.ts | 627 ++-- .../schemaRegistryRest/apis/ModesV1Api.ts | 556 ++-- .../schemaRegistryRest/apis/SchemasV1Api.ts | 734 ++--- .../schemaRegistryRest/apis/SubjectsV1Api.ts | 1187 ++++---- src/clients/schemaRegistryRest/apis/index.ts | 18 +- src/clients/schemaRegistryRest/index.ts | 6 +- .../models/ClusterConfig.ts | 70 +- .../models/CompatibilityCheckResponse.ts | 79 +- .../schemaRegistryRest/models/Config.ts | 236 +- .../models/ConfigDefaultMetadata.ts | 59 +- .../models/ConfigDefaultRuleSet.ts | 59 +- .../models/ConfigOverrideMetadata.ts | 59 +- .../models/ConfigOverrideRuleSet.ts | 59 +- .../models/ConfigUpdateRequest.ts | 241 +- .../models/CreateDekRequest.ts | 139 +- .../models/CreateKekRequest.ts | 157 +- src/clients/schemaRegistryRest/models/Dek.ts | 177 +- .../schemaRegistryRest/models/ErrorMessage.ts | 70 +- .../models/ExporterConfigResponse.ts | 96 +- .../models/ExporterReference.ts | 140 +- .../models/ExporterResponse.ts | 59 +- .../models/ExporterStatusResponse.ts | 123 +- .../models/ExporterUpdateRequest.ts | 124 +- src/clients/schemaRegistryRest/models/Kek.ts | 163 +- .../schemaRegistryRest/models/Metadata.ts | 86 +- src/clients/schemaRegistryRest/models/Mode.ts | 49 +- .../models/ModeUpdateRequest.ts | 59 +- .../models/RegisterExporterRequest.ts | 77 +- .../models/RegisterSchemaRequest.ts | 197 +- .../models/RegisterSchemaResponse.ts | 59 +- src/clients/schemaRegistryRest/models/Rule.ts | 238 +- .../schemaRegistryRest/models/RuleSet.ts | 91 +- .../schemaRegistryRest/models/Schema.ts | 208 +- .../models/SchemaReference.ts | 91 +- .../schemaRegistryRest/models/SchemaString.ts | 120 +- .../models/SubjectVersion.ts | 75 +- .../models/UpdateKekRequest.ts | 93 +- .../schemaRegistryRest/models/index.ts | 62 +- src/clients/schemaRegistryRest/runtime.ts | 647 ++-- .../flink-sql.openapi.yaml | 2512 ++++++++++++++- ...ConfluentCloudProduceRecordsResourceApi.ts | 157 +- .../sidecar/apis/ConnectionsResourceApi.ts | 510 ++-- .../sidecar/apis/HandshakeResourceApi.ts | 75 +- .../sidecar/apis/KafkaConsumeResourceApi.ts | 150 +- .../sidecar/apis/LoginRealmResourceApi.ts | 62 +- .../sidecar/apis/MicroProfileHealthApi.ts | 266 +- .../sidecar/apis/OAuthCallbackResourceApi.ts | 80 +- .../apis/PasswordResetCallbackResourceApi.ts | 88 +- .../sidecar/apis/PreferencesResourceApi.ts | 158 +- .../sidecar/apis/VersionResourceApi.ts | 75 +- src/clients/sidecar/apis/index.ts | 20 +- src/clients/sidecar/index.ts | 6 +- src/clients/sidecar/models/ApiKeyAndSecret.ts | 77 +- src/clients/sidecar/models/AuthError.ts | 70 +- src/clients/sidecar/models/AuthErrors.ts | 100 +- .../sidecar/models/BasicCredentials.ts | 77 +- src/clients/sidecar/models/CCloudConfig.ts | 69 +- src/clients/sidecar/models/CCloudStatus.ts | 146 +- .../sidecar/models/CollectionMetadata.ts | 91 +- src/clients/sidecar/models/ConnectedState.ts | 46 +- src/clients/sidecar/models/Connection.ts | 182 +- .../sidecar/models/ConnectionMetadata.ts | 91 +- src/clients/sidecar/models/ConnectionSpec.ts | 221 +- .../sidecar/models/ConnectionStatus.ts | 131 +- src/clients/sidecar/models/ConnectionType.ts | 42 +- src/clients/sidecar/models/ConnectionsList.ts | 139 +- src/clients/sidecar/models/DataFormat.ts | 40 +- src/clients/sidecar/models/ExceededFields.ts | 75 +- src/clients/sidecar/models/Failure.ts | 130 +- src/clients/sidecar/models/HashAlgorithm.ts | 30 +- src/clients/sidecar/models/HealthCheck.ts | 97 +- src/clients/sidecar/models/HealthResponse.ts | 100 +- src/clients/sidecar/models/JsonNode.ts | 405 +-- src/clients/sidecar/models/JsonNodeType.ts | 44 +- .../sidecar/models/KafkaClusterConfig.ts | 134 +- .../models/KafkaClusterConfigCredentials.ts | 158 +- .../sidecar/models/KafkaClusterStatus.ts | 129 +- .../sidecar/models/KerberosCredentials.ts | 93 +- .../sidecar/models/KeyOrValueMetadata.ts | 105 +- src/clients/sidecar/models/KeyStore.ts | 118 +- src/clients/sidecar/models/LocalConfig.ts | 53 +- .../sidecar/models/OAuthCredentials.ts | 160 +- .../sidecar/models/PartitionConsumeData.ts | 109 +- .../sidecar/models/PartitionConsumeRecord.ts | 290 +- .../models/PartitionConsumeRecordHeader.ts | 79 +- src/clients/sidecar/models/PartitionOffset.ts | 75 +- src/clients/sidecar/models/Preferences.ts | 132 +- .../sidecar/models/PreferencesMetadata.ts | 61 +- src/clients/sidecar/models/PreferencesSpec.ts | 110 +- src/clients/sidecar/models/ProduceRequest.ts | 154 +- .../sidecar/models/ProduceRequestData.ts | 156 +- .../sidecar/models/ProduceRequestHeader.ts | 77 +- src/clients/sidecar/models/ProduceResponse.ts | 202 +- .../sidecar/models/ProduceResponseData.ts | 127 +- src/clients/sidecar/models/RecordMetadata.ts | 91 +- .../sidecar/models/SchemaRegistryConfig.ts | 134 +- .../models/SchemaRegistryConfigCredentials.ts | 107 +- .../sidecar/models/SchemaRegistryStatus.ts | 129 +- .../sidecar/models/ScramCredentials.ts | 109 +- .../sidecar/models/SidecarAccessToken.ts | 59 +- src/clients/sidecar/models/SidecarError.ts | 144 +- .../sidecar/models/SidecarVersionResponse.ts | 59 +- .../SimpleConsumeMultiPartitionRequest.ts | 169 +- .../SimpleConsumeMultiPartitionResponse.ts | 121 +- src/clients/sidecar/models/StoreType.ts | 34 +- src/clients/sidecar/models/TLSConfig.ts | 126 +- src/clients/sidecar/models/TimestampType.ts | 32 +- src/clients/sidecar/models/TrustStore.ts | 102 +- src/clients/sidecar/models/UserInfo.ts | 134 +- src/clients/sidecar/models/index.ts | 114 +- src/clients/sidecar/runtime.ts | 645 ++-- 705 files changed, 65997 insertions(+), 64646 deletions(-) create mode 100644 src/clients/flinkSql/apis/AgentsSqlV1Api.ts create mode 100644 src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts create mode 100644 src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts create mode 100644 src/clients/flinkSql/apis/ToolsSqlV1Api.ts create mode 100644 src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts create mode 100644 src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts create mode 100644 src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts create mode 100644 src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts create mode 100644 src/clients/flinkSql/models/GetSqlv1Tool200Response.ts create mode 100644 src/clients/flinkSql/models/SqlV1Agent.ts create mode 100644 src/clients/flinkSql/models/SqlV1AgentList.ts create mode 100644 src/clients/flinkSql/models/SqlV1AgentMetadata.ts create mode 100644 src/clients/flinkSql/models/SqlV1AgentSpec.ts create mode 100644 src/clients/flinkSql/models/SqlV1AgentStatus.ts create mode 100644 src/clients/flinkSql/models/SqlV1ColumnCommon.ts create mode 100644 src/clients/flinkSql/models/SqlV1ComputedColumn.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTable.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableList.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts create mode 100644 src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts create mode 100644 src/clients/flinkSql/models/SqlV1MetadataColumn.ts create mode 100644 src/clients/flinkSql/models/SqlV1PhysicalColumn.ts create mode 100644 src/clients/flinkSql/models/SqlV1ResourceChange.ts create mode 100644 src/clients/flinkSql/models/SqlV1StateLimitStatus.ts create mode 100644 src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts create mode 100644 src/clients/flinkSql/models/SqlV1StatementWarning.ts create mode 100644 src/clients/flinkSql/models/SqlV1Tool.ts create mode 100644 src/clients/flinkSql/models/SqlV1ToolList.ts create mode 100644 src/clients/flinkSql/models/SqlV1ToolListDataInner.ts create mode 100644 src/clients/flinkSql/models/SqlV1ToolListMetadata.ts create mode 100644 src/clients/flinkSql/models/SqlV1ToolMetadata.ts create mode 100644 src/clients/flinkSql/models/SqlV1ToolSpec.ts create mode 100644 src/clients/flinkSql/models/SqlV1ToolStatus.ts create mode 100644 src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts create mode 100644 src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts diff --git a/src/clients/docker/apis/ConfigApi.ts b/src/clients/docker/apis/ConfigApi.ts index 4314594b46..d2a05d4ba8 100644 --- a/src/clients/docker/apis/ConfigApi.ts +++ b/src/clients/docker/apis/ConfigApi.ts @@ -2,284 +2,233 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { Config, ConfigCreateRequest, ConfigSpec, ErrorResponse, IdResponse, -} from "../models/index"; +} from '../models/index'; import { - ConfigFromJSON, - ConfigToJSON, - ConfigCreateRequestFromJSON, - ConfigCreateRequestToJSON, - ConfigSpecFromJSON, - ConfigSpecToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - IdResponseFromJSON, - IdResponseToJSON, -} from "../models/index"; + ConfigFromJSON, + ConfigToJSON, + ConfigCreateRequestFromJSON, + ConfigCreateRequestToJSON, + ConfigSpecFromJSON, + ConfigSpecToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + IdResponseFromJSON, + IdResponseToJSON, +} from '../models/index'; export interface ConfigCreateOperationRequest { - body?: ConfigCreateRequest; + body?: ConfigCreateRequest; } export interface ConfigDeleteRequest { - id: string; + id: string; } export interface ConfigInspectRequest { - id: string; + id: string; } export interface ConfigListRequest { - filters?: string; + filters?: string; } export interface ConfigUpdateRequest { - id: string; - version: number; - body?: ConfigSpec; + id: string; + version: number; + body?: ConfigSpec; } /** - * + * */ export class ConfigApi extends runtime.BaseAPI { - /** - * Create a config - */ - async configCreateRaw( - requestParameters: ConfigCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/configs/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ConfigCreateRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); - } - - /** - * Create a config - */ - async configCreate( - requestParameters: ConfigCreateOperationRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.configCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete a config - */ - async configDeleteRaw( - requestParameters: ConfigDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling configDelete().', - ); + + /** + * Create a config + */ + async configCreateRaw(requestParameters: ConfigCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/configs/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ConfigCreateRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + } + + /** + * Create a config + */ + async configCreate(requestParameters: ConfigCreateOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.configCreateRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/configs/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a config - */ - async configDelete( - requestParameters: ConfigDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.configDeleteRaw(requestParameters, initOverrides); - } - - /** - * Inspect a config - */ - async configInspectRaw( - requestParameters: ConfigInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling configInspect().', - ); + /** + * Delete a config + */ + async configDeleteRaw(requestParameters: ConfigDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling configDelete().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/configs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/configs/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); - } - - /** - * Inspect a config - */ - async configInspect( - requestParameters: ConfigInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.configInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List configs - */ - async configListRaw( - requestParameters: ConfigListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Delete a config + */ + async configDelete(requestParameters: ConfigDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.configDeleteRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/configs`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigFromJSON)); - } - - /** - * List configs - */ - async configList( - requestParameters: ConfigListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.configListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a Config - */ - async configUpdateRaw( - requestParameters: ConfigUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling configUpdate().', - ); + /** + * Inspect a config + */ + async configInspectRaw(requestParameters: ConfigInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling configInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/configs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); } - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling configUpdate().', - ); + /** + * Inspect a config + */ + async configInspect(requestParameters: ConfigInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.configInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * List configs + */ + async configListRaw(requestParameters: ConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/configs`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigFromJSON)); + } + + /** + * List configs + */ + async configList(requestParameters: ConfigListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.configListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a Config + */ + async configUpdateRaw(requestParameters: ConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling configUpdate().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling configUpdate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/configs/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ConfigSpecToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; + /** + * Update a Config + */ + async configUpdate(requestParameters: ConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.configUpdateRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/configs/{id}/update`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ConfigSpecToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Update a Config - */ - async configUpdate( - requestParameters: ConfigUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.configUpdateRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/ContainerApi.ts b/src/clients/docker/apis/ContainerApi.ts index 46be968070..68efbb4069 100644 --- a/src/clients/docker/apis/ContainerApi.ts +++ b/src/clients/docker/apis/ContainerApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ContainerCreateRequest, ContainerCreateResponse, @@ -25,1571 +26,1266 @@ import type { ContainerWaitResponse, ErrorResponse, FilesystemChange, -} from "../models/index"; +} from '../models/index'; import { - ContainerCreateRequestFromJSON, - ContainerCreateRequestToJSON, - ContainerCreateResponseFromJSON, - ContainerCreateResponseToJSON, - ContainerInspectResponseFromJSON, - ContainerInspectResponseToJSON, - ContainerPruneResponseFromJSON, - ContainerPruneResponseToJSON, - ContainerSummaryFromJSON, - ContainerSummaryToJSON, - ContainerTopResponseFromJSON, - ContainerTopResponseToJSON, - ContainerUpdateRequestFromJSON, - ContainerUpdateRequestToJSON, - ContainerUpdateResponseFromJSON, - ContainerUpdateResponseToJSON, - ContainerWaitResponseFromJSON, - ContainerWaitResponseToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - FilesystemChangeFromJSON, - FilesystemChangeToJSON, -} from "../models/index"; + ContainerCreateRequestFromJSON, + ContainerCreateRequestToJSON, + ContainerCreateResponseFromJSON, + ContainerCreateResponseToJSON, + ContainerInspectResponseFromJSON, + ContainerInspectResponseToJSON, + ContainerPruneResponseFromJSON, + ContainerPruneResponseToJSON, + ContainerSummaryFromJSON, + ContainerSummaryToJSON, + ContainerTopResponseFromJSON, + ContainerTopResponseToJSON, + ContainerUpdateRequestFromJSON, + ContainerUpdateRequestToJSON, + ContainerUpdateResponseFromJSON, + ContainerUpdateResponseToJSON, + ContainerWaitResponseFromJSON, + ContainerWaitResponseToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + FilesystemChangeFromJSON, + FilesystemChangeToJSON, +} from '../models/index'; export interface ContainerArchiveRequest { - id: string; - path: string; + id: string; + path: string; } export interface ContainerArchiveInfoRequest { - id: string; - path: string; + id: string; + path: string; } export interface ContainerAttachRequest { - id: string; - detachKeys?: string; - logs?: boolean; - stream?: boolean; - stdin?: boolean; - stdout?: boolean; - stderr?: boolean; + id: string; + detachKeys?: string; + logs?: boolean; + stream?: boolean; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; } export interface ContainerAttachWebsocketRequest { - id: string; - detachKeys?: string; - logs?: boolean; - stream?: boolean; - stdin?: boolean; - stdout?: boolean; - stderr?: boolean; + id: string; + detachKeys?: string; + logs?: boolean; + stream?: boolean; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; } export interface ContainerChangesRequest { - id: string; + id: string; } export interface ContainerCreateOperationRequest { - body: ContainerCreateRequest; - name?: string; - platform?: string; + body: ContainerCreateRequest; + name?: string; + platform?: string; } export interface ContainerDeleteRequest { - id: string; - v?: boolean; - force?: boolean; - link?: boolean; + id: string; + v?: boolean; + force?: boolean; + link?: boolean; } export interface ContainerExportRequest { - id: string; + id: string; } export interface ContainerInspectRequest { - id: string; - size?: boolean; + id: string; + size?: boolean; } export interface ContainerKillRequest { - id: string; - signal?: string; + id: string; + signal?: string; } export interface ContainerListRequest { - all?: boolean; - limit?: number; - size?: boolean; - filters?: string; + all?: boolean; + limit?: number; + size?: boolean; + filters?: string; } export interface ContainerLogsRequest { - id: string; - follow?: boolean; - stdout?: boolean; - stderr?: boolean; - since?: number; - until?: number; - timestamps?: boolean; - tail?: string; + id: string; + follow?: boolean; + stdout?: boolean; + stderr?: boolean; + since?: number; + until?: number; + timestamps?: boolean; + tail?: string; } export interface ContainerPauseRequest { - id: string; + id: string; } export interface ContainerPruneRequest { - filters?: string; + filters?: string; } export interface ContainerRenameRequest { - id: string; - name: string; + id: string; + name: string; } export interface ContainerResizeRequest { - id: string; - h?: number; - w?: number; + id: string; + h?: number; + w?: number; } export interface ContainerRestartRequest { - id: string; - signal?: string; - t?: number; + id: string; + signal?: string; + t?: number; } export interface ContainerStartRequest { - id: string; - detachKeys?: string; + id: string; + detachKeys?: string; } export interface ContainerStatsRequest { - id: string; - stream?: boolean; - one_shot?: boolean; + id: string; + stream?: boolean; + one_shot?: boolean; } export interface ContainerStopRequest { - id: string; - signal?: string; - t?: number; + id: string; + signal?: string; + t?: number; } export interface ContainerTopRequest { - id: string; - ps_args?: string; + id: string; + ps_args?: string; } export interface ContainerUnpauseRequest { - id: string; + id: string; } export interface ContainerUpdateOperationRequest { - id: string; - update: ContainerUpdateRequest; + id: string; + update: ContainerUpdateRequest; } export interface ContainerWaitRequest { - id: string; - condition?: ContainerWaitConditionEnum; + id: string; + condition?: ContainerWaitConditionEnum; } export interface PutContainerArchiveRequest { - id: string; - path: string; - inputStream: Blob; - noOverwriteDirNonDir?: string; - copyUIDGID?: string; + id: string; + path: string; + inputStream: Blob; + noOverwriteDirNonDir?: string; + copyUIDGID?: string; } /** - * + * */ export class ContainerApi extends runtime.BaseAPI { - /** - * Get a tar archive of a resource in the filesystem of container id. - * Get an archive of a filesystem resource in a container - */ - async containerArchiveRaw( - requestParameters: ContainerArchiveRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerArchive().', - ); - } - - if (requestParameters["path"] == null) { - throw new runtime.RequiredError( - "path", - 'Required parameter "path" was null or undefined when calling containerArchive().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["path"] != null) { - queryParameters["path"] = requestParameters["path"]; - } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/archive`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Get a tar archive of a resource in the filesystem of container id. - * Get an archive of a filesystem resource in a container - */ - async containerArchive( - requestParameters: ContainerArchiveRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerArchiveRaw(requestParameters, initOverrides); - } - - /** - * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. - * Get information about files in a container - */ - async containerArchiveInfoRaw( - requestParameters: ContainerArchiveInfoRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerArchiveInfo().', - ); - } - - if (requestParameters["path"] == null) { - throw new runtime.RequiredError( - "path", - 'Required parameter "path" was null or undefined when calling containerArchiveInfo().', - ); - } + /** + * Get a tar archive of a resource in the filesystem of container id. + * Get an archive of a filesystem resource in a container + */ + async containerArchiveRaw(requestParameters: ContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerArchive().' + ); + } + + if (requestParameters['path'] == null) { + throw new runtime.RequiredError( + 'path', + 'Required parameter "path" was null or undefined when calling containerArchive().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/archive`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Get a tar archive of a resource in the filesystem of container id. + * Get an archive of a filesystem resource in a container + */ + async containerArchive(requestParameters: ContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerArchiveRaw(requestParameters, initOverrides); + } + + /** + * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. + * Get information about files in a container + */ + async containerArchiveInfoRaw(requestParameters: ContainerArchiveInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerArchiveInfo().' + ); + } + + if (requestParameters['path'] == null) { + throw new runtime.RequiredError( + 'path', + 'Required parameter "path" was null or undefined when calling containerArchiveInfo().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/archive`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'HEAD', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. + * Get information about files in a container + */ + async containerArchiveInfo(requestParameters: ContainerArchiveInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerArchiveInfoRaw(requestParameters, initOverrides); + } + + /** + * 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`. + * Attach to a container + */ + async containerAttachRaw(requestParameters: ContainerAttachRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerAttach().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['detachKeys'] != null) { + queryParameters['detachKeys'] = requestParameters['detachKeys']; + } + + if (requestParameters['logs'] != null) { + queryParameters['logs'] = requestParameters['logs']; + } + + if (requestParameters['stream'] != null) { + queryParameters['stream'] = requestParameters['stream']; + } + + if (requestParameters['stdin'] != null) { + queryParameters['stdin'] = requestParameters['stdin']; + } + + if (requestParameters['stdout'] != null) { + queryParameters['stdout'] = requestParameters['stdout']; + } + + if (requestParameters['stderr'] != null) { + queryParameters['stderr'] = requestParameters['stderr']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/attach`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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`. + * Attach to a container + */ + async containerAttach(requestParameters: ContainerAttachRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerAttachRaw(requestParameters, initOverrides); + } + + /** + * Attach to a container via a websocket + */ + async containerAttachWebsocketRaw(requestParameters: ContainerAttachWebsocketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerAttachWebsocket().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['detachKeys'] != null) { + queryParameters['detachKeys'] = requestParameters['detachKeys']; + } - const queryParameters: any = {}; - - if (requestParameters["path"] != null) { - queryParameters["path"] = requestParameters["path"]; - } + if (requestParameters['logs'] != null) { + queryParameters['logs'] = requestParameters['logs']; + } + + if (requestParameters['stream'] != null) { + queryParameters['stream'] = requestParameters['stream']; + } + + if (requestParameters['stdin'] != null) { + queryParameters['stdin'] = requestParameters['stdin']; + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/archive`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "HEAD", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. - * Get information about files in a container - */ - async containerArchiveInfo( - requestParameters: ContainerArchiveInfoRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerArchiveInfoRaw(requestParameters, initOverrides); - } - - /** - * 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`. - * Attach to a container - */ - async containerAttachRaw( - requestParameters: ContainerAttachRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerAttach().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["detachKeys"] != null) { - queryParameters["detachKeys"] = requestParameters["detachKeys"]; - } + if (requestParameters['stdout'] != null) { + queryParameters['stdout'] = requestParameters['stdout']; + } + + if (requestParameters['stderr'] != null) { + queryParameters['stderr'] = requestParameters['stderr']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/attach/ws`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Attach to a container via a websocket + */ + async containerAttachWebsocket(requestParameters: ContainerAttachWebsocketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerAttachWebsocketRaw(requestParameters, initOverrides); + } - if (requestParameters["logs"] != null) { - queryParameters["logs"] = requestParameters["logs"]; - } + /** + * 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\") + * Get changes on a container’s filesystem + */ + async containerChangesRaw(requestParameters: ContainerChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerChanges().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["stream"] != null) { - queryParameters["stream"] = requestParameters["stream"]; - } + const response = await this.request({ + path: `/containers/{id}/changes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (requestParameters["stdin"] != null) { - queryParameters["stdin"] = requestParameters["stdin"]; + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FilesystemChangeFromJSON)); } - if (requestParameters["stdout"] != null) { - queryParameters["stdout"] = requestParameters["stdout"]; - } + /** + * 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\") + * Get changes on a container’s filesystem + */ + async containerChanges(requestParameters: ContainerChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.containerChangesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create a container + */ + async containerCreateRaw(requestParameters: ContainerCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling containerCreate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } - if (requestParameters["stderr"] != null) { - queryParameters["stderr"] = requestParameters["stderr"]; - } + if (requestParameters['platform'] != null) { + queryParameters['platform'] = requestParameters['platform']; + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/attach`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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`. - * Attach to a container - */ - async containerAttach( - requestParameters: ContainerAttachRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerAttachRaw(requestParameters, initOverrides); - } - - /** - * Attach to a container via a websocket - */ - async containerAttachWebsocketRaw( - requestParameters: ContainerAttachWebsocketRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerAttachWebsocket().', - ); - } + const headerParameters: runtime.HTTPHeaders = {}; - const queryParameters: any = {}; + headerParameters['Content-Type'] = 'application/json'; - if (requestParameters["detachKeys"] != null) { - queryParameters["detachKeys"] = requestParameters["detachKeys"]; - } + const response = await this.request({ + path: `/containers/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ContainerCreateRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ContainerCreateResponseFromJSON(jsonValue)); + } + + /** + * Create a container + */ + async containerCreate(requestParameters: ContainerCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Remove a container + */ + async containerDeleteRaw(requestParameters: ContainerDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerDelete().' + ); + } - if (requestParameters["logs"] != null) { - queryParameters["logs"] = requestParameters["logs"]; - } + const queryParameters: any = {}; + + if (requestParameters['v'] != null) { + queryParameters['v'] = requestParameters['v']; + } + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + if (requestParameters['link'] != null) { + queryParameters['link'] = requestParameters['link']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Remove a container + */ + async containerDelete(requestParameters: ContainerDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerDeleteRaw(requestParameters, initOverrides); + } + + /** + * Export the contents of a container as a tarball. + * Export a container + */ + async containerExportRaw(requestParameters: ContainerExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerExport().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (requestParameters["stream"] != null) { - queryParameters["stream"] = requestParameters["stream"]; - } + return new runtime.VoidApiResponse(response); + } + + /** + * Export the contents of a container as a tarball. + * Export a container + */ + async containerExport(requestParameters: ContainerExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerExportRaw(requestParameters, initOverrides); + } + + /** + * Return low-level information about a container. + * Inspect a container + */ + async containerInspectRaw(requestParameters: ContainerInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerInspect().' + ); + } - if (requestParameters["stdin"] != null) { - queryParameters["stdin"] = requestParameters["stdin"]; + const queryParameters: any = {}; + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/json`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ContainerInspectResponseFromJSON(jsonValue)); + } + + /** + * Return low-level information about a container. + * Inspect a container + */ + async containerInspect(requestParameters: ContainerInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Send a POSIX signal to a container, defaulting to killing to the container. + * Kill a container + */ + async containerKillRaw(requestParameters: ContainerKillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerKill().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['signal'] != null) { + queryParameters['signal'] = requestParameters['signal']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/kill`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Send a POSIX signal to a container, defaulting to killing to the container. + * Kill a container + */ + async containerKill(requestParameters: ContainerKillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerKillRaw(requestParameters, initOverrides); } - if (requestParameters["stdout"] != null) { - queryParameters["stdout"] = requestParameters["stdout"]; + /** + * 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 . + * List containers + */ + async containerListRaw(requestParameters: ContainerListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['all'] != null) { + queryParameters['all'] = requestParameters['all']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['size'] != null) { + queryParameters['size'] = requestParameters['size']; + } + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/json`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ContainerSummaryFromJSON)); } - if (requestParameters["stderr"] != null) { - queryParameters["stderr"] = requestParameters["stderr"]; - } + /** + * 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 . + * List containers + */ + async containerList(requestParameters: ContainerListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.containerListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + * Get container logs + */ + async containerLogsRaw(requestParameters: ContainerLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerLogs().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['follow'] != null) { + queryParameters['follow'] = requestParameters['follow']; + } + + if (requestParameters['stdout'] != null) { + queryParameters['stdout'] = requestParameters['stdout']; + } + + if (requestParameters['stderr'] != null) { + queryParameters['stderr'] = requestParameters['stderr']; + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/attach/ws`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Attach to a container via a websocket - */ - async containerAttachWebsocket( - requestParameters: ContainerAttachWebsocketRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerAttachWebsocketRaw(requestParameters, initOverrides); - } - - /** - * 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\") - * Get changes on a container’s filesystem - */ - async containerChangesRaw( - requestParameters: ContainerChangesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerChanges().', - ); - } + if (requestParameters['since'] != null) { + queryParameters['since'] = requestParameters['since']; + } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/changes`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(FilesystemChangeFromJSON), - ); - } - - /** - * 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\") - * Get changes on a container’s filesystem - */ - async containerChanges( - requestParameters: ContainerChangesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.containerChangesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create a container - */ - async containerCreateRaw( - requestParameters: ContainerCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling containerCreate().', - ); - } + if (requestParameters['until'] != null) { + queryParameters['until'] = requestParameters['until']; + } + + if (requestParameters['timestamps'] != null) { + queryParameters['timestamps'] = requestParameters['timestamps']; + } + + if (requestParameters['tail'] != null) { + queryParameters['tail'] = requestParameters['tail']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + * Get container logs + */ + async containerLogs(requestParameters: ContainerLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerLogsRaw(requestParameters, initOverrides); + return await response.value(); + } - const queryParameters: any = {}; + /** + * 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. + * Pause a container + */ + async containerPauseRaw(requestParameters: ContainerPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerPause().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/pause`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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. + * Pause a container + */ + async containerPause(requestParameters: ContainerPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerPauseRaw(requestParameters, initOverrides); + } + + /** + * Delete stopped containers + */ + async containerPruneRaw(requestParameters: ContainerPruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/prune`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ContainerPruneResponseFromJSON(jsonValue)); + } + + /** + * Delete stopped containers + */ + async containerPrune(requestParameters: ContainerPruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerPruneRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Rename a container + */ + async containerRenameRaw(requestParameters: ContainerRenameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerRename().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling containerRename().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } - if (requestParameters["name"] != null) { - queryParameters["name"] = requestParameters["name"]; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["platform"] != null) { - queryParameters["platform"] = requestParameters["platform"]; - } + const response = await this.request({ + path: `/containers/{id}/rename`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Rename a container + */ + async containerRename(requestParameters: ContainerRenameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerRenameRaw(requestParameters, initOverrides); + } + + /** + * Resize the TTY for a container. + * Resize a container TTY + */ + async containerResizeRaw(requestParameters: ContainerResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerResize().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/containers/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ContainerCreateRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ContainerCreateResponseFromJSON(jsonValue), - ); - } - - /** - * Create a container - */ - async containerCreate( - requestParameters: ContainerCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Remove a container - */ - async containerDeleteRaw( - requestParameters: ContainerDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerDelete().', - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + if (requestParameters['h'] != null) { + queryParameters['h'] = requestParameters['h']; + } - if (requestParameters["v"] != null) { - queryParameters["v"] = requestParameters["v"]; + if (requestParameters['w'] != null) { + queryParameters['w'] = requestParameters['w']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/resize`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Resize the TTY for a container. + * Resize a container TTY + */ + async containerResize(requestParameters: ContainerResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerResizeRaw(requestParameters, initOverrides); + } + + /** + * Restart a container + */ + async containerRestartRaw(requestParameters: ContainerRestartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerRestart().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['signal'] != null) { + queryParameters['signal'] = requestParameters['signal']; + } + + if (requestParameters['t'] != null) { + queryParameters['t'] = requestParameters['t']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/restart`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; - } + /** + * Restart a container + */ + async containerRestart(requestParameters: ContainerRestartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerRestartRaw(requestParameters, initOverrides); + } + + /** + * Start a container + */ + async containerStartRaw(requestParameters: ContainerStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerStart().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['detachKeys'] != null) { + queryParameters['detachKeys'] = requestParameters['detachKeys']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/start`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Start a container + */ + async containerStart(requestParameters: ContainerStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerStartRaw(requestParameters, initOverrides); + } + + /** + * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + * Get container stats based on resource usage + */ + async containerStatsRaw(requestParameters: ContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerStats().' + ); + } - if (requestParameters["link"] != null) { - queryParameters["link"] = requestParameters["link"]; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Remove a container - */ - async containerDelete( - requestParameters: ContainerDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerDeleteRaw(requestParameters, initOverrides); - } - - /** - * Export the contents of a container as a tarball. - * Export a container - */ - async containerExportRaw( - requestParameters: ContainerExportRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerExport().', - ); - } + if (requestParameters['stream'] != null) { + queryParameters['stream'] = requestParameters['stream']; + } + + if (requestParameters['one_shot'] != null) { + queryParameters['one-shot'] = requestParameters['one_shot']; + } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/export`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Export the contents of a container as a tarball. - * Export a container - */ - async containerExport( - requestParameters: ContainerExportRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerExportRaw(requestParameters, initOverrides); - } - - /** - * Return low-level information about a container. - * Inspect a container - */ - async containerInspectRaw( - requestParameters: ContainerInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerInspect().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["size"] != null) { - queryParameters["size"] = requestParameters["size"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/json`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ContainerInspectResponseFromJSON(jsonValue), - ); - } - - /** - * Return low-level information about a container. - * Inspect a container - */ - async containerInspect( - requestParameters: ContainerInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a POSIX signal to a container, defaulting to killing to the container. - * Kill a container - */ - async containerKillRaw( - requestParameters: ContainerKillRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerKill().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["signal"] != null) { - queryParameters["signal"] = requestParameters["signal"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/kill`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Send a POSIX signal to a container, defaulting to killing to the container. - * Kill a container - */ - async containerKill( - requestParameters: ContainerKillRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerKillRaw(requestParameters, initOverrides); - } - - /** - * 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 . - * List containers - */ - async containerListRaw( - requestParameters: ContainerListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["all"] != null) { - queryParameters["all"] = requestParameters["all"]; - } - - if (requestParameters["limit"] != null) { - queryParameters["limit"] = requestParameters["limit"]; - } - - if (requestParameters["size"] != null) { - queryParameters["size"] = requestParameters["size"]; - } - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/json`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(ContainerSummaryFromJSON), - ); - } - - /** - * 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 . - * List containers - */ - async containerList( - requestParameters: ContainerListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.containerListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. - * Get container logs - */ - async containerLogsRaw( - requestParameters: ContainerLogsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerLogs().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["follow"] != null) { - queryParameters["follow"] = requestParameters["follow"]; - } - - if (requestParameters["stdout"] != null) { - queryParameters["stdout"] = requestParameters["stdout"]; - } - - if (requestParameters["stderr"] != null) { - queryParameters["stderr"] = requestParameters["stderr"]; - } - - if (requestParameters["since"] != null) { - queryParameters["since"] = requestParameters["since"]; - } - - if (requestParameters["until"] != null) { - queryParameters["until"] = requestParameters["until"]; - } - - if (requestParameters["timestamps"] != null) { - queryParameters["timestamps"] = requestParameters["timestamps"]; - } - - if (requestParameters["tail"] != null) { - queryParameters["tail"] = requestParameters["tail"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/logs`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.BlobApiResponse(response); - } - - /** - * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. - * Get container logs - */ - async containerLogs( - requestParameters: ContainerLogsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerLogsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Pause a container - */ - async containerPauseRaw( - requestParameters: ContainerPauseRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerPause().', - ); - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + * Get container stats based on resource usage + */ + async containerStats(requestParameters: ContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerStatsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Stop a container + */ + async containerStopRaw(requestParameters: ContainerStopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerStop().' + ); + } + + const queryParameters: any = {}; - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/pause`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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. - * Pause a container - */ - async containerPause( - requestParameters: ContainerPauseRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerPauseRaw(requestParameters, initOverrides); - } - - /** - * Delete stopped containers - */ - async containerPruneRaw( - requestParameters: ContainerPruneRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + if (requestParameters['signal'] != null) { + queryParameters['signal'] = requestParameters['signal']; + } + + if (requestParameters['t'] != null) { + queryParameters['t'] = requestParameters['t']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/stop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Stop a container + */ + async containerStop(requestParameters: ContainerStopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerStopRaw(requestParameters, initOverrides); + } + + /** + * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + * List processes running inside a container + */ + async containerTopRaw(requestParameters: ContainerTopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerTop().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['ps_args'] != null) { + queryParameters['ps_args'] = requestParameters['ps_args']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/top`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ContainerTopResponseFromJSON(jsonValue)); + } + + /** + * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + * List processes running inside a container + */ + async containerTop(requestParameters: ContainerTopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerTopRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Resume a container which has been paused. + * Unpause a container + */ + async containerUnpauseRaw(requestParameters: ContainerUnpauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerUnpause().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/unpause`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Resume a container which has been paused. + * Unpause a container + */ + async containerUnpause(requestParameters: ContainerUnpauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.containerUnpauseRaw(requestParameters, initOverrides); + } + + /** + * Change various configuration options of a container without having to recreate it. + * Update a container + */ + async containerUpdateRaw(requestParameters: ContainerUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerUpdate().' + ); + } + + if (requestParameters['update'] == null) { + throw new runtime.RequiredError( + 'update', + 'Required parameter "update" was null or undefined when calling containerUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/containers/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ContainerUpdateRequestToJSON(requestParameters['update']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ContainerUpdateResponseFromJSON(jsonValue)); + } + + /** + * Change various configuration options of a container without having to recreate it. + * Update a container + */ + async containerUpdate(requestParameters: ContainerUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Block until a container stops, then returns the exit code. + * Wait for a container + */ + async containerWaitRaw(requestParameters: ContainerWaitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerWait().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['condition'] != null) { + queryParameters['condition'] = requestParameters['condition']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/containers/{id}/wait`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ContainerWaitResponseFromJSON(jsonValue)); + } + + /** + * Block until a container stops, then returns the exit code. + * Wait for a container + */ + async containerWait(requestParameters: ContainerWaitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerWaitRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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\". + * Extract an archive of files or folders to a directory in a container + */ + async putContainerArchiveRaw(requestParameters: PutContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling putContainerArchive().' + ); + } + + if (requestParameters['path'] == null) { + throw new runtime.RequiredError( + 'path', + 'Required parameter "path" was null or undefined when calling putContainerArchive().' + ); + } + + if (requestParameters['inputStream'] == null) { + throw new runtime.RequiredError( + 'inputStream', + 'Required parameter "inputStream" was null or undefined when calling putContainerArchive().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['path'] != null) { + queryParameters['path'] = requestParameters['path']; + } + + if (requestParameters['noOverwriteDirNonDir'] != null) { + queryParameters['noOverwriteDirNonDir'] = requestParameters['noOverwriteDirNonDir']; + } + + if (requestParameters['copyUIDGID'] != null) { + queryParameters['copyUIDGID'] = requestParameters['copyUIDGID']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/x-tar'; + + const response = await this.request({ + path: `/containers/{id}/archive`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: requestParameters['inputStream'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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\". + * Extract an archive of files or folders to a directory in a container + */ + async putContainerArchive(requestParameters: PutContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.putContainerArchiveRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/prune`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ContainerPruneResponseFromJSON(jsonValue), - ); - } - - /** - * Delete stopped containers - */ - async containerPrune( - requestParameters: ContainerPruneRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerPruneRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Rename a container - */ - async containerRenameRaw( - requestParameters: ContainerRenameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerRename().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling containerRename().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["name"] != null) { - queryParameters["name"] = requestParameters["name"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/rename`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Rename a container - */ - async containerRename( - requestParameters: ContainerRenameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerRenameRaw(requestParameters, initOverrides); - } - - /** - * Resize the TTY for a container. - * Resize a container TTY - */ - async containerResizeRaw( - requestParameters: ContainerResizeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerResize().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["h"] != null) { - queryParameters["h"] = requestParameters["h"]; - } - - if (requestParameters["w"] != null) { - queryParameters["w"] = requestParameters["w"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/resize`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Resize the TTY for a container. - * Resize a container TTY - */ - async containerResize( - requestParameters: ContainerResizeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerResizeRaw(requestParameters, initOverrides); - } - - /** - * Restart a container - */ - async containerRestartRaw( - requestParameters: ContainerRestartRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerRestart().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["signal"] != null) { - queryParameters["signal"] = requestParameters["signal"]; - } - - if (requestParameters["t"] != null) { - queryParameters["t"] = requestParameters["t"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/restart`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Restart a container - */ - async containerRestart( - requestParameters: ContainerRestartRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerRestartRaw(requestParameters, initOverrides); - } - - /** - * Start a container - */ - async containerStartRaw( - requestParameters: ContainerStartRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerStart().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["detachKeys"] != null) { - queryParameters["detachKeys"] = requestParameters["detachKeys"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/start`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Start a container - */ - async containerStart( - requestParameters: ContainerStartRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerStartRaw(requestParameters, initOverrides); - } - - /** - * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` - * Get container stats based on resource usage - */ - async containerStatsRaw( - requestParameters: ContainerStatsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerStats().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["stream"] != null) { - queryParameters["stream"] = requestParameters["stream"]; - } - - if (requestParameters["one_shot"] != null) { - queryParameters["one-shot"] = requestParameters["one_shot"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/stats`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` - * Get container stats based on resource usage - */ - async containerStats( - requestParameters: ContainerStatsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerStatsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Stop a container - */ - async containerStopRaw( - requestParameters: ContainerStopRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerStop().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["signal"] != null) { - queryParameters["signal"] = requestParameters["signal"]; - } - - if (requestParameters["t"] != null) { - queryParameters["t"] = requestParameters["t"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/stop`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Stop a container - */ - async containerStop( - requestParameters: ContainerStopRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerStopRaw(requestParameters, initOverrides); - } - - /** - * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. - * List processes running inside a container - */ - async containerTopRaw( - requestParameters: ContainerTopRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerTop().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["ps_args"] != null) { - queryParameters["ps_args"] = requestParameters["ps_args"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/top`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ContainerTopResponseFromJSON(jsonValue), - ); - } - - /** - * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. - * List processes running inside a container - */ - async containerTop( - requestParameters: ContainerTopRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerTopRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Resume a container which has been paused. - * Unpause a container - */ - async containerUnpauseRaw( - requestParameters: ContainerUnpauseRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerUnpause().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/unpause`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Resume a container which has been paused. - * Unpause a container - */ - async containerUnpause( - requestParameters: ContainerUnpauseRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.containerUnpauseRaw(requestParameters, initOverrides); - } - - /** - * Change various configuration options of a container without having to recreate it. - * Update a container - */ - async containerUpdateRaw( - requestParameters: ContainerUpdateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerUpdate().', - ); - } - - if (requestParameters["update"] == null) { - throw new runtime.RequiredError( - "update", - 'Required parameter "update" was null or undefined when calling containerUpdate().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/containers/{id}/update`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ContainerUpdateRequestToJSON(requestParameters["update"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ContainerUpdateResponseFromJSON(jsonValue), - ); - } - - /** - * Change various configuration options of a container without having to recreate it. - * Update a container - */ - async containerUpdate( - requestParameters: ContainerUpdateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerUpdateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Block until a container stops, then returns the exit code. - * Wait for a container - */ - async containerWaitRaw( - requestParameters: ContainerWaitRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerWait().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["condition"] != null) { - queryParameters["condition"] = requestParameters["condition"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/containers/{id}/wait`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ContainerWaitResponseFromJSON(jsonValue), - ); - } - - /** - * Block until a container stops, then returns the exit code. - * Wait for a container - */ - async containerWait( - requestParameters: ContainerWaitRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerWaitRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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\". - * Extract an archive of files or folders to a directory in a container - */ - async putContainerArchiveRaw( - requestParameters: PutContainerArchiveRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling putContainerArchive().', - ); - } - - if (requestParameters["path"] == null) { - throw new runtime.RequiredError( - "path", - 'Required parameter "path" was null or undefined when calling putContainerArchive().', - ); - } - - if (requestParameters["inputStream"] == null) { - throw new runtime.RequiredError( - "inputStream", - 'Required parameter "inputStream" was null or undefined when calling putContainerArchive().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["path"] != null) { - queryParameters["path"] = requestParameters["path"]; - } - - if (requestParameters["noOverwriteDirNonDir"] != null) { - queryParameters["noOverwriteDirNonDir"] = requestParameters["noOverwriteDirNonDir"]; - } - - if (requestParameters["copyUIDGID"] != null) { - queryParameters["copyUIDGID"] = requestParameters["copyUIDGID"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/x-tar"; - - const response = await this.request( - { - path: `/containers/{id}/archive`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: requestParameters["inputStream"] as any, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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\". - * Extract an archive of files or folders to a directory in a container - */ - async putContainerArchive( - requestParameters: PutContainerArchiveRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.putContainerArchiveRaw(requestParameters, initOverrides); - } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ContainerWaitConditionEnum { - NotRunning = "not-running", - NextExit = "next-exit", - Removed = "removed", + NotRunning = 'not-running', + NextExit = 'next-exit', + Removed = 'removed' } diff --git a/src/clients/docker/apis/DistributionApi.ts b/src/clients/docker/apis/DistributionApi.ts index 60ef67b7ef..cdd2849dc8 100644 --- a/src/clients/docker/apis/DistributionApi.ts +++ b/src/clients/docker/apis/DistributionApi.ts @@ -2,79 +2,71 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { DistributionInspect, ErrorResponse } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + DistributionInspect, + ErrorResponse, +} from '../models/index'; import { - DistributionInspectFromJSON, - DistributionInspectToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from "../models/index"; + DistributionInspectFromJSON, + DistributionInspectToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, +} from '../models/index'; export interface DistributionInspectRequest { - name: string; + name: string; } /** - * + * */ export class DistributionApi extends runtime.BaseAPI { - /** - * Return image digest and platform information by contacting the registry. - * Get image information from the registry - */ - async distributionInspectRaw( - requestParameters: DistributionInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling distributionInspect().', - ); - } - const queryParameters: any = {}; + /** + * Return image digest and platform information by contacting the registry. + * Get image information from the registry + */ + async distributionInspectRaw(requestParameters: DistributionInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling distributionInspect().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - const response = await this.request( - { - path: `/distribution/{name}/json`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => - DistributionInspectFromJSON(jsonValue), - ); - } + const response = await this.request({ + path: `/distribution/{name}/json`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DistributionInspectFromJSON(jsonValue)); + } + + /** + * Return image digest and platform information by contacting the registry. + * Get image information from the registry + */ + async distributionInspect(requestParameters: DistributionInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.distributionInspectRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * Return image digest and platform information by contacting the registry. - * Get image information from the registry - */ - async distributionInspect( - requestParameters: DistributionInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.distributionInspectRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/docker/apis/ExecApi.ts b/src/clients/docker/apis/ExecApi.ts index 8bb37b8bab..996a21fbc9 100644 --- a/src/clients/docker/apis/ExecApi.ts +++ b/src/clients/docker/apis/ExecApi.ts @@ -2,267 +2,220 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorResponse, ExecConfig, ExecInspectResponse, ExecStartConfig, IdResponse, -} from "../models/index"; +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - ExecConfigFromJSON, - ExecConfigToJSON, - ExecInspectResponseFromJSON, - ExecInspectResponseToJSON, - ExecStartConfigFromJSON, - ExecStartConfigToJSON, - IdResponseFromJSON, - IdResponseToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + ExecConfigFromJSON, + ExecConfigToJSON, + ExecInspectResponseFromJSON, + ExecInspectResponseToJSON, + ExecStartConfigFromJSON, + ExecStartConfigToJSON, + IdResponseFromJSON, + IdResponseToJSON, +} from '../models/index'; export interface ContainerExecRequest { - id: string; - execConfig: ExecConfig; + id: string; + execConfig: ExecConfig; } export interface ExecInspectRequest { - id: string; + id: string; } export interface ExecResizeRequest { - id: string; - h?: number; - w?: number; + id: string; + h?: number; + w?: number; } export interface ExecStartRequest { - id: string; - execStartConfig?: ExecStartConfig; + id: string; + execStartConfig?: ExecStartConfig; } /** - * + * */ export class ExecApi extends runtime.BaseAPI { - /** - * Run a command inside a running container. - * Create an exec instance - */ - async containerExecRaw( - requestParameters: ContainerExecRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling containerExec().', - ); + + /** + * Run a command inside a running container. + * Create an exec instance + */ + async containerExecRaw(requestParameters: ContainerExecRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling containerExec().' + ); + } + + if (requestParameters['execConfig'] == null) { + throw new runtime.RequiredError( + 'execConfig', + 'Required parameter "execConfig" was null or undefined when calling containerExec().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/containers/{id}/exec`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ExecConfigToJSON(requestParameters['execConfig']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); } - if (requestParameters["execConfig"] == null) { - throw new runtime.RequiredError( - "execConfig", - 'Required parameter "execConfig" was null or undefined when calling containerExec().', - ); + /** + * Run a command inside a running container. + * Create an exec instance + */ + async containerExec(requestParameters: ContainerExecRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.containerExecRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/containers/{id}/exec`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ExecConfigToJSON(requestParameters["execConfig"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); - } - - /** - * Run a command inside a running container. - * Create an exec instance - */ - async containerExec( - requestParameters: ContainerExecRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.containerExecRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Return low-level information about an exec instance. - * Inspect an exec instance - */ - async execInspectRaw( - requestParameters: ExecInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling execInspect().', - ); + /** + * Return low-level information about an exec instance. + * Inspect an exec instance + */ + async execInspectRaw(requestParameters: ExecInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling execInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/exec/{id}/json`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExecInspectResponseFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/exec/{id}/json`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExecInspectResponseFromJSON(jsonValue), - ); - } - - /** - * Return low-level information about an exec instance. - * Inspect an exec instance - */ - async execInspect( - requestParameters: ExecInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.execInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Resize an exec instance - */ - async execResizeRaw( - requestParameters: ExecResizeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling execResize().', - ); + /** + * Return low-level information about an exec instance. + * Inspect an exec instance + */ + async execInspect(requestParameters: ExecInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.execInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * 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. + * Resize an exec instance + */ + async execResizeRaw(requestParameters: ExecResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling execResize().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['h'] != null) { + queryParameters['h'] = requestParameters['h']; + } + + if (requestParameters['w'] != null) { + queryParameters['w'] = requestParameters['w']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/exec/{id}/resize`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["h"] != null) { - queryParameters["h"] = requestParameters["h"]; + /** + * 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. + * Resize an exec instance + */ + async execResize(requestParameters: ExecResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.execResizeRaw(requestParameters, initOverrides); } - if (requestParameters["w"] != null) { - queryParameters["w"] = requestParameters["w"]; + /** + * 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. + * Start an exec instance + */ + async execStartRaw(requestParameters: ExecStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling execStart().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/exec/{id}/start`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ExecStartConfigToJSON(requestParameters['execStartConfig']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/exec/{id}/resize`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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. - * Resize an exec instance - */ - async execResize( - requestParameters: ExecResizeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.execResizeRaw(requestParameters, initOverrides); - } - - /** - * 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. - * Start an exec instance - */ - async execStartRaw( - requestParameters: ExecStartRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling execStart().', - ); + /** + * 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. + * Start an exec instance + */ + async execStart(requestParameters: ExecStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.execStartRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/exec/{id}/start`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ExecStartConfigToJSON(requestParameters["execStartConfig"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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. - * Start an exec instance - */ - async execStart( - requestParameters: ExecStartRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.execStartRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/ImageApi.ts b/src/clients/docker/apis/ImageApi.ts index 5f6f44d4b6..bfd2bc45d9 100644 --- a/src/clients/docker/apis/ImageApi.ts +++ b/src/clients/docker/apis/ImageApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { BuildPruneResponse, ContainerConfig, @@ -24,1053 +25,886 @@ import type { ImagePruneResponse, ImageSearchResponseItem, ImageSummary, -} from "../models/index"; +} from '../models/index'; import { - BuildPruneResponseFromJSON, - BuildPruneResponseToJSON, - ContainerConfigFromJSON, - ContainerConfigToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - HistoryResponseItemFromJSON, - HistoryResponseItemToJSON, - IdResponseFromJSON, - IdResponseToJSON, - ImageDeleteResponseItemFromJSON, - ImageDeleteResponseItemToJSON, - ImageInspectFromJSON, - ImageInspectToJSON, - ImagePruneResponseFromJSON, - ImagePruneResponseToJSON, - ImageSearchResponseItemFromJSON, - ImageSearchResponseItemToJSON, - ImageSummaryFromJSON, - ImageSummaryToJSON, -} from "../models/index"; + BuildPruneResponseFromJSON, + BuildPruneResponseToJSON, + ContainerConfigFromJSON, + ContainerConfigToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + HistoryResponseItemFromJSON, + HistoryResponseItemToJSON, + IdResponseFromJSON, + IdResponseToJSON, + ImageDeleteResponseItemFromJSON, + ImageDeleteResponseItemToJSON, + ImageInspectFromJSON, + ImageInspectToJSON, + ImagePruneResponseFromJSON, + ImagePruneResponseToJSON, + ImageSearchResponseItemFromJSON, + ImageSearchResponseItemToJSON, + ImageSummaryFromJSON, + ImageSummaryToJSON, +} from '../models/index'; export interface BuildPruneRequest { - keep_storage?: number; - all?: boolean; - filters?: string; + keep_storage?: number; + all?: boolean; + filters?: string; } export interface ImageBuildRequest { - dockerfile?: string; - t?: string; - extrahosts?: string; - remote?: string; - q?: boolean; - nocache?: boolean; - cachefrom?: string; - pull?: string; - rm?: boolean; - forcerm?: boolean; - memory?: number; - memswap?: number; - cpushares?: number; - cpusetcpus?: string; - cpuperiod?: number; - cpuquota?: number; - buildargs?: string; - shmsize?: number; - squash?: boolean; - labels?: string; - networkmode?: string; - Content_type?: ImageBuildContentTypeEnum; - X_Registry_Config?: string; - platform?: string; - target?: string; - outputs?: string; - version?: ImageBuildVersionEnum; - inputStream?: Blob; + dockerfile?: string; + t?: string; + extrahosts?: string; + remote?: string; + q?: boolean; + nocache?: boolean; + cachefrom?: string; + pull?: string; + rm?: boolean; + forcerm?: boolean; + memory?: number; + memswap?: number; + cpushares?: number; + cpusetcpus?: string; + cpuperiod?: number; + cpuquota?: number; + buildargs?: string; + shmsize?: number; + squash?: boolean; + labels?: string; + networkmode?: string; + Content_type?: ImageBuildContentTypeEnum; + X_Registry_Config?: string; + platform?: string; + target?: string; + outputs?: string; + version?: ImageBuildVersionEnum; + inputStream?: Blob; } export interface ImageCommitRequest { - container?: string; - repo?: string; - tag?: string; - comment?: string; - author?: string; - pause?: boolean; - changes?: string; - containerConfig?: ContainerConfig; + container?: string; + repo?: string; + tag?: string; + comment?: string; + author?: string; + pause?: boolean; + changes?: string; + containerConfig?: ContainerConfig; } export interface ImageCreateRequest { - fromImage?: string; - fromSrc?: string; - repo?: string; - tag?: string; - message?: string; - X_Registry_Auth?: string; - changes?: Array; - platform?: string; - inputImage?: string; + fromImage?: string; + fromSrc?: string; + repo?: string; + tag?: string; + message?: string; + X_Registry_Auth?: string; + changes?: Array; + platform?: string; + inputImage?: string; } export interface ImageDeleteRequest { - name: string; - force?: boolean; - noprune?: boolean; + name: string; + force?: boolean; + noprune?: boolean; } export interface ImageGetRequest { - name: string; + name: string; } export interface ImageGetAllRequest { - names?: Array; + names?: Array; } export interface ImageHistoryRequest { - name: string; + name: string; } export interface ImageInspectRequest { - name: string; + name: string; } export interface ImageListRequest { - all?: boolean; - filters?: string; - shared_size?: boolean; - digests?: boolean; + all?: boolean; + filters?: string; + shared_size?: boolean; + digests?: boolean; } export interface ImageLoadRequest { - quiet?: boolean; - imagesTarball?: Blob; + quiet?: boolean; + imagesTarball?: Blob; } export interface ImagePruneRequest { - filters?: string; + filters?: string; } export interface ImagePushRequest { - name: string; - X_Registry_Auth: string; - tag?: string; + name: string; + X_Registry_Auth: string; + tag?: string; } export interface ImageSearchRequest { - term: string; - limit?: number; - filters?: string; + term: string; + limit?: number; + filters?: string; } export interface ImageTagRequest { - name: string; - repo?: string; - tag?: string; + name: string; + repo?: string; + tag?: string; } /** - * + * */ export class ImageApi extends runtime.BaseAPI { - /** - * Delete builder cache - */ - async buildPruneRaw( - requestParameters: BuildPruneRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["keep_storage"] != null) { - queryParameters["keep-storage"] = requestParameters["keep_storage"]; - } - if (requestParameters["all"] != null) { - queryParameters["all"] = requestParameters["all"]; - } + /** + * Delete builder cache + */ + async buildPruneRaw(requestParameters: BuildPruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; - } + if (requestParameters['keep_storage'] != null) { + queryParameters['keep-storage'] = requestParameters['keep_storage']; + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/build/prune`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - BuildPruneResponseFromJSON(jsonValue), - ); - } - - /** - * Delete builder cache - */ - async buildPrune( - requestParameters: BuildPruneRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.buildPruneRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Build an image - */ - async imageBuildRaw( - requestParameters: ImageBuildRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["dockerfile"] != null) { - queryParameters["dockerfile"] = requestParameters["dockerfile"]; - } + if (requestParameters['all'] != null) { + queryParameters['all'] = requestParameters['all']; + } - if (requestParameters["t"] != null) { - queryParameters["t"] = requestParameters["t"]; - } + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } - if (requestParameters["extrahosts"] != null) { - queryParameters["extrahosts"] = requestParameters["extrahosts"]; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["remote"] != null) { - queryParameters["remote"] = requestParameters["remote"]; - } + const response = await this.request({ + path: `/build/prune`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (requestParameters["q"] != null) { - queryParameters["q"] = requestParameters["q"]; + return new runtime.JSONApiResponse(response, (jsonValue) => BuildPruneResponseFromJSON(jsonValue)); } - if (requestParameters["nocache"] != null) { - queryParameters["nocache"] = requestParameters["nocache"]; + /** + * Delete builder cache + */ + async buildPrune(requestParameters: BuildPruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.buildPruneRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["cachefrom"] != null) { - queryParameters["cachefrom"] = requestParameters["cachefrom"]; - } + /** + * 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. + * Build an image + */ + async imageBuildRaw(requestParameters: ImageBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - if (requestParameters["pull"] != null) { - queryParameters["pull"] = requestParameters["pull"]; - } + if (requestParameters['dockerfile'] != null) { + queryParameters['dockerfile'] = requestParameters['dockerfile']; + } - if (requestParameters["rm"] != null) { - queryParameters["rm"] = requestParameters["rm"]; - } + if (requestParameters['t'] != null) { + queryParameters['t'] = requestParameters['t']; + } - if (requestParameters["forcerm"] != null) { - queryParameters["forcerm"] = requestParameters["forcerm"]; - } + if (requestParameters['extrahosts'] != null) { + queryParameters['extrahosts'] = requestParameters['extrahosts']; + } - if (requestParameters["memory"] != null) { - queryParameters["memory"] = requestParameters["memory"]; - } + if (requestParameters['remote'] != null) { + queryParameters['remote'] = requestParameters['remote']; + } - if (requestParameters["memswap"] != null) { - queryParameters["memswap"] = requestParameters["memswap"]; - } + if (requestParameters['q'] != null) { + queryParameters['q'] = requestParameters['q']; + } - if (requestParameters["cpushares"] != null) { - queryParameters["cpushares"] = requestParameters["cpushares"]; - } + if (requestParameters['nocache'] != null) { + queryParameters['nocache'] = requestParameters['nocache']; + } - if (requestParameters["cpusetcpus"] != null) { - queryParameters["cpusetcpus"] = requestParameters["cpusetcpus"]; - } + if (requestParameters['cachefrom'] != null) { + queryParameters['cachefrom'] = requestParameters['cachefrom']; + } - if (requestParameters["cpuperiod"] != null) { - queryParameters["cpuperiod"] = requestParameters["cpuperiod"]; - } + if (requestParameters['pull'] != null) { + queryParameters['pull'] = requestParameters['pull']; + } - if (requestParameters["cpuquota"] != null) { - queryParameters["cpuquota"] = requestParameters["cpuquota"]; - } + if (requestParameters['rm'] != null) { + queryParameters['rm'] = requestParameters['rm']; + } - if (requestParameters["buildargs"] != null) { - queryParameters["buildargs"] = requestParameters["buildargs"]; - } + if (requestParameters['forcerm'] != null) { + queryParameters['forcerm'] = requestParameters['forcerm']; + } - if (requestParameters["shmsize"] != null) { - queryParameters["shmsize"] = requestParameters["shmsize"]; - } + if (requestParameters['memory'] != null) { + queryParameters['memory'] = requestParameters['memory']; + } - if (requestParameters["squash"] != null) { - queryParameters["squash"] = requestParameters["squash"]; - } + if (requestParameters['memswap'] != null) { + queryParameters['memswap'] = requestParameters['memswap']; + } - if (requestParameters["labels"] != null) { - queryParameters["labels"] = requestParameters["labels"]; - } + if (requestParameters['cpushares'] != null) { + queryParameters['cpushares'] = requestParameters['cpushares']; + } - if (requestParameters["networkmode"] != null) { - queryParameters["networkmode"] = requestParameters["networkmode"]; - } + if (requestParameters['cpusetcpus'] != null) { + queryParameters['cpusetcpus'] = requestParameters['cpusetcpus']; + } - if (requestParameters["platform"] != null) { - queryParameters["platform"] = requestParameters["platform"]; - } + if (requestParameters['cpuperiod'] != null) { + queryParameters['cpuperiod'] = requestParameters['cpuperiod']; + } - if (requestParameters["target"] != null) { - queryParameters["target"] = requestParameters["target"]; - } + if (requestParameters['cpuquota'] != null) { + queryParameters['cpuquota'] = requestParameters['cpuquota']; + } - if (requestParameters["outputs"] != null) { - queryParameters["outputs"] = requestParameters["outputs"]; - } + if (requestParameters['buildargs'] != null) { + queryParameters['buildargs'] = requestParameters['buildargs']; + } - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; - } + if (requestParameters['shmsize'] != null) { + queryParameters['shmsize'] = requestParameters['shmsize']; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['squash'] != null) { + queryParameters['squash'] = requestParameters['squash']; + } - headerParameters["Content-Type"] = "application/octet-stream"; + if (requestParameters['labels'] != null) { + queryParameters['labels'] = requestParameters['labels']; + } - if (requestParameters["Content_type"] != null) { - headerParameters["Content-type"] = String(requestParameters["Content_type"]); - } + if (requestParameters['networkmode'] != null) { + queryParameters['networkmode'] = requestParameters['networkmode']; + } - if (requestParameters["X_Registry_Config"] != null) { - headerParameters["X-Registry-Config"] = String(requestParameters["X_Registry_Config"]); - } + if (requestParameters['platform'] != null) { + queryParameters['platform'] = requestParameters['platform']; + } - const response = await this.request( - { - path: `/build`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["inputStream"] as any, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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. - * Build an image - */ - async imageBuild( - requestParameters: ImageBuildRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.imageBuildRaw(requestParameters, initOverrides); - } - - /** - * Create a new image from a container - */ - async imageCommitRaw( - requestParameters: ImageCommitRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["container"] != null) { - queryParameters["container"] = requestParameters["container"]; - } + if (requestParameters['target'] != null) { + queryParameters['target'] = requestParameters['target']; + } - if (requestParameters["repo"] != null) { - queryParameters["repo"] = requestParameters["repo"]; - } + if (requestParameters['outputs'] != null) { + queryParameters['outputs'] = requestParameters['outputs']; + } - if (requestParameters["tag"] != null) { - queryParameters["tag"] = requestParameters["tag"]; - } + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } - if (requestParameters["comment"] != null) { - queryParameters["comment"] = requestParameters["comment"]; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["author"] != null) { - queryParameters["author"] = requestParameters["author"]; - } + headerParameters['Content-Type'] = 'application/octet-stream'; - if (requestParameters["pause"] != null) { - queryParameters["pause"] = requestParameters["pause"]; - } + if (requestParameters['Content_type'] != null) { + headerParameters['Content-type'] = String(requestParameters['Content_type']); + } - if (requestParameters["changes"] != null) { - queryParameters["changes"] = requestParameters["changes"]; - } + if (requestParameters['X_Registry_Config'] != null) { + headerParameters['X-Registry-Config'] = String(requestParameters['X_Registry_Config']); + } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/commit`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ContainerConfigToJSON(requestParameters["containerConfig"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); - } - - /** - * Create a new image from a container - */ - async imageCommit( - requestParameters: ImageCommitRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.imageCommitRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create an image by either pulling it from a registry or importing it. - * Create an image - */ - async imageCreateRaw( - requestParameters: ImageCreateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["fromImage"] != null) { - queryParameters["fromImage"] = requestParameters["fromImage"]; - } + const response = await this.request({ + path: `/build`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['inputStream'] as any, + }, initOverrides); - if (requestParameters["fromSrc"] != null) { - queryParameters["fromSrc"] = requestParameters["fromSrc"]; + return new runtime.VoidApiResponse(response); } - if (requestParameters["repo"] != null) { - queryParameters["repo"] = requestParameters["repo"]; + /** + * 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. + * Build an image + */ + async imageBuild(requestParameters: ImageBuildRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.imageBuildRaw(requestParameters, initOverrides); } - if (requestParameters["tag"] != null) { - queryParameters["tag"] = requestParameters["tag"]; - } + /** + * Create a new image from a container + */ + async imageCommitRaw(requestParameters: ImageCommitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - if (requestParameters["message"] != null) { - queryParameters["message"] = requestParameters["message"]; - } + if (requestParameters['container'] != null) { + queryParameters['container'] = requestParameters['container']; + } - if (requestParameters["changes"] != null) { - queryParameters["changes"] = requestParameters["changes"]!.join( - runtime.COLLECTION_FORMATS["csv"], - ); - } + if (requestParameters['repo'] != null) { + queryParameters['repo'] = requestParameters['repo']; + } - if (requestParameters["platform"] != null) { - queryParameters["platform"] = requestParameters["platform"]; - } + if (requestParameters['tag'] != null) { + queryParameters['tag'] = requestParameters['tag']; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['comment'] != null) { + queryParameters['comment'] = requestParameters['comment']; + } - headerParameters["Content-Type"] = "text/plain"; + if (requestParameters['author'] != null) { + queryParameters['author'] = requestParameters['author']; + } - if (requestParameters["X_Registry_Auth"] != null) { - headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); - } + if (requestParameters['pause'] != null) { + queryParameters['pause'] = requestParameters['pause']; + } - const response = await this.request( - { - path: `/images/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["inputImage"] as any, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Create an image by either pulling it from a registry or importing it. - * Create an image - */ - async imageCreate( - requestParameters: ImageCreateRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.imageCreateRaw(requestParameters, initOverrides); - } - - /** - * 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. - * Remove an image - */ - async imageDeleteRaw( - requestParameters: ImageDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling imageDelete().', - ); - } + if (requestParameters['changes'] != null) { + queryParameters['changes'] = requestParameters['changes']; + } - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; - } + headerParameters['Content-Type'] = 'application/json'; - if (requestParameters["noprune"] != null) { - queryParameters["noprune"] = requestParameters["noprune"]; - } + const response = await this.request({ + path: `/commit`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ContainerConfigToJSON(requestParameters['containerConfig']), + }, initOverrides); - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(ImageDeleteResponseItemFromJSON), - ); - } - - /** - * 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. - * Remove an image - */ - async imageDelete( - requestParameters: ImageDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.imageDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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\" } } ``` - * Export an image - */ - async imageGetRaw( - requestParameters: ImageGetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling imageGet().', - ); + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/{name}/get`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.BlobApiResponse(response); - } - - /** - * 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\" } } ``` - * Export an image - */ - async imageGet( - requestParameters: ImageGetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.imageGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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). - * Export several images - */ - async imageGetAllRaw( - requestParameters: ImageGetAllRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["names"] != null) { - queryParameters["names"] = requestParameters["names"]!.join( - runtime.COLLECTION_FORMATS["csv"], - ); + /** + * Create a new image from a container + */ + async imageCommit(requestParameters: ImageCommitRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.imageCommitRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/get`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.BlobApiResponse(response); - } - - /** - * 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). - * Export several images - */ - async imageGetAll( - requestParameters: ImageGetAllRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.imageGetAllRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Return parent layers of an image. - * Get the history of an image - */ - async imageHistoryRaw( - requestParameters: ImageHistoryRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling imageHistory().', - ); - } + /** + * Create an image by either pulling it from a registry or importing it. + * Create an image + */ + async imageCreateRaw(requestParameters: ImageCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/{name}/history`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(HistoryResponseItemFromJSON), - ); - } - - /** - * Return parent layers of an image. - * Get the history of an image - */ - async imageHistory( - requestParameters: ImageHistoryRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.imageHistoryRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Return low-level information about an image. - * Inspect an image - */ - async imageInspectRaw( - requestParameters: ImageInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling imageInspect().', - ); - } + if (requestParameters['fromImage'] != null) { + queryParameters['fromImage'] = requestParameters['fromImage']; + } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/{name}/json`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ImageInspectFromJSON(jsonValue)); - } - - /** - * Return low-level information about an image. - * Inspect an image - */ - async imageInspect( - requestParameters: ImageInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.imageInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. - * List Images - */ - async imageListRaw( - requestParameters: ImageListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["all"] != null) { - queryParameters["all"] = requestParameters["all"]; - } + if (requestParameters['fromSrc'] != null) { + queryParameters['fromSrc'] = requestParameters['fromSrc']; + } + + if (requestParameters['repo'] != null) { + queryParameters['repo'] = requestParameters['repo']; + } - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; - } + if (requestParameters['tag'] != null) { + queryParameters['tag'] = requestParameters['tag']; + } - if (requestParameters["shared_size"] != null) { - queryParameters["shared-size"] = requestParameters["shared_size"]; - } + if (requestParameters['message'] != null) { + queryParameters['message'] = requestParameters['message']; + } + + if (requestParameters['changes'] != null) { + queryParameters['changes'] = requestParameters['changes']!.join(runtime.COLLECTION_FORMATS["csv"]); + } - if (requestParameters["digests"] != null) { - queryParameters["digests"] = requestParameters["digests"]; - } + if (requestParameters['platform'] != null) { + queryParameters['platform'] = requestParameters['platform']; + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/json`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(ImageSummaryFromJSON), - ); - } - - /** - * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. - * List Images - */ - async imageList( - requestParameters: ImageListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.imageListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). - * Import images - */ - async imageLoadRaw( - requestParameters: ImageLoadRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["quiet"] != null) { - queryParameters["quiet"] = requestParameters["quiet"]; - } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'text/plain'; - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/x-tar"; - - const response = await this.request( - { - path: `/images/load`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["imagesTarball"] as any, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). - * Import images - */ - async imageLoad( - requestParameters: ImageLoadRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.imageLoadRaw(requestParameters, initOverrides); - } - - /** - * Delete unused images - */ - async imagePruneRaw( - requestParameters: ImagePruneRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; - } + if (requestParameters['X_Registry_Auth'] != null) { + headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/prune`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ImagePruneResponseFromJSON(jsonValue), - ); - } - - /** - * Delete unused images - */ - async imagePrune( - requestParameters: ImagePruneRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.imagePruneRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Push an image - */ - async imagePushRaw( - requestParameters: ImagePushRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling imagePush().', - ); + const response = await this.request({ + path: `/images/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['inputImage'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["X_Registry_Auth"] == null) { - throw new runtime.RequiredError( - "X_Registry_Auth", - 'Required parameter "X_Registry_Auth" was null or undefined when calling imagePush().', - ); + /** + * Create an image by either pulling it from a registry or importing it. + * Create an image + */ + async imageCreate(requestParameters: ImageCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.imageCreateRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; + /** + * 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. + * Remove an image + */ + async imageDeleteRaw(requestParameters: ImageDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling imageDelete().' + ); + } - if (requestParameters["tag"] != null) { - queryParameters["tag"] = requestParameters["tag"]; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + if (requestParameters['noprune'] != null) { + queryParameters['noprune'] = requestParameters['noprune']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageDeleteResponseItemFromJSON)); + } + + /** + * 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. + * Remove an image + */ + async imageDelete(requestParameters: ImageDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.imageDeleteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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\" } } ``` + * Export an image + */ + async imageGetRaw(requestParameters: ImageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling imageGet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/{name}/get`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * 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\" } } ``` + * Export an image + */ + async imageGet(requestParameters: ImageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.imageGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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). + * Export several images + */ + async imageGetAllRaw(requestParameters: ImageGetAllRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['names'] != null) { + queryParameters['names'] = requestParameters['names']!.join(runtime.COLLECTION_FORMATS["csv"]); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/get`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * 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). + * Export several images + */ + async imageGetAll(requestParameters: ImageGetAllRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.imageGetAllRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return parent layers of an image. + * Get the history of an image + */ + async imageHistoryRaw(requestParameters: ImageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling imageHistory().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/{name}/history`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(HistoryResponseItemFromJSON)); + } + + /** + * Return parent layers of an image. + * Get the history of an image + */ + async imageHistory(requestParameters: ImageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.imageHistoryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return low-level information about an image. + * Inspect an image + */ + async imageInspectRaw(requestParameters: ImageInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling imageInspect().' + ); + } - if (requestParameters["X_Registry_Auth"] != null) { - headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); - } + const queryParameters: any = {}; - const response = await this.request( - { - path: `/images/{name}/push`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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. - * Push an image - */ - async imagePush( - requestParameters: ImagePushRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.imagePushRaw(requestParameters, initOverrides); - } - - /** - * Search for an image on Docker Hub. - * Search images - */ - async imageSearchRaw( - requestParameters: ImageSearchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["term"] == null) { - throw new runtime.RequiredError( - "term", - 'Required parameter "term" was null or undefined when calling imageSearch().', - ); - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/{name}/json`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - const queryParameters: any = {}; + return new runtime.JSONApiResponse(response, (jsonValue) => ImageInspectFromJSON(jsonValue)); + } + + /** + * Return low-level information about an image. + * Inspect an image + */ + async imageInspect(requestParameters: ImageInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.imageInspectRaw(requestParameters, initOverrides); + return await response.value(); + } - if (requestParameters["term"] != null) { - queryParameters["term"] = requestParameters["term"]; - } + /** + * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. + * List Images + */ + async imageListRaw(requestParameters: ImageListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; - if (requestParameters["limit"] != null) { - queryParameters["limit"] = requestParameters["limit"]; + if (requestParameters['all'] != null) { + queryParameters['all'] = requestParameters['all']; + } + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + if (requestParameters['shared_size'] != null) { + queryParameters['shared-size'] = requestParameters['shared_size']; + } + + if (requestParameters['digests'] != null) { + queryParameters['digests'] = requestParameters['digests']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/json`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageSummaryFromJSON)); + } + + /** + * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. + * List Images + */ + async imageList(requestParameters: ImageListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.imageListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). + * Import images + */ + async imageLoadRaw(requestParameters: ImageLoadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['quiet'] != null) { + queryParameters['quiet'] = requestParameters['quiet']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/x-tar'; + + const response = await this.request({ + path: `/images/load`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['imagesTarball'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). + * Import images + */ + async imageLoad(requestParameters: ImageLoadRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.imageLoadRaw(requestParameters, initOverrides); } - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Delete unused images + */ + async imagePruneRaw(requestParameters: ImagePruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/prune`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImagePruneResponseFromJSON(jsonValue)); + } + + /** + * Delete unused images + */ + async imagePrune(requestParameters: ImagePruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.imagePruneRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Push an image + */ + async imagePushRaw(requestParameters: ImagePushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling imagePush().' + ); + } + + if (requestParameters['X_Registry_Auth'] == null) { + throw new runtime.RequiredError( + 'X_Registry_Auth', + 'Required parameter "X_Registry_Auth" was null or undefined when calling imagePush().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['tag'] != null) { + queryParameters['tag'] = requestParameters['tag']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['X_Registry_Auth'] != null) { + headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); + } + + const response = await this.request({ + path: `/images/{name}/push`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/search`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(ImageSearchResponseItemFromJSON), - ); - } - - /** - * Search for an image on Docker Hub. - * Search images - */ - async imageSearch( - requestParameters: ImageSearchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.imageSearchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Tag an image so that it becomes part of a repository. - * Tag an image - */ - async imageTagRaw( - requestParameters: ImageTagRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling imageTag().', - ); + /** + * 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. + * Push an image + */ + async imagePush(requestParameters: ImagePushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.imagePushRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; + /** + * Search for an image on Docker Hub. + * Search images + */ + async imageSearchRaw(requestParameters: ImageSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['term'] == null) { + throw new runtime.RequiredError( + 'term', + 'Required parameter "term" was null or undefined when calling imageSearch().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['term'] != null) { + queryParameters['term'] = requestParameters['term']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/search`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageSearchResponseItemFromJSON)); + } + + /** + * Search for an image on Docker Hub. + * Search images + */ + async imageSearch(requestParameters: ImageSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.imageSearchRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Tag an image so that it becomes part of a repository. + * Tag an image + */ + async imageTagRaw(requestParameters: ImageTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling imageTag().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['repo'] != null) { + queryParameters['repo'] = requestParameters['repo']; + } + + if (requestParameters['tag'] != null) { + queryParameters['tag'] = requestParameters['tag']; + } - if (requestParameters["repo"] != null) { - queryParameters["repo"] = requestParameters["repo"]; + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/images/{name}/tag`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["tag"] != null) { - queryParameters["tag"] = requestParameters["tag"]; + /** + * Tag an image so that it becomes part of a repository. + * Tag an image + */ + async imageTag(requestParameters: ImageTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.imageTagRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/images/{name}/tag`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Tag an image so that it becomes part of a repository. - * Tag an image - */ - async imageTag( - requestParameters: ImageTagRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.imageTagRaw(requestParameters, initOverrides); - } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ImageBuildContentTypeEnum { - ApplicationXTar = "application/x-tar", + ApplicationXTar = 'application/x-tar' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ImageBuildVersionEnum { - _1 = "1", - _2 = "2", + _1 = '1', + _2 = '2' } diff --git a/src/clients/docker/apis/NetworkApi.ts b/src/clients/docker/apis/NetworkApi.ts index 1de938d1e4..4c3832f753 100644 --- a/src/clients/docker/apis/NetworkApi.ts +++ b/src/clients/docker/apis/NetworkApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorResponse, Network, @@ -21,391 +22,314 @@ import type { NetworkCreateResponse, NetworkDisconnectRequest, NetworkPruneResponse, -} from "../models/index"; +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - NetworkFromJSON, - NetworkToJSON, - NetworkConnectRequestFromJSON, - NetworkConnectRequestToJSON, - NetworkCreateRequestFromJSON, - NetworkCreateRequestToJSON, - NetworkCreateResponseFromJSON, - NetworkCreateResponseToJSON, - NetworkDisconnectRequestFromJSON, - NetworkDisconnectRequestToJSON, - NetworkPruneResponseFromJSON, - NetworkPruneResponseToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + NetworkFromJSON, + NetworkToJSON, + NetworkConnectRequestFromJSON, + NetworkConnectRequestToJSON, + NetworkCreateRequestFromJSON, + NetworkCreateRequestToJSON, + NetworkCreateResponseFromJSON, + NetworkCreateResponseToJSON, + NetworkDisconnectRequestFromJSON, + NetworkDisconnectRequestToJSON, + NetworkPruneResponseFromJSON, + NetworkPruneResponseToJSON, +} from '../models/index'; export interface NetworkConnectOperationRequest { - id: string; - container: NetworkConnectRequest; + id: string; + container: NetworkConnectRequest; } export interface NetworkCreateOperationRequest { - networkConfig: NetworkCreateRequest; + networkConfig: NetworkCreateRequest; } export interface NetworkDeleteRequest { - id: string; + id: string; } export interface NetworkDisconnectOperationRequest { - id: string; - container: NetworkDisconnectRequest; + id: string; + container: NetworkDisconnectRequest; } export interface NetworkInspectRequest { - id: string; - verbose?: boolean; - scope?: string; + id: string; + verbose?: boolean; + scope?: string; } export interface NetworkListRequest { - filters?: string; + filters?: string; } export interface NetworkPruneRequest { - filters?: string; + filters?: string; } /** - * + * */ export class NetworkApi extends runtime.BaseAPI { - /** - * Connect a container to a network - */ - async networkConnectRaw( - requestParameters: NetworkConnectOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling networkConnect().', - ); + + /** + * Connect a container to a network + */ + async networkConnectRaw(requestParameters: NetworkConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling networkConnect().' + ); + } + + if (requestParameters['container'] == null) { + throw new runtime.RequiredError( + 'container', + 'Required parameter "container" was null or undefined when calling networkConnect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/networks/{id}/connect`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworkConnectRequestToJSON(requestParameters['container']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Connect a container to a network + */ + async networkConnect(requestParameters: NetworkConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networkConnectRaw(requestParameters, initOverrides); + } + + /** + * Create a network + */ + async networkCreateRaw(requestParameters: NetworkCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['networkConfig'] == null) { + throw new runtime.RequiredError( + 'networkConfig', + 'Required parameter "networkConfig" was null or undefined when calling networkCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/networks/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworkCreateRequestToJSON(requestParameters['networkConfig']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NetworkCreateResponseFromJSON(jsonValue)); + } + + /** + * Create a network + */ + async networkCreate(requestParameters: NetworkCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.networkCreateRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["container"] == null) { - throw new runtime.RequiredError( - "container", - 'Required parameter "container" was null or undefined when calling networkConnect().', - ); + /** + * Remove a network + */ + async networkDeleteRaw(requestParameters: NetworkDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling networkDelete().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/networks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/networks/{id}/connect`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: NetworkConnectRequestToJSON(requestParameters["container"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Connect a container to a network - */ - async networkConnect( - requestParameters: NetworkConnectOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.networkConnectRaw(requestParameters, initOverrides); - } - - /** - * Create a network - */ - async networkCreateRaw( - requestParameters: NetworkCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["networkConfig"] == null) { - throw new runtime.RequiredError( - "networkConfig", - 'Required parameter "networkConfig" was null or undefined when calling networkCreate().', - ); + /** + * Remove a network + */ + async networkDelete(requestParameters: NetworkDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networkDeleteRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/networks/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: NetworkCreateRequestToJSON(requestParameters["networkConfig"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - NetworkCreateResponseFromJSON(jsonValue), - ); - } - - /** - * Create a network - */ - async networkCreate( - requestParameters: NetworkCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.networkCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Remove a network - */ - async networkDeleteRaw( - requestParameters: NetworkDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling networkDelete().', - ); + /** + * Disconnect a container from a network + */ + async networkDisconnectRaw(requestParameters: NetworkDisconnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling networkDisconnect().' + ); + } + + if (requestParameters['container'] == null) { + throw new runtime.RequiredError( + 'container', + 'Required parameter "container" was null or undefined when calling networkDisconnect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/networks/{id}/disconnect`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NetworkDisconnectRequestToJSON(requestParameters['container']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/networks/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Remove a network - */ - async networkDelete( - requestParameters: NetworkDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.networkDeleteRaw(requestParameters, initOverrides); - } - - /** - * Disconnect a container from a network - */ - async networkDisconnectRaw( - requestParameters: NetworkDisconnectOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling networkDisconnect().', - ); + /** + * Disconnect a container from a network + */ + async networkDisconnect(requestParameters: NetworkDisconnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.networkDisconnectRaw(requestParameters, initOverrides); } - if (requestParameters["container"] == null) { - throw new runtime.RequiredError( - "container", - 'Required parameter "container" was null or undefined when calling networkDisconnect().', - ); + /** + * Inspect a network + */ + async networkInspectRaw(requestParameters: NetworkInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling networkInspect().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['verbose'] != null) { + queryParameters['verbose'] = requestParameters['verbose']; + } + + if (requestParameters['scope'] != null) { + queryParameters['scope'] = requestParameters['scope']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/networks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NetworkFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/networks/{id}/disconnect`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: NetworkDisconnectRequestToJSON(requestParameters["container"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Disconnect a container from a network - */ - async networkDisconnect( - requestParameters: NetworkDisconnectOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.networkDisconnectRaw(requestParameters, initOverrides); - } - - /** - * Inspect a network - */ - async networkInspectRaw( - requestParameters: NetworkInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling networkInspect().', - ); + /** + * Inspect a network + */ + async networkInspect(requestParameters: NetworkInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.networkInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * 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. + * List networks + */ + async networkListRaw(requestParameters: NetworkListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["verbose"] != null) { - queryParameters["verbose"] = requestParameters["verbose"]; + const response = await this.request({ + path: `/networks`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworkFromJSON)); } - if (requestParameters["scope"] != null) { - queryParameters["scope"] = requestParameters["scope"]; + /** + * 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. + * List networks + */ + async networkList(requestParameters: NetworkListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.networkListRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/networks/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => NetworkFromJSON(jsonValue)); - } - - /** - * Inspect a network - */ - async networkInspect( - requestParameters: NetworkInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.networkInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * List networks - */ - async networkListRaw( - requestParameters: NetworkListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Delete unused networks + */ + async networkPruneRaw(requestParameters: NetworkPruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/networks/prune`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NetworkPruneResponseFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/networks`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworkFromJSON)); - } - - /** - * 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. - * List networks - */ - async networkList( - requestParameters: NetworkListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.networkListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete unused networks - */ - async networkPruneRaw( - requestParameters: NetworkPruneRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Delete unused networks + */ + async networkPrune(requestParameters: NetworkPruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.networkPruneRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/networks/prune`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - NetworkPruneResponseFromJSON(jsonValue), - ); - } - - /** - * Delete unused networks - */ - async networkPrune( - requestParameters: NetworkPruneRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.networkPruneRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/docker/apis/NodeApi.ts b/src/clients/docker/apis/NodeApi.ts index fb7a3e5c97..6e39ded86f 100644 --- a/src/clients/docker/apis/NodeApi.ts +++ b/src/clients/docker/apis/NodeApi.ts @@ -2,237 +2,199 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorResponse, Node, NodeSpec } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + Node, + NodeSpec, +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - NodeFromJSON, - NodeToJSON, - NodeSpecFromJSON, - NodeSpecToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + NodeFromJSON, + NodeToJSON, + NodeSpecFromJSON, + NodeSpecToJSON, +} from '../models/index'; export interface NodeDeleteRequest { - id: string; - force?: boolean; + id: string; + force?: boolean; } export interface NodeInspectRequest { - id: string; + id: string; } export interface NodeListRequest { - filters?: string; + filters?: string; } export interface NodeUpdateRequest { - id: string; - version: number; - body?: NodeSpec; + id: string; + version: number; + body?: NodeSpec; } /** - * + * */ export class NodeApi extends runtime.BaseAPI { - /** - * Delete a node - */ - async nodeDeleteRaw( - requestParameters: NodeDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling nodeDelete().', - ); - } - const queryParameters: any = {}; + /** + * Delete a node + */ + async nodeDeleteRaw(requestParameters: NodeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling nodeDelete().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/nodes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + /** + * Delete a node + */ + async nodeDelete(requestParameters: NodeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.nodeDeleteRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/nodes/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a node - */ - async nodeDelete( - requestParameters: NodeDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.nodeDeleteRaw(requestParameters, initOverrides); - } - - /** - * Inspect a node - */ - async nodeInspectRaw( - requestParameters: NodeInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling nodeInspect().', - ); + /** + * Inspect a node + */ + async nodeInspectRaw(requestParameters: NodeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling nodeInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/nodes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => NodeFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/nodes/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => NodeFromJSON(jsonValue)); - } - - /** - * Inspect a node - */ - async nodeInspect( - requestParameters: NodeInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.nodeInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List nodes - */ - async nodeListRaw( - requestParameters: NodeListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Inspect a node + */ + async nodeInspect(requestParameters: NodeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.nodeInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/nodes`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NodeFromJSON)); - } - - /** - * List nodes - */ - async nodeList( - requestParameters: NodeListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.nodeListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a node - */ - async nodeUpdateRaw( - requestParameters: NodeUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling nodeUpdate().', - ); + /** + * List nodes + */ + async nodeListRaw(requestParameters: NodeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/nodes`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NodeFromJSON)); } - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling nodeUpdate().', - ); + /** + * List nodes + */ + async nodeList(requestParameters: NodeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.nodeListRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Update a node + */ + async nodeUpdateRaw(requestParameters: NodeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling nodeUpdate().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling nodeUpdate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/nodes/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NodeSpecToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; + /** + * Update a node + */ + async nodeUpdate(requestParameters: NodeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.nodeUpdateRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/nodes/{id}/update`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: NodeSpecToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Update a node - */ - async nodeUpdate( - requestParameters: NodeUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.nodeUpdateRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/PluginApi.ts b/src/clients/docker/apis/PluginApi.ts index d065678092..a102a77865 100644 --- a/src/clients/docker/apis/PluginApi.ts +++ b/src/clients/docker/apis/PluginApi.ts @@ -2,623 +2,508 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorResponse, Plugin, PluginPrivilege } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + Plugin, + PluginPrivilege, +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - PluginFromJSON, - PluginToJSON, - PluginPrivilegeFromJSON, - PluginPrivilegeToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + PluginFromJSON, + PluginToJSON, + PluginPrivilegeFromJSON, + PluginPrivilegeToJSON, +} from '../models/index'; export interface GetPluginPrivilegesRequest { - remote: string; + remote: string; } export interface PluginCreateRequest { - name: string; - tarContext?: Blob; + name: string; + tarContext?: Blob; } export interface PluginDeleteRequest { - name: string; - force?: boolean; + name: string; + force?: boolean; } export interface PluginDisableRequest { - name: string; - force?: boolean; + name: string; + force?: boolean; } export interface PluginEnableRequest { - name: string; - timeout?: number; + name: string; + timeout?: number; } export interface PluginInspectRequest { - name: string; + name: string; } export interface PluginListRequest { - filters?: string; + filters?: string; } export interface PluginPullRequest { - remote: string; - name?: string; - X_Registry_Auth?: string; - body?: Array; + remote: string; + name?: string; + X_Registry_Auth?: string; + body?: Array; } export interface PluginPushRequest { - name: string; + name: string; } export interface PluginSetRequest { - name: string; - body?: Array; + name: string; + body?: Array; } export interface PluginUpgradeRequest { - name: string; - remote: string; - X_Registry_Auth?: string; - body?: Array; + name: string; + remote: string; + X_Registry_Auth?: string; + body?: Array; } /** - * + * */ export class PluginApi extends runtime.BaseAPI { - /** - * Get plugin privileges - */ - async getPluginPrivilegesRaw( - requestParameters: GetPluginPrivilegesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["remote"] == null) { - throw new runtime.RequiredError( - "remote", - 'Required parameter "remote" was null or undefined when calling getPluginPrivileges().', - ); - } - - const queryParameters: any = {}; - if (requestParameters["remote"] != null) { - queryParameters["remote"] = requestParameters["remote"]; + /** + * Get plugin privileges + */ + async getPluginPrivilegesRaw(requestParameters: GetPluginPrivilegesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['remote'] == null) { + throw new runtime.RequiredError( + 'remote', + 'Required parameter "remote" was null or undefined when calling getPluginPrivileges().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['remote'] != null) { + queryParameters['remote'] = requestParameters['remote']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/plugins/privileges`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PluginPrivilegeFromJSON)); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins/privileges`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(PluginPrivilegeFromJSON), - ); - } - - /** - * Get plugin privileges - */ - async getPluginPrivileges( - requestParameters: GetPluginPrivilegesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getPluginPrivilegesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create a plugin - */ - async pluginCreateRaw( - requestParameters: PluginCreateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginCreate().', - ); + /** + * Get plugin privileges + */ + async getPluginPrivileges(requestParameters: GetPluginPrivilegesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getPluginPrivilegesRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Create a plugin + */ + async pluginCreateRaw(requestParameters: PluginCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginCreate().' + ); + } - if (requestParameters["name"] != null) { - queryParameters["name"] = requestParameters["name"]; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/x-tar"; - - const response = await this.request( - { - path: `/plugins/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["tarContext"] as any, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Create a plugin - */ - async pluginCreate( - requestParameters: PluginCreateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginCreateRaw(requestParameters, initOverrides); - } - - /** - * Remove a plugin - */ - async pluginDeleteRaw( - requestParameters: PluginDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginDelete().', - ); - } + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; - const queryParameters: any = {}; + headerParameters['Content-Type'] = 'application/x-tar'; - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + const response = await this.request({ + path: `/plugins/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['tarContext'] as any, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); - } - - /** - * Remove a plugin - */ - async pluginDelete( - requestParameters: PluginDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.pluginDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Disable a plugin - */ - async pluginDisableRaw( - requestParameters: PluginDisableRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginDisable().', - ); + /** + * Create a plugin + */ + async pluginCreate(requestParameters: PluginCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginCreateRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; + /** + * Remove a plugin + */ + async pluginDeleteRaw(requestParameters: PluginDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginDelete().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/plugins/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); + } - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + /** + * Remove a plugin + */ + async pluginDelete(requestParameters: PluginDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.pluginDeleteRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins/{name}/disable`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Disable a plugin - */ - async pluginDisable( - requestParameters: PluginDisableRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginDisableRaw(requestParameters, initOverrides); - } - - /** - * Enable a plugin - */ - async pluginEnableRaw( - requestParameters: PluginEnableRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginEnable().', - ); + /** + * Disable a plugin + */ + async pluginDisableRaw(requestParameters: PluginDisableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginDisable().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/plugins/{name}/disable`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; + /** + * Disable a plugin + */ + async pluginDisable(requestParameters: PluginDisableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginDisableRaw(requestParameters, initOverrides); + } - if (requestParameters["timeout"] != null) { - queryParameters["timeout"] = requestParameters["timeout"]; + /** + * Enable a plugin + */ + async pluginEnableRaw(requestParameters: PluginEnableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginEnable().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['timeout'] != null) { + queryParameters['timeout'] = requestParameters['timeout']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/plugins/{name}/enable`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins/{name}/enable`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Enable a plugin - */ - async pluginEnable( - requestParameters: PluginEnableRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginEnableRaw(requestParameters, initOverrides); - } - - /** - * Inspect a plugin - */ - async pluginInspectRaw( - requestParameters: PluginInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginInspect().', - ); + /** + * Enable a plugin + */ + async pluginEnable(requestParameters: PluginEnableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginEnableRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins/{name}/json`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); - } - - /** - * Inspect a plugin - */ - async pluginInspect( - requestParameters: PluginInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.pluginInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns information about installed plugins. - * List plugins - */ - async pluginListRaw( - requestParameters: PluginListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Inspect a plugin + */ + async pluginInspectRaw(requestParameters: PluginInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/plugins/{name}/json`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PluginFromJSON)); - } - - /** - * Returns information about installed plugins. - * List plugins - */ - async pluginList( - requestParameters: PluginListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.pluginListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). - * Install a plugin - */ - async pluginPullRaw( - requestParameters: PluginPullRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["remote"] == null) { - throw new runtime.RequiredError( - "remote", - 'Required parameter "remote" was null or undefined when calling pluginPull().', - ); + /** + * Inspect a plugin + */ + async pluginInspect(requestParameters: PluginInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.pluginInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Returns information about installed plugins. + * List plugins + */ + async pluginListRaw(requestParameters: PluginListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; - if (requestParameters["remote"] != null) { - queryParameters["remote"] = requestParameters["remote"]; - } + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } - if (requestParameters["name"] != null) { - queryParameters["name"] = requestParameters["name"]; - } + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + const response = await this.request({ + path: `/plugins`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - headerParameters["Content-Type"] = "application/json"; + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PluginFromJSON)); + } - if (requestParameters["X_Registry_Auth"] != null) { - headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); + /** + * Returns information about installed plugins. + * List plugins + */ + async pluginList(requestParameters: PluginListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.pluginListRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/plugins/pull`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["body"]!.map(PluginPrivilegeToJSON), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). - * Install a plugin - */ - async pluginPull( - requestParameters: PluginPullRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginPullRaw(requestParameters, initOverrides); - } - - /** - * Push a plugin to the registry. - * Push a plugin - */ - async pluginPushRaw( - requestParameters: PluginPushRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginPush().', - ); + /** + * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + * Install a plugin + */ + async pluginPullRaw(requestParameters: PluginPullRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['remote'] == null) { + throw new runtime.RequiredError( + 'remote', + 'Required parameter "remote" was null or undefined when calling pluginPull().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['remote'] != null) { + queryParameters['remote'] = requestParameters['remote']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['X_Registry_Auth'] != null) { + headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); + } + + const response = await this.request({ + path: `/plugins/pull`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body']!.map(PluginPrivilegeToJSON), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/plugins/{name}/push`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Push a plugin to the registry. - * Push a plugin - */ - async pluginPush( - requestParameters: PluginPushRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginPushRaw(requestParameters, initOverrides); - } - - /** - * Configure a plugin - */ - async pluginSetRaw( - requestParameters: PluginSetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginSet().', - ); + /** + * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + * Install a plugin + */ + async pluginPull(requestParameters: PluginPullRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginPullRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/plugins/{name}/set`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["body"], - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Configure a plugin - */ - async pluginSet( - requestParameters: PluginSetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginSetRaw(requestParameters, initOverrides); - } - - /** - * Upgrade a plugin - */ - async pluginUpgradeRaw( - requestParameters: PluginUpgradeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pluginUpgrade().', - ); + /** + * Push a plugin to the registry. + * Push a plugin + */ + async pluginPushRaw(requestParameters: PluginPushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginPush().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/plugins/{name}/push`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["remote"] == null) { - throw new runtime.RequiredError( - "remote", - 'Required parameter "remote" was null or undefined when calling pluginUpgrade().', - ); + /** + * Push a plugin to the registry. + * Push a plugin + */ + async pluginPush(requestParameters: PluginPushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginPushRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; + /** + * Configure a plugin + */ + async pluginSetRaw(requestParameters: PluginSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginSet().' + ); + } + + const queryParameters: any = {}; - if (requestParameters["remote"] != null) { - queryParameters["remote"] = requestParameters["remote"]; + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/plugins/{name}/set`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body'], + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; + /** + * Configure a plugin + */ + async pluginSet(requestParameters: PluginSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginSetRaw(requestParameters, initOverrides); + } - headerParameters["Content-Type"] = "application/json"; + /** + * Upgrade a plugin + */ + async pluginUpgradeRaw(requestParameters: PluginUpgradeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pluginUpgrade().' + ); + } + + if (requestParameters['remote'] == null) { + throw new runtime.RequiredError( + 'remote', + 'Required parameter "remote" was null or undefined when calling pluginUpgrade().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['remote'] != null) { + queryParameters['remote'] = requestParameters['remote']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['X_Registry_Auth'] != null) { + headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); + } + + const response = await this.request({ + path: `/plugins/{name}/upgrade`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body']!.map(PluginPrivilegeToJSON), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["X_Registry_Auth"] != null) { - headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); + /** + * Upgrade a plugin + */ + async pluginUpgrade(requestParameters: PluginUpgradeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.pluginUpgradeRaw(requestParameters, initOverrides); } - const response = await this.request( - { - path: `/plugins/{name}/upgrade`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["body"]!.map(PluginPrivilegeToJSON), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Upgrade a plugin - */ - async pluginUpgrade( - requestParameters: PluginUpgradeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.pluginUpgradeRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/SecretApi.ts b/src/clients/docker/apis/SecretApi.ts index d9c4bf8a11..077a1e5d64 100644 --- a/src/clients/docker/apis/SecretApi.ts +++ b/src/clients/docker/apis/SecretApi.ts @@ -2,284 +2,233 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorResponse, IdResponse, Secret, SecretCreateRequest, SecretSpec, -} from "../models/index"; +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IdResponseFromJSON, - IdResponseToJSON, - SecretFromJSON, - SecretToJSON, - SecretCreateRequestFromJSON, - SecretCreateRequestToJSON, - SecretSpecFromJSON, - SecretSpecToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IdResponseFromJSON, + IdResponseToJSON, + SecretFromJSON, + SecretToJSON, + SecretCreateRequestFromJSON, + SecretCreateRequestToJSON, + SecretSpecFromJSON, + SecretSpecToJSON, +} from '../models/index'; export interface SecretCreateOperationRequest { - body?: SecretCreateRequest; + body?: SecretCreateRequest; } export interface SecretDeleteRequest { - id: string; + id: string; } export interface SecretInspectRequest { - id: string; + id: string; } export interface SecretListRequest { - filters?: string; + filters?: string; } export interface SecretUpdateRequest { - id: string; - version: number; - body?: SecretSpec; + id: string; + version: number; + body?: SecretSpec; } /** - * + * */ export class SecretApi extends runtime.BaseAPI { - /** - * Create a secret - */ - async secretCreateRaw( - requestParameters: SecretCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/secrets/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SecretCreateRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); - } - - /** - * Create a secret - */ - async secretCreate( - requestParameters: SecretCreateOperationRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.secretCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete a secret - */ - async secretDeleteRaw( - requestParameters: SecretDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling secretDelete().', - ); + + /** + * Create a secret + */ + async secretCreateRaw(requestParameters: SecretCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/secrets/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SecretCreateRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + } + + /** + * Create a secret + */ + async secretCreate(requestParameters: SecretCreateOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.secretCreateRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/secrets/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a secret - */ - async secretDelete( - requestParameters: SecretDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.secretDeleteRaw(requestParameters, initOverrides); - } - - /** - * Inspect a secret - */ - async secretInspectRaw( - requestParameters: SecretInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling secretInspect().', - ); + /** + * Delete a secret + */ + async secretDeleteRaw(requestParameters: SecretDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling secretDelete().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/secrets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/secrets/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue)); - } - - /** - * Inspect a secret - */ - async secretInspect( - requestParameters: SecretInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.secretInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List secrets - */ - async secretListRaw( - requestParameters: SecretListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Delete a secret + */ + async secretDelete(requestParameters: SecretDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.secretDeleteRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/secrets`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SecretFromJSON)); - } - - /** - * List secrets - */ - async secretList( - requestParameters: SecretListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.secretListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a Secret - */ - async secretUpdateRaw( - requestParameters: SecretUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling secretUpdate().', - ); + /** + * Inspect a secret + */ + async secretInspectRaw(requestParameters: SecretInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling secretInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/secrets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue)); } - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling secretUpdate().', - ); + /** + * Inspect a secret + */ + async secretInspect(requestParameters: SecretInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.secretInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * List secrets + */ + async secretListRaw(requestParameters: SecretListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/secrets`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SecretFromJSON)); + } + + /** + * List secrets + */ + async secretList(requestParameters: SecretListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.secretListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a Secret + */ + async secretUpdateRaw(requestParameters: SecretUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling secretUpdate().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling secretUpdate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/secrets/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SecretSpecToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; + /** + * Update a Secret + */ + async secretUpdate(requestParameters: SecretUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.secretUpdateRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/secrets/{id}/update`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SecretSpecToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Update a Secret - */ - async secretUpdate( - requestParameters: SecretUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.secretUpdateRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/ServiceApi.ts b/src/clients/docker/apis/ServiceApi.ts index bc81187e2b..fe824530a8 100644 --- a/src/clients/docker/apis/ServiceApi.ts +++ b/src/clients/docker/apis/ServiceApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorResponse, Service, @@ -20,413 +21,345 @@ import type { ServiceCreateResponse, ServiceUpdateRequest, ServiceUpdateResponse, -} from "../models/index"; +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - ServiceFromJSON, - ServiceToJSON, - ServiceCreateRequestFromJSON, - ServiceCreateRequestToJSON, - ServiceCreateResponseFromJSON, - ServiceCreateResponseToJSON, - ServiceUpdateRequestFromJSON, - ServiceUpdateRequestToJSON, - ServiceUpdateResponseFromJSON, - ServiceUpdateResponseToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + ServiceFromJSON, + ServiceToJSON, + ServiceCreateRequestFromJSON, + ServiceCreateRequestToJSON, + ServiceCreateResponseFromJSON, + ServiceCreateResponseToJSON, + ServiceUpdateRequestFromJSON, + ServiceUpdateRequestToJSON, + ServiceUpdateResponseFromJSON, + ServiceUpdateResponseToJSON, +} from '../models/index'; export interface ServiceCreateOperationRequest { - body: ServiceCreateRequest; - X_Registry_Auth?: string; + body: ServiceCreateRequest; + X_Registry_Auth?: string; } export interface ServiceDeleteRequest { - id: string; + id: string; } export interface ServiceInspectRequest { - id: string; - insertDefaults?: boolean; + id: string; + insertDefaults?: boolean; } export interface ServiceListRequest { - filters?: string; - status?: boolean; + filters?: string; + status?: boolean; } export interface ServiceLogsRequest { - id: string; - details?: boolean; - follow?: boolean; - stdout?: boolean; - stderr?: boolean; - since?: number; - timestamps?: boolean; - tail?: string; + id: string; + details?: boolean; + follow?: boolean; + stdout?: boolean; + stderr?: boolean; + since?: number; + timestamps?: boolean; + tail?: string; } export interface ServiceUpdateOperationRequest { - id: string; - version: number; - body: ServiceUpdateRequest; - registryAuthFrom?: ServiceUpdateRegistryAuthFromEnum; - rollback?: string; - X_Registry_Auth?: string; + id: string; + version: number; + body: ServiceUpdateRequest; + registryAuthFrom?: ServiceUpdateRegistryAuthFromEnum; + rollback?: string; + X_Registry_Auth?: string; } /** - * + * */ export class ServiceApi extends runtime.BaseAPI { - /** - * Create a service - */ - async serviceCreateRaw( - requestParameters: ServiceCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling serviceCreate().', - ); - } - - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + /** + * Create a service + */ + async serviceCreateRaw(requestParameters: ServiceCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling serviceCreate().' + ); + } - headerParameters["Content-Type"] = "application/json"; + const queryParameters: any = {}; - if (requestParameters["X_Registry_Auth"] != null) { - headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); - } + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request( - { - path: `/services/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ServiceCreateRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ServiceCreateResponseFromJSON(jsonValue), - ); - } - - /** - * Create a service - */ - async serviceCreate( - requestParameters: ServiceCreateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.serviceCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete a service - */ - async serviceDeleteRaw( - requestParameters: ServiceDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling serviceDelete().', - ); - } + headerParameters['Content-Type'] = 'application/json'; - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/services/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a service - */ - async serviceDelete( - requestParameters: ServiceDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.serviceDeleteRaw(requestParameters, initOverrides); - } - - /** - * Inspect a service - */ - async serviceInspectRaw( - requestParameters: ServiceInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling serviceInspect().', - ); - } + if (requestParameters['X_Registry_Auth'] != null) { + headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); + } - const queryParameters: any = {}; - - if (requestParameters["insertDefaults"] != null) { - queryParameters["insertDefaults"] = requestParameters["insertDefaults"]; - } + const response = await this.request({ + path: `/services/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceCreateRequestToJSON(requestParameters['body']), + }, initOverrides); - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/services/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ServiceFromJSON(jsonValue)); - } - - /** - * Inspect a service - */ - async serviceInspect( - requestParameters: ServiceInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.serviceInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List services - */ - async serviceListRaw( - requestParameters: ServiceListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + return new runtime.JSONApiResponse(response, (jsonValue) => ServiceCreateResponseFromJSON(jsonValue)); } - if (requestParameters["status"] != null) { - queryParameters["status"] = requestParameters["status"]; + /** + * Create a service + */ + async serviceCreate(requestParameters: ServiceCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.serviceCreateRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/services`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFromJSON)); - } - - /** - * List services - */ - async serviceList( - requestParameters: ServiceListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.serviceListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Get service logs - */ - async serviceLogsRaw( - requestParameters: ServiceLogsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling serviceLogs().', - ); + /** + * Delete a service + */ + async serviceDeleteRaw(requestParameters: ServiceDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling serviceDelete().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/services/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - if (requestParameters["details"] != null) { - queryParameters["details"] = requestParameters["details"]; + /** + * Delete a service + */ + async serviceDelete(requestParameters: ServiceDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.serviceDeleteRaw(requestParameters, initOverrides); } - if (requestParameters["follow"] != null) { - queryParameters["follow"] = requestParameters["follow"]; + /** + * Inspect a service + */ + async serviceInspectRaw(requestParameters: ServiceInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling serviceInspect().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['insertDefaults'] != null) { + queryParameters['insertDefaults'] = requestParameters['insertDefaults']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/services/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ServiceFromJSON(jsonValue)); } - if (requestParameters["stdout"] != null) { - queryParameters["stdout"] = requestParameters["stdout"]; + /** + * Inspect a service + */ + async serviceInspect(requestParameters: ServiceInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.serviceInspectRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["stderr"] != null) { - queryParameters["stderr"] = requestParameters["stderr"]; - } + /** + * List services + */ + async serviceListRaw(requestParameters: ServiceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; - if (requestParameters["since"] != null) { - queryParameters["since"] = requestParameters["since"]; - } + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } - if (requestParameters["timestamps"] != null) { - queryParameters["timestamps"] = requestParameters["timestamps"]; - } + if (requestParameters['status'] != null) { + queryParameters['status'] = requestParameters['status']; + } - if (requestParameters["tail"] != null) { - queryParameters["tail"] = requestParameters["tail"]; - } + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/services/{id}/logs`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.BlobApiResponse(response); - } - - /** - * 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. - * Get service logs - */ - async serviceLogs( - requestParameters: ServiceLogsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.serviceLogsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a service - */ - async serviceUpdateRaw( - requestParameters: ServiceUpdateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling serviceUpdate().', - ); - } + const response = await this.request({ + path: `/services`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling serviceUpdate().', - ); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFromJSON)); } - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling serviceUpdate().', - ); + /** + * List services + */ + async serviceList(requestParameters: ServiceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.serviceListRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; + /** + * 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. + * Get service logs + */ + async serviceLogsRaw(requestParameters: ServiceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling serviceLogs().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['details'] != null) { + queryParameters['details'] = requestParameters['details']; + } + + if (requestParameters['follow'] != null) { + queryParameters['follow'] = requestParameters['follow']; + } + + if (requestParameters['stdout'] != null) { + queryParameters['stdout'] = requestParameters['stdout']; + } + + if (requestParameters['stderr'] != null) { + queryParameters['stderr'] = requestParameters['stderr']; + } + + if (requestParameters['since'] != null) { + queryParameters['since'] = requestParameters['since']; + } + + if (requestParameters['timestamps'] != null) { + queryParameters['timestamps'] = requestParameters['timestamps']; + } + + if (requestParameters['tail'] != null) { + queryParameters['tail'] = requestParameters['tail']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/services/{id}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); } - if (requestParameters["registryAuthFrom"] != null) { - queryParameters["registryAuthFrom"] = requestParameters["registryAuthFrom"]; + /** + * 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. + * Get service logs + */ + async serviceLogs(requestParameters: ServiceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.serviceLogsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["rollback"] != null) { - queryParameters["rollback"] = requestParameters["rollback"]; + /** + * Update a service + */ + async serviceUpdateRaw(requestParameters: ServiceUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling serviceUpdate().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling serviceUpdate().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling serviceUpdate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + if (requestParameters['registryAuthFrom'] != null) { + queryParameters['registryAuthFrom'] = requestParameters['registryAuthFrom']; + } + + if (requestParameters['rollback'] != null) { + queryParameters['rollback'] = requestParameters['rollback']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['X_Registry_Auth'] != null) { + headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); + } + + const response = await this.request({ + path: `/services/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ServiceUpdateRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ServiceUpdateResponseFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (requestParameters["X_Registry_Auth"] != null) { - headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); + /** + * Update a service + */ + async serviceUpdate(requestParameters: ServiceUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.serviceUpdateRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/services/{id}/update`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ServiceUpdateRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ServiceUpdateResponseFromJSON(jsonValue), - ); - } - - /** - * Update a service - */ - async serviceUpdate( - requestParameters: ServiceUpdateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.serviceUpdateRaw(requestParameters, initOverrides); - return await response.value(); - } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ServiceUpdateOperationRegistryAuthFromEnum { - Spec = "spec", - PreviousSpec = "previous-spec", + Spec = 'spec', + PreviousSpec = 'previous-spec' } diff --git a/src/clients/docker/apis/SessionApi.ts b/src/clients/docker/apis/SessionApi.ts index 29dec14551..37e3ee94ec 100644 --- a/src/clients/docker/apis/SessionApi.ts +++ b/src/clients/docker/apis/SessionApi.ts @@ -2,53 +2,56 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorResponse } from "../models/index"; -import { ErrorResponseFromJSON, ErrorResponseToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorResponse, +} from '../models/index'; +import { + ErrorResponseFromJSON, + ErrorResponseToJSON, +} from '../models/index'; /** - * + * */ export class SessionApi extends runtime.BaseAPI { - /** - * 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 ``` - * Initialize interactive session - */ - async sessionRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/session`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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 ``` - * Initialize interactive session - */ - async session(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.sessionRaw(initOverrides); - } + + /** + * 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 ``` + * Initialize interactive session + */ + async sessionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/session`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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 ``` + * Initialize interactive session + */ + async session(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sessionRaw(initOverrides); + } + } diff --git a/src/clients/docker/apis/SwarmApi.ts b/src/clients/docker/apis/SwarmApi.ts index 602384bed1..75edfa663a 100644 --- a/src/clients/docker/apis/SwarmApi.ts +++ b/src/clients/docker/apis/SwarmApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorResponse, Swarm, @@ -21,357 +22,300 @@ import type { SwarmSpec, SwarmUnlockRequest, UnlockKeyResponse, -} from "../models/index"; +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - SwarmFromJSON, - SwarmToJSON, - SwarmInitRequestFromJSON, - SwarmInitRequestToJSON, - SwarmJoinRequestFromJSON, - SwarmJoinRequestToJSON, - SwarmSpecFromJSON, - SwarmSpecToJSON, - SwarmUnlockRequestFromJSON, - SwarmUnlockRequestToJSON, - UnlockKeyResponseFromJSON, - UnlockKeyResponseToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + SwarmFromJSON, + SwarmToJSON, + SwarmInitRequestFromJSON, + SwarmInitRequestToJSON, + SwarmJoinRequestFromJSON, + SwarmJoinRequestToJSON, + SwarmSpecFromJSON, + SwarmSpecToJSON, + SwarmUnlockRequestFromJSON, + SwarmUnlockRequestToJSON, + UnlockKeyResponseFromJSON, + UnlockKeyResponseToJSON, +} from '../models/index'; export interface SwarmInitOperationRequest { - body: SwarmInitRequest; + body: SwarmInitRequest; } export interface SwarmJoinOperationRequest { - body: SwarmJoinRequest; + body: SwarmJoinRequest; } export interface SwarmLeaveRequest { - force?: boolean; + force?: boolean; } export interface SwarmUnlockOperationRequest { - body: SwarmUnlockRequest; + body: SwarmUnlockRequest; } export interface SwarmUpdateRequest { - version: number; - body: SwarmSpec; - rotateWorkerToken?: boolean; - rotateManagerToken?: boolean; - rotateManagerUnlockKey?: boolean; + version: number; + body: SwarmSpec; + rotateWorkerToken?: boolean; + rotateManagerToken?: boolean; + rotateManagerUnlockKey?: boolean; } /** - * + * */ export class SwarmApi extends runtime.BaseAPI { - /** - * Initialize a new swarm - */ - async swarmInitRaw( - requestParameters: SwarmInitOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling swarmInit().', - ); + + /** + * Initialize a new swarm + */ + async swarmInitRaw(requestParameters: SwarmInitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling swarmInit().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/swarm/init`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SwarmInitRequestToJSON(requestParameters['body']), + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Initialize a new swarm + */ + async swarmInit(requestParameters: SwarmInitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.swarmInitRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Inspect swarm + */ + async swarmInspectRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/swarm`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SwarmFromJSON(jsonValue)); + } + + /** + * Inspect swarm + */ + async swarmInspect(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.swarmInspectRaw(initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Join an existing swarm + */ + async swarmJoinRaw(requestParameters: SwarmJoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling swarmJoin().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters["Content-Type"] = "application/json"; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request( - { - path: `/swarm/init`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SwarmInitRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); + headerParameters['Content-Type'] = 'application/json'; - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; + const response = await this.request({ + path: `/swarm/join`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SwarmJoinRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - } - - /** - * Initialize a new swarm - */ - async swarmInit( - requestParameters: SwarmInitOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.swarmInitRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Inspect swarm - */ - async swarmInspectRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/swarm`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SwarmFromJSON(jsonValue)); - } - - /** - * Inspect swarm - */ - async swarmInspect(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.swarmInspectRaw(initOverrides); - return await response.value(); - } - - /** - * Join an existing swarm - */ - async swarmJoinRaw( - requestParameters: SwarmJoinOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling swarmJoin().', - ); + + /** + * Join an existing swarm + */ + async swarmJoin(requestParameters: SwarmJoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.swarmJoinRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/swarm/join`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SwarmJoinRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Join an existing swarm - */ - async swarmJoin( - requestParameters: SwarmJoinOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.swarmJoinRaw(requestParameters, initOverrides); - } - - /** - * Leave a swarm - */ - async swarmLeaveRaw( - requestParameters: SwarmLeaveRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + /** + * Leave a swarm + */ + async swarmLeaveRaw(requestParameters: SwarmLeaveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/swarm/leave`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/swarm/leave`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Leave a swarm - */ - async swarmLeave( - requestParameters: SwarmLeaveRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.swarmLeaveRaw(requestParameters, initOverrides); - } - - /** - * Unlock a locked manager - */ - async swarmUnlockRaw( - requestParameters: SwarmUnlockOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling swarmUnlock().', - ); + /** + * Leave a swarm + */ + async swarmLeave(requestParameters: SwarmLeaveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.swarmLeaveRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/swarm/unlock`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SwarmUnlockRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Unlock a locked manager - */ - async swarmUnlock( - requestParameters: SwarmUnlockOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.swarmUnlockRaw(requestParameters, initOverrides); - } - - /** - * Get the unlock key - */ - async swarmUnlockkeyRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/swarm/unlockkey`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - UnlockKeyResponseFromJSON(jsonValue), - ); - } - - /** - * Get the unlock key - */ - async swarmUnlockkey( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.swarmUnlockkeyRaw(initOverrides); - return await response.value(); - } - - /** - * Update a swarm - */ - async swarmUpdateRaw( - requestParameters: SwarmUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling swarmUpdate().', - ); + /** + * Unlock a locked manager + */ + async swarmUnlockRaw(requestParameters: SwarmUnlockOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling swarmUnlock().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/swarm/unlock`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SwarmUnlockRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling swarmUpdate().', - ); + /** + * Unlock a locked manager + */ + async swarmUnlock(requestParameters: SwarmUnlockOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.swarmUnlockRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; + /** + * Get the unlock key + */ + async swarmUnlockkeyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/swarm/unlockkey`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; + return new runtime.JSONApiResponse(response, (jsonValue) => UnlockKeyResponseFromJSON(jsonValue)); } - if (requestParameters["rotateWorkerToken"] != null) { - queryParameters["rotateWorkerToken"] = requestParameters["rotateWorkerToken"]; + /** + * Get the unlock key + */ + async swarmUnlockkey(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.swarmUnlockkeyRaw(initOverrides); + return await response.value(); } - if (requestParameters["rotateManagerToken"] != null) { - queryParameters["rotateManagerToken"] = requestParameters["rotateManagerToken"]; + /** + * Update a swarm + */ + async swarmUpdateRaw(requestParameters: SwarmUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling swarmUpdate().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling swarmUpdate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + if (requestParameters['rotateWorkerToken'] != null) { + queryParameters['rotateWorkerToken'] = requestParameters['rotateWorkerToken']; + } + + if (requestParameters['rotateManagerToken'] != null) { + queryParameters['rotateManagerToken'] = requestParameters['rotateManagerToken']; + } + + if (requestParameters['rotateManagerUnlockKey'] != null) { + queryParameters['rotateManagerUnlockKey'] = requestParameters['rotateManagerUnlockKey']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/swarm/update`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SwarmSpecToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["rotateManagerUnlockKey"] != null) { - queryParameters["rotateManagerUnlockKey"] = requestParameters["rotateManagerUnlockKey"]; + /** + * Update a swarm + */ + async swarmUpdate(requestParameters: SwarmUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.swarmUpdateRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/swarm/update`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SwarmSpecToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Update a swarm - */ - async swarmUpdate( - requestParameters: SwarmUpdateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.swarmUpdateRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/SystemApi.ts b/src/clients/docker/apis/SystemApi.ts index 1eeb636b9f..e3a3a5d920 100644 --- a/src/clients/docker/apis/SystemApi.ts +++ b/src/clients/docker/apis/SystemApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { AuthConfig, ErrorResponse, @@ -21,333 +22,278 @@ import type { SystemDataUsageResponse, SystemInfo, SystemVersion, -} from "../models/index"; +} from '../models/index'; import { - AuthConfigFromJSON, - AuthConfigToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - EventMessageFromJSON, - EventMessageToJSON, - SystemAuthResponseFromJSON, - SystemAuthResponseToJSON, - SystemDataUsageResponseFromJSON, - SystemDataUsageResponseToJSON, - SystemInfoFromJSON, - SystemInfoToJSON, - SystemVersionFromJSON, - SystemVersionToJSON, -} from "../models/index"; + AuthConfigFromJSON, + AuthConfigToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + EventMessageFromJSON, + EventMessageToJSON, + SystemAuthResponseFromJSON, + SystemAuthResponseToJSON, + SystemDataUsageResponseFromJSON, + SystemDataUsageResponseToJSON, + SystemInfoFromJSON, + SystemInfoToJSON, + SystemVersionFromJSON, + SystemVersionToJSON, +} from '../models/index'; export interface SystemAuthRequest { - authConfig?: AuthConfig; + authConfig?: AuthConfig; } export interface SystemDataUsageRequest { - type?: Array; + type?: Array; } export interface SystemEventsRequest { - since?: string; - until?: string; - filters?: string; + since?: string; + until?: string; + filters?: string; } /** - * + * */ export class SystemApi extends runtime.BaseAPI { - /** - * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - * Check auth configuration - */ - async systemAuthRaw( - requestParameters: SystemAuthRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/auth`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AuthConfigToJSON(requestParameters["authConfig"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SystemAuthResponseFromJSON(jsonValue), - ); - } - - /** - * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - * Check auth configuration - */ - async systemAuth( - requestParameters: SystemAuthRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.systemAuthRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: + + /** + * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. + * Check auth configuration + */ + async systemAuthRaw(requestParameters: SystemAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/auth`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AuthConfigToJSON(requestParameters['authConfig']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemAuthResponseFromJSON(jsonValue)); + } + + /** + * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. + * Check auth configuration + */ + async systemAuth(requestParameters: SystemAuthRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemAuthRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: + return await response.value(); + case 204: + return null; + default: + return await response.value(); + } + } + + /** + * Get data usage information + */ + async systemDataUsageRaw(requestParameters: SystemDataUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['type'] != null) { + queryParameters['type'] = requestParameters['type']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/system/df`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemDataUsageResponseFromJSON(jsonValue)); + } + + /** + * Get data usage information + */ + async systemDataUsage(requestParameters: SystemDataUsageRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemDataUsageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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 + * Monitor events + */ + async systemEventsRaw(requestParameters: SystemEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['since'] != null) { + queryParameters['since'] = requestParameters['since']; + } + + if (requestParameters['until'] != null) { + queryParameters['until'] = requestParameters['until']; + } + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/events`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMessageFromJSON(jsonValue)); + } + + /** + * 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 + * Monitor events + */ + async systemEvents(requestParameters: SystemEventsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemEventsRaw(requestParameters, initOverrides); return await response.value(); - case 204: - return null; - default: + } + + /** + * Get system information + */ + async systemInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/info`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue)); + } + + /** + * Get system information + */ + async systemInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemInfoRaw(initOverrides); return await response.value(); } - } - - /** - * Get data usage information - */ - async systemDataUsageRaw( - requestParameters: SystemDataUsageRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["type"] != null) { - queryParameters["type"] = requestParameters["type"]; + + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPingRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/_ping`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/system/df`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SystemDataUsageResponseFromJSON(jsonValue), - ); - } - - /** - * Get data usage information - */ - async systemDataUsage( - requestParameters: SystemDataUsageRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.systemDataUsageRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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 - * Monitor events - */ - async systemEventsRaw( - requestParameters: SystemEventsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["since"] != null) { - queryParameters["since"] = requestParameters["since"]; + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPing(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemPingRaw(initOverrides); + return await response.value(); } - if (requestParameters["until"] != null) { - queryParameters["until"] = requestParameters["until"]; + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPingHeadRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/_ping`, + method: 'HEAD', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } } - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPingHead(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemPingHeadRaw(initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/events`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => EventMessageFromJSON(jsonValue)); - } - - /** - * 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 - * Monitor events - */ - async systemEvents( - requestParameters: SystemEventsRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.systemEventsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get system information - */ - async systemInfoRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/info`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue)); - } - - /** - * Get system information - */ - async systemInfo( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.systemInfoRaw(initOverrides); - return await response.value(); - } - - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPingRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/_ping`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; + /** + * Returns the version of Docker that is running and various information about the system that Docker is running on. + * Get version + */ + async systemVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/version`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemVersionFromJSON(jsonValue)); } - } - - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPing(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemPingRaw(initOverrides); - return await response.value(); - } - - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPingHeadRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/_ping`, - method: "HEAD", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; + + /** + * Returns the version of Docker that is running and various information about the system that Docker is running on. + * Get version + */ + async systemVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemVersionRaw(initOverrides); + return await response.value(); } - } - - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPingHead( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.systemPingHeadRaw(initOverrides); - return await response.value(); - } - - /** - * Returns the version of Docker that is running and various information about the system that Docker is running on. - * Get version - */ - async systemVersionRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/version`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SystemVersionFromJSON(jsonValue)); - } - - /** - * Returns the version of Docker that is running and various information about the system that Docker is running on. - * Get version - */ - async systemVersion( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.systemVersionRaw(initOverrides); - return await response.value(); - } + } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum SystemDataUsageTypeEnum { - Container = "container", - Image = "image", - Volume = "volume", - BuildCache = "build-cache", + Container = 'container', + Image = 'image', + Volume = 'volume', + BuildCache = 'build-cache' } diff --git a/src/clients/docker/apis/TaskApi.ts b/src/clients/docker/apis/TaskApi.ts index 9b13677a83..8913112fe1 100644 --- a/src/clients/docker/apis/TaskApi.ts +++ b/src/clients/docker/apis/TaskApi.ts @@ -2,204 +2,177 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorResponse, Task } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorResponse, + Task, +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - TaskFromJSON, - TaskToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + TaskFromJSON, + TaskToJSON, +} from '../models/index'; export interface TaskInspectRequest { - id: string; + id: string; } export interface TaskListRequest { - filters?: string; + filters?: string; } export interface TaskLogsRequest { - id: string; - details?: boolean; - follow?: boolean; - stdout?: boolean; - stderr?: boolean; - since?: number; - timestamps?: boolean; - tail?: string; + id: string; + details?: boolean; + follow?: boolean; + stdout?: boolean; + stderr?: boolean; + since?: number; + timestamps?: boolean; + tail?: string; } /** - * + * */ export class TaskApi extends runtime.BaseAPI { - /** - * Inspect a task - */ - async taskInspectRaw( - requestParameters: TaskInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling taskInspect().', - ); - } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/tasks/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => TaskFromJSON(jsonValue)); - } - - /** - * Inspect a task - */ - async taskInspect( - requestParameters: TaskInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.taskInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List tasks - */ - async taskListRaw( - requestParameters: TaskListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Inspect a task + */ + async taskInspectRaw(requestParameters: TaskInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling taskInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tasks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TaskFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/tasks`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TaskFromJSON)); - } - - /** - * List tasks - */ - async taskList( - requestParameters: TaskListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.taskListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Get task logs - */ - async taskLogsRaw( - requestParameters: TaskLogsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling taskLogs().', - ); + /** + * Inspect a task + */ + async taskInspect(requestParameters: TaskInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.taskInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * List tasks + */ + async taskListRaw(requestParameters: TaskListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; - if (requestParameters["details"] != null) { - queryParameters["details"] = requestParameters["details"]; - } + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } - if (requestParameters["follow"] != null) { - queryParameters["follow"] = requestParameters["follow"]; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters["stdout"] != null) { - queryParameters["stdout"] = requestParameters["stdout"]; - } + const response = await this.request({ + path: `/tasks`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - if (requestParameters["stderr"] != null) { - queryParameters["stderr"] = requestParameters["stderr"]; + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TaskFromJSON)); } - if (requestParameters["since"] != null) { - queryParameters["since"] = requestParameters["since"]; + /** + * List tasks + */ + async taskList(requestParameters: TaskListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.taskListRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["timestamps"] != null) { - queryParameters["timestamps"] = requestParameters["timestamps"]; + /** + * 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. + * Get task logs + */ + async taskLogsRaw(requestParameters: TaskLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling taskLogs().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['details'] != null) { + queryParameters['details'] = requestParameters['details']; + } + + if (requestParameters['follow'] != null) { + queryParameters['follow'] = requestParameters['follow']; + } + + if (requestParameters['stdout'] != null) { + queryParameters['stdout'] = requestParameters['stdout']; + } + + if (requestParameters['stderr'] != null) { + queryParameters['stderr'] = requestParameters['stderr']; + } + + if (requestParameters['since'] != null) { + queryParameters['since'] = requestParameters['since']; + } + + if (requestParameters['timestamps'] != null) { + queryParameters['timestamps'] = requestParameters['timestamps']; + } + + if (requestParameters['tail'] != null) { + queryParameters['tail'] = requestParameters['tail']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/tasks/{id}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); } - if (requestParameters["tail"] != null) { - queryParameters["tail"] = requestParameters["tail"]; + /** + * 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. + * Get task logs + */ + async taskLogs(requestParameters: TaskLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.taskLogsRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/tasks/{id}/logs`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.BlobApiResponse(response); - } - - /** - * 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. - * Get task logs - */ - async taskLogs( - requestParameters: TaskLogsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.taskLogsRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/docker/apis/VolumeApi.ts b/src/clients/docker/apis/VolumeApi.ts index beb28d3fcd..fa435cb5b0 100644 --- a/src/clients/docker/apis/VolumeApi.ts +++ b/src/clients/docker/apis/VolumeApi.ts @@ -2,17 +2,18 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorResponse, Volume, @@ -20,330 +21,265 @@ import type { VolumeListResponse, VolumePruneResponse, VolumeUpdateRequest, -} from "../models/index"; +} from '../models/index'; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - VolumeFromJSON, - VolumeToJSON, - VolumeCreateOptionsFromJSON, - VolumeCreateOptionsToJSON, - VolumeListResponseFromJSON, - VolumeListResponseToJSON, - VolumePruneResponseFromJSON, - VolumePruneResponseToJSON, - VolumeUpdateRequestFromJSON, - VolumeUpdateRequestToJSON, -} from "../models/index"; + ErrorResponseFromJSON, + ErrorResponseToJSON, + VolumeFromJSON, + VolumeToJSON, + VolumeCreateOptionsFromJSON, + VolumeCreateOptionsToJSON, + VolumeListResponseFromJSON, + VolumeListResponseToJSON, + VolumePruneResponseFromJSON, + VolumePruneResponseToJSON, + VolumeUpdateRequestFromJSON, + VolumeUpdateRequestToJSON, +} from '../models/index'; export interface VolumeCreateRequest { - volumeConfig: VolumeCreateOptions; + volumeConfig: VolumeCreateOptions; } export interface VolumeDeleteRequest { - name: string; - force?: boolean; + name: string; + force?: boolean; } export interface VolumeInspectRequest { - name: string; + name: string; } export interface VolumeListRequest { - filters?: string; + filters?: string; } export interface VolumePruneRequest { - filters?: string; + filters?: string; } export interface VolumeUpdateOperationRequest { - name: string; - version: number; - body?: VolumeUpdateRequest; + name: string; + version: number; + body?: VolumeUpdateRequest; } /** - * + * */ export class VolumeApi extends runtime.BaseAPI { - /** - * Create a volume - */ - async volumeCreateRaw( - requestParameters: VolumeCreateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["volumeConfig"] == null) { - throw new runtime.RequiredError( - "volumeConfig", - 'Required parameter "volumeConfig" was null or undefined when calling volumeCreate().', - ); + + /** + * Create a volume + */ + async volumeCreateRaw(requestParameters: VolumeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['volumeConfig'] == null) { + throw new runtime.RequiredError( + 'volumeConfig', + 'Required parameter "volumeConfig" was null or undefined when calling volumeCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/volumes/create`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: VolumeCreateOptionsToJSON(requestParameters['volumeConfig']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/volumes/create`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: VolumeCreateOptionsToJSON(requestParameters["volumeConfig"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); - } - - /** - * Create a volume - */ - async volumeCreate( - requestParameters: VolumeCreateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.volumeCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Instruct the driver to remove the volume. - * Remove a volume - */ - async volumeDeleteRaw( - requestParameters: VolumeDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling volumeDelete().', - ); + /** + * Create a volume + */ + async volumeCreate(requestParameters: VolumeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.volumeCreateRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Instruct the driver to remove the volume. + * Remove a volume + */ + async volumeDeleteRaw(requestParameters: VolumeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling volumeDelete().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/volumes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + /** + * Instruct the driver to remove the volume. + * Remove a volume + */ + async volumeDelete(requestParameters: VolumeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.volumeDeleteRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/volumes/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Instruct the driver to remove the volume. - * Remove a volume - */ - async volumeDelete( - requestParameters: VolumeDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.volumeDeleteRaw(requestParameters, initOverrides); - } - - /** - * Inspect a volume - */ - async volumeInspectRaw( - requestParameters: VolumeInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling volumeInspect().', - ); + /** + * Inspect a volume + */ + async volumeInspectRaw(requestParameters: VolumeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling volumeInspect().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/volumes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/volumes/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); - } - - /** - * Inspect a volume - */ - async volumeInspect( - requestParameters: VolumeInspectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.volumeInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List volumes - */ - async volumeListRaw( - requestParameters: VolumeListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * Inspect a volume + */ + async volumeInspect(requestParameters: VolumeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.volumeInspectRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/volumes`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - VolumeListResponseFromJSON(jsonValue), - ); - } - - /** - * List volumes - */ - async volumeList( - requestParameters: VolumeListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.volumeListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete unused volumes - */ - async volumePruneRaw( - requestParameters: VolumePruneRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["filters"] != null) { - queryParameters["filters"] = requestParameters["filters"]; + /** + * List volumes + */ + async volumeListRaw(requestParameters: VolumeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/volumes`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VolumeListResponseFromJSON(jsonValue)); + } + + /** + * List volumes + */ + async volumeList(requestParameters: VolumeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.volumeListRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/volumes/prune`, - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - VolumePruneResponseFromJSON(jsonValue), - ); - } - - /** - * Delete unused volumes - */ - async volumePrune( - requestParameters: VolumePruneRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.volumePruneRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * \"Update a volume. Valid only for Swarm cluster volumes\" - */ - async volumeUpdateRaw( - requestParameters: VolumeUpdateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling volumeUpdate().', - ); + /** + * Delete unused volumes + */ + async volumePruneRaw(requestParameters: VolumePruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['filters'] != null) { + queryParameters['filters'] = requestParameters['filters']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/volumes/prune`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VolumePruneResponseFromJSON(jsonValue)); } - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling volumeUpdate().', - ); + /** + * Delete unused volumes + */ + async volumePrune(requestParameters: VolumePruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.volumePruneRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * \"Update a volume. Valid only for Swarm cluster volumes\" + */ + async volumeUpdateRaw(requestParameters: VolumeUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling volumeUpdate().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling volumeUpdate().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['version'] != null) { + queryParameters['version'] = requestParameters['version']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/volumes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: VolumeUpdateRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } - if (requestParameters["version"] != null) { - queryParameters["version"] = requestParameters["version"]; + /** + * \"Update a volume. Valid only for Swarm cluster volumes\" + */ + async volumeUpdate(requestParameters: VolumeUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.volumeUpdateRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/volumes/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: VolumeUpdateRequestToJSON(requestParameters["body"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * \"Update a volume. Valid only for Swarm cluster volumes\" - */ - async volumeUpdate( - requestParameters: VolumeUpdateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.volumeUpdateRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/docker/apis/index.ts b/src/clients/docker/apis/index.ts index cb57d30132..67720eb7d9 100644 --- a/src/clients/docker/apis/index.ts +++ b/src/clients/docker/apis/index.ts @@ -1,17 +1,17 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ConfigApi"; -export * from "./ContainerApi"; -export * from "./DistributionApi"; -export * from "./ExecApi"; -export * from "./ImageApi"; -export * from "./NetworkApi"; -export * from "./NodeApi"; -export * from "./PluginApi"; -export * from "./SecretApi"; -export * from "./ServiceApi"; -export * from "./SessionApi"; -export * from "./SwarmApi"; -export * from "./SystemApi"; -export * from "./TaskApi"; -export * from "./VolumeApi"; +export * from './ConfigApi'; +export * from './ContainerApi'; +export * from './DistributionApi'; +export * from './ExecApi'; +export * from './ImageApi'; +export * from './NetworkApi'; +export * from './NodeApi'; +export * from './PluginApi'; +export * from './SecretApi'; +export * from './ServiceApi'; +export * from './SessionApi'; +export * from './SwarmApi'; +export * from './SystemApi'; +export * from './TaskApi'; +export * from './VolumeApi'; diff --git a/src/clients/docker/index.ts b/src/clients/docker/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/docker/index.ts +++ b/src/clients/docker/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/docker/models/Address.ts b/src/clients/docker/models/Address.ts index 170850a1fe..4ffa85e032 100644 --- a/src/clients/docker/models/Address.ts +++ b/src/clients/docker/models/Address.ts @@ -2,72 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Address represents an IPv4 or IPv6 IP address. * @export * @interface Address */ export interface Address { - /** - * IP address. - * @type {string} - * @memberof Address - */ - Addr?: string; - /** - * Mask length of the IP address. - * @type {number} - * @memberof Address - */ - PrefixLen?: number; + /** + * IP address. + * @type {string} + * @memberof Address + */ + Addr?: string; + /** + * Mask length of the IP address. + * @type {number} + * @memberof Address + */ + PrefixLen?: number; } /** * Check if a given object implements the Address interface. */ export function instanceOfAddress(value: object): value is Address { - return true; + return true; } export function AddressFromJSON(json: any): Address { - return AddressFromJSONTyped(json, false); + return AddressFromJSONTyped(json, false); } export function AddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): Address { - if (json == null) { - return json; - } - return { - Addr: json["Addr"] == null ? undefined : json["Addr"], - PrefixLen: json["PrefixLen"] == null ? undefined : json["PrefixLen"], - }; + if (json == null) { + return json; + } + return { + + 'Addr': json['Addr'] == null ? undefined : json['Addr'], + 'PrefixLen': json['PrefixLen'] == null ? undefined : json['PrefixLen'], + }; } export function AddressToJSON(json: any): Address { - return AddressToJSONTyped(json, false); + return AddressToJSONTyped(json, false); } -export function AddressToJSONTyped( - value?: Address | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AddressToJSONTyped(value?: Address | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Addr: value["Addr"], - PrefixLen: value["PrefixLen"], - }; + return { + + 'Addr': value['Addr'], + 'PrefixLen': value['PrefixLen'], + }; } + diff --git a/src/clients/docker/models/AuthConfig.ts b/src/clients/docker/models/AuthConfig.ts index 28fc24ecfb..16293a24d9 100644 --- a/src/clients/docker/models/AuthConfig.ts +++ b/src/clients/docker/models/AuthConfig.ts @@ -2,88 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface AuthConfig */ export interface AuthConfig { - /** - * - * @type {string} - * @memberof AuthConfig - */ - username?: string; - /** - * - * @type {string} - * @memberof AuthConfig - */ - password?: string; - /** - * - * @type {string} - * @memberof AuthConfig - */ - email?: string; - /** - * - * @type {string} - * @memberof AuthConfig - */ - serveraddress?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + username?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + password?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + email?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + serveraddress?: string; } /** * Check if a given object implements the AuthConfig interface. */ export function instanceOfAuthConfig(value: object): value is AuthConfig { - return true; + return true; } export function AuthConfigFromJSON(json: any): AuthConfig { - return AuthConfigFromJSONTyped(json, false); + return AuthConfigFromJSONTyped(json, false); } export function AuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthConfig { - if (json == null) { - return json; - } - return { - username: json["username"] == null ? undefined : json["username"], - password: json["password"] == null ? undefined : json["password"], - email: json["email"] == null ? undefined : json["email"], - serveraddress: json["serveraddress"] == null ? undefined : json["serveraddress"], - }; + if (json == null) { + return json; + } + return { + + 'username': json['username'] == null ? undefined : json['username'], + 'password': json['password'] == null ? undefined : json['password'], + 'email': json['email'] == null ? undefined : json['email'], + 'serveraddress': json['serveraddress'] == null ? undefined : json['serveraddress'], + }; } export function AuthConfigToJSON(json: any): AuthConfig { - return AuthConfigToJSONTyped(json, false); + return AuthConfigToJSONTyped(json, false); } -export function AuthConfigToJSONTyped( - value?: AuthConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AuthConfigToJSONTyped(value?: AuthConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - username: value["username"], - password: value["password"], - email: value["email"], - serveraddress: value["serveraddress"], - }; + return { + + 'username': value['username'], + 'password': value['password'], + 'email': value['email'], + 'serveraddress': value['serveraddress'], + }; } + diff --git a/src/clients/docker/models/BuildCache.ts b/src/clients/docker/models/BuildCache.ts index 6161546fde..a0201bba0b 100644 --- a/src/clients/docker/models/BuildCache.ts +++ b/src/clients/docker/models/BuildCache.ts @@ -2,172 +2,173 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * BuildCache contains information about a build cache record. - * + * * @export * @interface BuildCache */ export interface BuildCache { - /** - * Unique ID of the build cache record. - * - * @type {string} - * @memberof BuildCache - */ - ID?: string; - /** - * ID of the parent build cache record. - * - * > **Deprecated**: This field is deprecated, and omitted if empty. - * - * @type {string} - * @memberof BuildCache - */ - Parent?: string | null; - /** - * List of parent build cache record IDs. - * - * @type {Array} - * @memberof BuildCache - */ - Parents?: Array | null; - /** - * Cache record type. - * - * @type {string} - * @memberof BuildCache - */ - Type?: BuildCacheTypeEnum; - /** - * Description of the build-step that produced the build cache. - * - * @type {string} - * @memberof BuildCache - */ - Description?: string; - /** - * Indicates if the build cache is in use. - * - * @type {boolean} - * @memberof BuildCache - */ - InUse?: boolean; - /** - * Indicates if the build cache is shared. - * - * @type {boolean} - * @memberof BuildCache - */ - Shared?: boolean; - /** - * Amount of disk space used by the build cache (in bytes). - * - * @type {number} - * @memberof BuildCache - */ - Size?: number; - /** - * Date and time at which the build cache was created in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof BuildCache - */ - CreatedAt?: string; - /** - * Date and time at which the build cache was last used in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof BuildCache - */ - LastUsedAt?: string | null; - /** - * - * @type {number} - * @memberof BuildCache - */ - UsageCount?: number; + /** + * Unique ID of the build cache record. + * + * @type {string} + * @memberof BuildCache + */ + ID?: string; + /** + * ID of the parent build cache record. + * + * > **Deprecated**: This field is deprecated, and omitted if empty. + * + * @type {string} + * @memberof BuildCache + */ + Parent?: string | null; + /** + * List of parent build cache record IDs. + * + * @type {Array} + * @memberof BuildCache + */ + Parents?: Array | null; + /** + * Cache record type. + * + * @type {string} + * @memberof BuildCache + */ + Type?: BuildCacheTypeEnum; + /** + * Description of the build-step that produced the build cache. + * + * @type {string} + * @memberof BuildCache + */ + Description?: string; + /** + * Indicates if the build cache is in use. + * + * @type {boolean} + * @memberof BuildCache + */ + InUse?: boolean; + /** + * Indicates if the build cache is shared. + * + * @type {boolean} + * @memberof BuildCache + */ + Shared?: boolean; + /** + * Amount of disk space used by the build cache (in bytes). + * + * @type {number} + * @memberof BuildCache + */ + Size?: number; + /** + * Date and time at which the build cache was created in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof BuildCache + */ + CreatedAt?: string; + /** + * Date and time at which the build cache was last used in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof BuildCache + */ + LastUsedAt?: string | null; + /** + * + * @type {number} + * @memberof BuildCache + */ + UsageCount?: number; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum BuildCacheTypeEnum { - Internal = "internal", - Frontend = "frontend", - SourceLocal = "source.local", - SourceGitCheckout = "source.git.checkout", - ExecCachemount = "exec.cachemount", - Regular = "regular", + Internal = 'internal', + Frontend = 'frontend', + SourceLocal = 'source.local', + SourceGitCheckout = 'source.git.checkout', + ExecCachemount = 'exec.cachemount', + Regular = 'regular' } + /** * Check if a given object implements the BuildCache interface. */ export function instanceOfBuildCache(value: object): value is BuildCache { - return true; + return true; } export function BuildCacheFromJSON(json: any): BuildCache { - return BuildCacheFromJSONTyped(json, false); + return BuildCacheFromJSONTyped(json, false); } export function BuildCacheFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildCache { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Parent: json["Parent"] == null ? undefined : json["Parent"], - Parents: json["Parents"] == null ? undefined : json["Parents"], - Type: json["Type"] == null ? undefined : json["Type"], - Description: json["Description"] == null ? undefined : json["Description"], - InUse: json["InUse"] == null ? undefined : json["InUse"], - Shared: json["Shared"] == null ? undefined : json["Shared"], - Size: json["Size"] == null ? undefined : json["Size"], - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - LastUsedAt: json["LastUsedAt"] == null ? undefined : json["LastUsedAt"], - UsageCount: json["UsageCount"] == null ? undefined : json["UsageCount"], - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Parent': json['Parent'] == null ? undefined : json['Parent'], + 'Parents': json['Parents'] == null ? undefined : json['Parents'], + 'Type': json['Type'] == null ? undefined : json['Type'], + 'Description': json['Description'] == null ? undefined : json['Description'], + 'InUse': json['InUse'] == null ? undefined : json['InUse'], + 'Shared': json['Shared'] == null ? undefined : json['Shared'], + 'Size': json['Size'] == null ? undefined : json['Size'], + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'LastUsedAt': json['LastUsedAt'] == null ? undefined : json['LastUsedAt'], + 'UsageCount': json['UsageCount'] == null ? undefined : json['UsageCount'], + }; } export function BuildCacheToJSON(json: any): BuildCache { - return BuildCacheToJSONTyped(json, false); + return BuildCacheToJSONTyped(json, false); } -export function BuildCacheToJSONTyped( - value?: BuildCache | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BuildCacheToJSONTyped(value?: BuildCache | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Parent: value["Parent"], - Parents: value["Parents"], - Type: value["Type"], - Description: value["Description"], - InUse: value["InUse"], - Shared: value["Shared"], - Size: value["Size"], - CreatedAt: value["CreatedAt"], - LastUsedAt: value["LastUsedAt"], - UsageCount: value["UsageCount"], - }; + return { + + 'ID': value['ID'], + 'Parent': value['Parent'], + 'Parents': value['Parents'], + 'Type': value['Type'], + 'Description': value['Description'], + 'InUse': value['InUse'], + 'Shared': value['Shared'], + 'Size': value['Size'], + 'CreatedAt': value['CreatedAt'], + 'LastUsedAt': value['LastUsedAt'], + 'UsageCount': value['UsageCount'], + }; } + diff --git a/src/clients/docker/models/BuildInfo.ts b/src/clients/docker/models/BuildInfo.ts index 19fbbea8b2..6ca3e312c0 100644 --- a/src/clients/docker/models/BuildInfo.ts +++ b/src/clients/docker/models/BuildInfo.ts @@ -2,143 +2,142 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorDetail } from "./ErrorDetail"; +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; import { - ErrorDetailFromJSON, - ErrorDetailFromJSONTyped, - ErrorDetailToJSON, - ErrorDetailToJSONTyped, -} from "./ErrorDetail"; -import type { ProgressDetail } from "./ProgressDetail"; + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ProgressDetail } from './ProgressDetail'; import { - ProgressDetailFromJSON, - ProgressDetailFromJSONTyped, - ProgressDetailToJSON, - ProgressDetailToJSONTyped, -} from "./ProgressDetail"; -import type { ImageID } from "./ImageID"; + ProgressDetailFromJSON, + ProgressDetailFromJSONTyped, + ProgressDetailToJSON, + ProgressDetailToJSONTyped, +} from './ProgressDetail'; +import type { ImageID } from './ImageID'; import { - ImageIDFromJSON, - ImageIDFromJSONTyped, - ImageIDToJSON, - ImageIDToJSONTyped, -} from "./ImageID"; + ImageIDFromJSON, + ImageIDFromJSONTyped, + ImageIDToJSON, + ImageIDToJSONTyped, +} from './ImageID'; /** - * + * * @export * @interface BuildInfo */ export interface BuildInfo { - /** - * - * @type {string} - * @memberof BuildInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof BuildInfo - */ - stream?: string; - /** - * - * @type {string} - * @memberof BuildInfo - */ - error?: string; - /** - * - * @type {ErrorDetail} - * @memberof BuildInfo - */ - errorDetail?: ErrorDetail; - /** - * - * @type {string} - * @memberof BuildInfo - */ - status?: string; - /** - * - * @type {string} - * @memberof BuildInfo - */ - progress?: string; - /** - * - * @type {ProgressDetail} - * @memberof BuildInfo - */ - progressDetail?: ProgressDetail; - /** - * - * @type {ImageID} - * @memberof BuildInfo - */ - aux?: ImageID; + /** + * + * @type {string} + * @memberof BuildInfo + */ + id?: string; + /** + * + * @type {string} + * @memberof BuildInfo + */ + stream?: string; + /** + * + * @type {string} + * @memberof BuildInfo + */ + error?: string; + /** + * + * @type {ErrorDetail} + * @memberof BuildInfo + */ + errorDetail?: ErrorDetail; + /** + * + * @type {string} + * @memberof BuildInfo + */ + status?: string; + /** + * + * @type {string} + * @memberof BuildInfo + */ + progress?: string; + /** + * + * @type {ProgressDetail} + * @memberof BuildInfo + */ + progressDetail?: ProgressDetail; + /** + * + * @type {ImageID} + * @memberof BuildInfo + */ + aux?: ImageID; } /** * Check if a given object implements the BuildInfo interface. */ export function instanceOfBuildInfo(value: object): value is BuildInfo { - return true; + return true; } export function BuildInfoFromJSON(json: any): BuildInfo { - return BuildInfoFromJSONTyped(json, false); + return BuildInfoFromJSONTyped(json, false); } export function BuildInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildInfo { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - stream: json["stream"] == null ? undefined : json["stream"], - error: json["error"] == null ? undefined : json["error"], - errorDetail: json["errorDetail"] == null ? undefined : ErrorDetailFromJSON(json["errorDetail"]), - status: json["status"] == null ? undefined : json["status"], - progress: json["progress"] == null ? undefined : json["progress"], - progressDetail: - json["progressDetail"] == null ? undefined : ProgressDetailFromJSON(json["progressDetail"]), - aux: json["aux"] == null ? undefined : ImageIDFromJSON(json["aux"]), - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'stream': json['stream'] == null ? undefined : json['stream'], + 'error': json['error'] == null ? undefined : json['error'], + 'errorDetail': json['errorDetail'] == null ? undefined : ErrorDetailFromJSON(json['errorDetail']), + 'status': json['status'] == null ? undefined : json['status'], + 'progress': json['progress'] == null ? undefined : json['progress'], + 'progressDetail': json['progressDetail'] == null ? undefined : ProgressDetailFromJSON(json['progressDetail']), + 'aux': json['aux'] == null ? undefined : ImageIDFromJSON(json['aux']), + }; } export function BuildInfoToJSON(json: any): BuildInfo { - return BuildInfoToJSONTyped(json, false); + return BuildInfoToJSONTyped(json, false); } -export function BuildInfoToJSONTyped( - value?: BuildInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BuildInfoToJSONTyped(value?: BuildInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - stream: value["stream"], - error: value["error"], - errorDetail: ErrorDetailToJSON(value["errorDetail"]), - status: value["status"], - progress: value["progress"], - progressDetail: ProgressDetailToJSON(value["progressDetail"]), - aux: ImageIDToJSON(value["aux"]), - }; + return { + + 'id': value['id'], + 'stream': value['stream'], + 'error': value['error'], + 'errorDetail': ErrorDetailToJSON(value['errorDetail']), + 'status': value['status'], + 'progress': value['progress'], + 'progressDetail': ProgressDetailToJSON(value['progressDetail']), + 'aux': ImageIDToJSON(value['aux']), + }; } + diff --git a/src/clients/docker/models/BuildPruneResponse.ts b/src/clients/docker/models/BuildPruneResponse.ts index 4421d06b96..9d95560492 100644 --- a/src/clients/docker/models/BuildPruneResponse.ts +++ b/src/clients/docker/models/BuildPruneResponse.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface BuildPruneResponse */ export interface BuildPruneResponse { - /** - * - * @type {Array} - * @memberof BuildPruneResponse - */ - CachesDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof BuildPruneResponse - */ - SpaceReclaimed?: number; + /** + * + * @type {Array} + * @memberof BuildPruneResponse + */ + CachesDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof BuildPruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the BuildPruneResponse interface. */ export function instanceOfBuildPruneResponse(value: object): value is BuildPruneResponse { - return true; + return true; } export function BuildPruneResponseFromJSON(json: any): BuildPruneResponse { - return BuildPruneResponseFromJSONTyped(json, false); + return BuildPruneResponseFromJSONTyped(json, false); } -export function BuildPruneResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BuildPruneResponse { - if (json == null) { - return json; - } - return { - CachesDeleted: json["CachesDeleted"] == null ? undefined : json["CachesDeleted"], - SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], - }; +export function BuildPruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildPruneResponse { + if (json == null) { + return json; + } + return { + + 'CachesDeleted': json['CachesDeleted'] == null ? undefined : json['CachesDeleted'], + 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], + }; } export function BuildPruneResponseToJSON(json: any): BuildPruneResponse { - return BuildPruneResponseToJSONTyped(json, false); + return BuildPruneResponseToJSONTyped(json, false); } -export function BuildPruneResponseToJSONTyped( - value?: BuildPruneResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BuildPruneResponseToJSONTyped(value?: BuildPruneResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CachesDeleted: value["CachesDeleted"], - SpaceReclaimed: value["SpaceReclaimed"], - }; + return { + + 'CachesDeleted': value['CachesDeleted'], + 'SpaceReclaimed': value['SpaceReclaimed'], + }; } + diff --git a/src/clients/docker/models/ChangeType.ts b/src/clients/docker/models/ChangeType.ts index e1592bc86a..a0de3c0849 100644 --- a/src/clients/docker/models/ChangeType.ts +++ b/src/clients/docker/models/ChangeType.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,45 +14,47 @@ /** * Kind of change - * + * * Can be one of: - * + * * - `0`: Modified ("C") * - `1`: Added ("A") * - `2`: Deleted ("D") - * + * * @export * @enum {string} */ export enum ChangeType { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2, + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2 } + export function instanceOfChangeType(value: any): boolean { - for (const key in ChangeType) { - if (Object.prototype.hasOwnProperty.call(ChangeType, key)) { - if (ChangeType[key as keyof typeof ChangeType] === value) { - return true; - } + for (const key in ChangeType) { + if (Object.prototype.hasOwnProperty.call(ChangeType, key)) { + if (ChangeType[key as keyof typeof ChangeType] === value) { + return true; + } + } } - } - return false; + return false; } export function ChangeTypeFromJSON(json: any): ChangeType { - return ChangeTypeFromJSONTyped(json, false); + return ChangeTypeFromJSONTyped(json, false); } export function ChangeTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeType { - return json as ChangeType; + return json as ChangeType; } export function ChangeTypeToJSON(value?: ChangeType | null): any { - return value as any; + return value as any; } export function ChangeTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ChangeType { - return value as ChangeType; + return value as ChangeType; } + diff --git a/src/clients/docker/models/ClusterInfo.ts b/src/clients/docker/models/ClusterInfo.ts index 3d087ab8c4..ced9983b95 100644 --- a/src/clients/docker/models/ClusterInfo.ts +++ b/src/clients/docker/models/ClusterInfo.ts @@ -2,173 +2,172 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { TLSInfo } from "./TLSInfo"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { TLSInfo } from './TLSInfo'; import { - TLSInfoFromJSON, - TLSInfoFromJSONTyped, - TLSInfoToJSON, - TLSInfoToJSONTyped, -} from "./TLSInfo"; -import type { SwarmSpec } from "./SwarmSpec"; + TLSInfoFromJSON, + TLSInfoFromJSONTyped, + TLSInfoToJSON, + TLSInfoToJSONTyped, +} from './TLSInfo'; +import type { SwarmSpec } from './SwarmSpec'; import { - SwarmSpecFromJSON, - SwarmSpecFromJSONTyped, - SwarmSpecToJSON, - SwarmSpecToJSONTyped, -} from "./SwarmSpec"; + SwarmSpecFromJSON, + SwarmSpecFromJSONTyped, + SwarmSpecToJSON, + SwarmSpecToJSONTyped, +} from './SwarmSpec'; /** * ClusterInfo represents information about the swarm as is returned by the * "/info" endpoint. Join-tokens are not included. - * + * * @export * @interface ClusterInfo */ export interface ClusterInfo { - /** - * The ID of the swarm. - * @type {string} - * @memberof ClusterInfo - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof ClusterInfo - */ - Version?: ObjectVersion; - /** - * Date and time at which the swarm was initialised in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof ClusterInfo - */ - CreatedAt?: string; - /** - * Date and time at which the swarm was last updated in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof ClusterInfo - */ - UpdatedAt?: string; - /** - * - * @type {SwarmSpec} - * @memberof ClusterInfo - */ - Spec?: SwarmSpec; - /** - * - * @type {TLSInfo} - * @memberof ClusterInfo - */ - TLSInfo?: TLSInfo; - /** - * Whether there is currently a root CA rotation in progress for the swarm - * - * @type {boolean} - * @memberof ClusterInfo - */ - RootRotationInProgress?: boolean; - /** - * DataPathPort specifies the data path port number for data traffic. - * Acceptable port range is 1024 to 49151. - * If no port is set or is set to 0, the default port (4789) is used. - * - * @type {number} - * @memberof ClusterInfo - */ - DataPathPort?: number; - /** - * Default Address Pool specifies default subnet pools for global scope - * networks. - * - * @type {Array} - * @memberof ClusterInfo - */ - DefaultAddrPool?: Array; - /** - * SubnetSize specifies the subnet size of the networks created from the - * default subnet pool. - * - * @type {number} - * @memberof ClusterInfo - */ - SubnetSize?: number; + /** + * The ID of the swarm. + * @type {string} + * @memberof ClusterInfo + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof ClusterInfo + */ + Version?: ObjectVersion; + /** + * Date and time at which the swarm was initialised in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof ClusterInfo + */ + CreatedAt?: string; + /** + * Date and time at which the swarm was last updated in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof ClusterInfo + */ + UpdatedAt?: string; + /** + * + * @type {SwarmSpec} + * @memberof ClusterInfo + */ + Spec?: SwarmSpec; + /** + * + * @type {TLSInfo} + * @memberof ClusterInfo + */ + TLSInfo?: TLSInfo; + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @type {boolean} + * @memberof ClusterInfo + */ + RootRotationInProgress?: boolean; + /** + * DataPathPort specifies the data path port number for data traffic. + * Acceptable port range is 1024 to 49151. + * If no port is set or is set to 0, the default port (4789) is used. + * + * @type {number} + * @memberof ClusterInfo + */ + DataPathPort?: number; + /** + * Default Address Pool specifies default subnet pools for global scope + * networks. + * + * @type {Array} + * @memberof ClusterInfo + */ + DefaultAddrPool?: Array; + /** + * SubnetSize specifies the subnet size of the networks created from the + * default subnet pool. + * + * @type {number} + * @memberof ClusterInfo + */ + SubnetSize?: number; } /** * Check if a given object implements the ClusterInfo interface. */ export function instanceOfClusterInfo(value: object): value is ClusterInfo { - return true; + return true; } export function ClusterInfoFromJSON(json: any): ClusterInfo { - return ClusterInfoFromJSONTyped(json, false); + return ClusterInfoFromJSONTyped(json, false); } export function ClusterInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterInfo { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : SwarmSpecFromJSON(json["Spec"]), - TLSInfo: json["TLSInfo"] == null ? undefined : TLSInfoFromJSON(json["TLSInfo"]), - RootRotationInProgress: - json["RootRotationInProgress"] == null ? undefined : json["RootRotationInProgress"], - DataPathPort: json["DataPathPort"] == null ? undefined : json["DataPathPort"], - DefaultAddrPool: json["DefaultAddrPool"] == null ? undefined : json["DefaultAddrPool"], - SubnetSize: json["SubnetSize"] == null ? undefined : json["SubnetSize"], - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : SwarmSpecFromJSON(json['Spec']), + 'TLSInfo': json['TLSInfo'] == null ? undefined : TLSInfoFromJSON(json['TLSInfo']), + 'RootRotationInProgress': json['RootRotationInProgress'] == null ? undefined : json['RootRotationInProgress'], + 'DataPathPort': json['DataPathPort'] == null ? undefined : json['DataPathPort'], + 'DefaultAddrPool': json['DefaultAddrPool'] == null ? undefined : json['DefaultAddrPool'], + 'SubnetSize': json['SubnetSize'] == null ? undefined : json['SubnetSize'], + }; } export function ClusterInfoToJSON(json: any): ClusterInfo { - return ClusterInfoToJSONTyped(json, false); + return ClusterInfoToJSONTyped(json, false); } -export function ClusterInfoToJSONTyped( - value?: ClusterInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterInfoToJSONTyped(value?: ClusterInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: SwarmSpecToJSON(value["Spec"]), - TLSInfo: TLSInfoToJSON(value["TLSInfo"]), - RootRotationInProgress: value["RootRotationInProgress"], - DataPathPort: value["DataPathPort"], - DefaultAddrPool: value["DefaultAddrPool"], - SubnetSize: value["SubnetSize"], - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': SwarmSpecToJSON(value['Spec']), + 'TLSInfo': TLSInfoToJSON(value['TLSInfo']), + 'RootRotationInProgress': value['RootRotationInProgress'], + 'DataPathPort': value['DataPathPort'], + 'DefaultAddrPool': value['DefaultAddrPool'], + 'SubnetSize': value['SubnetSize'], + }; } + diff --git a/src/clients/docker/models/ClusterVolume.ts b/src/clients/docker/models/ClusterVolume.ts index b430e6c405..51c9e8e9ed 100644 --- a/src/clients/docker/models/ClusterVolume.ts +++ b/src/clients/docker/models/ClusterVolume.ts @@ -2,154 +2,148 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { ClusterVolumeSpec } from "./ClusterVolumeSpec"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { ClusterVolumeSpec } from './ClusterVolumeSpec'; import { - ClusterVolumeSpecFromJSON, - ClusterVolumeSpecFromJSONTyped, - ClusterVolumeSpecToJSON, - ClusterVolumeSpecToJSONTyped, -} from "./ClusterVolumeSpec"; -import type { ClusterVolumeInfo } from "./ClusterVolumeInfo"; + ClusterVolumeSpecFromJSON, + ClusterVolumeSpecFromJSONTyped, + ClusterVolumeSpecToJSON, + ClusterVolumeSpecToJSONTyped, +} from './ClusterVolumeSpec'; +import type { ClusterVolumeInfo } from './ClusterVolumeInfo'; import { - ClusterVolumeInfoFromJSON, - ClusterVolumeInfoFromJSONTyped, - ClusterVolumeInfoToJSON, - ClusterVolumeInfoToJSONTyped, -} from "./ClusterVolumeInfo"; -import type { ClusterVolumePublishStatusInner } from "./ClusterVolumePublishStatusInner"; + ClusterVolumeInfoFromJSON, + ClusterVolumeInfoFromJSONTyped, + ClusterVolumeInfoToJSON, + ClusterVolumeInfoToJSONTyped, +} from './ClusterVolumeInfo'; +import type { ClusterVolumePublishStatusInner } from './ClusterVolumePublishStatusInner'; import { - ClusterVolumePublishStatusInnerFromJSON, - ClusterVolumePublishStatusInnerFromJSONTyped, - ClusterVolumePublishStatusInnerToJSON, - ClusterVolumePublishStatusInnerToJSONTyped, -} from "./ClusterVolumePublishStatusInner"; + ClusterVolumePublishStatusInnerFromJSON, + ClusterVolumePublishStatusInnerFromJSONTyped, + ClusterVolumePublishStatusInnerToJSON, + ClusterVolumePublishStatusInnerToJSONTyped, +} from './ClusterVolumePublishStatusInner'; /** * Options and information specific to, and only present on, Swarm CSI * cluster volumes. - * + * * @export * @interface ClusterVolume */ export interface ClusterVolume { - /** - * The Swarm ID of this volume. Because cluster volumes are Swarm - * objects, they have an ID, unlike non-cluster volumes. This ID can - * be used to refer to the Volume instead of the name. - * - * @type {string} - * @memberof ClusterVolume - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof ClusterVolume - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof ClusterVolume - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof ClusterVolume - */ - UpdatedAt?: string; - /** - * - * @type {ClusterVolumeSpec} - * @memberof ClusterVolume - */ - Spec?: ClusterVolumeSpec; - /** - * - * @type {ClusterVolumeInfo} - * @memberof ClusterVolume - */ - Info?: ClusterVolumeInfo; - /** - * The status of the volume as it pertains to its publishing and use on - * specific nodes - * - * @type {Array} - * @memberof ClusterVolume - */ - PublishStatus?: Array; + /** + * The Swarm ID of this volume. Because cluster volumes are Swarm + * objects, they have an ID, unlike non-cluster volumes. This ID can + * be used to refer to the Volume instead of the name. + * + * @type {string} + * @memberof ClusterVolume + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof ClusterVolume + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof ClusterVolume + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof ClusterVolume + */ + UpdatedAt?: string; + /** + * + * @type {ClusterVolumeSpec} + * @memberof ClusterVolume + */ + Spec?: ClusterVolumeSpec; + /** + * + * @type {ClusterVolumeInfo} + * @memberof ClusterVolume + */ + Info?: ClusterVolumeInfo; + /** + * The status of the volume as it pertains to its publishing and use on + * specific nodes + * + * @type {Array} + * @memberof ClusterVolume + */ + PublishStatus?: Array; } /** * Check if a given object implements the ClusterVolume interface. */ export function instanceOfClusterVolume(value: object): value is ClusterVolume { - return true; + return true; } export function ClusterVolumeFromJSON(json: any): ClusterVolume { - return ClusterVolumeFromJSONTyped(json, false); + return ClusterVolumeFromJSONTyped(json, false); } export function ClusterVolumeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolume { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : ClusterVolumeSpecFromJSON(json["Spec"]), - Info: json["Info"] == null ? undefined : ClusterVolumeInfoFromJSON(json["Info"]), - PublishStatus: - json["PublishStatus"] == null - ? undefined - : (json["PublishStatus"] as Array).map(ClusterVolumePublishStatusInnerFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : ClusterVolumeSpecFromJSON(json['Spec']), + 'Info': json['Info'] == null ? undefined : ClusterVolumeInfoFromJSON(json['Info']), + 'PublishStatus': json['PublishStatus'] == null ? undefined : ((json['PublishStatus'] as Array).map(ClusterVolumePublishStatusInnerFromJSON)), + }; } export function ClusterVolumeToJSON(json: any): ClusterVolume { - return ClusterVolumeToJSONTyped(json, false); + return ClusterVolumeToJSONTyped(json, false); } -export function ClusterVolumeToJSONTyped( - value?: ClusterVolume | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeToJSONTyped(value?: ClusterVolume | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: ClusterVolumeSpecToJSON(value["Spec"]), - Info: ClusterVolumeInfoToJSON(value["Info"]), - PublishStatus: - value["PublishStatus"] == null - ? undefined - : (value["PublishStatus"] as Array).map(ClusterVolumePublishStatusInnerToJSON), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': ClusterVolumeSpecToJSON(value['Spec']), + 'Info': ClusterVolumeInfoToJSON(value['Info']), + 'PublishStatus': value['PublishStatus'] == null ? undefined : ((value['PublishStatus'] as Array).map(ClusterVolumePublishStatusInnerToJSON)), + }; } + diff --git a/src/clients/docker/models/ClusterVolumeInfo.ts b/src/clients/docker/models/ClusterVolumeInfo.ts index 4e7ea2f2a8..abcbd426b7 100644 --- a/src/clients/docker/models/ClusterVolumeInfo.ts +++ b/src/clients/docker/models/ClusterVolumeInfo.ts @@ -2,102 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Information about the global status of the volume. - * + * * @export * @interface ClusterVolumeInfo */ export interface ClusterVolumeInfo { - /** - * The capacity of the volume in bytes. A value of 0 indicates that - * the capacity is unknown. - * - * @type {number} - * @memberof ClusterVolumeInfo - */ - CapacityBytes?: number; - /** - * A map of strings to strings returned from the storage plugin when - * the volume is created. - * - * @type {{ [key: string]: string; }} - * @memberof ClusterVolumeInfo - */ - VolumeContext?: { [key: string]: string }; - /** - * The ID of the volume as returned by the CSI storage plugin. This - * is distinct from the volume's ID as provided by Docker. This ID - * is never used by the user when communicating with Docker to refer - * to this volume. If the ID is blank, then the Volume has not been - * successfully created in the plugin yet. - * - * @type {string} - * @memberof ClusterVolumeInfo - */ - VolumeID?: string; - /** - * The topology this volume is actually accessible from. - * - * @type {Array<{ [key: string]: string; }>} - * @memberof ClusterVolumeInfo - */ - AccessibleTopology?: Array<{ [key: string]: string }>; + /** + * The capacity of the volume in bytes. A value of 0 indicates that + * the capacity is unknown. + * + * @type {number} + * @memberof ClusterVolumeInfo + */ + CapacityBytes?: number; + /** + * A map of strings to strings returned from the storage plugin when + * the volume is created. + * + * @type {{ [key: string]: string; }} + * @memberof ClusterVolumeInfo + */ + VolumeContext?: { [key: string]: string; }; + /** + * The ID of the volume as returned by the CSI storage plugin. This + * is distinct from the volume's ID as provided by Docker. This ID + * is never used by the user when communicating with Docker to refer + * to this volume. If the ID is blank, then the Volume has not been + * successfully created in the plugin yet. + * + * @type {string} + * @memberof ClusterVolumeInfo + */ + VolumeID?: string; + /** + * The topology this volume is actually accessible from. + * + * @type {Array<{ [key: string]: string; }>} + * @memberof ClusterVolumeInfo + */ + AccessibleTopology?: Array<{ [key: string]: string; }>; } /** * Check if a given object implements the ClusterVolumeInfo interface. */ export function instanceOfClusterVolumeInfo(value: object): value is ClusterVolumeInfo { - return true; + return true; } export function ClusterVolumeInfoFromJSON(json: any): ClusterVolumeInfo { - return ClusterVolumeInfoFromJSONTyped(json, false); + return ClusterVolumeInfoFromJSONTyped(json, false); } -export function ClusterVolumeInfoFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumeInfo { - if (json == null) { - return json; - } - return { - CapacityBytes: json["CapacityBytes"] == null ? undefined : json["CapacityBytes"], - VolumeContext: json["VolumeContext"] == null ? undefined : json["VolumeContext"], - VolumeID: json["VolumeID"] == null ? undefined : json["VolumeID"], - AccessibleTopology: json["AccessibleTopology"] == null ? undefined : json["AccessibleTopology"], - }; +export function ClusterVolumeInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeInfo { + if (json == null) { + return json; + } + return { + + 'CapacityBytes': json['CapacityBytes'] == null ? undefined : json['CapacityBytes'], + 'VolumeContext': json['VolumeContext'] == null ? undefined : json['VolumeContext'], + 'VolumeID': json['VolumeID'] == null ? undefined : json['VolumeID'], + 'AccessibleTopology': json['AccessibleTopology'] == null ? undefined : json['AccessibleTopology'], + }; } export function ClusterVolumeInfoToJSON(json: any): ClusterVolumeInfo { - return ClusterVolumeInfoToJSONTyped(json, false); + return ClusterVolumeInfoToJSONTyped(json, false); } -export function ClusterVolumeInfoToJSONTyped( - value?: ClusterVolumeInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeInfoToJSONTyped(value?: ClusterVolumeInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CapacityBytes: value["CapacityBytes"], - VolumeContext: value["VolumeContext"], - VolumeID: value["VolumeID"], - AccessibleTopology: value["AccessibleTopology"], - }; + return { + + 'CapacityBytes': value['CapacityBytes'], + 'VolumeContext': value['VolumeContext'], + 'VolumeID': value['VolumeID'], + 'AccessibleTopology': value['AccessibleTopology'], + }; } + diff --git a/src/clients/docker/models/ClusterVolumePublishStatusInner.ts b/src/clients/docker/models/ClusterVolumePublishStatusInner.ts index cfdca0fcc8..9931ab2567 100644 --- a/src/clients/docker/models/ClusterVolumePublishStatusInner.ts +++ b/src/clients/docker/models/ClusterVolumePublishStatusInner.ts @@ -2,106 +2,100 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ClusterVolumePublishStatusInner */ export interface ClusterVolumePublishStatusInner { - /** - * The ID of the Swarm node the volume is published on. - * - * @type {string} - * @memberof ClusterVolumePublishStatusInner - */ - NodeID?: string; - /** - * The published state of the volume. - * * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. - * * `published` The volume is published successfully to the node. - * * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. - * * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. - * - * @type {string} - * @memberof ClusterVolumePublishStatusInner - */ - State?: ClusterVolumePublishStatusInnerStateEnum; - /** - * A map of strings to strings returned by the CSI controller - * plugin when a volume is published. - * - * @type {{ [key: string]: string; }} - * @memberof ClusterVolumePublishStatusInner - */ - PublishContext?: { [key: string]: string }; + /** + * The ID of the Swarm node the volume is published on. + * + * @type {string} + * @memberof ClusterVolumePublishStatusInner + */ + NodeID?: string; + /** + * The published state of the volume. + * * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * * `published` The volume is published successfully to the node. + * * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + * + * @type {string} + * @memberof ClusterVolumePublishStatusInner + */ + State?: ClusterVolumePublishStatusInnerStateEnum; + /** + * A map of strings to strings returned by the CSI controller + * plugin when a volume is published. + * + * @type {{ [key: string]: string; }} + * @memberof ClusterVolumePublishStatusInner + */ + PublishContext?: { [key: string]: string; }; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ClusterVolumePublishStatusInnerStateEnum { - PendingPublish = "pending-publish", - Published = "published", - PendingNodeUnpublish = "pending-node-unpublish", - PendingControllerUnpublish = "pending-controller-unpublish", + PendingPublish = 'pending-publish', + Published = 'published', + PendingNodeUnpublish = 'pending-node-unpublish', + PendingControllerUnpublish = 'pending-controller-unpublish' } + /** * Check if a given object implements the ClusterVolumePublishStatusInner interface. */ -export function instanceOfClusterVolumePublishStatusInner( - value: object, -): value is ClusterVolumePublishStatusInner { - return true; +export function instanceOfClusterVolumePublishStatusInner(value: object): value is ClusterVolumePublishStatusInner { + return true; } -export function ClusterVolumePublishStatusInnerFromJSON( - json: any, -): ClusterVolumePublishStatusInner { - return ClusterVolumePublishStatusInnerFromJSONTyped(json, false); +export function ClusterVolumePublishStatusInnerFromJSON(json: any): ClusterVolumePublishStatusInner { + return ClusterVolumePublishStatusInnerFromJSONTyped(json, false); } -export function ClusterVolumePublishStatusInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumePublishStatusInner { - if (json == null) { - return json; - } - return { - NodeID: json["NodeID"] == null ? undefined : json["NodeID"], - State: json["State"] == null ? undefined : json["State"], - PublishContext: json["PublishContext"] == null ? undefined : json["PublishContext"], - }; +export function ClusterVolumePublishStatusInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumePublishStatusInner { + if (json == null) { + return json; + } + return { + + 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], + 'State': json['State'] == null ? undefined : json['State'], + 'PublishContext': json['PublishContext'] == null ? undefined : json['PublishContext'], + }; } export function ClusterVolumePublishStatusInnerToJSON(json: any): ClusterVolumePublishStatusInner { - return ClusterVolumePublishStatusInnerToJSONTyped(json, false); + return ClusterVolumePublishStatusInnerToJSONTyped(json, false); } -export function ClusterVolumePublishStatusInnerToJSONTyped( - value?: ClusterVolumePublishStatusInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumePublishStatusInnerToJSONTyped(value?: ClusterVolumePublishStatusInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NodeID: value["NodeID"], - State: value["State"], - PublishContext: value["PublishContext"], - }; + return { + + 'NodeID': value['NodeID'], + 'State': value['State'], + 'PublishContext': value['PublishContext'], + }; } + diff --git a/src/clients/docker/models/ClusterVolumeSpec.ts b/src/clients/docker/models/ClusterVolumeSpec.ts index 1ea03660f7..e51bf8a34b 100644 --- a/src/clients/docker/models/ClusterVolumeSpec.ts +++ b/src/clients/docker/models/ClusterVolumeSpec.ts @@ -2,93 +2,87 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ClusterVolumeSpecAccessMode } from "./ClusterVolumeSpecAccessMode"; +import { mapValues } from '../runtime'; +import type { ClusterVolumeSpecAccessMode } from './ClusterVolumeSpecAccessMode'; import { - ClusterVolumeSpecAccessModeFromJSON, - ClusterVolumeSpecAccessModeFromJSONTyped, - ClusterVolumeSpecAccessModeToJSON, - ClusterVolumeSpecAccessModeToJSONTyped, -} from "./ClusterVolumeSpecAccessMode"; + ClusterVolumeSpecAccessModeFromJSON, + ClusterVolumeSpecAccessModeFromJSONTyped, + ClusterVolumeSpecAccessModeToJSON, + ClusterVolumeSpecAccessModeToJSONTyped, +} from './ClusterVolumeSpecAccessMode'; /** * Cluster-specific options used to create the volume. - * + * * @export * @interface ClusterVolumeSpec */ export interface ClusterVolumeSpec { - /** - * Group defines the volume group of this volume. Volumes belonging to - * the same group can be referred to by group name when creating - * Services. Referring to a volume by group instructs Swarm to treat - * volumes in that group interchangeably for the purpose of scheduling. - * Volumes with an empty string for a group technically all belong to - * the same, emptystring group. - * - * @type {string} - * @memberof ClusterVolumeSpec - */ - Group?: string; - /** - * - * @type {ClusterVolumeSpecAccessMode} - * @memberof ClusterVolumeSpec - */ - AccessMode?: ClusterVolumeSpecAccessMode; + /** + * Group defines the volume group of this volume. Volumes belonging to + * the same group can be referred to by group name when creating + * Services. Referring to a volume by group instructs Swarm to treat + * volumes in that group interchangeably for the purpose of scheduling. + * Volumes with an empty string for a group technically all belong to + * the same, emptystring group. + * + * @type {string} + * @memberof ClusterVolumeSpec + */ + Group?: string; + /** + * + * @type {ClusterVolumeSpecAccessMode} + * @memberof ClusterVolumeSpec + */ + AccessMode?: ClusterVolumeSpecAccessMode; } /** * Check if a given object implements the ClusterVolumeSpec interface. */ export function instanceOfClusterVolumeSpec(value: object): value is ClusterVolumeSpec { - return true; + return true; } export function ClusterVolumeSpecFromJSON(json: any): ClusterVolumeSpec { - return ClusterVolumeSpecFromJSONTyped(json, false); + return ClusterVolumeSpecFromJSONTyped(json, false); } -export function ClusterVolumeSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumeSpec { - if (json == null) { - return json; - } - return { - Group: json["Group"] == null ? undefined : json["Group"], - AccessMode: - json["AccessMode"] == null - ? undefined - : ClusterVolumeSpecAccessModeFromJSON(json["AccessMode"]), - }; +export function ClusterVolumeSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpec { + if (json == null) { + return json; + } + return { + + 'Group': json['Group'] == null ? undefined : json['Group'], + 'AccessMode': json['AccessMode'] == null ? undefined : ClusterVolumeSpecAccessModeFromJSON(json['AccessMode']), + }; } export function ClusterVolumeSpecToJSON(json: any): ClusterVolumeSpec { - return ClusterVolumeSpecToJSONTyped(json, false); + return ClusterVolumeSpecToJSONTyped(json, false); } -export function ClusterVolumeSpecToJSONTyped( - value?: ClusterVolumeSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecToJSONTyped(value?: ClusterVolumeSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Group: value["Group"], - AccessMode: ClusterVolumeSpecAccessModeToJSON(value["AccessMode"]), - }; + return { + + 'Group': value['Group'], + 'AccessMode': ClusterVolumeSpecAccessModeToJSON(value['AccessMode']), + }; } + diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts b/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts index 4b69a3399f..6b5bf43338 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts @@ -2,220 +2,200 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ClusterVolumeSpecAccessModeAccessibilityRequirements } from "./ClusterVolumeSpecAccessModeAccessibilityRequirements"; +import { mapValues } from '../runtime'; +import type { ClusterVolumeSpecAccessModeAccessibilityRequirements } from './ClusterVolumeSpecAccessModeAccessibilityRequirements'; import { - ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON, - ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped, - ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON, - ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped, -} from "./ClusterVolumeSpecAccessModeAccessibilityRequirements"; -import type { ClusterVolumeSpecAccessModeSecretsInner } from "./ClusterVolumeSpecAccessModeSecretsInner"; + ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON, + ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped, + ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON, + ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped, +} from './ClusterVolumeSpecAccessModeAccessibilityRequirements'; +import type { ClusterVolumeSpecAccessModeSecretsInner } from './ClusterVolumeSpecAccessModeSecretsInner'; import { - ClusterVolumeSpecAccessModeSecretsInnerFromJSON, - ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped, - ClusterVolumeSpecAccessModeSecretsInnerToJSON, - ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped, -} from "./ClusterVolumeSpecAccessModeSecretsInner"; -import type { ClusterVolumeSpecAccessModeCapacityRange } from "./ClusterVolumeSpecAccessModeCapacityRange"; + ClusterVolumeSpecAccessModeSecretsInnerFromJSON, + ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped, + ClusterVolumeSpecAccessModeSecretsInnerToJSON, + ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped, +} from './ClusterVolumeSpecAccessModeSecretsInner'; +import type { ClusterVolumeSpecAccessModeCapacityRange } from './ClusterVolumeSpecAccessModeCapacityRange'; import { - ClusterVolumeSpecAccessModeCapacityRangeFromJSON, - ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped, - ClusterVolumeSpecAccessModeCapacityRangeToJSON, - ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped, -} from "./ClusterVolumeSpecAccessModeCapacityRange"; + ClusterVolumeSpecAccessModeCapacityRangeFromJSON, + ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped, + ClusterVolumeSpecAccessModeCapacityRangeToJSON, + ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped, +} from './ClusterVolumeSpecAccessModeCapacityRange'; /** * Defines how the volume is used by tasks. - * + * * @export * @interface ClusterVolumeSpecAccessMode */ export interface ClusterVolumeSpecAccessMode { - /** - * The set of nodes this volume can be used on at one time. - * - `single` The volume may only be scheduled to one node at a time. - * - `multi` the volume may be scheduled to any supported number of nodes at a time. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessMode - */ - Scope?: ClusterVolumeSpecAccessModeScopeEnum; - /** - * The number and way that different tasks can use this volume - * at one time. - * - `none` The volume may only be used by one task at a time. - * - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - * - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - * - `all` The volume may have any number of readers and writers. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessMode - */ - Sharing?: ClusterVolumeSpecAccessModeSharingEnum; - /** - * Options for using this volume as a Mount-type volume. - * - * Either MountVolume or BlockVolume, but not both, must be - * present. - * properties: - * FsType: - * type: "string" - * description: | - * Specifies the filesystem type for the mount volume. - * Optional. - * MountFlags: - * type: "array" - * description: | - * Flags to pass when mounting the volume. Optional. - * items: - * type: "string" - * BlockVolume: - * type: "object" - * description: | - * Options for using this volume as a Block-type volume. - * Intentionally empty. - * - * @type {object} - * @memberof ClusterVolumeSpecAccessMode - */ - MountVolume?: object; - /** - * Swarm Secrets that are passed to the CSI storage plugin when - * operating on this volume. - * - * @type {Array} - * @memberof ClusterVolumeSpecAccessMode - */ - Secrets?: Array; - /** - * - * @type {ClusterVolumeSpecAccessModeAccessibilityRequirements} - * @memberof ClusterVolumeSpecAccessMode - */ - AccessibilityRequirements?: ClusterVolumeSpecAccessModeAccessibilityRequirements; - /** - * - * @type {ClusterVolumeSpecAccessModeCapacityRange} - * @memberof ClusterVolumeSpecAccessMode - */ - CapacityRange?: ClusterVolumeSpecAccessModeCapacityRange; - /** - * The availability of the volume for use in tasks. - * - `active` The volume is fully available for scheduling on the cluster - * - `pause` No new workloads should use the volume, but existing workloads are not stopped. - * - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessMode - */ - Availability?: ClusterVolumeSpecAccessModeAvailabilityEnum; + /** + * The set of nodes this volume can be used on at one time. + * - `single` The volume may only be scheduled to one node at a time. + * - `multi` the volume may be scheduled to any supported number of nodes at a time. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessMode + */ + Scope?: ClusterVolumeSpecAccessModeScopeEnum; + /** + * The number and way that different tasks can use this volume + * at one time. + * - `none` The volume may only be used by one task at a time. + * - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + * - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + * - `all` The volume may have any number of readers and writers. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessMode + */ + Sharing?: ClusterVolumeSpecAccessModeSharingEnum; + /** + * Options for using this volume as a Mount-type volume. + * + * Either MountVolume or BlockVolume, but not both, must be + * present. + * properties: + * FsType: + * type: "string" + * description: | + * Specifies the filesystem type for the mount volume. + * Optional. + * MountFlags: + * type: "array" + * description: | + * Flags to pass when mounting the volume. Optional. + * items: + * type: "string" + * BlockVolume: + * type: "object" + * description: | + * Options for using this volume as a Block-type volume. + * Intentionally empty. + * + * @type {object} + * @memberof ClusterVolumeSpecAccessMode + */ + MountVolume?: object; + /** + * Swarm Secrets that are passed to the CSI storage plugin when + * operating on this volume. + * + * @type {Array} + * @memberof ClusterVolumeSpecAccessMode + */ + Secrets?: Array; + /** + * + * @type {ClusterVolumeSpecAccessModeAccessibilityRequirements} + * @memberof ClusterVolumeSpecAccessMode + */ + AccessibilityRequirements?: ClusterVolumeSpecAccessModeAccessibilityRequirements; + /** + * + * @type {ClusterVolumeSpecAccessModeCapacityRange} + * @memberof ClusterVolumeSpecAccessMode + */ + CapacityRange?: ClusterVolumeSpecAccessModeCapacityRange; + /** + * The availability of the volume for use in tasks. + * - `active` The volume is fully available for scheduling on the cluster + * - `pause` No new workloads should use the volume, but existing workloads are not stopped. + * - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessMode + */ + Availability?: ClusterVolumeSpecAccessModeAvailabilityEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ClusterVolumeSpecAccessModeScopeEnum { - Single = "single", - Multi = "multi", + Single = 'single', + Multi = 'multi' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ClusterVolumeSpecAccessModeSharingEnum { - None = "none", - Readonly = "readonly", - Onewriter = "onewriter", - All = "all", + None = 'none', + Readonly = 'readonly', + Onewriter = 'onewriter', + All = 'all' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ClusterVolumeSpecAccessModeAvailabilityEnum { - Active = "active", - Pause = "pause", - Drain = "drain", + Active = 'active', + Pause = 'pause', + Drain = 'drain' } + /** * Check if a given object implements the ClusterVolumeSpecAccessMode interface. */ -export function instanceOfClusterVolumeSpecAccessMode( - value: object, -): value is ClusterVolumeSpecAccessMode { - return true; +export function instanceOfClusterVolumeSpecAccessMode(value: object): value is ClusterVolumeSpecAccessMode { + return true; } export function ClusterVolumeSpecAccessModeFromJSON(json: any): ClusterVolumeSpecAccessMode { - return ClusterVolumeSpecAccessModeFromJSONTyped(json, false); + return ClusterVolumeSpecAccessModeFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumeSpecAccessMode { - if (json == null) { - return json; - } - return { - Scope: json["Scope"] == null ? undefined : json["Scope"], - Sharing: json["Sharing"] == null ? undefined : json["Sharing"], - MountVolume: json["MountVolume"] == null ? undefined : json["MountVolume"], - Secrets: - json["Secrets"] == null - ? undefined - : (json["Secrets"] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerFromJSON), - AccessibilityRequirements: - json["AccessibilityRequirements"] == null - ? undefined - : ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON( - json["AccessibilityRequirements"], - ), - CapacityRange: - json["CapacityRange"] == null - ? undefined - : ClusterVolumeSpecAccessModeCapacityRangeFromJSON(json["CapacityRange"]), - Availability: json["Availability"] == null ? undefined : json["Availability"], - }; +export function ClusterVolumeSpecAccessModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessMode { + if (json == null) { + return json; + } + return { + + 'Scope': json['Scope'] == null ? undefined : json['Scope'], + 'Sharing': json['Sharing'] == null ? undefined : json['Sharing'], + 'MountVolume': json['MountVolume'] == null ? undefined : json['MountVolume'], + 'Secrets': json['Secrets'] == null ? undefined : ((json['Secrets'] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerFromJSON)), + 'AccessibilityRequirements': json['AccessibilityRequirements'] == null ? undefined : ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON(json['AccessibilityRequirements']), + 'CapacityRange': json['CapacityRange'] == null ? undefined : ClusterVolumeSpecAccessModeCapacityRangeFromJSON(json['CapacityRange']), + 'Availability': json['Availability'] == null ? undefined : json['Availability'], + }; } export function ClusterVolumeSpecAccessModeToJSON(json: any): ClusterVolumeSpecAccessMode { - return ClusterVolumeSpecAccessModeToJSONTyped(json, false); + return ClusterVolumeSpecAccessModeToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeToJSONTyped( - value?: ClusterVolumeSpecAccessMode | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeToJSONTyped(value?: ClusterVolumeSpecAccessMode | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Scope: value["Scope"], - Sharing: value["Sharing"], - MountVolume: value["MountVolume"], - Secrets: - value["Secrets"] == null - ? undefined - : (value["Secrets"] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerToJSON), - AccessibilityRequirements: ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON( - value["AccessibilityRequirements"], - ), - CapacityRange: ClusterVolumeSpecAccessModeCapacityRangeToJSON(value["CapacityRange"]), - Availability: value["Availability"], - }; + return { + + 'Scope': value['Scope'], + 'Sharing': value['Sharing'], + 'MountVolume': value['MountVolume'], + 'Secrets': value['Secrets'] == null ? undefined : ((value['Secrets'] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerToJSON)), + 'AccessibilityRequirements': ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON(value['AccessibilityRequirements']), + 'CapacityRange': ClusterVolumeSpecAccessModeCapacityRangeToJSON(value['CapacityRange']), + 'Availability': value['Availability'], + }; } + diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts b/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts index d12e7a6ca6..455e96e6b5 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts @@ -2,88 +2,79 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface ClusterVolumeSpecAccessModeAccessibilityRequirements */ export interface ClusterVolumeSpecAccessModeAccessibilityRequirements { - /** - * A list of required topologies, at least one of which the - * volume must be accessible from. - * - * @type {Array<{ [key: string]: string; }>} - * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements - */ - Requisite?: Array<{ [key: string]: string }>; - /** - * A list of topologies that the volume should attempt to be - * provisioned in. - * - * @type {Array<{ [key: string]: string; }>} - * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements - */ - Preferred?: Array<{ [key: string]: string }>; + /** + * A list of required topologies, at least one of which the + * volume must be accessible from. + * + * @type {Array<{ [key: string]: string; }>} + * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements + */ + Requisite?: Array<{ [key: string]: string; }>; + /** + * A list of topologies that the volume should attempt to be + * provisioned in. + * + * @type {Array<{ [key: string]: string; }>} + * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements + */ + Preferred?: Array<{ [key: string]: string; }>; } /** * Check if a given object implements the ClusterVolumeSpecAccessModeAccessibilityRequirements interface. */ -export function instanceOfClusterVolumeSpecAccessModeAccessibilityRequirements( - value: object, -): value is ClusterVolumeSpecAccessModeAccessibilityRequirements { - return true; +export function instanceOfClusterVolumeSpecAccessModeAccessibilityRequirements(value: object): value is ClusterVolumeSpecAccessModeAccessibilityRequirements { + return true; } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON( - json: any, -): ClusterVolumeSpecAccessModeAccessibilityRequirements { - return ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON(json: any): ClusterVolumeSpecAccessModeAccessibilityRequirements { + return ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumeSpecAccessModeAccessibilityRequirements { - if (json == null) { - return json; - } - return { - Requisite: json["Requisite"] == null ? undefined : json["Requisite"], - Preferred: json["Preferred"] == null ? undefined : json["Preferred"], - }; +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessModeAccessibilityRequirements { + if (json == null) { + return json; + } + return { + + 'Requisite': json['Requisite'] == null ? undefined : json['Requisite'], + 'Preferred': json['Preferred'] == null ? undefined : json['Preferred'], + }; } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON( - json: any, -): ClusterVolumeSpecAccessModeAccessibilityRequirements { - return ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON(json: any): ClusterVolumeSpecAccessModeAccessibilityRequirements { + return ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped( - value?: ClusterVolumeSpecAccessModeAccessibilityRequirements | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped(value?: ClusterVolumeSpecAccessModeAccessibilityRequirements | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Requisite: value["Requisite"], - Preferred: value["Preferred"], - }; + return { + + 'Requisite': value['Requisite'], + 'Preferred': value['Preferred'], + }; } + diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts b/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts index 680ae0dfe2..9fa3f7ee24 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts @@ -2,87 +2,78 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The desired capacity that the volume should be created with. If * empty, the plugin will decide the capacity. - * + * * @export * @interface ClusterVolumeSpecAccessModeCapacityRange */ export interface ClusterVolumeSpecAccessModeCapacityRange { - /** - * The volume must be at least this big. The value of 0 - * indicates an unspecified minimum - * - * @type {number} - * @memberof ClusterVolumeSpecAccessModeCapacityRange - */ - RequiredBytes?: number; - /** - * The volume must not be bigger than this. The value of 0 - * indicates an unspecified maximum. - * - * @type {number} - * @memberof ClusterVolumeSpecAccessModeCapacityRange - */ - LimitBytes?: number; + /** + * The volume must be at least this big. The value of 0 + * indicates an unspecified minimum + * + * @type {number} + * @memberof ClusterVolumeSpecAccessModeCapacityRange + */ + RequiredBytes?: number; + /** + * The volume must not be bigger than this. The value of 0 + * indicates an unspecified maximum. + * + * @type {number} + * @memberof ClusterVolumeSpecAccessModeCapacityRange + */ + LimitBytes?: number; } /** * Check if a given object implements the ClusterVolumeSpecAccessModeCapacityRange interface. */ -export function instanceOfClusterVolumeSpecAccessModeCapacityRange( - value: object, -): value is ClusterVolumeSpecAccessModeCapacityRange { - return true; +export function instanceOfClusterVolumeSpecAccessModeCapacityRange(value: object): value is ClusterVolumeSpecAccessModeCapacityRange { + return true; } -export function ClusterVolumeSpecAccessModeCapacityRangeFromJSON( - json: any, -): ClusterVolumeSpecAccessModeCapacityRange { - return ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeCapacityRangeFromJSON(json: any): ClusterVolumeSpecAccessModeCapacityRange { + return ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumeSpecAccessModeCapacityRange { - if (json == null) { - return json; - } - return { - RequiredBytes: json["RequiredBytes"] == null ? undefined : json["RequiredBytes"], - LimitBytes: json["LimitBytes"] == null ? undefined : json["LimitBytes"], - }; +export function ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessModeCapacityRange { + if (json == null) { + return json; + } + return { + + 'RequiredBytes': json['RequiredBytes'] == null ? undefined : json['RequiredBytes'], + 'LimitBytes': json['LimitBytes'] == null ? undefined : json['LimitBytes'], + }; } -export function ClusterVolumeSpecAccessModeCapacityRangeToJSON( - json: any, -): ClusterVolumeSpecAccessModeCapacityRange { - return ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeCapacityRangeToJSON(json: any): ClusterVolumeSpecAccessModeCapacityRange { + return ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped( - value?: ClusterVolumeSpecAccessModeCapacityRange | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped(value?: ClusterVolumeSpecAccessModeCapacityRange | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - RequiredBytes: value["RequiredBytes"], - LimitBytes: value["LimitBytes"], - }; + return { + + 'RequiredBytes': value['RequiredBytes'], + 'LimitBytes': value['LimitBytes'], + }; } + diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts b/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts index 4a04bf832c..813377e88a 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts @@ -2,89 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * One cluster volume secret entry. Defines a key-value pair that * is passed to the plugin. - * + * * @export * @interface ClusterVolumeSpecAccessModeSecretsInner */ export interface ClusterVolumeSpecAccessModeSecretsInner { - /** - * Key is the name of the key of the key-value pair passed to - * the plugin. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessModeSecretsInner - */ - Key?: string; - /** - * Secret is the swarm Secret object from which to read data. - * This can be a Secret name or ID. The Secret data is - * retrieved by swarm and used as the value of the key-value - * pair passed to the plugin. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessModeSecretsInner - */ - Secret?: string; + /** + * Key is the name of the key of the key-value pair passed to + * the plugin. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessModeSecretsInner + */ + Key?: string; + /** + * Secret is the swarm Secret object from which to read data. + * This can be a Secret name or ID. The Secret data is + * retrieved by swarm and used as the value of the key-value + * pair passed to the plugin. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessModeSecretsInner + */ + Secret?: string; } /** * Check if a given object implements the ClusterVolumeSpecAccessModeSecretsInner interface. */ -export function instanceOfClusterVolumeSpecAccessModeSecretsInner( - value: object, -): value is ClusterVolumeSpecAccessModeSecretsInner { - return true; +export function instanceOfClusterVolumeSpecAccessModeSecretsInner(value: object): value is ClusterVolumeSpecAccessModeSecretsInner { + return true; } -export function ClusterVolumeSpecAccessModeSecretsInnerFromJSON( - json: any, -): ClusterVolumeSpecAccessModeSecretsInner { - return ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeSecretsInnerFromJSON(json: any): ClusterVolumeSpecAccessModeSecretsInner { + return ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterVolumeSpecAccessModeSecretsInner { - if (json == null) { - return json; - } - return { - Key: json["Key"] == null ? undefined : json["Key"], - Secret: json["Secret"] == null ? undefined : json["Secret"], - }; +export function ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessModeSecretsInner { + if (json == null) { + return json; + } + return { + + 'Key': json['Key'] == null ? undefined : json['Key'], + 'Secret': json['Secret'] == null ? undefined : json['Secret'], + }; } -export function ClusterVolumeSpecAccessModeSecretsInnerToJSON( - json: any, -): ClusterVolumeSpecAccessModeSecretsInner { - return ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeSecretsInnerToJSON(json: any): ClusterVolumeSpecAccessModeSecretsInner { + return ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped( - value?: ClusterVolumeSpecAccessModeSecretsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped(value?: ClusterVolumeSpecAccessModeSecretsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Key: value["Key"], - Secret: value["Secret"], - }; + return { + + 'Key': value['Key'], + 'Secret': value['Secret'], + }; } + diff --git a/src/clients/docker/models/Commit.ts b/src/clients/docker/models/Commit.ts index 54cb1ebbef..77981fab24 100644 --- a/src/clients/docker/models/Commit.ts +++ b/src/clients/docker/models/Commit.ts @@ -2,76 +2,76 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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`. - * + * * @export * @interface Commit */ export interface Commit { - /** - * Actual commit ID of external tool. - * @type {string} - * @memberof Commit - */ - ID?: string; - /** - * Commit ID of external tool expected by dockerd as set at build time. - * - * @type {string} - * @memberof Commit - */ - Expected?: string; + /** + * Actual commit ID of external tool. + * @type {string} + * @memberof Commit + */ + ID?: string; + /** + * Commit ID of external tool expected by dockerd as set at build time. + * + * @type {string} + * @memberof Commit + */ + Expected?: string; } /** * Check if a given object implements the Commit interface. */ export function instanceOfCommit(value: object): value is Commit { - return true; + return true; } export function CommitFromJSON(json: any): Commit { - return CommitFromJSONTyped(json, false); + return CommitFromJSONTyped(json, false); } export function CommitFromJSONTyped(json: any, ignoreDiscriminator: boolean): Commit { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Expected: json["Expected"] == null ? undefined : json["Expected"], - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Expected': json['Expected'] == null ? undefined : json['Expected'], + }; } export function CommitToJSON(json: any): Commit { - return CommitToJSONTyped(json, false); + return CommitToJSONTyped(json, false); } -export function CommitToJSONTyped( - value?: Commit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CommitToJSONTyped(value?: Commit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Expected: value["Expected"], - }; + return { + + 'ID': value['ID'], + 'Expected': value['Expected'], + }; } + diff --git a/src/clients/docker/models/Config.ts b/src/clients/docker/models/Config.ts index 4271f6f394..1f1d0251d5 100644 --- a/src/clients/docker/models/Config.ts +++ b/src/clients/docker/models/Config.ts @@ -2,111 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { ConfigSpec } from "./ConfigSpec"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { ConfigSpec } from './ConfigSpec'; import { - ConfigSpecFromJSON, - ConfigSpecFromJSONTyped, - ConfigSpecToJSON, - ConfigSpecToJSONTyped, -} from "./ConfigSpec"; + ConfigSpecFromJSON, + ConfigSpecFromJSONTyped, + ConfigSpecToJSON, + ConfigSpecToJSONTyped, +} from './ConfigSpec'; /** - * + * * @export * @interface Config */ export interface Config { - /** - * - * @type {string} - * @memberof Config - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Config - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Config - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Config - */ - UpdatedAt?: string; - /** - * - * @type {ConfigSpec} - * @memberof Config - */ - Spec?: ConfigSpec; + /** + * + * @type {string} + * @memberof Config + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Config + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Config + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Config + */ + UpdatedAt?: string; + /** + * + * @type {ConfigSpec} + * @memberof Config + */ + Spec?: ConfigSpec; } /** * Check if a given object implements the Config interface. */ export function instanceOfConfig(value: object): value is Config { - return true; + return true; } export function ConfigFromJSON(json: any): Config { - return ConfigFromJSONTyped(json, false); + return ConfigFromJSONTyped(json, false); } export function ConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): Config { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : ConfigSpecFromJSON(json["Spec"]), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : ConfigSpecFromJSON(json['Spec']), + }; } export function ConfigToJSON(json: any): Config { - return ConfigToJSONTyped(json, false); + return ConfigToJSONTyped(json, false); } -export function ConfigToJSONTyped( - value?: Config | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigToJSONTyped(value?: Config | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: ConfigSpecToJSON(value["Spec"]), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': ConfigSpecToJSON(value['Spec']), + }; } + diff --git a/src/clients/docker/models/ConfigCreateRequest.ts b/src/clients/docker/models/ConfigCreateRequest.ts index a918cd09b1..0cc4831786 100644 --- a/src/clients/docker/models/ConfigCreateRequest.ts +++ b/src/clients/docker/models/ConfigCreateRequest.ts @@ -2,96 +2,98 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Driver } from "./Driver"; -import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; +import { mapValues } from '../runtime'; +import type { Driver } from './Driver'; +import { + DriverFromJSON, + DriverFromJSONTyped, + DriverToJSON, + DriverToJSONTyped, +} from './Driver'; /** - * + * * @export * @interface ConfigCreateRequest */ export interface ConfigCreateRequest { - /** - * User-defined name of the config. - * @type {string} - * @memberof ConfigCreateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ConfigCreateRequest - */ - Labels?: { [key: string]: string }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. - * - * @type {string} - * @memberof ConfigCreateRequest - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof ConfigCreateRequest - */ - Templating?: Driver; + /** + * User-defined name of the config. + * @type {string} + * @memberof ConfigCreateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ConfigCreateRequest + */ + Labels?: { [key: string]: string; }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * config data. + * + * @type {string} + * @memberof ConfigCreateRequest + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof ConfigCreateRequest + */ + Templating?: Driver; } /** * Check if a given object implements the ConfigCreateRequest interface. */ export function instanceOfConfigCreateRequest(value: object): value is ConfigCreateRequest { - return true; + return true; } export function ConfigCreateRequestFromJSON(json: any): ConfigCreateRequest { - return ConfigCreateRequestFromJSONTyped(json, false); + return ConfigCreateRequestFromJSONTyped(json, false); } -export function ConfigCreateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigCreateRequest { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Data: json["Data"] == null ? undefined : json["Data"], - Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), - }; +export function ConfigCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigCreateRequest { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Data': json['Data'] == null ? undefined : json['Data'], + 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), + }; } export function ConfigCreateRequestToJSON(json: any): ConfigCreateRequest { - return ConfigCreateRequestToJSONTyped(json, false); + return ConfigCreateRequestToJSONTyped(json, false); } -export function ConfigCreateRequestToJSONTyped( - value?: ConfigCreateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigCreateRequestToJSONTyped(value?: ConfigCreateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - Data: value["Data"], - Templating: DriverToJSON(value["Templating"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Data': value['Data'], + 'Templating': DriverToJSON(value['Templating']), + }; } + diff --git a/src/clients/docker/models/ConfigReference.ts b/src/clients/docker/models/ConfigReference.ts index ee2d952b47..961f1982d8 100644 --- a/src/clients/docker/models/ConfigReference.ts +++ b/src/clients/docker/models/ConfigReference.ts @@ -2,72 +2,69 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The config-only network source to provide the configuration for * this network. - * + * * @export * @interface ConfigReference */ export interface ConfigReference { - /** - * The name of the config-only network that provides the network's - * configuration. The specified network must be an existing config-only - * network. Only network names are allowed, not network IDs. - * - * @type {string} - * @memberof ConfigReference - */ - Network?: string; + /** + * The name of the config-only network that provides the network's + * configuration. The specified network must be an existing config-only + * network. Only network names are allowed, not network IDs. + * + * @type {string} + * @memberof ConfigReference + */ + Network?: string; } /** * Check if a given object implements the ConfigReference interface. */ export function instanceOfConfigReference(value: object): value is ConfigReference { - return true; + return true; } export function ConfigReferenceFromJSON(json: any): ConfigReference { - return ConfigReferenceFromJSONTyped(json, false); + return ConfigReferenceFromJSONTyped(json, false); } -export function ConfigReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigReference { - if (json == null) { - return json; - } - return { - Network: json["Network"] == null ? undefined : json["Network"], - }; +export function ConfigReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigReference { + if (json == null) { + return json; + } + return { + + 'Network': json['Network'] == null ? undefined : json['Network'], + }; } export function ConfigReferenceToJSON(json: any): ConfigReference { - return ConfigReferenceToJSONTyped(json, false); + return ConfigReferenceToJSONTyped(json, false); } -export function ConfigReferenceToJSONTyped( - value?: ConfigReference | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigReferenceToJSONTyped(value?: ConfigReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Network: value["Network"], - }; + return { + + 'Network': value['Network'], + }; } + diff --git a/src/clients/docker/models/ConfigSpec.ts b/src/clients/docker/models/ConfigSpec.ts index 240c4fb612..dd4ab14230 100644 --- a/src/clients/docker/models/ConfigSpec.ts +++ b/src/clients/docker/models/ConfigSpec.ts @@ -2,93 +2,98 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Driver } from "./Driver"; -import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; +import { mapValues } from '../runtime'; +import type { Driver } from './Driver'; +import { + DriverFromJSON, + DriverFromJSONTyped, + DriverToJSON, + DriverToJSONTyped, +} from './Driver'; /** - * + * * @export * @interface ConfigSpec */ export interface ConfigSpec { - /** - * User-defined name of the config. - * @type {string} - * @memberof ConfigSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ConfigSpec - */ - Labels?: { [key: string]: string }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. - * - * @type {string} - * @memberof ConfigSpec - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof ConfigSpec - */ - Templating?: Driver; + /** + * User-defined name of the config. + * @type {string} + * @memberof ConfigSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ConfigSpec + */ + Labels?: { [key: string]: string; }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * config data. + * + * @type {string} + * @memberof ConfigSpec + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof ConfigSpec + */ + Templating?: Driver; } /** * Check if a given object implements the ConfigSpec interface. */ export function instanceOfConfigSpec(value: object): value is ConfigSpec { - return true; + return true; } export function ConfigSpecFromJSON(json: any): ConfigSpec { - return ConfigSpecFromJSONTyped(json, false); + return ConfigSpecFromJSONTyped(json, false); } export function ConfigSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigSpec { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Data: json["Data"] == null ? undefined : json["Data"], - Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Data': json['Data'] == null ? undefined : json['Data'], + 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), + }; } export function ConfigSpecToJSON(json: any): ConfigSpec { - return ConfigSpecToJSONTyped(json, false); + return ConfigSpecToJSONTyped(json, false); } -export function ConfigSpecToJSONTyped( - value?: ConfigSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigSpecToJSONTyped(value?: ConfigSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - Data: value["Data"], - Templating: DriverToJSON(value["Templating"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Data': value['Data'], + 'Templating': DriverToJSON(value['Templating']), + }; } + diff --git a/src/clients/docker/models/ContainerConfig.ts b/src/clients/docker/models/ContainerConfig.ts index cd31d5f7f9..12b57c2a4e 100644 --- a/src/clients/docker/models/ContainerConfig.ts +++ b/src/clients/docker/models/ContainerConfig.ts @@ -2,298 +2,294 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { HealthConfig } from "./HealthConfig"; +import { mapValues } from '../runtime'; +import type { HealthConfig } from './HealthConfig'; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from "./HealthConfig"; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from './HealthConfig'; /** * 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. - * + * * @export * @interface ContainerConfig */ export interface ContainerConfig { - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - * @type {string} - * @memberof ContainerConfig - */ - Hostname?: string; - /** - * The domain name to use for the container. - * - * @type {string} - * @memberof ContainerConfig - */ - Domainname?: string; - /** - * The user that commands are run as inside the container. - * @type {string} - * @memberof ContainerConfig - */ - User?: string; - /** - * Whether to attach to `stdin`. - * @type {boolean} - * @memberof ContainerConfig - */ - AttachStdin?: boolean; - /** - * Whether to attach to `stdout`. - * @type {boolean} - * @memberof ContainerConfig - */ - AttachStdout?: boolean; - /** - * Whether to attach to `stderr`. - * @type {boolean} - * @memberof ContainerConfig - */ - AttachStderr?: boolean; - /** - * An object mapping ports to an empty object in the form: - * - * `{"/": {}}` - * - * @type {{ [key: string]: object; }} - * @memberof ContainerConfig - */ - ExposedPorts?: { [key: string]: object } | null; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @type {boolean} - * @memberof ContainerConfig - */ - Tty?: boolean; - /** - * Open `stdin` - * @type {boolean} - * @memberof ContainerConfig - */ - OpenStdin?: boolean; - /** - * Close `stdin` after one attached client disconnects - * @type {boolean} - * @memberof ContainerConfig - */ - StdinOnce?: boolean; - /** - * A list of environment variables to set inside the container in the - * form `["VAR=value", ...]`. A variable without `=` is removed from the - * environment, rather than to have an empty value. - * - * @type {Array} - * @memberof ContainerConfig - */ - Env?: Array; - /** - * Command to run specified as a string or an array of strings. - * - * @type {Array} - * @memberof ContainerConfig - */ - Cmd?: Array; - /** - * - * @type {HealthConfig} - * @memberof ContainerConfig - */ - Healthcheck?: HealthConfig; - /** - * Command is already escaped (Windows only) - * @type {boolean} - * @memberof ContainerConfig - */ - ArgsEscaped?: boolean | null; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - * @type {string} - * @memberof ContainerConfig - */ - Image?: string; - /** - * An object mapping mount point paths inside the container to empty - * objects. - * - * @type {{ [key: string]: object; }} - * @memberof ContainerConfig - */ - Volumes?: { [key: string]: object }; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof ContainerConfig - */ - WorkingDir?: string; - /** - * The entry point for the container as a string or an array of strings. - * - * If the array consists of exactly one empty string (`[""]`) then the - * entry point is reset to system default (i.e., the entry point used by - * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - * - * @type {Array} - * @memberof ContainerConfig - */ - Entrypoint?: Array; - /** - * Disable networking for the container. - * @type {boolean} - * @memberof ContainerConfig - */ - NetworkDisabled?: boolean | null; - /** - * MAC address of the container. - * @type {string} - * @memberof ContainerConfig - */ - MacAddress?: string | null; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @type {Array} - * @memberof ContainerConfig - */ - OnBuild?: Array | null; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ContainerConfig - */ - Labels?: { [key: string]: string }; - /** - * Signal to stop a container as a string or unsigned integer. - * - * @type {string} - * @memberof ContainerConfig - */ - StopSignal?: string | null; - /** - * Timeout to stop a container in seconds. - * @type {number} - * @memberof ContainerConfig - */ - StopTimeout?: number | null; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @type {Array} - * @memberof ContainerConfig - */ - Shell?: Array | null; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @type {string} + * @memberof ContainerConfig + */ + Hostname?: string; + /** + * The domain name to use for the container. + * + * @type {string} + * @memberof ContainerConfig + */ + Domainname?: string; + /** + * The user that commands are run as inside the container. + * @type {string} + * @memberof ContainerConfig + */ + User?: string; + /** + * Whether to attach to `stdin`. + * @type {boolean} + * @memberof ContainerConfig + */ + AttachStdin?: boolean; + /** + * Whether to attach to `stdout`. + * @type {boolean} + * @memberof ContainerConfig + */ + AttachStdout?: boolean; + /** + * Whether to attach to `stderr`. + * @type {boolean} + * @memberof ContainerConfig + */ + AttachStderr?: boolean; + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + * + * @type {{ [key: string]: object; }} + * @memberof ContainerConfig + */ + ExposedPorts?: { [key: string]: object; } | null; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @type {boolean} + * @memberof ContainerConfig + */ + Tty?: boolean; + /** + * Open `stdin` + * @type {boolean} + * @memberof ContainerConfig + */ + OpenStdin?: boolean; + /** + * Close `stdin` after one attached client disconnects + * @type {boolean} + * @memberof ContainerConfig + */ + StdinOnce?: boolean; + /** + * A list of environment variables to set inside the container in the + * form `["VAR=value", ...]`. A variable without `=` is removed from the + * environment, rather than to have an empty value. + * + * @type {Array} + * @memberof ContainerConfig + */ + Env?: Array; + /** + * Command to run specified as a string or an array of strings. + * + * @type {Array} + * @memberof ContainerConfig + */ + Cmd?: Array; + /** + * + * @type {HealthConfig} + * @memberof ContainerConfig + */ + Healthcheck?: HealthConfig; + /** + * Command is already escaped (Windows only) + * @type {boolean} + * @memberof ContainerConfig + */ + ArgsEscaped?: boolean | null; + /** + * The name (or reference) of the image to use when creating the container, + * or which was used when the container was created. + * + * @type {string} + * @memberof ContainerConfig + */ + Image?: string; + /** + * An object mapping mount point paths inside the container to empty + * objects. + * + * @type {{ [key: string]: object; }} + * @memberof ContainerConfig + */ + Volumes?: { [key: string]: object; }; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof ContainerConfig + */ + WorkingDir?: string; + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the + * entry point is reset to system default (i.e., the entry point used by + * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + * + * @type {Array} + * @memberof ContainerConfig + */ + Entrypoint?: Array; + /** + * Disable networking for the container. + * @type {boolean} + * @memberof ContainerConfig + */ + NetworkDisabled?: boolean | null; + /** + * MAC address of the container. + * @type {string} + * @memberof ContainerConfig + */ + MacAddress?: string | null; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @type {Array} + * @memberof ContainerConfig + */ + OnBuild?: Array | null; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ContainerConfig + */ + Labels?: { [key: string]: string; }; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @type {string} + * @memberof ContainerConfig + */ + StopSignal?: string | null; + /** + * Timeout to stop a container in seconds. + * @type {number} + * @memberof ContainerConfig + */ + StopTimeout?: number | null; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @type {Array} + * @memberof ContainerConfig + */ + Shell?: Array | null; } /** * Check if a given object implements the ContainerConfig interface. */ export function instanceOfContainerConfig(value: object): value is ContainerConfig { - return true; + return true; } export function ContainerConfigFromJSON(json: any): ContainerConfig { - return ContainerConfigFromJSONTyped(json, false); + return ContainerConfigFromJSONTyped(json, false); } -export function ContainerConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerConfig { - if (json == null) { - return json; - } - return { - Hostname: json["Hostname"] == null ? undefined : json["Hostname"], - Domainname: json["Domainname"] == null ? undefined : json["Domainname"], - User: json["User"] == null ? undefined : json["User"], - AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], - AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], - AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], - ExposedPorts: json["ExposedPorts"] == null ? undefined : json["ExposedPorts"], - Tty: json["Tty"] == null ? undefined : json["Tty"], - OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], - StdinOnce: json["StdinOnce"] == null ? undefined : json["StdinOnce"], - Env: json["Env"] == null ? undefined : json["Env"], - Cmd: json["Cmd"] == null ? undefined : json["Cmd"], - Healthcheck: - json["Healthcheck"] == null ? undefined : HealthConfigFromJSON(json["Healthcheck"]), - ArgsEscaped: json["ArgsEscaped"] == null ? undefined : json["ArgsEscaped"], - Image: json["Image"] == null ? undefined : json["Image"], - Volumes: json["Volumes"] == null ? undefined : json["Volumes"], - WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], - Entrypoint: json["Entrypoint"] == null ? undefined : json["Entrypoint"], - NetworkDisabled: json["NetworkDisabled"] == null ? undefined : json["NetworkDisabled"], - MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], - OnBuild: json["OnBuild"] == null ? undefined : json["OnBuild"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], - StopTimeout: json["StopTimeout"] == null ? undefined : json["StopTimeout"], - Shell: json["Shell"] == null ? undefined : json["Shell"], - }; +export function ContainerConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerConfig { + if (json == null) { + return json; + } + return { + + 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], + 'Domainname': json['Domainname'] == null ? undefined : json['Domainname'], + 'User': json['User'] == null ? undefined : json['User'], + 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], + 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], + 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], + 'ExposedPorts': json['ExposedPorts'] == null ? undefined : json['ExposedPorts'], + 'Tty': json['Tty'] == null ? undefined : json['Tty'], + 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], + 'StdinOnce': json['StdinOnce'] == null ? undefined : json['StdinOnce'], + 'Env': json['Env'] == null ? undefined : json['Env'], + 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], + 'Healthcheck': json['Healthcheck'] == null ? undefined : HealthConfigFromJSON(json['Healthcheck']), + 'ArgsEscaped': json['ArgsEscaped'] == null ? undefined : json['ArgsEscaped'], + 'Image': json['Image'] == null ? undefined : json['Image'], + 'Volumes': json['Volumes'] == null ? undefined : json['Volumes'], + 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], + 'Entrypoint': json['Entrypoint'] == null ? undefined : json['Entrypoint'], + 'NetworkDisabled': json['NetworkDisabled'] == null ? undefined : json['NetworkDisabled'], + 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], + 'OnBuild': json['OnBuild'] == null ? undefined : json['OnBuild'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], + 'StopTimeout': json['StopTimeout'] == null ? undefined : json['StopTimeout'], + 'Shell': json['Shell'] == null ? undefined : json['Shell'], + }; } export function ContainerConfigToJSON(json: any): ContainerConfig { - return ContainerConfigToJSONTyped(json, false); + return ContainerConfigToJSONTyped(json, false); } -export function ContainerConfigToJSONTyped( - value?: ContainerConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerConfigToJSONTyped(value?: ContainerConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Hostname: value["Hostname"], - Domainname: value["Domainname"], - User: value["User"], - AttachStdin: value["AttachStdin"], - AttachStdout: value["AttachStdout"], - AttachStderr: value["AttachStderr"], - ExposedPorts: value["ExposedPorts"], - Tty: value["Tty"], - OpenStdin: value["OpenStdin"], - StdinOnce: value["StdinOnce"], - Env: value["Env"], - Cmd: value["Cmd"], - Healthcheck: HealthConfigToJSON(value["Healthcheck"]), - ArgsEscaped: value["ArgsEscaped"], - Image: value["Image"], - Volumes: value["Volumes"], - WorkingDir: value["WorkingDir"], - Entrypoint: value["Entrypoint"], - NetworkDisabled: value["NetworkDisabled"], - MacAddress: value["MacAddress"], - OnBuild: value["OnBuild"], - Labels: value["Labels"], - StopSignal: value["StopSignal"], - StopTimeout: value["StopTimeout"], - Shell: value["Shell"], - }; + return { + + 'Hostname': value['Hostname'], + 'Domainname': value['Domainname'], + 'User': value['User'], + 'AttachStdin': value['AttachStdin'], + 'AttachStdout': value['AttachStdout'], + 'AttachStderr': value['AttachStderr'], + 'ExposedPorts': value['ExposedPorts'], + 'Tty': value['Tty'], + 'OpenStdin': value['OpenStdin'], + 'StdinOnce': value['StdinOnce'], + 'Env': value['Env'], + 'Cmd': value['Cmd'], + 'Healthcheck': HealthConfigToJSON(value['Healthcheck']), + 'ArgsEscaped': value['ArgsEscaped'], + 'Image': value['Image'], + 'Volumes': value['Volumes'], + 'WorkingDir': value['WorkingDir'], + 'Entrypoint': value['Entrypoint'], + 'NetworkDisabled': value['NetworkDisabled'], + 'MacAddress': value['MacAddress'], + 'OnBuild': value['OnBuild'], + 'Labels': value['Labels'], + 'StopSignal': value['StopSignal'], + 'StopTimeout': value['StopTimeout'], + 'Shell': value['Shell'], + }; } + diff --git a/src/clients/docker/models/ContainerCreateRequest.ts b/src/clients/docker/models/ContainerCreateRequest.ts index b7a509d6fb..926526a5f3 100644 --- a/src/clients/docker/models/ContainerCreateRequest.ts +++ b/src/clients/docker/models/ContainerCreateRequest.ts @@ -2,323 +2,316 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { NetworkingConfig } from "./NetworkingConfig"; +import { mapValues } from '../runtime'; +import type { NetworkingConfig } from './NetworkingConfig'; import { - NetworkingConfigFromJSON, - NetworkingConfigFromJSONTyped, - NetworkingConfigToJSON, - NetworkingConfigToJSONTyped, -} from "./NetworkingConfig"; -import type { HealthConfig } from "./HealthConfig"; + NetworkingConfigFromJSON, + NetworkingConfigFromJSONTyped, + NetworkingConfigToJSON, + NetworkingConfigToJSONTyped, +} from './NetworkingConfig'; +import type { HealthConfig } from './HealthConfig'; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from "./HealthConfig"; -import type { HostConfig } from "./HostConfig"; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from './HealthConfig'; +import type { HostConfig } from './HostConfig'; import { - HostConfigFromJSON, - HostConfigFromJSONTyped, - HostConfigToJSON, - HostConfigToJSONTyped, -} from "./HostConfig"; + HostConfigFromJSON, + HostConfigFromJSONTyped, + HostConfigToJSON, + HostConfigToJSONTyped, +} from './HostConfig'; /** - * + * * @export * @interface ContainerCreateRequest */ export interface ContainerCreateRequest { - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - Hostname?: string; - /** - * The domain name to use for the container. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - Domainname?: string; - /** - * The user that commands are run as inside the container. - * @type {string} - * @memberof ContainerCreateRequest - */ - User?: string; - /** - * Whether to attach to `stdin`. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - AttachStdin?: boolean; - /** - * Whether to attach to `stdout`. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - AttachStdout?: boolean; - /** - * Whether to attach to `stderr`. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - AttachStderr?: boolean; - /** - * An object mapping ports to an empty object in the form: - * - * `{"/": {}}` - * - * @type {{ [key: string]: object; }} - * @memberof ContainerCreateRequest - */ - ExposedPorts?: { [key: string]: object } | null; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @type {boolean} - * @memberof ContainerCreateRequest - */ - Tty?: boolean; - /** - * Open `stdin` - * @type {boolean} - * @memberof ContainerCreateRequest - */ - OpenStdin?: boolean; - /** - * Close `stdin` after one attached client disconnects - * @type {boolean} - * @memberof ContainerCreateRequest - */ - StdinOnce?: boolean; - /** - * A list of environment variables to set inside the container in the - * form `["VAR=value", ...]`. A variable without `=` is removed from the - * environment, rather than to have an empty value. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Env?: Array; - /** - * Command to run specified as a string or an array of strings. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Cmd?: Array; - /** - * - * @type {HealthConfig} - * @memberof ContainerCreateRequest - */ - Healthcheck?: HealthConfig; - /** - * Command is already escaped (Windows only) - * @type {boolean} - * @memberof ContainerCreateRequest - */ - ArgsEscaped?: boolean | null; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - Image?: string; - /** - * An object mapping mount point paths inside the container to empty - * objects. - * - * @type {{ [key: string]: object; }} - * @memberof ContainerCreateRequest - */ - Volumes?: { [key: string]: object }; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof ContainerCreateRequest - */ - WorkingDir?: string; - /** - * The entry point for the container as a string or an array of strings. - * - * If the array consists of exactly one empty string (`[""]`) then the - * entry point is reset to system default (i.e., the entry point used by - * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Entrypoint?: Array; - /** - * Disable networking for the container. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - NetworkDisabled?: boolean | null; - /** - * MAC address of the container. - * @type {string} - * @memberof ContainerCreateRequest - */ - MacAddress?: string | null; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - OnBuild?: Array | null; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ContainerCreateRequest - */ - Labels?: { [key: string]: string }; - /** - * Signal to stop a container as a string or unsigned integer. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - StopSignal?: string | null; - /** - * Timeout to stop a container in seconds. - * @type {number} - * @memberof ContainerCreateRequest - */ - StopTimeout?: number | null; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Shell?: Array | null; - /** - * - * @type {HostConfig} - * @memberof ContainerCreateRequest - */ - HostConfig?: HostConfig; - /** - * - * @type {NetworkingConfig} - * @memberof ContainerCreateRequest - */ - NetworkingConfig?: NetworkingConfig; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + Hostname?: string; + /** + * The domain name to use for the container. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + Domainname?: string; + /** + * The user that commands are run as inside the container. + * @type {string} + * @memberof ContainerCreateRequest + */ + User?: string; + /** + * Whether to attach to `stdin`. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + AttachStdin?: boolean; + /** + * Whether to attach to `stdout`. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + AttachStdout?: boolean; + /** + * Whether to attach to `stderr`. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + AttachStderr?: boolean; + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + * + * @type {{ [key: string]: object; }} + * @memberof ContainerCreateRequest + */ + ExposedPorts?: { [key: string]: object; } | null; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @type {boolean} + * @memberof ContainerCreateRequest + */ + Tty?: boolean; + /** + * Open `stdin` + * @type {boolean} + * @memberof ContainerCreateRequest + */ + OpenStdin?: boolean; + /** + * Close `stdin` after one attached client disconnects + * @type {boolean} + * @memberof ContainerCreateRequest + */ + StdinOnce?: boolean; + /** + * A list of environment variables to set inside the container in the + * form `["VAR=value", ...]`. A variable without `=` is removed from the + * environment, rather than to have an empty value. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Env?: Array; + /** + * Command to run specified as a string or an array of strings. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Cmd?: Array; + /** + * + * @type {HealthConfig} + * @memberof ContainerCreateRequest + */ + Healthcheck?: HealthConfig; + /** + * Command is already escaped (Windows only) + * @type {boolean} + * @memberof ContainerCreateRequest + */ + ArgsEscaped?: boolean | null; + /** + * The name (or reference) of the image to use when creating the container, + * or which was used when the container was created. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + Image?: string; + /** + * An object mapping mount point paths inside the container to empty + * objects. + * + * @type {{ [key: string]: object; }} + * @memberof ContainerCreateRequest + */ + Volumes?: { [key: string]: object; }; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof ContainerCreateRequest + */ + WorkingDir?: string; + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the + * entry point is reset to system default (i.e., the entry point used by + * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Entrypoint?: Array; + /** + * Disable networking for the container. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + NetworkDisabled?: boolean | null; + /** + * MAC address of the container. + * @type {string} + * @memberof ContainerCreateRequest + */ + MacAddress?: string | null; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + OnBuild?: Array | null; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ContainerCreateRequest + */ + Labels?: { [key: string]: string; }; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + StopSignal?: string | null; + /** + * Timeout to stop a container in seconds. + * @type {number} + * @memberof ContainerCreateRequest + */ + StopTimeout?: number | null; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Shell?: Array | null; + /** + * + * @type {HostConfig} + * @memberof ContainerCreateRequest + */ + HostConfig?: HostConfig; + /** + * + * @type {NetworkingConfig} + * @memberof ContainerCreateRequest + */ + NetworkingConfig?: NetworkingConfig; } /** * Check if a given object implements the ContainerCreateRequest interface. */ export function instanceOfContainerCreateRequest(value: object): value is ContainerCreateRequest { - return true; + return true; } export function ContainerCreateRequestFromJSON(json: any): ContainerCreateRequest { - return ContainerCreateRequestFromJSONTyped(json, false); + return ContainerCreateRequestFromJSONTyped(json, false); } -export function ContainerCreateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerCreateRequest { - if (json == null) { - return json; - } - return { - Hostname: json["Hostname"] == null ? undefined : json["Hostname"], - Domainname: json["Domainname"] == null ? undefined : json["Domainname"], - User: json["User"] == null ? undefined : json["User"], - AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], - AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], - AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], - ExposedPorts: json["ExposedPorts"] == null ? undefined : json["ExposedPorts"], - Tty: json["Tty"] == null ? undefined : json["Tty"], - OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], - StdinOnce: json["StdinOnce"] == null ? undefined : json["StdinOnce"], - Env: json["Env"] == null ? undefined : json["Env"], - Cmd: json["Cmd"] == null ? undefined : json["Cmd"], - Healthcheck: - json["Healthcheck"] == null ? undefined : HealthConfigFromJSON(json["Healthcheck"]), - ArgsEscaped: json["ArgsEscaped"] == null ? undefined : json["ArgsEscaped"], - Image: json["Image"] == null ? undefined : json["Image"], - Volumes: json["Volumes"] == null ? undefined : json["Volumes"], - WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], - Entrypoint: json["Entrypoint"] == null ? undefined : json["Entrypoint"], - NetworkDisabled: json["NetworkDisabled"] == null ? undefined : json["NetworkDisabled"], - MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], - OnBuild: json["OnBuild"] == null ? undefined : json["OnBuild"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], - StopTimeout: json["StopTimeout"] == null ? undefined : json["StopTimeout"], - Shell: json["Shell"] == null ? undefined : json["Shell"], - HostConfig: json["HostConfig"] == null ? undefined : HostConfigFromJSON(json["HostConfig"]), - NetworkingConfig: - json["NetworkingConfig"] == null - ? undefined - : NetworkingConfigFromJSON(json["NetworkingConfig"]), - }; +export function ContainerCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerCreateRequest { + if (json == null) { + return json; + } + return { + + 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], + 'Domainname': json['Domainname'] == null ? undefined : json['Domainname'], + 'User': json['User'] == null ? undefined : json['User'], + 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], + 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], + 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], + 'ExposedPorts': json['ExposedPorts'] == null ? undefined : json['ExposedPorts'], + 'Tty': json['Tty'] == null ? undefined : json['Tty'], + 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], + 'StdinOnce': json['StdinOnce'] == null ? undefined : json['StdinOnce'], + 'Env': json['Env'] == null ? undefined : json['Env'], + 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], + 'Healthcheck': json['Healthcheck'] == null ? undefined : HealthConfigFromJSON(json['Healthcheck']), + 'ArgsEscaped': json['ArgsEscaped'] == null ? undefined : json['ArgsEscaped'], + 'Image': json['Image'] == null ? undefined : json['Image'], + 'Volumes': json['Volumes'] == null ? undefined : json['Volumes'], + 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], + 'Entrypoint': json['Entrypoint'] == null ? undefined : json['Entrypoint'], + 'NetworkDisabled': json['NetworkDisabled'] == null ? undefined : json['NetworkDisabled'], + 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], + 'OnBuild': json['OnBuild'] == null ? undefined : json['OnBuild'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], + 'StopTimeout': json['StopTimeout'] == null ? undefined : json['StopTimeout'], + 'Shell': json['Shell'] == null ? undefined : json['Shell'], + 'HostConfig': json['HostConfig'] == null ? undefined : HostConfigFromJSON(json['HostConfig']), + 'NetworkingConfig': json['NetworkingConfig'] == null ? undefined : NetworkingConfigFromJSON(json['NetworkingConfig']), + }; } export function ContainerCreateRequestToJSON(json: any): ContainerCreateRequest { - return ContainerCreateRequestToJSONTyped(json, false); + return ContainerCreateRequestToJSONTyped(json, false); } -export function ContainerCreateRequestToJSONTyped( - value?: ContainerCreateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerCreateRequestToJSONTyped(value?: ContainerCreateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Hostname: value["Hostname"], - Domainname: value["Domainname"], - User: value["User"], - AttachStdin: value["AttachStdin"], - AttachStdout: value["AttachStdout"], - AttachStderr: value["AttachStderr"], - ExposedPorts: value["ExposedPorts"], - Tty: value["Tty"], - OpenStdin: value["OpenStdin"], - StdinOnce: value["StdinOnce"], - Env: value["Env"], - Cmd: value["Cmd"], - Healthcheck: HealthConfigToJSON(value["Healthcheck"]), - ArgsEscaped: value["ArgsEscaped"], - Image: value["Image"], - Volumes: value["Volumes"], - WorkingDir: value["WorkingDir"], - Entrypoint: value["Entrypoint"], - NetworkDisabled: value["NetworkDisabled"], - MacAddress: value["MacAddress"], - OnBuild: value["OnBuild"], - Labels: value["Labels"], - StopSignal: value["StopSignal"], - StopTimeout: value["StopTimeout"], - Shell: value["Shell"], - HostConfig: HostConfigToJSON(value["HostConfig"]), - NetworkingConfig: NetworkingConfigToJSON(value["NetworkingConfig"]), - }; + return { + + 'Hostname': value['Hostname'], + 'Domainname': value['Domainname'], + 'User': value['User'], + 'AttachStdin': value['AttachStdin'], + 'AttachStdout': value['AttachStdout'], + 'AttachStderr': value['AttachStderr'], + 'ExposedPorts': value['ExposedPorts'], + 'Tty': value['Tty'], + 'OpenStdin': value['OpenStdin'], + 'StdinOnce': value['StdinOnce'], + 'Env': value['Env'], + 'Cmd': value['Cmd'], + 'Healthcheck': HealthConfigToJSON(value['Healthcheck']), + 'ArgsEscaped': value['ArgsEscaped'], + 'Image': value['Image'], + 'Volumes': value['Volumes'], + 'WorkingDir': value['WorkingDir'], + 'Entrypoint': value['Entrypoint'], + 'NetworkDisabled': value['NetworkDisabled'], + 'MacAddress': value['MacAddress'], + 'OnBuild': value['OnBuild'], + 'Labels': value['Labels'], + 'StopSignal': value['StopSignal'], + 'StopTimeout': value['StopTimeout'], + 'Shell': value['Shell'], + 'HostConfig': HostConfigToJSON(value['HostConfig']), + 'NetworkingConfig': NetworkingConfigToJSON(value['NetworkingConfig']), + }; } + diff --git a/src/clients/docker/models/ContainerCreateResponse.ts b/src/clients/docker/models/ContainerCreateResponse.ts index 8c81d17b8f..2d661abdd8 100644 --- a/src/clients/docker/models/ContainerCreateResponse.ts +++ b/src/clients/docker/models/ContainerCreateResponse.ts @@ -2,77 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * OK response to ContainerCreate operation * @export * @interface ContainerCreateResponse */ export interface ContainerCreateResponse { - /** - * The ID of the created container - * @type {string} - * @memberof ContainerCreateResponse - */ - Id: string; - /** - * Warnings encountered when creating the container - * @type {Array} - * @memberof ContainerCreateResponse - */ - Warnings: Array; + /** + * The ID of the created container + * @type {string} + * @memberof ContainerCreateResponse + */ + Id: string; + /** + * Warnings encountered when creating the container + * @type {Array} + * @memberof ContainerCreateResponse + */ + Warnings: Array; } /** * Check if a given object implements the ContainerCreateResponse interface. */ export function instanceOfContainerCreateResponse(value: object): value is ContainerCreateResponse { - if (!("Id" in value) || value["Id"] === undefined) return false; - if (!("Warnings" in value) || value["Warnings"] === undefined) return false; - return true; + if (!('Id' in value) || value['Id'] === undefined) return false; + if (!('Warnings' in value) || value['Warnings'] === undefined) return false; + return true; } export function ContainerCreateResponseFromJSON(json: any): ContainerCreateResponse { - return ContainerCreateResponseFromJSONTyped(json, false); + return ContainerCreateResponseFromJSONTyped(json, false); } -export function ContainerCreateResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerCreateResponse { - if (json == null) { - return json; - } - return { - Id: json["Id"], - Warnings: json["Warnings"], - }; +export function ContainerCreateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerCreateResponse { + if (json == null) { + return json; + } + return { + + 'Id': json['Id'], + 'Warnings': json['Warnings'], + }; } export function ContainerCreateResponseToJSON(json: any): ContainerCreateResponse { - return ContainerCreateResponseToJSONTyped(json, false); + return ContainerCreateResponseToJSONTyped(json, false); } -export function ContainerCreateResponseToJSONTyped( - value?: ContainerCreateResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerCreateResponseToJSONTyped(value?: ContainerCreateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - Warnings: value["Warnings"], - }; + return { + + 'Id': value['Id'], + 'Warnings': value['Warnings'], + }; } + diff --git a/src/clients/docker/models/ContainerInspectResponse.ts b/src/clients/docker/models/ContainerInspectResponse.ts index 0677f3145d..29abce1121 100644 --- a/src/clients/docker/models/ContainerInspectResponse.ts +++ b/src/clients/docker/models/ContainerInspectResponse.ts @@ -2,312 +2,301 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ContainerConfig } from "./ContainerConfig"; +import { mapValues } from '../runtime'; +import type { ContainerConfig } from './ContainerConfig'; import { - ContainerConfigFromJSON, - ContainerConfigFromJSONTyped, - ContainerConfigToJSON, - ContainerConfigToJSONTyped, -} from "./ContainerConfig"; -import type { MountPoint } from "./MountPoint"; + ContainerConfigFromJSON, + ContainerConfigFromJSONTyped, + ContainerConfigToJSON, + ContainerConfigToJSONTyped, +} from './ContainerConfig'; +import type { MountPoint } from './MountPoint'; import { - MountPointFromJSON, - MountPointFromJSONTyped, - MountPointToJSON, - MountPointToJSONTyped, -} from "./MountPoint"; -import type { NetworkSettings } from "./NetworkSettings"; + MountPointFromJSON, + MountPointFromJSONTyped, + MountPointToJSON, + MountPointToJSONTyped, +} from './MountPoint'; +import type { NetworkSettings } from './NetworkSettings'; import { - NetworkSettingsFromJSON, - NetworkSettingsFromJSONTyped, - NetworkSettingsToJSON, - NetworkSettingsToJSONTyped, -} from "./NetworkSettings"; -import type { HostConfig } from "./HostConfig"; + NetworkSettingsFromJSON, + NetworkSettingsFromJSONTyped, + NetworkSettingsToJSON, + NetworkSettingsToJSONTyped, +} from './NetworkSettings'; +import type { HostConfig } from './HostConfig'; import { - HostConfigFromJSON, - HostConfigFromJSONTyped, - HostConfigToJSON, - HostConfigToJSONTyped, -} from "./HostConfig"; -import type { GraphDriverData } from "./GraphDriverData"; + HostConfigFromJSON, + HostConfigFromJSONTyped, + HostConfigToJSON, + HostConfigToJSONTyped, +} from './HostConfig'; +import type { GraphDriverData } from './GraphDriverData'; import { - GraphDriverDataFromJSON, - GraphDriverDataFromJSONTyped, - GraphDriverDataToJSON, - GraphDriverDataToJSONTyped, -} from "./GraphDriverData"; -import type { ContainerState } from "./ContainerState"; + GraphDriverDataFromJSON, + GraphDriverDataFromJSONTyped, + GraphDriverDataToJSON, + GraphDriverDataToJSONTyped, +} from './GraphDriverData'; +import type { ContainerState } from './ContainerState'; import { - ContainerStateFromJSON, - ContainerStateFromJSONTyped, - ContainerStateToJSON, - ContainerStateToJSONTyped, -} from "./ContainerState"; + ContainerStateFromJSON, + ContainerStateFromJSONTyped, + ContainerStateToJSON, + ContainerStateToJSONTyped, +} from './ContainerState'; /** - * + * * @export * @interface ContainerInspectResponse */ export interface ContainerInspectResponse { - /** - * The ID of the container - * @type {string} - * @memberof ContainerInspectResponse - */ - Id?: string; - /** - * The time the container was created - * @type {string} - * @memberof ContainerInspectResponse - */ - Created?: string; - /** - * The path to the command being run - * @type {string} - * @memberof ContainerInspectResponse - */ - Path?: string; - /** - * The arguments to the command being run - * @type {Array} - * @memberof ContainerInspectResponse - */ - Args?: Array; - /** - * - * @type {ContainerState} - * @memberof ContainerInspectResponse - */ - State?: ContainerState | null; - /** - * The container's image ID - * @type {string} - * @memberof ContainerInspectResponse - */ - Image?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - ResolvConfPath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - HostnamePath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - HostsPath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - LogPath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - Name?: string; - /** - * - * @type {number} - * @memberof ContainerInspectResponse - */ - RestartCount?: number; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - Driver?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - Platform?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - MountLabel?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - ProcessLabel?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - AppArmorProfile?: string; - /** - * IDs of exec instances that are running in the container. - * @type {Array} - * @memberof ContainerInspectResponse - */ - ExecIDs?: Array | null; - /** - * - * @type {HostConfig} - * @memberof ContainerInspectResponse - */ - HostConfig?: HostConfig; - /** - * - * @type {GraphDriverData} - * @memberof ContainerInspectResponse - */ - GraphDriver?: GraphDriverData; - /** - * The size of files that have been created or changed by this - * container. - * - * @type {number} - * @memberof ContainerInspectResponse - */ - SizeRw?: number; - /** - * The total size of all the files in this container. - * @type {number} - * @memberof ContainerInspectResponse - */ - SizeRootFs?: number; - /** - * - * @type {Array} - * @memberof ContainerInspectResponse - */ - Mounts?: Array; - /** - * - * @type {ContainerConfig} - * @memberof ContainerInspectResponse - */ - Config?: ContainerConfig; - /** - * - * @type {NetworkSettings} - * @memberof ContainerInspectResponse - */ - NetworkSettings?: NetworkSettings; + /** + * The ID of the container + * @type {string} + * @memberof ContainerInspectResponse + */ + Id?: string; + /** + * The time the container was created + * @type {string} + * @memberof ContainerInspectResponse + */ + Created?: string; + /** + * The path to the command being run + * @type {string} + * @memberof ContainerInspectResponse + */ + Path?: string; + /** + * The arguments to the command being run + * @type {Array} + * @memberof ContainerInspectResponse + */ + Args?: Array; + /** + * + * @type {ContainerState} + * @memberof ContainerInspectResponse + */ + State?: ContainerState | null; + /** + * The container's image ID + * @type {string} + * @memberof ContainerInspectResponse + */ + Image?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + ResolvConfPath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + HostnamePath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + HostsPath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + LogPath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + Name?: string; + /** + * + * @type {number} + * @memberof ContainerInspectResponse + */ + RestartCount?: number; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + Driver?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + Platform?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + MountLabel?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + ProcessLabel?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + AppArmorProfile?: string; + /** + * IDs of exec instances that are running in the container. + * @type {Array} + * @memberof ContainerInspectResponse + */ + ExecIDs?: Array | null; + /** + * + * @type {HostConfig} + * @memberof ContainerInspectResponse + */ + HostConfig?: HostConfig; + /** + * + * @type {GraphDriverData} + * @memberof ContainerInspectResponse + */ + GraphDriver?: GraphDriverData; + /** + * The size of files that have been created or changed by this + * container. + * + * @type {number} + * @memberof ContainerInspectResponse + */ + SizeRw?: number; + /** + * The total size of all the files in this container. + * @type {number} + * @memberof ContainerInspectResponse + */ + SizeRootFs?: number; + /** + * + * @type {Array} + * @memberof ContainerInspectResponse + */ + Mounts?: Array; + /** + * + * @type {ContainerConfig} + * @memberof ContainerInspectResponse + */ + Config?: ContainerConfig; + /** + * + * @type {NetworkSettings} + * @memberof ContainerInspectResponse + */ + NetworkSettings?: NetworkSettings; } /** * Check if a given object implements the ContainerInspectResponse interface. */ -export function instanceOfContainerInspectResponse( - value: object, -): value is ContainerInspectResponse { - return true; +export function instanceOfContainerInspectResponse(value: object): value is ContainerInspectResponse { + return true; } export function ContainerInspectResponseFromJSON(json: any): ContainerInspectResponse { - return ContainerInspectResponseFromJSONTyped(json, false); + return ContainerInspectResponseFromJSONTyped(json, false); } -export function ContainerInspectResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerInspectResponse { - if (json == null) { - return json; - } - return { - Id: json["Id"] == null ? undefined : json["Id"], - Created: json["Created"] == null ? undefined : json["Created"], - Path: json["Path"] == null ? undefined : json["Path"], - Args: json["Args"] == null ? undefined : json["Args"], - State: json["State"] == null ? undefined : ContainerStateFromJSON(json["State"]), - Image: json["Image"] == null ? undefined : json["Image"], - ResolvConfPath: json["ResolvConfPath"] == null ? undefined : json["ResolvConfPath"], - HostnamePath: json["HostnamePath"] == null ? undefined : json["HostnamePath"], - HostsPath: json["HostsPath"] == null ? undefined : json["HostsPath"], - LogPath: json["LogPath"] == null ? undefined : json["LogPath"], - Name: json["Name"] == null ? undefined : json["Name"], - RestartCount: json["RestartCount"] == null ? undefined : json["RestartCount"], - Driver: json["Driver"] == null ? undefined : json["Driver"], - Platform: json["Platform"] == null ? undefined : json["Platform"], - MountLabel: json["MountLabel"] == null ? undefined : json["MountLabel"], - ProcessLabel: json["ProcessLabel"] == null ? undefined : json["ProcessLabel"], - AppArmorProfile: json["AppArmorProfile"] == null ? undefined : json["AppArmorProfile"], - ExecIDs: json["ExecIDs"] == null ? undefined : json["ExecIDs"], - HostConfig: json["HostConfig"] == null ? undefined : HostConfigFromJSON(json["HostConfig"]), - GraphDriver: - json["GraphDriver"] == null ? undefined : GraphDriverDataFromJSON(json["GraphDriver"]), - SizeRw: json["SizeRw"] == null ? undefined : json["SizeRw"], - SizeRootFs: json["SizeRootFs"] == null ? undefined : json["SizeRootFs"], - Mounts: - json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountPointFromJSON), - Config: json["Config"] == null ? undefined : ContainerConfigFromJSON(json["Config"]), - NetworkSettings: - json["NetworkSettings"] == null - ? undefined - : NetworkSettingsFromJSON(json["NetworkSettings"]), - }; +export function ContainerInspectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerInspectResponse { + if (json == null) { + return json; + } + return { + + 'Id': json['Id'] == null ? undefined : json['Id'], + 'Created': json['Created'] == null ? undefined : json['Created'], + 'Path': json['Path'] == null ? undefined : json['Path'], + 'Args': json['Args'] == null ? undefined : json['Args'], + 'State': json['State'] == null ? undefined : ContainerStateFromJSON(json['State']), + 'Image': json['Image'] == null ? undefined : json['Image'], + 'ResolvConfPath': json['ResolvConfPath'] == null ? undefined : json['ResolvConfPath'], + 'HostnamePath': json['HostnamePath'] == null ? undefined : json['HostnamePath'], + 'HostsPath': json['HostsPath'] == null ? undefined : json['HostsPath'], + 'LogPath': json['LogPath'] == null ? undefined : json['LogPath'], + 'Name': json['Name'] == null ? undefined : json['Name'], + 'RestartCount': json['RestartCount'] == null ? undefined : json['RestartCount'], + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'Platform': json['Platform'] == null ? undefined : json['Platform'], + 'MountLabel': json['MountLabel'] == null ? undefined : json['MountLabel'], + 'ProcessLabel': json['ProcessLabel'] == null ? undefined : json['ProcessLabel'], + 'AppArmorProfile': json['AppArmorProfile'] == null ? undefined : json['AppArmorProfile'], + 'ExecIDs': json['ExecIDs'] == null ? undefined : json['ExecIDs'], + 'HostConfig': json['HostConfig'] == null ? undefined : HostConfigFromJSON(json['HostConfig']), + 'GraphDriver': json['GraphDriver'] == null ? undefined : GraphDriverDataFromJSON(json['GraphDriver']), + 'SizeRw': json['SizeRw'] == null ? undefined : json['SizeRw'], + 'SizeRootFs': json['SizeRootFs'] == null ? undefined : json['SizeRootFs'], + 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountPointFromJSON)), + 'Config': json['Config'] == null ? undefined : ContainerConfigFromJSON(json['Config']), + 'NetworkSettings': json['NetworkSettings'] == null ? undefined : NetworkSettingsFromJSON(json['NetworkSettings']), + }; } export function ContainerInspectResponseToJSON(json: any): ContainerInspectResponse { - return ContainerInspectResponseToJSONTyped(json, false); + return ContainerInspectResponseToJSONTyped(json, false); } -export function ContainerInspectResponseToJSONTyped( - value?: ContainerInspectResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerInspectResponseToJSONTyped(value?: ContainerInspectResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - Created: value["Created"], - Path: value["Path"], - Args: value["Args"], - State: ContainerStateToJSON(value["State"]), - Image: value["Image"], - ResolvConfPath: value["ResolvConfPath"], - HostnamePath: value["HostnamePath"], - HostsPath: value["HostsPath"], - LogPath: value["LogPath"], - Name: value["Name"], - RestartCount: value["RestartCount"], - Driver: value["Driver"], - Platform: value["Platform"], - MountLabel: value["MountLabel"], - ProcessLabel: value["ProcessLabel"], - AppArmorProfile: value["AppArmorProfile"], - ExecIDs: value["ExecIDs"], - HostConfig: HostConfigToJSON(value["HostConfig"]), - GraphDriver: GraphDriverDataToJSON(value["GraphDriver"]), - SizeRw: value["SizeRw"], - SizeRootFs: value["SizeRootFs"], - Mounts: - value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountPointToJSON), - Config: ContainerConfigToJSON(value["Config"]), - NetworkSettings: NetworkSettingsToJSON(value["NetworkSettings"]), - }; + return { + + 'Id': value['Id'], + 'Created': value['Created'], + 'Path': value['Path'], + 'Args': value['Args'], + 'State': ContainerStateToJSON(value['State']), + 'Image': value['Image'], + 'ResolvConfPath': value['ResolvConfPath'], + 'HostnamePath': value['HostnamePath'], + 'HostsPath': value['HostsPath'], + 'LogPath': value['LogPath'], + 'Name': value['Name'], + 'RestartCount': value['RestartCount'], + 'Driver': value['Driver'], + 'Platform': value['Platform'], + 'MountLabel': value['MountLabel'], + 'ProcessLabel': value['ProcessLabel'], + 'AppArmorProfile': value['AppArmorProfile'], + 'ExecIDs': value['ExecIDs'], + 'HostConfig': HostConfigToJSON(value['HostConfig']), + 'GraphDriver': GraphDriverDataToJSON(value['GraphDriver']), + 'SizeRw': value['SizeRw'], + 'SizeRootFs': value['SizeRootFs'], + 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountPointToJSON)), + 'Config': ContainerConfigToJSON(value['Config']), + 'NetworkSettings': NetworkSettingsToJSON(value['NetworkSettings']), + }; } + diff --git a/src/clients/docker/models/ContainerPruneResponse.ts b/src/clients/docker/models/ContainerPruneResponse.ts index ff05761107..8bcce1cdb6 100644 --- a/src/clients/docker/models/ContainerPruneResponse.ts +++ b/src/clients/docker/models/ContainerPruneResponse.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ContainerPruneResponse */ export interface ContainerPruneResponse { - /** - * Container IDs that were deleted - * @type {Array} - * @memberof ContainerPruneResponse - */ - ContainersDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof ContainerPruneResponse - */ - SpaceReclaimed?: number; + /** + * Container IDs that were deleted + * @type {Array} + * @memberof ContainerPruneResponse + */ + ContainersDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof ContainerPruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the ContainerPruneResponse interface. */ export function instanceOfContainerPruneResponse(value: object): value is ContainerPruneResponse { - return true; + return true; } export function ContainerPruneResponseFromJSON(json: any): ContainerPruneResponse { - return ContainerPruneResponseFromJSONTyped(json, false); + return ContainerPruneResponseFromJSONTyped(json, false); } -export function ContainerPruneResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerPruneResponse { - if (json == null) { - return json; - } - return { - ContainersDeleted: json["ContainersDeleted"] == null ? undefined : json["ContainersDeleted"], - SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], - }; +export function ContainerPruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerPruneResponse { + if (json == null) { + return json; + } + return { + + 'ContainersDeleted': json['ContainersDeleted'] == null ? undefined : json['ContainersDeleted'], + 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], + }; } export function ContainerPruneResponseToJSON(json: any): ContainerPruneResponse { - return ContainerPruneResponseToJSONTyped(json, false); + return ContainerPruneResponseToJSONTyped(json, false); } -export function ContainerPruneResponseToJSONTyped( - value?: ContainerPruneResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerPruneResponseToJSONTyped(value?: ContainerPruneResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ContainersDeleted: value["ContainersDeleted"], - SpaceReclaimed: value["SpaceReclaimed"], - }; + return { + + 'ContainersDeleted': value['ContainersDeleted'], + 'SpaceReclaimed': value['SpaceReclaimed'], + }; } + diff --git a/src/clients/docker/models/ContainerState.ts b/src/clients/docker/models/ContainerState.ts index 3962e95c15..445dab13f1 100644 --- a/src/clients/docker/models/ContainerState.ts +++ b/src/clients/docker/models/ContainerState.ts @@ -2,188 +2,191 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Health } from "./Health"; -import { HealthFromJSON, HealthFromJSONTyped, HealthToJSON, HealthToJSONTyped } from "./Health"; +import { mapValues } from '../runtime'; +import type { Health } from './Health'; +import { + HealthFromJSON, + HealthFromJSONTyped, + HealthToJSON, + HealthToJSONTyped, +} from './Health'; /** * ContainerState stores container's running state. It's part of ContainerJSONBase * and will be returned by the "inspect" command. - * + * * @export * @interface ContainerState */ export interface ContainerState { - /** - * String representation of the container state. Can be one of "created", - * "running", "paused", "restarting", "removing", "exited", or "dead". - * - * @type {string} - * @memberof ContainerState - */ - Status?: ContainerStateStatusEnum; - /** - * Whether this container is running. - * - * Note that a running container can be _paused_. The `Running` and `Paused` - * booleans are not mutually exclusive: - * - * When pausing a container (on Linux), the freezer cgroup is used to suspend - * all processes in the container. Freezing the process requires the process to - * be running. As a result, paused containers are both `Running` _and_ `Paused`. - * - * Use the `Status` field instead to determine if a container's state is "running". - * - * @type {boolean} - * @memberof ContainerState - */ - Running?: boolean; - /** - * Whether this container is paused. - * @type {boolean} - * @memberof ContainerState - */ - Paused?: boolean; - /** - * Whether this container is restarting. - * @type {boolean} - * @memberof ContainerState - */ - Restarting?: boolean; - /** - * Whether a process within this container has been killed because it ran - * out of memory since the container was last started. - * - * @type {boolean} - * @memberof ContainerState - */ - OOMKilled?: boolean; - /** - * - * @type {boolean} - * @memberof ContainerState - */ - Dead?: boolean; - /** - * The process ID of this container - * @type {number} - * @memberof ContainerState - */ - Pid?: number; - /** - * The last exit code of this container - * @type {number} - * @memberof ContainerState - */ - ExitCode?: number; - /** - * - * @type {string} - * @memberof ContainerState - */ - Error?: string; - /** - * The time when this container was last started. - * @type {string} - * @memberof ContainerState - */ - StartedAt?: string; - /** - * The time when this container last exited. - * @type {string} - * @memberof ContainerState - */ - FinishedAt?: string; - /** - * - * @type {Health} - * @memberof ContainerState - */ - Health?: Health | null; + /** + * String representation of the container state. Can be one of "created", + * "running", "paused", "restarting", "removing", "exited", or "dead". + * + * @type {string} + * @memberof ContainerState + */ + Status?: ContainerStateStatusEnum; + /** + * Whether this container is running. + * + * Note that a running container can be _paused_. The `Running` and `Paused` + * booleans are not mutually exclusive: + * + * When pausing a container (on Linux), the freezer cgroup is used to suspend + * all processes in the container. Freezing the process requires the process to + * be running. As a result, paused containers are both `Running` _and_ `Paused`. + * + * Use the `Status` field instead to determine if a container's state is "running". + * + * @type {boolean} + * @memberof ContainerState + */ + Running?: boolean; + /** + * Whether this container is paused. + * @type {boolean} + * @memberof ContainerState + */ + Paused?: boolean; + /** + * Whether this container is restarting. + * @type {boolean} + * @memberof ContainerState + */ + Restarting?: boolean; + /** + * Whether a process within this container has been killed because it ran + * out of memory since the container was last started. + * + * @type {boolean} + * @memberof ContainerState + */ + OOMKilled?: boolean; + /** + * + * @type {boolean} + * @memberof ContainerState + */ + Dead?: boolean; + /** + * The process ID of this container + * @type {number} + * @memberof ContainerState + */ + Pid?: number; + /** + * The last exit code of this container + * @type {number} + * @memberof ContainerState + */ + ExitCode?: number; + /** + * + * @type {string} + * @memberof ContainerState + */ + Error?: string; + /** + * The time when this container was last started. + * @type {string} + * @memberof ContainerState + */ + StartedAt?: string; + /** + * The time when this container last exited. + * @type {string} + * @memberof ContainerState + */ + FinishedAt?: string; + /** + * + * @type {Health} + * @memberof ContainerState + */ + Health?: Health | null; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ContainerStateStatusEnum { - Created = "created", - Running = "running", - Paused = "paused", - Restarting = "restarting", - Removing = "removing", - Exited = "exited", - Dead = "dead", + Created = 'created', + Running = 'running', + Paused = 'paused', + Restarting = 'restarting', + Removing = 'removing', + Exited = 'exited', + Dead = 'dead' } + /** * Check if a given object implements the ContainerState interface. */ export function instanceOfContainerState(value: object): value is ContainerState { - return true; + return true; } export function ContainerStateFromJSON(json: any): ContainerState { - return ContainerStateFromJSONTyped(json, false); + return ContainerStateFromJSONTyped(json, false); } -export function ContainerStateFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerState { - if (json == null) { - return json; - } - return { - Status: json["Status"] == null ? undefined : json["Status"], - Running: json["Running"] == null ? undefined : json["Running"], - Paused: json["Paused"] == null ? undefined : json["Paused"], - Restarting: json["Restarting"] == null ? undefined : json["Restarting"], - OOMKilled: json["OOMKilled"] == null ? undefined : json["OOMKilled"], - Dead: json["Dead"] == null ? undefined : json["Dead"], - Pid: json["Pid"] == null ? undefined : json["Pid"], - ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], - Error: json["Error"] == null ? undefined : json["Error"], - StartedAt: json["StartedAt"] == null ? undefined : json["StartedAt"], - FinishedAt: json["FinishedAt"] == null ? undefined : json["FinishedAt"], - Health: json["Health"] == null ? undefined : HealthFromJSON(json["Health"]), - }; +export function ContainerStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerState { + if (json == null) { + return json; + } + return { + + 'Status': json['Status'] == null ? undefined : json['Status'], + 'Running': json['Running'] == null ? undefined : json['Running'], + 'Paused': json['Paused'] == null ? undefined : json['Paused'], + 'Restarting': json['Restarting'] == null ? undefined : json['Restarting'], + 'OOMKilled': json['OOMKilled'] == null ? undefined : json['OOMKilled'], + 'Dead': json['Dead'] == null ? undefined : json['Dead'], + 'Pid': json['Pid'] == null ? undefined : json['Pid'], + 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], + 'Error': json['Error'] == null ? undefined : json['Error'], + 'StartedAt': json['StartedAt'] == null ? undefined : json['StartedAt'], + 'FinishedAt': json['FinishedAt'] == null ? undefined : json['FinishedAt'], + 'Health': json['Health'] == null ? undefined : HealthFromJSON(json['Health']), + }; } export function ContainerStateToJSON(json: any): ContainerState { - return ContainerStateToJSONTyped(json, false); + return ContainerStateToJSONTyped(json, false); } -export function ContainerStateToJSONTyped( - value?: ContainerState | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerStateToJSONTyped(value?: ContainerState | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Status: value["Status"], - Running: value["Running"], - Paused: value["Paused"], - Restarting: value["Restarting"], - OOMKilled: value["OOMKilled"], - Dead: value["Dead"], - Pid: value["Pid"], - ExitCode: value["ExitCode"], - Error: value["Error"], - StartedAt: value["StartedAt"], - FinishedAt: value["FinishedAt"], - Health: HealthToJSON(value["Health"]), - }; + return { + + 'Status': value['Status'], + 'Running': value['Running'], + 'Paused': value['Paused'], + 'Restarting': value['Restarting'], + 'OOMKilled': value['OOMKilled'], + 'Dead': value['Dead'], + 'Pid': value['Pid'], + 'ExitCode': value['ExitCode'], + 'Error': value['Error'], + 'StartedAt': value['StartedAt'], + 'FinishedAt': value['FinishedAt'], + 'Health': HealthToJSON(value['Health']), + }; } + diff --git a/src/clients/docker/models/ContainerSummary.ts b/src/clients/docker/models/ContainerSummary.ts index 52797a35a9..85346dd379 100644 --- a/src/clients/docker/models/ContainerSummary.ts +++ b/src/clients/docker/models/ContainerSummary.ts @@ -2,211 +2,205 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { MountPoint } from "./MountPoint"; +import { mapValues } from '../runtime'; +import type { MountPoint } from './MountPoint'; +import { + MountPointFromJSON, + MountPointFromJSONTyped, + MountPointToJSON, + MountPointToJSONTyped, +} from './MountPoint'; +import type { ContainerSummaryNetworkSettings } from './ContainerSummaryNetworkSettings'; import { - MountPointFromJSON, - MountPointFromJSONTyped, - MountPointToJSON, - MountPointToJSONTyped, -} from "./MountPoint"; -import type { ContainerSummaryNetworkSettings } from "./ContainerSummaryNetworkSettings"; + ContainerSummaryNetworkSettingsFromJSON, + ContainerSummaryNetworkSettingsFromJSONTyped, + ContainerSummaryNetworkSettingsToJSON, + ContainerSummaryNetworkSettingsToJSONTyped, +} from './ContainerSummaryNetworkSettings'; +import type { ContainerSummaryHostConfig } from './ContainerSummaryHostConfig'; import { - ContainerSummaryNetworkSettingsFromJSON, - ContainerSummaryNetworkSettingsFromJSONTyped, - ContainerSummaryNetworkSettingsToJSON, - ContainerSummaryNetworkSettingsToJSONTyped, -} from "./ContainerSummaryNetworkSettings"; -import type { ContainerSummaryHostConfig } from "./ContainerSummaryHostConfig"; + ContainerSummaryHostConfigFromJSON, + ContainerSummaryHostConfigFromJSONTyped, + ContainerSummaryHostConfigToJSON, + ContainerSummaryHostConfigToJSONTyped, +} from './ContainerSummaryHostConfig'; +import type { Port } from './Port'; import { - ContainerSummaryHostConfigFromJSON, - ContainerSummaryHostConfigFromJSONTyped, - ContainerSummaryHostConfigToJSON, - ContainerSummaryHostConfigToJSONTyped, -} from "./ContainerSummaryHostConfig"; -import type { Port } from "./Port"; -import { PortFromJSON, PortFromJSONTyped, PortToJSON, PortToJSONTyped } from "./Port"; + PortFromJSON, + PortFromJSONTyped, + PortToJSON, + PortToJSONTyped, +} from './Port'; /** - * + * * @export * @interface ContainerSummary */ export interface ContainerSummary { - /** - * The ID of this container - * @type {string} - * @memberof ContainerSummary - */ - Id?: string; - /** - * The names that this container has been given - * @type {Array} - * @memberof ContainerSummary - */ - Names?: Array; - /** - * The name of the image used when creating this container - * @type {string} - * @memberof ContainerSummary - */ - Image?: string; - /** - * The ID of the image that this container was created from - * @type {string} - * @memberof ContainerSummary - */ - ImageID?: string; - /** - * Command to run when starting the container - * @type {string} - * @memberof ContainerSummary - */ - Command?: string; - /** - * When the container was created - * @type {number} - * @memberof ContainerSummary - */ - Created?: number; - /** - * The ports exposed by this container - * @type {Array} - * @memberof ContainerSummary - */ - Ports?: Array; - /** - * The size of files that have been created or changed by this container - * @type {number} - * @memberof ContainerSummary - */ - SizeRw?: number; - /** - * The total size of all the files in this container - * @type {number} - * @memberof ContainerSummary - */ - SizeRootFs?: number; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ContainerSummary - */ - Labels?: { [key: string]: string }; - /** - * The state of this container (e.g. `Exited`) - * @type {string} - * @memberof ContainerSummary - */ - State?: string; - /** - * Additional human-readable status of this container (e.g. `Exit 0`) - * @type {string} - * @memberof ContainerSummary - */ - Status?: string; - /** - * - * @type {ContainerSummaryHostConfig} - * @memberof ContainerSummary - */ - HostConfig?: ContainerSummaryHostConfig; - /** - * - * @type {ContainerSummaryNetworkSettings} - * @memberof ContainerSummary - */ - NetworkSettings?: ContainerSummaryNetworkSettings; - /** - * - * @type {Array} - * @memberof ContainerSummary - */ - Mounts?: Array; + /** + * The ID of this container + * @type {string} + * @memberof ContainerSummary + */ + Id?: string; + /** + * The names that this container has been given + * @type {Array} + * @memberof ContainerSummary + */ + Names?: Array; + /** + * The name of the image used when creating this container + * @type {string} + * @memberof ContainerSummary + */ + Image?: string; + /** + * The ID of the image that this container was created from + * @type {string} + * @memberof ContainerSummary + */ + ImageID?: string; + /** + * Command to run when starting the container + * @type {string} + * @memberof ContainerSummary + */ + Command?: string; + /** + * When the container was created + * @type {number} + * @memberof ContainerSummary + */ + Created?: number; + /** + * The ports exposed by this container + * @type {Array} + * @memberof ContainerSummary + */ + Ports?: Array; + /** + * The size of files that have been created or changed by this container + * @type {number} + * @memberof ContainerSummary + */ + SizeRw?: number; + /** + * The total size of all the files in this container + * @type {number} + * @memberof ContainerSummary + */ + SizeRootFs?: number; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ContainerSummary + */ + Labels?: { [key: string]: string; }; + /** + * The state of this container (e.g. `Exited`) + * @type {string} + * @memberof ContainerSummary + */ + State?: string; + /** + * Additional human-readable status of this container (e.g. `Exit 0`) + * @type {string} + * @memberof ContainerSummary + */ + Status?: string; + /** + * + * @type {ContainerSummaryHostConfig} + * @memberof ContainerSummary + */ + HostConfig?: ContainerSummaryHostConfig; + /** + * + * @type {ContainerSummaryNetworkSettings} + * @memberof ContainerSummary + */ + NetworkSettings?: ContainerSummaryNetworkSettings; + /** + * + * @type {Array} + * @memberof ContainerSummary + */ + Mounts?: Array; } /** * Check if a given object implements the ContainerSummary interface. */ export function instanceOfContainerSummary(value: object): value is ContainerSummary { - return true; + return true; } export function ContainerSummaryFromJSON(json: any): ContainerSummary { - return ContainerSummaryFromJSONTyped(json, false); + return ContainerSummaryFromJSONTyped(json, false); } -export function ContainerSummaryFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerSummary { - if (json == null) { - return json; - } - return { - Id: json["Id"] == null ? undefined : json["Id"], - Names: json["Names"] == null ? undefined : json["Names"], - Image: json["Image"] == null ? undefined : json["Image"], - ImageID: json["ImageID"] == null ? undefined : json["ImageID"], - Command: json["Command"] == null ? undefined : json["Command"], - Created: json["Created"] == null ? undefined : json["Created"], - Ports: json["Ports"] == null ? undefined : (json["Ports"] as Array).map(PortFromJSON), - SizeRw: json["SizeRw"] == null ? undefined : json["SizeRw"], - SizeRootFs: json["SizeRootFs"] == null ? undefined : json["SizeRootFs"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - State: json["State"] == null ? undefined : json["State"], - Status: json["Status"] == null ? undefined : json["Status"], - HostConfig: - json["HostConfig"] == null - ? undefined - : ContainerSummaryHostConfigFromJSON(json["HostConfig"]), - NetworkSettings: - json["NetworkSettings"] == null - ? undefined - : ContainerSummaryNetworkSettingsFromJSON(json["NetworkSettings"]), - Mounts: - json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountPointFromJSON), - }; +export function ContainerSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerSummary { + if (json == null) { + return json; + } + return { + + 'Id': json['Id'] == null ? undefined : json['Id'], + 'Names': json['Names'] == null ? undefined : json['Names'], + 'Image': json['Image'] == null ? undefined : json['Image'], + 'ImageID': json['ImageID'] == null ? undefined : json['ImageID'], + 'Command': json['Command'] == null ? undefined : json['Command'], + 'Created': json['Created'] == null ? undefined : json['Created'], + 'Ports': json['Ports'] == null ? undefined : ((json['Ports'] as Array).map(PortFromJSON)), + 'SizeRw': json['SizeRw'] == null ? undefined : json['SizeRw'], + 'SizeRootFs': json['SizeRootFs'] == null ? undefined : json['SizeRootFs'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'State': json['State'] == null ? undefined : json['State'], + 'Status': json['Status'] == null ? undefined : json['Status'], + 'HostConfig': json['HostConfig'] == null ? undefined : ContainerSummaryHostConfigFromJSON(json['HostConfig']), + 'NetworkSettings': json['NetworkSettings'] == null ? undefined : ContainerSummaryNetworkSettingsFromJSON(json['NetworkSettings']), + 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountPointFromJSON)), + }; } export function ContainerSummaryToJSON(json: any): ContainerSummary { - return ContainerSummaryToJSONTyped(json, false); + return ContainerSummaryToJSONTyped(json, false); } -export function ContainerSummaryToJSONTyped( - value?: ContainerSummary | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerSummaryToJSONTyped(value?: ContainerSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - Names: value["Names"], - Image: value["Image"], - ImageID: value["ImageID"], - Command: value["Command"], - Created: value["Created"], - Ports: value["Ports"] == null ? undefined : (value["Ports"] as Array).map(PortToJSON), - SizeRw: value["SizeRw"], - SizeRootFs: value["SizeRootFs"], - Labels: value["Labels"], - State: value["State"], - Status: value["Status"], - HostConfig: ContainerSummaryHostConfigToJSON(value["HostConfig"]), - NetworkSettings: ContainerSummaryNetworkSettingsToJSON(value["NetworkSettings"]), - Mounts: - value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountPointToJSON), - }; + return { + + 'Id': value['Id'], + 'Names': value['Names'], + 'Image': value['Image'], + 'ImageID': value['ImageID'], + 'Command': value['Command'], + 'Created': value['Created'], + 'Ports': value['Ports'] == null ? undefined : ((value['Ports'] as Array).map(PortToJSON)), + 'SizeRw': value['SizeRw'], + 'SizeRootFs': value['SizeRootFs'], + 'Labels': value['Labels'], + 'State': value['State'], + 'Status': value['Status'], + 'HostConfig': ContainerSummaryHostConfigToJSON(value['HostConfig']), + 'NetworkSettings': ContainerSummaryNetworkSettingsToJSON(value['NetworkSettings']), + 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountPointToJSON)), + }; } + diff --git a/src/clients/docker/models/ContainerSummaryHostConfig.ts b/src/clients/docker/models/ContainerSummaryHostConfig.ts index 790e1d312c..3d9bc87d76 100644 --- a/src/clients/docker/models/ContainerSummaryHostConfig.ts +++ b/src/clients/docker/models/ContainerSummaryHostConfig.ts @@ -2,69 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ContainerSummaryHostConfig */ export interface ContainerSummaryHostConfig { - /** - * - * @type {string} - * @memberof ContainerSummaryHostConfig - */ - NetworkMode?: string; + /** + * + * @type {string} + * @memberof ContainerSummaryHostConfig + */ + NetworkMode?: string; } /** * Check if a given object implements the ContainerSummaryHostConfig interface. */ -export function instanceOfContainerSummaryHostConfig( - value: object, -): value is ContainerSummaryHostConfig { - return true; +export function instanceOfContainerSummaryHostConfig(value: object): value is ContainerSummaryHostConfig { + return true; } export function ContainerSummaryHostConfigFromJSON(json: any): ContainerSummaryHostConfig { - return ContainerSummaryHostConfigFromJSONTyped(json, false); + return ContainerSummaryHostConfigFromJSONTyped(json, false); } -export function ContainerSummaryHostConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerSummaryHostConfig { - if (json == null) { - return json; - } - return { - NetworkMode: json["NetworkMode"] == null ? undefined : json["NetworkMode"], - }; +export function ContainerSummaryHostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerSummaryHostConfig { + if (json == null) { + return json; + } + return { + + 'NetworkMode': json['NetworkMode'] == null ? undefined : json['NetworkMode'], + }; } export function ContainerSummaryHostConfigToJSON(json: any): ContainerSummaryHostConfig { - return ContainerSummaryHostConfigToJSONTyped(json, false); + return ContainerSummaryHostConfigToJSONTyped(json, false); } -export function ContainerSummaryHostConfigToJSONTyped( - value?: ContainerSummaryHostConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerSummaryHostConfigToJSONTyped(value?: ContainerSummaryHostConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NetworkMode: value["NetworkMode"], - }; + return { + + 'NetworkMode': value['NetworkMode'], + }; } + diff --git a/src/clients/docker/models/ContainerSummaryNetworkSettings.ts b/src/clients/docker/models/ContainerSummaryNetworkSettings.ts index 3a894bb516..e231e64508 100644 --- a/src/clients/docker/models/ContainerSummaryNetworkSettings.ts +++ b/src/clients/docker/models/ContainerSummaryNetworkSettings.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EndpointSettings } from "./EndpointSettings"; +import { mapValues } from '../runtime'; +import type { EndpointSettings } from './EndpointSettings'; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from "./EndpointSettings"; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from './EndpointSettings'; /** * A summary of the container's network settings @@ -27,56 +27,47 @@ import { * @interface ContainerSummaryNetworkSettings */ export interface ContainerSummaryNetworkSettings { - /** - * - * @type {{ [key: string]: EndpointSettings; }} - * @memberof ContainerSummaryNetworkSettings - */ - Networks?: { [key: string]: EndpointSettings }; + /** + * + * @type {{ [key: string]: EndpointSettings; }} + * @memberof ContainerSummaryNetworkSettings + */ + Networks?: { [key: string]: EndpointSettings; }; } /** * Check if a given object implements the ContainerSummaryNetworkSettings interface. */ -export function instanceOfContainerSummaryNetworkSettings( - value: object, -): value is ContainerSummaryNetworkSettings { - return true; +export function instanceOfContainerSummaryNetworkSettings(value: object): value is ContainerSummaryNetworkSettings { + return true; } -export function ContainerSummaryNetworkSettingsFromJSON( - json: any, -): ContainerSummaryNetworkSettings { - return ContainerSummaryNetworkSettingsFromJSONTyped(json, false); +export function ContainerSummaryNetworkSettingsFromJSON(json: any): ContainerSummaryNetworkSettings { + return ContainerSummaryNetworkSettingsFromJSONTyped(json, false); } -export function ContainerSummaryNetworkSettingsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerSummaryNetworkSettings { - if (json == null) { - return json; - } - return { - Networks: - json["Networks"] == null ? undefined : mapValues(json["Networks"], EndpointSettingsFromJSON), - }; +export function ContainerSummaryNetworkSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerSummaryNetworkSettings { + if (json == null) { + return json; + } + return { + + 'Networks': json['Networks'] == null ? undefined : (mapValues(json['Networks'], EndpointSettingsFromJSON)), + }; } export function ContainerSummaryNetworkSettingsToJSON(json: any): ContainerSummaryNetworkSettings { - return ContainerSummaryNetworkSettingsToJSONTyped(json, false); + return ContainerSummaryNetworkSettingsToJSONTyped(json, false); } -export function ContainerSummaryNetworkSettingsToJSONTyped( - value?: ContainerSummaryNetworkSettings | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerSummaryNetworkSettingsToJSONTyped(value?: ContainerSummaryNetworkSettings | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Networks: - value["Networks"] == null ? undefined : mapValues(value["Networks"], EndpointSettingsToJSON), - }; + return { + + 'Networks': value['Networks'] == null ? undefined : (mapValues(value['Networks'], EndpointSettingsToJSON)), + }; } + diff --git a/src/clients/docker/models/ContainerTopResponse.ts b/src/clients/docker/models/ContainerTopResponse.ts index da0feaa9fc..cdb668cff5 100644 --- a/src/clients/docker/models/ContainerTopResponse.ts +++ b/src/clients/docker/models/ContainerTopResponse.ts @@ -2,77 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * OK response to ContainerTop operation * @export * @interface ContainerTopResponse */ export interface ContainerTopResponse { - /** - * The ps column titles - * @type {Array} - * @memberof ContainerTopResponse - */ - Titles?: Array; - /** - * Each process running in the container, where each is process - * is an array of values corresponding to the titles. - * - * @type {Array>} - * @memberof ContainerTopResponse - */ - Processes?: Array>; + /** + * The ps column titles + * @type {Array} + * @memberof ContainerTopResponse + */ + Titles?: Array; + /** + * Each process running in the container, where each is process + * is an array of values corresponding to the titles. + * + * @type {Array>} + * @memberof ContainerTopResponse + */ + Processes?: Array>; } /** * Check if a given object implements the ContainerTopResponse interface. */ export function instanceOfContainerTopResponse(value: object): value is ContainerTopResponse { - return true; + return true; } export function ContainerTopResponseFromJSON(json: any): ContainerTopResponse { - return ContainerTopResponseFromJSONTyped(json, false); + return ContainerTopResponseFromJSONTyped(json, false); } -export function ContainerTopResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerTopResponse { - if (json == null) { - return json; - } - return { - Titles: json["Titles"] == null ? undefined : json["Titles"], - Processes: json["Processes"] == null ? undefined : json["Processes"], - }; +export function ContainerTopResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerTopResponse { + if (json == null) { + return json; + } + return { + + 'Titles': json['Titles'] == null ? undefined : json['Titles'], + 'Processes': json['Processes'] == null ? undefined : json['Processes'], + }; } export function ContainerTopResponseToJSON(json: any): ContainerTopResponse { - return ContainerTopResponseToJSONTyped(json, false); + return ContainerTopResponseToJSONTyped(json, false); } -export function ContainerTopResponseToJSONTyped( - value?: ContainerTopResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerTopResponseToJSONTyped(value?: ContainerTopResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Titles: value["Titles"], - Processes: value["Processes"], - }; + return { + + 'Titles': value['Titles'], + 'Processes': value['Processes'], + }; } + diff --git a/src/clients/docker/models/ContainerUpdateRequest.ts b/src/clients/docker/models/ContainerUpdateRequest.ts index 4f125bf704..b62f4ca283 100644 --- a/src/clients/docker/models/ContainerUpdateRequest.ts +++ b/src/clients/docker/models/ContainerUpdateRequest.ts @@ -2,478 +2,426 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; +import { mapValues } from '../runtime'; +import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from "./ResourcesUlimitsInner"; -import type { ThrottleDevice } from "./ThrottleDevice"; + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from './ResourcesUlimitsInner'; +import type { ThrottleDevice } from './ThrottleDevice'; import { - ThrottleDeviceFromJSON, - ThrottleDeviceFromJSONTyped, - ThrottleDeviceToJSON, - ThrottleDeviceToJSONTyped, -} from "./ThrottleDevice"; -import type { DeviceMapping } from "./DeviceMapping"; + ThrottleDeviceFromJSON, + ThrottleDeviceFromJSONTyped, + ThrottleDeviceToJSON, + ThrottleDeviceToJSONTyped, +} from './ThrottleDevice'; +import type { DeviceMapping } from './DeviceMapping'; import { - DeviceMappingFromJSON, - DeviceMappingFromJSONTyped, - DeviceMappingToJSON, - DeviceMappingToJSONTyped, -} from "./DeviceMapping"; -import type { RestartPolicy } from "./RestartPolicy"; + DeviceMappingFromJSON, + DeviceMappingFromJSONTyped, + DeviceMappingToJSON, + DeviceMappingToJSONTyped, +} from './DeviceMapping'; +import type { RestartPolicy } from './RestartPolicy'; import { - RestartPolicyFromJSON, - RestartPolicyFromJSONTyped, - RestartPolicyToJSON, - RestartPolicyToJSONTyped, -} from "./RestartPolicy"; -import type { DeviceRequest } from "./DeviceRequest"; + RestartPolicyFromJSON, + RestartPolicyFromJSONTyped, + RestartPolicyToJSON, + RestartPolicyToJSONTyped, +} from './RestartPolicy'; +import type { DeviceRequest } from './DeviceRequest'; import { - DeviceRequestFromJSON, - DeviceRequestFromJSONTyped, - DeviceRequestToJSON, - DeviceRequestToJSONTyped, -} from "./DeviceRequest"; -import type { ResourcesBlkioWeightDeviceInner } from "./ResourcesBlkioWeightDeviceInner"; + DeviceRequestFromJSON, + DeviceRequestFromJSONTyped, + DeviceRequestToJSON, + DeviceRequestToJSONTyped, +} from './DeviceRequest'; +import type { ResourcesBlkioWeightDeviceInner } from './ResourcesBlkioWeightDeviceInner'; import { - ResourcesBlkioWeightDeviceInnerFromJSON, - ResourcesBlkioWeightDeviceInnerFromJSONTyped, - ResourcesBlkioWeightDeviceInnerToJSON, - ResourcesBlkioWeightDeviceInnerToJSONTyped, -} from "./ResourcesBlkioWeightDeviceInner"; + ResourcesBlkioWeightDeviceInnerFromJSON, + ResourcesBlkioWeightDeviceInnerFromJSONTyped, + ResourcesBlkioWeightDeviceInnerToJSON, + ResourcesBlkioWeightDeviceInnerToJSONTyped, +} from './ResourcesBlkioWeightDeviceInner'; /** - * + * * @export * @interface ContainerUpdateRequest */ export interface ContainerUpdateRequest { - /** - * An integer value representing this container's relative CPU weight - * versus other containers. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuShares?: number; - /** - * Memory limit in bytes. - * @type {number} - * @memberof ContainerUpdateRequest - */ - Memory?: number; - /** - * Path to `cgroups` under which the container's `cgroup` is created. If - * the path is not absolute, the path is considered to be relative to the - * `cgroups` path of the init process. Cgroups are created if they do not - * already exist. - * - * @type {string} - * @memberof ContainerUpdateRequest - */ - CgroupParent?: string; - /** - * Block IO weight (relative weight). - * @type {number} - * @memberof ContainerUpdateRequest - */ - BlkioWeight?: number; - /** - * Block IO weight (relative device weight) in the form: - * - * ``` - * [{"Path": "device_path", "Weight": weight}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioWeightDevice?: Array; - /** - * Limit read rate (bytes per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceReadBps?: Array; - /** - * Limit write rate (bytes per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceWriteBps?: Array; - /** - * Limit read rate (IO per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceReadIOps?: Array; - /** - * Limit write rate (IO per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceWriteIOps?: Array; - /** - * The length of a CPU period in microseconds. - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuPeriod?: number; - /** - * Microseconds of CPU time that the container can get in a CPU period. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuQuota?: number; - /** - * The length of a CPU real-time period in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuRealtimePeriod?: number; - /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuRealtimeRuntime?: number; - /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`). - * - * @type {string} - * @memberof ContainerUpdateRequest - */ - CpusetCpus?: string; - /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only - * effective on NUMA systems. - * - * @type {string} - * @memberof ContainerUpdateRequest - */ - CpusetMems?: string; - /** - * A list of devices to add to the container. - * @type {Array} - * @memberof ContainerUpdateRequest - */ - Devices?: Array; - /** - * a list of cgroup rules to apply to the container - * @type {Array} - * @memberof ContainerUpdateRequest - */ - DeviceCgroupRules?: Array; - /** - * A list of requests for devices to be sent to device drivers. - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - DeviceRequests?: Array; - /** - * Hard limit for kernel TCP buffer memory (in bytes). Depending on the - * OCI runtime in use, this option may be ignored. It is no longer supported - * by the default (runc) runtime. - * - * This field is omitted when empty. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - KernelMemoryTCP?: number; - /** - * Memory soft limit in bytes. - * @type {number} - * @memberof ContainerUpdateRequest - */ - MemoryReservation?: number; - /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited - * swap. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - MemorySwap?: number; - /** - * Tune a container's memory swappiness behavior. Accepts an integer - * between 0 and 100. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - MemorySwappiness?: number; - /** - * CPU quota in units of 10-9 CPUs. - * @type {number} - * @memberof ContainerUpdateRequest - */ - NanoCpus?: number; - /** - * Disable OOM Killer for the container. - * @type {boolean} - * @memberof ContainerUpdateRequest - */ - OomKillDisable?: boolean; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof ContainerUpdateRequest - */ - Init?: boolean | null; - /** - * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` - * to not change. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - PidsLimit?: number | null; - /** - * A list of resource limits to set in the container. For example: - * - * ``` - * {"Name": "nofile", "Soft": 1024, "Hard": 2048} - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - Ulimits?: Array; - /** - * The number of usable CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuCount?: number; - /** - * The usable percentage of the available CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuPercent?: number; - /** - * Maximum IOps for the container system drive (Windows only) - * @type {number} - * @memberof ContainerUpdateRequest - */ - IOMaximumIOps?: number; - /** - * Maximum IO in bytes per second for the container system drive - * (Windows only). - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - IOMaximumBandwidth?: number; - /** - * - * @type {RestartPolicy} - * @memberof ContainerUpdateRequest - */ - RestartPolicy?: RestartPolicy; + /** + * An integer value representing this container's relative CPU weight + * versus other containers. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuShares?: number; + /** + * Memory limit in bytes. + * @type {number} + * @memberof ContainerUpdateRequest + */ + Memory?: number; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If + * the path is not absolute, the path is considered to be relative to the + * `cgroups` path of the init process. Cgroups are created if they do not + * already exist. + * + * @type {string} + * @memberof ContainerUpdateRequest + */ + CgroupParent?: string; + /** + * Block IO weight (relative weight). + * @type {number} + * @memberof ContainerUpdateRequest + */ + BlkioWeight?: number; + /** + * Block IO weight (relative device weight) in the form: + * + * ``` + * [{"Path": "device_path", "Weight": weight}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioWeightDevice?: Array; + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceReadBps?: Array; + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceWriteBps?: Array; + /** + * Limit read rate (IO per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceReadIOps?: Array; + /** + * Limit write rate (IO per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceWriteIOps?: Array; + /** + * The length of a CPU period in microseconds. + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuPeriod?: number; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuQuota?: number; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuRealtimePeriod?: number; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuRealtimeRuntime?: number; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * + * @type {string} + * @memberof ContainerUpdateRequest + */ + CpusetCpus?: string; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + * effective on NUMA systems. + * + * @type {string} + * @memberof ContainerUpdateRequest + */ + CpusetMems?: string; + /** + * A list of devices to add to the container. + * @type {Array} + * @memberof ContainerUpdateRequest + */ + Devices?: Array; + /** + * a list of cgroup rules to apply to the container + * @type {Array} + * @memberof ContainerUpdateRequest + */ + DeviceCgroupRules?: Array; + /** + * A list of requests for devices to be sent to device drivers. + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + DeviceRequests?: Array; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + * OCI runtime in use, this option may be ignored. It is no longer supported + * by the default (runc) runtime. + * + * This field is omitted when empty. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + KernelMemoryTCP?: number; + /** + * Memory soft limit in bytes. + * @type {number} + * @memberof ContainerUpdateRequest + */ + MemoryReservation?: number; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + * swap. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + MemorySwap?: number; + /** + * Tune a container's memory swappiness behavior. Accepts an integer + * between 0 and 100. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + MemorySwappiness?: number; + /** + * CPU quota in units of 10-9 CPUs. + * @type {number} + * @memberof ContainerUpdateRequest + */ + NanoCpus?: number; + /** + * Disable OOM Killer for the container. + * @type {boolean} + * @memberof ContainerUpdateRequest + */ + OomKillDisable?: boolean; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof ContainerUpdateRequest + */ + Init?: boolean | null; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + * to not change. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + PidsLimit?: number | null; + /** + * A list of resource limits to set in the container. For example: + * + * ``` + * {"Name": "nofile", "Soft": 1024, "Hard": 2048} + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + Ulimits?: Array; + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuCount?: number; + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuPercent?: number; + /** + * Maximum IOps for the container system drive (Windows only) + * @type {number} + * @memberof ContainerUpdateRequest + */ + IOMaximumIOps?: number; + /** + * Maximum IO in bytes per second for the container system drive + * (Windows only). + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + IOMaximumBandwidth?: number; + /** + * + * @type {RestartPolicy} + * @memberof ContainerUpdateRequest + */ + RestartPolicy?: RestartPolicy; } /** * Check if a given object implements the ContainerUpdateRequest interface. */ export function instanceOfContainerUpdateRequest(value: object): value is ContainerUpdateRequest { - return true; + return true; } export function ContainerUpdateRequestFromJSON(json: any): ContainerUpdateRequest { - return ContainerUpdateRequestFromJSONTyped(json, false); + return ContainerUpdateRequestFromJSONTyped(json, false); } -export function ContainerUpdateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerUpdateRequest { - if (json == null) { - return json; - } - return { - CpuShares: json["CpuShares"] == null ? undefined : json["CpuShares"], - Memory: json["Memory"] == null ? undefined : json["Memory"], - CgroupParent: json["CgroupParent"] == null ? undefined : json["CgroupParent"], - BlkioWeight: json["BlkioWeight"] == null ? undefined : json["BlkioWeight"], - BlkioWeightDevice: - json["BlkioWeightDevice"] == null - ? undefined - : (json["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON), - BlkioDeviceReadBps: - json["BlkioDeviceReadBps"] == null - ? undefined - : (json["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceWriteBps: - json["BlkioDeviceWriteBps"] == null - ? undefined - : (json["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceReadIOps: - json["BlkioDeviceReadIOps"] == null - ? undefined - : (json["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceWriteIOps: - json["BlkioDeviceWriteIOps"] == null - ? undefined - : (json["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceFromJSON), - CpuPeriod: json["CpuPeriod"] == null ? undefined : json["CpuPeriod"], - CpuQuota: json["CpuQuota"] == null ? undefined : json["CpuQuota"], - CpuRealtimePeriod: json["CpuRealtimePeriod"] == null ? undefined : json["CpuRealtimePeriod"], - CpuRealtimeRuntime: json["CpuRealtimeRuntime"] == null ? undefined : json["CpuRealtimeRuntime"], - CpusetCpus: json["CpusetCpus"] == null ? undefined : json["CpusetCpus"], - CpusetMems: json["CpusetMems"] == null ? undefined : json["CpusetMems"], - Devices: - json["Devices"] == null - ? undefined - : (json["Devices"] as Array).map(DeviceMappingFromJSON), - DeviceCgroupRules: json["DeviceCgroupRules"] == null ? undefined : json["DeviceCgroupRules"], - DeviceRequests: - json["DeviceRequests"] == null - ? undefined - : (json["DeviceRequests"] as Array).map(DeviceRequestFromJSON), - KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], - MemoryReservation: json["MemoryReservation"] == null ? undefined : json["MemoryReservation"], - MemorySwap: json["MemorySwap"] == null ? undefined : json["MemorySwap"], - MemorySwappiness: json["MemorySwappiness"] == null ? undefined : json["MemorySwappiness"], - NanoCpus: json["NanoCpus"] == null ? undefined : json["NanoCpus"], - OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], - Init: json["Init"] == null ? undefined : json["Init"], - PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], - Ulimits: - json["Ulimits"] == null - ? undefined - : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), - CpuCount: json["CpuCount"] == null ? undefined : json["CpuCount"], - CpuPercent: json["CpuPercent"] == null ? undefined : json["CpuPercent"], - IOMaximumIOps: json["IOMaximumIOps"] == null ? undefined : json["IOMaximumIOps"], - IOMaximumBandwidth: json["IOMaximumBandwidth"] == null ? undefined : json["IOMaximumBandwidth"], - RestartPolicy: - json["RestartPolicy"] == null ? undefined : RestartPolicyFromJSON(json["RestartPolicy"]), - }; +export function ContainerUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerUpdateRequest { + if (json == null) { + return json; + } + return { + + 'CpuShares': json['CpuShares'] == null ? undefined : json['CpuShares'], + 'Memory': json['Memory'] == null ? undefined : json['Memory'], + 'CgroupParent': json['CgroupParent'] == null ? undefined : json['CgroupParent'], + 'BlkioWeight': json['BlkioWeight'] == null ? undefined : json['BlkioWeight'], + 'BlkioWeightDevice': json['BlkioWeightDevice'] == null ? undefined : ((json['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON)), + 'BlkioDeviceReadBps': json['BlkioDeviceReadBps'] == null ? undefined : ((json['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceWriteBps': json['BlkioDeviceWriteBps'] == null ? undefined : ((json['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceReadIOps': json['BlkioDeviceReadIOps'] == null ? undefined : ((json['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceWriteIOps': json['BlkioDeviceWriteIOps'] == null ? undefined : ((json['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceFromJSON)), + 'CpuPeriod': json['CpuPeriod'] == null ? undefined : json['CpuPeriod'], + 'CpuQuota': json['CpuQuota'] == null ? undefined : json['CpuQuota'], + 'CpuRealtimePeriod': json['CpuRealtimePeriod'] == null ? undefined : json['CpuRealtimePeriod'], + 'CpuRealtimeRuntime': json['CpuRealtimeRuntime'] == null ? undefined : json['CpuRealtimeRuntime'], + 'CpusetCpus': json['CpusetCpus'] == null ? undefined : json['CpusetCpus'], + 'CpusetMems': json['CpusetMems'] == null ? undefined : json['CpusetMems'], + 'Devices': json['Devices'] == null ? undefined : ((json['Devices'] as Array).map(DeviceMappingFromJSON)), + 'DeviceCgroupRules': json['DeviceCgroupRules'] == null ? undefined : json['DeviceCgroupRules'], + 'DeviceRequests': json['DeviceRequests'] == null ? undefined : ((json['DeviceRequests'] as Array).map(DeviceRequestFromJSON)), + 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], + 'MemoryReservation': json['MemoryReservation'] == null ? undefined : json['MemoryReservation'], + 'MemorySwap': json['MemorySwap'] == null ? undefined : json['MemorySwap'], + 'MemorySwappiness': json['MemorySwappiness'] == null ? undefined : json['MemorySwappiness'], + 'NanoCpus': json['NanoCpus'] == null ? undefined : json['NanoCpus'], + 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], + 'Init': json['Init'] == null ? undefined : json['Init'], + 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], + 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), + 'CpuCount': json['CpuCount'] == null ? undefined : json['CpuCount'], + 'CpuPercent': json['CpuPercent'] == null ? undefined : json['CpuPercent'], + 'IOMaximumIOps': json['IOMaximumIOps'] == null ? undefined : json['IOMaximumIOps'], + 'IOMaximumBandwidth': json['IOMaximumBandwidth'] == null ? undefined : json['IOMaximumBandwidth'], + 'RestartPolicy': json['RestartPolicy'] == null ? undefined : RestartPolicyFromJSON(json['RestartPolicy']), + }; } export function ContainerUpdateRequestToJSON(json: any): ContainerUpdateRequest { - return ContainerUpdateRequestToJSONTyped(json, false); + return ContainerUpdateRequestToJSONTyped(json, false); } -export function ContainerUpdateRequestToJSONTyped( - value?: ContainerUpdateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerUpdateRequestToJSONTyped(value?: ContainerUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CpuShares: value["CpuShares"], - Memory: value["Memory"], - CgroupParent: value["CgroupParent"], - BlkioWeight: value["BlkioWeight"], - BlkioWeightDevice: - value["BlkioWeightDevice"] == null - ? undefined - : (value["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON), - BlkioDeviceReadBps: - value["BlkioDeviceReadBps"] == null - ? undefined - : (value["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceWriteBps: - value["BlkioDeviceWriteBps"] == null - ? undefined - : (value["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceReadIOps: - value["BlkioDeviceReadIOps"] == null - ? undefined - : (value["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceWriteIOps: - value["BlkioDeviceWriteIOps"] == null - ? undefined - : (value["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceToJSON), - CpuPeriod: value["CpuPeriod"], - CpuQuota: value["CpuQuota"], - CpuRealtimePeriod: value["CpuRealtimePeriod"], - CpuRealtimeRuntime: value["CpuRealtimeRuntime"], - CpusetCpus: value["CpusetCpus"], - CpusetMems: value["CpusetMems"], - Devices: - value["Devices"] == null - ? undefined - : (value["Devices"] as Array).map(DeviceMappingToJSON), - DeviceCgroupRules: value["DeviceCgroupRules"], - DeviceRequests: - value["DeviceRequests"] == null - ? undefined - : (value["DeviceRequests"] as Array).map(DeviceRequestToJSON), - KernelMemoryTCP: value["KernelMemoryTCP"], - MemoryReservation: value["MemoryReservation"], - MemorySwap: value["MemorySwap"], - MemorySwappiness: value["MemorySwappiness"], - NanoCpus: value["NanoCpus"], - OomKillDisable: value["OomKillDisable"], - Init: value["Init"], - PidsLimit: value["PidsLimit"], - Ulimits: - value["Ulimits"] == null - ? undefined - : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), - CpuCount: value["CpuCount"], - CpuPercent: value["CpuPercent"], - IOMaximumIOps: value["IOMaximumIOps"], - IOMaximumBandwidth: value["IOMaximumBandwidth"], - RestartPolicy: RestartPolicyToJSON(value["RestartPolicy"]), - }; + return { + + 'CpuShares': value['CpuShares'], + 'Memory': value['Memory'], + 'CgroupParent': value['CgroupParent'], + 'BlkioWeight': value['BlkioWeight'], + 'BlkioWeightDevice': value['BlkioWeightDevice'] == null ? undefined : ((value['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON)), + 'BlkioDeviceReadBps': value['BlkioDeviceReadBps'] == null ? undefined : ((value['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceWriteBps': value['BlkioDeviceWriteBps'] == null ? undefined : ((value['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceReadIOps': value['BlkioDeviceReadIOps'] == null ? undefined : ((value['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceWriteIOps': value['BlkioDeviceWriteIOps'] == null ? undefined : ((value['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceToJSON)), + 'CpuPeriod': value['CpuPeriod'], + 'CpuQuota': value['CpuQuota'], + 'CpuRealtimePeriod': value['CpuRealtimePeriod'], + 'CpuRealtimeRuntime': value['CpuRealtimeRuntime'], + 'CpusetCpus': value['CpusetCpus'], + 'CpusetMems': value['CpusetMems'], + 'Devices': value['Devices'] == null ? undefined : ((value['Devices'] as Array).map(DeviceMappingToJSON)), + 'DeviceCgroupRules': value['DeviceCgroupRules'], + 'DeviceRequests': value['DeviceRequests'] == null ? undefined : ((value['DeviceRequests'] as Array).map(DeviceRequestToJSON)), + 'KernelMemoryTCP': value['KernelMemoryTCP'], + 'MemoryReservation': value['MemoryReservation'], + 'MemorySwap': value['MemorySwap'], + 'MemorySwappiness': value['MemorySwappiness'], + 'NanoCpus': value['NanoCpus'], + 'OomKillDisable': value['OomKillDisable'], + 'Init': value['Init'], + 'PidsLimit': value['PidsLimit'], + 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), + 'CpuCount': value['CpuCount'], + 'CpuPercent': value['CpuPercent'], + 'IOMaximumIOps': value['IOMaximumIOps'], + 'IOMaximumBandwidth': value['IOMaximumBandwidth'], + 'RestartPolicy': RestartPolicyToJSON(value['RestartPolicy']), + }; } + diff --git a/src/clients/docker/models/ContainerUpdateResponse.ts b/src/clients/docker/models/ContainerUpdateResponse.ts index c39af51329..e329a8b194 100644 --- a/src/clients/docker/models/ContainerUpdateResponse.ts +++ b/src/clients/docker/models/ContainerUpdateResponse.ts @@ -2,67 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * OK response to ContainerUpdate operation * @export * @interface ContainerUpdateResponse */ export interface ContainerUpdateResponse { - /** - * - * @type {Array} - * @memberof ContainerUpdateResponse - */ - Warnings?: Array; + /** + * + * @type {Array} + * @memberof ContainerUpdateResponse + */ + Warnings?: Array; } /** * Check if a given object implements the ContainerUpdateResponse interface. */ export function instanceOfContainerUpdateResponse(value: object): value is ContainerUpdateResponse { - return true; + return true; } export function ContainerUpdateResponseFromJSON(json: any): ContainerUpdateResponse { - return ContainerUpdateResponseFromJSONTyped(json, false); + return ContainerUpdateResponseFromJSONTyped(json, false); } -export function ContainerUpdateResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerUpdateResponse { - if (json == null) { - return json; - } - return { - Warnings: json["Warnings"] == null ? undefined : json["Warnings"], - }; +export function ContainerUpdateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerUpdateResponse { + if (json == null) { + return json; + } + return { + + 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], + }; } export function ContainerUpdateResponseToJSON(json: any): ContainerUpdateResponse { - return ContainerUpdateResponseToJSONTyped(json, false); + return ContainerUpdateResponseToJSONTyped(json, false); } -export function ContainerUpdateResponseToJSONTyped( - value?: ContainerUpdateResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerUpdateResponseToJSONTyped(value?: ContainerUpdateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Warnings: value["Warnings"], - }; + return { + + 'Warnings': value['Warnings'], + }; } + diff --git a/src/clients/docker/models/ContainerWaitExitError.ts b/src/clients/docker/models/ContainerWaitExitError.ts index 0618f583cf..1d554b793d 100644 --- a/src/clients/docker/models/ContainerWaitExitError.ts +++ b/src/clients/docker/models/ContainerWaitExitError.ts @@ -2,67 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * container waiting error, if any * @export * @interface ContainerWaitExitError */ export interface ContainerWaitExitError { - /** - * Details of an error - * @type {string} - * @memberof ContainerWaitExitError - */ - Message?: string; + /** + * Details of an error + * @type {string} + * @memberof ContainerWaitExitError + */ + Message?: string; } /** * Check if a given object implements the ContainerWaitExitError interface. */ export function instanceOfContainerWaitExitError(value: object): value is ContainerWaitExitError { - return true; + return true; } export function ContainerWaitExitErrorFromJSON(json: any): ContainerWaitExitError { - return ContainerWaitExitErrorFromJSONTyped(json, false); + return ContainerWaitExitErrorFromJSONTyped(json, false); } -export function ContainerWaitExitErrorFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerWaitExitError { - if (json == null) { - return json; - } - return { - Message: json["Message"] == null ? undefined : json["Message"], - }; +export function ContainerWaitExitErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerWaitExitError { + if (json == null) { + return json; + } + return { + + 'Message': json['Message'] == null ? undefined : json['Message'], + }; } export function ContainerWaitExitErrorToJSON(json: any): ContainerWaitExitError { - return ContainerWaitExitErrorToJSONTyped(json, false); + return ContainerWaitExitErrorToJSONTyped(json, false); } -export function ContainerWaitExitErrorToJSONTyped( - value?: ContainerWaitExitError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerWaitExitErrorToJSONTyped(value?: ContainerWaitExitError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Message: value["Message"], - }; + return { + + 'Message': value['Message'], + }; } + diff --git a/src/clients/docker/models/ContainerWaitResponse.ts b/src/clients/docker/models/ContainerWaitResponse.ts index a78b0e70ca..905e1057e4 100644 --- a/src/clients/docker/models/ContainerWaitResponse.ts +++ b/src/clients/docker/models/ContainerWaitResponse.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ContainerWaitExitError } from "./ContainerWaitExitError"; +import { mapValues } from '../runtime'; +import type { ContainerWaitExitError } from './ContainerWaitExitError'; import { - ContainerWaitExitErrorFromJSON, - ContainerWaitExitErrorFromJSONTyped, - ContainerWaitExitErrorToJSON, - ContainerWaitExitErrorToJSONTyped, -} from "./ContainerWaitExitError"; + ContainerWaitExitErrorFromJSON, + ContainerWaitExitErrorFromJSONTyped, + ContainerWaitExitErrorToJSON, + ContainerWaitExitErrorToJSONTyped, +} from './ContainerWaitExitError'; /** * OK response to ContainerWait operation @@ -27,59 +27,56 @@ import { * @interface ContainerWaitResponse */ export interface ContainerWaitResponse { - /** - * Exit code of the container - * @type {number} - * @memberof ContainerWaitResponse - */ - StatusCode: number; - /** - * - * @type {ContainerWaitExitError} - * @memberof ContainerWaitResponse - */ - Error?: ContainerWaitExitError; + /** + * Exit code of the container + * @type {number} + * @memberof ContainerWaitResponse + */ + StatusCode: number; + /** + * + * @type {ContainerWaitExitError} + * @memberof ContainerWaitResponse + */ + Error?: ContainerWaitExitError; } /** * Check if a given object implements the ContainerWaitResponse interface. */ export function instanceOfContainerWaitResponse(value: object): value is ContainerWaitResponse { - if (!("StatusCode" in value) || value["StatusCode"] === undefined) return false; - return true; + if (!('StatusCode' in value) || value['StatusCode'] === undefined) return false; + return true; } export function ContainerWaitResponseFromJSON(json: any): ContainerWaitResponse { - return ContainerWaitResponseFromJSONTyped(json, false); + return ContainerWaitResponseFromJSONTyped(json, false); } -export function ContainerWaitResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ContainerWaitResponse { - if (json == null) { - return json; - } - return { - StatusCode: json["StatusCode"], - Error: json["Error"] == null ? undefined : ContainerWaitExitErrorFromJSON(json["Error"]), - }; +export function ContainerWaitResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerWaitResponse { + if (json == null) { + return json; + } + return { + + 'StatusCode': json['StatusCode'], + 'Error': json['Error'] == null ? undefined : ContainerWaitExitErrorFromJSON(json['Error']), + }; } export function ContainerWaitResponseToJSON(json: any): ContainerWaitResponse { - return ContainerWaitResponseToJSONTyped(json, false); + return ContainerWaitResponseToJSONTyped(json, false); } -export function ContainerWaitResponseToJSONTyped( - value?: ContainerWaitResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ContainerWaitResponseToJSONTyped(value?: ContainerWaitResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - StatusCode: value["StatusCode"], - Error: ContainerWaitExitErrorToJSON(value["Error"]), - }; + return { + + 'StatusCode': value['StatusCode'], + 'Error': ContainerWaitExitErrorToJSON(value['Error']), + }; } + diff --git a/src/clients/docker/models/CreateImageInfo.ts b/src/clients/docker/models/CreateImageInfo.ts index ac2239e6f6..a21a84a4d5 100644 --- a/src/clients/docker/models/CreateImageInfo.ts +++ b/src/clients/docker/models/CreateImageInfo.ts @@ -2,123 +2,119 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorDetail } from "./ErrorDetail"; +import { mapValues } from '../runtime'; +import type { ErrorDetail } from './ErrorDetail'; import { - ErrorDetailFromJSON, - ErrorDetailFromJSONTyped, - ErrorDetailToJSON, - ErrorDetailToJSONTyped, -} from "./ErrorDetail"; -import type { ProgressDetail } from "./ProgressDetail"; + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from './ErrorDetail'; +import type { ProgressDetail } from './ProgressDetail'; import { - ProgressDetailFromJSON, - ProgressDetailFromJSONTyped, - ProgressDetailToJSON, - ProgressDetailToJSONTyped, -} from "./ProgressDetail"; + ProgressDetailFromJSON, + ProgressDetailFromJSONTyped, + ProgressDetailToJSON, + ProgressDetailToJSONTyped, +} from './ProgressDetail'; /** - * + * * @export * @interface CreateImageInfo */ export interface CreateImageInfo { - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - error?: string; - /** - * - * @type {ErrorDetail} - * @memberof CreateImageInfo - */ - errorDetail?: ErrorDetail; - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - status?: string; - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - progress?: string; - /** - * - * @type {ProgressDetail} - * @memberof CreateImageInfo - */ - progressDetail?: ProgressDetail; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + id?: string; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + error?: string; + /** + * + * @type {ErrorDetail} + * @memberof CreateImageInfo + */ + errorDetail?: ErrorDetail; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + status?: string; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + progress?: string; + /** + * + * @type {ProgressDetail} + * @memberof CreateImageInfo + */ + progressDetail?: ProgressDetail; } /** * Check if a given object implements the CreateImageInfo interface. */ export function instanceOfCreateImageInfo(value: object): value is CreateImageInfo { - return true; + return true; } export function CreateImageInfoFromJSON(json: any): CreateImageInfo { - return CreateImageInfoFromJSONTyped(json, false); + return CreateImageInfoFromJSONTyped(json, false); } -export function CreateImageInfoFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateImageInfo { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - error: json["error"] == null ? undefined : json["error"], - errorDetail: json["errorDetail"] == null ? undefined : ErrorDetailFromJSON(json["errorDetail"]), - status: json["status"] == null ? undefined : json["status"], - progress: json["progress"] == null ? undefined : json["progress"], - progressDetail: - json["progressDetail"] == null ? undefined : ProgressDetailFromJSON(json["progressDetail"]), - }; +export function CreateImageInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateImageInfo { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'error': json['error'] == null ? undefined : json['error'], + 'errorDetail': json['errorDetail'] == null ? undefined : ErrorDetailFromJSON(json['errorDetail']), + 'status': json['status'] == null ? undefined : json['status'], + 'progress': json['progress'] == null ? undefined : json['progress'], + 'progressDetail': json['progressDetail'] == null ? undefined : ProgressDetailFromJSON(json['progressDetail']), + }; } export function CreateImageInfoToJSON(json: any): CreateImageInfo { - return CreateImageInfoToJSONTyped(json, false); + return CreateImageInfoToJSONTyped(json, false); } -export function CreateImageInfoToJSONTyped( - value?: CreateImageInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateImageInfoToJSONTyped(value?: CreateImageInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - error: value["error"], - errorDetail: ErrorDetailToJSON(value["errorDetail"]), - status: value["status"], - progress: value["progress"], - progressDetail: ProgressDetailToJSON(value["progressDetail"]), - }; + return { + + 'id': value['id'], + 'error': value['error'], + 'errorDetail': ErrorDetailToJSON(value['errorDetail']), + 'status': value['status'], + 'progress': value['progress'], + 'progressDetail': ProgressDetailToJSON(value['progressDetail']), + }; } + diff --git a/src/clients/docker/models/DeviceMapping.ts b/src/clients/docker/models/DeviceMapping.ts index f8813d81de..036233ccf5 100644 --- a/src/clients/docker/models/DeviceMapping.ts +++ b/src/clients/docker/models/DeviceMapping.ts @@ -2,80 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * A device mapping between the host and container * @export * @interface DeviceMapping */ export interface DeviceMapping { - /** - * - * @type {string} - * @memberof DeviceMapping - */ - PathOnHost?: string; - /** - * - * @type {string} - * @memberof DeviceMapping - */ - PathInContainer?: string; - /** - * - * @type {string} - * @memberof DeviceMapping - */ - CgroupPermissions?: string; + /** + * + * @type {string} + * @memberof DeviceMapping + */ + PathOnHost?: string; + /** + * + * @type {string} + * @memberof DeviceMapping + */ + PathInContainer?: string; + /** + * + * @type {string} + * @memberof DeviceMapping + */ + CgroupPermissions?: string; } /** * Check if a given object implements the DeviceMapping interface. */ export function instanceOfDeviceMapping(value: object): value is DeviceMapping { - return true; + return true; } export function DeviceMappingFromJSON(json: any): DeviceMapping { - return DeviceMappingFromJSONTyped(json, false); + return DeviceMappingFromJSONTyped(json, false); } export function DeviceMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceMapping { - if (json == null) { - return json; - } - return { - PathOnHost: json["PathOnHost"] == null ? undefined : json["PathOnHost"], - PathInContainer: json["PathInContainer"] == null ? undefined : json["PathInContainer"], - CgroupPermissions: json["CgroupPermissions"] == null ? undefined : json["CgroupPermissions"], - }; + if (json == null) { + return json; + } + return { + + 'PathOnHost': json['PathOnHost'] == null ? undefined : json['PathOnHost'], + 'PathInContainer': json['PathInContainer'] == null ? undefined : json['PathInContainer'], + 'CgroupPermissions': json['CgroupPermissions'] == null ? undefined : json['CgroupPermissions'], + }; } export function DeviceMappingToJSON(json: any): DeviceMapping { - return DeviceMappingToJSONTyped(json, false); + return DeviceMappingToJSONTyped(json, false); } -export function DeviceMappingToJSONTyped( - value?: DeviceMapping | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DeviceMappingToJSONTyped(value?: DeviceMapping | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - PathOnHost: value["PathOnHost"], - PathInContainer: value["PathInContainer"], - CgroupPermissions: value["CgroupPermissions"], - }; + return { + + 'PathOnHost': value['PathOnHost'], + 'PathInContainer': value['PathInContainer'], + 'CgroupPermissions': value['CgroupPermissions'], + }; } + diff --git a/src/clients/docker/models/DeviceRequest.ts b/src/clients/docker/models/DeviceRequest.ts index 21354e7610..d194a88947 100644 --- a/src/clients/docker/models/DeviceRequest.ts +++ b/src/clients/docker/models/DeviceRequest.ts @@ -2,99 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * A request for devices to be sent to device drivers * @export * @interface DeviceRequest */ export interface DeviceRequest { - /** - * - * @type {string} - * @memberof DeviceRequest - */ - Driver?: string; - /** - * - * @type {number} - * @memberof DeviceRequest - */ - Count?: number; - /** - * - * @type {Array} - * @memberof DeviceRequest - */ - DeviceIDs?: Array; - /** - * A list of capabilities; an OR list of AND lists of capabilities. - * - * @type {Array>} - * @memberof DeviceRequest - */ - Capabilities?: Array>; - /** - * Driver-specific options, specified as a key/value pairs. These options - * are passed directly to the driver. - * - * @type {{ [key: string]: string; }} - * @memberof DeviceRequest - */ - Options?: { [key: string]: string }; + /** + * + * @type {string} + * @memberof DeviceRequest + */ + Driver?: string; + /** + * + * @type {number} + * @memberof DeviceRequest + */ + Count?: number; + /** + * + * @type {Array} + * @memberof DeviceRequest + */ + DeviceIDs?: Array; + /** + * A list of capabilities; an OR list of AND lists of capabilities. + * + * @type {Array>} + * @memberof DeviceRequest + */ + Capabilities?: Array>; + /** + * Driver-specific options, specified as a key/value pairs. These options + * are passed directly to the driver. + * + * @type {{ [key: string]: string; }} + * @memberof DeviceRequest + */ + Options?: { [key: string]: string; }; } /** * Check if a given object implements the DeviceRequest interface. */ export function instanceOfDeviceRequest(value: object): value is DeviceRequest { - return true; + return true; } export function DeviceRequestFromJSON(json: any): DeviceRequest { - return DeviceRequestFromJSONTyped(json, false); + return DeviceRequestFromJSONTyped(json, false); } export function DeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceRequest { - if (json == null) { - return json; - } - return { - Driver: json["Driver"] == null ? undefined : json["Driver"], - Count: json["Count"] == null ? undefined : json["Count"], - DeviceIDs: json["DeviceIDs"] == null ? undefined : json["DeviceIDs"], - Capabilities: json["Capabilities"] == null ? undefined : json["Capabilities"], - Options: json["Options"] == null ? undefined : json["Options"], - }; + if (json == null) { + return json; + } + return { + + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'Count': json['Count'] == null ? undefined : json['Count'], + 'DeviceIDs': json['DeviceIDs'] == null ? undefined : json['DeviceIDs'], + 'Capabilities': json['Capabilities'] == null ? undefined : json['Capabilities'], + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function DeviceRequestToJSON(json: any): DeviceRequest { - return DeviceRequestToJSONTyped(json, false); + return DeviceRequestToJSONTyped(json, false); } -export function DeviceRequestToJSONTyped( - value?: DeviceRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DeviceRequestToJSONTyped(value?: DeviceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Driver: value["Driver"], - Count: value["Count"], - DeviceIDs: value["DeviceIDs"], - Capabilities: value["Capabilities"], - Options: value["Options"], - }; + return { + + 'Driver': value['Driver'], + 'Count': value['Count'], + 'DeviceIDs': value['DeviceIDs'], + 'Capabilities': value['Capabilities'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/DistributionInspect.ts b/src/clients/docker/models/DistributionInspect.ts index 859155657f..78904c780b 100644 --- a/src/clients/docker/models/DistributionInspect.ts +++ b/src/clients/docker/models/DistributionInspect.ts @@ -2,95 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { OCIDescriptor } from "./OCIDescriptor"; +import { mapValues } from '../runtime'; +import type { OCIDescriptor } from './OCIDescriptor'; import { - OCIDescriptorFromJSON, - OCIDescriptorFromJSONTyped, - OCIDescriptorToJSON, - OCIDescriptorToJSONTyped, -} from "./OCIDescriptor"; -import type { OCIPlatform } from "./OCIPlatform"; + OCIDescriptorFromJSON, + OCIDescriptorFromJSONTyped, + OCIDescriptorToJSON, + OCIDescriptorToJSONTyped, +} from './OCIDescriptor'; +import type { OCIPlatform } from './OCIPlatform'; import { - OCIPlatformFromJSON, - OCIPlatformFromJSONTyped, - OCIPlatformToJSON, - OCIPlatformToJSONTyped, -} from "./OCIPlatform"; + OCIPlatformFromJSON, + OCIPlatformFromJSONTyped, + OCIPlatformToJSON, + OCIPlatformToJSONTyped, +} from './OCIPlatform'; /** * Describes the result obtained from contacting the registry to retrieve * image metadata. - * + * * @export * @interface DistributionInspect */ export interface DistributionInspect { - /** - * - * @type {OCIDescriptor} - * @memberof DistributionInspect - */ - Descriptor: OCIDescriptor; - /** - * An array containing all platforms supported by the image. - * - * @type {Array} - * @memberof DistributionInspect - */ - Platforms: Array; + /** + * + * @type {OCIDescriptor} + * @memberof DistributionInspect + */ + Descriptor: OCIDescriptor; + /** + * An array containing all platforms supported by the image. + * + * @type {Array} + * @memberof DistributionInspect + */ + Platforms: Array; } /** * Check if a given object implements the DistributionInspect interface. */ export function instanceOfDistributionInspect(value: object): value is DistributionInspect { - if (!("Descriptor" in value) || value["Descriptor"] === undefined) return false; - if (!("Platforms" in value) || value["Platforms"] === undefined) return false; - return true; + if (!('Descriptor' in value) || value['Descriptor'] === undefined) return false; + if (!('Platforms' in value) || value['Platforms'] === undefined) return false; + return true; } export function DistributionInspectFromJSON(json: any): DistributionInspect { - return DistributionInspectFromJSONTyped(json, false); + return DistributionInspectFromJSONTyped(json, false); } -export function DistributionInspectFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): DistributionInspect { - if (json == null) { - return json; - } - return { - Descriptor: OCIDescriptorFromJSON(json["Descriptor"]), - Platforms: (json["Platforms"] as Array).map(OCIPlatformFromJSON), - }; +export function DistributionInspectFromJSONTyped(json: any, ignoreDiscriminator: boolean): DistributionInspect { + if (json == null) { + return json; + } + return { + + 'Descriptor': OCIDescriptorFromJSON(json['Descriptor']), + 'Platforms': ((json['Platforms'] as Array).map(OCIPlatformFromJSON)), + }; } export function DistributionInspectToJSON(json: any): DistributionInspect { - return DistributionInspectToJSONTyped(json, false); + return DistributionInspectToJSONTyped(json, false); } -export function DistributionInspectToJSONTyped( - value?: DistributionInspect | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DistributionInspectToJSONTyped(value?: DistributionInspect | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Descriptor: OCIDescriptorToJSON(value["Descriptor"]), - Platforms: (value["Platforms"] as Array).map(OCIPlatformToJSON), - }; + return { + + 'Descriptor': OCIDescriptorToJSON(value['Descriptor']), + 'Platforms': ((value['Platforms'] as Array).map(OCIPlatformToJSON)), + }; } + diff --git a/src/clients/docker/models/Driver.ts b/src/clients/docker/models/Driver.ts index a4a498ec8d..2b7967129b 100644 --- a/src/clients/docker/models/Driver.ts +++ b/src/clients/docker/models/Driver.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Driver represents a driver (network, logging, secrets). * @export * @interface Driver */ export interface Driver { - /** - * Name of the driver. - * @type {string} - * @memberof Driver - */ - Name: string; - /** - * Key/value map of driver-specific options. - * @type {{ [key: string]: string; }} - * @memberof Driver - */ - Options?: { [key: string]: string }; + /** + * Name of the driver. + * @type {string} + * @memberof Driver + */ + Name: string; + /** + * Key/value map of driver-specific options. + * @type {{ [key: string]: string; }} + * @memberof Driver + */ + Options?: { [key: string]: string; }; } /** * Check if a given object implements the Driver interface. */ export function instanceOfDriver(value: object): value is Driver { - if (!("Name" in value) || value["Name"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + return true; } export function DriverFromJSON(json: any): Driver { - return DriverFromJSONTyped(json, false); + return DriverFromJSONTyped(json, false); } export function DriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): Driver { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Options: json["Options"] == null ? undefined : json["Options"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function DriverToJSON(json: any): Driver { - return DriverToJSONTyped(json, false); + return DriverToJSONTyped(json, false); } -export function DriverToJSONTyped( - value?: Driver | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DriverToJSONTyped(value?: Driver | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Options: value["Options"], - }; + return { + + 'Name': value['Name'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/EndpointIPAMConfig.ts b/src/clients/docker/models/EndpointIPAMConfig.ts index 361ed1472d..8ec25d9ea0 100644 --- a/src/clients/docker/models/EndpointIPAMConfig.ts +++ b/src/clients/docker/models/EndpointIPAMConfig.ts @@ -2,84 +2,81 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * EndpointIPAMConfig represents an endpoint's IPAM configuration. - * + * * @export * @interface EndpointIPAMConfig */ export interface EndpointIPAMConfig { - /** - * - * @type {string} - * @memberof EndpointIPAMConfig - */ - IPv4Address?: string; - /** - * - * @type {string} - * @memberof EndpointIPAMConfig - */ - IPv6Address?: string; - /** - * - * @type {Array} - * @memberof EndpointIPAMConfig - */ - LinkLocalIPs?: Array; + /** + * + * @type {string} + * @memberof EndpointIPAMConfig + */ + IPv4Address?: string; + /** + * + * @type {string} + * @memberof EndpointIPAMConfig + */ + IPv6Address?: string; + /** + * + * @type {Array} + * @memberof EndpointIPAMConfig + */ + LinkLocalIPs?: Array; } /** * Check if a given object implements the EndpointIPAMConfig interface. */ export function instanceOfEndpointIPAMConfig(value: object): value is EndpointIPAMConfig { - return true; + return true; } export function EndpointIPAMConfigFromJSON(json: any): EndpointIPAMConfig { - return EndpointIPAMConfigFromJSONTyped(json, false); + return EndpointIPAMConfigFromJSONTyped(json, false); } -export function EndpointIPAMConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EndpointIPAMConfig { - if (json == null) { - return json; - } - return { - IPv4Address: json["IPv4Address"] == null ? undefined : json["IPv4Address"], - IPv6Address: json["IPv6Address"] == null ? undefined : json["IPv6Address"], - LinkLocalIPs: json["LinkLocalIPs"] == null ? undefined : json["LinkLocalIPs"], - }; +export function EndpointIPAMConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointIPAMConfig { + if (json == null) { + return json; + } + return { + + 'IPv4Address': json['IPv4Address'] == null ? undefined : json['IPv4Address'], + 'IPv6Address': json['IPv6Address'] == null ? undefined : json['IPv6Address'], + 'LinkLocalIPs': json['LinkLocalIPs'] == null ? undefined : json['LinkLocalIPs'], + }; } export function EndpointIPAMConfigToJSON(json: any): EndpointIPAMConfig { - return EndpointIPAMConfigToJSONTyped(json, false); + return EndpointIPAMConfigToJSONTyped(json, false); } -export function EndpointIPAMConfigToJSONTyped( - value?: EndpointIPAMConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EndpointIPAMConfigToJSONTyped(value?: EndpointIPAMConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - IPv4Address: value["IPv4Address"], - IPv6Address: value["IPv6Address"], - LinkLocalIPs: value["LinkLocalIPs"], - }; + return { + + 'IPv4Address': value['IPv4Address'], + 'IPv6Address': value['IPv6Address'], + 'LinkLocalIPs': value['LinkLocalIPs'], + }; } + diff --git a/src/clients/docker/models/EndpointPortConfig.ts b/src/clients/docker/models/EndpointPortConfig.ts index ae8025915a..b81e929e31 100644 --- a/src/clients/docker/models/EndpointPortConfig.ts +++ b/src/clients/docker/models/EndpointPortConfig.ts @@ -2,126 +2,124 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface EndpointPortConfig */ export interface EndpointPortConfig { - /** - * - * @type {string} - * @memberof EndpointPortConfig - */ - Name?: string; - /** - * - * @type {string} - * @memberof EndpointPortConfig - */ - Protocol?: EndpointPortConfigProtocolEnum; - /** - * The port inside the container. - * @type {number} - * @memberof EndpointPortConfig - */ - TargetPort?: number; - /** - * The port on the swarm hosts. - * @type {number} - * @memberof EndpointPortConfig - */ - PublishedPort?: number; - /** - * The mode in which port is published. - * - *


- * - * - "ingress" makes the target port accessible on every node, - * regardless of whether there is a task for the service running on - * that node or not. - * - "host" bypasses the routing mesh and publish the port directly on - * the swarm node where that service is running. - * - * @type {string} - * @memberof EndpointPortConfig - */ - PublishMode?: EndpointPortConfigPublishModeEnum; + /** + * + * @type {string} + * @memberof EndpointPortConfig + */ + Name?: string; + /** + * + * @type {string} + * @memberof EndpointPortConfig + */ + Protocol?: EndpointPortConfigProtocolEnum; + /** + * The port inside the container. + * @type {number} + * @memberof EndpointPortConfig + */ + TargetPort?: number; + /** + * The port on the swarm hosts. + * @type {number} + * @memberof EndpointPortConfig + */ + PublishedPort?: number; + /** + * The mode in which port is published. + * + *


+ * + * - "ingress" makes the target port accessible on every node, + * regardless of whether there is a task for the service running on + * that node or not. + * - "host" bypasses the routing mesh and publish the port directly on + * the swarm node where that service is running. + * + * @type {string} + * @memberof EndpointPortConfig + */ + PublishMode?: EndpointPortConfigPublishModeEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum EndpointPortConfigProtocolEnum { - Tcp = "tcp", - Udp = "udp", - Sctp = "sctp", + Tcp = 'tcp', + Udp = 'udp', + Sctp = 'sctp' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum EndpointPortConfigPublishModeEnum { - Ingress = "ingress", - Host = "host", + Ingress = 'ingress', + Host = 'host' } + /** * Check if a given object implements the EndpointPortConfig interface. */ export function instanceOfEndpointPortConfig(value: object): value is EndpointPortConfig { - return true; + return true; } export function EndpointPortConfigFromJSON(json: any): EndpointPortConfig { - return EndpointPortConfigFromJSONTyped(json, false); + return EndpointPortConfigFromJSONTyped(json, false); } -export function EndpointPortConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EndpointPortConfig { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Protocol: json["Protocol"] == null ? undefined : json["Protocol"], - TargetPort: json["TargetPort"] == null ? undefined : json["TargetPort"], - PublishedPort: json["PublishedPort"] == null ? undefined : json["PublishedPort"], - PublishMode: json["PublishMode"] == null ? undefined : json["PublishMode"], - }; +export function EndpointPortConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointPortConfig { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Protocol': json['Protocol'] == null ? undefined : json['Protocol'], + 'TargetPort': json['TargetPort'] == null ? undefined : json['TargetPort'], + 'PublishedPort': json['PublishedPort'] == null ? undefined : json['PublishedPort'], + 'PublishMode': json['PublishMode'] == null ? undefined : json['PublishMode'], + }; } export function EndpointPortConfigToJSON(json: any): EndpointPortConfig { - return EndpointPortConfigToJSONTyped(json, false); + return EndpointPortConfigToJSONTyped(json, false); } -export function EndpointPortConfigToJSONTyped( - value?: EndpointPortConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EndpointPortConfigToJSONTyped(value?: EndpointPortConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Protocol: value["Protocol"], - TargetPort: value["TargetPort"], - PublishedPort: value["PublishedPort"], - PublishMode: value["PublishMode"], - }; + return { + + 'Name': value['Name'], + 'Protocol': value['Protocol'], + 'TargetPort': value['TargetPort'], + 'PublishedPort': value['PublishedPort'], + 'PublishMode': value['PublishMode'], + }; } + diff --git a/src/clients/docker/models/EndpointSettings.ts b/src/clients/docker/models/EndpointSettings.ts index 9f63ed27dd..0c694f45e6 100644 --- a/src/clients/docker/models/EndpointSettings.ts +++ b/src/clients/docker/models/EndpointSettings.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EndpointIPAMConfig } from "./EndpointIPAMConfig"; +import { mapValues } from '../runtime'; +import type { EndpointIPAMConfig } from './EndpointIPAMConfig'; import { - EndpointIPAMConfigFromJSON, - EndpointIPAMConfigFromJSONTyped, - EndpointIPAMConfigToJSON, - EndpointIPAMConfigToJSONTyped, -} from "./EndpointIPAMConfig"; + EndpointIPAMConfigFromJSON, + EndpointIPAMConfigFromJSONTyped, + EndpointIPAMConfigToJSON, + EndpointIPAMConfigToJSONTyped, +} from './EndpointIPAMConfig'; /** * Configuration for a network endpoint. @@ -27,159 +27,154 @@ import { * @interface EndpointSettings */ export interface EndpointSettings { - /** - * - * @type {EndpointIPAMConfig} - * @memberof EndpointSettings - */ - IPAMConfig?: EndpointIPAMConfig | null; - /** - * - * @type {Array} - * @memberof EndpointSettings - */ - Links?: Array; - /** - * - * @type {Array} - * @memberof EndpointSettings - */ - Aliases?: Array; - /** - * Unique ID of the network. - * - * @type {string} - * @memberof EndpointSettings - */ - NetworkID?: string; - /** - * Unique ID for the service endpoint in a Sandbox. - * - * @type {string} - * @memberof EndpointSettings - */ - EndpointID?: string; - /** - * Gateway address for this network. - * - * @type {string} - * @memberof EndpointSettings - */ - Gateway?: string; - /** - * IPv4 address. - * - * @type {string} - * @memberof EndpointSettings - */ - IPAddress?: string; - /** - * Mask length of the IPv4 address. - * - * @type {number} - * @memberof EndpointSettings - */ - IPPrefixLen?: number; - /** - * IPv6 gateway address. - * - * @type {string} - * @memberof EndpointSettings - */ - IPv6Gateway?: string; - /** - * Global IPv6 address. - * - * @type {string} - * @memberof EndpointSettings - */ - GlobalIPv6Address?: string; - /** - * Mask length of the global IPv6 address. - * - * @type {number} - * @memberof EndpointSettings - */ - GlobalIPv6PrefixLen?: number; - /** - * MAC address for the endpoint on this network. - * - * @type {string} - * @memberof EndpointSettings - */ - MacAddress?: string; - /** - * DriverOpts is a mapping of driver options and values. These options - * are passed directly to the driver and are driver specific. - * - * @type {{ [key: string]: string; }} - * @memberof EndpointSettings - */ - DriverOpts?: { [key: string]: string } | null; + /** + * + * @type {EndpointIPAMConfig} + * @memberof EndpointSettings + */ + IPAMConfig?: EndpointIPAMConfig | null; + /** + * + * @type {Array} + * @memberof EndpointSettings + */ + Links?: Array; + /** + * + * @type {Array} + * @memberof EndpointSettings + */ + Aliases?: Array; + /** + * Unique ID of the network. + * + * @type {string} + * @memberof EndpointSettings + */ + NetworkID?: string; + /** + * Unique ID for the service endpoint in a Sandbox. + * + * @type {string} + * @memberof EndpointSettings + */ + EndpointID?: string; + /** + * Gateway address for this network. + * + * @type {string} + * @memberof EndpointSettings + */ + Gateway?: string; + /** + * IPv4 address. + * + * @type {string} + * @memberof EndpointSettings + */ + IPAddress?: string; + /** + * Mask length of the IPv4 address. + * + * @type {number} + * @memberof EndpointSettings + */ + IPPrefixLen?: number; + /** + * IPv6 gateway address. + * + * @type {string} + * @memberof EndpointSettings + */ + IPv6Gateway?: string; + /** + * Global IPv6 address. + * + * @type {string} + * @memberof EndpointSettings + */ + GlobalIPv6Address?: string; + /** + * Mask length of the global IPv6 address. + * + * @type {number} + * @memberof EndpointSettings + */ + GlobalIPv6PrefixLen?: number; + /** + * MAC address for the endpoint on this network. + * + * @type {string} + * @memberof EndpointSettings + */ + MacAddress?: string; + /** + * DriverOpts is a mapping of driver options and values. These options + * are passed directly to the driver and are driver specific. + * + * @type {{ [key: string]: string; }} + * @memberof EndpointSettings + */ + DriverOpts?: { [key: string]: string; } | null; } /** * Check if a given object implements the EndpointSettings interface. */ export function instanceOfEndpointSettings(value: object): value is EndpointSettings { - return true; + return true; } export function EndpointSettingsFromJSON(json: any): EndpointSettings { - return EndpointSettingsFromJSONTyped(json, false); + return EndpointSettingsFromJSONTyped(json, false); } -export function EndpointSettingsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EndpointSettings { - if (json == null) { - return json; - } - return { - IPAMConfig: - json["IPAMConfig"] == null ? undefined : EndpointIPAMConfigFromJSON(json["IPAMConfig"]), - Links: json["Links"] == null ? undefined : json["Links"], - Aliases: json["Aliases"] == null ? undefined : json["Aliases"], - NetworkID: json["NetworkID"] == null ? undefined : json["NetworkID"], - EndpointID: json["EndpointID"] == null ? undefined : json["EndpointID"], - Gateway: json["Gateway"] == null ? undefined : json["Gateway"], - IPAddress: json["IPAddress"] == null ? undefined : json["IPAddress"], - IPPrefixLen: json["IPPrefixLen"] == null ? undefined : json["IPPrefixLen"], - IPv6Gateway: json["IPv6Gateway"] == null ? undefined : json["IPv6Gateway"], - GlobalIPv6Address: json["GlobalIPv6Address"] == null ? undefined : json["GlobalIPv6Address"], - GlobalIPv6PrefixLen: - json["GlobalIPv6PrefixLen"] == null ? undefined : json["GlobalIPv6PrefixLen"], - MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], - DriverOpts: json["DriverOpts"] == null ? undefined : json["DriverOpts"], - }; +export function EndpointSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointSettings { + if (json == null) { + return json; + } + return { + + 'IPAMConfig': json['IPAMConfig'] == null ? undefined : EndpointIPAMConfigFromJSON(json['IPAMConfig']), + 'Links': json['Links'] == null ? undefined : json['Links'], + 'Aliases': json['Aliases'] == null ? undefined : json['Aliases'], + 'NetworkID': json['NetworkID'] == null ? undefined : json['NetworkID'], + 'EndpointID': json['EndpointID'] == null ? undefined : json['EndpointID'], + 'Gateway': json['Gateway'] == null ? undefined : json['Gateway'], + 'IPAddress': json['IPAddress'] == null ? undefined : json['IPAddress'], + 'IPPrefixLen': json['IPPrefixLen'] == null ? undefined : json['IPPrefixLen'], + 'IPv6Gateway': json['IPv6Gateway'] == null ? undefined : json['IPv6Gateway'], + 'GlobalIPv6Address': json['GlobalIPv6Address'] == null ? undefined : json['GlobalIPv6Address'], + 'GlobalIPv6PrefixLen': json['GlobalIPv6PrefixLen'] == null ? undefined : json['GlobalIPv6PrefixLen'], + 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], + 'DriverOpts': json['DriverOpts'] == null ? undefined : json['DriverOpts'], + }; } export function EndpointSettingsToJSON(json: any): EndpointSettings { - return EndpointSettingsToJSONTyped(json, false); + return EndpointSettingsToJSONTyped(json, false); } -export function EndpointSettingsToJSONTyped( - value?: EndpointSettings | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EndpointSettingsToJSONTyped(value?: EndpointSettings | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - IPAMConfig: EndpointIPAMConfigToJSON(value["IPAMConfig"]), - Links: value["Links"], - Aliases: value["Aliases"], - NetworkID: value["NetworkID"], - EndpointID: value["EndpointID"], - Gateway: value["Gateway"], - IPAddress: value["IPAddress"], - IPPrefixLen: value["IPPrefixLen"], - IPv6Gateway: value["IPv6Gateway"], - GlobalIPv6Address: value["GlobalIPv6Address"], - GlobalIPv6PrefixLen: value["GlobalIPv6PrefixLen"], - MacAddress: value["MacAddress"], - DriverOpts: value["DriverOpts"], - }; + return { + + 'IPAMConfig': EndpointIPAMConfigToJSON(value['IPAMConfig']), + 'Links': value['Links'], + 'Aliases': value['Aliases'], + 'NetworkID': value['NetworkID'], + 'EndpointID': value['EndpointID'], + 'Gateway': value['Gateway'], + 'IPAddress': value['IPAddress'], + 'IPPrefixLen': value['IPPrefixLen'], + 'IPv6Gateway': value['IPv6Gateway'], + 'GlobalIPv6Address': value['GlobalIPv6Address'], + 'GlobalIPv6PrefixLen': value['GlobalIPv6PrefixLen'], + 'MacAddress': value['MacAddress'], + 'DriverOpts': value['DriverOpts'], + }; } + diff --git a/src/clients/docker/models/EndpointSpec.ts b/src/clients/docker/models/EndpointSpec.ts index 662a80b5dc..c1152edd43 100644 --- a/src/clients/docker/models/EndpointSpec.ts +++ b/src/clients/docker/models/EndpointSpec.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EndpointPortConfig } from "./EndpointPortConfig"; +import { mapValues } from '../runtime'; +import type { EndpointPortConfig } from './EndpointPortConfig'; import { - EndpointPortConfigFromJSON, - EndpointPortConfigFromJSONTyped, - EndpointPortConfigToJSON, - EndpointPortConfigToJSONTyped, -} from "./EndpointPortConfig"; + EndpointPortConfigFromJSON, + EndpointPortConfigFromJSONTyped, + EndpointPortConfigToJSON, + EndpointPortConfigToJSONTyped, +} from './EndpointPortConfig'; /** * Properties that can be configured to access and load balance a service. @@ -27,73 +27,68 @@ import { * @interface EndpointSpec */ export interface EndpointSpec { - /** - * The mode of resolution to use for internal load balancing between tasks. - * - * @type {string} - * @memberof EndpointSpec - */ - Mode?: EndpointSpecModeEnum; - /** - * List of exposed ports that this service is accessible on from the - * outside. Ports can only be provided if `vip` resolution mode is used. - * - * @type {Array} - * @memberof EndpointSpec - */ - Ports?: Array; + /** + * The mode of resolution to use for internal load balancing between tasks. + * + * @type {string} + * @memberof EndpointSpec + */ + Mode?: EndpointSpecModeEnum; + /** + * List of exposed ports that this service is accessible on from the + * outside. Ports can only be provided if `vip` resolution mode is used. + * + * @type {Array} + * @memberof EndpointSpec + */ + Ports?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum EndpointSpecModeEnum { - Vip = "vip", - Dnsrr = "dnsrr", + Vip = 'vip', + Dnsrr = 'dnsrr' } + /** * Check if a given object implements the EndpointSpec interface. */ export function instanceOfEndpointSpec(value: object): value is EndpointSpec { - return true; + return true; } export function EndpointSpecFromJSON(json: any): EndpointSpec { - return EndpointSpecFromJSONTyped(json, false); + return EndpointSpecFromJSONTyped(json, false); } export function EndpointSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointSpec { - if (json == null) { - return json; - } - return { - Mode: json["Mode"] == null ? undefined : json["Mode"], - Ports: - json["Ports"] == null - ? undefined - : (json["Ports"] as Array).map(EndpointPortConfigFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'Mode': json['Mode'] == null ? undefined : json['Mode'], + 'Ports': json['Ports'] == null ? undefined : ((json['Ports'] as Array).map(EndpointPortConfigFromJSON)), + }; } export function EndpointSpecToJSON(json: any): EndpointSpec { - return EndpointSpecToJSONTyped(json, false); + return EndpointSpecToJSONTyped(json, false); } -export function EndpointSpecToJSONTyped( - value?: EndpointSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EndpointSpecToJSONTyped(value?: EndpointSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Mode: value["Mode"], - Ports: - value["Ports"] == null - ? undefined - : (value["Ports"] as Array).map(EndpointPortConfigToJSON), - }; + return { + + 'Mode': value['Mode'], + 'Ports': value['Ports'] == null ? undefined : ((value['Ports'] as Array).map(EndpointPortConfigToJSON)), + }; } + diff --git a/src/clients/docker/models/EngineDescription.ts b/src/clients/docker/models/EngineDescription.ts index 98ea29b497..42297d167c 100644 --- a/src/clients/docker/models/EngineDescription.ts +++ b/src/clients/docker/models/EngineDescription.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EngineDescriptionPluginsInner } from "./EngineDescriptionPluginsInner"; +import { mapValues } from '../runtime'; +import type { EngineDescriptionPluginsInner } from './EngineDescriptionPluginsInner'; import { - EngineDescriptionPluginsInnerFromJSON, - EngineDescriptionPluginsInnerFromJSONTyped, - EngineDescriptionPluginsInnerToJSON, - EngineDescriptionPluginsInnerToJSONTyped, -} from "./EngineDescriptionPluginsInner"; + EngineDescriptionPluginsInnerFromJSON, + EngineDescriptionPluginsInnerFromJSONTyped, + EngineDescriptionPluginsInnerToJSON, + EngineDescriptionPluginsInnerToJSONTyped, +} from './EngineDescriptionPluginsInner'; /** * EngineDescription provides information about an engine. @@ -27,72 +27,63 @@ import { * @interface EngineDescription */ export interface EngineDescription { - /** - * - * @type {string} - * @memberof EngineDescription - */ - EngineVersion?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof EngineDescription - */ - Labels?: { [key: string]: string }; - /** - * - * @type {Array} - * @memberof EngineDescription - */ - Plugins?: Array; + /** + * + * @type {string} + * @memberof EngineDescription + */ + EngineVersion?: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof EngineDescription + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof EngineDescription + */ + Plugins?: Array; } /** * Check if a given object implements the EngineDescription interface. */ export function instanceOfEngineDescription(value: object): value is EngineDescription { - return true; + return true; } export function EngineDescriptionFromJSON(json: any): EngineDescription { - return EngineDescriptionFromJSONTyped(json, false); + return EngineDescriptionFromJSONTyped(json, false); } -export function EngineDescriptionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EngineDescription { - if (json == null) { - return json; - } - return { - EngineVersion: json["EngineVersion"] == null ? undefined : json["EngineVersion"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Plugins: - json["Plugins"] == null - ? undefined - : (json["Plugins"] as Array).map(EngineDescriptionPluginsInnerFromJSON), - }; +export function EngineDescriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): EngineDescription { + if (json == null) { + return json; + } + return { + + 'EngineVersion': json['EngineVersion'] == null ? undefined : json['EngineVersion'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Plugins': json['Plugins'] == null ? undefined : ((json['Plugins'] as Array).map(EngineDescriptionPluginsInnerFromJSON)), + }; } export function EngineDescriptionToJSON(json: any): EngineDescription { - return EngineDescriptionToJSONTyped(json, false); + return EngineDescriptionToJSONTyped(json, false); } -export function EngineDescriptionToJSONTyped( - value?: EngineDescription | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EngineDescriptionToJSONTyped(value?: EngineDescription | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - EngineVersion: value["EngineVersion"], - Labels: value["Labels"], - Plugins: - value["Plugins"] == null - ? undefined - : (value["Plugins"] as Array).map(EngineDescriptionPluginsInnerToJSON), - }; + return { + + 'EngineVersion': value['EngineVersion'], + 'Labels': value['Labels'], + 'Plugins': value['Plugins'] == null ? undefined : ((value['Plugins'] as Array).map(EngineDescriptionPluginsInnerToJSON)), + }; } + diff --git a/src/clients/docker/models/EngineDescriptionPluginsInner.ts b/src/clients/docker/models/EngineDescriptionPluginsInner.ts index dc6d1c2d1c..95e0866cd2 100644 --- a/src/clients/docker/models/EngineDescriptionPluginsInner.ts +++ b/src/clients/docker/models/EngineDescriptionPluginsInner.ts @@ -2,77 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface EngineDescriptionPluginsInner */ export interface EngineDescriptionPluginsInner { - /** - * - * @type {string} - * @memberof EngineDescriptionPluginsInner - */ - Type?: string; - /** - * - * @type {string} - * @memberof EngineDescriptionPluginsInner - */ - Name?: string; + /** + * + * @type {string} + * @memberof EngineDescriptionPluginsInner + */ + Type?: string; + /** + * + * @type {string} + * @memberof EngineDescriptionPluginsInner + */ + Name?: string; } /** * Check if a given object implements the EngineDescriptionPluginsInner interface. */ -export function instanceOfEngineDescriptionPluginsInner( - value: object, -): value is EngineDescriptionPluginsInner { - return true; +export function instanceOfEngineDescriptionPluginsInner(value: object): value is EngineDescriptionPluginsInner { + return true; } export function EngineDescriptionPluginsInnerFromJSON(json: any): EngineDescriptionPluginsInner { - return EngineDescriptionPluginsInnerFromJSONTyped(json, false); + return EngineDescriptionPluginsInnerFromJSONTyped(json, false); } -export function EngineDescriptionPluginsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EngineDescriptionPluginsInner { - if (json == null) { - return json; - } - return { - Type: json["Type"] == null ? undefined : json["Type"], - Name: json["Name"] == null ? undefined : json["Name"], - }; +export function EngineDescriptionPluginsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): EngineDescriptionPluginsInner { + if (json == null) { + return json; + } + return { + + 'Type': json['Type'] == null ? undefined : json['Type'], + 'Name': json['Name'] == null ? undefined : json['Name'], + }; } export function EngineDescriptionPluginsInnerToJSON(json: any): EngineDescriptionPluginsInner { - return EngineDescriptionPluginsInnerToJSONTyped(json, false); + return EngineDescriptionPluginsInnerToJSONTyped(json, false); } -export function EngineDescriptionPluginsInnerToJSONTyped( - value?: EngineDescriptionPluginsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EngineDescriptionPluginsInnerToJSONTyped(value?: EngineDescriptionPluginsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Type: value["Type"], - Name: value["Name"], - }; + return { + + 'Type': value['Type'], + 'Name': value['Name'], + }; } + diff --git a/src/clients/docker/models/ErrorDetail.ts b/src/clients/docker/models/ErrorDetail.ts index f6a16ea447..6845c9475f 100644 --- a/src/clients/docker/models/ErrorDetail.ts +++ b/src/clients/docker/models/ErrorDetail.ts @@ -2,72 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ErrorDetail */ export interface ErrorDetail { - /** - * - * @type {number} - * @memberof ErrorDetail - */ - code?: number; - /** - * - * @type {string} - * @memberof ErrorDetail - */ - message?: string; + /** + * + * @type {number} + * @memberof ErrorDetail + */ + code?: number; + /** + * + * @type {string} + * @memberof ErrorDetail + */ + message?: string; } /** * Check if a given object implements the ErrorDetail interface. */ export function instanceOfErrorDetail(value: object): value is ErrorDetail { - return true; + return true; } export function ErrorDetailFromJSON(json: any): ErrorDetail { - return ErrorDetailFromJSONTyped(json, false); + return ErrorDetailFromJSONTyped(json, false); } export function ErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorDetail { - if (json == null) { - return json; - } - return { - code: json["code"] == null ? undefined : json["code"], - message: json["message"] == null ? undefined : json["message"], - }; + if (json == null) { + return json; + } + return { + + 'code': json['code'] == null ? undefined : json['code'], + 'message': json['message'] == null ? undefined : json['message'], + }; } export function ErrorDetailToJSON(json: any): ErrorDetail { - return ErrorDetailToJSONTyped(json, false); + return ErrorDetailToJSONTyped(json, false); } -export function ErrorDetailToJSONTyped( - value?: ErrorDetail | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorDetailToJSONTyped(value?: ErrorDetail | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - code: value["code"], - message: value["message"], - }; + return { + + 'code': value['code'], + 'message': value['message'], + }; } + diff --git a/src/clients/docker/models/ErrorResponse.ts b/src/clients/docker/models/ErrorResponse.ts index 893dbae9e1..8dbdf38b9f 100644 --- a/src/clients/docker/models/ErrorResponse.ts +++ b/src/clients/docker/models/ErrorResponse.ts @@ -2,65 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Represents an error. * @export * @interface ErrorResponse */ export interface ErrorResponse { - /** - * The error message. - * @type {string} - * @memberof ErrorResponse - */ - message: string; + /** + * The error message. + * @type {string} + * @memberof ErrorResponse + */ + message: string; } /** * Check if a given object implements the ErrorResponse interface. */ export function instanceOfErrorResponse(value: object): value is ErrorResponse { - if (!("message" in value) || value["message"] === undefined) return false; - return true; + if (!('message' in value) || value['message'] === undefined) return false; + return true; } export function ErrorResponseFromJSON(json: any): ErrorResponse { - return ErrorResponseFromJSONTyped(json, false); + return ErrorResponseFromJSONTyped(json, false); } export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse { - if (json == null) { - return json; - } - return { - message: json["message"], - }; + if (json == null) { + return json; + } + return { + + 'message': json['message'], + }; } export function ErrorResponseToJSON(json: any): ErrorResponse { - return ErrorResponseToJSONTyped(json, false); + return ErrorResponseToJSONTyped(json, false); } -export function ErrorResponseToJSONTyped( - value?: ErrorResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - message: value["message"], - }; + return { + + 'message': value['message'], + }; } + diff --git a/src/clients/docker/models/EventActor.ts b/src/clients/docker/models/EventActor.ts index 7ece2fb073..22c93013fc 100644 --- a/src/clients/docker/models/EventActor.ts +++ b/src/clients/docker/models/EventActor.ts @@ -2,75 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Actor describes something that generates events, like a container, network, * or a volume. - * + * * @export * @interface EventActor */ export interface EventActor { - /** - * The ID of the object emitting the event - * @type {string} - * @memberof EventActor - */ - ID?: string; - /** - * Various key/value attributes of the object, depending on its type. - * - * @type {{ [key: string]: string; }} - * @memberof EventActor - */ - Attributes?: { [key: string]: string }; + /** + * The ID of the object emitting the event + * @type {string} + * @memberof EventActor + */ + ID?: string; + /** + * Various key/value attributes of the object, depending on its type. + * + * @type {{ [key: string]: string; }} + * @memberof EventActor + */ + Attributes?: { [key: string]: string; }; } /** * Check if a given object implements the EventActor interface. */ export function instanceOfEventActor(value: object): value is EventActor { - return true; + return true; } export function EventActorFromJSON(json: any): EventActor { - return EventActorFromJSONTyped(json, false); + return EventActorFromJSONTyped(json, false); } export function EventActorFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventActor { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Attributes: json["Attributes"] == null ? undefined : json["Attributes"], - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Attributes': json['Attributes'] == null ? undefined : json['Attributes'], + }; } export function EventActorToJSON(json: any): EventActor { - return EventActorToJSONTyped(json, false); + return EventActorToJSONTyped(json, false); } -export function EventActorToJSONTyped( - value?: EventActor | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventActorToJSONTyped(value?: EventActor | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Attributes: value["Attributes"], - }; + return { + + 'ID': value['ID'], + 'Attributes': value['Attributes'], + }; } + diff --git a/src/clients/docker/models/EventMessage.ts b/src/clients/docker/models/EventMessage.ts index 6ec199b5dc..1567a5d99e 100644 --- a/src/clients/docker/models/EventMessage.ts +++ b/src/clients/docker/models/EventMessage.ts @@ -2,141 +2,142 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EventActor } from "./EventActor"; +import { mapValues } from '../runtime'; +import type { EventActor } from './EventActor'; import { - EventActorFromJSON, - EventActorFromJSONTyped, - EventActorToJSON, - EventActorToJSONTyped, -} from "./EventActor"; + EventActorFromJSON, + EventActorFromJSONTyped, + EventActorToJSON, + EventActorToJSONTyped, +} from './EventActor'; /** * EventMessage represents the information an event contains. - * + * * @export * @interface EventMessage */ export interface EventMessage { - /** - * The type of object emitting the event - * @type {string} - * @memberof EventMessage - */ - Type?: EventMessageTypeEnum; - /** - * The type of event - * @type {string} - * @memberof EventMessage - */ - Action?: string; - /** - * - * @type {EventActor} - * @memberof EventMessage - */ - Actor?: EventActor; - /** - * Scope of the event. Engine events are `local` scope. Cluster (Swarm) - * events are `swarm` scope. - * - * @type {string} - * @memberof EventMessage - */ - scope?: EventMessageScopeEnum; - /** - * Timestamp of event - * @type {number} - * @memberof EventMessage - */ - time?: number; - /** - * Timestamp of event, with nanosecond accuracy - * @type {number} - * @memberof EventMessage - */ - timeNano?: number; + /** + * The type of object emitting the event + * @type {string} + * @memberof EventMessage + */ + Type?: EventMessageTypeEnum; + /** + * The type of event + * @type {string} + * @memberof EventMessage + */ + Action?: string; + /** + * + * @type {EventActor} + * @memberof EventMessage + */ + Actor?: EventActor; + /** + * Scope of the event. Engine events are `local` scope. Cluster (Swarm) + * events are `swarm` scope. + * + * @type {string} + * @memberof EventMessage + */ + scope?: EventMessageScopeEnum; + /** + * Timestamp of event + * @type {number} + * @memberof EventMessage + */ + time?: number; + /** + * Timestamp of event, with nanosecond accuracy + * @type {number} + * @memberof EventMessage + */ + timeNano?: number; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum EventMessageTypeEnum { - Builder = "builder", - Config = "config", - Container = "container", - Daemon = "daemon", - Image = "image", - Network = "network", - Node = "node", - Plugin = "plugin", - Secret = "secret", - Service = "service", - Volume = "volume", + Builder = 'builder', + Config = 'config', + Container = 'container', + Daemon = 'daemon', + Image = 'image', + Network = 'network', + Node = 'node', + Plugin = 'plugin', + Secret = 'secret', + Service = 'service', + Volume = 'volume' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum EventMessageScopeEnum { - Local = "local", - Swarm = "swarm", + Local = 'local', + Swarm = 'swarm' } + /** * Check if a given object implements the EventMessage interface. */ export function instanceOfEventMessage(value: object): value is EventMessage { - return true; + return true; } export function EventMessageFromJSON(json: any): EventMessage { - return EventMessageFromJSONTyped(json, false); + return EventMessageFromJSONTyped(json, false); } export function EventMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMessage { - if (json == null) { - return json; - } - return { - Type: json["Type"] == null ? undefined : json["Type"], - Action: json["Action"] == null ? undefined : json["Action"], - Actor: json["Actor"] == null ? undefined : EventActorFromJSON(json["Actor"]), - scope: json["scope"] == null ? undefined : json["scope"], - time: json["time"] == null ? undefined : json["time"], - timeNano: json["timeNano"] == null ? undefined : json["timeNano"], - }; + if (json == null) { + return json; + } + return { + + 'Type': json['Type'] == null ? undefined : json['Type'], + 'Action': json['Action'] == null ? undefined : json['Action'], + 'Actor': json['Actor'] == null ? undefined : EventActorFromJSON(json['Actor']), + 'scope': json['scope'] == null ? undefined : json['scope'], + 'time': json['time'] == null ? undefined : json['time'], + 'timeNano': json['timeNano'] == null ? undefined : json['timeNano'], + }; } export function EventMessageToJSON(json: any): EventMessage { - return EventMessageToJSONTyped(json, false); + return EventMessageToJSONTyped(json, false); } -export function EventMessageToJSONTyped( - value?: EventMessage | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventMessageToJSONTyped(value?: EventMessage | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Type: value["Type"], - Action: value["Action"], - Actor: EventActorToJSON(value["Actor"]), - scope: value["scope"], - time: value["time"], - timeNano: value["timeNano"], - }; + return { + + 'Type': value['Type'], + 'Action': value['Action'], + 'Actor': EventActorToJSON(value['Actor']), + 'scope': value['scope'], + 'time': value['time'], + 'timeNano': value['timeNano'], + }; } + diff --git a/src/clients/docker/models/ExecConfig.ts b/src/clients/docker/models/ExecConfig.ts index bdcd1df03d..e273316166 100644 --- a/src/clients/docker/models/ExecConfig.ts +++ b/src/clients/docker/models/ExecConfig.ts @@ -2,152 +2,152 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ExecConfig */ export interface ExecConfig { - /** - * Attach to `stdin` of the exec command. - * @type {boolean} - * @memberof ExecConfig - */ - AttachStdin?: boolean; - /** - * Attach to `stdout` of the exec command. - * @type {boolean} - * @memberof ExecConfig - */ - AttachStdout?: boolean; - /** - * Attach to `stderr` of the exec command. - * @type {boolean} - * @memberof ExecConfig - */ - AttachStderr?: boolean; - /** - * Initial console size, as an `[height, width]` array. - * @type {Array} - * @memberof ExecConfig - */ - ConsoleSize?: Array | null; - /** - * Override the key sequence for detaching a container. Format is - * a single character `[a-Z]` or `ctrl-` where `` - * is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - * - * @type {string} - * @memberof ExecConfig - */ - DetachKeys?: string; - /** - * Allocate a pseudo-TTY. - * @type {boolean} - * @memberof ExecConfig - */ - Tty?: boolean; - /** - * A list of environment variables in the form `["VAR=value", ...]`. - * - * @type {Array} - * @memberof ExecConfig - */ - Env?: Array; - /** - * Command to run, as a string or array of strings. - * @type {Array} - * @memberof ExecConfig - */ - Cmd?: Array; - /** - * Runs the exec process with extended privileges. - * @type {boolean} - * @memberof ExecConfig - */ - Privileged?: boolean; - /** - * The user, and optionally, group to run the exec process inside - * the container. Format is one of: `user`, `user:group`, `uid`, - * or `uid:gid`. - * - * @type {string} - * @memberof ExecConfig - */ - User?: string; - /** - * The working directory for the exec process inside the container. - * - * @type {string} - * @memberof ExecConfig - */ - WorkingDir?: string; + /** + * Attach to `stdin` of the exec command. + * @type {boolean} + * @memberof ExecConfig + */ + AttachStdin?: boolean; + /** + * Attach to `stdout` of the exec command. + * @type {boolean} + * @memberof ExecConfig + */ + AttachStdout?: boolean; + /** + * Attach to `stderr` of the exec command. + * @type {boolean} + * @memberof ExecConfig + */ + AttachStderr?: boolean; + /** + * Initial console size, as an `[height, width]` array. + * @type {Array} + * @memberof ExecConfig + */ + ConsoleSize?: Array | null; + /** + * Override the key sequence for detaching a container. Format is + * a single character `[a-Z]` or `ctrl-` where `` + * is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * + * @type {string} + * @memberof ExecConfig + */ + DetachKeys?: string; + /** + * Allocate a pseudo-TTY. + * @type {boolean} + * @memberof ExecConfig + */ + Tty?: boolean; + /** + * A list of environment variables in the form `["VAR=value", ...]`. + * + * @type {Array} + * @memberof ExecConfig + */ + Env?: Array; + /** + * Command to run, as a string or array of strings. + * @type {Array} + * @memberof ExecConfig + */ + Cmd?: Array; + /** + * Runs the exec process with extended privileges. + * @type {boolean} + * @memberof ExecConfig + */ + Privileged?: boolean; + /** + * The user, and optionally, group to run the exec process inside + * the container. Format is one of: `user`, `user:group`, `uid`, + * or `uid:gid`. + * + * @type {string} + * @memberof ExecConfig + */ + User?: string; + /** + * The working directory for the exec process inside the container. + * + * @type {string} + * @memberof ExecConfig + */ + WorkingDir?: string; } /** * Check if a given object implements the ExecConfig interface. */ export function instanceOfExecConfig(value: object): value is ExecConfig { - return true; + return true; } export function ExecConfigFromJSON(json: any): ExecConfig { - return ExecConfigFromJSONTyped(json, false); + return ExecConfigFromJSONTyped(json, false); } export function ExecConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecConfig { - if (json == null) { - return json; - } - return { - AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], - AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], - AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], - ConsoleSize: json["ConsoleSize"] == null ? undefined : json["ConsoleSize"], - DetachKeys: json["DetachKeys"] == null ? undefined : json["DetachKeys"], - Tty: json["Tty"] == null ? undefined : json["Tty"], - Env: json["Env"] == null ? undefined : json["Env"], - Cmd: json["Cmd"] == null ? undefined : json["Cmd"], - Privileged: json["Privileged"] == null ? undefined : json["Privileged"], - User: json["User"] == null ? undefined : json["User"], - WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], - }; + if (json == null) { + return json; + } + return { + + 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], + 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], + 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], + 'ConsoleSize': json['ConsoleSize'] == null ? undefined : json['ConsoleSize'], + 'DetachKeys': json['DetachKeys'] == null ? undefined : json['DetachKeys'], + 'Tty': json['Tty'] == null ? undefined : json['Tty'], + 'Env': json['Env'] == null ? undefined : json['Env'], + 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], + 'Privileged': json['Privileged'] == null ? undefined : json['Privileged'], + 'User': json['User'] == null ? undefined : json['User'], + 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], + }; } export function ExecConfigToJSON(json: any): ExecConfig { - return ExecConfigToJSONTyped(json, false); + return ExecConfigToJSONTyped(json, false); } -export function ExecConfigToJSONTyped( - value?: ExecConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExecConfigToJSONTyped(value?: ExecConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - AttachStdin: value["AttachStdin"], - AttachStdout: value["AttachStdout"], - AttachStderr: value["AttachStderr"], - ConsoleSize: value["ConsoleSize"], - DetachKeys: value["DetachKeys"], - Tty: value["Tty"], - Env: value["Env"], - Cmd: value["Cmd"], - Privileged: value["Privileged"], - User: value["User"], - WorkingDir: value["WorkingDir"], - }; + return { + + 'AttachStdin': value['AttachStdin'], + 'AttachStdout': value['AttachStdout'], + 'AttachStderr': value['AttachStderr'], + 'ConsoleSize': value['ConsoleSize'], + 'DetachKeys': value['DetachKeys'], + 'Tty': value['Tty'], + 'Env': value['Env'], + 'Cmd': value['Cmd'], + 'Privileged': value['Privileged'], + 'User': value['User'], + 'WorkingDir': value['WorkingDir'], + }; } + diff --git a/src/clients/docker/models/ExecInspectResponse.ts b/src/clients/docker/models/ExecInspectResponse.ts index c26609da66..e059da2aa1 100644 --- a/src/clients/docker/models/ExecInspectResponse.ts +++ b/src/clients/docker/models/ExecInspectResponse.ts @@ -2,156 +2,152 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ProcessConfig } from "./ProcessConfig"; +import { mapValues } from '../runtime'; +import type { ProcessConfig } from './ProcessConfig'; import { - ProcessConfigFromJSON, - ProcessConfigFromJSONTyped, - ProcessConfigToJSON, - ProcessConfigToJSONTyped, -} from "./ProcessConfig"; + ProcessConfigFromJSON, + ProcessConfigFromJSONTyped, + ProcessConfigToJSON, + ProcessConfigToJSONTyped, +} from './ProcessConfig'; /** - * + * * @export * @interface ExecInspectResponse */ export interface ExecInspectResponse { - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - CanRemove?: boolean; - /** - * - * @type {string} - * @memberof ExecInspectResponse - */ - DetachKeys?: string; - /** - * - * @type {string} - * @memberof ExecInspectResponse - */ - ID?: string; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - Running?: boolean; - /** - * - * @type {number} - * @memberof ExecInspectResponse - */ - ExitCode?: number; - /** - * - * @type {ProcessConfig} - * @memberof ExecInspectResponse - */ - ProcessConfig?: ProcessConfig; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - OpenStdin?: boolean; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - OpenStderr?: boolean; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - OpenStdout?: boolean; - /** - * - * @type {string} - * @memberof ExecInspectResponse - */ - ContainerID?: string; - /** - * The system process ID for the exec process. - * @type {number} - * @memberof ExecInspectResponse - */ - Pid?: number; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + CanRemove?: boolean; + /** + * + * @type {string} + * @memberof ExecInspectResponse + */ + DetachKeys?: string; + /** + * + * @type {string} + * @memberof ExecInspectResponse + */ + ID?: string; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + Running?: boolean; + /** + * + * @type {number} + * @memberof ExecInspectResponse + */ + ExitCode?: number; + /** + * + * @type {ProcessConfig} + * @memberof ExecInspectResponse + */ + ProcessConfig?: ProcessConfig; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + OpenStdin?: boolean; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + OpenStderr?: boolean; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + OpenStdout?: boolean; + /** + * + * @type {string} + * @memberof ExecInspectResponse + */ + ContainerID?: string; + /** + * The system process ID for the exec process. + * @type {number} + * @memberof ExecInspectResponse + */ + Pid?: number; } /** * Check if a given object implements the ExecInspectResponse interface. */ export function instanceOfExecInspectResponse(value: object): value is ExecInspectResponse { - return true; + return true; } export function ExecInspectResponseFromJSON(json: any): ExecInspectResponse { - return ExecInspectResponseFromJSONTyped(json, false); + return ExecInspectResponseFromJSONTyped(json, false); } -export function ExecInspectResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExecInspectResponse { - if (json == null) { - return json; - } - return { - CanRemove: json["CanRemove"] == null ? undefined : json["CanRemove"], - DetachKeys: json["DetachKeys"] == null ? undefined : json["DetachKeys"], - ID: json["ID"] == null ? undefined : json["ID"], - Running: json["Running"] == null ? undefined : json["Running"], - ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], - ProcessConfig: - json["ProcessConfig"] == null ? undefined : ProcessConfigFromJSON(json["ProcessConfig"]), - OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], - OpenStderr: json["OpenStderr"] == null ? undefined : json["OpenStderr"], - OpenStdout: json["OpenStdout"] == null ? undefined : json["OpenStdout"], - ContainerID: json["ContainerID"] == null ? undefined : json["ContainerID"], - Pid: json["Pid"] == null ? undefined : json["Pid"], - }; +export function ExecInspectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecInspectResponse { + if (json == null) { + return json; + } + return { + + 'CanRemove': json['CanRemove'] == null ? undefined : json['CanRemove'], + 'DetachKeys': json['DetachKeys'] == null ? undefined : json['DetachKeys'], + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Running': json['Running'] == null ? undefined : json['Running'], + 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], + 'ProcessConfig': json['ProcessConfig'] == null ? undefined : ProcessConfigFromJSON(json['ProcessConfig']), + 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], + 'OpenStderr': json['OpenStderr'] == null ? undefined : json['OpenStderr'], + 'OpenStdout': json['OpenStdout'] == null ? undefined : json['OpenStdout'], + 'ContainerID': json['ContainerID'] == null ? undefined : json['ContainerID'], + 'Pid': json['Pid'] == null ? undefined : json['Pid'], + }; } export function ExecInspectResponseToJSON(json: any): ExecInspectResponse { - return ExecInspectResponseToJSONTyped(json, false); + return ExecInspectResponseToJSONTyped(json, false); } -export function ExecInspectResponseToJSONTyped( - value?: ExecInspectResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExecInspectResponseToJSONTyped(value?: ExecInspectResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CanRemove: value["CanRemove"], - DetachKeys: value["DetachKeys"], - ID: value["ID"], - Running: value["Running"], - ExitCode: value["ExitCode"], - ProcessConfig: ProcessConfigToJSON(value["ProcessConfig"]), - OpenStdin: value["OpenStdin"], - OpenStderr: value["OpenStderr"], - OpenStdout: value["OpenStdout"], - ContainerID: value["ContainerID"], - Pid: value["Pid"], - }; + return { + + 'CanRemove': value['CanRemove'], + 'DetachKeys': value['DetachKeys'], + 'ID': value['ID'], + 'Running': value['Running'], + 'ExitCode': value['ExitCode'], + 'ProcessConfig': ProcessConfigToJSON(value['ProcessConfig']), + 'OpenStdin': value['OpenStdin'], + 'OpenStderr': value['OpenStderr'], + 'OpenStdout': value['OpenStdout'], + 'ContainerID': value['ContainerID'], + 'Pid': value['Pid'], + }; } + diff --git a/src/clients/docker/models/ExecStartConfig.ts b/src/clients/docker/models/ExecStartConfig.ts index 119bc71c01..fea0b305ed 100644 --- a/src/clients/docker/models/ExecStartConfig.ts +++ b/src/clients/docker/models/ExecStartConfig.ts @@ -2,83 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ExecStartConfig */ export interface ExecStartConfig { - /** - * Detach from the command. - * @type {boolean} - * @memberof ExecStartConfig - */ - Detach?: boolean; - /** - * Allocate a pseudo-TTY. - * @type {boolean} - * @memberof ExecStartConfig - */ - Tty?: boolean; - /** - * Initial console size, as an `[height, width]` array. - * @type {Array} - * @memberof ExecStartConfig - */ - ConsoleSize?: Array | null; + /** + * Detach from the command. + * @type {boolean} + * @memberof ExecStartConfig + */ + Detach?: boolean; + /** + * Allocate a pseudo-TTY. + * @type {boolean} + * @memberof ExecStartConfig + */ + Tty?: boolean; + /** + * Initial console size, as an `[height, width]` array. + * @type {Array} + * @memberof ExecStartConfig + */ + ConsoleSize?: Array | null; } /** * Check if a given object implements the ExecStartConfig interface. */ export function instanceOfExecStartConfig(value: object): value is ExecStartConfig { - return true; + return true; } export function ExecStartConfigFromJSON(json: any): ExecStartConfig { - return ExecStartConfigFromJSONTyped(json, false); + return ExecStartConfigFromJSONTyped(json, false); } -export function ExecStartConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExecStartConfig { - if (json == null) { - return json; - } - return { - Detach: json["Detach"] == null ? undefined : json["Detach"], - Tty: json["Tty"] == null ? undefined : json["Tty"], - ConsoleSize: json["ConsoleSize"] == null ? undefined : json["ConsoleSize"], - }; +export function ExecStartConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecStartConfig { + if (json == null) { + return json; + } + return { + + 'Detach': json['Detach'] == null ? undefined : json['Detach'], + 'Tty': json['Tty'] == null ? undefined : json['Tty'], + 'ConsoleSize': json['ConsoleSize'] == null ? undefined : json['ConsoleSize'], + }; } export function ExecStartConfigToJSON(json: any): ExecStartConfig { - return ExecStartConfigToJSONTyped(json, false); + return ExecStartConfigToJSONTyped(json, false); } -export function ExecStartConfigToJSONTyped( - value?: ExecStartConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExecStartConfigToJSONTyped(value?: ExecStartConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Detach: value["Detach"], - Tty: value["Tty"], - ConsoleSize: value["ConsoleSize"], - }; + return { + + 'Detach': value['Detach'], + 'Tty': value['Tty'], + 'ConsoleSize': value['ConsoleSize'], + }; } + diff --git a/src/clients/docker/models/FilesystemChange.ts b/src/clients/docker/models/FilesystemChange.ts index a9077d7e36..6195434d56 100644 --- a/src/clients/docker/models/FilesystemChange.ts +++ b/src/clients/docker/models/FilesystemChange.ts @@ -2,87 +2,86 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ChangeType } from "./ChangeType"; +import { mapValues } from '../runtime'; +import type { ChangeType } from './ChangeType'; import { - ChangeTypeFromJSON, - ChangeTypeFromJSONTyped, - ChangeTypeToJSON, - ChangeTypeToJSONTyped, -} from "./ChangeType"; + ChangeTypeFromJSON, + ChangeTypeFromJSONTyped, + ChangeTypeToJSON, + ChangeTypeToJSONTyped, +} from './ChangeType'; /** * Change in the container's filesystem. - * + * * @export * @interface FilesystemChange */ export interface FilesystemChange { - /** - * Path to file or directory that has changed. - * - * @type {string} - * @memberof FilesystemChange - */ - Path: string; - /** - * - * @type {ChangeType} - * @memberof FilesystemChange - */ - Kind: ChangeType; + /** + * Path to file or directory that has changed. + * + * @type {string} + * @memberof FilesystemChange + */ + Path: string; + /** + * + * @type {ChangeType} + * @memberof FilesystemChange + */ + Kind: ChangeType; } + + /** * Check if a given object implements the FilesystemChange interface. */ export function instanceOfFilesystemChange(value: object): value is FilesystemChange { - if (!("Path" in value) || value["Path"] === undefined) return false; - if (!("Kind" in value) || value["Kind"] === undefined) return false; - return true; + if (!('Path' in value) || value['Path'] === undefined) return false; + if (!('Kind' in value) || value['Kind'] === undefined) return false; + return true; } export function FilesystemChangeFromJSON(json: any): FilesystemChange { - return FilesystemChangeFromJSONTyped(json, false); + return FilesystemChangeFromJSONTyped(json, false); } -export function FilesystemChangeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FilesystemChange { - if (json == null) { - return json; - } - return { - Path: json["Path"], - Kind: ChangeTypeFromJSON(json["Kind"]), - }; +export function FilesystemChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FilesystemChange { + if (json == null) { + return json; + } + return { + + 'Path': json['Path'], + 'Kind': ChangeTypeFromJSON(json['Kind']), + }; } export function FilesystemChangeToJSON(json: any): FilesystemChange { - return FilesystemChangeToJSONTyped(json, false); + return FilesystemChangeToJSONTyped(json, false); } -export function FilesystemChangeToJSONTyped( - value?: FilesystemChange | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FilesystemChangeToJSONTyped(value?: FilesystemChange | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Path: value["Path"], - Kind: ChangeTypeToJSON(value["Kind"]), - }; + return { + + 'Path': value['Path'], + 'Kind': ChangeTypeToJSON(value['Kind']), + }; } + diff --git a/src/clients/docker/models/GenericResourcesInner.ts b/src/clients/docker/models/GenericResourcesInner.ts index 391577924d..1ce3354a5a 100644 --- a/src/clients/docker/models/GenericResourcesInner.ts +++ b/src/clients/docker/models/GenericResourcesInner.ts @@ -2,98 +2,87 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GenericResourcesInnerNamedResourceSpec } from "./GenericResourcesInnerNamedResourceSpec"; +import { mapValues } from '../runtime'; +import type { GenericResourcesInnerNamedResourceSpec } from './GenericResourcesInnerNamedResourceSpec'; import { - GenericResourcesInnerNamedResourceSpecFromJSON, - GenericResourcesInnerNamedResourceSpecFromJSONTyped, - GenericResourcesInnerNamedResourceSpecToJSON, - GenericResourcesInnerNamedResourceSpecToJSONTyped, -} from "./GenericResourcesInnerNamedResourceSpec"; -import type { GenericResourcesInnerDiscreteResourceSpec } from "./GenericResourcesInnerDiscreteResourceSpec"; + GenericResourcesInnerNamedResourceSpecFromJSON, + GenericResourcesInnerNamedResourceSpecFromJSONTyped, + GenericResourcesInnerNamedResourceSpecToJSON, + GenericResourcesInnerNamedResourceSpecToJSONTyped, +} from './GenericResourcesInnerNamedResourceSpec'; +import type { GenericResourcesInnerDiscreteResourceSpec } from './GenericResourcesInnerDiscreteResourceSpec'; import { - GenericResourcesInnerDiscreteResourceSpecFromJSON, - GenericResourcesInnerDiscreteResourceSpecFromJSONTyped, - GenericResourcesInnerDiscreteResourceSpecToJSON, - GenericResourcesInnerDiscreteResourceSpecToJSONTyped, -} from "./GenericResourcesInnerDiscreteResourceSpec"; + GenericResourcesInnerDiscreteResourceSpecFromJSON, + GenericResourcesInnerDiscreteResourceSpecFromJSONTyped, + GenericResourcesInnerDiscreteResourceSpecToJSON, + GenericResourcesInnerDiscreteResourceSpecToJSONTyped, +} from './GenericResourcesInnerDiscreteResourceSpec'; /** - * + * * @export * @interface GenericResourcesInner */ export interface GenericResourcesInner { - /** - * - * @type {GenericResourcesInnerNamedResourceSpec} - * @memberof GenericResourcesInner - */ - NamedResourceSpec?: GenericResourcesInnerNamedResourceSpec; - /** - * - * @type {GenericResourcesInnerDiscreteResourceSpec} - * @memberof GenericResourcesInner - */ - DiscreteResourceSpec?: GenericResourcesInnerDiscreteResourceSpec; + /** + * + * @type {GenericResourcesInnerNamedResourceSpec} + * @memberof GenericResourcesInner + */ + NamedResourceSpec?: GenericResourcesInnerNamedResourceSpec; + /** + * + * @type {GenericResourcesInnerDiscreteResourceSpec} + * @memberof GenericResourcesInner + */ + DiscreteResourceSpec?: GenericResourcesInnerDiscreteResourceSpec; } /** * Check if a given object implements the GenericResourcesInner interface. */ export function instanceOfGenericResourcesInner(value: object): value is GenericResourcesInner { - return true; + return true; } export function GenericResourcesInnerFromJSON(json: any): GenericResourcesInner { - return GenericResourcesInnerFromJSONTyped(json, false); + return GenericResourcesInnerFromJSONTyped(json, false); } -export function GenericResourcesInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GenericResourcesInner { - if (json == null) { - return json; - } - return { - NamedResourceSpec: - json["NamedResourceSpec"] == null - ? undefined - : GenericResourcesInnerNamedResourceSpecFromJSON(json["NamedResourceSpec"]), - DiscreteResourceSpec: - json["DiscreteResourceSpec"] == null - ? undefined - : GenericResourcesInnerDiscreteResourceSpecFromJSON(json["DiscreteResourceSpec"]), - }; +export function GenericResourcesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericResourcesInner { + if (json == null) { + return json; + } + return { + + 'NamedResourceSpec': json['NamedResourceSpec'] == null ? undefined : GenericResourcesInnerNamedResourceSpecFromJSON(json['NamedResourceSpec']), + 'DiscreteResourceSpec': json['DiscreteResourceSpec'] == null ? undefined : GenericResourcesInnerDiscreteResourceSpecFromJSON(json['DiscreteResourceSpec']), + }; } export function GenericResourcesInnerToJSON(json: any): GenericResourcesInner { - return GenericResourcesInnerToJSONTyped(json, false); + return GenericResourcesInnerToJSONTyped(json, false); } -export function GenericResourcesInnerToJSONTyped( - value?: GenericResourcesInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GenericResourcesInnerToJSONTyped(value?: GenericResourcesInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NamedResourceSpec: GenericResourcesInnerNamedResourceSpecToJSON(value["NamedResourceSpec"]), - DiscreteResourceSpec: GenericResourcesInnerDiscreteResourceSpecToJSON( - value["DiscreteResourceSpec"], - ), - }; + return { + + 'NamedResourceSpec': GenericResourcesInnerNamedResourceSpecToJSON(value['NamedResourceSpec']), + 'DiscreteResourceSpec': GenericResourcesInnerDiscreteResourceSpecToJSON(value['DiscreteResourceSpec']), + }; } + diff --git a/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts b/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts index 0c57712ccb..5f42624d7d 100644 --- a/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts +++ b/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts @@ -2,81 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface GenericResourcesInnerDiscreteResourceSpec */ export interface GenericResourcesInnerDiscreteResourceSpec { - /** - * - * @type {string} - * @memberof GenericResourcesInnerDiscreteResourceSpec - */ - Kind?: string; - /** - * - * @type {number} - * @memberof GenericResourcesInnerDiscreteResourceSpec - */ - Value?: number; + /** + * + * @type {string} + * @memberof GenericResourcesInnerDiscreteResourceSpec + */ + Kind?: string; + /** + * + * @type {number} + * @memberof GenericResourcesInnerDiscreteResourceSpec + */ + Value?: number; } /** * Check if a given object implements the GenericResourcesInnerDiscreteResourceSpec interface. */ -export function instanceOfGenericResourcesInnerDiscreteResourceSpec( - value: object, -): value is GenericResourcesInnerDiscreteResourceSpec { - return true; +export function instanceOfGenericResourcesInnerDiscreteResourceSpec(value: object): value is GenericResourcesInnerDiscreteResourceSpec { + return true; } -export function GenericResourcesInnerDiscreteResourceSpecFromJSON( - json: any, -): GenericResourcesInnerDiscreteResourceSpec { - return GenericResourcesInnerDiscreteResourceSpecFromJSONTyped(json, false); +export function GenericResourcesInnerDiscreteResourceSpecFromJSON(json: any): GenericResourcesInnerDiscreteResourceSpec { + return GenericResourcesInnerDiscreteResourceSpecFromJSONTyped(json, false); } -export function GenericResourcesInnerDiscreteResourceSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GenericResourcesInnerDiscreteResourceSpec { - if (json == null) { - return json; - } - return { - Kind: json["Kind"] == null ? undefined : json["Kind"], - Value: json["Value"] == null ? undefined : json["Value"], - }; +export function GenericResourcesInnerDiscreteResourceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericResourcesInnerDiscreteResourceSpec { + if (json == null) { + return json; + } + return { + + 'Kind': json['Kind'] == null ? undefined : json['Kind'], + 'Value': json['Value'] == null ? undefined : json['Value'], + }; } -export function GenericResourcesInnerDiscreteResourceSpecToJSON( - json: any, -): GenericResourcesInnerDiscreteResourceSpec { - return GenericResourcesInnerDiscreteResourceSpecToJSONTyped(json, false); +export function GenericResourcesInnerDiscreteResourceSpecToJSON(json: any): GenericResourcesInnerDiscreteResourceSpec { + return GenericResourcesInnerDiscreteResourceSpecToJSONTyped(json, false); } -export function GenericResourcesInnerDiscreteResourceSpecToJSONTyped( - value?: GenericResourcesInnerDiscreteResourceSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GenericResourcesInnerDiscreteResourceSpecToJSONTyped(value?: GenericResourcesInnerDiscreteResourceSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Kind: value["Kind"], - Value: value["Value"], - }; + return { + + 'Kind': value['Kind'], + 'Value': value['Value'], + }; } + diff --git a/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts b/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts index d1042e75ee..02abe21434 100644 --- a/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts +++ b/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts @@ -2,81 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface GenericResourcesInnerNamedResourceSpec */ export interface GenericResourcesInnerNamedResourceSpec { - /** - * - * @type {string} - * @memberof GenericResourcesInnerNamedResourceSpec - */ - Kind?: string; - /** - * - * @type {string} - * @memberof GenericResourcesInnerNamedResourceSpec - */ - Value?: string; + /** + * + * @type {string} + * @memberof GenericResourcesInnerNamedResourceSpec + */ + Kind?: string; + /** + * + * @type {string} + * @memberof GenericResourcesInnerNamedResourceSpec + */ + Value?: string; } /** * Check if a given object implements the GenericResourcesInnerNamedResourceSpec interface. */ -export function instanceOfGenericResourcesInnerNamedResourceSpec( - value: object, -): value is GenericResourcesInnerNamedResourceSpec { - return true; +export function instanceOfGenericResourcesInnerNamedResourceSpec(value: object): value is GenericResourcesInnerNamedResourceSpec { + return true; } -export function GenericResourcesInnerNamedResourceSpecFromJSON( - json: any, -): GenericResourcesInnerNamedResourceSpec { - return GenericResourcesInnerNamedResourceSpecFromJSONTyped(json, false); +export function GenericResourcesInnerNamedResourceSpecFromJSON(json: any): GenericResourcesInnerNamedResourceSpec { + return GenericResourcesInnerNamedResourceSpecFromJSONTyped(json, false); } -export function GenericResourcesInnerNamedResourceSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GenericResourcesInnerNamedResourceSpec { - if (json == null) { - return json; - } - return { - Kind: json["Kind"] == null ? undefined : json["Kind"], - Value: json["Value"] == null ? undefined : json["Value"], - }; +export function GenericResourcesInnerNamedResourceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericResourcesInnerNamedResourceSpec { + if (json == null) { + return json; + } + return { + + 'Kind': json['Kind'] == null ? undefined : json['Kind'], + 'Value': json['Value'] == null ? undefined : json['Value'], + }; } -export function GenericResourcesInnerNamedResourceSpecToJSON( - json: any, -): GenericResourcesInnerNamedResourceSpec { - return GenericResourcesInnerNamedResourceSpecToJSONTyped(json, false); +export function GenericResourcesInnerNamedResourceSpecToJSON(json: any): GenericResourcesInnerNamedResourceSpec { + return GenericResourcesInnerNamedResourceSpecToJSONTyped(json, false); } -export function GenericResourcesInnerNamedResourceSpecToJSONTyped( - value?: GenericResourcesInnerNamedResourceSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GenericResourcesInnerNamedResourceSpecToJSONTyped(value?: GenericResourcesInnerNamedResourceSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Kind: value["Kind"], - Value: value["Value"], - }; + return { + + 'Kind': value['Kind'], + 'Value': value['Value'], + }; } + diff --git a/src/clients/docker/models/GraphDriverData.ts b/src/clients/docker/models/GraphDriverData.ts index 2a6c7567f7..cce1b1f166 100644 --- a/src/clients/docker/models/GraphDriverData.ts +++ b/src/clients/docker/models/GraphDriverData.ts @@ -2,83 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Information about the storage driver used to store the container's and * image's filesystem. - * + * * @export * @interface GraphDriverData */ export interface GraphDriverData { - /** - * Name of the storage driver. - * @type {string} - * @memberof GraphDriverData - */ - Name: string; - /** - * Low-level storage metadata, provided as key/value pairs. - * - * This information is driver-specific, and depends on the storage-driver - * in use, and should be used for informational purposes only. - * - * @type {{ [key: string]: string; }} - * @memberof GraphDriverData - */ - Data: { [key: string]: string }; + /** + * Name of the storage driver. + * @type {string} + * @memberof GraphDriverData + */ + Name: string; + /** + * Low-level storage metadata, provided as key/value pairs. + * + * This information is driver-specific, and depends on the storage-driver + * in use, and should be used for informational purposes only. + * + * @type {{ [key: string]: string; }} + * @memberof GraphDriverData + */ + Data: { [key: string]: string; }; } /** * Check if a given object implements the GraphDriverData interface. */ export function instanceOfGraphDriverData(value: object): value is GraphDriverData { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Data" in value) || value["Data"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Data' in value) || value['Data'] === undefined) return false; + return true; } export function GraphDriverDataFromJSON(json: any): GraphDriverData { - return GraphDriverDataFromJSONTyped(json, false); + return GraphDriverDataFromJSONTyped(json, false); } -export function GraphDriverDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GraphDriverData { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Data: json["Data"], - }; +export function GraphDriverDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GraphDriverData { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Data': json['Data'], + }; } export function GraphDriverDataToJSON(json: any): GraphDriverData { - return GraphDriverDataToJSONTyped(json, false); + return GraphDriverDataToJSONTyped(json, false); } -export function GraphDriverDataToJSONTyped( - value?: GraphDriverData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GraphDriverDataToJSONTyped(value?: GraphDriverData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Data: value["Data"], - }; + return { + + 'Name': value['Name'], + 'Data': value['Data'], + }; } + diff --git a/src/clients/docker/models/Health.ts b/src/clients/docker/models/Health.ts index dd30c58fdc..e13a05ceda 100644 --- a/src/clients/docker/models/Health.ts +++ b/src/clients/docker/models/Health.ts @@ -2,109 +2,108 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { HealthcheckResult } from "./HealthcheckResult"; +import { mapValues } from '../runtime'; +import type { HealthcheckResult } from './HealthcheckResult'; import { - HealthcheckResultFromJSON, - HealthcheckResultFromJSONTyped, - HealthcheckResultToJSON, - HealthcheckResultToJSONTyped, -} from "./HealthcheckResult"; + HealthcheckResultFromJSON, + HealthcheckResultFromJSONTyped, + HealthcheckResultToJSON, + HealthcheckResultToJSONTyped, +} from './HealthcheckResult'; /** * Health stores information about the container's healthcheck results. - * + * * @export * @interface Health */ export interface Health { - /** - * Status is one of `none`, `starting`, `healthy` or `unhealthy` - * - * - "none" Indicates there is no healthcheck - * - "starting" Starting indicates that the container is not yet ready - * - "healthy" Healthy indicates that the container is running correctly - * - "unhealthy" Unhealthy indicates that the container has a problem - * - * @type {string} - * @memberof Health - */ - Status?: HealthStatusEnum; - /** - * FailingStreak is the number of consecutive failures - * @type {number} - * @memberof Health - */ - FailingStreak?: number; - /** - * Log contains the last few results (oldest first) - * - * @type {Array} - * @memberof Health - */ - Log?: Array; + /** + * Status is one of `none`, `starting`, `healthy` or `unhealthy` + * + * - "none" Indicates there is no healthcheck + * - "starting" Starting indicates that the container is not yet ready + * - "healthy" Healthy indicates that the container is running correctly + * - "unhealthy" Unhealthy indicates that the container has a problem + * + * @type {string} + * @memberof Health + */ + Status?: HealthStatusEnum; + /** + * FailingStreak is the number of consecutive failures + * @type {number} + * @memberof Health + */ + FailingStreak?: number; + /** + * Log contains the last few results (oldest first) + * + * @type {Array} + * @memberof Health + */ + Log?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum HealthStatusEnum { - None = "none", - Starting = "starting", - Healthy = "healthy", - Unhealthy = "unhealthy", + None = 'none', + Starting = 'starting', + Healthy = 'healthy', + Unhealthy = 'unhealthy' } + /** * Check if a given object implements the Health interface. */ export function instanceOfHealth(value: object): value is Health { - return true; + return true; } export function HealthFromJSON(json: any): Health { - return HealthFromJSONTyped(json, false); + return HealthFromJSONTyped(json, false); } export function HealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): Health { - if (json == null) { - return json; - } - return { - Status: json["Status"] == null ? undefined : json["Status"], - FailingStreak: json["FailingStreak"] == null ? undefined : json["FailingStreak"], - Log: - json["Log"] == null ? undefined : (json["Log"] as Array).map(HealthcheckResultFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'Status': json['Status'] == null ? undefined : json['Status'], + 'FailingStreak': json['FailingStreak'] == null ? undefined : json['FailingStreak'], + 'Log': json['Log'] == null ? undefined : ((json['Log'] as Array).map(HealthcheckResultFromJSON)), + }; } export function HealthToJSON(json: any): Health { - return HealthToJSONTyped(json, false); + return HealthToJSONTyped(json, false); } -export function HealthToJSONTyped( - value?: Health | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HealthToJSONTyped(value?: Health | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Status: value["Status"], - FailingStreak: value["FailingStreak"], - Log: - value["Log"] == null ? undefined : (value["Log"] as Array).map(HealthcheckResultToJSON), - }; + return { + + 'Status': value['Status'], + 'FailingStreak': value['FailingStreak'], + 'Log': value['Log'] == null ? undefined : ((value['Log'] as Array).map(HealthcheckResultToJSON)), + }; } + diff --git a/src/clients/docker/models/HealthConfig.ts b/src/clients/docker/models/HealthConfig.ts index 0b5cf45631..e8d229d066 100644 --- a/src/clients/docker/models/HealthConfig.ts +++ b/src/clients/docker/models/HealthConfig.ts @@ -2,111 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * A test to perform to check that the container is healthy. * @export * @interface HealthConfig */ export interface HealthConfig { - /** - * The test to perform. Possible values are: - * - * - `[]` inherit healthcheck from image or parent image - * - `["NONE"]` disable healthcheck - * - `["CMD", args...]` exec arguments directly - * - `["CMD-SHELL", command]` run command with system's default shell - * - * @type {Array} - * @memberof HealthConfig - */ - Test?: Array; - /** - * The time to wait between checks in nanoseconds. It should be 0 or at - * least 1000000 (1 ms). 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - Interval?: number; - /** - * The time to wait before considering the check to have hung. It should - * be 0 or at least 1000000 (1 ms). 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - Timeout?: number; - /** - * The number of consecutive failures needed to consider a container as - * unhealthy. 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - Retries?: number; - /** - * Start period for the container to initialize before starting - * health-retries countdown in nanoseconds. It should be 0 or at least - * 1000000 (1 ms). 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - StartPeriod?: number; + /** + * The test to perform. Possible values are: + * + * - `[]` inherit healthcheck from image or parent image + * - `["NONE"]` disable healthcheck + * - `["CMD", args...]` exec arguments directly + * - `["CMD-SHELL", command]` run command with system's default shell + * + * @type {Array} + * @memberof HealthConfig + */ + Test?: Array; + /** + * The time to wait between checks in nanoseconds. It should be 0 or at + * least 1000000 (1 ms). 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + Interval?: number; + /** + * The time to wait before considering the check to have hung. It should + * be 0 or at least 1000000 (1 ms). 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + Timeout?: number; + /** + * The number of consecutive failures needed to consider a container as + * unhealthy. 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + Retries?: number; + /** + * Start period for the container to initialize before starting + * health-retries countdown in nanoseconds. It should be 0 or at least + * 1000000 (1 ms). 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + StartPeriod?: number; } /** * Check if a given object implements the HealthConfig interface. */ export function instanceOfHealthConfig(value: object): value is HealthConfig { - return true; + return true; } export function HealthConfigFromJSON(json: any): HealthConfig { - return HealthConfigFromJSONTyped(json, false); + return HealthConfigFromJSONTyped(json, false); } export function HealthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthConfig { - if (json == null) { - return json; - } - return { - Test: json["Test"] == null ? undefined : json["Test"], - Interval: json["Interval"] == null ? undefined : json["Interval"], - Timeout: json["Timeout"] == null ? undefined : json["Timeout"], - Retries: json["Retries"] == null ? undefined : json["Retries"], - StartPeriod: json["StartPeriod"] == null ? undefined : json["StartPeriod"], - }; + if (json == null) { + return json; + } + return { + + 'Test': json['Test'] == null ? undefined : json['Test'], + 'Interval': json['Interval'] == null ? undefined : json['Interval'], + 'Timeout': json['Timeout'] == null ? undefined : json['Timeout'], + 'Retries': json['Retries'] == null ? undefined : json['Retries'], + 'StartPeriod': json['StartPeriod'] == null ? undefined : json['StartPeriod'], + }; } export function HealthConfigToJSON(json: any): HealthConfig { - return HealthConfigToJSONTyped(json, false); + return HealthConfigToJSONTyped(json, false); } -export function HealthConfigToJSONTyped( - value?: HealthConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HealthConfigToJSONTyped(value?: HealthConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Test: value["Test"], - Interval: value["Interval"], - Timeout: value["Timeout"], - Retries: value["Retries"], - StartPeriod: value["StartPeriod"], - }; + return { + + 'Test': value['Test'], + 'Interval': value['Interval'], + 'Timeout': value['Timeout'], + 'Retries': value['Retries'], + 'StartPeriod': value['StartPeriod'], + }; } + diff --git a/src/clients/docker/models/HealthcheckResult.ts b/src/clients/docker/models/HealthcheckResult.ts index 4758d8b769..c8d8d6b5a6 100644 --- a/src/clients/docker/models/HealthcheckResult.ts +++ b/src/clients/docker/models/HealthcheckResult.ts @@ -2,102 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * HealthcheckResult stores information about a single run of a healthcheck probe - * + * * @export * @interface HealthcheckResult */ export interface HealthcheckResult { - /** - * Date and time at which this check started in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {Date} - * @memberof HealthcheckResult - */ - Start?: Date; - /** - * Date and time at which this check ended in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof HealthcheckResult - */ - End?: string; - /** - * ExitCode meanings: - * - * - `0` healthy - * - `1` unhealthy - * - `2` reserved (considered unhealthy) - * - other values: error running probe - * - * @type {number} - * @memberof HealthcheckResult - */ - ExitCode?: number; - /** - * Output from last check - * @type {string} - * @memberof HealthcheckResult - */ - Output?: string; + /** + * Date and time at which this check started in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {Date} + * @memberof HealthcheckResult + */ + Start?: Date; + /** + * Date and time at which this check ended in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof HealthcheckResult + */ + End?: string; + /** + * ExitCode meanings: + * + * - `0` healthy + * - `1` unhealthy + * - `2` reserved (considered unhealthy) + * - other values: error running probe + * + * @type {number} + * @memberof HealthcheckResult + */ + ExitCode?: number; + /** + * Output from last check + * @type {string} + * @memberof HealthcheckResult + */ + Output?: string; } /** * Check if a given object implements the HealthcheckResult interface. */ export function instanceOfHealthcheckResult(value: object): value is HealthcheckResult { - return true; + return true; } export function HealthcheckResultFromJSON(json: any): HealthcheckResult { - return HealthcheckResultFromJSONTyped(json, false); + return HealthcheckResultFromJSONTyped(json, false); } -export function HealthcheckResultFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): HealthcheckResult { - if (json == null) { - return json; - } - return { - Start: json["Start"] == null ? undefined : new Date(json["Start"]), - End: json["End"] == null ? undefined : json["End"], - ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], - Output: json["Output"] == null ? undefined : json["Output"], - }; +export function HealthcheckResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthcheckResult { + if (json == null) { + return json; + } + return { + + 'Start': json['Start'] == null ? undefined : (new Date(json['Start'])), + 'End': json['End'] == null ? undefined : json['End'], + 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], + 'Output': json['Output'] == null ? undefined : json['Output'], + }; } export function HealthcheckResultToJSON(json: any): HealthcheckResult { - return HealthcheckResultToJSONTyped(json, false); + return HealthcheckResultToJSONTyped(json, false); } -export function HealthcheckResultToJSONTyped( - value?: HealthcheckResult | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HealthcheckResultToJSONTyped(value?: HealthcheckResult | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Start: value["Start"] == null ? undefined : value["Start"].toISOString(), - End: value["End"], - ExitCode: value["ExitCode"], - Output: value["Output"], - }; + return { + + 'Start': value['Start'] == null ? undefined : ((value['Start']).toISOString()), + 'End': value['End'], + 'ExitCode': value['ExitCode'], + 'Output': value['Output'], + }; } + diff --git a/src/clients/docker/models/HistoryResponseItem.ts b/src/clients/docker/models/HistoryResponseItem.ts index ee5870e445..e34ad07c7f 100644 --- a/src/clients/docker/models/HistoryResponseItem.ts +++ b/src/clients/docker/models/HistoryResponseItem.ts @@ -2,113 +2,110 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * individual image layer information in response to ImageHistory operation * @export * @interface HistoryResponseItem */ export interface HistoryResponseItem { - /** - * - * @type {string} - * @memberof HistoryResponseItem - */ - Id: string; - /** - * - * @type {number} - * @memberof HistoryResponseItem - */ - Created: number; - /** - * - * @type {string} - * @memberof HistoryResponseItem - */ - CreatedBy: string; - /** - * - * @type {Array} - * @memberof HistoryResponseItem - */ - Tags: Array; - /** - * - * @type {number} - * @memberof HistoryResponseItem - */ - Size: number; - /** - * - * @type {string} - * @memberof HistoryResponseItem - */ - Comment: string; + /** + * + * @type {string} + * @memberof HistoryResponseItem + */ + Id: string; + /** + * + * @type {number} + * @memberof HistoryResponseItem + */ + Created: number; + /** + * + * @type {string} + * @memberof HistoryResponseItem + */ + CreatedBy: string; + /** + * + * @type {Array} + * @memberof HistoryResponseItem + */ + Tags: Array; + /** + * + * @type {number} + * @memberof HistoryResponseItem + */ + Size: number; + /** + * + * @type {string} + * @memberof HistoryResponseItem + */ + Comment: string; } /** * Check if a given object implements the HistoryResponseItem interface. */ export function instanceOfHistoryResponseItem(value: object): value is HistoryResponseItem { - if (!("Id" in value) || value["Id"] === undefined) return false; - if (!("Created" in value) || value["Created"] === undefined) return false; - if (!("CreatedBy" in value) || value["CreatedBy"] === undefined) return false; - if (!("Tags" in value) || value["Tags"] === undefined) return false; - if (!("Size" in value) || value["Size"] === undefined) return false; - if (!("Comment" in value) || value["Comment"] === undefined) return false; - return true; + if (!('Id' in value) || value['Id'] === undefined) return false; + if (!('Created' in value) || value['Created'] === undefined) return false; + if (!('CreatedBy' in value) || value['CreatedBy'] === undefined) return false; + if (!('Tags' in value) || value['Tags'] === undefined) return false; + if (!('Size' in value) || value['Size'] === undefined) return false; + if (!('Comment' in value) || value['Comment'] === undefined) return false; + return true; } export function HistoryResponseItemFromJSON(json: any): HistoryResponseItem { - return HistoryResponseItemFromJSONTyped(json, false); + return HistoryResponseItemFromJSONTyped(json, false); } -export function HistoryResponseItemFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): HistoryResponseItem { - if (json == null) { - return json; - } - return { - Id: json["Id"], - Created: json["Created"], - CreatedBy: json["CreatedBy"], - Tags: json["Tags"], - Size: json["Size"], - Comment: json["Comment"], - }; +export function HistoryResponseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): HistoryResponseItem { + if (json == null) { + return json; + } + return { + + 'Id': json['Id'], + 'Created': json['Created'], + 'CreatedBy': json['CreatedBy'], + 'Tags': json['Tags'], + 'Size': json['Size'], + 'Comment': json['Comment'], + }; } export function HistoryResponseItemToJSON(json: any): HistoryResponseItem { - return HistoryResponseItemToJSONTyped(json, false); + return HistoryResponseItemToJSONTyped(json, false); } -export function HistoryResponseItemToJSONTyped( - value?: HistoryResponseItem | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HistoryResponseItemToJSONTyped(value?: HistoryResponseItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - Created: value["Created"], - CreatedBy: value["CreatedBy"], - Tags: value["Tags"], - Size: value["Size"], - Comment: value["Comment"], - }; + return { + + 'Id': value['Id'], + 'Created': value['Created'], + 'CreatedBy': value['CreatedBy'], + 'Tags': value['Tags'], + 'Size': value['Size'], + 'Comment': value['Comment'], + }; } + diff --git a/src/clients/docker/models/HostConfig.ts b/src/clients/docker/models/HostConfig.ts index e9ffc1b6a4..4516f38cb8 100644 --- a/src/clients/docker/models/HostConfig.ts +++ b/src/clients/docker/models/HostConfig.ts @@ -2,75 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; +import { mapValues } from '../runtime'; +import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; +import { + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from './ResourcesUlimitsInner'; +import type { PortBinding } from './PortBinding'; import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from "./ResourcesUlimitsInner"; -import type { PortBinding } from "./PortBinding"; + PortBindingFromJSON, + PortBindingFromJSONTyped, + PortBindingToJSON, + PortBindingToJSONTyped, +} from './PortBinding'; +import type { ThrottleDevice } from './ThrottleDevice'; import { - PortBindingFromJSON, - PortBindingFromJSONTyped, - PortBindingToJSON, - PortBindingToJSONTyped, -} from "./PortBinding"; -import type { ThrottleDevice } from "./ThrottleDevice"; + ThrottleDeviceFromJSON, + ThrottleDeviceFromJSONTyped, + ThrottleDeviceToJSON, + ThrottleDeviceToJSONTyped, +} from './ThrottleDevice'; +import type { DeviceMapping } from './DeviceMapping'; import { - ThrottleDeviceFromJSON, - ThrottleDeviceFromJSONTyped, - ThrottleDeviceToJSON, - ThrottleDeviceToJSONTyped, -} from "./ThrottleDevice"; -import type { DeviceMapping } from "./DeviceMapping"; + DeviceMappingFromJSON, + DeviceMappingFromJSONTyped, + DeviceMappingToJSON, + DeviceMappingToJSONTyped, +} from './DeviceMapping'; +import type { Mount } from './Mount'; import { - DeviceMappingFromJSON, - DeviceMappingFromJSONTyped, - DeviceMappingToJSON, - DeviceMappingToJSONTyped, -} from "./DeviceMapping"; -import type { Mount } from "./Mount"; -import { MountFromJSON, MountFromJSONTyped, MountToJSON, MountToJSONTyped } from "./Mount"; -import type { HostConfigAllOfLogConfig } from "./HostConfigAllOfLogConfig"; + MountFromJSON, + MountFromJSONTyped, + MountToJSON, + MountToJSONTyped, +} from './Mount'; +import type { HostConfigAllOfLogConfig } from './HostConfigAllOfLogConfig'; import { - HostConfigAllOfLogConfigFromJSON, - HostConfigAllOfLogConfigFromJSONTyped, - HostConfigAllOfLogConfigToJSON, - HostConfigAllOfLogConfigToJSONTyped, -} from "./HostConfigAllOfLogConfig"; -import type { RestartPolicy } from "./RestartPolicy"; + HostConfigAllOfLogConfigFromJSON, + HostConfigAllOfLogConfigFromJSONTyped, + HostConfigAllOfLogConfigToJSON, + HostConfigAllOfLogConfigToJSONTyped, +} from './HostConfigAllOfLogConfig'; +import type { RestartPolicy } from './RestartPolicy'; import { - RestartPolicyFromJSON, - RestartPolicyFromJSONTyped, - RestartPolicyToJSON, - RestartPolicyToJSONTyped, -} from "./RestartPolicy"; -import type { DeviceRequest } from "./DeviceRequest"; + RestartPolicyFromJSON, + RestartPolicyFromJSONTyped, + RestartPolicyToJSON, + RestartPolicyToJSONTyped, +} from './RestartPolicy'; +import type { DeviceRequest } from './DeviceRequest'; import { - DeviceRequestFromJSON, - DeviceRequestFromJSONTyped, - DeviceRequestToJSON, - DeviceRequestToJSONTyped, -} from "./DeviceRequest"; -import type { ResourcesBlkioWeightDeviceInner } from "./ResourcesBlkioWeightDeviceInner"; + DeviceRequestFromJSON, + DeviceRequestFromJSONTyped, + DeviceRequestToJSON, + DeviceRequestToJSONTyped, +} from './DeviceRequest'; +import type { ResourcesBlkioWeightDeviceInner } from './ResourcesBlkioWeightDeviceInner'; import { - ResourcesBlkioWeightDeviceInnerFromJSON, - ResourcesBlkioWeightDeviceInnerFromJSONTyped, - ResourcesBlkioWeightDeviceInnerToJSON, - ResourcesBlkioWeightDeviceInnerToJSONTyped, -} from "./ResourcesBlkioWeightDeviceInner"; + ResourcesBlkioWeightDeviceInnerFromJSON, + ResourcesBlkioWeightDeviceInnerFromJSONTyped, + ResourcesBlkioWeightDeviceInnerToJSON, + ResourcesBlkioWeightDeviceInnerToJSONTyped, +} from './ResourcesBlkioWeightDeviceInner'; /** * Container configuration that depends on the host we are running on @@ -78,859 +83,810 @@ import { * @interface HostConfig */ export interface HostConfig { - /** - * An integer value representing this container's relative CPU weight - * versus other containers. - * - * @type {number} - * @memberof HostConfig - */ - CpuShares?: number; - /** - * Memory limit in bytes. - * @type {number} - * @memberof HostConfig - */ - Memory?: number; - /** - * Path to `cgroups` under which the container's `cgroup` is created. If - * the path is not absolute, the path is considered to be relative to the - * `cgroups` path of the init process. Cgroups are created if they do not - * already exist. - * - * @type {string} - * @memberof HostConfig - */ - CgroupParent?: string; - /** - * Block IO weight (relative weight). - * @type {number} - * @memberof HostConfig - */ - BlkioWeight?: number; - /** - * Block IO weight (relative device weight) in the form: - * - * ``` - * [{"Path": "device_path", "Weight": weight}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioWeightDevice?: Array; - /** - * Limit read rate (bytes per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceReadBps?: Array; - /** - * Limit write rate (bytes per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceWriteBps?: Array; - /** - * Limit read rate (IO per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceReadIOps?: Array; - /** - * Limit write rate (IO per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceWriteIOps?: Array; - /** - * The length of a CPU period in microseconds. - * @type {number} - * @memberof HostConfig - */ - CpuPeriod?: number; - /** - * Microseconds of CPU time that the container can get in a CPU period. - * - * @type {number} - * @memberof HostConfig - */ - CpuQuota?: number; - /** - * The length of a CPU real-time period in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof HostConfig - */ - CpuRealtimePeriod?: number; - /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof HostConfig - */ - CpuRealtimeRuntime?: number; - /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`). - * - * @type {string} - * @memberof HostConfig - */ - CpusetCpus?: string; - /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only - * effective on NUMA systems. - * - * @type {string} - * @memberof HostConfig - */ - CpusetMems?: string; - /** - * A list of devices to add to the container. - * @type {Array} - * @memberof HostConfig - */ - Devices?: Array; - /** - * a list of cgroup rules to apply to the container - * @type {Array} - * @memberof HostConfig - */ - DeviceCgroupRules?: Array; - /** - * A list of requests for devices to be sent to device drivers. - * - * @type {Array} - * @memberof HostConfig - */ - DeviceRequests?: Array; - /** - * Hard limit for kernel TCP buffer memory (in bytes). Depending on the - * OCI runtime in use, this option may be ignored. It is no longer supported - * by the default (runc) runtime. - * - * This field is omitted when empty. - * - * @type {number} - * @memberof HostConfig - */ - KernelMemoryTCP?: number; - /** - * Memory soft limit in bytes. - * @type {number} - * @memberof HostConfig - */ - MemoryReservation?: number; - /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited - * swap. - * - * @type {number} - * @memberof HostConfig - */ - MemorySwap?: number; - /** - * Tune a container's memory swappiness behavior. Accepts an integer - * between 0 and 100. - * - * @type {number} - * @memberof HostConfig - */ - MemorySwappiness?: number; - /** - * CPU quota in units of 10-9 CPUs. - * @type {number} - * @memberof HostConfig - */ - NanoCpus?: number; - /** - * Disable OOM Killer for the container. - * @type {boolean} - * @memberof HostConfig - */ - OomKillDisable?: boolean; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof HostConfig - */ - Init?: boolean | null; - /** - * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` - * to not change. - * - * @type {number} - * @memberof HostConfig - */ - PidsLimit?: number | null; - /** - * A list of resource limits to set in the container. For example: - * - * ``` - * {"Name": "nofile", "Soft": 1024, "Hard": 2048} - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - Ulimits?: Array; - /** - * The number of usable CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof HostConfig - */ - CpuCount?: number; - /** - * The usable percentage of the available CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof HostConfig - */ - CpuPercent?: number; - /** - * Maximum IOps for the container system drive (Windows only) - * @type {number} - * @memberof HostConfig - */ - IOMaximumIOps?: number; - /** - * Maximum IO in bytes per second for the container system drive - * (Windows only). - * - * @type {number} - * @memberof HostConfig - */ - IOMaximumBandwidth?: number; - /** - * A list of volume bindings for this container. Each volume binding - * is a string in one of these forms: - * - * - `host-src:container-dest[:options]` to bind-mount a host path - * into the container. Both `host-src`, and `container-dest` must - * be an _absolute_ path. - * - `volume-name:container-dest[:options]` to bind-mount a volume - * managed by a volume driver into the container. `container-dest` - * must be an _absolute_ path. - * - * `options` is an optional, comma-delimited list of: - * - * - `nocopy` disables automatic copying of data from the container - * path to the volume. The `nocopy` flag only applies to named volumes. - * - `[ro|rw]` mounts a volume read-only or read-write, respectively. - * If omitted or set to `rw`, volumes are mounted read-write. - * - `[z|Z]` applies SELinux labels to allow or deny multiple containers - * to read and write to the same volume. - * - `z`: a _shared_ content label is applied to the content. This - * label indicates that multiple containers can share the volume - * content, for both reading and writing. - * - `Z`: a _private unshared_ label is applied to the content. - * This label indicates that only the current container can use - * a private volume. Labeling systems such as SELinux require - * proper labels to be placed on volume content that is mounted - * into a container. Without a label, the security system can - * prevent a container's processes from using the content. By - * default, the labels set by the host operating system are not - * modified. - * - `[[r]shared|[r]slave|[r]private]` specifies mount - * [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). - * This only applies to bind-mounted volumes, not internal volumes - * or named volumes. Mount propagation requires the source mount - * point (the location where the source directory is mounted in the - * host operating system) to have the correct propagation properties. - * For shared volumes, the source mount point must be set to `shared`. - * For slave volumes, the mount must be set to either `shared` or - * `slave`. - * - * @type {Array} - * @memberof HostConfig - */ - Binds?: Array; - /** - * Path to a file where the container ID is written - * @type {string} - * @memberof HostConfig - */ - ContainerIDFile?: string; - /** - * - * @type {HostConfigAllOfLogConfig} - * @memberof HostConfig - */ - LogConfig?: HostConfigAllOfLogConfig; - /** - * Network mode to use for this container. Supported standard values - * are: `bridge`, `host`, `none`, and `container:`. Any - * other value is taken as a custom network's name to which this - * container should connect to. - * - * @type {string} - * @memberof HostConfig - */ - NetworkMode?: string; - /** - * PortMap describes the mapping of container ports to host ports, using the - * container's port-number and protocol as key in the format `/`, - * for example, `80/udp`. - * - * If a container's port is mapped for multiple protocols, separate entries - * are added to the mapping table. - * - * @type {{ [key: string]: Array | null; }} - * @memberof HostConfig - */ - PortBindings?: { [key: string]: Array | null }; - /** - * - * @type {RestartPolicy} - * @memberof HostConfig - */ - RestartPolicy?: RestartPolicy; - /** - * Automatically remove the container when the container's process - * exits. This has no effect if `RestartPolicy` is set. - * - * @type {boolean} - * @memberof HostConfig - */ - AutoRemove?: boolean; - /** - * Driver that this container uses to mount volumes. - * @type {string} - * @memberof HostConfig - */ - VolumeDriver?: string; - /** - * A list of volumes to inherit from another container, specified in - * the form `[:]`. - * - * @type {Array} - * @memberof HostConfig - */ - VolumesFrom?: Array; - /** - * Specification for mounts to be added to the container. - * - * @type {Array} - * @memberof HostConfig - */ - Mounts?: Array; - /** - * Initial console size, as an `[height, width]` array. - * - * @type {Array} - * @memberof HostConfig - */ - ConsoleSize?: Array | null; - /** - * Arbitrary non-identifying metadata attached to container and - * provided to the runtime when the container is started. - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - Annotations?: { [key: string]: string }; - /** - * A list of kernel capabilities to add to the container. Conflicts - * with option 'Capabilities'. - * - * @type {Array} - * @memberof HostConfig - */ - CapAdd?: Array; - /** - * A list of kernel capabilities to drop from the container. Conflicts - * with option 'Capabilities'. - * - * @type {Array} - * @memberof HostConfig - */ - CapDrop?: Array; - /** - * cgroup namespace mode for the container. Possible values are: - * - * - `"private"`: the container runs in its own private cgroup namespace - * - `"host"`: use the host system's cgroup namespace - * - * If not specified, the daemon default is used, which can either be `"private"` - * or `"host"`, depending on daemon version, kernel support and configuration. - * - * @type {string} - * @memberof HostConfig - */ - CgroupnsMode?: HostConfigCgroupnsModeEnum; - /** - * A list of DNS servers for the container to use. - * @type {Array} - * @memberof HostConfig - */ - Dns?: Array; - /** - * A list of DNS options. - * @type {Array} - * @memberof HostConfig - */ - DnsOptions?: Array; - /** - * A list of DNS search domains. - * @type {Array} - * @memberof HostConfig - */ - DnsSearch?: Array; - /** - * A list of hostnames/IP mappings to add to the container's `/etc/hosts` - * file. Specified in the form `["hostname:IP"]`. - * - * @type {Array} - * @memberof HostConfig - */ - ExtraHosts?: Array; - /** - * A list of additional groups that the container process will run as. - * - * @type {Array} - * @memberof HostConfig - */ - GroupAdd?: Array; - /** - * IPC sharing mode for the container. Possible values are: - * - * - `"none"`: own private IPC namespace, with /dev/shm not mounted - * - `"private"`: own private IPC namespace - * - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers - * - `"container:"`: join another (shareable) container's IPC namespace - * - `"host"`: use the host system's IPC namespace - * - * If not specified, daemon default is used, which can either be `"private"` - * or `"shareable"`, depending on daemon version and configuration. - * - * @type {string} - * @memberof HostConfig - */ - IpcMode?: string; - /** - * Cgroup to use for the container. - * @type {string} - * @memberof HostConfig - */ - Cgroup?: string; - /** - * A list of links for the container in the form `container_name:alias`. - * - * @type {Array} - * @memberof HostConfig - */ - Links?: Array; - /** - * An integer value containing the score given to the container in - * order to tune OOM killer preferences. - * - * @type {number} - * @memberof HostConfig - */ - OomScoreAdj?: number; - /** - * Set the PID (Process) Namespace mode for the container. It can be - * either: - * - * - `"container:"`: joins another container's PID namespace - * - `"host"`: use the host's PID namespace inside the container - * - * @type {string} - * @memberof HostConfig - */ - PidMode?: string; - /** - * Gives the container full access to the host. - * @type {boolean} - * @memberof HostConfig - */ - Privileged?: boolean; - /** - * Allocates an ephemeral host port for all of a container's - * exposed ports. - * - * Ports are de-allocated when the container stops and allocated when - * the container starts. The allocated port might be changed when - * restarting the container. - * - * The port is selected from the ephemeral port range that depends on - * the kernel. For example, on Linux the range is defined by - * `/proc/sys/net/ipv4/ip_local_port_range`. - * - * @type {boolean} - * @memberof HostConfig - */ - PublishAllPorts?: boolean; - /** - * Mount the container's root filesystem as read only. - * @type {boolean} - * @memberof HostConfig - */ - ReadonlyRootfs?: boolean; - /** - * A list of string values to customize labels for MLS systems, such - * as SELinux. - * - * @type {Array} - * @memberof HostConfig - */ - SecurityOpt?: Array; - /** - * Storage driver options for this container, in the form `{"size": "120G"}`. - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - StorageOpt?: { [key: string]: string }; - /** - * A map of container directories which should be replaced by tmpfs - * mounts, and their corresponding mount options. For example: - * - * ``` - * { "/run": "rw,noexec,nosuid,size=65536k" } - * ``` - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - Tmpfs?: { [key: string]: string }; - /** - * UTS namespace to use for the container. - * @type {string} - * @memberof HostConfig - */ - UTSMode?: string; - /** - * Sets the usernamespace mode for the container when usernamespace - * remapping option is enabled. - * - * @type {string} - * @memberof HostConfig - */ - UsernsMode?: string; - /** - * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. - * - * @type {number} - * @memberof HostConfig - */ - ShmSize?: number; - /** - * A list of kernel parameters (sysctls) to set in the container. - * For example: - * - * ``` - * {"net.ipv4.ip_forward": "1"} - * ``` - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - Sysctls?: { [key: string]: string }; - /** - * Runtime to use with this container. - * @type {string} - * @memberof HostConfig - */ - Runtime?: string; - /** - * Isolation technology of the container. (Windows only) - * - * @type {string} - * @memberof HostConfig - */ - Isolation?: HostConfigIsolationEnum; - /** - * The list of paths to be masked inside the container (this overrides - * the default set of paths). - * - * @type {Array} - * @memberof HostConfig - */ - MaskedPaths?: Array; - /** - * The list of paths to be set as read-only inside the container - * (this overrides the default set of paths). - * - * @type {Array} - * @memberof HostConfig - */ - ReadonlyPaths?: Array; + /** + * An integer value representing this container's relative CPU weight + * versus other containers. + * + * @type {number} + * @memberof HostConfig + */ + CpuShares?: number; + /** + * Memory limit in bytes. + * @type {number} + * @memberof HostConfig + */ + Memory?: number; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If + * the path is not absolute, the path is considered to be relative to the + * `cgroups` path of the init process. Cgroups are created if they do not + * already exist. + * + * @type {string} + * @memberof HostConfig + */ + CgroupParent?: string; + /** + * Block IO weight (relative weight). + * @type {number} + * @memberof HostConfig + */ + BlkioWeight?: number; + /** + * Block IO weight (relative device weight) in the form: + * + * ``` + * [{"Path": "device_path", "Weight": weight}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioWeightDevice?: Array; + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceReadBps?: Array; + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceWriteBps?: Array; + /** + * Limit read rate (IO per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceReadIOps?: Array; + /** + * Limit write rate (IO per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceWriteIOps?: Array; + /** + * The length of a CPU period in microseconds. + * @type {number} + * @memberof HostConfig + */ + CpuPeriod?: number; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @type {number} + * @memberof HostConfig + */ + CpuQuota?: number; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof HostConfig + */ + CpuRealtimePeriod?: number; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof HostConfig + */ + CpuRealtimeRuntime?: number; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * + * @type {string} + * @memberof HostConfig + */ + CpusetCpus?: string; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + * effective on NUMA systems. + * + * @type {string} + * @memberof HostConfig + */ + CpusetMems?: string; + /** + * A list of devices to add to the container. + * @type {Array} + * @memberof HostConfig + */ + Devices?: Array; + /** + * a list of cgroup rules to apply to the container + * @type {Array} + * @memberof HostConfig + */ + DeviceCgroupRules?: Array; + /** + * A list of requests for devices to be sent to device drivers. + * + * @type {Array} + * @memberof HostConfig + */ + DeviceRequests?: Array; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + * OCI runtime in use, this option may be ignored. It is no longer supported + * by the default (runc) runtime. + * + * This field is omitted when empty. + * + * @type {number} + * @memberof HostConfig + */ + KernelMemoryTCP?: number; + /** + * Memory soft limit in bytes. + * @type {number} + * @memberof HostConfig + */ + MemoryReservation?: number; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + * swap. + * + * @type {number} + * @memberof HostConfig + */ + MemorySwap?: number; + /** + * Tune a container's memory swappiness behavior. Accepts an integer + * between 0 and 100. + * + * @type {number} + * @memberof HostConfig + */ + MemorySwappiness?: number; + /** + * CPU quota in units of 10-9 CPUs. + * @type {number} + * @memberof HostConfig + */ + NanoCpus?: number; + /** + * Disable OOM Killer for the container. + * @type {boolean} + * @memberof HostConfig + */ + OomKillDisable?: boolean; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof HostConfig + */ + Init?: boolean | null; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + * to not change. + * + * @type {number} + * @memberof HostConfig + */ + PidsLimit?: number | null; + /** + * A list of resource limits to set in the container. For example: + * + * ``` + * {"Name": "nofile", "Soft": 1024, "Hard": 2048} + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + Ulimits?: Array; + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof HostConfig + */ + CpuCount?: number; + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof HostConfig + */ + CpuPercent?: number; + /** + * Maximum IOps for the container system drive (Windows only) + * @type {number} + * @memberof HostConfig + */ + IOMaximumIOps?: number; + /** + * Maximum IO in bytes per second for the container system drive + * (Windows only). + * + * @type {number} + * @memberof HostConfig + */ + IOMaximumBandwidth?: number; + /** + * A list of volume bindings for this container. Each volume binding + * is a string in one of these forms: + * + * - `host-src:container-dest[:options]` to bind-mount a host path + * into the container. Both `host-src`, and `container-dest` must + * be an _absolute_ path. + * - `volume-name:container-dest[:options]` to bind-mount a volume + * managed by a volume driver into the container. `container-dest` + * must be an _absolute_ path. + * + * `options` is an optional, comma-delimited list of: + * + * - `nocopy` disables automatic copying of data from the container + * path to the volume. The `nocopy` flag only applies to named volumes. + * - `[ro|rw]` mounts a volume read-only or read-write, respectively. + * If omitted or set to `rw`, volumes are mounted read-write. + * - `[z|Z]` applies SELinux labels to allow or deny multiple containers + * to read and write to the same volume. + * - `z`: a _shared_ content label is applied to the content. This + * label indicates that multiple containers can share the volume + * content, for both reading and writing. + * - `Z`: a _private unshared_ label is applied to the content. + * This label indicates that only the current container can use + * a private volume. Labeling systems such as SELinux require + * proper labels to be placed on volume content that is mounted + * into a container. Without a label, the security system can + * prevent a container's processes from using the content. By + * default, the labels set by the host operating system are not + * modified. + * - `[[r]shared|[r]slave|[r]private]` specifies mount + * [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + * This only applies to bind-mounted volumes, not internal volumes + * or named volumes. Mount propagation requires the source mount + * point (the location where the source directory is mounted in the + * host operating system) to have the correct propagation properties. + * For shared volumes, the source mount point must be set to `shared`. + * For slave volumes, the mount must be set to either `shared` or + * `slave`. + * + * @type {Array} + * @memberof HostConfig + */ + Binds?: Array; + /** + * Path to a file where the container ID is written + * @type {string} + * @memberof HostConfig + */ + ContainerIDFile?: string; + /** + * + * @type {HostConfigAllOfLogConfig} + * @memberof HostConfig + */ + LogConfig?: HostConfigAllOfLogConfig; + /** + * Network mode to use for this container. Supported standard values + * are: `bridge`, `host`, `none`, and `container:`. Any + * other value is taken as a custom network's name to which this + * container should connect to. + * + * @type {string} + * @memberof HostConfig + */ + NetworkMode?: string; + /** + * PortMap describes the mapping of container ports to host ports, using the + * container's port-number and protocol as key in the format `/`, + * for example, `80/udp`. + * + * If a container's port is mapped for multiple protocols, separate entries + * are added to the mapping table. + * + * @type {{ [key: string]: Array | null; }} + * @memberof HostConfig + */ + PortBindings?: { [key: string]: Array | null; }; + /** + * + * @type {RestartPolicy} + * @memberof HostConfig + */ + RestartPolicy?: RestartPolicy; + /** + * Automatically remove the container when the container's process + * exits. This has no effect if `RestartPolicy` is set. + * + * @type {boolean} + * @memberof HostConfig + */ + AutoRemove?: boolean; + /** + * Driver that this container uses to mount volumes. + * @type {string} + * @memberof HostConfig + */ + VolumeDriver?: string; + /** + * A list of volumes to inherit from another container, specified in + * the form `[:]`. + * + * @type {Array} + * @memberof HostConfig + */ + VolumesFrom?: Array; + /** + * Specification for mounts to be added to the container. + * + * @type {Array} + * @memberof HostConfig + */ + Mounts?: Array; + /** + * Initial console size, as an `[height, width]` array. + * + * @type {Array} + * @memberof HostConfig + */ + ConsoleSize?: Array | null; + /** + * Arbitrary non-identifying metadata attached to container and + * provided to the runtime when the container is started. + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + Annotations?: { [key: string]: string; }; + /** + * A list of kernel capabilities to add to the container. Conflicts + * with option 'Capabilities'. + * + * @type {Array} + * @memberof HostConfig + */ + CapAdd?: Array; + /** + * A list of kernel capabilities to drop from the container. Conflicts + * with option 'Capabilities'. + * + * @type {Array} + * @memberof HostConfig + */ + CapDrop?: Array; + /** + * cgroup namespace mode for the container. Possible values are: + * + * - `"private"`: the container runs in its own private cgroup namespace + * - `"host"`: use the host system's cgroup namespace + * + * If not specified, the daemon default is used, which can either be `"private"` + * or `"host"`, depending on daemon version, kernel support and configuration. + * + * @type {string} + * @memberof HostConfig + */ + CgroupnsMode?: HostConfigCgroupnsModeEnum; + /** + * A list of DNS servers for the container to use. + * @type {Array} + * @memberof HostConfig + */ + Dns?: Array; + /** + * A list of DNS options. + * @type {Array} + * @memberof HostConfig + */ + DnsOptions?: Array; + /** + * A list of DNS search domains. + * @type {Array} + * @memberof HostConfig + */ + DnsSearch?: Array; + /** + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` + * file. Specified in the form `["hostname:IP"]`. + * + * @type {Array} + * @memberof HostConfig + */ + ExtraHosts?: Array; + /** + * A list of additional groups that the container process will run as. + * + * @type {Array} + * @memberof HostConfig + */ + GroupAdd?: Array; + /** + * IPC sharing mode for the container. Possible values are: + * + * - `"none"`: own private IPC namespace, with /dev/shm not mounted + * - `"private"`: own private IPC namespace + * - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + * - `"container:"`: join another (shareable) container's IPC namespace + * - `"host"`: use the host system's IPC namespace + * + * If not specified, daemon default is used, which can either be `"private"` + * or `"shareable"`, depending on daemon version and configuration. + * + * @type {string} + * @memberof HostConfig + */ + IpcMode?: string; + /** + * Cgroup to use for the container. + * @type {string} + * @memberof HostConfig + */ + Cgroup?: string; + /** + * A list of links for the container in the form `container_name:alias`. + * + * @type {Array} + * @memberof HostConfig + */ + Links?: Array; + /** + * An integer value containing the score given to the container in + * order to tune OOM killer preferences. + * + * @type {number} + * @memberof HostConfig + */ + OomScoreAdj?: number; + /** + * Set the PID (Process) Namespace mode for the container. It can be + * either: + * + * - `"container:"`: joins another container's PID namespace + * - `"host"`: use the host's PID namespace inside the container + * + * @type {string} + * @memberof HostConfig + */ + PidMode?: string; + /** + * Gives the container full access to the host. + * @type {boolean} + * @memberof HostConfig + */ + Privileged?: boolean; + /** + * Allocates an ephemeral host port for all of a container's + * exposed ports. + * + * Ports are de-allocated when the container stops and allocated when + * the container starts. The allocated port might be changed when + * restarting the container. + * + * The port is selected from the ephemeral port range that depends on + * the kernel. For example, on Linux the range is defined by + * `/proc/sys/net/ipv4/ip_local_port_range`. + * + * @type {boolean} + * @memberof HostConfig + */ + PublishAllPorts?: boolean; + /** + * Mount the container's root filesystem as read only. + * @type {boolean} + * @memberof HostConfig + */ + ReadonlyRootfs?: boolean; + /** + * A list of string values to customize labels for MLS systems, such + * as SELinux. + * + * @type {Array} + * @memberof HostConfig + */ + SecurityOpt?: Array; + /** + * Storage driver options for this container, in the form `{"size": "120G"}`. + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + StorageOpt?: { [key: string]: string; }; + /** + * A map of container directories which should be replaced by tmpfs + * mounts, and their corresponding mount options. For example: + * + * ``` + * { "/run": "rw,noexec,nosuid,size=65536k" } + * ``` + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + Tmpfs?: { [key: string]: string; }; + /** + * UTS namespace to use for the container. + * @type {string} + * @memberof HostConfig + */ + UTSMode?: string; + /** + * Sets the usernamespace mode for the container when usernamespace + * remapping option is enabled. + * + * @type {string} + * @memberof HostConfig + */ + UsernsMode?: string; + /** + * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + * + * @type {number} + * @memberof HostConfig + */ + ShmSize?: number; + /** + * A list of kernel parameters (sysctls) to set in the container. + * For example: + * + * ``` + * {"net.ipv4.ip_forward": "1"} + * ``` + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + Sysctls?: { [key: string]: string; }; + /** + * Runtime to use with this container. + * @type {string} + * @memberof HostConfig + */ + Runtime?: string; + /** + * Isolation technology of the container. (Windows only) + * + * @type {string} + * @memberof HostConfig + */ + Isolation?: HostConfigIsolationEnum; + /** + * The list of paths to be masked inside the container (this overrides + * the default set of paths). + * + * @type {Array} + * @memberof HostConfig + */ + MaskedPaths?: Array; + /** + * The list of paths to be set as read-only inside the container + * (this overrides the default set of paths). + * + * @type {Array} + * @memberof HostConfig + */ + ReadonlyPaths?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum HostConfigCgroupnsModeEnum { - Private = "private", - Host = "host", + Private = 'private', + Host = 'host' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum HostConfigIsolationEnum { - Default = "default", - Process = "process", - Hyperv = "hyperv", + Default = 'default', + Process = 'process', + Hyperv = 'hyperv' } + /** * Check if a given object implements the HostConfig interface. */ export function instanceOfHostConfig(value: object): value is HostConfig { - return true; + return true; } export function HostConfigFromJSON(json: any): HostConfig { - return HostConfigFromJSONTyped(json, false); + return HostConfigFromJSONTyped(json, false); } export function HostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): HostConfig { - if (json == null) { - return json; - } - return { - CpuShares: json["CpuShares"] == null ? undefined : json["CpuShares"], - Memory: json["Memory"] == null ? undefined : json["Memory"], - CgroupParent: json["CgroupParent"] == null ? undefined : json["CgroupParent"], - BlkioWeight: json["BlkioWeight"] == null ? undefined : json["BlkioWeight"], - BlkioWeightDevice: - json["BlkioWeightDevice"] == null - ? undefined - : (json["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON), - BlkioDeviceReadBps: - json["BlkioDeviceReadBps"] == null - ? undefined - : (json["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceWriteBps: - json["BlkioDeviceWriteBps"] == null - ? undefined - : (json["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceReadIOps: - json["BlkioDeviceReadIOps"] == null - ? undefined - : (json["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceWriteIOps: - json["BlkioDeviceWriteIOps"] == null - ? undefined - : (json["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceFromJSON), - CpuPeriod: json["CpuPeriod"] == null ? undefined : json["CpuPeriod"], - CpuQuota: json["CpuQuota"] == null ? undefined : json["CpuQuota"], - CpuRealtimePeriod: json["CpuRealtimePeriod"] == null ? undefined : json["CpuRealtimePeriod"], - CpuRealtimeRuntime: json["CpuRealtimeRuntime"] == null ? undefined : json["CpuRealtimeRuntime"], - CpusetCpus: json["CpusetCpus"] == null ? undefined : json["CpusetCpus"], - CpusetMems: json["CpusetMems"] == null ? undefined : json["CpusetMems"], - Devices: - json["Devices"] == null - ? undefined - : (json["Devices"] as Array).map(DeviceMappingFromJSON), - DeviceCgroupRules: json["DeviceCgroupRules"] == null ? undefined : json["DeviceCgroupRules"], - DeviceRequests: - json["DeviceRequests"] == null - ? undefined - : (json["DeviceRequests"] as Array).map(DeviceRequestFromJSON), - KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], - MemoryReservation: json["MemoryReservation"] == null ? undefined : json["MemoryReservation"], - MemorySwap: json["MemorySwap"] == null ? undefined : json["MemorySwap"], - MemorySwappiness: json["MemorySwappiness"] == null ? undefined : json["MemorySwappiness"], - NanoCpus: json["NanoCpus"] == null ? undefined : json["NanoCpus"], - OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], - Init: json["Init"] == null ? undefined : json["Init"], - PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], - Ulimits: - json["Ulimits"] == null - ? undefined - : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), - CpuCount: json["CpuCount"] == null ? undefined : json["CpuCount"], - CpuPercent: json["CpuPercent"] == null ? undefined : json["CpuPercent"], - IOMaximumIOps: json["IOMaximumIOps"] == null ? undefined : json["IOMaximumIOps"], - IOMaximumBandwidth: json["IOMaximumBandwidth"] == null ? undefined : json["IOMaximumBandwidth"], - Binds: json["Binds"] == null ? undefined : json["Binds"], - ContainerIDFile: json["ContainerIDFile"] == null ? undefined : json["ContainerIDFile"], - LogConfig: - json["LogConfig"] == null ? undefined : HostConfigAllOfLogConfigFromJSON(json["LogConfig"]), - NetworkMode: json["NetworkMode"] == null ? undefined : json["NetworkMode"], - PortBindings: json["PortBindings"] == null ? undefined : json["PortBindings"], - RestartPolicy: - json["RestartPolicy"] == null ? undefined : RestartPolicyFromJSON(json["RestartPolicy"]), - AutoRemove: json["AutoRemove"] == null ? undefined : json["AutoRemove"], - VolumeDriver: json["VolumeDriver"] == null ? undefined : json["VolumeDriver"], - VolumesFrom: json["VolumesFrom"] == null ? undefined : json["VolumesFrom"], - Mounts: json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountFromJSON), - ConsoleSize: json["ConsoleSize"] == null ? undefined : json["ConsoleSize"], - Annotations: json["Annotations"] == null ? undefined : json["Annotations"], - CapAdd: json["CapAdd"] == null ? undefined : json["CapAdd"], - CapDrop: json["CapDrop"] == null ? undefined : json["CapDrop"], - CgroupnsMode: json["CgroupnsMode"] == null ? undefined : json["CgroupnsMode"], - Dns: json["Dns"] == null ? undefined : json["Dns"], - DnsOptions: json["DnsOptions"] == null ? undefined : json["DnsOptions"], - DnsSearch: json["DnsSearch"] == null ? undefined : json["DnsSearch"], - ExtraHosts: json["ExtraHosts"] == null ? undefined : json["ExtraHosts"], - GroupAdd: json["GroupAdd"] == null ? undefined : json["GroupAdd"], - IpcMode: json["IpcMode"] == null ? undefined : json["IpcMode"], - Cgroup: json["Cgroup"] == null ? undefined : json["Cgroup"], - Links: json["Links"] == null ? undefined : json["Links"], - OomScoreAdj: json["OomScoreAdj"] == null ? undefined : json["OomScoreAdj"], - PidMode: json["PidMode"] == null ? undefined : json["PidMode"], - Privileged: json["Privileged"] == null ? undefined : json["Privileged"], - PublishAllPorts: json["PublishAllPorts"] == null ? undefined : json["PublishAllPorts"], - ReadonlyRootfs: json["ReadonlyRootfs"] == null ? undefined : json["ReadonlyRootfs"], - SecurityOpt: json["SecurityOpt"] == null ? undefined : json["SecurityOpt"], - StorageOpt: json["StorageOpt"] == null ? undefined : json["StorageOpt"], - Tmpfs: json["Tmpfs"] == null ? undefined : json["Tmpfs"], - UTSMode: json["UTSMode"] == null ? undefined : json["UTSMode"], - UsernsMode: json["UsernsMode"] == null ? undefined : json["UsernsMode"], - ShmSize: json["ShmSize"] == null ? undefined : json["ShmSize"], - Sysctls: json["Sysctls"] == null ? undefined : json["Sysctls"], - Runtime: json["Runtime"] == null ? undefined : json["Runtime"], - Isolation: json["Isolation"] == null ? undefined : json["Isolation"], - MaskedPaths: json["MaskedPaths"] == null ? undefined : json["MaskedPaths"], - ReadonlyPaths: json["ReadonlyPaths"] == null ? undefined : json["ReadonlyPaths"], - }; + if (json == null) { + return json; + } + return { + + 'CpuShares': json['CpuShares'] == null ? undefined : json['CpuShares'], + 'Memory': json['Memory'] == null ? undefined : json['Memory'], + 'CgroupParent': json['CgroupParent'] == null ? undefined : json['CgroupParent'], + 'BlkioWeight': json['BlkioWeight'] == null ? undefined : json['BlkioWeight'], + 'BlkioWeightDevice': json['BlkioWeightDevice'] == null ? undefined : ((json['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON)), + 'BlkioDeviceReadBps': json['BlkioDeviceReadBps'] == null ? undefined : ((json['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceWriteBps': json['BlkioDeviceWriteBps'] == null ? undefined : ((json['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceReadIOps': json['BlkioDeviceReadIOps'] == null ? undefined : ((json['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceWriteIOps': json['BlkioDeviceWriteIOps'] == null ? undefined : ((json['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceFromJSON)), + 'CpuPeriod': json['CpuPeriod'] == null ? undefined : json['CpuPeriod'], + 'CpuQuota': json['CpuQuota'] == null ? undefined : json['CpuQuota'], + 'CpuRealtimePeriod': json['CpuRealtimePeriod'] == null ? undefined : json['CpuRealtimePeriod'], + 'CpuRealtimeRuntime': json['CpuRealtimeRuntime'] == null ? undefined : json['CpuRealtimeRuntime'], + 'CpusetCpus': json['CpusetCpus'] == null ? undefined : json['CpusetCpus'], + 'CpusetMems': json['CpusetMems'] == null ? undefined : json['CpusetMems'], + 'Devices': json['Devices'] == null ? undefined : ((json['Devices'] as Array).map(DeviceMappingFromJSON)), + 'DeviceCgroupRules': json['DeviceCgroupRules'] == null ? undefined : json['DeviceCgroupRules'], + 'DeviceRequests': json['DeviceRequests'] == null ? undefined : ((json['DeviceRequests'] as Array).map(DeviceRequestFromJSON)), + 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], + 'MemoryReservation': json['MemoryReservation'] == null ? undefined : json['MemoryReservation'], + 'MemorySwap': json['MemorySwap'] == null ? undefined : json['MemorySwap'], + 'MemorySwappiness': json['MemorySwappiness'] == null ? undefined : json['MemorySwappiness'], + 'NanoCpus': json['NanoCpus'] == null ? undefined : json['NanoCpus'], + 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], + 'Init': json['Init'] == null ? undefined : json['Init'], + 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], + 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), + 'CpuCount': json['CpuCount'] == null ? undefined : json['CpuCount'], + 'CpuPercent': json['CpuPercent'] == null ? undefined : json['CpuPercent'], + 'IOMaximumIOps': json['IOMaximumIOps'] == null ? undefined : json['IOMaximumIOps'], + 'IOMaximumBandwidth': json['IOMaximumBandwidth'] == null ? undefined : json['IOMaximumBandwidth'], + 'Binds': json['Binds'] == null ? undefined : json['Binds'], + 'ContainerIDFile': json['ContainerIDFile'] == null ? undefined : json['ContainerIDFile'], + 'LogConfig': json['LogConfig'] == null ? undefined : HostConfigAllOfLogConfigFromJSON(json['LogConfig']), + 'NetworkMode': json['NetworkMode'] == null ? undefined : json['NetworkMode'], + 'PortBindings': json['PortBindings'] == null ? undefined : json['PortBindings'], + 'RestartPolicy': json['RestartPolicy'] == null ? undefined : RestartPolicyFromJSON(json['RestartPolicy']), + 'AutoRemove': json['AutoRemove'] == null ? undefined : json['AutoRemove'], + 'VolumeDriver': json['VolumeDriver'] == null ? undefined : json['VolumeDriver'], + 'VolumesFrom': json['VolumesFrom'] == null ? undefined : json['VolumesFrom'], + 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountFromJSON)), + 'ConsoleSize': json['ConsoleSize'] == null ? undefined : json['ConsoleSize'], + 'Annotations': json['Annotations'] == null ? undefined : json['Annotations'], + 'CapAdd': json['CapAdd'] == null ? undefined : json['CapAdd'], + 'CapDrop': json['CapDrop'] == null ? undefined : json['CapDrop'], + 'CgroupnsMode': json['CgroupnsMode'] == null ? undefined : json['CgroupnsMode'], + 'Dns': json['Dns'] == null ? undefined : json['Dns'], + 'DnsOptions': json['DnsOptions'] == null ? undefined : json['DnsOptions'], + 'DnsSearch': json['DnsSearch'] == null ? undefined : json['DnsSearch'], + 'ExtraHosts': json['ExtraHosts'] == null ? undefined : json['ExtraHosts'], + 'GroupAdd': json['GroupAdd'] == null ? undefined : json['GroupAdd'], + 'IpcMode': json['IpcMode'] == null ? undefined : json['IpcMode'], + 'Cgroup': json['Cgroup'] == null ? undefined : json['Cgroup'], + 'Links': json['Links'] == null ? undefined : json['Links'], + 'OomScoreAdj': json['OomScoreAdj'] == null ? undefined : json['OomScoreAdj'], + 'PidMode': json['PidMode'] == null ? undefined : json['PidMode'], + 'Privileged': json['Privileged'] == null ? undefined : json['Privileged'], + 'PublishAllPorts': json['PublishAllPorts'] == null ? undefined : json['PublishAllPorts'], + 'ReadonlyRootfs': json['ReadonlyRootfs'] == null ? undefined : json['ReadonlyRootfs'], + 'SecurityOpt': json['SecurityOpt'] == null ? undefined : json['SecurityOpt'], + 'StorageOpt': json['StorageOpt'] == null ? undefined : json['StorageOpt'], + 'Tmpfs': json['Tmpfs'] == null ? undefined : json['Tmpfs'], + 'UTSMode': json['UTSMode'] == null ? undefined : json['UTSMode'], + 'UsernsMode': json['UsernsMode'] == null ? undefined : json['UsernsMode'], + 'ShmSize': json['ShmSize'] == null ? undefined : json['ShmSize'], + 'Sysctls': json['Sysctls'] == null ? undefined : json['Sysctls'], + 'Runtime': json['Runtime'] == null ? undefined : json['Runtime'], + 'Isolation': json['Isolation'] == null ? undefined : json['Isolation'], + 'MaskedPaths': json['MaskedPaths'] == null ? undefined : json['MaskedPaths'], + 'ReadonlyPaths': json['ReadonlyPaths'] == null ? undefined : json['ReadonlyPaths'], + }; } export function HostConfigToJSON(json: any): HostConfig { - return HostConfigToJSONTyped(json, false); + return HostConfigToJSONTyped(json, false); } -export function HostConfigToJSONTyped( - value?: HostConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HostConfigToJSONTyped(value?: HostConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CpuShares: value["CpuShares"], - Memory: value["Memory"], - CgroupParent: value["CgroupParent"], - BlkioWeight: value["BlkioWeight"], - BlkioWeightDevice: - value["BlkioWeightDevice"] == null - ? undefined - : (value["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON), - BlkioDeviceReadBps: - value["BlkioDeviceReadBps"] == null - ? undefined - : (value["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceWriteBps: - value["BlkioDeviceWriteBps"] == null - ? undefined - : (value["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceReadIOps: - value["BlkioDeviceReadIOps"] == null - ? undefined - : (value["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceWriteIOps: - value["BlkioDeviceWriteIOps"] == null - ? undefined - : (value["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceToJSON), - CpuPeriod: value["CpuPeriod"], - CpuQuota: value["CpuQuota"], - CpuRealtimePeriod: value["CpuRealtimePeriod"], - CpuRealtimeRuntime: value["CpuRealtimeRuntime"], - CpusetCpus: value["CpusetCpus"], - CpusetMems: value["CpusetMems"], - Devices: - value["Devices"] == null - ? undefined - : (value["Devices"] as Array).map(DeviceMappingToJSON), - DeviceCgroupRules: value["DeviceCgroupRules"], - DeviceRequests: - value["DeviceRequests"] == null - ? undefined - : (value["DeviceRequests"] as Array).map(DeviceRequestToJSON), - KernelMemoryTCP: value["KernelMemoryTCP"], - MemoryReservation: value["MemoryReservation"], - MemorySwap: value["MemorySwap"], - MemorySwappiness: value["MemorySwappiness"], - NanoCpus: value["NanoCpus"], - OomKillDisable: value["OomKillDisable"], - Init: value["Init"], - PidsLimit: value["PidsLimit"], - Ulimits: - value["Ulimits"] == null - ? undefined - : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), - CpuCount: value["CpuCount"], - CpuPercent: value["CpuPercent"], - IOMaximumIOps: value["IOMaximumIOps"], - IOMaximumBandwidth: value["IOMaximumBandwidth"], - Binds: value["Binds"], - ContainerIDFile: value["ContainerIDFile"], - LogConfig: HostConfigAllOfLogConfigToJSON(value["LogConfig"]), - NetworkMode: value["NetworkMode"], - PortBindings: value["PortBindings"], - RestartPolicy: RestartPolicyToJSON(value["RestartPolicy"]), - AutoRemove: value["AutoRemove"], - VolumeDriver: value["VolumeDriver"], - VolumesFrom: value["VolumesFrom"], - Mounts: value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountToJSON), - ConsoleSize: value["ConsoleSize"], - Annotations: value["Annotations"], - CapAdd: value["CapAdd"], - CapDrop: value["CapDrop"], - CgroupnsMode: value["CgroupnsMode"], - Dns: value["Dns"], - DnsOptions: value["DnsOptions"], - DnsSearch: value["DnsSearch"], - ExtraHosts: value["ExtraHosts"], - GroupAdd: value["GroupAdd"], - IpcMode: value["IpcMode"], - Cgroup: value["Cgroup"], - Links: value["Links"], - OomScoreAdj: value["OomScoreAdj"], - PidMode: value["PidMode"], - Privileged: value["Privileged"], - PublishAllPorts: value["PublishAllPorts"], - ReadonlyRootfs: value["ReadonlyRootfs"], - SecurityOpt: value["SecurityOpt"], - StorageOpt: value["StorageOpt"], - Tmpfs: value["Tmpfs"], - UTSMode: value["UTSMode"], - UsernsMode: value["UsernsMode"], - ShmSize: value["ShmSize"], - Sysctls: value["Sysctls"], - Runtime: value["Runtime"], - Isolation: value["Isolation"], - MaskedPaths: value["MaskedPaths"], - ReadonlyPaths: value["ReadonlyPaths"], - }; + return { + + 'CpuShares': value['CpuShares'], + 'Memory': value['Memory'], + 'CgroupParent': value['CgroupParent'], + 'BlkioWeight': value['BlkioWeight'], + 'BlkioWeightDevice': value['BlkioWeightDevice'] == null ? undefined : ((value['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON)), + 'BlkioDeviceReadBps': value['BlkioDeviceReadBps'] == null ? undefined : ((value['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceWriteBps': value['BlkioDeviceWriteBps'] == null ? undefined : ((value['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceReadIOps': value['BlkioDeviceReadIOps'] == null ? undefined : ((value['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceWriteIOps': value['BlkioDeviceWriteIOps'] == null ? undefined : ((value['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceToJSON)), + 'CpuPeriod': value['CpuPeriod'], + 'CpuQuota': value['CpuQuota'], + 'CpuRealtimePeriod': value['CpuRealtimePeriod'], + 'CpuRealtimeRuntime': value['CpuRealtimeRuntime'], + 'CpusetCpus': value['CpusetCpus'], + 'CpusetMems': value['CpusetMems'], + 'Devices': value['Devices'] == null ? undefined : ((value['Devices'] as Array).map(DeviceMappingToJSON)), + 'DeviceCgroupRules': value['DeviceCgroupRules'], + 'DeviceRequests': value['DeviceRequests'] == null ? undefined : ((value['DeviceRequests'] as Array).map(DeviceRequestToJSON)), + 'KernelMemoryTCP': value['KernelMemoryTCP'], + 'MemoryReservation': value['MemoryReservation'], + 'MemorySwap': value['MemorySwap'], + 'MemorySwappiness': value['MemorySwappiness'], + 'NanoCpus': value['NanoCpus'], + 'OomKillDisable': value['OomKillDisable'], + 'Init': value['Init'], + 'PidsLimit': value['PidsLimit'], + 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), + 'CpuCount': value['CpuCount'], + 'CpuPercent': value['CpuPercent'], + 'IOMaximumIOps': value['IOMaximumIOps'], + 'IOMaximumBandwidth': value['IOMaximumBandwidth'], + 'Binds': value['Binds'], + 'ContainerIDFile': value['ContainerIDFile'], + 'LogConfig': HostConfigAllOfLogConfigToJSON(value['LogConfig']), + 'NetworkMode': value['NetworkMode'], + 'PortBindings': value['PortBindings'], + 'RestartPolicy': RestartPolicyToJSON(value['RestartPolicy']), + 'AutoRemove': value['AutoRemove'], + 'VolumeDriver': value['VolumeDriver'], + 'VolumesFrom': value['VolumesFrom'], + 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountToJSON)), + 'ConsoleSize': value['ConsoleSize'], + 'Annotations': value['Annotations'], + 'CapAdd': value['CapAdd'], + 'CapDrop': value['CapDrop'], + 'CgroupnsMode': value['CgroupnsMode'], + 'Dns': value['Dns'], + 'DnsOptions': value['DnsOptions'], + 'DnsSearch': value['DnsSearch'], + 'ExtraHosts': value['ExtraHosts'], + 'GroupAdd': value['GroupAdd'], + 'IpcMode': value['IpcMode'], + 'Cgroup': value['Cgroup'], + 'Links': value['Links'], + 'OomScoreAdj': value['OomScoreAdj'], + 'PidMode': value['PidMode'], + 'Privileged': value['Privileged'], + 'PublishAllPorts': value['PublishAllPorts'], + 'ReadonlyRootfs': value['ReadonlyRootfs'], + 'SecurityOpt': value['SecurityOpt'], + 'StorageOpt': value['StorageOpt'], + 'Tmpfs': value['Tmpfs'], + 'UTSMode': value['UTSMode'], + 'UsernsMode': value['UsernsMode'], + 'ShmSize': value['ShmSize'], + 'Sysctls': value['Sysctls'], + 'Runtime': value['Runtime'], + 'Isolation': value['Isolation'], + 'MaskedPaths': value['MaskedPaths'], + 'ReadonlyPaths': value['ReadonlyPaths'], + }; } + diff --git a/src/clients/docker/models/HostConfigAllOfLogConfig.ts b/src/clients/docker/models/HostConfigAllOfLogConfig.ts index 2920abb0cd..844c28ab28 100644 --- a/src/clients/docker/models/HostConfigAllOfLogConfig.ts +++ b/src/clients/docker/models/HostConfigAllOfLogConfig.ts @@ -2,93 +2,89 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The logging configuration for this container * @export * @interface HostConfigAllOfLogConfig */ export interface HostConfigAllOfLogConfig { - /** - * - * @type {string} - * @memberof HostConfigAllOfLogConfig - */ - Type?: HostConfigAllOfLogConfigTypeEnum; - /** - * - * @type {{ [key: string]: string; }} - * @memberof HostConfigAllOfLogConfig - */ - Config?: { [key: string]: string }; + /** + * + * @type {string} + * @memberof HostConfigAllOfLogConfig + */ + Type?: HostConfigAllOfLogConfigTypeEnum; + /** + * + * @type {{ [key: string]: string; }} + * @memberof HostConfigAllOfLogConfig + */ + Config?: { [key: string]: string; }; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum HostConfigAllOfLogConfigTypeEnum { - JsonFile = "json-file", - Syslog = "syslog", - Journald = "journald", - Gelf = "gelf", - Fluentd = "fluentd", - Awslogs = "awslogs", - Splunk = "splunk", - Etwlogs = "etwlogs", - None = "none", + JsonFile = 'json-file', + Syslog = 'syslog', + Journald = 'journald', + Gelf = 'gelf', + Fluentd = 'fluentd', + Awslogs = 'awslogs', + Splunk = 'splunk', + Etwlogs = 'etwlogs', + None = 'none' } + /** * Check if a given object implements the HostConfigAllOfLogConfig interface. */ -export function instanceOfHostConfigAllOfLogConfig( - value: object, -): value is HostConfigAllOfLogConfig { - return true; +export function instanceOfHostConfigAllOfLogConfig(value: object): value is HostConfigAllOfLogConfig { + return true; } export function HostConfigAllOfLogConfigFromJSON(json: any): HostConfigAllOfLogConfig { - return HostConfigAllOfLogConfigFromJSONTyped(json, false); + return HostConfigAllOfLogConfigFromJSONTyped(json, false); } -export function HostConfigAllOfLogConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): HostConfigAllOfLogConfig { - if (json == null) { - return json; - } - return { - Type: json["Type"] == null ? undefined : json["Type"], - Config: json["Config"] == null ? undefined : json["Config"], - }; +export function HostConfigAllOfLogConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): HostConfigAllOfLogConfig { + if (json == null) { + return json; + } + return { + + 'Type': json['Type'] == null ? undefined : json['Type'], + 'Config': json['Config'] == null ? undefined : json['Config'], + }; } export function HostConfigAllOfLogConfigToJSON(json: any): HostConfigAllOfLogConfig { - return HostConfigAllOfLogConfigToJSONTyped(json, false); + return HostConfigAllOfLogConfigToJSONTyped(json, false); } -export function HostConfigAllOfLogConfigToJSONTyped( - value?: HostConfigAllOfLogConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HostConfigAllOfLogConfigToJSONTyped(value?: HostConfigAllOfLogConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Type: value["Type"], - Config: value["Config"], - }; + return { + + 'Type': value['Type'], + 'Config': value['Config'], + }; } + diff --git a/src/clients/docker/models/IPAM.ts b/src/clients/docker/models/IPAM.ts index 48a23340c4..3d2d006e18 100644 --- a/src/clients/docker/models/IPAM.ts +++ b/src/clients/docker/models/IPAM.ts @@ -2,92 +2,93 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { IPAMConfig } from "./IPAMConfig"; +import { mapValues } from '../runtime'; +import type { IPAMConfig } from './IPAMConfig'; import { - IPAMConfigFromJSON, - IPAMConfigFromJSONTyped, - IPAMConfigToJSON, - IPAMConfigToJSONTyped, -} from "./IPAMConfig"; + IPAMConfigFromJSON, + IPAMConfigFromJSONTyped, + IPAMConfigToJSON, + IPAMConfigToJSONTyped, +} from './IPAMConfig'; /** - * + * * @export * @interface IPAM */ export interface IPAM { - /** - * Name of the IPAM driver to use. - * @type {string} - * @memberof IPAM - */ - Driver?: string; - /** - * List of IPAM configuration options, specified as a map: - * - * ``` - * {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } - * ``` - * - * @type {Array} - * @memberof IPAM - */ - Config?: Array; - /** - * Driver-specific options, specified as a map. - * @type {{ [key: string]: string; }} - * @memberof IPAM - */ - Options?: { [key: string]: string }; + /** + * Name of the IPAM driver to use. + * @type {string} + * @memberof IPAM + */ + Driver?: string; + /** + * List of IPAM configuration options, specified as a map: + * + * ``` + * {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + * ``` + * + * @type {Array} + * @memberof IPAM + */ + Config?: Array; + /** + * Driver-specific options, specified as a map. + * @type {{ [key: string]: string; }} + * @memberof IPAM + */ + Options?: { [key: string]: string; }; } /** * Check if a given object implements the IPAM interface. */ export function instanceOfIPAM(value: object): value is IPAM { - return true; + return true; } export function IPAMFromJSON(json: any): IPAM { - return IPAMFromJSONTyped(json, false); + return IPAMFromJSONTyped(json, false); } export function IPAMFromJSONTyped(json: any, ignoreDiscriminator: boolean): IPAM { - if (json == null) { - return json; - } - return { - Driver: json["Driver"] == null ? undefined : json["Driver"], - Config: - json["Config"] == null ? undefined : (json["Config"] as Array).map(IPAMConfigFromJSON), - Options: json["Options"] == null ? undefined : json["Options"], - }; + if (json == null) { + return json; + } + return { + + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'Config': json['Config'] == null ? undefined : ((json['Config'] as Array).map(IPAMConfigFromJSON)), + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function IPAMToJSON(json: any): IPAM { - return IPAMToJSONTyped(json, false); + return IPAMToJSONTyped(json, false); } export function IPAMToJSONTyped(value?: IPAM | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - Driver: value["Driver"], - Config: - value["Config"] == null ? undefined : (value["Config"] as Array).map(IPAMConfigToJSON), - Options: value["Options"], - }; + return { + + 'Driver': value['Driver'], + 'Config': value['Config'] == null ? undefined : ((value['Config'] as Array).map(IPAMConfigToJSON)), + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/IPAMConfig.ts b/src/clients/docker/models/IPAMConfig.ts index 33baf95761..dbd2370381 100644 --- a/src/clients/docker/models/IPAMConfig.ts +++ b/src/clients/docker/models/IPAMConfig.ts @@ -2,88 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface IPAMConfig */ export interface IPAMConfig { - /** - * - * @type {string} - * @memberof IPAMConfig - */ - Subnet?: string; - /** - * - * @type {string} - * @memberof IPAMConfig - */ - IPRange?: string; - /** - * - * @type {string} - * @memberof IPAMConfig - */ - Gateway?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof IPAMConfig - */ - AuxiliaryAddresses?: { [key: string]: string }; + /** + * + * @type {string} + * @memberof IPAMConfig + */ + Subnet?: string; + /** + * + * @type {string} + * @memberof IPAMConfig + */ + IPRange?: string; + /** + * + * @type {string} + * @memberof IPAMConfig + */ + Gateway?: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof IPAMConfig + */ + AuxiliaryAddresses?: { [key: string]: string; }; } /** * Check if a given object implements the IPAMConfig interface. */ export function instanceOfIPAMConfig(value: object): value is IPAMConfig { - return true; + return true; } export function IPAMConfigFromJSON(json: any): IPAMConfig { - return IPAMConfigFromJSONTyped(json, false); + return IPAMConfigFromJSONTyped(json, false); } export function IPAMConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): IPAMConfig { - if (json == null) { - return json; - } - return { - Subnet: json["Subnet"] == null ? undefined : json["Subnet"], - IPRange: json["IPRange"] == null ? undefined : json["IPRange"], - Gateway: json["Gateway"] == null ? undefined : json["Gateway"], - AuxiliaryAddresses: json["AuxiliaryAddresses"] == null ? undefined : json["AuxiliaryAddresses"], - }; + if (json == null) { + return json; + } + return { + + 'Subnet': json['Subnet'] == null ? undefined : json['Subnet'], + 'IPRange': json['IPRange'] == null ? undefined : json['IPRange'], + 'Gateway': json['Gateway'] == null ? undefined : json['Gateway'], + 'AuxiliaryAddresses': json['AuxiliaryAddresses'] == null ? undefined : json['AuxiliaryAddresses'], + }; } export function IPAMConfigToJSON(json: any): IPAMConfig { - return IPAMConfigToJSONTyped(json, false); + return IPAMConfigToJSONTyped(json, false); } -export function IPAMConfigToJSONTyped( - value?: IPAMConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function IPAMConfigToJSONTyped(value?: IPAMConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Subnet: value["Subnet"], - IPRange: value["IPRange"], - Gateway: value["Gateway"], - AuxiliaryAddresses: value["AuxiliaryAddresses"], - }; + return { + + 'Subnet': value['Subnet'], + 'IPRange': value['IPRange'], + 'Gateway': value['Gateway'], + 'AuxiliaryAddresses': value['AuxiliaryAddresses'], + }; } + diff --git a/src/clients/docker/models/IdResponse.ts b/src/clients/docker/models/IdResponse.ts index 9e5940198c..3ead8659ec 100644 --- a/src/clients/docker/models/IdResponse.ts +++ b/src/clients/docker/models/IdResponse.ts @@ -2,65 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Response to an API call that returns just an Id * @export * @interface IdResponse */ export interface IdResponse { - /** - * The id of the newly created object. - * @type {string} - * @memberof IdResponse - */ - Id: string; + /** + * The id of the newly created object. + * @type {string} + * @memberof IdResponse + */ + Id: string; } /** * Check if a given object implements the IdResponse interface. */ export function instanceOfIdResponse(value: object): value is IdResponse { - if (!("Id" in value) || value["Id"] === undefined) return false; - return true; + if (!('Id' in value) || value['Id'] === undefined) return false; + return true; } export function IdResponseFromJSON(json: any): IdResponse { - return IdResponseFromJSONTyped(json, false); + return IdResponseFromJSONTyped(json, false); } export function IdResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdResponse { - if (json == null) { - return json; - } - return { - Id: json["Id"], - }; + if (json == null) { + return json; + } + return { + + 'Id': json['Id'], + }; } export function IdResponseToJSON(json: any): IdResponse { - return IdResponseToJSONTyped(json, false); + return IdResponseToJSONTyped(json, false); } -export function IdResponseToJSONTyped( - value?: IdResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function IdResponseToJSONTyped(value?: IdResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - }; + return { + + 'Id': value['Id'], + }; } + diff --git a/src/clients/docker/models/ImageConfig.ts b/src/clients/docker/models/ImageConfig.ts index 05ba313a0a..8bbda29312 100644 --- a/src/clients/docker/models/ImageConfig.ts +++ b/src/clients/docker/models/ImageConfig.ts @@ -2,345 +2,344 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { HealthConfig } from "./HealthConfig"; +import { mapValues } from '../runtime'; +import type { HealthConfig } from './HealthConfig'; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from "./HealthConfig"; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from './HealthConfig'; /** * Configuration of the image. These fields are used as defaults * when starting a container from the image. - * + * * @export * @interface ImageConfig */ export interface ImageConfig { - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - *


- * - * > **Note**: this field is always empty and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - Hostname?: string; - /** - * The domain name to use for the container. - * - *


- * - * > **Note**: this field is always empty and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - Domainname?: string; - /** - * The user that commands are run as inside the container. - * @type {string} - * @memberof ImageConfig - */ - User?: string; - /** - * Whether to attach to `stdin`. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - AttachStdin?: boolean; - /** - * Whether to attach to `stdout`. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - AttachStdout?: boolean; - /** - * Whether to attach to `stderr`. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - AttachStderr?: boolean; - /** - * An object mapping ports to an empty object in the form: - * - * `{"/": {}}` - * - * @type {{ [key: string]: object; }} - * @memberof ImageConfig - */ - ExposedPorts?: { [key: string]: object } | null; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - Tty?: boolean; - /** - * Open `stdin` - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - OpenStdin?: boolean; - /** - * Close `stdin` after one attached client disconnects. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - StdinOnce?: boolean; - /** - * A list of environment variables to set inside the container in the - * form `["VAR=value", ...]`. A variable without `=` is removed from the - * environment, rather than to have an empty value. - * - * @type {Array} - * @memberof ImageConfig - */ - Env?: Array; - /** - * Command to run specified as a string or an array of strings. - * - * @type {Array} - * @memberof ImageConfig - */ - Cmd?: Array; - /** - * - * @type {HealthConfig} - * @memberof ImageConfig - */ - Healthcheck?: HealthConfig; - /** - * Command is already escaped (Windows only) - * @type {boolean} - * @memberof ImageConfig - */ - ArgsEscaped?: boolean | null; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - *


- * - * > **Note**: this field is always empty and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - Image?: string; - /** - * An object mapping mount point paths inside the container to empty - * objects. - * - * @type {{ [key: string]: object; }} - * @memberof ImageConfig - */ - Volumes?: { [key: string]: object }; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof ImageConfig - */ - WorkingDir?: string; - /** - * The entry point for the container as a string or an array of strings. - * - * If the array consists of exactly one empty string (`[""]`) then the - * entry point is reset to system default (i.e., the entry point used by - * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - * - * @type {Array} - * @memberof ImageConfig - */ - Entrypoint?: Array; - /** - * Disable networking for the container. - * - *


- * - * > **Note**: this field is always omitted and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - NetworkDisabled?: boolean | null; - /** - * MAC address of the container. - * - *


- * - * > **Note**: this field is always omitted and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - MacAddress?: string | null; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @type {Array} - * @memberof ImageConfig - */ - OnBuild?: Array | null; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ImageConfig - */ - Labels?: { [key: string]: string }; - /** - * Signal to stop a container as a string or unsigned integer. - * - * @type {string} - * @memberof ImageConfig - */ - StopSignal?: string | null; - /** - * Timeout to stop a container in seconds. - * - *


- * - * > **Note**: this field is always omitted and must not be used. - * - * @type {number} - * @memberof ImageConfig - */ - StopTimeout?: number | null; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @type {Array} - * @memberof ImageConfig - */ - Shell?: Array | null; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + *


+ * + * > **Note**: this field is always empty and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + Hostname?: string; + /** + * The domain name to use for the container. + * + *


+ * + * > **Note**: this field is always empty and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + Domainname?: string; + /** + * The user that commands are run as inside the container. + * @type {string} + * @memberof ImageConfig + */ + User?: string; + /** + * Whether to attach to `stdin`. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + AttachStdin?: boolean; + /** + * Whether to attach to `stdout`. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + AttachStdout?: boolean; + /** + * Whether to attach to `stderr`. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + AttachStderr?: boolean; + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + * + * @type {{ [key: string]: object; }} + * @memberof ImageConfig + */ + ExposedPorts?: { [key: string]: object; } | null; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + Tty?: boolean; + /** + * Open `stdin` + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + OpenStdin?: boolean; + /** + * Close `stdin` after one attached client disconnects. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + StdinOnce?: boolean; + /** + * A list of environment variables to set inside the container in the + * form `["VAR=value", ...]`. A variable without `=` is removed from the + * environment, rather than to have an empty value. + * + * @type {Array} + * @memberof ImageConfig + */ + Env?: Array; + /** + * Command to run specified as a string or an array of strings. + * + * @type {Array} + * @memberof ImageConfig + */ + Cmd?: Array; + /** + * + * @type {HealthConfig} + * @memberof ImageConfig + */ + Healthcheck?: HealthConfig; + /** + * Command is already escaped (Windows only) + * @type {boolean} + * @memberof ImageConfig + */ + ArgsEscaped?: boolean | null; + /** + * The name (or reference) of the image to use when creating the container, + * or which was used when the container was created. + * + *


+ * + * > **Note**: this field is always empty and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + Image?: string; + /** + * An object mapping mount point paths inside the container to empty + * objects. + * + * @type {{ [key: string]: object; }} + * @memberof ImageConfig + */ + Volumes?: { [key: string]: object; }; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof ImageConfig + */ + WorkingDir?: string; + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the + * entry point is reset to system default (i.e., the entry point used by + * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + * + * @type {Array} + * @memberof ImageConfig + */ + Entrypoint?: Array; + /** + * Disable networking for the container. + * + *


+ * + * > **Note**: this field is always omitted and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + NetworkDisabled?: boolean | null; + /** + * MAC address of the container. + * + *


+ * + * > **Note**: this field is always omitted and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + MacAddress?: string | null; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @type {Array} + * @memberof ImageConfig + */ + OnBuild?: Array | null; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ImageConfig + */ + Labels?: { [key: string]: string; }; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @type {string} + * @memberof ImageConfig + */ + StopSignal?: string | null; + /** + * Timeout to stop a container in seconds. + * + *


+ * + * > **Note**: this field is always omitted and must not be used. + * + * @type {number} + * @memberof ImageConfig + */ + StopTimeout?: number | null; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @type {Array} + * @memberof ImageConfig + */ + Shell?: Array | null; } /** * Check if a given object implements the ImageConfig interface. */ export function instanceOfImageConfig(value: object): value is ImageConfig { - return true; + return true; } export function ImageConfigFromJSON(json: any): ImageConfig { - return ImageConfigFromJSONTyped(json, false); + return ImageConfigFromJSONTyped(json, false); } export function ImageConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageConfig { - if (json == null) { - return json; - } - return { - Hostname: json["Hostname"] == null ? undefined : json["Hostname"], - Domainname: json["Domainname"] == null ? undefined : json["Domainname"], - User: json["User"] == null ? undefined : json["User"], - AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], - AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], - AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], - ExposedPorts: json["ExposedPorts"] == null ? undefined : json["ExposedPorts"], - Tty: json["Tty"] == null ? undefined : json["Tty"], - OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], - StdinOnce: json["StdinOnce"] == null ? undefined : json["StdinOnce"], - Env: json["Env"] == null ? undefined : json["Env"], - Cmd: json["Cmd"] == null ? undefined : json["Cmd"], - Healthcheck: - json["Healthcheck"] == null ? undefined : HealthConfigFromJSON(json["Healthcheck"]), - ArgsEscaped: json["ArgsEscaped"] == null ? undefined : json["ArgsEscaped"], - Image: json["Image"] == null ? undefined : json["Image"], - Volumes: json["Volumes"] == null ? undefined : json["Volumes"], - WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], - Entrypoint: json["Entrypoint"] == null ? undefined : json["Entrypoint"], - NetworkDisabled: json["NetworkDisabled"] == null ? undefined : json["NetworkDisabled"], - MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], - OnBuild: json["OnBuild"] == null ? undefined : json["OnBuild"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], - StopTimeout: json["StopTimeout"] == null ? undefined : json["StopTimeout"], - Shell: json["Shell"] == null ? undefined : json["Shell"], - }; + if (json == null) { + return json; + } + return { + + 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], + 'Domainname': json['Domainname'] == null ? undefined : json['Domainname'], + 'User': json['User'] == null ? undefined : json['User'], + 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], + 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], + 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], + 'ExposedPorts': json['ExposedPorts'] == null ? undefined : json['ExposedPorts'], + 'Tty': json['Tty'] == null ? undefined : json['Tty'], + 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], + 'StdinOnce': json['StdinOnce'] == null ? undefined : json['StdinOnce'], + 'Env': json['Env'] == null ? undefined : json['Env'], + 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], + 'Healthcheck': json['Healthcheck'] == null ? undefined : HealthConfigFromJSON(json['Healthcheck']), + 'ArgsEscaped': json['ArgsEscaped'] == null ? undefined : json['ArgsEscaped'], + 'Image': json['Image'] == null ? undefined : json['Image'], + 'Volumes': json['Volumes'] == null ? undefined : json['Volumes'], + 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], + 'Entrypoint': json['Entrypoint'] == null ? undefined : json['Entrypoint'], + 'NetworkDisabled': json['NetworkDisabled'] == null ? undefined : json['NetworkDisabled'], + 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], + 'OnBuild': json['OnBuild'] == null ? undefined : json['OnBuild'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], + 'StopTimeout': json['StopTimeout'] == null ? undefined : json['StopTimeout'], + 'Shell': json['Shell'] == null ? undefined : json['Shell'], + }; } export function ImageConfigToJSON(json: any): ImageConfig { - return ImageConfigToJSONTyped(json, false); + return ImageConfigToJSONTyped(json, false); } -export function ImageConfigToJSONTyped( - value?: ImageConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageConfigToJSONTyped(value?: ImageConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Hostname: value["Hostname"], - Domainname: value["Domainname"], - User: value["User"], - AttachStdin: value["AttachStdin"], - AttachStdout: value["AttachStdout"], - AttachStderr: value["AttachStderr"], - ExposedPorts: value["ExposedPorts"], - Tty: value["Tty"], - OpenStdin: value["OpenStdin"], - StdinOnce: value["StdinOnce"], - Env: value["Env"], - Cmd: value["Cmd"], - Healthcheck: HealthConfigToJSON(value["Healthcheck"]), - ArgsEscaped: value["ArgsEscaped"], - Image: value["Image"], - Volumes: value["Volumes"], - WorkingDir: value["WorkingDir"], - Entrypoint: value["Entrypoint"], - NetworkDisabled: value["NetworkDisabled"], - MacAddress: value["MacAddress"], - OnBuild: value["OnBuild"], - Labels: value["Labels"], - StopSignal: value["StopSignal"], - StopTimeout: value["StopTimeout"], - Shell: value["Shell"], - }; + return { + + 'Hostname': value['Hostname'], + 'Domainname': value['Domainname'], + 'User': value['User'], + 'AttachStdin': value['AttachStdin'], + 'AttachStdout': value['AttachStdout'], + 'AttachStderr': value['AttachStderr'], + 'ExposedPorts': value['ExposedPorts'], + 'Tty': value['Tty'], + 'OpenStdin': value['OpenStdin'], + 'StdinOnce': value['StdinOnce'], + 'Env': value['Env'], + 'Cmd': value['Cmd'], + 'Healthcheck': HealthConfigToJSON(value['Healthcheck']), + 'ArgsEscaped': value['ArgsEscaped'], + 'Image': value['Image'], + 'Volumes': value['Volumes'], + 'WorkingDir': value['WorkingDir'], + 'Entrypoint': value['Entrypoint'], + 'NetworkDisabled': value['NetworkDisabled'], + 'MacAddress': value['MacAddress'], + 'OnBuild': value['OnBuild'], + 'Labels': value['Labels'], + 'StopSignal': value['StopSignal'], + 'StopTimeout': value['StopTimeout'], + 'Shell': value['Shell'], + }; } + diff --git a/src/clients/docker/models/ImageDeleteResponseItem.ts b/src/clients/docker/models/ImageDeleteResponseItem.ts index 2dcf716e63..8728653249 100644 --- a/src/clients/docker/models/ImageDeleteResponseItem.ts +++ b/src/clients/docker/models/ImageDeleteResponseItem.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ImageDeleteResponseItem */ export interface ImageDeleteResponseItem { - /** - * The image ID of an image that was untagged - * @type {string} - * @memberof ImageDeleteResponseItem - */ - Untagged?: string; - /** - * The image ID of an image that was deleted - * @type {string} - * @memberof ImageDeleteResponseItem - */ - Deleted?: string; + /** + * The image ID of an image that was untagged + * @type {string} + * @memberof ImageDeleteResponseItem + */ + Untagged?: string; + /** + * The image ID of an image that was deleted + * @type {string} + * @memberof ImageDeleteResponseItem + */ + Deleted?: string; } /** * Check if a given object implements the ImageDeleteResponseItem interface. */ export function instanceOfImageDeleteResponseItem(value: object): value is ImageDeleteResponseItem { - return true; + return true; } export function ImageDeleteResponseItemFromJSON(json: any): ImageDeleteResponseItem { - return ImageDeleteResponseItemFromJSONTyped(json, false); + return ImageDeleteResponseItemFromJSONTyped(json, false); } -export function ImageDeleteResponseItemFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ImageDeleteResponseItem { - if (json == null) { - return json; - } - return { - Untagged: json["Untagged"] == null ? undefined : json["Untagged"], - Deleted: json["Deleted"] == null ? undefined : json["Deleted"], - }; +export function ImageDeleteResponseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageDeleteResponseItem { + if (json == null) { + return json; + } + return { + + 'Untagged': json['Untagged'] == null ? undefined : json['Untagged'], + 'Deleted': json['Deleted'] == null ? undefined : json['Deleted'], + }; } export function ImageDeleteResponseItemToJSON(json: any): ImageDeleteResponseItem { - return ImageDeleteResponseItemToJSONTyped(json, false); + return ImageDeleteResponseItemToJSONTyped(json, false); } -export function ImageDeleteResponseItemToJSONTyped( - value?: ImageDeleteResponseItem | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageDeleteResponseItemToJSONTyped(value?: ImageDeleteResponseItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Untagged: value["Untagged"], - Deleted: value["Deleted"], - }; + return { + + 'Untagged': value['Untagged'], + 'Deleted': value['Deleted'], + }; } + diff --git a/src/clients/docker/models/ImageID.ts b/src/clients/docker/models/ImageID.ts index b2d2548a21..8fd5272ebf 100644 --- a/src/clients/docker/models/ImageID.ts +++ b/src/clients/docker/models/ImageID.ts @@ -2,64 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Image ID or Digest * @export * @interface ImageID */ export interface ImageID { - /** - * - * @type {string} - * @memberof ImageID - */ - ID?: string; + /** + * + * @type {string} + * @memberof ImageID + */ + ID?: string; } /** * Check if a given object implements the ImageID interface. */ export function instanceOfImageID(value: object): value is ImageID { - return true; + return true; } export function ImageIDFromJSON(json: any): ImageID { - return ImageIDFromJSONTyped(json, false); + return ImageIDFromJSONTyped(json, false); } export function ImageIDFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageID { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + }; } export function ImageIDToJSON(json: any): ImageID { - return ImageIDToJSONTyped(json, false); + return ImageIDToJSONTyped(json, false); } -export function ImageIDToJSONTyped( - value?: ImageID | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageIDToJSONTyped(value?: ImageID | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - }; + return { + + 'ID': value['ID'], + }; } + diff --git a/src/clients/docker/models/ImageInspect.ts b/src/clients/docker/models/ImageInspect.ts index 212b30c198..daa911dd94 100644 --- a/src/clients/docker/models/ImageInspect.ts +++ b/src/clients/docker/models/ImageInspect.ts @@ -2,309 +2,305 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ContainerConfig } from "./ContainerConfig"; +import { mapValues } from '../runtime'; +import type { ContainerConfig } from './ContainerConfig'; import { - ContainerConfigFromJSON, - ContainerConfigFromJSONTyped, - ContainerConfigToJSON, - ContainerConfigToJSONTyped, -} from "./ContainerConfig"; -import type { ImageConfig } from "./ImageConfig"; + ContainerConfigFromJSON, + ContainerConfigFromJSONTyped, + ContainerConfigToJSON, + ContainerConfigToJSONTyped, +} from './ContainerConfig'; +import type { ImageConfig } from './ImageConfig'; import { - ImageConfigFromJSON, - ImageConfigFromJSONTyped, - ImageConfigToJSON, - ImageConfigToJSONTyped, -} from "./ImageConfig"; -import type { ImageInspectMetadata } from "./ImageInspectMetadata"; + ImageConfigFromJSON, + ImageConfigFromJSONTyped, + ImageConfigToJSON, + ImageConfigToJSONTyped, +} from './ImageConfig'; +import type { ImageInspectMetadata } from './ImageInspectMetadata'; import { - ImageInspectMetadataFromJSON, - ImageInspectMetadataFromJSONTyped, - ImageInspectMetadataToJSON, - ImageInspectMetadataToJSONTyped, -} from "./ImageInspectMetadata"; -import type { ImageInspectRootFS } from "./ImageInspectRootFS"; + ImageInspectMetadataFromJSON, + ImageInspectMetadataFromJSONTyped, + ImageInspectMetadataToJSON, + ImageInspectMetadataToJSONTyped, +} from './ImageInspectMetadata'; +import type { ImageInspectRootFS } from './ImageInspectRootFS'; import { - ImageInspectRootFSFromJSON, - ImageInspectRootFSFromJSONTyped, - ImageInspectRootFSToJSON, - ImageInspectRootFSToJSONTyped, -} from "./ImageInspectRootFS"; -import type { GraphDriverData } from "./GraphDriverData"; + ImageInspectRootFSFromJSON, + ImageInspectRootFSFromJSONTyped, + ImageInspectRootFSToJSON, + ImageInspectRootFSToJSONTyped, +} from './ImageInspectRootFS'; +import type { GraphDriverData } from './GraphDriverData'; import { - GraphDriverDataFromJSON, - GraphDriverDataFromJSONTyped, - GraphDriverDataToJSON, - GraphDriverDataToJSONTyped, -} from "./GraphDriverData"; + GraphDriverDataFromJSON, + GraphDriverDataFromJSONTyped, + GraphDriverDataToJSON, + GraphDriverDataToJSONTyped, +} from './GraphDriverData'; /** * Information about an image in the local image cache. - * + * * @export * @interface ImageInspect */ export interface ImageInspect { - /** - * ID is the content-addressable ID of an image. - * - * This identifier is a content-addressable digest calculated from the - * image's configuration (which includes the digests of layers used by - * the image). - * - * Note that this digest differs from the `RepoDigests` below, which - * holds digests of image manifests that reference the image. - * - * @type {string} - * @memberof ImageInspect - */ - Id?: string; - /** - * List of image names/tags in the local image cache that reference this - * image. - * - * Multiple image tags can refer to the same image, and this list may be - * empty if no tags reference the image, in which case the image is - * "untagged", in which case it can still be referenced by its ID. - * - * @type {Array} - * @memberof ImageInspect - */ - RepoTags?: Array; - /** - * List of content-addressable digests of locally available image manifests - * that the image is referenced from. Multiple manifests can refer to the - * same image. - * - * These digests are usually only available if the image was either pulled - * from a registry, or if the image was pushed to a registry, which is when - * the manifest is generated and its digest calculated. - * - * @type {Array} - * @memberof ImageInspect - */ - RepoDigests?: Array; - /** - * ID of the parent image. - * - * Depending on how the image was created, this field may be empty and - * is only set for images that were built/created locally. This field - * is empty if the image was pulled from an image registry. - * - * @type {string} - * @memberof ImageInspect - */ - Parent?: string; - /** - * Optional message that was set when committing or importing the image. - * - * @type {string} - * @memberof ImageInspect - */ - Comment?: string; - /** - * Date and time at which the image was created, formatted in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof ImageInspect - */ - Created?: string; - /** - * The ID of the container that was used to create the image. - * - * Depending on how the image was created, this field may be empty. - * - * @type {string} - * @memberof ImageInspect - */ - Container?: string; - /** - * - * @type {ContainerConfig} - * @memberof ImageInspect - */ - ContainerConfig?: ContainerConfig; - /** - * The version of Docker that was used to build the image. - * - * Depending on how the image was created, this field may be empty. - * - * @type {string} - * @memberof ImageInspect - */ - DockerVersion?: string; - /** - * Name of the author that was specified when committing the image, or as - * specified through MAINTAINER (deprecated) in the Dockerfile. - * - * @type {string} - * @memberof ImageInspect - */ - Author?: string; - /** - * - * @type {ImageConfig} - * @memberof ImageInspect - */ - Config?: ImageConfig; - /** - * Hardware CPU architecture that the image runs on. - * - * @type {string} - * @memberof ImageInspect - */ - Architecture?: string; - /** - * CPU architecture variant (presently ARM-only). - * - * @type {string} - * @memberof ImageInspect - */ - Variant?: string | null; - /** - * Operating System the image is built to run on. - * - * @type {string} - * @memberof ImageInspect - */ - Os?: string; - /** - * Operating System version the image is built to run on (especially - * for Windows). - * - * @type {string} - * @memberof ImageInspect - */ - OsVersion?: string | null; - /** - * Total size of the image including all layers it is composed of. - * - * @type {number} - * @memberof ImageInspect - */ - Size?: number; - /** - * Total size of the image including all layers it is composed of. - * - * In versions of Docker before v1.10, this field was calculated from - * the image itself and all of its parent images. Images are now stored - * self-contained, and no longer use a parent-chain, making this field - * an equivalent of the Size field. - * - * > **Deprecated**: this field is kept for backward compatibility, but - * > will be removed in API v1.44. - * - * @type {number} - * @memberof ImageInspect - */ - VirtualSize?: number; - /** - * - * @type {GraphDriverData} - * @memberof ImageInspect - */ - GraphDriver?: GraphDriverData; - /** - * - * @type {ImageInspectRootFS} - * @memberof ImageInspect - */ - RootFS?: ImageInspectRootFS; - /** - * - * @type {ImageInspectMetadata} - * @memberof ImageInspect - */ - Metadata?: ImageInspectMetadata; + /** + * ID is the content-addressable ID of an image. + * + * This identifier is a content-addressable digest calculated from the + * image's configuration (which includes the digests of layers used by + * the image). + * + * Note that this digest differs from the `RepoDigests` below, which + * holds digests of image manifests that reference the image. + * + * @type {string} + * @memberof ImageInspect + */ + Id?: string; + /** + * List of image names/tags in the local image cache that reference this + * image. + * + * Multiple image tags can refer to the same image, and this list may be + * empty if no tags reference the image, in which case the image is + * "untagged", in which case it can still be referenced by its ID. + * + * @type {Array} + * @memberof ImageInspect + */ + RepoTags?: Array; + /** + * List of content-addressable digests of locally available image manifests + * that the image is referenced from. Multiple manifests can refer to the + * same image. + * + * These digests are usually only available if the image was either pulled + * from a registry, or if the image was pushed to a registry, which is when + * the manifest is generated and its digest calculated. + * + * @type {Array} + * @memberof ImageInspect + */ + RepoDigests?: Array; + /** + * ID of the parent image. + * + * Depending on how the image was created, this field may be empty and + * is only set for images that were built/created locally. This field + * is empty if the image was pulled from an image registry. + * + * @type {string} + * @memberof ImageInspect + */ + Parent?: string; + /** + * Optional message that was set when committing or importing the image. + * + * @type {string} + * @memberof ImageInspect + */ + Comment?: string; + /** + * Date and time at which the image was created, formatted in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof ImageInspect + */ + Created?: string; + /** + * The ID of the container that was used to create the image. + * + * Depending on how the image was created, this field may be empty. + * + * @type {string} + * @memberof ImageInspect + */ + Container?: string; + /** + * + * @type {ContainerConfig} + * @memberof ImageInspect + */ + ContainerConfig?: ContainerConfig; + /** + * The version of Docker that was used to build the image. + * + * Depending on how the image was created, this field may be empty. + * + * @type {string} + * @memberof ImageInspect + */ + DockerVersion?: string; + /** + * Name of the author that was specified when committing the image, or as + * specified through MAINTAINER (deprecated) in the Dockerfile. + * + * @type {string} + * @memberof ImageInspect + */ + Author?: string; + /** + * + * @type {ImageConfig} + * @memberof ImageInspect + */ + Config?: ImageConfig; + /** + * Hardware CPU architecture that the image runs on. + * + * @type {string} + * @memberof ImageInspect + */ + Architecture?: string; + /** + * CPU architecture variant (presently ARM-only). + * + * @type {string} + * @memberof ImageInspect + */ + Variant?: string | null; + /** + * Operating System the image is built to run on. + * + * @type {string} + * @memberof ImageInspect + */ + Os?: string; + /** + * Operating System version the image is built to run on (especially + * for Windows). + * + * @type {string} + * @memberof ImageInspect + */ + OsVersion?: string | null; + /** + * Total size of the image including all layers it is composed of. + * + * @type {number} + * @memberof ImageInspect + */ + Size?: number; + /** + * Total size of the image including all layers it is composed of. + * + * In versions of Docker before v1.10, this field was calculated from + * the image itself and all of its parent images. Images are now stored + * self-contained, and no longer use a parent-chain, making this field + * an equivalent of the Size field. + * + * > **Deprecated**: this field is kept for backward compatibility, but + * > will be removed in API v1.44. + * + * @type {number} + * @memberof ImageInspect + */ + VirtualSize?: number; + /** + * + * @type {GraphDriverData} + * @memberof ImageInspect + */ + GraphDriver?: GraphDriverData; + /** + * + * @type {ImageInspectRootFS} + * @memberof ImageInspect + */ + RootFS?: ImageInspectRootFS; + /** + * + * @type {ImageInspectMetadata} + * @memberof ImageInspect + */ + Metadata?: ImageInspectMetadata; } /** * Check if a given object implements the ImageInspect interface. */ export function instanceOfImageInspect(value: object): value is ImageInspect { - return true; + return true; } export function ImageInspectFromJSON(json: any): ImageInspect { - return ImageInspectFromJSONTyped(json, false); + return ImageInspectFromJSONTyped(json, false); } export function ImageInspectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageInspect { - if (json == null) { - return json; - } - return { - Id: json["Id"] == null ? undefined : json["Id"], - RepoTags: json["RepoTags"] == null ? undefined : json["RepoTags"], - RepoDigests: json["RepoDigests"] == null ? undefined : json["RepoDigests"], - Parent: json["Parent"] == null ? undefined : json["Parent"], - Comment: json["Comment"] == null ? undefined : json["Comment"], - Created: json["Created"] == null ? undefined : json["Created"], - Container: json["Container"] == null ? undefined : json["Container"], - ContainerConfig: - json["ContainerConfig"] == null - ? undefined - : ContainerConfigFromJSON(json["ContainerConfig"]), - DockerVersion: json["DockerVersion"] == null ? undefined : json["DockerVersion"], - Author: json["Author"] == null ? undefined : json["Author"], - Config: json["Config"] == null ? undefined : ImageConfigFromJSON(json["Config"]), - Architecture: json["Architecture"] == null ? undefined : json["Architecture"], - Variant: json["Variant"] == null ? undefined : json["Variant"], - Os: json["Os"] == null ? undefined : json["Os"], - OsVersion: json["OsVersion"] == null ? undefined : json["OsVersion"], - Size: json["Size"] == null ? undefined : json["Size"], - VirtualSize: json["VirtualSize"] == null ? undefined : json["VirtualSize"], - GraphDriver: - json["GraphDriver"] == null ? undefined : GraphDriverDataFromJSON(json["GraphDriver"]), - RootFS: json["RootFS"] == null ? undefined : ImageInspectRootFSFromJSON(json["RootFS"]), - Metadata: json["Metadata"] == null ? undefined : ImageInspectMetadataFromJSON(json["Metadata"]), - }; + if (json == null) { + return json; + } + return { + + 'Id': json['Id'] == null ? undefined : json['Id'], + 'RepoTags': json['RepoTags'] == null ? undefined : json['RepoTags'], + 'RepoDigests': json['RepoDigests'] == null ? undefined : json['RepoDigests'], + 'Parent': json['Parent'] == null ? undefined : json['Parent'], + 'Comment': json['Comment'] == null ? undefined : json['Comment'], + 'Created': json['Created'] == null ? undefined : json['Created'], + 'Container': json['Container'] == null ? undefined : json['Container'], + 'ContainerConfig': json['ContainerConfig'] == null ? undefined : ContainerConfigFromJSON(json['ContainerConfig']), + 'DockerVersion': json['DockerVersion'] == null ? undefined : json['DockerVersion'], + 'Author': json['Author'] == null ? undefined : json['Author'], + 'Config': json['Config'] == null ? undefined : ImageConfigFromJSON(json['Config']), + 'Architecture': json['Architecture'] == null ? undefined : json['Architecture'], + 'Variant': json['Variant'] == null ? undefined : json['Variant'], + 'Os': json['Os'] == null ? undefined : json['Os'], + 'OsVersion': json['OsVersion'] == null ? undefined : json['OsVersion'], + 'Size': json['Size'] == null ? undefined : json['Size'], + 'VirtualSize': json['VirtualSize'] == null ? undefined : json['VirtualSize'], + 'GraphDriver': json['GraphDriver'] == null ? undefined : GraphDriverDataFromJSON(json['GraphDriver']), + 'RootFS': json['RootFS'] == null ? undefined : ImageInspectRootFSFromJSON(json['RootFS']), + 'Metadata': json['Metadata'] == null ? undefined : ImageInspectMetadataFromJSON(json['Metadata']), + }; } export function ImageInspectToJSON(json: any): ImageInspect { - return ImageInspectToJSONTyped(json, false); + return ImageInspectToJSONTyped(json, false); } -export function ImageInspectToJSONTyped( - value?: ImageInspect | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageInspectToJSONTyped(value?: ImageInspect | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - RepoTags: value["RepoTags"], - RepoDigests: value["RepoDigests"], - Parent: value["Parent"], - Comment: value["Comment"], - Created: value["Created"], - Container: value["Container"], - ContainerConfig: ContainerConfigToJSON(value["ContainerConfig"]), - DockerVersion: value["DockerVersion"], - Author: value["Author"], - Config: ImageConfigToJSON(value["Config"]), - Architecture: value["Architecture"], - Variant: value["Variant"], - Os: value["Os"], - OsVersion: value["OsVersion"], - Size: value["Size"], - VirtualSize: value["VirtualSize"], - GraphDriver: GraphDriverDataToJSON(value["GraphDriver"]), - RootFS: ImageInspectRootFSToJSON(value["RootFS"]), - Metadata: ImageInspectMetadataToJSON(value["Metadata"]), - }; + return { + + 'Id': value['Id'], + 'RepoTags': value['RepoTags'], + 'RepoDigests': value['RepoDigests'], + 'Parent': value['Parent'], + 'Comment': value['Comment'], + 'Created': value['Created'], + 'Container': value['Container'], + 'ContainerConfig': ContainerConfigToJSON(value['ContainerConfig']), + 'DockerVersion': value['DockerVersion'], + 'Author': value['Author'], + 'Config': ImageConfigToJSON(value['Config']), + 'Architecture': value['Architecture'], + 'Variant': value['Variant'], + 'Os': value['Os'], + 'OsVersion': value['OsVersion'], + 'Size': value['Size'], + 'VirtualSize': value['VirtualSize'], + 'GraphDriver': GraphDriverDataToJSON(value['GraphDriver']), + 'RootFS': ImageInspectRootFSToJSON(value['RootFS']), + 'Metadata': ImageInspectMetadataToJSON(value['Metadata']), + }; } + diff --git a/src/clients/docker/models/ImageInspectMetadata.ts b/src/clients/docker/models/ImageInspectMetadata.ts index 13284cf576..c7e3e12e93 100644 --- a/src/clients/docker/models/ImageInspectMetadata.ts +++ b/src/clients/docker/models/ImageInspectMetadata.ts @@ -2,74 +2,71 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Additional metadata of the image in the local cache. This information * is local to the daemon, and not part of the image itself. - * + * * @export * @interface ImageInspectMetadata */ export interface ImageInspectMetadata { - /** - * Date and time at which the image was last tagged in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * This information is only available if the image was tagged locally, - * and omitted otherwise. - * - * @type {string} - * @memberof ImageInspectMetadata - */ - LastTagTime?: string | null; + /** + * Date and time at which the image was last tagged in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * This information is only available if the image was tagged locally, + * and omitted otherwise. + * + * @type {string} + * @memberof ImageInspectMetadata + */ + LastTagTime?: string | null; } /** * Check if a given object implements the ImageInspectMetadata interface. */ export function instanceOfImageInspectMetadata(value: object): value is ImageInspectMetadata { - return true; + return true; } export function ImageInspectMetadataFromJSON(json: any): ImageInspectMetadata { - return ImageInspectMetadataFromJSONTyped(json, false); + return ImageInspectMetadataFromJSONTyped(json, false); } -export function ImageInspectMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ImageInspectMetadata { - if (json == null) { - return json; - } - return { - LastTagTime: json["LastTagTime"] == null ? undefined : json["LastTagTime"], - }; +export function ImageInspectMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageInspectMetadata { + if (json == null) { + return json; + } + return { + + 'LastTagTime': json['LastTagTime'] == null ? undefined : json['LastTagTime'], + }; } export function ImageInspectMetadataToJSON(json: any): ImageInspectMetadata { - return ImageInspectMetadataToJSONTyped(json, false); + return ImageInspectMetadataToJSONTyped(json, false); } -export function ImageInspectMetadataToJSONTyped( - value?: ImageInspectMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageInspectMetadataToJSONTyped(value?: ImageInspectMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - LastTagTime: value["LastTagTime"], - }; + return { + + 'LastTagTime': value['LastTagTime'], + }; } + diff --git a/src/clients/docker/models/ImageInspectRootFS.ts b/src/clients/docker/models/ImageInspectRootFS.ts index d5fc658fd1..e9061ddb50 100644 --- a/src/clients/docker/models/ImageInspectRootFS.ts +++ b/src/clients/docker/models/ImageInspectRootFS.ts @@ -2,77 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Information about the image's RootFS, including the layer IDs. - * + * * @export * @interface ImageInspectRootFS */ export interface ImageInspectRootFS { - /** - * - * @type {string} - * @memberof ImageInspectRootFS - */ - Type: string; - /** - * - * @type {Array} - * @memberof ImageInspectRootFS - */ - Layers?: Array; + /** + * + * @type {string} + * @memberof ImageInspectRootFS + */ + Type: string; + /** + * + * @type {Array} + * @memberof ImageInspectRootFS + */ + Layers?: Array; } /** * Check if a given object implements the ImageInspectRootFS interface. */ export function instanceOfImageInspectRootFS(value: object): value is ImageInspectRootFS { - if (!("Type" in value) || value["Type"] === undefined) return false; - return true; + if (!('Type' in value) || value['Type'] === undefined) return false; + return true; } export function ImageInspectRootFSFromJSON(json: any): ImageInspectRootFS { - return ImageInspectRootFSFromJSONTyped(json, false); + return ImageInspectRootFSFromJSONTyped(json, false); } -export function ImageInspectRootFSFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ImageInspectRootFS { - if (json == null) { - return json; - } - return { - Type: json["Type"], - Layers: json["Layers"] == null ? undefined : json["Layers"], - }; +export function ImageInspectRootFSFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageInspectRootFS { + if (json == null) { + return json; + } + return { + + 'Type': json['Type'], + 'Layers': json['Layers'] == null ? undefined : json['Layers'], + }; } export function ImageInspectRootFSToJSON(json: any): ImageInspectRootFS { - return ImageInspectRootFSToJSONTyped(json, false); + return ImageInspectRootFSToJSONTyped(json, false); } -export function ImageInspectRootFSToJSONTyped( - value?: ImageInspectRootFS | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageInspectRootFSToJSONTyped(value?: ImageInspectRootFS | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Type: value["Type"], - Layers: value["Layers"], - }; + return { + + 'Type': value['Type'], + 'Layers': value['Layers'], + }; } + diff --git a/src/clients/docker/models/ImagePruneResponse.ts b/src/clients/docker/models/ImagePruneResponse.ts index 0c5d9c8f54..77e7cedd8b 100644 --- a/src/clients/docker/models/ImagePruneResponse.ts +++ b/src/clients/docker/models/ImagePruneResponse.ts @@ -2,89 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ImageDeleteResponseItem } from "./ImageDeleteResponseItem"; +import { mapValues } from '../runtime'; +import type { ImageDeleteResponseItem } from './ImageDeleteResponseItem'; import { - ImageDeleteResponseItemFromJSON, - ImageDeleteResponseItemFromJSONTyped, - ImageDeleteResponseItemToJSON, - ImageDeleteResponseItemToJSONTyped, -} from "./ImageDeleteResponseItem"; + ImageDeleteResponseItemFromJSON, + ImageDeleteResponseItemFromJSONTyped, + ImageDeleteResponseItemToJSON, + ImageDeleteResponseItemToJSONTyped, +} from './ImageDeleteResponseItem'; /** - * + * * @export * @interface ImagePruneResponse */ export interface ImagePruneResponse { - /** - * Images that were deleted - * @type {Array} - * @memberof ImagePruneResponse - */ - ImagesDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof ImagePruneResponse - */ - SpaceReclaimed?: number; + /** + * Images that were deleted + * @type {Array} + * @memberof ImagePruneResponse + */ + ImagesDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof ImagePruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the ImagePruneResponse interface. */ export function instanceOfImagePruneResponse(value: object): value is ImagePruneResponse { - return true; + return true; } export function ImagePruneResponseFromJSON(json: any): ImagePruneResponse { - return ImagePruneResponseFromJSONTyped(json, false); + return ImagePruneResponseFromJSONTyped(json, false); } -export function ImagePruneResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ImagePruneResponse { - if (json == null) { - return json; - } - return { - ImagesDeleted: - json["ImagesDeleted"] == null - ? undefined - : (json["ImagesDeleted"] as Array).map(ImageDeleteResponseItemFromJSON), - SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], - }; +export function ImagePruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImagePruneResponse { + if (json == null) { + return json; + } + return { + + 'ImagesDeleted': json['ImagesDeleted'] == null ? undefined : ((json['ImagesDeleted'] as Array).map(ImageDeleteResponseItemFromJSON)), + 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], + }; } export function ImagePruneResponseToJSON(json: any): ImagePruneResponse { - return ImagePruneResponseToJSONTyped(json, false); + return ImagePruneResponseToJSONTyped(json, false); } -export function ImagePruneResponseToJSONTyped( - value?: ImagePruneResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImagePruneResponseToJSONTyped(value?: ImagePruneResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ImagesDeleted: - value["ImagesDeleted"] == null - ? undefined - : (value["ImagesDeleted"] as Array).map(ImageDeleteResponseItemToJSON), - SpaceReclaimed: value["SpaceReclaimed"], - }; + return { + + 'ImagesDeleted': value['ImagesDeleted'] == null ? undefined : ((value['ImagesDeleted'] as Array).map(ImageDeleteResponseItemToJSON)), + 'SpaceReclaimed': value['SpaceReclaimed'], + }; } + diff --git a/src/clients/docker/models/ImageSearchResponseItem.ts b/src/clients/docker/models/ImageSearchResponseItem.ts index f8403c36a0..568565d594 100644 --- a/src/clients/docker/models/ImageSearchResponseItem.ts +++ b/src/clients/docker/models/ImageSearchResponseItem.ts @@ -2,99 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ImageSearchResponseItem */ export interface ImageSearchResponseItem { - /** - * - * @type {string} - * @memberof ImageSearchResponseItem - */ - description?: string; - /** - * - * @type {boolean} - * @memberof ImageSearchResponseItem - */ - is_official?: boolean; - /** - * - * @type {boolean} - * @memberof ImageSearchResponseItem - */ - is_automated?: boolean; - /** - * - * @type {string} - * @memberof ImageSearchResponseItem - */ - name?: string; - /** - * - * @type {number} - * @memberof ImageSearchResponseItem - */ - star_count?: number; + /** + * + * @type {string} + * @memberof ImageSearchResponseItem + */ + description?: string; + /** + * + * @type {boolean} + * @memberof ImageSearchResponseItem + */ + is_official?: boolean; + /** + * + * @type {boolean} + * @memberof ImageSearchResponseItem + */ + is_automated?: boolean; + /** + * + * @type {string} + * @memberof ImageSearchResponseItem + */ + name?: string; + /** + * + * @type {number} + * @memberof ImageSearchResponseItem + */ + star_count?: number; } /** * Check if a given object implements the ImageSearchResponseItem interface. */ export function instanceOfImageSearchResponseItem(value: object): value is ImageSearchResponseItem { - return true; + return true; } export function ImageSearchResponseItemFromJSON(json: any): ImageSearchResponseItem { - return ImageSearchResponseItemFromJSONTyped(json, false); + return ImageSearchResponseItemFromJSONTyped(json, false); } -export function ImageSearchResponseItemFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ImageSearchResponseItem { - if (json == null) { - return json; - } - return { - description: json["description"] == null ? undefined : json["description"], - is_official: json["is_official"] == null ? undefined : json["is_official"], - is_automated: json["is_automated"] == null ? undefined : json["is_automated"], - name: json["name"] == null ? undefined : json["name"], - star_count: json["star_count"] == null ? undefined : json["star_count"], - }; +export function ImageSearchResponseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageSearchResponseItem { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'is_official': json['is_official'] == null ? undefined : json['is_official'], + 'is_automated': json['is_automated'] == null ? undefined : json['is_automated'], + 'name': json['name'] == null ? undefined : json['name'], + 'star_count': json['star_count'] == null ? undefined : json['star_count'], + }; } export function ImageSearchResponseItemToJSON(json: any): ImageSearchResponseItem { - return ImageSearchResponseItemToJSONTyped(json, false); + return ImageSearchResponseItemToJSONTyped(json, false); } -export function ImageSearchResponseItemToJSONTyped( - value?: ImageSearchResponseItem | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageSearchResponseItemToJSONTyped(value?: ImageSearchResponseItem | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - description: value["description"], - is_official: value["is_official"], - is_automated: value["is_automated"], - name: value["name"], - star_count: value["star_count"], - }; + return { + + 'description': value['description'], + 'is_official': value['is_official'], + 'is_automated': value['is_automated'], + 'name': value['name'], + 'star_count': value['star_count'], + }; } + diff --git a/src/clients/docker/models/ImageSummary.ts b/src/clients/docker/models/ImageSummary.ts index af3b43db88..5b6afea0db 100644 --- a/src/clients/docker/models/ImageSummary.ts +++ b/src/clients/docker/models/ImageSummary.ts @@ -2,191 +2,191 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ImageSummary */ export interface ImageSummary { - /** - * ID is the content-addressable ID of an image. - * - * This identifier is a content-addressable digest calculated from the - * image's configuration (which includes the digests of layers used by - * the image). - * - * Note that this digest differs from the `RepoDigests` below, which - * holds digests of image manifests that reference the image. - * - * @type {string} - * @memberof ImageSummary - */ - Id: string; - /** - * ID of the parent image. - * - * Depending on how the image was created, this field may be empty and - * is only set for images that were built/created locally. This field - * is empty if the image was pulled from an image registry. - * - * @type {string} - * @memberof ImageSummary - */ - ParentId: string; - /** - * List of image names/tags in the local image cache that reference this - * image. - * - * Multiple image tags can refer to the same image, and this list may be - * empty if no tags reference the image, in which case the image is - * "untagged", in which case it can still be referenced by its ID. - * - * @type {Array} - * @memberof ImageSummary - */ - RepoTags: Array; - /** - * List of content-addressable digests of locally available image manifests - * that the image is referenced from. Multiple manifests can refer to the - * same image. - * - * These digests are usually only available if the image was either pulled - * from a registry, or if the image was pushed to a registry, which is when - * the manifest is generated and its digest calculated. - * - * @type {Array} - * @memberof ImageSummary - */ - RepoDigests: Array; - /** - * Date and time at which the image was created as a Unix timestamp - * (number of seconds since EPOCH). - * - * @type {number} - * @memberof ImageSummary - */ - Created: number; - /** - * Total size of the image including all layers it is composed of. - * - * @type {number} - * @memberof ImageSummary - */ - Size: number; - /** - * Total size of image layers that are shared between this image and other - * images. - * - * This size is not calculated by default. `-1` indicates that the value - * has not been set / calculated. - * - * @type {number} - * @memberof ImageSummary - */ - SharedSize: number; - /** - * Total size of the image including all layers it is composed of. - * - * In versions of Docker before v1.10, this field was calculated from - * the image itself and all of its parent images. Images are now stored - * self-contained, and no longer use a parent-chain, making this field - * an equivalent of the Size field. - * - * Deprecated: this field is kept for backward compatibility, and will be removed in API v1.44. - * @type {number} - * @memberof ImageSummary - */ - VirtualSize?: number; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ImageSummary - */ - Labels: { [key: string]: string }; - /** - * Number of containers using this image. Includes both stopped and running - * containers. - * - * This size is not calculated by default, and depends on which API endpoint - * is used. `-1` indicates that the value has not been set / calculated. - * - * @type {number} - * @memberof ImageSummary - */ - Containers: number; + /** + * ID is the content-addressable ID of an image. + * + * This identifier is a content-addressable digest calculated from the + * image's configuration (which includes the digests of layers used by + * the image). + * + * Note that this digest differs from the `RepoDigests` below, which + * holds digests of image manifests that reference the image. + * + * @type {string} + * @memberof ImageSummary + */ + Id: string; + /** + * ID of the parent image. + * + * Depending on how the image was created, this field may be empty and + * is only set for images that were built/created locally. This field + * is empty if the image was pulled from an image registry. + * + * @type {string} + * @memberof ImageSummary + */ + ParentId: string; + /** + * List of image names/tags in the local image cache that reference this + * image. + * + * Multiple image tags can refer to the same image, and this list may be + * empty if no tags reference the image, in which case the image is + * "untagged", in which case it can still be referenced by its ID. + * + * @type {Array} + * @memberof ImageSummary + */ + RepoTags: Array; + /** + * List of content-addressable digests of locally available image manifests + * that the image is referenced from. Multiple manifests can refer to the + * same image. + * + * These digests are usually only available if the image was either pulled + * from a registry, or if the image was pushed to a registry, which is when + * the manifest is generated and its digest calculated. + * + * @type {Array} + * @memberof ImageSummary + */ + RepoDigests: Array; + /** + * Date and time at which the image was created as a Unix timestamp + * (number of seconds since EPOCH). + * + * @type {number} + * @memberof ImageSummary + */ + Created: number; + /** + * Total size of the image including all layers it is composed of. + * + * @type {number} + * @memberof ImageSummary + */ + Size: number; + /** + * Total size of image layers that are shared between this image and other + * images. + * + * This size is not calculated by default. `-1` indicates that the value + * has not been set / calculated. + * + * @type {number} + * @memberof ImageSummary + */ + SharedSize: number; + /** + * Total size of the image including all layers it is composed of. + * + * In versions of Docker before v1.10, this field was calculated from + * the image itself and all of its parent images. Images are now stored + * self-contained, and no longer use a parent-chain, making this field + * an equivalent of the Size field. + * + * Deprecated: this field is kept for backward compatibility, and will be removed in API v1.44. + * @type {number} + * @memberof ImageSummary + */ + VirtualSize?: number; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ImageSummary + */ + Labels: { [key: string]: string; }; + /** + * Number of containers using this image. Includes both stopped and running + * containers. + * + * This size is not calculated by default, and depends on which API endpoint + * is used. `-1` indicates that the value has not been set / calculated. + * + * @type {number} + * @memberof ImageSummary + */ + Containers: number; } /** * Check if a given object implements the ImageSummary interface. */ export function instanceOfImageSummary(value: object): value is ImageSummary { - if (!("Id" in value) || value["Id"] === undefined) return false; - if (!("ParentId" in value) || value["ParentId"] === undefined) return false; - if (!("RepoTags" in value) || value["RepoTags"] === undefined) return false; - if (!("RepoDigests" in value) || value["RepoDigests"] === undefined) return false; - if (!("Created" in value) || value["Created"] === undefined) return false; - if (!("Size" in value) || value["Size"] === undefined) return false; - if (!("SharedSize" in value) || value["SharedSize"] === undefined) return false; - if (!("Labels" in value) || value["Labels"] === undefined) return false; - if (!("Containers" in value) || value["Containers"] === undefined) return false; - return true; + if (!('Id' in value) || value['Id'] === undefined) return false; + if (!('ParentId' in value) || value['ParentId'] === undefined) return false; + if (!('RepoTags' in value) || value['RepoTags'] === undefined) return false; + if (!('RepoDigests' in value) || value['RepoDigests'] === undefined) return false; + if (!('Created' in value) || value['Created'] === undefined) return false; + if (!('Size' in value) || value['Size'] === undefined) return false; + if (!('SharedSize' in value) || value['SharedSize'] === undefined) return false; + if (!('Labels' in value) || value['Labels'] === undefined) return false; + if (!('Containers' in value) || value['Containers'] === undefined) return false; + return true; } export function ImageSummaryFromJSON(json: any): ImageSummary { - return ImageSummaryFromJSONTyped(json, false); + return ImageSummaryFromJSONTyped(json, false); } export function ImageSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageSummary { - if (json == null) { - return json; - } - return { - Id: json["Id"], - ParentId: json["ParentId"], - RepoTags: json["RepoTags"], - RepoDigests: json["RepoDigests"], - Created: json["Created"], - Size: json["Size"], - SharedSize: json["SharedSize"], - VirtualSize: json["VirtualSize"] == null ? undefined : json["VirtualSize"], - Labels: json["Labels"], - Containers: json["Containers"], - }; + if (json == null) { + return json; + } + return { + + 'Id': json['Id'], + 'ParentId': json['ParentId'], + 'RepoTags': json['RepoTags'], + 'RepoDigests': json['RepoDigests'], + 'Created': json['Created'], + 'Size': json['Size'], + 'SharedSize': json['SharedSize'], + 'VirtualSize': json['VirtualSize'] == null ? undefined : json['VirtualSize'], + 'Labels': json['Labels'], + 'Containers': json['Containers'], + }; } export function ImageSummaryToJSON(json: any): ImageSummary { - return ImageSummaryToJSONTyped(json, false); + return ImageSummaryToJSONTyped(json, false); } -export function ImageSummaryToJSONTyped( - value?: ImageSummary | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ImageSummaryToJSONTyped(value?: ImageSummary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - ParentId: value["ParentId"], - RepoTags: value["RepoTags"], - RepoDigests: value["RepoDigests"], - Created: value["Created"], - Size: value["Size"], - SharedSize: value["SharedSize"], - VirtualSize: value["VirtualSize"], - Labels: value["Labels"], - Containers: value["Containers"], - }; + return { + + 'Id': value['Id'], + 'ParentId': value['ParentId'], + 'RepoTags': value['RepoTags'], + 'RepoDigests': value['RepoDigests'], + 'Created': value['Created'], + 'Size': value['Size'], + 'SharedSize': value['SharedSize'], + 'VirtualSize': value['VirtualSize'], + 'Labels': value['Labels'], + 'Containers': value['Containers'], + }; } + diff --git a/src/clients/docker/models/IndexInfo.ts b/src/clients/docker/models/IndexInfo.ts index 79aa3ac893..dd38ef78e3 100644 --- a/src/clients/docker/models/IndexInfo.ts +++ b/src/clients/docker/models/IndexInfo.ts @@ -2,103 +2,103 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * IndexInfo contains information about a registry. * @export * @interface IndexInfo */ export interface IndexInfo { - /** - * Name of the registry, such as "docker.io". - * - * @type {string} - * @memberof IndexInfo - */ - Name?: string; - /** - * List of mirrors, expressed as URIs. - * - * @type {Array} - * @memberof IndexInfo - */ - Mirrors?: Array; - /** - * Indicates if the registry is part of the list of insecure - * registries. - * - * If `false`, the registry is insecure. Insecure registries accept - * un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from - * unknown CAs) communication. - * - * > **Warning**: Insecure registries can be useful when running a local - * > registry. However, because its use creates security vulnerabilities - * > it should ONLY be enabled for testing purposes. For increased - * > security, users should add their CA to their system's list of - * > trusted CAs instead of enabling this option. - * - * @type {boolean} - * @memberof IndexInfo - */ - Secure?: boolean; - /** - * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) - * - * @type {boolean} - * @memberof IndexInfo - */ - Official?: boolean; + /** + * Name of the registry, such as "docker.io". + * + * @type {string} + * @memberof IndexInfo + */ + Name?: string; + /** + * List of mirrors, expressed as URIs. + * + * @type {Array} + * @memberof IndexInfo + */ + Mirrors?: Array; + /** + * Indicates if the registry is part of the list of insecure + * registries. + * + * If `false`, the registry is insecure. Insecure registries accept + * un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + * unknown CAs) communication. + * + * > **Warning**: Insecure registries can be useful when running a local + * > registry. However, because its use creates security vulnerabilities + * > it should ONLY be enabled for testing purposes. For increased + * > security, users should add their CA to their system's list of + * > trusted CAs instead of enabling this option. + * + * @type {boolean} + * @memberof IndexInfo + */ + Secure?: boolean; + /** + * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + * + * @type {boolean} + * @memberof IndexInfo + */ + Official?: boolean; } /** * Check if a given object implements the IndexInfo interface. */ export function instanceOfIndexInfo(value: object): value is IndexInfo { - return true; + return true; } export function IndexInfoFromJSON(json: any): IndexInfo { - return IndexInfoFromJSONTyped(json, false); + return IndexInfoFromJSONTyped(json, false); } export function IndexInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IndexInfo { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Mirrors: json["Mirrors"] == null ? undefined : json["Mirrors"], - Secure: json["Secure"] == null ? undefined : json["Secure"], - Official: json["Official"] == null ? undefined : json["Official"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Mirrors': json['Mirrors'] == null ? undefined : json['Mirrors'], + 'Secure': json['Secure'] == null ? undefined : json['Secure'], + 'Official': json['Official'] == null ? undefined : json['Official'], + }; } export function IndexInfoToJSON(json: any): IndexInfo { - return IndexInfoToJSONTyped(json, false); + return IndexInfoToJSONTyped(json, false); } -export function IndexInfoToJSONTyped( - value?: IndexInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function IndexInfoToJSONTyped(value?: IndexInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Mirrors: value["Mirrors"], - Secure: value["Secure"], - Official: value["Official"], - }; + return { + + 'Name': value['Name'], + 'Mirrors': value['Mirrors'], + 'Secure': value['Secure'], + 'Official': value['Official'], + }; } + diff --git a/src/clients/docker/models/JoinTokens.ts b/src/clients/docker/models/JoinTokens.ts index 853d36f203..8fc76d760d 100644 --- a/src/clients/docker/models/JoinTokens.ts +++ b/src/clients/docker/models/JoinTokens.ts @@ -2,75 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * JoinTokens contains the tokens workers and managers need to join the swarm. - * + * * @export * @interface JoinTokens */ export interface JoinTokens { - /** - * The token workers can use to join the swarm. - * - * @type {string} - * @memberof JoinTokens - */ - Worker?: string; - /** - * The token managers can use to join the swarm. - * - * @type {string} - * @memberof JoinTokens - */ - Manager?: string; + /** + * The token workers can use to join the swarm. + * + * @type {string} + * @memberof JoinTokens + */ + Worker?: string; + /** + * The token managers can use to join the swarm. + * + * @type {string} + * @memberof JoinTokens + */ + Manager?: string; } /** * Check if a given object implements the JoinTokens interface. */ export function instanceOfJoinTokens(value: object): value is JoinTokens { - return true; + return true; } export function JoinTokensFromJSON(json: any): JoinTokens { - return JoinTokensFromJSONTyped(json, false); + return JoinTokensFromJSONTyped(json, false); } export function JoinTokensFromJSONTyped(json: any, ignoreDiscriminator: boolean): JoinTokens { - if (json == null) { - return json; - } - return { - Worker: json["Worker"] == null ? undefined : json["Worker"], - Manager: json["Manager"] == null ? undefined : json["Manager"], - }; + if (json == null) { + return json; + } + return { + + 'Worker': json['Worker'] == null ? undefined : json['Worker'], + 'Manager': json['Manager'] == null ? undefined : json['Manager'], + }; } export function JoinTokensToJSON(json: any): JoinTokens { - return JoinTokensToJSONTyped(json, false); + return JoinTokensToJSONTyped(json, false); } -export function JoinTokensToJSONTyped( - value?: JoinTokens | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JoinTokensToJSONTyped(value?: JoinTokens | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Worker: value["Worker"], - Manager: value["Manager"], - }; + return { + + 'Worker': value['Worker'], + 'Manager': value['Manager'], + }; } + diff --git a/src/clients/docker/models/Limit.ts b/src/clients/docker/models/Limit.ts index 7f454a0f22..2a8e1597ae 100644 --- a/src/clients/docker/models/Limit.ts +++ b/src/clients/docker/models/Limit.ts @@ -2,79 +2,82 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * An object describing a limit on resources which can be requested by a task. - * + * * @export * @interface Limit */ export interface Limit { - /** - * - * @type {number} - * @memberof Limit - */ - NanoCPUs?: number; - /** - * - * @type {number} - * @memberof Limit - */ - MemoryBytes?: number; - /** - * Limits the maximum number of PIDs in the container. Set `0` for unlimited. - * - * @type {number} - * @memberof Limit - */ - Pids?: number; + /** + * + * @type {number} + * @memberof Limit + */ + NanoCPUs?: number; + /** + * + * @type {number} + * @memberof Limit + */ + MemoryBytes?: number; + /** + * Limits the maximum number of PIDs in the container. Set `0` for unlimited. + * + * @type {number} + * @memberof Limit + */ + Pids?: number; } /** * Check if a given object implements the Limit interface. */ export function instanceOfLimit(value: object): value is Limit { - return true; + return true; } export function LimitFromJSON(json: any): Limit { - return LimitFromJSONTyped(json, false); + return LimitFromJSONTyped(json, false); } export function LimitFromJSONTyped(json: any, ignoreDiscriminator: boolean): Limit { - if (json == null) { - return json; - } - return { - NanoCPUs: json["NanoCPUs"] == null ? undefined : json["NanoCPUs"], - MemoryBytes: json["MemoryBytes"] == null ? undefined : json["MemoryBytes"], - Pids: json["Pids"] == null ? undefined : json["Pids"], - }; + if (json == null) { + return json; + } + return { + + 'NanoCPUs': json['NanoCPUs'] == null ? undefined : json['NanoCPUs'], + 'MemoryBytes': json['MemoryBytes'] == null ? undefined : json['MemoryBytes'], + 'Pids': json['Pids'] == null ? undefined : json['Pids'], + }; } export function LimitToJSON(json: any): Limit { - return LimitToJSONTyped(json, false); + return LimitToJSONTyped(json, false); } export function LimitToJSONTyped(value?: Limit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - NanoCPUs: value["NanoCPUs"], - MemoryBytes: value["MemoryBytes"], - Pids: value["Pids"], - }; + return { + + 'NanoCPUs': value['NanoCPUs'], + 'MemoryBytes': value['MemoryBytes'], + 'Pids': value['Pids'], + }; } + diff --git a/src/clients/docker/models/LocalNodeState.ts b/src/clients/docker/models/LocalNodeState.ts index 45431d6591..f3300b5827 100644 --- a/src/clients/docker/models/LocalNodeState.ts +++ b/src/clients/docker/models/LocalNodeState.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,43 +18,39 @@ * @enum {string} */ export enum LocalNodeState { - Empty = "", - Inactive = "inactive", - Pending = "pending", - Active = "active", - Error = "error", - Locked = "locked", + Empty = '', + Inactive = 'inactive', + Pending = 'pending', + Active = 'active', + Error = 'error', + Locked = 'locked' } + export function instanceOfLocalNodeState(value: any): boolean { - for (const key in LocalNodeState) { - if (Object.prototype.hasOwnProperty.call(LocalNodeState, key)) { - if (LocalNodeState[key as keyof typeof LocalNodeState] === value) { - return true; - } + for (const key in LocalNodeState) { + if (Object.prototype.hasOwnProperty.call(LocalNodeState, key)) { + if (LocalNodeState[key as keyof typeof LocalNodeState] === value) { + return true; + } + } } - } - return false; + return false; } export function LocalNodeStateFromJSON(json: any): LocalNodeState { - return LocalNodeStateFromJSONTyped(json, false); + return LocalNodeStateFromJSONTyped(json, false); } -export function LocalNodeStateFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): LocalNodeState { - return json as LocalNodeState; +export function LocalNodeStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocalNodeState { + return json as LocalNodeState; } export function LocalNodeStateToJSON(value?: LocalNodeState | null): any { - return value as any; + return value as any; } -export function LocalNodeStateToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): LocalNodeState { - return value as LocalNodeState; +export function LocalNodeStateToJSONTyped(value: any, ignoreDiscriminator: boolean): LocalNodeState { + return value as LocalNodeState; } + diff --git a/src/clients/docker/models/ManagerStatus.ts b/src/clients/docker/models/ManagerStatus.ts index 48ded2104d..4de210d3d6 100644 --- a/src/clients/docker/models/ManagerStatus.ts +++ b/src/clients/docker/models/ManagerStatus.ts @@ -2,94 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Reachability } from "./Reachability"; +import { mapValues } from '../runtime'; +import type { Reachability } from './Reachability'; import { - ReachabilityFromJSON, - ReachabilityFromJSONTyped, - ReachabilityToJSON, - ReachabilityToJSONTyped, -} from "./Reachability"; + ReachabilityFromJSON, + ReachabilityFromJSONTyped, + ReachabilityToJSON, + ReachabilityToJSONTyped, +} from './Reachability'; /** * ManagerStatus represents the status of a manager. - * + * * It provides the current status of a node's manager component, if the node * is a manager. - * + * * @export * @interface ManagerStatus */ export interface ManagerStatus { - /** - * - * @type {boolean} - * @memberof ManagerStatus - */ - Leader?: boolean; - /** - * - * @type {Reachability} - * @memberof ManagerStatus - */ - Reachability?: Reachability; - /** - * The IP address and port at which the manager is reachable. - * - * @type {string} - * @memberof ManagerStatus - */ - Addr?: string; + /** + * + * @type {boolean} + * @memberof ManagerStatus + */ + Leader?: boolean; + /** + * + * @type {Reachability} + * @memberof ManagerStatus + */ + Reachability?: Reachability; + /** + * The IP address and port at which the manager is reachable. + * + * @type {string} + * @memberof ManagerStatus + */ + Addr?: string; } + + /** * Check if a given object implements the ManagerStatus interface. */ export function instanceOfManagerStatus(value: object): value is ManagerStatus { - return true; + return true; } export function ManagerStatusFromJSON(json: any): ManagerStatus { - return ManagerStatusFromJSONTyped(json, false); + return ManagerStatusFromJSONTyped(json, false); } export function ManagerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagerStatus { - if (json == null) { - return json; - } - return { - Leader: json["Leader"] == null ? undefined : json["Leader"], - Reachability: - json["Reachability"] == null ? undefined : ReachabilityFromJSON(json["Reachability"]), - Addr: json["Addr"] == null ? undefined : json["Addr"], - }; + if (json == null) { + return json; + } + return { + + 'Leader': json['Leader'] == null ? undefined : json['Leader'], + 'Reachability': json['Reachability'] == null ? undefined : ReachabilityFromJSON(json['Reachability']), + 'Addr': json['Addr'] == null ? undefined : json['Addr'], + }; } export function ManagerStatusToJSON(json: any): ManagerStatus { - return ManagerStatusToJSONTyped(json, false); + return ManagerStatusToJSONTyped(json, false); } -export function ManagerStatusToJSONTyped( - value?: ManagerStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ManagerStatusToJSONTyped(value?: ManagerStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Leader: value["Leader"], - Reachability: ReachabilityToJSON(value["Reachability"]), - Addr: value["Addr"], - }; + return { + + 'Leader': value['Leader'], + 'Reachability': ReachabilityToJSON(value['Reachability']), + 'Addr': value['Addr'], + }; } + diff --git a/src/clients/docker/models/Mount.ts b/src/clients/docker/models/Mount.ts index 0ad122aec4..f873505a16 100644 --- a/src/clients/docker/models/Mount.ts +++ b/src/clients/docker/models/Mount.ts @@ -2,161 +2,162 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { MountVolumeOptions } from "./MountVolumeOptions"; +import { mapValues } from '../runtime'; +import type { MountVolumeOptions } from './MountVolumeOptions'; import { - MountVolumeOptionsFromJSON, - MountVolumeOptionsFromJSONTyped, - MountVolumeOptionsToJSON, - MountVolumeOptionsToJSONTyped, -} from "./MountVolumeOptions"; -import type { MountTmpfsOptions } from "./MountTmpfsOptions"; + MountVolumeOptionsFromJSON, + MountVolumeOptionsFromJSONTyped, + MountVolumeOptionsToJSON, + MountVolumeOptionsToJSONTyped, +} from './MountVolumeOptions'; +import type { MountTmpfsOptions } from './MountTmpfsOptions'; import { - MountTmpfsOptionsFromJSON, - MountTmpfsOptionsFromJSONTyped, - MountTmpfsOptionsToJSON, - MountTmpfsOptionsToJSONTyped, -} from "./MountTmpfsOptions"; -import type { MountBindOptions } from "./MountBindOptions"; + MountTmpfsOptionsFromJSON, + MountTmpfsOptionsFromJSONTyped, + MountTmpfsOptionsToJSON, + MountTmpfsOptionsToJSONTyped, +} from './MountTmpfsOptions'; +import type { MountBindOptions } from './MountBindOptions'; import { - MountBindOptionsFromJSON, - MountBindOptionsFromJSONTyped, - MountBindOptionsToJSON, - MountBindOptionsToJSONTyped, -} from "./MountBindOptions"; + MountBindOptionsFromJSON, + MountBindOptionsFromJSONTyped, + MountBindOptionsToJSON, + MountBindOptionsToJSONTyped, +} from './MountBindOptions'; /** - * + * * @export * @interface Mount */ export interface Mount { - /** - * Container path. - * @type {string} - * @memberof Mount - */ - Target?: string; - /** - * Mount source (e.g. a volume name, a host path). - * @type {string} - * @memberof Mount - */ - Source?: string; - /** - * The mount type. Available types: - * - * - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - * - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - * - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - * - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. - * - `cluster` a Swarm cluster volume - * - * @type {string} - * @memberof Mount - */ - Type?: MountTypeEnum; - /** - * Whether the mount should be read-only. - * @type {boolean} - * @memberof Mount - */ - ReadOnly?: boolean; - /** - * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. - * @type {string} - * @memberof Mount - */ - Consistency?: string; - /** - * - * @type {MountBindOptions} - * @memberof Mount - */ - BindOptions?: MountBindOptions; - /** - * - * @type {MountVolumeOptions} - * @memberof Mount - */ - VolumeOptions?: MountVolumeOptions; - /** - * - * @type {MountTmpfsOptions} - * @memberof Mount - */ - TmpfsOptions?: MountTmpfsOptions; + /** + * Container path. + * @type {string} + * @memberof Mount + */ + Target?: string; + /** + * Mount source (e.g. a volume name, a host path). + * @type {string} + * @memberof Mount + */ + Source?: string; + /** + * The mount type. Available types: + * + * - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + * - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + * - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + * - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + * - `cluster` a Swarm cluster volume + * + * @type {string} + * @memberof Mount + */ + Type?: MountTypeEnum; + /** + * Whether the mount should be read-only. + * @type {boolean} + * @memberof Mount + */ + ReadOnly?: boolean; + /** + * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + * @type {string} + * @memberof Mount + */ + Consistency?: string; + /** + * + * @type {MountBindOptions} + * @memberof Mount + */ + BindOptions?: MountBindOptions; + /** + * + * @type {MountVolumeOptions} + * @memberof Mount + */ + VolumeOptions?: MountVolumeOptions; + /** + * + * @type {MountTmpfsOptions} + * @memberof Mount + */ + TmpfsOptions?: MountTmpfsOptions; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum MountTypeEnum { - Bind = "bind", - Volume = "volume", - Tmpfs = "tmpfs", - Npipe = "npipe", - Cluster = "cluster", + Bind = 'bind', + Volume = 'volume', + Tmpfs = 'tmpfs', + Npipe = 'npipe', + Cluster = 'cluster' } + /** * Check if a given object implements the Mount interface. */ export function instanceOfMount(value: object): value is Mount { - return true; + return true; } export function MountFromJSON(json: any): Mount { - return MountFromJSONTyped(json, false); + return MountFromJSONTyped(json, false); } export function MountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mount { - if (json == null) { - return json; - } - return { - Target: json["Target"] == null ? undefined : json["Target"], - Source: json["Source"] == null ? undefined : json["Source"], - Type: json["Type"] == null ? undefined : json["Type"], - ReadOnly: json["ReadOnly"] == null ? undefined : json["ReadOnly"], - Consistency: json["Consistency"] == null ? undefined : json["Consistency"], - BindOptions: - json["BindOptions"] == null ? undefined : MountBindOptionsFromJSON(json["BindOptions"]), - VolumeOptions: - json["VolumeOptions"] == null ? undefined : MountVolumeOptionsFromJSON(json["VolumeOptions"]), - TmpfsOptions: - json["TmpfsOptions"] == null ? undefined : MountTmpfsOptionsFromJSON(json["TmpfsOptions"]), - }; + if (json == null) { + return json; + } + return { + + 'Target': json['Target'] == null ? undefined : json['Target'], + 'Source': json['Source'] == null ? undefined : json['Source'], + 'Type': json['Type'] == null ? undefined : json['Type'], + 'ReadOnly': json['ReadOnly'] == null ? undefined : json['ReadOnly'], + 'Consistency': json['Consistency'] == null ? undefined : json['Consistency'], + 'BindOptions': json['BindOptions'] == null ? undefined : MountBindOptionsFromJSON(json['BindOptions']), + 'VolumeOptions': json['VolumeOptions'] == null ? undefined : MountVolumeOptionsFromJSON(json['VolumeOptions']), + 'TmpfsOptions': json['TmpfsOptions'] == null ? undefined : MountTmpfsOptionsFromJSON(json['TmpfsOptions']), + }; } export function MountToJSON(json: any): Mount { - return MountToJSONTyped(json, false); + return MountToJSONTyped(json, false); } export function MountToJSONTyped(value?: Mount | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - Target: value["Target"], - Source: value["Source"], - Type: value["Type"], - ReadOnly: value["ReadOnly"], - Consistency: value["Consistency"], - BindOptions: MountBindOptionsToJSON(value["BindOptions"]), - VolumeOptions: MountVolumeOptionsToJSON(value["VolumeOptions"]), - TmpfsOptions: MountTmpfsOptionsToJSON(value["TmpfsOptions"]), - }; + return { + + 'Target': value['Target'], + 'Source': value['Source'], + 'Type': value['Type'], + 'ReadOnly': value['ReadOnly'], + 'Consistency': value['Consistency'], + 'BindOptions': MountBindOptionsToJSON(value['BindOptions']), + 'VolumeOptions': MountVolumeOptionsToJSON(value['VolumeOptions']), + 'TmpfsOptions': MountTmpfsOptionsToJSON(value['TmpfsOptions']), + }; } + diff --git a/src/clients/docker/models/MountBindOptions.ts b/src/clients/docker/models/MountBindOptions.ts index bb37dfa5f9..df1c58bf8a 100644 --- a/src/clients/docker/models/MountBindOptions.ts +++ b/src/clients/docker/models/MountBindOptions.ts @@ -2,96 +2,94 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Optional configuration for the `bind` type. * @export * @interface MountBindOptions */ export interface MountBindOptions { - /** - * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. - * @type {string} - * @memberof MountBindOptions - */ - Propagation?: MountBindOptionsPropagationEnum; - /** - * Disable recursive bind mount. - * @type {boolean} - * @memberof MountBindOptions - */ - NonRecursive?: boolean; - /** - * Create mount point on host if missing - * @type {boolean} - * @memberof MountBindOptions - */ - CreateMountpoint?: boolean; + /** + * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + * @type {string} + * @memberof MountBindOptions + */ + Propagation?: MountBindOptionsPropagationEnum; + /** + * Disable recursive bind mount. + * @type {boolean} + * @memberof MountBindOptions + */ + NonRecursive?: boolean; + /** + * Create mount point on host if missing + * @type {boolean} + * @memberof MountBindOptions + */ + CreateMountpoint?: boolean; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum MountBindOptionsPropagationEnum { - Private = "private", - Rprivate = "rprivate", - Shared = "shared", - Rshared = "rshared", - Slave = "slave", - Rslave = "rslave", + Private = 'private', + Rprivate = 'rprivate', + Shared = 'shared', + Rshared = 'rshared', + Slave = 'slave', + Rslave = 'rslave' } + /** * Check if a given object implements the MountBindOptions interface. */ export function instanceOfMountBindOptions(value: object): value is MountBindOptions { - return true; + return true; } export function MountBindOptionsFromJSON(json: any): MountBindOptions { - return MountBindOptionsFromJSONTyped(json, false); + return MountBindOptionsFromJSONTyped(json, false); } -export function MountBindOptionsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): MountBindOptions { - if (json == null) { - return json; - } - return { - Propagation: json["Propagation"] == null ? undefined : json["Propagation"], - NonRecursive: json["NonRecursive"] == null ? undefined : json["NonRecursive"], - CreateMountpoint: json["CreateMountpoint"] == null ? undefined : json["CreateMountpoint"], - }; +export function MountBindOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountBindOptions { + if (json == null) { + return json; + } + return { + + 'Propagation': json['Propagation'] == null ? undefined : json['Propagation'], + 'NonRecursive': json['NonRecursive'] == null ? undefined : json['NonRecursive'], + 'CreateMountpoint': json['CreateMountpoint'] == null ? undefined : json['CreateMountpoint'], + }; } export function MountBindOptionsToJSON(json: any): MountBindOptions { - return MountBindOptionsToJSONTyped(json, false); + return MountBindOptionsToJSONTyped(json, false); } -export function MountBindOptionsToJSONTyped( - value?: MountBindOptions | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MountBindOptionsToJSONTyped(value?: MountBindOptions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Propagation: value["Propagation"], - NonRecursive: value["NonRecursive"], - CreateMountpoint: value["CreateMountpoint"], - }; + return { + + 'Propagation': value['Propagation'], + 'NonRecursive': value['NonRecursive'], + 'CreateMountpoint': value['CreateMountpoint'], + }; } + diff --git a/src/clients/docker/models/MountPoint.ts b/src/clients/docker/models/MountPoint.ts index b6d89111b6..73f5c7ee9b 100644 --- a/src/clients/docker/models/MountPoint.ts +++ b/src/clients/docker/models/MountPoint.ts @@ -2,160 +2,161 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * MountPoint represents a mount point configuration inside the container. * This is used for reporting the mountpoints in use by a container. - * + * * @export * @interface MountPoint */ export interface MountPoint { - /** - * The mount type: - * - * - `bind` a mount of a file or directory from the host into the container. - * - `volume` a docker volume with the given `Name`. - * - `tmpfs` a `tmpfs`. - * - `npipe` a named pipe from the host into the container. - * - `cluster` a Swarm cluster volume - * - * @type {string} - * @memberof MountPoint - */ - Type?: MountPointTypeEnum; - /** - * Name is the name reference to the underlying data defined by `Source` - * e.g., the volume name. - * - * @type {string} - * @memberof MountPoint - */ - Name?: string; - /** - * Source location of the mount. - * - * For volumes, this contains the storage location of the volume (within - * `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains - * the source (host) part of the bind-mount. For `tmpfs` mount points, this - * field is empty. - * - * @type {string} - * @memberof MountPoint - */ - Source?: string; - /** - * Destination is the path relative to the container root (`/`) where - * the `Source` is mounted inside the container. - * - * @type {string} - * @memberof MountPoint - */ - Destination?: string; - /** - * Driver is the volume driver used to create the volume (if it is a volume). - * - * @type {string} - * @memberof MountPoint - */ - Driver?: string; - /** - * Mode is a comma separated list of options supplied by the user when - * creating the bind/volume mount. - * - * The default is platform-specific (`"z"` on Linux, empty on Windows). - * - * @type {string} - * @memberof MountPoint - */ - Mode?: string; - /** - * Whether the mount is mounted writable (read-write). - * - * @type {boolean} - * @memberof MountPoint - */ - RW?: boolean; - /** - * Propagation describes how mounts are propagated from the host into the - * mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) - * for details. This field is not used on Windows. - * - * @type {string} - * @memberof MountPoint - */ - Propagation?: string; + /** + * The mount type: + * + * - `bind` a mount of a file or directory from the host into the container. + * - `volume` a docker volume with the given `Name`. + * - `tmpfs` a `tmpfs`. + * - `npipe` a named pipe from the host into the container. + * - `cluster` a Swarm cluster volume + * + * @type {string} + * @memberof MountPoint + */ + Type?: MountPointTypeEnum; + /** + * Name is the name reference to the underlying data defined by `Source` + * e.g., the volume name. + * + * @type {string} + * @memberof MountPoint + */ + Name?: string; + /** + * Source location of the mount. + * + * For volumes, this contains the storage location of the volume (within + * `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + * the source (host) part of the bind-mount. For `tmpfs` mount points, this + * field is empty. + * + * @type {string} + * @memberof MountPoint + */ + Source?: string; + /** + * Destination is the path relative to the container root (`/`) where + * the `Source` is mounted inside the container. + * + * @type {string} + * @memberof MountPoint + */ + Destination?: string; + /** + * Driver is the volume driver used to create the volume (if it is a volume). + * + * @type {string} + * @memberof MountPoint + */ + Driver?: string; + /** + * Mode is a comma separated list of options supplied by the user when + * creating the bind/volume mount. + * + * The default is platform-specific (`"z"` on Linux, empty on Windows). + * + * @type {string} + * @memberof MountPoint + */ + Mode?: string; + /** + * Whether the mount is mounted writable (read-write). + * + * @type {boolean} + * @memberof MountPoint + */ + RW?: boolean; + /** + * Propagation describes how mounts are propagated from the host into the + * mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + * for details. This field is not used on Windows. + * + * @type {string} + * @memberof MountPoint + */ + Propagation?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum MountPointTypeEnum { - Bind = "bind", - Volume = "volume", - Tmpfs = "tmpfs", - Npipe = "npipe", - Cluster = "cluster", + Bind = 'bind', + Volume = 'volume', + Tmpfs = 'tmpfs', + Npipe = 'npipe', + Cluster = 'cluster' } + /** * Check if a given object implements the MountPoint interface. */ export function instanceOfMountPoint(value: object): value is MountPoint { - return true; + return true; } export function MountPointFromJSON(json: any): MountPoint { - return MountPointFromJSONTyped(json, false); + return MountPointFromJSONTyped(json, false); } export function MountPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountPoint { - if (json == null) { - return json; - } - return { - Type: json["Type"] == null ? undefined : json["Type"], - Name: json["Name"] == null ? undefined : json["Name"], - Source: json["Source"] == null ? undefined : json["Source"], - Destination: json["Destination"] == null ? undefined : json["Destination"], - Driver: json["Driver"] == null ? undefined : json["Driver"], - Mode: json["Mode"] == null ? undefined : json["Mode"], - RW: json["RW"] == null ? undefined : json["RW"], - Propagation: json["Propagation"] == null ? undefined : json["Propagation"], - }; + if (json == null) { + return json; + } + return { + + 'Type': json['Type'] == null ? undefined : json['Type'], + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Source': json['Source'] == null ? undefined : json['Source'], + 'Destination': json['Destination'] == null ? undefined : json['Destination'], + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'Mode': json['Mode'] == null ? undefined : json['Mode'], + 'RW': json['RW'] == null ? undefined : json['RW'], + 'Propagation': json['Propagation'] == null ? undefined : json['Propagation'], + }; } export function MountPointToJSON(json: any): MountPoint { - return MountPointToJSONTyped(json, false); + return MountPointToJSONTyped(json, false); } -export function MountPointToJSONTyped( - value?: MountPoint | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MountPointToJSONTyped(value?: MountPoint | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Type: value["Type"], - Name: value["Name"], - Source: value["Source"], - Destination: value["Destination"], - Driver: value["Driver"], - Mode: value["Mode"], - RW: value["RW"], - Propagation: value["Propagation"], - }; + return { + + 'Type': value['Type'], + 'Name': value['Name'], + 'Source': value['Source'], + 'Destination': value['Destination'], + 'Driver': value['Driver'], + 'Mode': value['Mode'], + 'RW': value['RW'], + 'Propagation': value['Propagation'], + }; } + diff --git a/src/clients/docker/models/MountTmpfsOptions.ts b/src/clients/docker/models/MountTmpfsOptions.ts index bdb85238c3..e6008dfb7f 100644 --- a/src/clients/docker/models/MountTmpfsOptions.ts +++ b/src/clients/docker/models/MountTmpfsOptions.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Optional configuration for the `tmpfs` type. * @export * @interface MountTmpfsOptions */ export interface MountTmpfsOptions { - /** - * The size for the tmpfs mount in bytes. - * @type {number} - * @memberof MountTmpfsOptions - */ - SizeBytes?: number; - /** - * The permission mode for the tmpfs mount in an integer. - * @type {number} - * @memberof MountTmpfsOptions - */ - Mode?: number; + /** + * The size for the tmpfs mount in bytes. + * @type {number} + * @memberof MountTmpfsOptions + */ + SizeBytes?: number; + /** + * The permission mode for the tmpfs mount in an integer. + * @type {number} + * @memberof MountTmpfsOptions + */ + Mode?: number; } /** * Check if a given object implements the MountTmpfsOptions interface. */ export function instanceOfMountTmpfsOptions(value: object): value is MountTmpfsOptions { - return true; + return true; } export function MountTmpfsOptionsFromJSON(json: any): MountTmpfsOptions { - return MountTmpfsOptionsFromJSONTyped(json, false); + return MountTmpfsOptionsFromJSONTyped(json, false); } -export function MountTmpfsOptionsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): MountTmpfsOptions { - if (json == null) { - return json; - } - return { - SizeBytes: json["SizeBytes"] == null ? undefined : json["SizeBytes"], - Mode: json["Mode"] == null ? undefined : json["Mode"], - }; +export function MountTmpfsOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountTmpfsOptions { + if (json == null) { + return json; + } + return { + + 'SizeBytes': json['SizeBytes'] == null ? undefined : json['SizeBytes'], + 'Mode': json['Mode'] == null ? undefined : json['Mode'], + }; } export function MountTmpfsOptionsToJSON(json: any): MountTmpfsOptions { - return MountTmpfsOptionsToJSONTyped(json, false); + return MountTmpfsOptionsToJSONTyped(json, false); } -export function MountTmpfsOptionsToJSONTyped( - value?: MountTmpfsOptions | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MountTmpfsOptionsToJSONTyped(value?: MountTmpfsOptions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - SizeBytes: value["SizeBytes"], - Mode: value["Mode"], - }; + return { + + 'SizeBytes': value['SizeBytes'], + 'Mode': value['Mode'], + }; } + diff --git a/src/clients/docker/models/MountVolumeOptions.ts b/src/clients/docker/models/MountVolumeOptions.ts index 38823ee6ae..d75b01790b 100644 --- a/src/clients/docker/models/MountVolumeOptions.ts +++ b/src/clients/docker/models/MountVolumeOptions.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { MountVolumeOptionsDriverConfig } from "./MountVolumeOptionsDriverConfig"; +import { mapValues } from '../runtime'; +import type { MountVolumeOptionsDriverConfig } from './MountVolumeOptionsDriverConfig'; import { - MountVolumeOptionsDriverConfigFromJSON, - MountVolumeOptionsDriverConfigFromJSONTyped, - MountVolumeOptionsDriverConfigToJSON, - MountVolumeOptionsDriverConfigToJSONTyped, -} from "./MountVolumeOptionsDriverConfig"; + MountVolumeOptionsDriverConfigFromJSON, + MountVolumeOptionsDriverConfigFromJSONTyped, + MountVolumeOptionsDriverConfigToJSON, + MountVolumeOptionsDriverConfigToJSONTyped, +} from './MountVolumeOptionsDriverConfig'; /** * Optional configuration for the `volume` type. @@ -27,69 +27,63 @@ import { * @interface MountVolumeOptions */ export interface MountVolumeOptions { - /** - * Populate volume with data from the target. - * @type {boolean} - * @memberof MountVolumeOptions - */ - NoCopy?: boolean; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof MountVolumeOptions - */ - Labels?: { [key: string]: string }; - /** - * - * @type {MountVolumeOptionsDriverConfig} - * @memberof MountVolumeOptions - */ - DriverConfig?: MountVolumeOptionsDriverConfig; + /** + * Populate volume with data from the target. + * @type {boolean} + * @memberof MountVolumeOptions + */ + NoCopy?: boolean; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof MountVolumeOptions + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {MountVolumeOptionsDriverConfig} + * @memberof MountVolumeOptions + */ + DriverConfig?: MountVolumeOptionsDriverConfig; } /** * Check if a given object implements the MountVolumeOptions interface. */ export function instanceOfMountVolumeOptions(value: object): value is MountVolumeOptions { - return true; + return true; } export function MountVolumeOptionsFromJSON(json: any): MountVolumeOptions { - return MountVolumeOptionsFromJSONTyped(json, false); + return MountVolumeOptionsFromJSONTyped(json, false); } -export function MountVolumeOptionsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): MountVolumeOptions { - if (json == null) { - return json; - } - return { - NoCopy: json["NoCopy"] == null ? undefined : json["NoCopy"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - DriverConfig: - json["DriverConfig"] == null - ? undefined - : MountVolumeOptionsDriverConfigFromJSON(json["DriverConfig"]), - }; +export function MountVolumeOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountVolumeOptions { + if (json == null) { + return json; + } + return { + + 'NoCopy': json['NoCopy'] == null ? undefined : json['NoCopy'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'DriverConfig': json['DriverConfig'] == null ? undefined : MountVolumeOptionsDriverConfigFromJSON(json['DriverConfig']), + }; } export function MountVolumeOptionsToJSON(json: any): MountVolumeOptions { - return MountVolumeOptionsToJSONTyped(json, false); + return MountVolumeOptionsToJSONTyped(json, false); } -export function MountVolumeOptionsToJSONTyped( - value?: MountVolumeOptions | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MountVolumeOptionsToJSONTyped(value?: MountVolumeOptions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NoCopy: value["NoCopy"], - Labels: value["Labels"], - DriverConfig: MountVolumeOptionsDriverConfigToJSON(value["DriverConfig"]), - }; + return { + + 'NoCopy': value['NoCopy'], + 'Labels': value['Labels'], + 'DriverConfig': MountVolumeOptionsDriverConfigToJSON(value['DriverConfig']), + }; } + diff --git a/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts b/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts index b29eec9649..5aab53b18c 100644 --- a/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts +++ b/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts @@ -2,77 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Map of driver specific options * @export * @interface MountVolumeOptionsDriverConfig */ export interface MountVolumeOptionsDriverConfig { - /** - * Name of the driver to use to create the volume. - * @type {string} - * @memberof MountVolumeOptionsDriverConfig - */ - Name?: string; - /** - * key/value map of driver specific options. - * @type {{ [key: string]: string; }} - * @memberof MountVolumeOptionsDriverConfig - */ - Options?: { [key: string]: string }; + /** + * Name of the driver to use to create the volume. + * @type {string} + * @memberof MountVolumeOptionsDriverConfig + */ + Name?: string; + /** + * key/value map of driver specific options. + * @type {{ [key: string]: string; }} + * @memberof MountVolumeOptionsDriverConfig + */ + Options?: { [key: string]: string; }; } /** * Check if a given object implements the MountVolumeOptionsDriverConfig interface. */ -export function instanceOfMountVolumeOptionsDriverConfig( - value: object, -): value is MountVolumeOptionsDriverConfig { - return true; +export function instanceOfMountVolumeOptionsDriverConfig(value: object): value is MountVolumeOptionsDriverConfig { + return true; } export function MountVolumeOptionsDriverConfigFromJSON(json: any): MountVolumeOptionsDriverConfig { - return MountVolumeOptionsDriverConfigFromJSONTyped(json, false); + return MountVolumeOptionsDriverConfigFromJSONTyped(json, false); } -export function MountVolumeOptionsDriverConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): MountVolumeOptionsDriverConfig { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Options: json["Options"] == null ? undefined : json["Options"], - }; +export function MountVolumeOptionsDriverConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountVolumeOptionsDriverConfig { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function MountVolumeOptionsDriverConfigToJSON(json: any): MountVolumeOptionsDriverConfig { - return MountVolumeOptionsDriverConfigToJSONTyped(json, false); + return MountVolumeOptionsDriverConfigToJSONTyped(json, false); } -export function MountVolumeOptionsDriverConfigToJSONTyped( - value?: MountVolumeOptionsDriverConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MountVolumeOptionsDriverConfigToJSONTyped(value?: MountVolumeOptionsDriverConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Options: value["Options"], - }; + return { + + 'Name': value['Name'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/Network.ts b/src/clients/docker/models/Network.ts index a9a44a0974..5ecaa00c62 100644 --- a/src/clients/docker/models/Network.ts +++ b/src/clients/docker/models/Network.ts @@ -2,237 +2,235 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { IPAM } from "./IPAM"; -import { IPAMFromJSON, IPAMFromJSONTyped, IPAMToJSON, IPAMToJSONTyped } from "./IPAM"; -import type { PeerInfo } from "./PeerInfo"; +import { mapValues } from '../runtime'; +import type { IPAM } from './IPAM'; +import { + IPAMFromJSON, + IPAMFromJSONTyped, + IPAMToJSON, + IPAMToJSONTyped, +} from './IPAM'; +import type { PeerInfo } from './PeerInfo'; import { - PeerInfoFromJSON, - PeerInfoFromJSONTyped, - PeerInfoToJSON, - PeerInfoToJSONTyped, -} from "./PeerInfo"; -import type { ConfigReference } from "./ConfigReference"; + PeerInfoFromJSON, + PeerInfoFromJSONTyped, + PeerInfoToJSON, + PeerInfoToJSONTyped, +} from './PeerInfo'; +import type { ConfigReference } from './ConfigReference'; import { - ConfigReferenceFromJSON, - ConfigReferenceFromJSONTyped, - ConfigReferenceToJSON, - ConfigReferenceToJSONTyped, -} from "./ConfigReference"; -import type { NetworkContainer } from "./NetworkContainer"; + ConfigReferenceFromJSON, + ConfigReferenceFromJSONTyped, + ConfigReferenceToJSON, + ConfigReferenceToJSONTyped, +} from './ConfigReference'; +import type { NetworkContainer } from './NetworkContainer'; import { - NetworkContainerFromJSON, - NetworkContainerFromJSONTyped, - NetworkContainerToJSON, - NetworkContainerToJSONTyped, -} from "./NetworkContainer"; + NetworkContainerFromJSON, + NetworkContainerFromJSONTyped, + NetworkContainerToJSON, + NetworkContainerToJSONTyped, +} from './NetworkContainer'; /** - * + * * @export * @interface Network */ export interface Network { - /** - * Name of the network. - * - * @type {string} - * @memberof Network - */ - Name?: string; - /** - * ID that uniquely identifies a network on a single machine. - * - * @type {string} - * @memberof Network - */ - Id?: string; - /** - * Date and time at which the network was created in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Network - */ - Created?: string; - /** - * The level at which the network exists (e.g. `swarm` for cluster-wide - * or `local` for machine level) - * - * @type {string} - * @memberof Network - */ - Scope?: string; - /** - * The name of the driver used to create the network (e.g. `bridge`, - * `overlay`). - * - * @type {string} - * @memberof Network - */ - Driver?: string; - /** - * Whether the network was created with IPv6 enabled. - * - * @type {boolean} - * @memberof Network - */ - EnableIPv6?: boolean; - /** - * - * @type {IPAM} - * @memberof Network - */ - IPAM?: IPAM; - /** - * Whether the network is created to only allow internal networking - * connectivity. - * - * @type {boolean} - * @memberof Network - */ - Internal?: boolean; - /** - * Whether a global / swarm scope network is manually attachable by regular - * containers from workers in swarm mode. - * - * @type {boolean} - * @memberof Network - */ - Attachable?: boolean; - /** - * Whether the network is providing the routing-mesh for the swarm cluster. - * - * @type {boolean} - * @memberof Network - */ - Ingress?: boolean; - /** - * - * @type {ConfigReference} - * @memberof Network - */ - ConfigFrom?: ConfigReference; - /** - * Whether the network is a config-only network. Config-only networks are - * placeholder networks for network configurations to be used by other - * networks. Config-only networks cannot be used directly to run containers - * or services. - * - * @type {boolean} - * @memberof Network - */ - ConfigOnly?: boolean; - /** - * Contains endpoints attached to the network. - * - * @type {{ [key: string]: NetworkContainer; }} - * @memberof Network - */ - Containers?: { [key: string]: NetworkContainer }; - /** - * Network-specific options uses when creating the network. - * - * @type {{ [key: string]: string; }} - * @memberof Network - */ - Options?: { [key: string]: string }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Network - */ - Labels?: { [key: string]: string }; - /** - * List of peer nodes for an overlay network. This field is only present - * for overlay networks, and omitted for other network types. - * - * @type {Array} - * @memberof Network - */ - Peers?: Array | null; + /** + * Name of the network. + * + * @type {string} + * @memberof Network + */ + Name?: string; + /** + * ID that uniquely identifies a network on a single machine. + * + * @type {string} + * @memberof Network + */ + Id?: string; + /** + * Date and time at which the network was created in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Network + */ + Created?: string; + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + * or `local` for machine level) + * + * @type {string} + * @memberof Network + */ + Scope?: string; + /** + * The name of the driver used to create the network (e.g. `bridge`, + * `overlay`). + * + * @type {string} + * @memberof Network + */ + Driver?: string; + /** + * Whether the network was created with IPv6 enabled. + * + * @type {boolean} + * @memberof Network + */ + EnableIPv6?: boolean; + /** + * + * @type {IPAM} + * @memberof Network + */ + IPAM?: IPAM; + /** + * Whether the network is created to only allow internal networking + * connectivity. + * + * @type {boolean} + * @memberof Network + */ + Internal?: boolean; + /** + * Whether a global / swarm scope network is manually attachable by regular + * containers from workers in swarm mode. + * + * @type {boolean} + * @memberof Network + */ + Attachable?: boolean; + /** + * Whether the network is providing the routing-mesh for the swarm cluster. + * + * @type {boolean} + * @memberof Network + */ + Ingress?: boolean; + /** + * + * @type {ConfigReference} + * @memberof Network + */ + ConfigFrom?: ConfigReference; + /** + * Whether the network is a config-only network. Config-only networks are + * placeholder networks for network configurations to be used by other + * networks. Config-only networks cannot be used directly to run containers + * or services. + * + * @type {boolean} + * @memberof Network + */ + ConfigOnly?: boolean; + /** + * Contains endpoints attached to the network. + * + * @type {{ [key: string]: NetworkContainer; }} + * @memberof Network + */ + Containers?: { [key: string]: NetworkContainer; }; + /** + * Network-specific options uses when creating the network. + * + * @type {{ [key: string]: string; }} + * @memberof Network + */ + Options?: { [key: string]: string; }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof Network + */ + Labels?: { [key: string]: string; }; + /** + * List of peer nodes for an overlay network. This field is only present + * for overlay networks, and omitted for other network types. + * + * @type {Array} + * @memberof Network + */ + Peers?: Array | null; } /** * Check if a given object implements the Network interface. */ export function instanceOfNetwork(value: object): value is Network { - return true; + return true; } export function NetworkFromJSON(json: any): Network { - return NetworkFromJSONTyped(json, false); + return NetworkFromJSONTyped(json, false); } export function NetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Network { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Id: json["Id"] == null ? undefined : json["Id"], - Created: json["Created"] == null ? undefined : json["Created"], - Scope: json["Scope"] == null ? undefined : json["Scope"], - Driver: json["Driver"] == null ? undefined : json["Driver"], - EnableIPv6: json["EnableIPv6"] == null ? undefined : json["EnableIPv6"], - IPAM: json["IPAM"] == null ? undefined : IPAMFromJSON(json["IPAM"]), - Internal: json["Internal"] == null ? undefined : json["Internal"], - Attachable: json["Attachable"] == null ? undefined : json["Attachable"], - Ingress: json["Ingress"] == null ? undefined : json["Ingress"], - ConfigFrom: - json["ConfigFrom"] == null ? undefined : ConfigReferenceFromJSON(json["ConfigFrom"]), - ConfigOnly: json["ConfigOnly"] == null ? undefined : json["ConfigOnly"], - Containers: - json["Containers"] == null - ? undefined - : mapValues(json["Containers"], NetworkContainerFromJSON), - Options: json["Options"] == null ? undefined : json["Options"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Peers: json["Peers"] == null ? undefined : (json["Peers"] as Array).map(PeerInfoFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Id': json['Id'] == null ? undefined : json['Id'], + 'Created': json['Created'] == null ? undefined : json['Created'], + 'Scope': json['Scope'] == null ? undefined : json['Scope'], + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'EnableIPv6': json['EnableIPv6'] == null ? undefined : json['EnableIPv6'], + 'IPAM': json['IPAM'] == null ? undefined : IPAMFromJSON(json['IPAM']), + 'Internal': json['Internal'] == null ? undefined : json['Internal'], + 'Attachable': json['Attachable'] == null ? undefined : json['Attachable'], + 'Ingress': json['Ingress'] == null ? undefined : json['Ingress'], + 'ConfigFrom': json['ConfigFrom'] == null ? undefined : ConfigReferenceFromJSON(json['ConfigFrom']), + 'ConfigOnly': json['ConfigOnly'] == null ? undefined : json['ConfigOnly'], + 'Containers': json['Containers'] == null ? undefined : (mapValues(json['Containers'], NetworkContainerFromJSON)), + 'Options': json['Options'] == null ? undefined : json['Options'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Peers': json['Peers'] == null ? undefined : ((json['Peers'] as Array).map(PeerInfoFromJSON)), + }; } export function NetworkToJSON(json: any): Network { - return NetworkToJSONTyped(json, false); + return NetworkToJSONTyped(json, false); } -export function NetworkToJSONTyped( - value?: Network | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkToJSONTyped(value?: Network | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Id: value["Id"], - Created: value["Created"], - Scope: value["Scope"], - Driver: value["Driver"], - EnableIPv6: value["EnableIPv6"], - IPAM: IPAMToJSON(value["IPAM"]), - Internal: value["Internal"], - Attachable: value["Attachable"], - Ingress: value["Ingress"], - ConfigFrom: ConfigReferenceToJSON(value["ConfigFrom"]), - ConfigOnly: value["ConfigOnly"], - Containers: - value["Containers"] == null - ? undefined - : mapValues(value["Containers"], NetworkContainerToJSON), - Options: value["Options"], - Labels: value["Labels"], - Peers: value["Peers"] == null ? undefined : (value["Peers"] as Array).map(PeerInfoToJSON), - }; + return { + + 'Name': value['Name'], + 'Id': value['Id'], + 'Created': value['Created'], + 'Scope': value['Scope'], + 'Driver': value['Driver'], + 'EnableIPv6': value['EnableIPv6'], + 'IPAM': IPAMToJSON(value['IPAM']), + 'Internal': value['Internal'], + 'Attachable': value['Attachable'], + 'Ingress': value['Ingress'], + 'ConfigFrom': ConfigReferenceToJSON(value['ConfigFrom']), + 'ConfigOnly': value['ConfigOnly'], + 'Containers': value['Containers'] == null ? undefined : (mapValues(value['Containers'], NetworkContainerToJSON)), + 'Options': value['Options'], + 'Labels': value['Labels'], + 'Peers': value['Peers'] == null ? undefined : ((value['Peers'] as Array).map(PeerInfoToJSON)), + }; } + diff --git a/src/clients/docker/models/NetworkAttachmentConfig.ts b/src/clients/docker/models/NetworkAttachmentConfig.ts index d0065fa840..40de3a4080 100644 --- a/src/clients/docker/models/NetworkAttachmentConfig.ts +++ b/src/clients/docker/models/NetworkAttachmentConfig.ts @@ -2,87 +2,84 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Specifies how a service should be attached to a particular network. - * + * * @export * @interface NetworkAttachmentConfig */ export interface NetworkAttachmentConfig { - /** - * The target network for attachment. Must be a network name or ID. - * - * @type {string} - * @memberof NetworkAttachmentConfig - */ - Target?: string; - /** - * Discoverable alternate names for the service on this network. - * - * @type {Array} - * @memberof NetworkAttachmentConfig - */ - Aliases?: Array; - /** - * Driver attachment options for the network target. - * - * @type {{ [key: string]: string; }} - * @memberof NetworkAttachmentConfig - */ - DriverOpts?: { [key: string]: string }; + /** + * The target network for attachment. Must be a network name or ID. + * + * @type {string} + * @memberof NetworkAttachmentConfig + */ + Target?: string; + /** + * Discoverable alternate names for the service on this network. + * + * @type {Array} + * @memberof NetworkAttachmentConfig + */ + Aliases?: Array; + /** + * Driver attachment options for the network target. + * + * @type {{ [key: string]: string; }} + * @memberof NetworkAttachmentConfig + */ + DriverOpts?: { [key: string]: string; }; } /** * Check if a given object implements the NetworkAttachmentConfig interface. */ export function instanceOfNetworkAttachmentConfig(value: object): value is NetworkAttachmentConfig { - return true; + return true; } export function NetworkAttachmentConfigFromJSON(json: any): NetworkAttachmentConfig { - return NetworkAttachmentConfigFromJSONTyped(json, false); + return NetworkAttachmentConfigFromJSONTyped(json, false); } -export function NetworkAttachmentConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkAttachmentConfig { - if (json == null) { - return json; - } - return { - Target: json["Target"] == null ? undefined : json["Target"], - Aliases: json["Aliases"] == null ? undefined : json["Aliases"], - DriverOpts: json["DriverOpts"] == null ? undefined : json["DriverOpts"], - }; +export function NetworkAttachmentConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkAttachmentConfig { + if (json == null) { + return json; + } + return { + + 'Target': json['Target'] == null ? undefined : json['Target'], + 'Aliases': json['Aliases'] == null ? undefined : json['Aliases'], + 'DriverOpts': json['DriverOpts'] == null ? undefined : json['DriverOpts'], + }; } export function NetworkAttachmentConfigToJSON(json: any): NetworkAttachmentConfig { - return NetworkAttachmentConfigToJSONTyped(json, false); + return NetworkAttachmentConfigToJSONTyped(json, false); } -export function NetworkAttachmentConfigToJSONTyped( - value?: NetworkAttachmentConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkAttachmentConfigToJSONTyped(value?: NetworkAttachmentConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Target: value["Target"], - Aliases: value["Aliases"], - DriverOpts: value["DriverOpts"], - }; + return { + + 'Target': value['Target'], + 'Aliases': value['Aliases'], + 'DriverOpts': value['DriverOpts'], + }; } + diff --git a/src/clients/docker/models/NetworkConnectRequest.ts b/src/clients/docker/models/NetworkConnectRequest.ts index 3d89b4ad5e..076f92f69a 100644 --- a/src/clients/docker/models/NetworkConnectRequest.ts +++ b/src/clients/docker/models/NetworkConnectRequest.ts @@ -2,84 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EndpointSettings } from "./EndpointSettings"; +import { mapValues } from '../runtime'; +import type { EndpointSettings } from './EndpointSettings'; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from "./EndpointSettings"; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from './EndpointSettings'; /** - * + * * @export * @interface NetworkConnectRequest */ export interface NetworkConnectRequest { - /** - * The ID or name of the container to connect to the network. - * @type {string} - * @memberof NetworkConnectRequest - */ - Container?: string; - /** - * - * @type {EndpointSettings} - * @memberof NetworkConnectRequest - */ - EndpointConfig?: EndpointSettings; + /** + * The ID or name of the container to connect to the network. + * @type {string} + * @memberof NetworkConnectRequest + */ + Container?: string; + /** + * + * @type {EndpointSettings} + * @memberof NetworkConnectRequest + */ + EndpointConfig?: EndpointSettings; } /** * Check if a given object implements the NetworkConnectRequest interface. */ export function instanceOfNetworkConnectRequest(value: object): value is NetworkConnectRequest { - return true; + return true; } export function NetworkConnectRequestFromJSON(json: any): NetworkConnectRequest { - return NetworkConnectRequestFromJSONTyped(json, false); + return NetworkConnectRequestFromJSONTyped(json, false); } -export function NetworkConnectRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkConnectRequest { - if (json == null) { - return json; - } - return { - Container: json["Container"] == null ? undefined : json["Container"], - EndpointConfig: - json["EndpointConfig"] == null ? undefined : EndpointSettingsFromJSON(json["EndpointConfig"]), - }; +export function NetworkConnectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkConnectRequest { + if (json == null) { + return json; + } + return { + + 'Container': json['Container'] == null ? undefined : json['Container'], + 'EndpointConfig': json['EndpointConfig'] == null ? undefined : EndpointSettingsFromJSON(json['EndpointConfig']), + }; } export function NetworkConnectRequestToJSON(json: any): NetworkConnectRequest { - return NetworkConnectRequestToJSONTyped(json, false); + return NetworkConnectRequestToJSONTyped(json, false); } -export function NetworkConnectRequestToJSONTyped( - value?: NetworkConnectRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkConnectRequestToJSONTyped(value?: NetworkConnectRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Container: value["Container"], - EndpointConfig: EndpointSettingsToJSON(value["EndpointConfig"]), - }; + return { + + 'Container': value['Container'], + 'EndpointConfig': EndpointSettingsToJSON(value['EndpointConfig']), + }; } + diff --git a/src/clients/docker/models/NetworkContainer.ts b/src/clients/docker/models/NetworkContainer.ts index 4dae4fb3f3..3d055a7c0e 100644 --- a/src/clients/docker/models/NetworkContainer.ts +++ b/src/clients/docker/models/NetworkContainer.ts @@ -2,99 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface NetworkContainer */ export interface NetworkContainer { - /** - * - * @type {string} - * @memberof NetworkContainer - */ - Name?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - EndpointID?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - MacAddress?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - IPv4Address?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - IPv6Address?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + Name?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + EndpointID?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + MacAddress?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + IPv4Address?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + IPv6Address?: string; } /** * Check if a given object implements the NetworkContainer interface. */ export function instanceOfNetworkContainer(value: object): value is NetworkContainer { - return true; + return true; } export function NetworkContainerFromJSON(json: any): NetworkContainer { - return NetworkContainerFromJSONTyped(json, false); + return NetworkContainerFromJSONTyped(json, false); } -export function NetworkContainerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkContainer { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - EndpointID: json["EndpointID"] == null ? undefined : json["EndpointID"], - MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], - IPv4Address: json["IPv4Address"] == null ? undefined : json["IPv4Address"], - IPv6Address: json["IPv6Address"] == null ? undefined : json["IPv6Address"], - }; +export function NetworkContainerFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkContainer { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'EndpointID': json['EndpointID'] == null ? undefined : json['EndpointID'], + 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], + 'IPv4Address': json['IPv4Address'] == null ? undefined : json['IPv4Address'], + 'IPv6Address': json['IPv6Address'] == null ? undefined : json['IPv6Address'], + }; } export function NetworkContainerToJSON(json: any): NetworkContainer { - return NetworkContainerToJSONTyped(json, false); + return NetworkContainerToJSONTyped(json, false); } -export function NetworkContainerToJSONTyped( - value?: NetworkContainer | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkContainerToJSONTyped(value?: NetworkContainer | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - EndpointID: value["EndpointID"], - MacAddress: value["MacAddress"], - IPv4Address: value["IPv4Address"], - IPv6Address: value["IPv6Address"], - }; + return { + + 'Name': value['Name'], + 'EndpointID': value['EndpointID'], + 'MacAddress': value['MacAddress'], + 'IPv4Address': value['IPv4Address'], + 'IPv6Address': value['IPv6Address'], + }; } + diff --git a/src/clients/docker/models/NetworkCreateRequest.ts b/src/clients/docker/models/NetworkCreateRequest.ts index 8d00e73b58..cbc93ddebc 100644 --- a/src/clients/docker/models/NetworkCreateRequest.ts +++ b/src/clients/docker/models/NetworkCreateRequest.ts @@ -2,192 +2,193 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { IPAM } from "./IPAM"; -import { IPAMFromJSON, IPAMFromJSONTyped, IPAMToJSON, IPAMToJSONTyped } from "./IPAM"; -import type { ConfigReference } from "./ConfigReference"; +import { mapValues } from '../runtime'; +import type { IPAM } from './IPAM'; +import { + IPAMFromJSON, + IPAMFromJSONTyped, + IPAMToJSON, + IPAMToJSONTyped, +} from './IPAM'; +import type { ConfigReference } from './ConfigReference'; import { - ConfigReferenceFromJSON, - ConfigReferenceFromJSONTyped, - ConfigReferenceToJSON, - ConfigReferenceToJSONTyped, -} from "./ConfigReference"; + ConfigReferenceFromJSON, + ConfigReferenceFromJSONTyped, + ConfigReferenceToJSON, + ConfigReferenceToJSONTyped, +} from './ConfigReference'; /** - * + * * @export * @interface NetworkCreateRequest */ export interface NetworkCreateRequest { - /** - * The network's name. - * @type {string} - * @memberof NetworkCreateRequest - */ - Name: string; - /** - * Check for networks with duplicate names. Since Network is - * primarily keyed based on a random ID and not on the name, and - * network name is strictly a user-friendly alias to the network - * which is uniquely identified using ID, there is no guaranteed - * way to check for duplicates. CheckDuplicate is there to provide - * a best effort checking of any networks which has the same name - * but it is not guaranteed to catch all name collisions. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - CheckDuplicate?: boolean; - /** - * Name of the network driver plugin to use. - * @type {string} - * @memberof NetworkCreateRequest - */ - Driver?: string; - /** - * The level at which the network exists (e.g. `swarm` for cluster-wide - * or `local` for machine level). - * - * @type {string} - * @memberof NetworkCreateRequest - */ - Scope?: string; - /** - * Restrict external access to the network. - * @type {boolean} - * @memberof NetworkCreateRequest - */ - Internal?: boolean; - /** - * Globally scoped network is manually attachable by regular - * containers from workers in swarm mode. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - Attachable?: boolean; - /** - * Ingress network is the network which provides the routing-mesh - * in swarm mode. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - Ingress?: boolean; - /** - * Creates a config-only network. Config-only networks are placeholder - * networks for network configurations to be used by other networks. - * Config-only networks cannot be used directly to run containers - * or services. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - ConfigOnly?: boolean; - /** - * - * @type {ConfigReference} - * @memberof NetworkCreateRequest - */ - ConfigFrom?: ConfigReference; - /** - * - * @type {IPAM} - * @memberof NetworkCreateRequest - */ - IPAM?: IPAM; - /** - * Enable IPv6 on the network. - * @type {boolean} - * @memberof NetworkCreateRequest - */ - EnableIPv6?: boolean; - /** - * Network specific options to be used by the drivers. - * @type {{ [key: string]: string; }} - * @memberof NetworkCreateRequest - */ - Options?: { [key: string]: string }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof NetworkCreateRequest - */ - Labels?: { [key: string]: string }; + /** + * The network's name. + * @type {string} + * @memberof NetworkCreateRequest + */ + Name: string; + /** + * Check for networks with duplicate names. Since Network is + * primarily keyed based on a random ID and not on the name, and + * network name is strictly a user-friendly alias to the network + * which is uniquely identified using ID, there is no guaranteed + * way to check for duplicates. CheckDuplicate is there to provide + * a best effort checking of any networks which has the same name + * but it is not guaranteed to catch all name collisions. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + CheckDuplicate?: boolean; + /** + * Name of the network driver plugin to use. + * @type {string} + * @memberof NetworkCreateRequest + */ + Driver?: string; + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + * or `local` for machine level). + * + * @type {string} + * @memberof NetworkCreateRequest + */ + Scope?: string; + /** + * Restrict external access to the network. + * @type {boolean} + * @memberof NetworkCreateRequest + */ + Internal?: boolean; + /** + * Globally scoped network is manually attachable by regular + * containers from workers in swarm mode. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + Attachable?: boolean; + /** + * Ingress network is the network which provides the routing-mesh + * in swarm mode. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + Ingress?: boolean; + /** + * Creates a config-only network. Config-only networks are placeholder + * networks for network configurations to be used by other networks. + * Config-only networks cannot be used directly to run containers + * or services. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + ConfigOnly?: boolean; + /** + * + * @type {ConfigReference} + * @memberof NetworkCreateRequest + */ + ConfigFrom?: ConfigReference; + /** + * + * @type {IPAM} + * @memberof NetworkCreateRequest + */ + IPAM?: IPAM; + /** + * Enable IPv6 on the network. + * @type {boolean} + * @memberof NetworkCreateRequest + */ + EnableIPv6?: boolean; + /** + * Network specific options to be used by the drivers. + * @type {{ [key: string]: string; }} + * @memberof NetworkCreateRequest + */ + Options?: { [key: string]: string; }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof NetworkCreateRequest + */ + Labels?: { [key: string]: string; }; } /** * Check if a given object implements the NetworkCreateRequest interface. */ export function instanceOfNetworkCreateRequest(value: object): value is NetworkCreateRequest { - if (!("Name" in value) || value["Name"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + return true; } export function NetworkCreateRequestFromJSON(json: any): NetworkCreateRequest { - return NetworkCreateRequestFromJSONTyped(json, false); + return NetworkCreateRequestFromJSONTyped(json, false); } -export function NetworkCreateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkCreateRequest { - if (json == null) { - return json; - } - return { - Name: json["Name"], - CheckDuplicate: json["CheckDuplicate"] == null ? undefined : json["CheckDuplicate"], - Driver: json["Driver"] == null ? undefined : json["Driver"], - Scope: json["Scope"] == null ? undefined : json["Scope"], - Internal: json["Internal"] == null ? undefined : json["Internal"], - Attachable: json["Attachable"] == null ? undefined : json["Attachable"], - Ingress: json["Ingress"] == null ? undefined : json["Ingress"], - ConfigOnly: json["ConfigOnly"] == null ? undefined : json["ConfigOnly"], - ConfigFrom: - json["ConfigFrom"] == null ? undefined : ConfigReferenceFromJSON(json["ConfigFrom"]), - IPAM: json["IPAM"] == null ? undefined : IPAMFromJSON(json["IPAM"]), - EnableIPv6: json["EnableIPv6"] == null ? undefined : json["EnableIPv6"], - Options: json["Options"] == null ? undefined : json["Options"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - }; +export function NetworkCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkCreateRequest { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'CheckDuplicate': json['CheckDuplicate'] == null ? undefined : json['CheckDuplicate'], + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'Scope': json['Scope'] == null ? undefined : json['Scope'], + 'Internal': json['Internal'] == null ? undefined : json['Internal'], + 'Attachable': json['Attachable'] == null ? undefined : json['Attachable'], + 'Ingress': json['Ingress'] == null ? undefined : json['Ingress'], + 'ConfigOnly': json['ConfigOnly'] == null ? undefined : json['ConfigOnly'], + 'ConfigFrom': json['ConfigFrom'] == null ? undefined : ConfigReferenceFromJSON(json['ConfigFrom']), + 'IPAM': json['IPAM'] == null ? undefined : IPAMFromJSON(json['IPAM']), + 'EnableIPv6': json['EnableIPv6'] == null ? undefined : json['EnableIPv6'], + 'Options': json['Options'] == null ? undefined : json['Options'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + }; } export function NetworkCreateRequestToJSON(json: any): NetworkCreateRequest { - return NetworkCreateRequestToJSONTyped(json, false); + return NetworkCreateRequestToJSONTyped(json, false); } -export function NetworkCreateRequestToJSONTyped( - value?: NetworkCreateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkCreateRequestToJSONTyped(value?: NetworkCreateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - CheckDuplicate: value["CheckDuplicate"], - Driver: value["Driver"], - Scope: value["Scope"], - Internal: value["Internal"], - Attachable: value["Attachable"], - Ingress: value["Ingress"], - ConfigOnly: value["ConfigOnly"], - ConfigFrom: ConfigReferenceToJSON(value["ConfigFrom"]), - IPAM: IPAMToJSON(value["IPAM"]), - EnableIPv6: value["EnableIPv6"], - Options: value["Options"], - Labels: value["Labels"], - }; + return { + + 'Name': value['Name'], + 'CheckDuplicate': value['CheckDuplicate'], + 'Driver': value['Driver'], + 'Scope': value['Scope'], + 'Internal': value['Internal'], + 'Attachable': value['Attachable'], + 'Ingress': value['Ingress'], + 'ConfigOnly': value['ConfigOnly'], + 'ConfigFrom': ConfigReferenceToJSON(value['ConfigFrom']), + 'IPAM': IPAMToJSON(value['IPAM']), + 'EnableIPv6': value['EnableIPv6'], + 'Options': value['Options'], + 'Labels': value['Labels'], + }; } + diff --git a/src/clients/docker/models/NetworkCreateResponse.ts b/src/clients/docker/models/NetworkCreateResponse.ts index d5fe14fb85..620fcdde45 100644 --- a/src/clients/docker/models/NetworkCreateResponse.ts +++ b/src/clients/docker/models/NetworkCreateResponse.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface NetworkCreateResponse */ export interface NetworkCreateResponse { - /** - * The ID of the created network. - * @type {string} - * @memberof NetworkCreateResponse - */ - Id?: string; - /** - * - * @type {string} - * @memberof NetworkCreateResponse - */ - Warning?: string; + /** + * The ID of the created network. + * @type {string} + * @memberof NetworkCreateResponse + */ + Id?: string; + /** + * + * @type {string} + * @memberof NetworkCreateResponse + */ + Warning?: string; } /** * Check if a given object implements the NetworkCreateResponse interface. */ export function instanceOfNetworkCreateResponse(value: object): value is NetworkCreateResponse { - return true; + return true; } export function NetworkCreateResponseFromJSON(json: any): NetworkCreateResponse { - return NetworkCreateResponseFromJSONTyped(json, false); + return NetworkCreateResponseFromJSONTyped(json, false); } -export function NetworkCreateResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkCreateResponse { - if (json == null) { - return json; - } - return { - Id: json["Id"] == null ? undefined : json["Id"], - Warning: json["Warning"] == null ? undefined : json["Warning"], - }; +export function NetworkCreateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkCreateResponse { + if (json == null) { + return json; + } + return { + + 'Id': json['Id'] == null ? undefined : json['Id'], + 'Warning': json['Warning'] == null ? undefined : json['Warning'], + }; } export function NetworkCreateResponseToJSON(json: any): NetworkCreateResponse { - return NetworkCreateResponseToJSONTyped(json, false); + return NetworkCreateResponseToJSONTyped(json, false); } -export function NetworkCreateResponseToJSONTyped( - value?: NetworkCreateResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkCreateResponseToJSONTyped(value?: NetworkCreateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - Warning: value["Warning"], - }; + return { + + 'Id': value['Id'], + 'Warning': value['Warning'], + }; } + diff --git a/src/clients/docker/models/NetworkDisconnectRequest.ts b/src/clients/docker/models/NetworkDisconnectRequest.ts index beda891bf3..d412bface8 100644 --- a/src/clients/docker/models/NetworkDisconnectRequest.ts +++ b/src/clients/docker/models/NetworkDisconnectRequest.ts @@ -2,79 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface NetworkDisconnectRequest */ export interface NetworkDisconnectRequest { - /** - * The ID or name of the container to disconnect from the network. - * - * @type {string} - * @memberof NetworkDisconnectRequest - */ - Container?: string; - /** - * Force the container to disconnect from the network. - * - * @type {boolean} - * @memberof NetworkDisconnectRequest - */ - Force?: boolean; + /** + * The ID or name of the container to disconnect from the network. + * + * @type {string} + * @memberof NetworkDisconnectRequest + */ + Container?: string; + /** + * Force the container to disconnect from the network. + * + * @type {boolean} + * @memberof NetworkDisconnectRequest + */ + Force?: boolean; } /** * Check if a given object implements the NetworkDisconnectRequest interface. */ -export function instanceOfNetworkDisconnectRequest( - value: object, -): value is NetworkDisconnectRequest { - return true; +export function instanceOfNetworkDisconnectRequest(value: object): value is NetworkDisconnectRequest { + return true; } export function NetworkDisconnectRequestFromJSON(json: any): NetworkDisconnectRequest { - return NetworkDisconnectRequestFromJSONTyped(json, false); + return NetworkDisconnectRequestFromJSONTyped(json, false); } -export function NetworkDisconnectRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkDisconnectRequest { - if (json == null) { - return json; - } - return { - Container: json["Container"] == null ? undefined : json["Container"], - Force: json["Force"] == null ? undefined : json["Force"], - }; +export function NetworkDisconnectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkDisconnectRequest { + if (json == null) { + return json; + } + return { + + 'Container': json['Container'] == null ? undefined : json['Container'], + 'Force': json['Force'] == null ? undefined : json['Force'], + }; } export function NetworkDisconnectRequestToJSON(json: any): NetworkDisconnectRequest { - return NetworkDisconnectRequestToJSONTyped(json, false); + return NetworkDisconnectRequestToJSONTyped(json, false); } -export function NetworkDisconnectRequestToJSONTyped( - value?: NetworkDisconnectRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkDisconnectRequestToJSONTyped(value?: NetworkDisconnectRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Container: value["Container"], - Force: value["Force"], - }; + return { + + 'Container': value['Container'], + 'Force': value['Force'], + }; } + diff --git a/src/clients/docker/models/NetworkPruneResponse.ts b/src/clients/docker/models/NetworkPruneResponse.ts index 5210e325ec..3423d03748 100644 --- a/src/clients/docker/models/NetworkPruneResponse.ts +++ b/src/clients/docker/models/NetworkPruneResponse.ts @@ -2,67 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface NetworkPruneResponse */ export interface NetworkPruneResponse { - /** - * Networks that were deleted - * @type {Array} - * @memberof NetworkPruneResponse - */ - NetworksDeleted?: Array; + /** + * Networks that were deleted + * @type {Array} + * @memberof NetworkPruneResponse + */ + NetworksDeleted?: Array; } /** * Check if a given object implements the NetworkPruneResponse interface. */ export function instanceOfNetworkPruneResponse(value: object): value is NetworkPruneResponse { - return true; + return true; } export function NetworkPruneResponseFromJSON(json: any): NetworkPruneResponse { - return NetworkPruneResponseFromJSONTyped(json, false); + return NetworkPruneResponseFromJSONTyped(json, false); } -export function NetworkPruneResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkPruneResponse { - if (json == null) { - return json; - } - return { - NetworksDeleted: json["NetworksDeleted"] == null ? undefined : json["NetworksDeleted"], - }; +export function NetworkPruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkPruneResponse { + if (json == null) { + return json; + } + return { + + 'NetworksDeleted': json['NetworksDeleted'] == null ? undefined : json['NetworksDeleted'], + }; } export function NetworkPruneResponseToJSON(json: any): NetworkPruneResponse { - return NetworkPruneResponseToJSONTyped(json, false); + return NetworkPruneResponseToJSONTyped(json, false); } -export function NetworkPruneResponseToJSONTyped( - value?: NetworkPruneResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkPruneResponseToJSONTyped(value?: NetworkPruneResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NetworksDeleted: value["NetworksDeleted"], - }; + return { + + 'NetworksDeleted': value['NetworksDeleted'], + }; } + diff --git a/src/clients/docker/models/NetworkSettings.ts b/src/clients/docker/models/NetworkSettings.ts index cfb2a3c1ee..3770d62aae 100644 --- a/src/clients/docker/models/NetworkSettings.ts +++ b/src/clients/docker/models/NetworkSettings.ts @@ -2,38 +2,38 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PortBinding } from "./PortBinding"; +import { mapValues } from '../runtime'; +import type { PortBinding } from './PortBinding'; import { - PortBindingFromJSON, - PortBindingFromJSONTyped, - PortBindingToJSON, - PortBindingToJSONTyped, -} from "./PortBinding"; -import type { Address } from "./Address"; + PortBindingFromJSON, + PortBindingFromJSONTyped, + PortBindingToJSON, + PortBindingToJSONTyped, +} from './PortBinding'; +import type { Address } from './Address'; import { - AddressFromJSON, - AddressFromJSONTyped, - AddressToJSON, - AddressToJSONTyped, -} from "./Address"; -import type { EndpointSettings } from "./EndpointSettings"; + AddressFromJSON, + AddressFromJSONTyped, + AddressToJSON, + AddressToJSONTyped, +} from './Address'; +import type { EndpointSettings } from './EndpointSettings'; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from "./EndpointSettings"; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from './EndpointSettings'; /** * NetworkSettings exposes the network settings in the API @@ -41,283 +41,263 @@ import { * @interface NetworkSettings */ export interface NetworkSettings { - /** - * Name of the network's bridge (for example, `docker0`). - * @type {string} - * @memberof NetworkSettings - */ - Bridge?: string; - /** - * SandboxID uniquely represents a container's network stack. - * @type {string} - * @memberof NetworkSettings - */ - SandboxID?: string; - /** - * Indicates if hairpin NAT should be enabled on the virtual interface. - * - * @type {boolean} - * @memberof NetworkSettings - */ - HairpinMode?: boolean; - /** - * IPv6 unicast address using the link-local prefix. - * @type {string} - * @memberof NetworkSettings - */ - LinkLocalIPv6Address?: string; - /** - * Prefix length of the IPv6 unicast address. - * @type {number} - * @memberof NetworkSettings - */ - LinkLocalIPv6PrefixLen?: number; - /** - * PortMap describes the mapping of container ports to host ports, using the - * container's port-number and protocol as key in the format `/`, - * for example, `80/udp`. - * - * If a container's port is mapped for multiple protocols, separate entries - * are added to the mapping table. - * - * @type {{ [key: string]: Array | null; }} - * @memberof NetworkSettings - */ - Ports?: { [key: string]: Array | null }; - /** - * SandboxKey identifies the sandbox - * @type {string} - * @memberof NetworkSettings - */ - SandboxKey?: string; - /** - * - * @type {Array
} - * @memberof NetworkSettings - */ - SecondaryIPAddresses?: Array
| null; - /** - * - * @type {Array
} - * @memberof NetworkSettings - */ - SecondaryIPv6Addresses?: Array
| null; - /** - * EndpointID uniquely represents a service endpoint in a Sandbox. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - EndpointID?: string; - /** - * Gateway address for the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - Gateway?: string; - /** - * Global IPv6 address for the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - GlobalIPv6Address?: string; - /** - * Mask length of the global IPv6 address. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {number} - * @memberof NetworkSettings - */ - GlobalIPv6PrefixLen?: number; - /** - * IPv4 address for the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - IPAddress?: string; - /** - * Mask length of the IPv4 address. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {number} - * @memberof NetworkSettings - */ - IPPrefixLen?: number; - /** - * IPv6 gateway address for this network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - IPv6Gateway?: string; - /** - * MAC address for the container on the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - MacAddress?: string; - /** - * Information about all networks that the container is connected to. - * - * @type {{ [key: string]: EndpointSettings; }} - * @memberof NetworkSettings - */ - Networks?: { [key: string]: EndpointSettings }; + /** + * Name of the network's bridge (for example, `docker0`). + * @type {string} + * @memberof NetworkSettings + */ + Bridge?: string; + /** + * SandboxID uniquely represents a container's network stack. + * @type {string} + * @memberof NetworkSettings + */ + SandboxID?: string; + /** + * Indicates if hairpin NAT should be enabled on the virtual interface. + * + * @type {boolean} + * @memberof NetworkSettings + */ + HairpinMode?: boolean; + /** + * IPv6 unicast address using the link-local prefix. + * @type {string} + * @memberof NetworkSettings + */ + LinkLocalIPv6Address?: string; + /** + * Prefix length of the IPv6 unicast address. + * @type {number} + * @memberof NetworkSettings + */ + LinkLocalIPv6PrefixLen?: number; + /** + * PortMap describes the mapping of container ports to host ports, using the + * container's port-number and protocol as key in the format `/`, + * for example, `80/udp`. + * + * If a container's port is mapped for multiple protocols, separate entries + * are added to the mapping table. + * + * @type {{ [key: string]: Array | null; }} + * @memberof NetworkSettings + */ + Ports?: { [key: string]: Array | null; }; + /** + * SandboxKey identifies the sandbox + * @type {string} + * @memberof NetworkSettings + */ + SandboxKey?: string; + /** + * + * @type {Array
} + * @memberof NetworkSettings + */ + SecondaryIPAddresses?: Array
| null; + /** + * + * @type {Array
} + * @memberof NetworkSettings + */ + SecondaryIPv6Addresses?: Array
| null; + /** + * EndpointID uniquely represents a service endpoint in a Sandbox. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + EndpointID?: string; + /** + * Gateway address for the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + Gateway?: string; + /** + * Global IPv6 address for the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + GlobalIPv6Address?: string; + /** + * Mask length of the global IPv6 address. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {number} + * @memberof NetworkSettings + */ + GlobalIPv6PrefixLen?: number; + /** + * IPv4 address for the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + IPAddress?: string; + /** + * Mask length of the IPv4 address. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {number} + * @memberof NetworkSettings + */ + IPPrefixLen?: number; + /** + * IPv6 gateway address for this network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + IPv6Gateway?: string; + /** + * MAC address for the container on the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + MacAddress?: string; + /** + * Information about all networks that the container is connected to. + * + * @type {{ [key: string]: EndpointSettings; }} + * @memberof NetworkSettings + */ + Networks?: { [key: string]: EndpointSettings; }; } /** * Check if a given object implements the NetworkSettings interface. */ export function instanceOfNetworkSettings(value: object): value is NetworkSettings { - return true; + return true; } export function NetworkSettingsFromJSON(json: any): NetworkSettings { - return NetworkSettingsFromJSONTyped(json, false); + return NetworkSettingsFromJSONTyped(json, false); } -export function NetworkSettingsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkSettings { - if (json == null) { - return json; - } - return { - Bridge: json["Bridge"] == null ? undefined : json["Bridge"], - SandboxID: json["SandboxID"] == null ? undefined : json["SandboxID"], - HairpinMode: json["HairpinMode"] == null ? undefined : json["HairpinMode"], - LinkLocalIPv6Address: - json["LinkLocalIPv6Address"] == null ? undefined : json["LinkLocalIPv6Address"], - LinkLocalIPv6PrefixLen: - json["LinkLocalIPv6PrefixLen"] == null ? undefined : json["LinkLocalIPv6PrefixLen"], - Ports: json["Ports"] == null ? undefined : json["Ports"], - SandboxKey: json["SandboxKey"] == null ? undefined : json["SandboxKey"], - SecondaryIPAddresses: - json["SecondaryIPAddresses"] == null - ? undefined - : (json["SecondaryIPAddresses"] as Array).map(AddressFromJSON), - SecondaryIPv6Addresses: - json["SecondaryIPv6Addresses"] == null - ? undefined - : (json["SecondaryIPv6Addresses"] as Array).map(AddressFromJSON), - EndpointID: json["EndpointID"] == null ? undefined : json["EndpointID"], - Gateway: json["Gateway"] == null ? undefined : json["Gateway"], - GlobalIPv6Address: json["GlobalIPv6Address"] == null ? undefined : json["GlobalIPv6Address"], - GlobalIPv6PrefixLen: - json["GlobalIPv6PrefixLen"] == null ? undefined : json["GlobalIPv6PrefixLen"], - IPAddress: json["IPAddress"] == null ? undefined : json["IPAddress"], - IPPrefixLen: json["IPPrefixLen"] == null ? undefined : json["IPPrefixLen"], - IPv6Gateway: json["IPv6Gateway"] == null ? undefined : json["IPv6Gateway"], - MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], - Networks: - json["Networks"] == null ? undefined : mapValues(json["Networks"], EndpointSettingsFromJSON), - }; +export function NetworkSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkSettings { + if (json == null) { + return json; + } + return { + + 'Bridge': json['Bridge'] == null ? undefined : json['Bridge'], + 'SandboxID': json['SandboxID'] == null ? undefined : json['SandboxID'], + 'HairpinMode': json['HairpinMode'] == null ? undefined : json['HairpinMode'], + 'LinkLocalIPv6Address': json['LinkLocalIPv6Address'] == null ? undefined : json['LinkLocalIPv6Address'], + 'LinkLocalIPv6PrefixLen': json['LinkLocalIPv6PrefixLen'] == null ? undefined : json['LinkLocalIPv6PrefixLen'], + 'Ports': json['Ports'] == null ? undefined : json['Ports'], + 'SandboxKey': json['SandboxKey'] == null ? undefined : json['SandboxKey'], + 'SecondaryIPAddresses': json['SecondaryIPAddresses'] == null ? undefined : ((json['SecondaryIPAddresses'] as Array).map(AddressFromJSON)), + 'SecondaryIPv6Addresses': json['SecondaryIPv6Addresses'] == null ? undefined : ((json['SecondaryIPv6Addresses'] as Array).map(AddressFromJSON)), + 'EndpointID': json['EndpointID'] == null ? undefined : json['EndpointID'], + 'Gateway': json['Gateway'] == null ? undefined : json['Gateway'], + 'GlobalIPv6Address': json['GlobalIPv6Address'] == null ? undefined : json['GlobalIPv6Address'], + 'GlobalIPv6PrefixLen': json['GlobalIPv6PrefixLen'] == null ? undefined : json['GlobalIPv6PrefixLen'], + 'IPAddress': json['IPAddress'] == null ? undefined : json['IPAddress'], + 'IPPrefixLen': json['IPPrefixLen'] == null ? undefined : json['IPPrefixLen'], + 'IPv6Gateway': json['IPv6Gateway'] == null ? undefined : json['IPv6Gateway'], + 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], + 'Networks': json['Networks'] == null ? undefined : (mapValues(json['Networks'], EndpointSettingsFromJSON)), + }; } export function NetworkSettingsToJSON(json: any): NetworkSettings { - return NetworkSettingsToJSONTyped(json, false); + return NetworkSettingsToJSONTyped(json, false); } -export function NetworkSettingsToJSONTyped( - value?: NetworkSettings | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkSettingsToJSONTyped(value?: NetworkSettings | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Bridge: value["Bridge"], - SandboxID: value["SandboxID"], - HairpinMode: value["HairpinMode"], - LinkLocalIPv6Address: value["LinkLocalIPv6Address"], - LinkLocalIPv6PrefixLen: value["LinkLocalIPv6PrefixLen"], - Ports: value["Ports"], - SandboxKey: value["SandboxKey"], - SecondaryIPAddresses: - value["SecondaryIPAddresses"] == null - ? undefined - : (value["SecondaryIPAddresses"] as Array).map(AddressToJSON), - SecondaryIPv6Addresses: - value["SecondaryIPv6Addresses"] == null - ? undefined - : (value["SecondaryIPv6Addresses"] as Array).map(AddressToJSON), - EndpointID: value["EndpointID"], - Gateway: value["Gateway"], - GlobalIPv6Address: value["GlobalIPv6Address"], - GlobalIPv6PrefixLen: value["GlobalIPv6PrefixLen"], - IPAddress: value["IPAddress"], - IPPrefixLen: value["IPPrefixLen"], - IPv6Gateway: value["IPv6Gateway"], - MacAddress: value["MacAddress"], - Networks: - value["Networks"] == null ? undefined : mapValues(value["Networks"], EndpointSettingsToJSON), - }; + return { + + 'Bridge': value['Bridge'], + 'SandboxID': value['SandboxID'], + 'HairpinMode': value['HairpinMode'], + 'LinkLocalIPv6Address': value['LinkLocalIPv6Address'], + 'LinkLocalIPv6PrefixLen': value['LinkLocalIPv6PrefixLen'], + 'Ports': value['Ports'], + 'SandboxKey': value['SandboxKey'], + 'SecondaryIPAddresses': value['SecondaryIPAddresses'] == null ? undefined : ((value['SecondaryIPAddresses'] as Array).map(AddressToJSON)), + 'SecondaryIPv6Addresses': value['SecondaryIPv6Addresses'] == null ? undefined : ((value['SecondaryIPv6Addresses'] as Array).map(AddressToJSON)), + 'EndpointID': value['EndpointID'], + 'Gateway': value['Gateway'], + 'GlobalIPv6Address': value['GlobalIPv6Address'], + 'GlobalIPv6PrefixLen': value['GlobalIPv6PrefixLen'], + 'IPAddress': value['IPAddress'], + 'IPPrefixLen': value['IPPrefixLen'], + 'IPv6Gateway': value['IPv6Gateway'], + 'MacAddress': value['MacAddress'], + 'Networks': value['Networks'] == null ? undefined : (mapValues(value['Networks'], EndpointSettingsToJSON)), + }; } + diff --git a/src/clients/docker/models/NetworkingConfig.ts b/src/clients/docker/models/NetworkingConfig.ts index d5afd00598..957708513d 100644 --- a/src/clients/docker/models/NetworkingConfig.ts +++ b/src/clients/docker/models/NetworkingConfig.ts @@ -2,86 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EndpointSettings } from "./EndpointSettings"; +import { mapValues } from '../runtime'; +import type { EndpointSettings } from './EndpointSettings'; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from "./EndpointSettings"; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from './EndpointSettings'; /** * 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. - * + * * @export * @interface NetworkingConfig */ export interface NetworkingConfig { - /** - * A mapping of network name to endpoint configuration for that network. - * - * @type {{ [key: string]: EndpointSettings; }} - * @memberof NetworkingConfig - */ - EndpointsConfig?: { [key: string]: EndpointSettings }; + /** + * A mapping of network name to endpoint configuration for that network. + * + * @type {{ [key: string]: EndpointSettings; }} + * @memberof NetworkingConfig + */ + EndpointsConfig?: { [key: string]: EndpointSettings; }; } /** * Check if a given object implements the NetworkingConfig interface. */ export function instanceOfNetworkingConfig(value: object): value is NetworkingConfig { - return true; + return true; } export function NetworkingConfigFromJSON(json: any): NetworkingConfig { - return NetworkingConfigFromJSONTyped(json, false); + return NetworkingConfigFromJSONTyped(json, false); } -export function NetworkingConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NetworkingConfig { - if (json == null) { - return json; - } - return { - EndpointsConfig: - json["EndpointsConfig"] == null - ? undefined - : mapValues(json["EndpointsConfig"], EndpointSettingsFromJSON), - }; +export function NetworkingConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkingConfig { + if (json == null) { + return json; + } + return { + + 'EndpointsConfig': json['EndpointsConfig'] == null ? undefined : (mapValues(json['EndpointsConfig'], EndpointSettingsFromJSON)), + }; } export function NetworkingConfigToJSON(json: any): NetworkingConfig { - return NetworkingConfigToJSONTyped(json, false); + return NetworkingConfigToJSONTyped(json, false); } -export function NetworkingConfigToJSONTyped( - value?: NetworkingConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NetworkingConfigToJSONTyped(value?: NetworkingConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - EndpointsConfig: - value["EndpointsConfig"] == null - ? undefined - : mapValues(value["EndpointsConfig"], EndpointSettingsToJSON), - }; + return { + + 'EndpointsConfig': value['EndpointsConfig'] == null ? undefined : (mapValues(value['EndpointsConfig'], EndpointSettingsToJSON)), + }; } + diff --git a/src/clients/docker/models/Node.ts b/src/clients/docker/models/Node.ts index f88651c29b..8c413fa05c 100644 --- a/src/clients/docker/models/Node.ts +++ b/src/clients/docker/models/Node.ts @@ -2,159 +2,160 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { NodeDescription } from "./NodeDescription"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { NodeDescription } from './NodeDescription'; import { - NodeDescriptionFromJSON, - NodeDescriptionFromJSONTyped, - NodeDescriptionToJSON, - NodeDescriptionToJSONTyped, -} from "./NodeDescription"; -import type { ManagerStatus } from "./ManagerStatus"; + NodeDescriptionFromJSON, + NodeDescriptionFromJSONTyped, + NodeDescriptionToJSON, + NodeDescriptionToJSONTyped, +} from './NodeDescription'; +import type { ManagerStatus } from './ManagerStatus'; import { - ManagerStatusFromJSON, - ManagerStatusFromJSONTyped, - ManagerStatusToJSON, - ManagerStatusToJSONTyped, -} from "./ManagerStatus"; -import type { NodeSpec } from "./NodeSpec"; + ManagerStatusFromJSON, + ManagerStatusFromJSONTyped, + ManagerStatusToJSON, + ManagerStatusToJSONTyped, +} from './ManagerStatus'; +import type { NodeSpec } from './NodeSpec'; import { - NodeSpecFromJSON, - NodeSpecFromJSONTyped, - NodeSpecToJSON, - NodeSpecToJSONTyped, -} from "./NodeSpec"; -import type { NodeStatus } from "./NodeStatus"; + NodeSpecFromJSON, + NodeSpecFromJSONTyped, + NodeSpecToJSON, + NodeSpecToJSONTyped, +} from './NodeSpec'; +import type { NodeStatus } from './NodeStatus'; import { - NodeStatusFromJSON, - NodeStatusFromJSONTyped, - NodeStatusToJSON, - NodeStatusToJSONTyped, -} from "./NodeStatus"; + NodeStatusFromJSON, + NodeStatusFromJSONTyped, + NodeStatusToJSON, + NodeStatusToJSONTyped, +} from './NodeStatus'; /** - * + * * @export * @interface Node */ export interface Node { - /** - * - * @type {string} - * @memberof Node - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Node - */ - Version?: ObjectVersion; - /** - * Date and time at which the node was added to the swarm in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Node - */ - CreatedAt?: string; - /** - * Date and time at which the node was last updated in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Node - */ - UpdatedAt?: string; - /** - * - * @type {NodeSpec} - * @memberof Node - */ - Spec?: NodeSpec; - /** - * - * @type {NodeDescription} - * @memberof Node - */ - Description?: NodeDescription; - /** - * - * @type {NodeStatus} - * @memberof Node - */ - Status?: NodeStatus; - /** - * - * @type {ManagerStatus} - * @memberof Node - */ - ManagerStatus?: ManagerStatus | null; + /** + * + * @type {string} + * @memberof Node + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Node + */ + Version?: ObjectVersion; + /** + * Date and time at which the node was added to the swarm in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Node + */ + CreatedAt?: string; + /** + * Date and time at which the node was last updated in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Node + */ + UpdatedAt?: string; + /** + * + * @type {NodeSpec} + * @memberof Node + */ + Spec?: NodeSpec; + /** + * + * @type {NodeDescription} + * @memberof Node + */ + Description?: NodeDescription; + /** + * + * @type {NodeStatus} + * @memberof Node + */ + Status?: NodeStatus; + /** + * + * @type {ManagerStatus} + * @memberof Node + */ + ManagerStatus?: ManagerStatus | null; } /** * Check if a given object implements the Node interface. */ export function instanceOfNode(value: object): value is Node { - return true; + return true; } export function NodeFromJSON(json: any): Node { - return NodeFromJSONTyped(json, false); + return NodeFromJSONTyped(json, false); } export function NodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Node { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : NodeSpecFromJSON(json["Spec"]), - Description: - json["Description"] == null ? undefined : NodeDescriptionFromJSON(json["Description"]), - Status: json["Status"] == null ? undefined : NodeStatusFromJSON(json["Status"]), - ManagerStatus: - json["ManagerStatus"] == null ? undefined : ManagerStatusFromJSON(json["ManagerStatus"]), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : NodeSpecFromJSON(json['Spec']), + 'Description': json['Description'] == null ? undefined : NodeDescriptionFromJSON(json['Description']), + 'Status': json['Status'] == null ? undefined : NodeStatusFromJSON(json['Status']), + 'ManagerStatus': json['ManagerStatus'] == null ? undefined : ManagerStatusFromJSON(json['ManagerStatus']), + }; } export function NodeToJSON(json: any): Node { - return NodeToJSONTyped(json, false); + return NodeToJSONTyped(json, false); } export function NodeToJSONTyped(value?: Node | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: NodeSpecToJSON(value["Spec"]), - Description: NodeDescriptionToJSON(value["Description"]), - Status: NodeStatusToJSON(value["Status"]), - ManagerStatus: ManagerStatusToJSON(value["ManagerStatus"]), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': NodeSpecToJSON(value['Spec']), + 'Description': NodeDescriptionToJSON(value['Description']), + 'Status': NodeStatusToJSON(value['Status']), + 'ManagerStatus': ManagerStatusToJSON(value['ManagerStatus']), + }; } + diff --git a/src/clients/docker/models/NodeDescription.ts b/src/clients/docker/models/NodeDescription.ts index e730e86f96..d808df8a79 100644 --- a/src/clients/docker/models/NodeDescription.ts +++ b/src/clients/docker/models/NodeDescription.ts @@ -2,130 +2,127 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceObject } from "./ResourceObject"; +import { mapValues } from '../runtime'; +import type { ResourceObject } from './ResourceObject'; import { - ResourceObjectFromJSON, - ResourceObjectFromJSONTyped, - ResourceObjectToJSON, - ResourceObjectToJSONTyped, -} from "./ResourceObject"; -import type { Platform } from "./Platform"; + ResourceObjectFromJSON, + ResourceObjectFromJSONTyped, + ResourceObjectToJSON, + ResourceObjectToJSONTyped, +} from './ResourceObject'; +import type { Platform } from './Platform'; import { - PlatformFromJSON, - PlatformFromJSONTyped, - PlatformToJSON, - PlatformToJSONTyped, -} from "./Platform"; -import type { TLSInfo } from "./TLSInfo"; + PlatformFromJSON, + PlatformFromJSONTyped, + PlatformToJSON, + PlatformToJSONTyped, +} from './Platform'; +import type { TLSInfo } from './TLSInfo'; import { - TLSInfoFromJSON, - TLSInfoFromJSONTyped, - TLSInfoToJSON, - TLSInfoToJSONTyped, -} from "./TLSInfo"; -import type { EngineDescription } from "./EngineDescription"; + TLSInfoFromJSON, + TLSInfoFromJSONTyped, + TLSInfoToJSON, + TLSInfoToJSONTyped, +} from './TLSInfo'; +import type { EngineDescription } from './EngineDescription'; import { - EngineDescriptionFromJSON, - EngineDescriptionFromJSONTyped, - EngineDescriptionToJSON, - EngineDescriptionToJSONTyped, -} from "./EngineDescription"; + EngineDescriptionFromJSON, + EngineDescriptionFromJSONTyped, + EngineDescriptionToJSON, + EngineDescriptionToJSONTyped, +} from './EngineDescription'; /** * NodeDescription encapsulates the properties of the Node as reported by the * agent. - * + * * @export * @interface NodeDescription */ export interface NodeDescription { - /** - * - * @type {string} - * @memberof NodeDescription - */ - Hostname?: string; - /** - * - * @type {Platform} - * @memberof NodeDescription - */ - Platform?: Platform; - /** - * - * @type {ResourceObject} - * @memberof NodeDescription - */ - Resources?: ResourceObject; - /** - * - * @type {EngineDescription} - * @memberof NodeDescription - */ - Engine?: EngineDescription; - /** - * - * @type {TLSInfo} - * @memberof NodeDescription - */ - TLSInfo?: TLSInfo; + /** + * + * @type {string} + * @memberof NodeDescription + */ + Hostname?: string; + /** + * + * @type {Platform} + * @memberof NodeDescription + */ + Platform?: Platform; + /** + * + * @type {ResourceObject} + * @memberof NodeDescription + */ + Resources?: ResourceObject; + /** + * + * @type {EngineDescription} + * @memberof NodeDescription + */ + Engine?: EngineDescription; + /** + * + * @type {TLSInfo} + * @memberof NodeDescription + */ + TLSInfo?: TLSInfo; } /** * Check if a given object implements the NodeDescription interface. */ export function instanceOfNodeDescription(value: object): value is NodeDescription { - return true; + return true; } export function NodeDescriptionFromJSON(json: any): NodeDescription { - return NodeDescriptionFromJSONTyped(json, false); + return NodeDescriptionFromJSONTyped(json, false); } -export function NodeDescriptionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): NodeDescription { - if (json == null) { - return json; - } - return { - Hostname: json["Hostname"] == null ? undefined : json["Hostname"], - Platform: json["Platform"] == null ? undefined : PlatformFromJSON(json["Platform"]), - Resources: json["Resources"] == null ? undefined : ResourceObjectFromJSON(json["Resources"]), - Engine: json["Engine"] == null ? undefined : EngineDescriptionFromJSON(json["Engine"]), - TLSInfo: json["TLSInfo"] == null ? undefined : TLSInfoFromJSON(json["TLSInfo"]), - }; +export function NodeDescriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeDescription { + if (json == null) { + return json; + } + return { + + 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], + 'Platform': json['Platform'] == null ? undefined : PlatformFromJSON(json['Platform']), + 'Resources': json['Resources'] == null ? undefined : ResourceObjectFromJSON(json['Resources']), + 'Engine': json['Engine'] == null ? undefined : EngineDescriptionFromJSON(json['Engine']), + 'TLSInfo': json['TLSInfo'] == null ? undefined : TLSInfoFromJSON(json['TLSInfo']), + }; } export function NodeDescriptionToJSON(json: any): NodeDescription { - return NodeDescriptionToJSONTyped(json, false); + return NodeDescriptionToJSONTyped(json, false); } -export function NodeDescriptionToJSONTyped( - value?: NodeDescription | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NodeDescriptionToJSONTyped(value?: NodeDescription | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Hostname: value["Hostname"], - Platform: PlatformToJSON(value["Platform"]), - Resources: ResourceObjectToJSON(value["Resources"]), - Engine: EngineDescriptionToJSON(value["Engine"]), - TLSInfo: TLSInfoToJSON(value["TLSInfo"]), - }; + return { + + 'Hostname': value['Hostname'], + 'Platform': PlatformToJSON(value['Platform']), + 'Resources': ResourceObjectToJSON(value['Resources']), + 'Engine': EngineDescriptionToJSON(value['Engine']), + 'TLSInfo': TLSInfoToJSON(value['TLSInfo']), + }; } + diff --git a/src/clients/docker/models/NodeSpec.ts b/src/clients/docker/models/NodeSpec.ts index 23d32250d8..d6cc89234f 100644 --- a/src/clients/docker/models/NodeSpec.ts +++ b/src/clients/docker/models/NodeSpec.ts @@ -2,106 +2,107 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface NodeSpec */ export interface NodeSpec { - /** - * Name for the node. - * @type {string} - * @memberof NodeSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof NodeSpec - */ - Labels?: { [key: string]: string }; - /** - * Role of the node. - * @type {string} - * @memberof NodeSpec - */ - Role?: NodeSpecRoleEnum; - /** - * Availability of the node. - * @type {string} - * @memberof NodeSpec - */ - Availability?: NodeSpecAvailabilityEnum; + /** + * Name for the node. + * @type {string} + * @memberof NodeSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof NodeSpec + */ + Labels?: { [key: string]: string; }; + /** + * Role of the node. + * @type {string} + * @memberof NodeSpec + */ + Role?: NodeSpecRoleEnum; + /** + * Availability of the node. + * @type {string} + * @memberof NodeSpec + */ + Availability?: NodeSpecAvailabilityEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum NodeSpecRoleEnum { - Worker = "worker", - Manager = "manager", + Worker = 'worker', + Manager = 'manager' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum NodeSpecAvailabilityEnum { - Active = "active", - Pause = "pause", - Drain = "drain", + Active = 'active', + Pause = 'pause', + Drain = 'drain' } + /** * Check if a given object implements the NodeSpec interface. */ export function instanceOfNodeSpec(value: object): value is NodeSpec { - return true; + return true; } export function NodeSpecFromJSON(json: any): NodeSpec { - return NodeSpecFromJSONTyped(json, false); + return NodeSpecFromJSONTyped(json, false); } export function NodeSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeSpec { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Role: json["Role"] == null ? undefined : json["Role"], - Availability: json["Availability"] == null ? undefined : json["Availability"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Role': json['Role'] == null ? undefined : json['Role'], + 'Availability': json['Availability'] == null ? undefined : json['Availability'], + }; } export function NodeSpecToJSON(json: any): NodeSpec { - return NodeSpecToJSONTyped(json, false); + return NodeSpecToJSONTyped(json, false); } -export function NodeSpecToJSONTyped( - value?: NodeSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NodeSpecToJSONTyped(value?: NodeSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - Role: value["Role"], - Availability: value["Availability"], - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Role': value['Role'], + 'Availability': value['Availability'], + }; } + diff --git a/src/clients/docker/models/NodeState.ts b/src/clients/docker/models/NodeState.ts index 8186326b78..4fbdf9d820 100644 --- a/src/clients/docker/models/NodeState.ts +++ b/src/clients/docker/models/NodeState.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,35 +18,37 @@ * @enum {string} */ export enum NodeState { - Unknown = "unknown", - Down = "down", - Ready = "ready", - Disconnected = "disconnected", + Unknown = 'unknown', + Down = 'down', + Ready = 'ready', + Disconnected = 'disconnected' } + export function instanceOfNodeState(value: any): boolean { - for (const key in NodeState) { - if (Object.prototype.hasOwnProperty.call(NodeState, key)) { - if (NodeState[key as keyof typeof NodeState] === value) { - return true; - } + for (const key in NodeState) { + if (Object.prototype.hasOwnProperty.call(NodeState, key)) { + if (NodeState[key as keyof typeof NodeState] === value) { + return true; + } + } } - } - return false; + return false; } export function NodeStateFromJSON(json: any): NodeState { - return NodeStateFromJSONTyped(json, false); + return NodeStateFromJSONTyped(json, false); } export function NodeStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeState { - return json as NodeState; + return json as NodeState; } export function NodeStateToJSON(value?: NodeState | null): any { - return value as any; + return value as any; } export function NodeStateToJSONTyped(value: any, ignoreDiscriminator: boolean): NodeState { - return value as NodeState; + return value as NodeState; } + diff --git a/src/clients/docker/models/NodeStatus.ts b/src/clients/docker/models/NodeStatus.ts index 687ac84c56..f7d9797b69 100644 --- a/src/clients/docker/models/NodeStatus.ts +++ b/src/clients/docker/models/NodeStatus.ts @@ -2,91 +2,93 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { NodeState } from "./NodeState"; +import { mapValues } from '../runtime'; +import type { NodeState } from './NodeState'; import { - NodeStateFromJSON, - NodeStateFromJSONTyped, - NodeStateToJSON, - NodeStateToJSONTyped, -} from "./NodeState"; + NodeStateFromJSON, + NodeStateFromJSONTyped, + NodeStateToJSON, + NodeStateToJSONTyped, +} from './NodeState'; /** * NodeStatus represents the status of a node. - * + * * It provides the current status of the node, as seen by the manager. - * + * * @export * @interface NodeStatus */ export interface NodeStatus { - /** - * - * @type {NodeState} - * @memberof NodeStatus - */ - State?: NodeState; - /** - * - * @type {string} - * @memberof NodeStatus - */ - Message?: string; - /** - * IP address of the node. - * @type {string} - * @memberof NodeStatus - */ - Addr?: string; + /** + * + * @type {NodeState} + * @memberof NodeStatus + */ + State?: NodeState; + /** + * + * @type {string} + * @memberof NodeStatus + */ + Message?: string; + /** + * IP address of the node. + * @type {string} + * @memberof NodeStatus + */ + Addr?: string; } + + /** * Check if a given object implements the NodeStatus interface. */ export function instanceOfNodeStatus(value: object): value is NodeStatus { - return true; + return true; } export function NodeStatusFromJSON(json: any): NodeStatus { - return NodeStatusFromJSONTyped(json, false); + return NodeStatusFromJSONTyped(json, false); } export function NodeStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeStatus { - if (json == null) { - return json; - } - return { - State: json["State"] == null ? undefined : NodeStateFromJSON(json["State"]), - Message: json["Message"] == null ? undefined : json["Message"], - Addr: json["Addr"] == null ? undefined : json["Addr"], - }; + if (json == null) { + return json; + } + return { + + 'State': json['State'] == null ? undefined : NodeStateFromJSON(json['State']), + 'Message': json['Message'] == null ? undefined : json['Message'], + 'Addr': json['Addr'] == null ? undefined : json['Addr'], + }; } export function NodeStatusToJSON(json: any): NodeStatus { - return NodeStatusToJSONTyped(json, false); + return NodeStatusToJSONTyped(json, false); } -export function NodeStatusToJSONTyped( - value?: NodeStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function NodeStatusToJSONTyped(value?: NodeStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - State: NodeStateToJSON(value["State"]), - Message: value["Message"], - Addr: value["Addr"], - }; + return { + + 'State': NodeStateToJSON(value['State']), + 'Message': value['Message'], + 'Addr': value['Addr'], + }; } + diff --git a/src/clients/docker/models/OCIDescriptor.ts b/src/clients/docker/models/OCIDescriptor.ts index 5d59063105..0a51f55123 100644 --- a/src/clients/docker/models/OCIDescriptor.ts +++ b/src/clients/docker/models/OCIDescriptor.ts @@ -2,85 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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). - * + * * @export * @interface OCIDescriptor */ export interface OCIDescriptor { - /** - * The media type of the object this schema refers to. - * - * @type {string} - * @memberof OCIDescriptor - */ - mediaType?: string; - /** - * The digest of the targeted content. - * - * @type {string} - * @memberof OCIDescriptor - */ - digest?: string; - /** - * The size in bytes of the blob. - * - * @type {number} - * @memberof OCIDescriptor - */ - size?: number; + /** + * The media type of the object this schema refers to. + * + * @type {string} + * @memberof OCIDescriptor + */ + mediaType?: string; + /** + * The digest of the targeted content. + * + * @type {string} + * @memberof OCIDescriptor + */ + digest?: string; + /** + * The size in bytes of the blob. + * + * @type {number} + * @memberof OCIDescriptor + */ + size?: number; } /** * Check if a given object implements the OCIDescriptor interface. */ export function instanceOfOCIDescriptor(value: object): value is OCIDescriptor { - return true; + return true; } export function OCIDescriptorFromJSON(json: any): OCIDescriptor { - return OCIDescriptorFromJSONTyped(json, false); + return OCIDescriptorFromJSONTyped(json, false); } export function OCIDescriptorFromJSONTyped(json: any, ignoreDiscriminator: boolean): OCIDescriptor { - if (json == null) { - return json; - } - return { - mediaType: json["mediaType"] == null ? undefined : json["mediaType"], - digest: json["digest"] == null ? undefined : json["digest"], - size: json["size"] == null ? undefined : json["size"], - }; + if (json == null) { + return json; + } + return { + + 'mediaType': json['mediaType'] == null ? undefined : json['mediaType'], + 'digest': json['digest'] == null ? undefined : json['digest'], + 'size': json['size'] == null ? undefined : json['size'], + }; } export function OCIDescriptorToJSON(json: any): OCIDescriptor { - return OCIDescriptorToJSONTyped(json, false); + return OCIDescriptorToJSONTyped(json, false); } -export function OCIDescriptorToJSONTyped( - value?: OCIDescriptor | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function OCIDescriptorToJSONTyped(value?: OCIDescriptor | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - mediaType: value["mediaType"], - digest: value["digest"], - size: value["size"], - }; + return { + + 'mediaType': value['mediaType'], + 'digest': value['digest'], + 'size': value['size'], + }; } + diff --git a/src/clients/docker/models/OCIPlatform.ts b/src/clients/docker/models/OCIPlatform.ts index b3e4108e0d..dc0af78e6c 100644 --- a/src/clients/docker/models/OCIPlatform.ts +++ b/src/clients/docker/models/OCIPlatform.ts @@ -2,106 +2,106 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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). - * + * * @export * @interface OCIPlatform */ export interface OCIPlatform { - /** - * The CPU architecture, for example `amd64` or `ppc64`. - * - * @type {string} - * @memberof OCIPlatform - */ - architecture?: string; - /** - * The operating system, for example `linux` or `windows`. - * - * @type {string} - * @memberof OCIPlatform - */ - os?: string; - /** - * Optional field specifying the operating system version, for example on - * Windows `10.0.19041.1165`. - * - * @type {string} - * @memberof OCIPlatform - */ - os_version?: string; - /** - * Optional field specifying an array of strings, each listing a required - * OS feature (for example on Windows `win32k`). - * - * @type {Array} - * @memberof OCIPlatform - */ - os_features?: Array; - /** - * Optional field specifying a variant of the CPU, for example `v7` to - * specify ARMv7 when architecture is `arm`. - * - * @type {string} - * @memberof OCIPlatform - */ - variant?: string; + /** + * The CPU architecture, for example `amd64` or `ppc64`. + * + * @type {string} + * @memberof OCIPlatform + */ + architecture?: string; + /** + * The operating system, for example `linux` or `windows`. + * + * @type {string} + * @memberof OCIPlatform + */ + os?: string; + /** + * Optional field specifying the operating system version, for example on + * Windows `10.0.19041.1165`. + * + * @type {string} + * @memberof OCIPlatform + */ + os_version?: string; + /** + * Optional field specifying an array of strings, each listing a required + * OS feature (for example on Windows `win32k`). + * + * @type {Array} + * @memberof OCIPlatform + */ + os_features?: Array; + /** + * Optional field specifying a variant of the CPU, for example `v7` to + * specify ARMv7 when architecture is `arm`. + * + * @type {string} + * @memberof OCIPlatform + */ + variant?: string; } /** * Check if a given object implements the OCIPlatform interface. */ export function instanceOfOCIPlatform(value: object): value is OCIPlatform { - return true; + return true; } export function OCIPlatformFromJSON(json: any): OCIPlatform { - return OCIPlatformFromJSONTyped(json, false); + return OCIPlatformFromJSONTyped(json, false); } export function OCIPlatformFromJSONTyped(json: any, ignoreDiscriminator: boolean): OCIPlatform { - if (json == null) { - return json; - } - return { - architecture: json["architecture"] == null ? undefined : json["architecture"], - os: json["os"] == null ? undefined : json["os"], - os_version: json["os.version"] == null ? undefined : json["os.version"], - os_features: json["os.features"] == null ? undefined : json["os.features"], - variant: json["variant"] == null ? undefined : json["variant"], - }; + if (json == null) { + return json; + } + return { + + 'architecture': json['architecture'] == null ? undefined : json['architecture'], + 'os': json['os'] == null ? undefined : json['os'], + 'os_version': json['os.version'] == null ? undefined : json['os.version'], + 'os_features': json['os.features'] == null ? undefined : json['os.features'], + 'variant': json['variant'] == null ? undefined : json['variant'], + }; } export function OCIPlatformToJSON(json: any): OCIPlatform { - return OCIPlatformToJSONTyped(json, false); + return OCIPlatformToJSONTyped(json, false); } -export function OCIPlatformToJSONTyped( - value?: OCIPlatform | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function OCIPlatformToJSONTyped(value?: OCIPlatform | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - architecture: value["architecture"], - os: value["os"], - "os.version": value["os_version"], - "os.features": value["os_features"], - variant: value["variant"], - }; + return { + + 'architecture': value['architecture'], + 'os': value['os'], + 'os.version': value['os_version'], + 'os.features': value['os_features'], + 'variant': value['variant'], + }; } + diff --git a/src/clients/docker/models/ObjectVersion.ts b/src/clients/docker/models/ObjectVersion.ts index 64f1193fab..0786143c5e 100644 --- a/src/clients/docker/models/ObjectVersion.ts +++ b/src/clients/docker/models/ObjectVersion.ts @@ -2,74 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface ObjectVersion */ export interface ObjectVersion { - /** - * - * @type {number} - * @memberof ObjectVersion - */ - _Index?: number; + /** + * + * @type {number} + * @memberof ObjectVersion + */ + _Index?: number; } /** * Check if a given object implements the ObjectVersion interface. */ export function instanceOfObjectVersion(value: object): value is ObjectVersion { - return true; + return true; } export function ObjectVersionFromJSON(json: any): ObjectVersion { - return ObjectVersionFromJSONTyped(json, false); + return ObjectVersionFromJSONTyped(json, false); } export function ObjectVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectVersion { - if (json == null) { - return json; - } - return { - _Index: json["Index"] == null ? undefined : json["Index"], - }; + if (json == null) { + return json; + } + return { + + '_Index': json['Index'] == null ? undefined : json['Index'], + }; } export function ObjectVersionToJSON(json: any): ObjectVersion { - return ObjectVersionToJSONTyped(json, false); + return ObjectVersionToJSONTyped(json, false); } -export function ObjectVersionToJSONTyped( - value?: ObjectVersion | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectVersionToJSONTyped(value?: ObjectVersion | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Index: value["_Index"], - }; + return { + + 'Index': value['_Index'], + }; } + diff --git a/src/clients/docker/models/PeerInfo.ts b/src/clients/docker/models/PeerInfo.ts index 9daf499334..37e394c513 100644 --- a/src/clients/docker/models/PeerInfo.ts +++ b/src/clients/docker/models/PeerInfo.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * PeerInfo represents one peer of an overlay network. - * + * * @export * @interface PeerInfo */ export interface PeerInfo { - /** - * ID of the peer-node in the Swarm cluster. - * @type {string} - * @memberof PeerInfo - */ - Name?: string; - /** - * IP-address of the peer-node in the Swarm cluster. - * @type {string} - * @memberof PeerInfo - */ - IP?: string; + /** + * ID of the peer-node in the Swarm cluster. + * @type {string} + * @memberof PeerInfo + */ + Name?: string; + /** + * IP-address of the peer-node in the Swarm cluster. + * @type {string} + * @memberof PeerInfo + */ + IP?: string; } /** * Check if a given object implements the PeerInfo interface. */ export function instanceOfPeerInfo(value: object): value is PeerInfo { - return true; + return true; } export function PeerInfoFromJSON(json: any): PeerInfo { - return PeerInfoFromJSONTyped(json, false); + return PeerInfoFromJSONTyped(json, false); } export function PeerInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PeerInfo { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - IP: json["IP"] == null ? undefined : json["IP"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'IP': json['IP'] == null ? undefined : json['IP'], + }; } export function PeerInfoToJSON(json: any): PeerInfo { - return PeerInfoToJSONTyped(json, false); + return PeerInfoToJSONTyped(json, false); } -export function PeerInfoToJSONTyped( - value?: PeerInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PeerInfoToJSONTyped(value?: PeerInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - IP: value["IP"], - }; + return { + + 'Name': value['Name'], + 'IP': value['IP'], + }; } + diff --git a/src/clients/docker/models/PeerNode.ts b/src/clients/docker/models/PeerNode.ts index 2a65002c63..6d472b00e3 100644 --- a/src/clients/docker/models/PeerNode.ts +++ b/src/clients/docker/models/PeerNode.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Represents a peer-node in the swarm * @export * @interface PeerNode */ export interface PeerNode { - /** - * Unique identifier of for this node in the swarm. - * @type {string} - * @memberof PeerNode - */ - NodeID?: string; - /** - * IP address and ports at which this node can be reached. - * - * @type {string} - * @memberof PeerNode - */ - Addr?: string; + /** + * Unique identifier of for this node in the swarm. + * @type {string} + * @memberof PeerNode + */ + NodeID?: string; + /** + * IP address and ports at which this node can be reached. + * + * @type {string} + * @memberof PeerNode + */ + Addr?: string; } /** * Check if a given object implements the PeerNode interface. */ export function instanceOfPeerNode(value: object): value is PeerNode { - return true; + return true; } export function PeerNodeFromJSON(json: any): PeerNode { - return PeerNodeFromJSONTyped(json, false); + return PeerNodeFromJSONTyped(json, false); } export function PeerNodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PeerNode { - if (json == null) { - return json; - } - return { - NodeID: json["NodeID"] == null ? undefined : json["NodeID"], - Addr: json["Addr"] == null ? undefined : json["Addr"], - }; + if (json == null) { + return json; + } + return { + + 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], + 'Addr': json['Addr'] == null ? undefined : json['Addr'], + }; } export function PeerNodeToJSON(json: any): PeerNode { - return PeerNodeToJSONTyped(json, false); + return PeerNodeToJSONTyped(json, false); } -export function PeerNodeToJSONTyped( - value?: PeerNode | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PeerNodeToJSONTyped(value?: PeerNode | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NodeID: value["NodeID"], - Addr: value["Addr"], - }; + return { + + 'NodeID': value['NodeID'], + 'Addr': value['Addr'], + }; } + diff --git a/src/clients/docker/models/Platform.ts b/src/clients/docker/models/Platform.ts index fa71b2810d..0b67fada77 100644 --- a/src/clients/docker/models/Platform.ts +++ b/src/clients/docker/models/Platform.ts @@ -2,76 +2,76 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Platform represents the platform (Arch/OS). - * + * * @export * @interface Platform */ export interface Platform { - /** - * Architecture represents the hardware architecture (for example, - * `x86_64`). - * - * @type {string} - * @memberof Platform - */ - Architecture?: string; - /** - * OS represents the Operating System (for example, `linux` or `windows`). - * - * @type {string} - * @memberof Platform - */ - OS?: string; + /** + * Architecture represents the hardware architecture (for example, + * `x86_64`). + * + * @type {string} + * @memberof Platform + */ + Architecture?: string; + /** + * OS represents the Operating System (for example, `linux` or `windows`). + * + * @type {string} + * @memberof Platform + */ + OS?: string; } /** * Check if a given object implements the Platform interface. */ export function instanceOfPlatform(value: object): value is Platform { - return true; + return true; } export function PlatformFromJSON(json: any): Platform { - return PlatformFromJSONTyped(json, false); + return PlatformFromJSONTyped(json, false); } export function PlatformFromJSONTyped(json: any, ignoreDiscriminator: boolean): Platform { - if (json == null) { - return json; - } - return { - Architecture: json["Architecture"] == null ? undefined : json["Architecture"], - OS: json["OS"] == null ? undefined : json["OS"], - }; + if (json == null) { + return json; + } + return { + + 'Architecture': json['Architecture'] == null ? undefined : json['Architecture'], + 'OS': json['OS'] == null ? undefined : json['OS'], + }; } export function PlatformToJSON(json: any): Platform { - return PlatformToJSONTyped(json, false); + return PlatformToJSONTyped(json, false); } -export function PlatformToJSONTyped( - value?: Platform | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PlatformToJSONTyped(value?: Platform | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Architecture: value["Architecture"], - OS: value["OS"], - }; + return { + + 'Architecture': value['Architecture'], + 'OS': value['OS'], + }; } + diff --git a/src/clients/docker/models/Plugin.ts b/src/clients/docker/models/Plugin.ts index c51b1e01bb..054f7b8de5 100644 --- a/src/clients/docker/models/Plugin.ts +++ b/src/clients/docker/models/Plugin.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginConfig } from "./PluginConfig"; +import { mapValues } from '../runtime'; +import type { PluginConfig } from './PluginConfig'; import { - PluginConfigFromJSON, - PluginConfigFromJSONTyped, - PluginConfigToJSON, - PluginConfigToJSONTyped, -} from "./PluginConfig"; -import type { PluginSettings } from "./PluginSettings"; + PluginConfigFromJSON, + PluginConfigFromJSONTyped, + PluginConfigToJSON, + PluginConfigToJSONTyped, +} from './PluginConfig'; +import type { PluginSettings } from './PluginSettings'; import { - PluginSettingsFromJSON, - PluginSettingsFromJSONTyped, - PluginSettingsToJSON, - PluginSettingsToJSONTyped, -} from "./PluginSettings"; + PluginSettingsFromJSON, + PluginSettingsFromJSONTyped, + PluginSettingsToJSON, + PluginSettingsToJSONTyped, +} from './PluginSettings'; /** * A plugin for the Engine API @@ -34,91 +34,91 @@ import { * @interface Plugin */ export interface Plugin { - /** - * - * @type {string} - * @memberof Plugin - */ - Id?: string; - /** - * - * @type {string} - * @memberof Plugin - */ - Name: string; - /** - * True if the plugin is running. False if the plugin is not running, only installed. - * @type {boolean} - * @memberof Plugin - */ - Enabled: boolean; - /** - * - * @type {PluginSettings} - * @memberof Plugin - */ - Settings: PluginSettings; - /** - * plugin remote reference used to push/pull the plugin - * @type {string} - * @memberof Plugin - */ - PluginReference?: string; - /** - * - * @type {PluginConfig} - * @memberof Plugin - */ - Config: PluginConfig; + /** + * + * @type {string} + * @memberof Plugin + */ + Id?: string; + /** + * + * @type {string} + * @memberof Plugin + */ + Name: string; + /** + * True if the plugin is running. False if the plugin is not running, only installed. + * @type {boolean} + * @memberof Plugin + */ + Enabled: boolean; + /** + * + * @type {PluginSettings} + * @memberof Plugin + */ + Settings: PluginSettings; + /** + * plugin remote reference used to push/pull the plugin + * @type {string} + * @memberof Plugin + */ + PluginReference?: string; + /** + * + * @type {PluginConfig} + * @memberof Plugin + */ + Config: PluginConfig; } /** * Check if a given object implements the Plugin interface. */ export function instanceOfPlugin(value: object): value is Plugin { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Enabled" in value) || value["Enabled"] === undefined) return false; - if (!("Settings" in value) || value["Settings"] === undefined) return false; - if (!("Config" in value) || value["Config"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Enabled' in value) || value['Enabled'] === undefined) return false; + if (!('Settings' in value) || value['Settings'] === undefined) return false; + if (!('Config' in value) || value['Config'] === undefined) return false; + return true; } export function PluginFromJSON(json: any): Plugin { - return PluginFromJSONTyped(json, false); + return PluginFromJSONTyped(json, false); } export function PluginFromJSONTyped(json: any, ignoreDiscriminator: boolean): Plugin { - if (json == null) { - return json; - } - return { - Id: json["Id"] == null ? undefined : json["Id"], - Name: json["Name"], - Enabled: json["Enabled"], - Settings: PluginSettingsFromJSON(json["Settings"]), - PluginReference: json["PluginReference"] == null ? undefined : json["PluginReference"], - Config: PluginConfigFromJSON(json["Config"]), - }; + if (json == null) { + return json; + } + return { + + 'Id': json['Id'] == null ? undefined : json['Id'], + 'Name': json['Name'], + 'Enabled': json['Enabled'], + 'Settings': PluginSettingsFromJSON(json['Settings']), + 'PluginReference': json['PluginReference'] == null ? undefined : json['PluginReference'], + 'Config': PluginConfigFromJSON(json['Config']), + }; } export function PluginToJSON(json: any): Plugin { - return PluginToJSONTyped(json, false); + return PluginToJSONTyped(json, false); } -export function PluginToJSONTyped( - value?: Plugin | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginToJSONTyped(value?: Plugin | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Id: value["Id"], - Name: value["Name"], - Enabled: value["Enabled"], - Settings: PluginSettingsToJSON(value["Settings"]), - PluginReference: value["PluginReference"], - Config: PluginConfigToJSON(value["Config"]), - }; + return { + + 'Id': value['Id'], + 'Name': value['Name'], + 'Enabled': value['Enabled'], + 'Settings': PluginSettingsToJSON(value['Settings']), + 'PluginReference': value['PluginReference'], + 'Config': PluginConfigToJSON(value['Config']), + }; } + diff --git a/src/clients/docker/models/PluginConfig.ts b/src/clients/docker/models/PluginConfig.ts index f852d7c140..3346471445 100644 --- a/src/clients/docker/models/PluginConfig.ts +++ b/src/clients/docker/models/PluginConfig.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginEnv } from "./PluginEnv"; +import { mapValues } from '../runtime'; +import type { PluginEnv } from './PluginEnv'; import { - PluginEnvFromJSON, - PluginEnvFromJSONTyped, - PluginEnvToJSON, - PluginEnvToJSONTyped, -} from "./PluginEnv"; -import type { PluginConfigLinux } from "./PluginConfigLinux"; + PluginEnvFromJSON, + PluginEnvFromJSONTyped, + PluginEnvToJSON, + PluginEnvToJSONTyped, +} from './PluginEnv'; +import type { PluginConfigLinux } from './PluginConfigLinux'; import { - PluginConfigLinuxFromJSON, - PluginConfigLinuxFromJSONTyped, - PluginConfigLinuxToJSON, - PluginConfigLinuxToJSONTyped, -} from "./PluginConfigLinux"; -import type { PluginConfigArgs } from "./PluginConfigArgs"; + PluginConfigLinuxFromJSON, + PluginConfigLinuxFromJSONTyped, + PluginConfigLinuxToJSON, + PluginConfigLinuxToJSONTyped, +} from './PluginConfigLinux'; +import type { PluginConfigArgs } from './PluginConfigArgs'; import { - PluginConfigArgsFromJSON, - PluginConfigArgsFromJSONTyped, - PluginConfigArgsToJSON, - PluginConfigArgsToJSONTyped, -} from "./PluginConfigArgs"; -import type { PluginConfigRootfs } from "./PluginConfigRootfs"; + PluginConfigArgsFromJSON, + PluginConfigArgsFromJSONTyped, + PluginConfigArgsToJSON, + PluginConfigArgsToJSONTyped, +} from './PluginConfigArgs'; +import type { PluginConfigRootfs } from './PluginConfigRootfs'; import { - PluginConfigRootfsFromJSON, - PluginConfigRootfsFromJSONTyped, - PluginConfigRootfsToJSON, - PluginConfigRootfsToJSONTyped, -} from "./PluginConfigRootfs"; -import type { PluginConfigNetwork } from "./PluginConfigNetwork"; + PluginConfigRootfsFromJSON, + PluginConfigRootfsFromJSONTyped, + PluginConfigRootfsToJSON, + PluginConfigRootfsToJSONTyped, +} from './PluginConfigRootfs'; +import type { PluginConfigNetwork } from './PluginConfigNetwork'; import { - PluginConfigNetworkFromJSON, - PluginConfigNetworkFromJSONTyped, - PluginConfigNetworkToJSON, - PluginConfigNetworkToJSONTyped, -} from "./PluginConfigNetwork"; -import type { PluginConfigInterface } from "./PluginConfigInterface"; + PluginConfigNetworkFromJSON, + PluginConfigNetworkFromJSONTyped, + PluginConfigNetworkToJSON, + PluginConfigNetworkToJSONTyped, +} from './PluginConfigNetwork'; +import type { PluginConfigInterface } from './PluginConfigInterface'; import { - PluginConfigInterfaceFromJSON, - PluginConfigInterfaceFromJSONTyped, - PluginConfigInterfaceToJSON, - PluginConfigInterfaceToJSONTyped, -} from "./PluginConfigInterface"; -import type { PluginConfigUser } from "./PluginConfigUser"; + PluginConfigInterfaceFromJSON, + PluginConfigInterfaceFromJSONTyped, + PluginConfigInterfaceToJSON, + PluginConfigInterfaceToJSONTyped, +} from './PluginConfigInterface'; +import type { PluginConfigUser } from './PluginConfigUser'; import { - PluginConfigUserFromJSON, - PluginConfigUserFromJSONTyped, - PluginConfigUserToJSON, - PluginConfigUserToJSONTyped, -} from "./PluginConfigUser"; -import type { PluginMount } from "./PluginMount"; + PluginConfigUserFromJSON, + PluginConfigUserFromJSONTyped, + PluginConfigUserToJSON, + PluginConfigUserToJSONTyped, +} from './PluginConfigUser'; +import type { PluginMount } from './PluginMount'; import { - PluginMountFromJSON, - PluginMountFromJSONTyped, - PluginMountToJSON, - PluginMountToJSONTyped, -} from "./PluginMount"; + PluginMountFromJSON, + PluginMountFromJSONTyped, + PluginMountToJSON, + PluginMountToJSONTyped, +} from './PluginMount'; /** * The config of a plugin. @@ -76,180 +76,180 @@ import { * @interface PluginConfig */ export interface PluginConfig { - /** - * Docker Version used to create the plugin - * @type {string} - * @memberof PluginConfig - */ - DockerVersion?: string; - /** - * - * @type {string} - * @memberof PluginConfig - */ - Description: string; - /** - * - * @type {string} - * @memberof PluginConfig - */ - Documentation: string; - /** - * - * @type {PluginConfigInterface} - * @memberof PluginConfig - */ - Interface: PluginConfigInterface; - /** - * - * @type {Array} - * @memberof PluginConfig - */ - Entrypoint: Array; - /** - * - * @type {string} - * @memberof PluginConfig - */ - WorkDir: string; - /** - * - * @type {PluginConfigUser} - * @memberof PluginConfig - */ - User?: PluginConfigUser; - /** - * - * @type {PluginConfigNetwork} - * @memberof PluginConfig - */ - Network: PluginConfigNetwork; - /** - * - * @type {PluginConfigLinux} - * @memberof PluginConfig - */ - Linux: PluginConfigLinux; - /** - * - * @type {string} - * @memberof PluginConfig - */ - PropagatedMount: string; - /** - * - * @type {boolean} - * @memberof PluginConfig - */ - IpcHost: boolean; - /** - * - * @type {boolean} - * @memberof PluginConfig - */ - PidHost: boolean; - /** - * - * @type {Array} - * @memberof PluginConfig - */ - Mounts: Array; - /** - * - * @type {Array} - * @memberof PluginConfig - */ - Env: Array; - /** - * - * @type {PluginConfigArgs} - * @memberof PluginConfig - */ - Args: PluginConfigArgs; - /** - * - * @type {PluginConfigRootfs} - * @memberof PluginConfig - */ - rootfs?: PluginConfigRootfs; + /** + * Docker Version used to create the plugin + * @type {string} + * @memberof PluginConfig + */ + DockerVersion?: string; + /** + * + * @type {string} + * @memberof PluginConfig + */ + Description: string; + /** + * + * @type {string} + * @memberof PluginConfig + */ + Documentation: string; + /** + * + * @type {PluginConfigInterface} + * @memberof PluginConfig + */ + Interface: PluginConfigInterface; + /** + * + * @type {Array} + * @memberof PluginConfig + */ + Entrypoint: Array; + /** + * + * @type {string} + * @memberof PluginConfig + */ + WorkDir: string; + /** + * + * @type {PluginConfigUser} + * @memberof PluginConfig + */ + User?: PluginConfigUser; + /** + * + * @type {PluginConfigNetwork} + * @memberof PluginConfig + */ + Network: PluginConfigNetwork; + /** + * + * @type {PluginConfigLinux} + * @memberof PluginConfig + */ + Linux: PluginConfigLinux; + /** + * + * @type {string} + * @memberof PluginConfig + */ + PropagatedMount: string; + /** + * + * @type {boolean} + * @memberof PluginConfig + */ + IpcHost: boolean; + /** + * + * @type {boolean} + * @memberof PluginConfig + */ + PidHost: boolean; + /** + * + * @type {Array} + * @memberof PluginConfig + */ + Mounts: Array; + /** + * + * @type {Array} + * @memberof PluginConfig + */ + Env: Array; + /** + * + * @type {PluginConfigArgs} + * @memberof PluginConfig + */ + Args: PluginConfigArgs; + /** + * + * @type {PluginConfigRootfs} + * @memberof PluginConfig + */ + rootfs?: PluginConfigRootfs; } /** * Check if a given object implements the PluginConfig interface. */ export function instanceOfPluginConfig(value: object): value is PluginConfig { - if (!("Description" in value) || value["Description"] === undefined) return false; - if (!("Documentation" in value) || value["Documentation"] === undefined) return false; - if (!("Interface" in value) || value["Interface"] === undefined) return false; - if (!("Entrypoint" in value) || value["Entrypoint"] === undefined) return false; - if (!("WorkDir" in value) || value["WorkDir"] === undefined) return false; - if (!("Network" in value) || value["Network"] === undefined) return false; - if (!("Linux" in value) || value["Linux"] === undefined) return false; - if (!("PropagatedMount" in value) || value["PropagatedMount"] === undefined) return false; - if (!("IpcHost" in value) || value["IpcHost"] === undefined) return false; - if (!("PidHost" in value) || value["PidHost"] === undefined) return false; - if (!("Mounts" in value) || value["Mounts"] === undefined) return false; - if (!("Env" in value) || value["Env"] === undefined) return false; - if (!("Args" in value) || value["Args"] === undefined) return false; - return true; + if (!('Description' in value) || value['Description'] === undefined) return false; + if (!('Documentation' in value) || value['Documentation'] === undefined) return false; + if (!('Interface' in value) || value['Interface'] === undefined) return false; + if (!('Entrypoint' in value) || value['Entrypoint'] === undefined) return false; + if (!('WorkDir' in value) || value['WorkDir'] === undefined) return false; + if (!('Network' in value) || value['Network'] === undefined) return false; + if (!('Linux' in value) || value['Linux'] === undefined) return false; + if (!('PropagatedMount' in value) || value['PropagatedMount'] === undefined) return false; + if (!('IpcHost' in value) || value['IpcHost'] === undefined) return false; + if (!('PidHost' in value) || value['PidHost'] === undefined) return false; + if (!('Mounts' in value) || value['Mounts'] === undefined) return false; + if (!('Env' in value) || value['Env'] === undefined) return false; + if (!('Args' in value) || value['Args'] === undefined) return false; + return true; } export function PluginConfigFromJSON(json: any): PluginConfig { - return PluginConfigFromJSONTyped(json, false); + return PluginConfigFromJSONTyped(json, false); } export function PluginConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfig { - if (json == null) { - return json; - } - return { - DockerVersion: json["DockerVersion"] == null ? undefined : json["DockerVersion"], - Description: json["Description"], - Documentation: json["Documentation"], - Interface: PluginConfigInterfaceFromJSON(json["Interface"]), - Entrypoint: json["Entrypoint"], - WorkDir: json["WorkDir"], - User: json["User"] == null ? undefined : PluginConfigUserFromJSON(json["User"]), - Network: PluginConfigNetworkFromJSON(json["Network"]), - Linux: PluginConfigLinuxFromJSON(json["Linux"]), - PropagatedMount: json["PropagatedMount"], - IpcHost: json["IpcHost"], - PidHost: json["PidHost"], - Mounts: (json["Mounts"] as Array).map(PluginMountFromJSON), - Env: (json["Env"] as Array).map(PluginEnvFromJSON), - Args: PluginConfigArgsFromJSON(json["Args"]), - rootfs: json["rootfs"] == null ? undefined : PluginConfigRootfsFromJSON(json["rootfs"]), - }; + if (json == null) { + return json; + } + return { + + 'DockerVersion': json['DockerVersion'] == null ? undefined : json['DockerVersion'], + 'Description': json['Description'], + 'Documentation': json['Documentation'], + 'Interface': PluginConfigInterfaceFromJSON(json['Interface']), + 'Entrypoint': json['Entrypoint'], + 'WorkDir': json['WorkDir'], + 'User': json['User'] == null ? undefined : PluginConfigUserFromJSON(json['User']), + 'Network': PluginConfigNetworkFromJSON(json['Network']), + 'Linux': PluginConfigLinuxFromJSON(json['Linux']), + 'PropagatedMount': json['PropagatedMount'], + 'IpcHost': json['IpcHost'], + 'PidHost': json['PidHost'], + 'Mounts': ((json['Mounts'] as Array).map(PluginMountFromJSON)), + 'Env': ((json['Env'] as Array).map(PluginEnvFromJSON)), + 'Args': PluginConfigArgsFromJSON(json['Args']), + 'rootfs': json['rootfs'] == null ? undefined : PluginConfigRootfsFromJSON(json['rootfs']), + }; } export function PluginConfigToJSON(json: any): PluginConfig { - return PluginConfigToJSONTyped(json, false); + return PluginConfigToJSONTyped(json, false); } -export function PluginConfigToJSONTyped( - value?: PluginConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigToJSONTyped(value?: PluginConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - DockerVersion: value["DockerVersion"], - Description: value["Description"], - Documentation: value["Documentation"], - Interface: PluginConfigInterfaceToJSON(value["Interface"]), - Entrypoint: value["Entrypoint"], - WorkDir: value["WorkDir"], - User: PluginConfigUserToJSON(value["User"]), - Network: PluginConfigNetworkToJSON(value["Network"]), - Linux: PluginConfigLinuxToJSON(value["Linux"]), - PropagatedMount: value["PropagatedMount"], - IpcHost: value["IpcHost"], - PidHost: value["PidHost"], - Mounts: (value["Mounts"] as Array).map(PluginMountToJSON), - Env: (value["Env"] as Array).map(PluginEnvToJSON), - Args: PluginConfigArgsToJSON(value["Args"]), - rootfs: PluginConfigRootfsToJSON(value["rootfs"]), - }; + return { + + 'DockerVersion': value['DockerVersion'], + 'Description': value['Description'], + 'Documentation': value['Documentation'], + 'Interface': PluginConfigInterfaceToJSON(value['Interface']), + 'Entrypoint': value['Entrypoint'], + 'WorkDir': value['WorkDir'], + 'User': PluginConfigUserToJSON(value['User']), + 'Network': PluginConfigNetworkToJSON(value['Network']), + 'Linux': PluginConfigLinuxToJSON(value['Linux']), + 'PropagatedMount': value['PropagatedMount'], + 'IpcHost': value['IpcHost'], + 'PidHost': value['PidHost'], + 'Mounts': ((value['Mounts'] as Array).map(PluginMountToJSON)), + 'Env': ((value['Env'] as Array).map(PluginEnvToJSON)), + 'Args': PluginConfigArgsToJSON(value['Args']), + 'rootfs': PluginConfigRootfsToJSON(value['rootfs']), + }; } + diff --git a/src/clients/docker/models/PluginConfigArgs.ts b/src/clients/docker/models/PluginConfigArgs.ts index 39708fd71f..26c76eb981 100644 --- a/src/clients/docker/models/PluginConfigArgs.ts +++ b/src/clients/docker/models/PluginConfigArgs.ts @@ -2,95 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginConfigArgs */ export interface PluginConfigArgs { - /** - * - * @type {string} - * @memberof PluginConfigArgs - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginConfigArgs - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginConfigArgs - */ - Settable: Array; - /** - * - * @type {Array} - * @memberof PluginConfigArgs - */ - Value: Array; + /** + * + * @type {string} + * @memberof PluginConfigArgs + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginConfigArgs + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginConfigArgs + */ + Settable: Array; + /** + * + * @type {Array} + * @memberof PluginConfigArgs + */ + Value: Array; } /** * Check if a given object implements the PluginConfigArgs interface. */ export function instanceOfPluginConfigArgs(value: object): value is PluginConfigArgs { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Description" in value) || value["Description"] === undefined) return false; - if (!("Settable" in value) || value["Settable"] === undefined) return false; - if (!("Value" in value) || value["Value"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Description' in value) || value['Description'] === undefined) return false; + if (!('Settable' in value) || value['Settable'] === undefined) return false; + if (!('Value' in value) || value['Value'] === undefined) return false; + return true; } export function PluginConfigArgsFromJSON(json: any): PluginConfigArgs { - return PluginConfigArgsFromJSONTyped(json, false); + return PluginConfigArgsFromJSONTyped(json, false); } -export function PluginConfigArgsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginConfigArgs { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Description: json["Description"], - Settable: json["Settable"], - Value: json["Value"], - }; +export function PluginConfigArgsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigArgs { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Description': json['Description'], + 'Settable': json['Settable'], + 'Value': json['Value'], + }; } export function PluginConfigArgsToJSON(json: any): PluginConfigArgs { - return PluginConfigArgsToJSONTyped(json, false); + return PluginConfigArgsToJSONTyped(json, false); } -export function PluginConfigArgsToJSONTyped( - value?: PluginConfigArgs | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigArgsToJSONTyped(value?: PluginConfigArgs | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Description: value["Description"], - Settable: value["Settable"], - Value: value["Value"], - }; + return { + + 'Name': value['Name'], + 'Description': value['Description'], + 'Settable': value['Settable'], + 'Value': value['Value'], + }; } + diff --git a/src/clients/docker/models/PluginConfigInterface.ts b/src/clients/docker/models/PluginConfigInterface.ts index 4ac6febf90..f733af1a69 100644 --- a/src/clients/docker/models/PluginConfigInterface.ts +++ b/src/clients/docker/models/PluginConfigInterface.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginInterfaceType } from "./PluginInterfaceType"; +import { mapValues } from '../runtime'; +import type { PluginInterfaceType } from './PluginInterfaceType'; import { - PluginInterfaceTypeFromJSON, - PluginInterfaceTypeFromJSONTyped, - PluginInterfaceTypeToJSON, - PluginInterfaceTypeToJSONTyped, -} from "./PluginInterfaceType"; + PluginInterfaceTypeFromJSON, + PluginInterfaceTypeFromJSONTyped, + PluginInterfaceTypeToJSON, + PluginInterfaceTypeToJSONTyped, +} from './PluginInterfaceType'; /** * The interface between Docker and the plugin @@ -27,77 +27,75 @@ import { * @interface PluginConfigInterface */ export interface PluginConfigInterface { - /** - * - * @type {Array} - * @memberof PluginConfigInterface - */ - Types: Array; - /** - * - * @type {string} - * @memberof PluginConfigInterface - */ - Socket: string; - /** - * Protocol to use for clients connecting to the plugin. - * @type {string} - * @memberof PluginConfigInterface - */ - ProtocolScheme?: PluginConfigInterfaceProtocolSchemeEnum; + /** + * + * @type {Array} + * @memberof PluginConfigInterface + */ + Types: Array; + /** + * + * @type {string} + * @memberof PluginConfigInterface + */ + Socket: string; + /** + * Protocol to use for clients connecting to the plugin. + * @type {string} + * @memberof PluginConfigInterface + */ + ProtocolScheme?: PluginConfigInterfaceProtocolSchemeEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PluginConfigInterfaceProtocolSchemeEnum { - Empty = "", - MobyPluginsHttpV1 = "moby.plugins.http/v1", + Empty = '', + MobyPluginsHttpV1 = 'moby.plugins.http/v1' } + /** * Check if a given object implements the PluginConfigInterface interface. */ export function instanceOfPluginConfigInterface(value: object): value is PluginConfigInterface { - if (!("Types" in value) || value["Types"] === undefined) return false; - if (!("Socket" in value) || value["Socket"] === undefined) return false; - return true; + if (!('Types' in value) || value['Types'] === undefined) return false; + if (!('Socket' in value) || value['Socket'] === undefined) return false; + return true; } export function PluginConfigInterfaceFromJSON(json: any): PluginConfigInterface { - return PluginConfigInterfaceFromJSONTyped(json, false); + return PluginConfigInterfaceFromJSONTyped(json, false); } -export function PluginConfigInterfaceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginConfigInterface { - if (json == null) { - return json; - } - return { - Types: (json["Types"] as Array).map(PluginInterfaceTypeFromJSON), - Socket: json["Socket"], - ProtocolScheme: json["ProtocolScheme"] == null ? undefined : json["ProtocolScheme"], - }; +export function PluginConfigInterfaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigInterface { + if (json == null) { + return json; + } + return { + + 'Types': ((json['Types'] as Array).map(PluginInterfaceTypeFromJSON)), + 'Socket': json['Socket'], + 'ProtocolScheme': json['ProtocolScheme'] == null ? undefined : json['ProtocolScheme'], + }; } export function PluginConfigInterfaceToJSON(json: any): PluginConfigInterface { - return PluginConfigInterfaceToJSONTyped(json, false); + return PluginConfigInterfaceToJSONTyped(json, false); } -export function PluginConfigInterfaceToJSONTyped( - value?: PluginConfigInterface | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigInterfaceToJSONTyped(value?: PluginConfigInterface | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Types: (value["Types"] as Array).map(PluginInterfaceTypeToJSON), - Socket: value["Socket"], - ProtocolScheme: value["ProtocolScheme"], - }; + return { + + 'Types': ((value['Types'] as Array).map(PluginInterfaceTypeToJSON)), + 'Socket': value['Socket'], + 'ProtocolScheme': value['ProtocolScheme'], + }; } + diff --git a/src/clients/docker/models/PluginConfigLinux.ts b/src/clients/docker/models/PluginConfigLinux.ts index 9a005baea8..74d226fb89 100644 --- a/src/clients/docker/models/PluginConfigLinux.ts +++ b/src/clients/docker/models/PluginConfigLinux.ts @@ -2,94 +2,91 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginDevice } from "./PluginDevice"; +import { mapValues } from '../runtime'; +import type { PluginDevice } from './PluginDevice'; import { - PluginDeviceFromJSON, - PluginDeviceFromJSONTyped, - PluginDeviceToJSON, - PluginDeviceToJSONTyped, -} from "./PluginDevice"; + PluginDeviceFromJSON, + PluginDeviceFromJSONTyped, + PluginDeviceToJSON, + PluginDeviceToJSONTyped, +} from './PluginDevice'; /** - * + * * @export * @interface PluginConfigLinux */ export interface PluginConfigLinux { - /** - * - * @type {Array} - * @memberof PluginConfigLinux - */ - Capabilities: Array; - /** - * - * @type {boolean} - * @memberof PluginConfigLinux - */ - AllowAllDevices: boolean; - /** - * - * @type {Array} - * @memberof PluginConfigLinux - */ - Devices: Array; + /** + * + * @type {Array} + * @memberof PluginConfigLinux + */ + Capabilities: Array; + /** + * + * @type {boolean} + * @memberof PluginConfigLinux + */ + AllowAllDevices: boolean; + /** + * + * @type {Array} + * @memberof PluginConfigLinux + */ + Devices: Array; } /** * Check if a given object implements the PluginConfigLinux interface. */ export function instanceOfPluginConfigLinux(value: object): value is PluginConfigLinux { - if (!("Capabilities" in value) || value["Capabilities"] === undefined) return false; - if (!("AllowAllDevices" in value) || value["AllowAllDevices"] === undefined) return false; - if (!("Devices" in value) || value["Devices"] === undefined) return false; - return true; + if (!('Capabilities' in value) || value['Capabilities'] === undefined) return false; + if (!('AllowAllDevices' in value) || value['AllowAllDevices'] === undefined) return false; + if (!('Devices' in value) || value['Devices'] === undefined) return false; + return true; } export function PluginConfigLinuxFromJSON(json: any): PluginConfigLinux { - return PluginConfigLinuxFromJSONTyped(json, false); + return PluginConfigLinuxFromJSONTyped(json, false); } -export function PluginConfigLinuxFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginConfigLinux { - if (json == null) { - return json; - } - return { - Capabilities: json["Capabilities"], - AllowAllDevices: json["AllowAllDevices"], - Devices: (json["Devices"] as Array).map(PluginDeviceFromJSON), - }; +export function PluginConfigLinuxFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigLinux { + if (json == null) { + return json; + } + return { + + 'Capabilities': json['Capabilities'], + 'AllowAllDevices': json['AllowAllDevices'], + 'Devices': ((json['Devices'] as Array).map(PluginDeviceFromJSON)), + }; } export function PluginConfigLinuxToJSON(json: any): PluginConfigLinux { - return PluginConfigLinuxToJSONTyped(json, false); + return PluginConfigLinuxToJSONTyped(json, false); } -export function PluginConfigLinuxToJSONTyped( - value?: PluginConfigLinux | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigLinuxToJSONTyped(value?: PluginConfigLinux | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Capabilities: value["Capabilities"], - AllowAllDevices: value["AllowAllDevices"], - Devices: (value["Devices"] as Array).map(PluginDeviceToJSON), - }; + return { + + 'Capabilities': value['Capabilities'], + 'AllowAllDevices': value['AllowAllDevices'], + 'Devices': ((value['Devices'] as Array).map(PluginDeviceToJSON)), + }; } + diff --git a/src/clients/docker/models/PluginConfigNetwork.ts b/src/clients/docker/models/PluginConfigNetwork.ts index f41a4ccc67..d1c03bf401 100644 --- a/src/clients/docker/models/PluginConfigNetwork.ts +++ b/src/clients/docker/models/PluginConfigNetwork.ts @@ -2,68 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginConfigNetwork */ export interface PluginConfigNetwork { - /** - * - * @type {string} - * @memberof PluginConfigNetwork - */ - Type: string; + /** + * + * @type {string} + * @memberof PluginConfigNetwork + */ + Type: string; } /** * Check if a given object implements the PluginConfigNetwork interface. */ export function instanceOfPluginConfigNetwork(value: object): value is PluginConfigNetwork { - if (!("Type" in value) || value["Type"] === undefined) return false; - return true; + if (!('Type' in value) || value['Type'] === undefined) return false; + return true; } export function PluginConfigNetworkFromJSON(json: any): PluginConfigNetwork { - return PluginConfigNetworkFromJSONTyped(json, false); + return PluginConfigNetworkFromJSONTyped(json, false); } -export function PluginConfigNetworkFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginConfigNetwork { - if (json == null) { - return json; - } - return { - Type: json["Type"], - }; +export function PluginConfigNetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigNetwork { + if (json == null) { + return json; + } + return { + + 'Type': json['Type'], + }; } export function PluginConfigNetworkToJSON(json: any): PluginConfigNetwork { - return PluginConfigNetworkToJSONTyped(json, false); + return PluginConfigNetworkToJSONTyped(json, false); } -export function PluginConfigNetworkToJSONTyped( - value?: PluginConfigNetwork | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigNetworkToJSONTyped(value?: PluginConfigNetwork | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Type: value["Type"], - }; + return { + + 'Type': value['Type'], + }; } + diff --git a/src/clients/docker/models/PluginConfigRootfs.ts b/src/clients/docker/models/PluginConfigRootfs.ts index 1d02d0c634..abc6cb4fbc 100644 --- a/src/clients/docker/models/PluginConfigRootfs.ts +++ b/src/clients/docker/models/PluginConfigRootfs.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginConfigRootfs */ export interface PluginConfigRootfs { - /** - * - * @type {string} - * @memberof PluginConfigRootfs - */ - type?: string; - /** - * - * @type {Array} - * @memberof PluginConfigRootfs - */ - diff_ids?: Array; + /** + * + * @type {string} + * @memberof PluginConfigRootfs + */ + type?: string; + /** + * + * @type {Array} + * @memberof PluginConfigRootfs + */ + diff_ids?: Array; } /** * Check if a given object implements the PluginConfigRootfs interface. */ export function instanceOfPluginConfigRootfs(value: object): value is PluginConfigRootfs { - return true; + return true; } export function PluginConfigRootfsFromJSON(json: any): PluginConfigRootfs { - return PluginConfigRootfsFromJSONTyped(json, false); + return PluginConfigRootfsFromJSONTyped(json, false); } -export function PluginConfigRootfsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginConfigRootfs { - if (json == null) { - return json; - } - return { - type: json["type"] == null ? undefined : json["type"], - diff_ids: json["diff_ids"] == null ? undefined : json["diff_ids"], - }; +export function PluginConfigRootfsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigRootfs { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'diff_ids': json['diff_ids'] == null ? undefined : json['diff_ids'], + }; } export function PluginConfigRootfsToJSON(json: any): PluginConfigRootfs { - return PluginConfigRootfsToJSONTyped(json, false); + return PluginConfigRootfsToJSONTyped(json, false); } -export function PluginConfigRootfsToJSONTyped( - value?: PluginConfigRootfs | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigRootfsToJSONTyped(value?: PluginConfigRootfs | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - type: value["type"], - diff_ids: value["diff_ids"], - }; + return { + + 'type': value['type'], + 'diff_ids': value['diff_ids'], + }; } + diff --git a/src/clients/docker/models/PluginConfigUser.ts b/src/clients/docker/models/PluginConfigUser.ts index 529cd2314f..a83f205bb0 100644 --- a/src/clients/docker/models/PluginConfigUser.ts +++ b/src/clients/docker/models/PluginConfigUser.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginConfigUser */ export interface PluginConfigUser { - /** - * - * @type {number} - * @memberof PluginConfigUser - */ - UID?: number; - /** - * - * @type {number} - * @memberof PluginConfigUser - */ - GID?: number; + /** + * + * @type {number} + * @memberof PluginConfigUser + */ + UID?: number; + /** + * + * @type {number} + * @memberof PluginConfigUser + */ + GID?: number; } /** * Check if a given object implements the PluginConfigUser interface. */ export function instanceOfPluginConfigUser(value: object): value is PluginConfigUser { - return true; + return true; } export function PluginConfigUserFromJSON(json: any): PluginConfigUser { - return PluginConfigUserFromJSONTyped(json, false); + return PluginConfigUserFromJSONTyped(json, false); } -export function PluginConfigUserFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginConfigUser { - if (json == null) { - return json; - } - return { - UID: json["UID"] == null ? undefined : json["UID"], - GID: json["GID"] == null ? undefined : json["GID"], - }; +export function PluginConfigUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigUser { + if (json == null) { + return json; + } + return { + + 'UID': json['UID'] == null ? undefined : json['UID'], + 'GID': json['GID'] == null ? undefined : json['GID'], + }; } export function PluginConfigUserToJSON(json: any): PluginConfigUser { - return PluginConfigUserToJSONTyped(json, false); + return PluginConfigUserToJSONTyped(json, false); } -export function PluginConfigUserToJSONTyped( - value?: PluginConfigUser | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginConfigUserToJSONTyped(value?: PluginConfigUser | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - UID: value["UID"], - GID: value["GID"], - }; + return { + + 'UID': value['UID'], + 'GID': value['GID'], + }; } + diff --git a/src/clients/docker/models/PluginDevice.ts b/src/clients/docker/models/PluginDevice.ts index 617cfc3276..8cdbbabd00 100644 --- a/src/clients/docker/models/PluginDevice.ts +++ b/src/clients/docker/models/PluginDevice.ts @@ -2,92 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginDevice */ export interface PluginDevice { - /** - * - * @type {string} - * @memberof PluginDevice - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginDevice - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginDevice - */ - Settable: Array; - /** - * - * @type {string} - * @memberof PluginDevice - */ - Path: string; + /** + * + * @type {string} + * @memberof PluginDevice + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginDevice + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginDevice + */ + Settable: Array; + /** + * + * @type {string} + * @memberof PluginDevice + */ + Path: string; } /** * Check if a given object implements the PluginDevice interface. */ export function instanceOfPluginDevice(value: object): value is PluginDevice { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Description" in value) || value["Description"] === undefined) return false; - if (!("Settable" in value) || value["Settable"] === undefined) return false; - if (!("Path" in value) || value["Path"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Description' in value) || value['Description'] === undefined) return false; + if (!('Settable' in value) || value['Settable'] === undefined) return false; + if (!('Path' in value) || value['Path'] === undefined) return false; + return true; } export function PluginDeviceFromJSON(json: any): PluginDevice { - return PluginDeviceFromJSONTyped(json, false); + return PluginDeviceFromJSONTyped(json, false); } export function PluginDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginDevice { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Description: json["Description"], - Settable: json["Settable"], - Path: json["Path"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Description': json['Description'], + 'Settable': json['Settable'], + 'Path': json['Path'], + }; } export function PluginDeviceToJSON(json: any): PluginDevice { - return PluginDeviceToJSONTyped(json, false); + return PluginDeviceToJSONTyped(json, false); } -export function PluginDeviceToJSONTyped( - value?: PluginDevice | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginDeviceToJSONTyped(value?: PluginDevice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Description: value["Description"], - Settable: value["Settable"], - Path: value["Path"], - }; + return { + + 'Name': value['Name'], + 'Description': value['Description'], + 'Settable': value['Settable'], + 'Path': value['Path'], + }; } + diff --git a/src/clients/docker/models/PluginEnv.ts b/src/clients/docker/models/PluginEnv.ts index 9e1f65a4ca..ada7327d22 100644 --- a/src/clients/docker/models/PluginEnv.ts +++ b/src/clients/docker/models/PluginEnv.ts @@ -2,92 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginEnv */ export interface PluginEnv { - /** - * - * @type {string} - * @memberof PluginEnv - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginEnv - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginEnv - */ - Settable: Array; - /** - * - * @type {string} - * @memberof PluginEnv - */ - Value: string; + /** + * + * @type {string} + * @memberof PluginEnv + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginEnv + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginEnv + */ + Settable: Array; + /** + * + * @type {string} + * @memberof PluginEnv + */ + Value: string; } /** * Check if a given object implements the PluginEnv interface. */ export function instanceOfPluginEnv(value: object): value is PluginEnv { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Description" in value) || value["Description"] === undefined) return false; - if (!("Settable" in value) || value["Settable"] === undefined) return false; - if (!("Value" in value) || value["Value"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Description' in value) || value['Description'] === undefined) return false; + if (!('Settable' in value) || value['Settable'] === undefined) return false; + if (!('Value' in value) || value['Value'] === undefined) return false; + return true; } export function PluginEnvFromJSON(json: any): PluginEnv { - return PluginEnvFromJSONTyped(json, false); + return PluginEnvFromJSONTyped(json, false); } export function PluginEnvFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginEnv { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Description: json["Description"], - Settable: json["Settable"], - Value: json["Value"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Description': json['Description'], + 'Settable': json['Settable'], + 'Value': json['Value'], + }; } export function PluginEnvToJSON(json: any): PluginEnv { - return PluginEnvToJSONTyped(json, false); + return PluginEnvToJSONTyped(json, false); } -export function PluginEnvToJSONTyped( - value?: PluginEnv | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginEnvToJSONTyped(value?: PluginEnv | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Description: value["Description"], - Settable: value["Settable"], - Value: value["Value"], - }; + return { + + 'Name': value['Name'], + 'Description': value['Description'], + 'Settable': value['Settable'], + 'Value': value['Value'], + }; } + diff --git a/src/clients/docker/models/PluginInterfaceType.ts b/src/clients/docker/models/PluginInterfaceType.ts index b38bc06f5a..924576f0f0 100644 --- a/src/clients/docker/models/PluginInterfaceType.ts +++ b/src/clients/docker/models/PluginInterfaceType.ts @@ -2,86 +2,83 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginInterfaceType */ export interface PluginInterfaceType { - /** - * - * @type {string} - * @memberof PluginInterfaceType - */ - Prefix: string; - /** - * - * @type {string} - * @memberof PluginInterfaceType - */ - Capability: string; - /** - * - * @type {string} - * @memberof PluginInterfaceType - */ - Version: string; + /** + * + * @type {string} + * @memberof PluginInterfaceType + */ + Prefix: string; + /** + * + * @type {string} + * @memberof PluginInterfaceType + */ + Capability: string; + /** + * + * @type {string} + * @memberof PluginInterfaceType + */ + Version: string; } /** * Check if a given object implements the PluginInterfaceType interface. */ export function instanceOfPluginInterfaceType(value: object): value is PluginInterfaceType { - if (!("Prefix" in value) || value["Prefix"] === undefined) return false; - if (!("Capability" in value) || value["Capability"] === undefined) return false; - if (!("Version" in value) || value["Version"] === undefined) return false; - return true; + if (!('Prefix' in value) || value['Prefix'] === undefined) return false; + if (!('Capability' in value) || value['Capability'] === undefined) return false; + if (!('Version' in value) || value['Version'] === undefined) return false; + return true; } export function PluginInterfaceTypeFromJSON(json: any): PluginInterfaceType { - return PluginInterfaceTypeFromJSONTyped(json, false); + return PluginInterfaceTypeFromJSONTyped(json, false); } -export function PluginInterfaceTypeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginInterfaceType { - if (json == null) { - return json; - } - return { - Prefix: json["Prefix"], - Capability: json["Capability"], - Version: json["Version"], - }; +export function PluginInterfaceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginInterfaceType { + if (json == null) { + return json; + } + return { + + 'Prefix': json['Prefix'], + 'Capability': json['Capability'], + 'Version': json['Version'], + }; } export function PluginInterfaceTypeToJSON(json: any): PluginInterfaceType { - return PluginInterfaceTypeToJSONTyped(json, false); + return PluginInterfaceTypeToJSONTyped(json, false); } -export function PluginInterfaceTypeToJSONTyped( - value?: PluginInterfaceType | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginInterfaceTypeToJSONTyped(value?: PluginInterfaceType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Prefix: value["Prefix"], - Capability: value["Capability"], - Version: value["Version"], - }; + return { + + 'Prefix': value['Prefix'], + 'Capability': value['Capability'], + 'Version': value['Version'], + }; } + diff --git a/src/clients/docker/models/PluginMount.ts b/src/clients/docker/models/PluginMount.ts index c1044f6124..c4e2e8f66b 100644 --- a/src/clients/docker/models/PluginMount.ts +++ b/src/clients/docker/models/PluginMount.ts @@ -2,119 +2,119 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PluginMount */ export interface PluginMount { - /** - * - * @type {string} - * @memberof PluginMount - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginMount - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginMount - */ - Settable: Array; - /** - * - * @type {string} - * @memberof PluginMount - */ - Source: string; - /** - * - * @type {string} - * @memberof PluginMount - */ - Destination: string; - /** - * - * @type {string} - * @memberof PluginMount - */ - Type: string; - /** - * - * @type {Array} - * @memberof PluginMount - */ - Options: Array; + /** + * + * @type {string} + * @memberof PluginMount + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginMount + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginMount + */ + Settable: Array; + /** + * + * @type {string} + * @memberof PluginMount + */ + Source: string; + /** + * + * @type {string} + * @memberof PluginMount + */ + Destination: string; + /** + * + * @type {string} + * @memberof PluginMount + */ + Type: string; + /** + * + * @type {Array} + * @memberof PluginMount + */ + Options: Array; } /** * Check if a given object implements the PluginMount interface. */ export function instanceOfPluginMount(value: object): value is PluginMount { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Description" in value) || value["Description"] === undefined) return false; - if (!("Settable" in value) || value["Settable"] === undefined) return false; - if (!("Source" in value) || value["Source"] === undefined) return false; - if (!("Destination" in value) || value["Destination"] === undefined) return false; - if (!("Type" in value) || value["Type"] === undefined) return false; - if (!("Options" in value) || value["Options"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Description' in value) || value['Description'] === undefined) return false; + if (!('Settable' in value) || value['Settable'] === undefined) return false; + if (!('Source' in value) || value['Source'] === undefined) return false; + if (!('Destination' in value) || value['Destination'] === undefined) return false; + if (!('Type' in value) || value['Type'] === undefined) return false; + if (!('Options' in value) || value['Options'] === undefined) return false; + return true; } export function PluginMountFromJSON(json: any): PluginMount { - return PluginMountFromJSONTyped(json, false); + return PluginMountFromJSONTyped(json, false); } export function PluginMountFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginMount { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Description: json["Description"], - Settable: json["Settable"], - Source: json["Source"], - Destination: json["Destination"], - Type: json["Type"], - Options: json["Options"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Description': json['Description'], + 'Settable': json['Settable'], + 'Source': json['Source'], + 'Destination': json['Destination'], + 'Type': json['Type'], + 'Options': json['Options'], + }; } export function PluginMountToJSON(json: any): PluginMount { - return PluginMountToJSONTyped(json, false); + return PluginMountToJSONTyped(json, false); } -export function PluginMountToJSONTyped( - value?: PluginMount | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginMountToJSONTyped(value?: PluginMount | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Description: value["Description"], - Settable: value["Settable"], - Source: value["Source"], - Destination: value["Destination"], - Type: value["Type"], - Options: value["Options"], - }; + return { + + 'Name': value['Name'], + 'Description': value['Description'], + 'Settable': value['Settable'], + 'Source': value['Source'], + 'Destination': value['Destination'], + 'Type': value['Type'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/PluginPrivilege.ts b/src/clients/docker/models/PluginPrivilege.ts index bfe24810bd..c3198292e8 100644 --- a/src/clients/docker/models/PluginPrivilege.ts +++ b/src/clients/docker/models/PluginPrivilege.ts @@ -2,85 +2,82 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Describes a permission the user has to accept upon installing * the plugin. - * + * * @export * @interface PluginPrivilege */ export interface PluginPrivilege { - /** - * - * @type {string} - * @memberof PluginPrivilege - */ - Name?: string; - /** - * - * @type {string} - * @memberof PluginPrivilege - */ - Description?: string; - /** - * - * @type {Array} - * @memberof PluginPrivilege - */ - Value?: Array; + /** + * + * @type {string} + * @memberof PluginPrivilege + */ + Name?: string; + /** + * + * @type {string} + * @memberof PluginPrivilege + */ + Description?: string; + /** + * + * @type {Array} + * @memberof PluginPrivilege + */ + Value?: Array; } /** * Check if a given object implements the PluginPrivilege interface. */ export function instanceOfPluginPrivilege(value: object): value is PluginPrivilege { - return true; + return true; } export function PluginPrivilegeFromJSON(json: any): PluginPrivilege { - return PluginPrivilegeFromJSONTyped(json, false); + return PluginPrivilegeFromJSONTyped(json, false); } -export function PluginPrivilegeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginPrivilege { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Description: json["Description"] == null ? undefined : json["Description"], - Value: json["Value"] == null ? undefined : json["Value"], - }; +export function PluginPrivilegeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginPrivilege { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Description': json['Description'] == null ? undefined : json['Description'], + 'Value': json['Value'] == null ? undefined : json['Value'], + }; } export function PluginPrivilegeToJSON(json: any): PluginPrivilege { - return PluginPrivilegeToJSONTyped(json, false); + return PluginPrivilegeToJSONTyped(json, false); } -export function PluginPrivilegeToJSONTyped( - value?: PluginPrivilege | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginPrivilegeToJSONTyped(value?: PluginPrivilege | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Description: value["Description"], - Value: value["Value"], - }; + return { + + 'Name': value['Name'], + 'Description': value['Description'], + 'Value': value['Value'], + }; } + diff --git a/src/clients/docker/models/PluginSettings.ts b/src/clients/docker/models/PluginSettings.ts index 448cd02048..af539702b9 100644 --- a/src/clients/docker/models/PluginSettings.ts +++ b/src/clients/docker/models/PluginSettings.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginDevice } from "./PluginDevice"; +import { mapValues } from '../runtime'; +import type { PluginDevice } from './PluginDevice'; import { - PluginDeviceFromJSON, - PluginDeviceFromJSONTyped, - PluginDeviceToJSON, - PluginDeviceToJSONTyped, -} from "./PluginDevice"; -import type { PluginMount } from "./PluginMount"; + PluginDeviceFromJSON, + PluginDeviceFromJSONTyped, + PluginDeviceToJSON, + PluginDeviceToJSONTyped, +} from './PluginDevice'; +import type { PluginMount } from './PluginMount'; import { - PluginMountFromJSON, - PluginMountFromJSONTyped, - PluginMountToJSON, - PluginMountToJSONTyped, -} from "./PluginMount"; + PluginMountFromJSON, + PluginMountFromJSONTyped, + PluginMountToJSON, + PluginMountToJSONTyped, +} from './PluginMount'; /** * Settings that can be modified by users. @@ -34,78 +34,75 @@ import { * @interface PluginSettings */ export interface PluginSettings { - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Mounts: Array; - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Env: Array; - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Args: Array; - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Devices: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Mounts: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Env: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Args: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Devices: Array; } /** * Check if a given object implements the PluginSettings interface. */ export function instanceOfPluginSettings(value: object): value is PluginSettings { - if (!("Mounts" in value) || value["Mounts"] === undefined) return false; - if (!("Env" in value) || value["Env"] === undefined) return false; - if (!("Args" in value) || value["Args"] === undefined) return false; - if (!("Devices" in value) || value["Devices"] === undefined) return false; - return true; + if (!('Mounts' in value) || value['Mounts'] === undefined) return false; + if (!('Env' in value) || value['Env'] === undefined) return false; + if (!('Args' in value) || value['Args'] === undefined) return false; + if (!('Devices' in value) || value['Devices'] === undefined) return false; + return true; } export function PluginSettingsFromJSON(json: any): PluginSettings { - return PluginSettingsFromJSONTyped(json, false); + return PluginSettingsFromJSONTyped(json, false); } -export function PluginSettingsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PluginSettings { - if (json == null) { - return json; - } - return { - Mounts: (json["Mounts"] as Array).map(PluginMountFromJSON), - Env: json["Env"], - Args: json["Args"], - Devices: (json["Devices"] as Array).map(PluginDeviceFromJSON), - }; +export function PluginSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginSettings { + if (json == null) { + return json; + } + return { + + 'Mounts': ((json['Mounts'] as Array).map(PluginMountFromJSON)), + 'Env': json['Env'], + 'Args': json['Args'], + 'Devices': ((json['Devices'] as Array).map(PluginDeviceFromJSON)), + }; } export function PluginSettingsToJSON(json: any): PluginSettings { - return PluginSettingsToJSONTyped(json, false); + return PluginSettingsToJSONTyped(json, false); } -export function PluginSettingsToJSONTyped( - value?: PluginSettings | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginSettingsToJSONTyped(value?: PluginSettings | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Mounts: (value["Mounts"] as Array).map(PluginMountToJSON), - Env: value["Env"], - Args: value["Args"], - Devices: (value["Devices"] as Array).map(PluginDeviceToJSON), - }; + return { + + 'Mounts': ((value['Mounts'] as Array).map(PluginMountToJSON)), + 'Env': value['Env'], + 'Args': value['Args'], + 'Devices': ((value['Devices'] as Array).map(PluginDeviceToJSON)), + }; } + diff --git a/src/clients/docker/models/PluginsInfo.ts b/src/clients/docker/models/PluginsInfo.ts index 1ab7c57b45..46acb583ad 100644 --- a/src/clients/docker/models/PluginsInfo.ts +++ b/src/clients/docker/models/PluginsInfo.ts @@ -2,95 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface PluginsInfo */ export interface PluginsInfo { - /** - * Names of available volume-drivers, and network-driver plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Volume?: Array; - /** - * Names of available network-drivers, and network-driver plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Network?: Array; - /** - * Names of available authorization plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Authorization?: Array; - /** - * Names of available logging-drivers, and logging-driver plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Log?: Array; + /** + * Names of available volume-drivers, and network-driver plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Volume?: Array; + /** + * Names of available network-drivers, and network-driver plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Network?: Array; + /** + * Names of available authorization plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Authorization?: Array; + /** + * Names of available logging-drivers, and logging-driver plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Log?: Array; } /** * Check if a given object implements the PluginsInfo interface. */ export function instanceOfPluginsInfo(value: object): value is PluginsInfo { - return true; + return true; } export function PluginsInfoFromJSON(json: any): PluginsInfo { - return PluginsInfoFromJSONTyped(json, false); + return PluginsInfoFromJSONTyped(json, false); } export function PluginsInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginsInfo { - if (json == null) { - return json; - } - return { - Volume: json["Volume"] == null ? undefined : json["Volume"], - Network: json["Network"] == null ? undefined : json["Network"], - Authorization: json["Authorization"] == null ? undefined : json["Authorization"], - Log: json["Log"] == null ? undefined : json["Log"], - }; + if (json == null) { + return json; + } + return { + + 'Volume': json['Volume'] == null ? undefined : json['Volume'], + 'Network': json['Network'] == null ? undefined : json['Network'], + 'Authorization': json['Authorization'] == null ? undefined : json['Authorization'], + 'Log': json['Log'] == null ? undefined : json['Log'], + }; } export function PluginsInfoToJSON(json: any): PluginsInfo { - return PluginsInfoToJSONTyped(json, false); + return PluginsInfoToJSONTyped(json, false); } -export function PluginsInfoToJSONTyped( - value?: PluginsInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PluginsInfoToJSONTyped(value?: PluginsInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Volume: value["Volume"], - Network: value["Network"], - Authorization: value["Authorization"], - Log: value["Log"], - }; + return { + + 'Volume': value['Volume'], + 'Network': value['Network'], + 'Authorization': value['Authorization'], + 'Log': value['Log'], + }; } + diff --git a/src/clients/docker/models/Port.ts b/src/clients/docker/models/Port.ts index 6af7c6fc8e..f371338221 100644 --- a/src/clients/docker/models/Port.ts +++ b/src/clients/docker/models/Port.ts @@ -2,97 +2,101 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * An open port on a container * @export * @interface Port */ export interface Port { - /** - * Host IP address that the container's port is mapped to - * @type {string} - * @memberof Port - */ - IP?: string; - /** - * Port on the container - * @type {number} - * @memberof Port - */ - PrivatePort: number; - /** - * Port exposed on the host - * @type {number} - * @memberof Port - */ - PublicPort?: number; - /** - * - * @type {string} - * @memberof Port - */ - Type: PortTypeEnum; + /** + * Host IP address that the container's port is mapped to + * @type {string} + * @memberof Port + */ + IP?: string; + /** + * Port on the container + * @type {number} + * @memberof Port + */ + PrivatePort: number; + /** + * Port exposed on the host + * @type {number} + * @memberof Port + */ + PublicPort?: number; + /** + * + * @type {string} + * @memberof Port + */ + Type: PortTypeEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PortTypeEnum { - Tcp = "tcp", - Udp = "udp", - Sctp = "sctp", + Tcp = 'tcp', + Udp = 'udp', + Sctp = 'sctp' } + /** * Check if a given object implements the Port interface. */ export function instanceOfPort(value: object): value is Port { - if (!("PrivatePort" in value) || value["PrivatePort"] === undefined) return false; - if (!("Type" in value) || value["Type"] === undefined) return false; - return true; + if (!('PrivatePort' in value) || value['PrivatePort'] === undefined) return false; + if (!('Type' in value) || value['Type'] === undefined) return false; + return true; } export function PortFromJSON(json: any): Port { - return PortFromJSONTyped(json, false); + return PortFromJSONTyped(json, false); } export function PortFromJSONTyped(json: any, ignoreDiscriminator: boolean): Port { - if (json == null) { - return json; - } - return { - IP: json["IP"] == null ? undefined : json["IP"], - PrivatePort: json["PrivatePort"], - PublicPort: json["PublicPort"] == null ? undefined : json["PublicPort"], - Type: json["Type"], - }; + if (json == null) { + return json; + } + return { + + 'IP': json['IP'] == null ? undefined : json['IP'], + 'PrivatePort': json['PrivatePort'], + 'PublicPort': json['PublicPort'] == null ? undefined : json['PublicPort'], + 'Type': json['Type'], + }; } export function PortToJSON(json: any): Port { - return PortToJSONTyped(json, false); + return PortToJSONTyped(json, false); } export function PortToJSONTyped(value?: Port | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - IP: value["IP"], - PrivatePort: value["PrivatePort"], - PublicPort: value["PublicPort"], - Type: value["Type"], - }; + return { + + 'IP': value['IP'], + 'PrivatePort': value['PrivatePort'], + 'PublicPort': value['PublicPort'], + 'Type': value['Type'], + }; } + diff --git a/src/clients/docker/models/PortBinding.ts b/src/clients/docker/models/PortBinding.ts index a7072a6a48..4afd88fb3e 100644 --- a/src/clients/docker/models/PortBinding.ts +++ b/src/clients/docker/models/PortBinding.ts @@ -2,74 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * PortBinding represents a binding between a host IP address and a host * port. - * + * * @export * @interface PortBinding */ export interface PortBinding { - /** - * Host IP address that the container's port is mapped to. - * @type {string} - * @memberof PortBinding - */ - HostIp?: string; - /** - * Host port number that the container's port is mapped to. - * @type {string} - * @memberof PortBinding - */ - HostPort?: string; + /** + * Host IP address that the container's port is mapped to. + * @type {string} + * @memberof PortBinding + */ + HostIp?: string; + /** + * Host port number that the container's port is mapped to. + * @type {string} + * @memberof PortBinding + */ + HostPort?: string; } /** * Check if a given object implements the PortBinding interface. */ export function instanceOfPortBinding(value: object): value is PortBinding { - return true; + return true; } export function PortBindingFromJSON(json: any): PortBinding { - return PortBindingFromJSONTyped(json, false); + return PortBindingFromJSONTyped(json, false); } export function PortBindingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortBinding { - if (json == null) { - return json; - } - return { - HostIp: json["HostIp"] == null ? undefined : json["HostIp"], - HostPort: json["HostPort"] == null ? undefined : json["HostPort"], - }; + if (json == null) { + return json; + } + return { + + 'HostIp': json['HostIp'] == null ? undefined : json['HostIp'], + 'HostPort': json['HostPort'] == null ? undefined : json['HostPort'], + }; } export function PortBindingToJSON(json: any): PortBinding { - return PortBindingToJSONTyped(json, false); + return PortBindingToJSONTyped(json, false); } -export function PortBindingToJSONTyped( - value?: PortBinding | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PortBindingToJSONTyped(value?: PortBinding | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - HostIp: value["HostIp"], - HostPort: value["HostPort"], - }; + return { + + 'HostIp': value['HostIp'], + 'HostPort': value['HostPort'], + }; } + diff --git a/src/clients/docker/models/ProcessConfig.ts b/src/clients/docker/models/ProcessConfig.ts index 041528b3b1..fd779374f3 100644 --- a/src/clients/docker/models/ProcessConfig.ts +++ b/src/clients/docker/models/ProcessConfig.ts @@ -2,96 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProcessConfig */ export interface ProcessConfig { - /** - * - * @type {boolean} - * @memberof ProcessConfig - */ - privileged?: boolean; - /** - * - * @type {string} - * @memberof ProcessConfig - */ - user?: string; - /** - * - * @type {boolean} - * @memberof ProcessConfig - */ - tty?: boolean; - /** - * - * @type {string} - * @memberof ProcessConfig - */ - entrypoint?: string; - /** - * - * @type {Array} - * @memberof ProcessConfig - */ - arguments?: Array; + /** + * + * @type {boolean} + * @memberof ProcessConfig + */ + privileged?: boolean; + /** + * + * @type {string} + * @memberof ProcessConfig + */ + user?: string; + /** + * + * @type {boolean} + * @memberof ProcessConfig + */ + tty?: boolean; + /** + * + * @type {string} + * @memberof ProcessConfig + */ + entrypoint?: string; + /** + * + * @type {Array} + * @memberof ProcessConfig + */ + arguments?: Array; } /** * Check if a given object implements the ProcessConfig interface. */ export function instanceOfProcessConfig(value: object): value is ProcessConfig { - return true; + return true; } export function ProcessConfigFromJSON(json: any): ProcessConfig { - return ProcessConfigFromJSONTyped(json, false); + return ProcessConfigFromJSONTyped(json, false); } export function ProcessConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProcessConfig { - if (json == null) { - return json; - } - return { - privileged: json["privileged"] == null ? undefined : json["privileged"], - user: json["user"] == null ? undefined : json["user"], - tty: json["tty"] == null ? undefined : json["tty"], - entrypoint: json["entrypoint"] == null ? undefined : json["entrypoint"], - arguments: json["arguments"] == null ? undefined : json["arguments"], - }; + if (json == null) { + return json; + } + return { + + 'privileged': json['privileged'] == null ? undefined : json['privileged'], + 'user': json['user'] == null ? undefined : json['user'], + 'tty': json['tty'] == null ? undefined : json['tty'], + 'entrypoint': json['entrypoint'] == null ? undefined : json['entrypoint'], + 'arguments': json['arguments'] == null ? undefined : json['arguments'], + }; } export function ProcessConfigToJSON(json: any): ProcessConfig { - return ProcessConfigToJSONTyped(json, false); + return ProcessConfigToJSONTyped(json, false); } -export function ProcessConfigToJSONTyped( - value?: ProcessConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProcessConfigToJSONTyped(value?: ProcessConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - privileged: value["privileged"], - user: value["user"], - tty: value["tty"], - entrypoint: value["entrypoint"], - arguments: value["arguments"], - }; + return { + + 'privileged': value['privileged'], + 'user': value['user'], + 'tty': value['tty'], + 'entrypoint': value['entrypoint'], + 'arguments': value['arguments'], + }; } + diff --git a/src/clients/docker/models/ProgressDetail.ts b/src/clients/docker/models/ProgressDetail.ts index 7dcb1e60f6..c0322d3939 100644 --- a/src/clients/docker/models/ProgressDetail.ts +++ b/src/clients/docker/models/ProgressDetail.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProgressDetail */ export interface ProgressDetail { - /** - * - * @type {number} - * @memberof ProgressDetail - */ - current?: number; - /** - * - * @type {number} - * @memberof ProgressDetail - */ - total?: number; + /** + * + * @type {number} + * @memberof ProgressDetail + */ + current?: number; + /** + * + * @type {number} + * @memberof ProgressDetail + */ + total?: number; } /** * Check if a given object implements the ProgressDetail interface. */ export function instanceOfProgressDetail(value: object): value is ProgressDetail { - return true; + return true; } export function ProgressDetailFromJSON(json: any): ProgressDetail { - return ProgressDetailFromJSONTyped(json, false); + return ProgressDetailFromJSONTyped(json, false); } -export function ProgressDetailFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProgressDetail { - if (json == null) { - return json; - } - return { - current: json["current"] == null ? undefined : json["current"], - total: json["total"] == null ? undefined : json["total"], - }; +export function ProgressDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProgressDetail { + if (json == null) { + return json; + } + return { + + 'current': json['current'] == null ? undefined : json['current'], + 'total': json['total'] == null ? undefined : json['total'], + }; } export function ProgressDetailToJSON(json: any): ProgressDetail { - return ProgressDetailToJSONTyped(json, false); + return ProgressDetailToJSONTyped(json, false); } -export function ProgressDetailToJSONTyped( - value?: ProgressDetail | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProgressDetailToJSONTyped(value?: ProgressDetail | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - current: value["current"], - total: value["total"], - }; + return { + + 'current': value['current'], + 'total': value['total'], + }; } + diff --git a/src/clients/docker/models/PushImageInfo.ts b/src/clients/docker/models/PushImageInfo.ts index 0708f631b6..e7a52399e9 100644 --- a/src/clients/docker/models/PushImageInfo.ts +++ b/src/clients/docker/models/PushImageInfo.ts @@ -2,97 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ProgressDetail } from "./ProgressDetail"; +import { mapValues } from '../runtime'; +import type { ProgressDetail } from './ProgressDetail'; import { - ProgressDetailFromJSON, - ProgressDetailFromJSONTyped, - ProgressDetailToJSON, - ProgressDetailToJSONTyped, -} from "./ProgressDetail"; + ProgressDetailFromJSON, + ProgressDetailFromJSONTyped, + ProgressDetailToJSON, + ProgressDetailToJSONTyped, +} from './ProgressDetail'; /** - * + * * @export * @interface PushImageInfo */ export interface PushImageInfo { - /** - * - * @type {string} - * @memberof PushImageInfo - */ - error?: string; - /** - * - * @type {string} - * @memberof PushImageInfo - */ - status?: string; - /** - * - * @type {string} - * @memberof PushImageInfo - */ - progress?: string; - /** - * - * @type {ProgressDetail} - * @memberof PushImageInfo - */ - progressDetail?: ProgressDetail; + /** + * + * @type {string} + * @memberof PushImageInfo + */ + error?: string; + /** + * + * @type {string} + * @memberof PushImageInfo + */ + status?: string; + /** + * + * @type {string} + * @memberof PushImageInfo + */ + progress?: string; + /** + * + * @type {ProgressDetail} + * @memberof PushImageInfo + */ + progressDetail?: ProgressDetail; } /** * Check if a given object implements the PushImageInfo interface. */ export function instanceOfPushImageInfo(value: object): value is PushImageInfo { - return true; + return true; } export function PushImageInfoFromJSON(json: any): PushImageInfo { - return PushImageInfoFromJSONTyped(json, false); + return PushImageInfoFromJSONTyped(json, false); } export function PushImageInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushImageInfo { - if (json == null) { - return json; - } - return { - error: json["error"] == null ? undefined : json["error"], - status: json["status"] == null ? undefined : json["status"], - progress: json["progress"] == null ? undefined : json["progress"], - progressDetail: - json["progressDetail"] == null ? undefined : ProgressDetailFromJSON(json["progressDetail"]), - }; + if (json == null) { + return json; + } + return { + + 'error': json['error'] == null ? undefined : json['error'], + 'status': json['status'] == null ? undefined : json['status'], + 'progress': json['progress'] == null ? undefined : json['progress'], + 'progressDetail': json['progressDetail'] == null ? undefined : ProgressDetailFromJSON(json['progressDetail']), + }; } export function PushImageInfoToJSON(json: any): PushImageInfo { - return PushImageInfoToJSONTyped(json, false); + return PushImageInfoToJSONTyped(json, false); } -export function PushImageInfoToJSONTyped( - value?: PushImageInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PushImageInfoToJSONTyped(value?: PushImageInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - error: value["error"], - status: value["status"], - progress: value["progress"], - progressDetail: ProgressDetailToJSON(value["progressDetail"]), - }; + return { + + 'error': value['error'], + 'status': value['status'], + 'progress': value['progress'], + 'progressDetail': ProgressDetailToJSON(value['progressDetail']), + }; } + diff --git a/src/clients/docker/models/Reachability.ts b/src/clients/docker/models/Reachability.ts index efc930087a..11ba3e627a 100644 --- a/src/clients/docker/models/Reachability.ts +++ b/src/clients/docker/models/Reachability.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,34 +18,36 @@ * @enum {string} */ export enum Reachability { - Unknown = "unknown", - Unreachable = "unreachable", - Reachable = "reachable", + Unknown = 'unknown', + Unreachable = 'unreachable', + Reachable = 'reachable' } + export function instanceOfReachability(value: any): boolean { - for (const key in Reachability) { - if (Object.prototype.hasOwnProperty.call(Reachability, key)) { - if (Reachability[key as keyof typeof Reachability] === value) { - return true; - } + for (const key in Reachability) { + if (Object.prototype.hasOwnProperty.call(Reachability, key)) { + if (Reachability[key as keyof typeof Reachability] === value) { + return true; + } + } } - } - return false; + return false; } export function ReachabilityFromJSON(json: any): Reachability { - return ReachabilityFromJSONTyped(json, false); + return ReachabilityFromJSONTyped(json, false); } export function ReachabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reachability { - return json as Reachability; + return json as Reachability; } export function ReachabilityToJSON(value?: Reachability | null): any { - return value as any; + return value as any; } export function ReachabilityToJSONTyped(value: any, ignoreDiscriminator: boolean): Reachability { - return value as Reachability; + return value as Reachability; } + diff --git a/src/clients/docker/models/RegistryServiceConfig.ts b/src/clients/docker/models/RegistryServiceConfig.ts index 19e6720b67..32055f63b5 100644 --- a/src/clients/docker/models/RegistryServiceConfig.ts +++ b/src/clients/docker/models/RegistryServiceConfig.ts @@ -2,183 +2,171 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { IndexInfo } from "./IndexInfo"; +import { mapValues } from '../runtime'; +import type { IndexInfo } from './IndexInfo'; import { - IndexInfoFromJSON, - IndexInfoFromJSONTyped, - IndexInfoToJSON, - IndexInfoToJSONTyped, -} from "./IndexInfo"; + IndexInfoFromJSON, + IndexInfoFromJSONTyped, + IndexInfoToJSON, + IndexInfoToJSONTyped, +} from './IndexInfo'; /** * RegistryServiceConfig stores daemon registry services configuration. - * + * * @export * @interface RegistryServiceConfig */ export interface RegistryServiceConfig { - /** - * List of IP ranges to which nondistributable artifacts can be pushed, - * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). - * - * Some images (for example, Windows base images) contain artifacts - * whose distribution is restricted by license. When these images are - * pushed to a registry, restricted artifacts are not included. - * - * This configuration override this behavior, and enables the daemon to - * push nondistributable artifacts to all registries whose resolved IP - * address is within the subnet described by the CIDR syntax. - * - * This option is useful when pushing images containing - * nondistributable artifacts to a registry on an air-gapped network so - * hosts on that network can pull the images without connecting to - * another server. - * - * > **Warning**: Nondistributable artifacts typically have restrictions - * > on how and where they can be distributed and shared. Only use this - * > feature to push artifacts to private registries and ensure that you - * > are in compliance with any terms that cover redistributing - * > nondistributable artifacts. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - AllowNondistributableArtifactsCIDRs?: Array; - /** - * List of registry hostnames to which nondistributable artifacts can be - * pushed, using the format `[:]` or `[:]`. - * - * Some images (for example, Windows base images) contain artifacts - * whose distribution is restricted by license. When these images are - * pushed to a registry, restricted artifacts are not included. - * - * This configuration override this behavior for the specified - * registries. - * - * This option is useful when pushing images containing - * nondistributable artifacts to a registry on an air-gapped network so - * hosts on that network can pull the images without connecting to - * another server. - * - * > **Warning**: Nondistributable artifacts typically have restrictions - * > on how and where they can be distributed and shared. Only use this - * > feature to push artifacts to private registries and ensure that you - * > are in compliance with any terms that cover redistributing - * > nondistributable artifacts. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - AllowNondistributableArtifactsHostnames?: Array; - /** - * List of IP ranges of insecure registries, using the CIDR syntax - * ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries - * accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates - * from unknown CAs) communication. - * - * By default, local registries (`127.0.0.0/8`) are configured as - * insecure. All other registries are secure. Communicating with an - * insecure registry is not possible if the daemon assumes that registry - * is secure. - * - * This configuration override this behavior, insecure communication with - * registries whose resolved IP address is within the subnet described by - * the CIDR syntax. - * - * Registries can also be marked insecure by hostname. Those registries - * are listed under `IndexConfigs` and have their `Secure` field set to - * `false`. - * - * > **Warning**: Using this option can be useful when running a local - * > registry, but introduces security vulnerabilities. This option - * > should therefore ONLY be used for testing purposes. For increased - * > security, users should add their CA to their system's list of trusted - * > CAs instead of enabling this option. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - InsecureRegistryCIDRs?: Array; - /** - * - * @type {{ [key: string]: IndexInfo; }} - * @memberof RegistryServiceConfig - */ - IndexConfigs?: { [key: string]: IndexInfo }; - /** - * List of registry URLs that act as a mirror for the official - * (`docker.io`) registry. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - Mirrors?: Array; + /** + * List of IP ranges to which nondistributable artifacts can be pushed, + * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + * + * Some images (for example, Windows base images) contain artifacts + * whose distribution is restricted by license. When these images are + * pushed to a registry, restricted artifacts are not included. + * + * This configuration override this behavior, and enables the daemon to + * push nondistributable artifacts to all registries whose resolved IP + * address is within the subnet described by the CIDR syntax. + * + * This option is useful when pushing images containing + * nondistributable artifacts to a registry on an air-gapped network so + * hosts on that network can pull the images without connecting to + * another server. + * + * > **Warning**: Nondistributable artifacts typically have restrictions + * > on how and where they can be distributed and shared. Only use this + * > feature to push artifacts to private registries and ensure that you + * > are in compliance with any terms that cover redistributing + * > nondistributable artifacts. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + AllowNondistributableArtifactsCIDRs?: Array; + /** + * List of registry hostnames to which nondistributable artifacts can be + * pushed, using the format `[:]` or `[:]`. + * + * Some images (for example, Windows base images) contain artifacts + * whose distribution is restricted by license. When these images are + * pushed to a registry, restricted artifacts are not included. + * + * This configuration override this behavior for the specified + * registries. + * + * This option is useful when pushing images containing + * nondistributable artifacts to a registry on an air-gapped network so + * hosts on that network can pull the images without connecting to + * another server. + * + * > **Warning**: Nondistributable artifacts typically have restrictions + * > on how and where they can be distributed and shared. Only use this + * > feature to push artifacts to private registries and ensure that you + * > are in compliance with any terms that cover redistributing + * > nondistributable artifacts. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + AllowNondistributableArtifactsHostnames?: Array; + /** + * List of IP ranges of insecure registries, using the CIDR syntax + * ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + * accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + * from unknown CAs) communication. + * + * By default, local registries (`127.0.0.0/8`) are configured as + * insecure. All other registries are secure. Communicating with an + * insecure registry is not possible if the daemon assumes that registry + * is secure. + * + * This configuration override this behavior, insecure communication with + * registries whose resolved IP address is within the subnet described by + * the CIDR syntax. + * + * Registries can also be marked insecure by hostname. Those registries + * are listed under `IndexConfigs` and have their `Secure` field set to + * `false`. + * + * > **Warning**: Using this option can be useful when running a local + * > registry, but introduces security vulnerabilities. This option + * > should therefore ONLY be used for testing purposes. For increased + * > security, users should add their CA to their system's list of trusted + * > CAs instead of enabling this option. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + InsecureRegistryCIDRs?: Array; + /** + * + * @type {{ [key: string]: IndexInfo; }} + * @memberof RegistryServiceConfig + */ + IndexConfigs?: { [key: string]: IndexInfo; }; + /** + * List of registry URLs that act as a mirror for the official + * (`docker.io`) registry. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + Mirrors?: Array; } /** * Check if a given object implements the RegistryServiceConfig interface. */ export function instanceOfRegistryServiceConfig(value: object): value is RegistryServiceConfig { - return true; + return true; } export function RegistryServiceConfigFromJSON(json: any): RegistryServiceConfig { - return RegistryServiceConfigFromJSONTyped(json, false); + return RegistryServiceConfigFromJSONTyped(json, false); } -export function RegistryServiceConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RegistryServiceConfig { - if (json == null) { - return json; - } - return { - AllowNondistributableArtifactsCIDRs: - json["AllowNondistributableArtifactsCIDRs"] == null - ? undefined - : json["AllowNondistributableArtifactsCIDRs"], - AllowNondistributableArtifactsHostnames: - json["AllowNondistributableArtifactsHostnames"] == null - ? undefined - : json["AllowNondistributableArtifactsHostnames"], - InsecureRegistryCIDRs: - json["InsecureRegistryCIDRs"] == null ? undefined : json["InsecureRegistryCIDRs"], - IndexConfigs: - json["IndexConfigs"] == null ? undefined : mapValues(json["IndexConfigs"], IndexInfoFromJSON), - Mirrors: json["Mirrors"] == null ? undefined : json["Mirrors"], - }; +export function RegistryServiceConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegistryServiceConfig { + if (json == null) { + return json; + } + return { + + 'AllowNondistributableArtifactsCIDRs': json['AllowNondistributableArtifactsCIDRs'] == null ? undefined : json['AllowNondistributableArtifactsCIDRs'], + 'AllowNondistributableArtifactsHostnames': json['AllowNondistributableArtifactsHostnames'] == null ? undefined : json['AllowNondistributableArtifactsHostnames'], + 'InsecureRegistryCIDRs': json['InsecureRegistryCIDRs'] == null ? undefined : json['InsecureRegistryCIDRs'], + 'IndexConfigs': json['IndexConfigs'] == null ? undefined : (mapValues(json['IndexConfigs'], IndexInfoFromJSON)), + 'Mirrors': json['Mirrors'] == null ? undefined : json['Mirrors'], + }; } export function RegistryServiceConfigToJSON(json: any): RegistryServiceConfig { - return RegistryServiceConfigToJSONTyped(json, false); + return RegistryServiceConfigToJSONTyped(json, false); } -export function RegistryServiceConfigToJSONTyped( - value?: RegistryServiceConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RegistryServiceConfigToJSONTyped(value?: RegistryServiceConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - AllowNondistributableArtifactsCIDRs: value["AllowNondistributableArtifactsCIDRs"], - AllowNondistributableArtifactsHostnames: value["AllowNondistributableArtifactsHostnames"], - InsecureRegistryCIDRs: value["InsecureRegistryCIDRs"], - IndexConfigs: - value["IndexConfigs"] == null ? undefined : mapValues(value["IndexConfigs"], IndexInfoToJSON), - Mirrors: value["Mirrors"], - }; + return { + + 'AllowNondistributableArtifactsCIDRs': value['AllowNondistributableArtifactsCIDRs'], + 'AllowNondistributableArtifactsHostnames': value['AllowNondistributableArtifactsHostnames'], + 'InsecureRegistryCIDRs': value['InsecureRegistryCIDRs'], + 'IndexConfigs': value['IndexConfigs'] == null ? undefined : (mapValues(value['IndexConfigs'], IndexInfoToJSON)), + 'Mirrors': value['Mirrors'], + }; } + diff --git a/src/clients/docker/models/ResourceObject.ts b/src/clients/docker/models/ResourceObject.ts index 9101b3af38..ca7d925edb 100644 --- a/src/clients/docker/models/ResourceObject.ts +++ b/src/clients/docker/models/ResourceObject.ts @@ -2,101 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GenericResourcesInner } from "./GenericResourcesInner"; +import { mapValues } from '../runtime'; +import type { GenericResourcesInner } from './GenericResourcesInner'; import { - GenericResourcesInnerFromJSON, - GenericResourcesInnerFromJSONTyped, - GenericResourcesInnerToJSON, - GenericResourcesInnerToJSONTyped, -} from "./GenericResourcesInner"; + GenericResourcesInnerFromJSON, + GenericResourcesInnerFromJSONTyped, + GenericResourcesInnerToJSON, + GenericResourcesInnerToJSONTyped, +} from './GenericResourcesInner'; /** * An object describing the resources which can be advertised by a node and * requested by a task. - * + * * @export * @interface ResourceObject */ export interface ResourceObject { - /** - * - * @type {number} - * @memberof ResourceObject - */ - NanoCPUs?: number; - /** - * - * @type {number} - * @memberof ResourceObject - */ - MemoryBytes?: number; - /** - * User-defined resources can be either Integer resources (e.g, `SSD=3`) or - * String resources (e.g, `GPU=UUID1`). - * - * @type {Array} - * @memberof ResourceObject - */ - GenericResources?: Array; + /** + * + * @type {number} + * @memberof ResourceObject + */ + NanoCPUs?: number; + /** + * + * @type {number} + * @memberof ResourceObject + */ + MemoryBytes?: number; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + * String resources (e.g, `GPU=UUID1`). + * + * @type {Array} + * @memberof ResourceObject + */ + GenericResources?: Array; } /** * Check if a given object implements the ResourceObject interface. */ export function instanceOfResourceObject(value: object): value is ResourceObject { - return true; + return true; } export function ResourceObjectFromJSON(json: any): ResourceObject { - return ResourceObjectFromJSONTyped(json, false); + return ResourceObjectFromJSONTyped(json, false); } -export function ResourceObjectFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResourceObject { - if (json == null) { - return json; - } - return { - NanoCPUs: json["NanoCPUs"] == null ? undefined : json["NanoCPUs"], - MemoryBytes: json["MemoryBytes"] == null ? undefined : json["MemoryBytes"], - GenericResources: - json["GenericResources"] == null - ? undefined - : (json["GenericResources"] as Array).map(GenericResourcesInnerFromJSON), - }; +export function ResourceObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceObject { + if (json == null) { + return json; + } + return { + + 'NanoCPUs': json['NanoCPUs'] == null ? undefined : json['NanoCPUs'], + 'MemoryBytes': json['MemoryBytes'] == null ? undefined : json['MemoryBytes'], + 'GenericResources': json['GenericResources'] == null ? undefined : ((json['GenericResources'] as Array).map(GenericResourcesInnerFromJSON)), + }; } export function ResourceObjectToJSON(json: any): ResourceObject { - return ResourceObjectToJSONTyped(json, false); + return ResourceObjectToJSONTyped(json, false); } -export function ResourceObjectToJSONTyped( - value?: ResourceObject | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourceObjectToJSONTyped(value?: ResourceObject | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NanoCPUs: value["NanoCPUs"], - MemoryBytes: value["MemoryBytes"], - GenericResources: - value["GenericResources"] == null - ? undefined - : (value["GenericResources"] as Array).map(GenericResourcesInnerToJSON), - }; + return { + + 'NanoCPUs': value['NanoCPUs'], + 'MemoryBytes': value['MemoryBytes'], + 'GenericResources': value['GenericResources'] == null ? undefined : ((value['GenericResources'] as Array).map(GenericResourcesInnerToJSON)), + }; } + diff --git a/src/clients/docker/models/Resources.ts b/src/clients/docker/models/Resources.ts index dfd651d319..486bf9031d 100644 --- a/src/clients/docker/models/Resources.ts +++ b/src/clients/docker/models/Resources.ts @@ -2,52 +2,52 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; +import { mapValues } from '../runtime'; +import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from "./ResourcesUlimitsInner"; -import type { ThrottleDevice } from "./ThrottleDevice"; + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from './ResourcesUlimitsInner'; +import type { ThrottleDevice } from './ThrottleDevice'; import { - ThrottleDeviceFromJSON, - ThrottleDeviceFromJSONTyped, - ThrottleDeviceToJSON, - ThrottleDeviceToJSONTyped, -} from "./ThrottleDevice"; -import type { DeviceMapping } from "./DeviceMapping"; + ThrottleDeviceFromJSON, + ThrottleDeviceFromJSONTyped, + ThrottleDeviceToJSON, + ThrottleDeviceToJSONTyped, +} from './ThrottleDevice'; +import type { DeviceMapping } from './DeviceMapping'; import { - DeviceMappingFromJSON, - DeviceMappingFromJSONTyped, - DeviceMappingToJSON, - DeviceMappingToJSONTyped, -} from "./DeviceMapping"; -import type { DeviceRequest } from "./DeviceRequest"; + DeviceMappingFromJSON, + DeviceMappingFromJSONTyped, + DeviceMappingToJSON, + DeviceMappingToJSONTyped, +} from './DeviceMapping'; +import type { DeviceRequest } from './DeviceRequest'; import { - DeviceRequestFromJSON, - DeviceRequestFromJSONTyped, - DeviceRequestToJSON, - DeviceRequestToJSONTyped, -} from "./DeviceRequest"; -import type { ResourcesBlkioWeightDeviceInner } from "./ResourcesBlkioWeightDeviceInner"; + DeviceRequestFromJSON, + DeviceRequestFromJSONTyped, + DeviceRequestToJSON, + DeviceRequestToJSONTyped, +} from './DeviceRequest'; +import type { ResourcesBlkioWeightDeviceInner } from './ResourcesBlkioWeightDeviceInner'; import { - ResourcesBlkioWeightDeviceInnerFromJSON, - ResourcesBlkioWeightDeviceInnerFromJSONTyped, - ResourcesBlkioWeightDeviceInnerToJSON, - ResourcesBlkioWeightDeviceInnerToJSONTyped, -} from "./ResourcesBlkioWeightDeviceInner"; + ResourcesBlkioWeightDeviceInnerFromJSON, + ResourcesBlkioWeightDeviceInnerFromJSONTyped, + ResourcesBlkioWeightDeviceInnerToJSON, + ResourcesBlkioWeightDeviceInnerToJSONTyped, +} from './ResourcesBlkioWeightDeviceInner'; /** * A container's resources (cgroups config, ulimits, etc) @@ -55,406 +55,358 @@ import { * @interface Resources */ export interface Resources { - /** - * An integer value representing this container's relative CPU weight - * versus other containers. - * - * @type {number} - * @memberof Resources - */ - CpuShares?: number; - /** - * Memory limit in bytes. - * @type {number} - * @memberof Resources - */ - Memory?: number; - /** - * Path to `cgroups` under which the container's `cgroup` is created. If - * the path is not absolute, the path is considered to be relative to the - * `cgroups` path of the init process. Cgroups are created if they do not - * already exist. - * - * @type {string} - * @memberof Resources - */ - CgroupParent?: string; - /** - * Block IO weight (relative weight). - * @type {number} - * @memberof Resources - */ - BlkioWeight?: number; - /** - * Block IO weight (relative device weight) in the form: - * - * ``` - * [{"Path": "device_path", "Weight": weight}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioWeightDevice?: Array; - /** - * Limit read rate (bytes per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceReadBps?: Array; - /** - * Limit write rate (bytes per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceWriteBps?: Array; - /** - * Limit read rate (IO per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceReadIOps?: Array; - /** - * Limit write rate (IO per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceWriteIOps?: Array; - /** - * The length of a CPU period in microseconds. - * @type {number} - * @memberof Resources - */ - CpuPeriod?: number; - /** - * Microseconds of CPU time that the container can get in a CPU period. - * - * @type {number} - * @memberof Resources - */ - CpuQuota?: number; - /** - * The length of a CPU real-time period in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof Resources - */ - CpuRealtimePeriod?: number; - /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof Resources - */ - CpuRealtimeRuntime?: number; - /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`). - * - * @type {string} - * @memberof Resources - */ - CpusetCpus?: string; - /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only - * effective on NUMA systems. - * - * @type {string} - * @memberof Resources - */ - CpusetMems?: string; - /** - * A list of devices to add to the container. - * @type {Array} - * @memberof Resources - */ - Devices?: Array; - /** - * a list of cgroup rules to apply to the container - * @type {Array} - * @memberof Resources - */ - DeviceCgroupRules?: Array; - /** - * A list of requests for devices to be sent to device drivers. - * - * @type {Array} - * @memberof Resources - */ - DeviceRequests?: Array; - /** - * Hard limit for kernel TCP buffer memory (in bytes). Depending on the - * OCI runtime in use, this option may be ignored. It is no longer supported - * by the default (runc) runtime. - * - * This field is omitted when empty. - * - * @type {number} - * @memberof Resources - */ - KernelMemoryTCP?: number; - /** - * Memory soft limit in bytes. - * @type {number} - * @memberof Resources - */ - MemoryReservation?: number; - /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited - * swap. - * - * @type {number} - * @memberof Resources - */ - MemorySwap?: number; - /** - * Tune a container's memory swappiness behavior. Accepts an integer - * between 0 and 100. - * - * @type {number} - * @memberof Resources - */ - MemorySwappiness?: number; - /** - * CPU quota in units of 10-9 CPUs. - * @type {number} - * @memberof Resources - */ - NanoCpus?: number; - /** - * Disable OOM Killer for the container. - * @type {boolean} - * @memberof Resources - */ - OomKillDisable?: boolean; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof Resources - */ - Init?: boolean | null; - /** - * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` - * to not change. - * - * @type {number} - * @memberof Resources - */ - PidsLimit?: number | null; - /** - * A list of resource limits to set in the container. For example: - * - * ``` - * {"Name": "nofile", "Soft": 1024, "Hard": 2048} - * ``` - * - * @type {Array} - * @memberof Resources - */ - Ulimits?: Array; - /** - * The number of usable CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof Resources - */ - CpuCount?: number; - /** - * The usable percentage of the available CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof Resources - */ - CpuPercent?: number; - /** - * Maximum IOps for the container system drive (Windows only) - * @type {number} - * @memberof Resources - */ - IOMaximumIOps?: number; - /** - * Maximum IO in bytes per second for the container system drive - * (Windows only). - * - * @type {number} - * @memberof Resources - */ - IOMaximumBandwidth?: number; + /** + * An integer value representing this container's relative CPU weight + * versus other containers. + * + * @type {number} + * @memberof Resources + */ + CpuShares?: number; + /** + * Memory limit in bytes. + * @type {number} + * @memberof Resources + */ + Memory?: number; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If + * the path is not absolute, the path is considered to be relative to the + * `cgroups` path of the init process. Cgroups are created if they do not + * already exist. + * + * @type {string} + * @memberof Resources + */ + CgroupParent?: string; + /** + * Block IO weight (relative weight). + * @type {number} + * @memberof Resources + */ + BlkioWeight?: number; + /** + * Block IO weight (relative device weight) in the form: + * + * ``` + * [{"Path": "device_path", "Weight": weight}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioWeightDevice?: Array; + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceReadBps?: Array; + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceWriteBps?: Array; + /** + * Limit read rate (IO per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceReadIOps?: Array; + /** + * Limit write rate (IO per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceWriteIOps?: Array; + /** + * The length of a CPU period in microseconds. + * @type {number} + * @memberof Resources + */ + CpuPeriod?: number; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @type {number} + * @memberof Resources + */ + CpuQuota?: number; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof Resources + */ + CpuRealtimePeriod?: number; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof Resources + */ + CpuRealtimeRuntime?: number; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * + * @type {string} + * @memberof Resources + */ + CpusetCpus?: string; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + * effective on NUMA systems. + * + * @type {string} + * @memberof Resources + */ + CpusetMems?: string; + /** + * A list of devices to add to the container. + * @type {Array} + * @memberof Resources + */ + Devices?: Array; + /** + * a list of cgroup rules to apply to the container + * @type {Array} + * @memberof Resources + */ + DeviceCgroupRules?: Array; + /** + * A list of requests for devices to be sent to device drivers. + * + * @type {Array} + * @memberof Resources + */ + DeviceRequests?: Array; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + * OCI runtime in use, this option may be ignored. It is no longer supported + * by the default (runc) runtime. + * + * This field is omitted when empty. + * + * @type {number} + * @memberof Resources + */ + KernelMemoryTCP?: number; + /** + * Memory soft limit in bytes. + * @type {number} + * @memberof Resources + */ + MemoryReservation?: number; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + * swap. + * + * @type {number} + * @memberof Resources + */ + MemorySwap?: number; + /** + * Tune a container's memory swappiness behavior. Accepts an integer + * between 0 and 100. + * + * @type {number} + * @memberof Resources + */ + MemorySwappiness?: number; + /** + * CPU quota in units of 10-9 CPUs. + * @type {number} + * @memberof Resources + */ + NanoCpus?: number; + /** + * Disable OOM Killer for the container. + * @type {boolean} + * @memberof Resources + */ + OomKillDisable?: boolean; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof Resources + */ + Init?: boolean | null; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + * to not change. + * + * @type {number} + * @memberof Resources + */ + PidsLimit?: number | null; + /** + * A list of resource limits to set in the container. For example: + * + * ``` + * {"Name": "nofile", "Soft": 1024, "Hard": 2048} + * ``` + * + * @type {Array} + * @memberof Resources + */ + Ulimits?: Array; + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof Resources + */ + CpuCount?: number; + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof Resources + */ + CpuPercent?: number; + /** + * Maximum IOps for the container system drive (Windows only) + * @type {number} + * @memberof Resources + */ + IOMaximumIOps?: number; + /** + * Maximum IO in bytes per second for the container system drive + * (Windows only). + * + * @type {number} + * @memberof Resources + */ + IOMaximumBandwidth?: number; } /** * Check if a given object implements the Resources interface. */ export function instanceOfResources(value: object): value is Resources { - return true; + return true; } export function ResourcesFromJSON(json: any): Resources { - return ResourcesFromJSONTyped(json, false); + return ResourcesFromJSONTyped(json, false); } export function ResourcesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Resources { - if (json == null) { - return json; - } - return { - CpuShares: json["CpuShares"] == null ? undefined : json["CpuShares"], - Memory: json["Memory"] == null ? undefined : json["Memory"], - CgroupParent: json["CgroupParent"] == null ? undefined : json["CgroupParent"], - BlkioWeight: json["BlkioWeight"] == null ? undefined : json["BlkioWeight"], - BlkioWeightDevice: - json["BlkioWeightDevice"] == null - ? undefined - : (json["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON), - BlkioDeviceReadBps: - json["BlkioDeviceReadBps"] == null - ? undefined - : (json["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceWriteBps: - json["BlkioDeviceWriteBps"] == null - ? undefined - : (json["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceReadIOps: - json["BlkioDeviceReadIOps"] == null - ? undefined - : (json["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceFromJSON), - BlkioDeviceWriteIOps: - json["BlkioDeviceWriteIOps"] == null - ? undefined - : (json["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceFromJSON), - CpuPeriod: json["CpuPeriod"] == null ? undefined : json["CpuPeriod"], - CpuQuota: json["CpuQuota"] == null ? undefined : json["CpuQuota"], - CpuRealtimePeriod: json["CpuRealtimePeriod"] == null ? undefined : json["CpuRealtimePeriod"], - CpuRealtimeRuntime: json["CpuRealtimeRuntime"] == null ? undefined : json["CpuRealtimeRuntime"], - CpusetCpus: json["CpusetCpus"] == null ? undefined : json["CpusetCpus"], - CpusetMems: json["CpusetMems"] == null ? undefined : json["CpusetMems"], - Devices: - json["Devices"] == null - ? undefined - : (json["Devices"] as Array).map(DeviceMappingFromJSON), - DeviceCgroupRules: json["DeviceCgroupRules"] == null ? undefined : json["DeviceCgroupRules"], - DeviceRequests: - json["DeviceRequests"] == null - ? undefined - : (json["DeviceRequests"] as Array).map(DeviceRequestFromJSON), - KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], - MemoryReservation: json["MemoryReservation"] == null ? undefined : json["MemoryReservation"], - MemorySwap: json["MemorySwap"] == null ? undefined : json["MemorySwap"], - MemorySwappiness: json["MemorySwappiness"] == null ? undefined : json["MemorySwappiness"], - NanoCpus: json["NanoCpus"] == null ? undefined : json["NanoCpus"], - OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], - Init: json["Init"] == null ? undefined : json["Init"], - PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], - Ulimits: - json["Ulimits"] == null - ? undefined - : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), - CpuCount: json["CpuCount"] == null ? undefined : json["CpuCount"], - CpuPercent: json["CpuPercent"] == null ? undefined : json["CpuPercent"], - IOMaximumIOps: json["IOMaximumIOps"] == null ? undefined : json["IOMaximumIOps"], - IOMaximumBandwidth: json["IOMaximumBandwidth"] == null ? undefined : json["IOMaximumBandwidth"], - }; + if (json == null) { + return json; + } + return { + + 'CpuShares': json['CpuShares'] == null ? undefined : json['CpuShares'], + 'Memory': json['Memory'] == null ? undefined : json['Memory'], + 'CgroupParent': json['CgroupParent'] == null ? undefined : json['CgroupParent'], + 'BlkioWeight': json['BlkioWeight'] == null ? undefined : json['BlkioWeight'], + 'BlkioWeightDevice': json['BlkioWeightDevice'] == null ? undefined : ((json['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON)), + 'BlkioDeviceReadBps': json['BlkioDeviceReadBps'] == null ? undefined : ((json['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceWriteBps': json['BlkioDeviceWriteBps'] == null ? undefined : ((json['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceReadIOps': json['BlkioDeviceReadIOps'] == null ? undefined : ((json['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceFromJSON)), + 'BlkioDeviceWriteIOps': json['BlkioDeviceWriteIOps'] == null ? undefined : ((json['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceFromJSON)), + 'CpuPeriod': json['CpuPeriod'] == null ? undefined : json['CpuPeriod'], + 'CpuQuota': json['CpuQuota'] == null ? undefined : json['CpuQuota'], + 'CpuRealtimePeriod': json['CpuRealtimePeriod'] == null ? undefined : json['CpuRealtimePeriod'], + 'CpuRealtimeRuntime': json['CpuRealtimeRuntime'] == null ? undefined : json['CpuRealtimeRuntime'], + 'CpusetCpus': json['CpusetCpus'] == null ? undefined : json['CpusetCpus'], + 'CpusetMems': json['CpusetMems'] == null ? undefined : json['CpusetMems'], + 'Devices': json['Devices'] == null ? undefined : ((json['Devices'] as Array).map(DeviceMappingFromJSON)), + 'DeviceCgroupRules': json['DeviceCgroupRules'] == null ? undefined : json['DeviceCgroupRules'], + 'DeviceRequests': json['DeviceRequests'] == null ? undefined : ((json['DeviceRequests'] as Array).map(DeviceRequestFromJSON)), + 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], + 'MemoryReservation': json['MemoryReservation'] == null ? undefined : json['MemoryReservation'], + 'MemorySwap': json['MemorySwap'] == null ? undefined : json['MemorySwap'], + 'MemorySwappiness': json['MemorySwappiness'] == null ? undefined : json['MemorySwappiness'], + 'NanoCpus': json['NanoCpus'] == null ? undefined : json['NanoCpus'], + 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], + 'Init': json['Init'] == null ? undefined : json['Init'], + 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], + 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), + 'CpuCount': json['CpuCount'] == null ? undefined : json['CpuCount'], + 'CpuPercent': json['CpuPercent'] == null ? undefined : json['CpuPercent'], + 'IOMaximumIOps': json['IOMaximumIOps'] == null ? undefined : json['IOMaximumIOps'], + 'IOMaximumBandwidth': json['IOMaximumBandwidth'] == null ? undefined : json['IOMaximumBandwidth'], + }; } export function ResourcesToJSON(json: any): Resources { - return ResourcesToJSONTyped(json, false); + return ResourcesToJSONTyped(json, false); } -export function ResourcesToJSONTyped( - value?: Resources | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourcesToJSONTyped(value?: Resources | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CpuShares: value["CpuShares"], - Memory: value["Memory"], - CgroupParent: value["CgroupParent"], - BlkioWeight: value["BlkioWeight"], - BlkioWeightDevice: - value["BlkioWeightDevice"] == null - ? undefined - : (value["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON), - BlkioDeviceReadBps: - value["BlkioDeviceReadBps"] == null - ? undefined - : (value["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceWriteBps: - value["BlkioDeviceWriteBps"] == null - ? undefined - : (value["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceReadIOps: - value["BlkioDeviceReadIOps"] == null - ? undefined - : (value["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceToJSON), - BlkioDeviceWriteIOps: - value["BlkioDeviceWriteIOps"] == null - ? undefined - : (value["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceToJSON), - CpuPeriod: value["CpuPeriod"], - CpuQuota: value["CpuQuota"], - CpuRealtimePeriod: value["CpuRealtimePeriod"], - CpuRealtimeRuntime: value["CpuRealtimeRuntime"], - CpusetCpus: value["CpusetCpus"], - CpusetMems: value["CpusetMems"], - Devices: - value["Devices"] == null - ? undefined - : (value["Devices"] as Array).map(DeviceMappingToJSON), - DeviceCgroupRules: value["DeviceCgroupRules"], - DeviceRequests: - value["DeviceRequests"] == null - ? undefined - : (value["DeviceRequests"] as Array).map(DeviceRequestToJSON), - KernelMemoryTCP: value["KernelMemoryTCP"], - MemoryReservation: value["MemoryReservation"], - MemorySwap: value["MemorySwap"], - MemorySwappiness: value["MemorySwappiness"], - NanoCpus: value["NanoCpus"], - OomKillDisable: value["OomKillDisable"], - Init: value["Init"], - PidsLimit: value["PidsLimit"], - Ulimits: - value["Ulimits"] == null - ? undefined - : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), - CpuCount: value["CpuCount"], - CpuPercent: value["CpuPercent"], - IOMaximumIOps: value["IOMaximumIOps"], - IOMaximumBandwidth: value["IOMaximumBandwidth"], - }; + return { + + 'CpuShares': value['CpuShares'], + 'Memory': value['Memory'], + 'CgroupParent': value['CgroupParent'], + 'BlkioWeight': value['BlkioWeight'], + 'BlkioWeightDevice': value['BlkioWeightDevice'] == null ? undefined : ((value['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON)), + 'BlkioDeviceReadBps': value['BlkioDeviceReadBps'] == null ? undefined : ((value['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceWriteBps': value['BlkioDeviceWriteBps'] == null ? undefined : ((value['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceReadIOps': value['BlkioDeviceReadIOps'] == null ? undefined : ((value['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceToJSON)), + 'BlkioDeviceWriteIOps': value['BlkioDeviceWriteIOps'] == null ? undefined : ((value['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceToJSON)), + 'CpuPeriod': value['CpuPeriod'], + 'CpuQuota': value['CpuQuota'], + 'CpuRealtimePeriod': value['CpuRealtimePeriod'], + 'CpuRealtimeRuntime': value['CpuRealtimeRuntime'], + 'CpusetCpus': value['CpusetCpus'], + 'CpusetMems': value['CpusetMems'], + 'Devices': value['Devices'] == null ? undefined : ((value['Devices'] as Array).map(DeviceMappingToJSON)), + 'DeviceCgroupRules': value['DeviceCgroupRules'], + 'DeviceRequests': value['DeviceRequests'] == null ? undefined : ((value['DeviceRequests'] as Array).map(DeviceRequestToJSON)), + 'KernelMemoryTCP': value['KernelMemoryTCP'], + 'MemoryReservation': value['MemoryReservation'], + 'MemorySwap': value['MemorySwap'], + 'MemorySwappiness': value['MemorySwappiness'], + 'NanoCpus': value['NanoCpus'], + 'OomKillDisable': value['OomKillDisable'], + 'Init': value['Init'], + 'PidsLimit': value['PidsLimit'], + 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), + 'CpuCount': value['CpuCount'], + 'CpuPercent': value['CpuPercent'], + 'IOMaximumIOps': value['IOMaximumIOps'], + 'IOMaximumBandwidth': value['IOMaximumBandwidth'], + }; } + diff --git a/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts b/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts index 92fb121b3f..4b84a6e74d 100644 --- a/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts +++ b/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts @@ -2,79 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ResourcesBlkioWeightDeviceInner */ export interface ResourcesBlkioWeightDeviceInner { - /** - * - * @type {string} - * @memberof ResourcesBlkioWeightDeviceInner - */ - Path?: string; - /** - * - * @type {number} - * @memberof ResourcesBlkioWeightDeviceInner - */ - Weight?: number; + /** + * + * @type {string} + * @memberof ResourcesBlkioWeightDeviceInner + */ + Path?: string; + /** + * + * @type {number} + * @memberof ResourcesBlkioWeightDeviceInner + */ + Weight?: number; } /** * Check if a given object implements the ResourcesBlkioWeightDeviceInner interface. */ -export function instanceOfResourcesBlkioWeightDeviceInner( - value: object, -): value is ResourcesBlkioWeightDeviceInner { - return true; +export function instanceOfResourcesBlkioWeightDeviceInner(value: object): value is ResourcesBlkioWeightDeviceInner { + return true; } -export function ResourcesBlkioWeightDeviceInnerFromJSON( - json: any, -): ResourcesBlkioWeightDeviceInner { - return ResourcesBlkioWeightDeviceInnerFromJSONTyped(json, false); +export function ResourcesBlkioWeightDeviceInnerFromJSON(json: any): ResourcesBlkioWeightDeviceInner { + return ResourcesBlkioWeightDeviceInnerFromJSONTyped(json, false); } -export function ResourcesBlkioWeightDeviceInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResourcesBlkioWeightDeviceInner { - if (json == null) { - return json; - } - return { - Path: json["Path"] == null ? undefined : json["Path"], - Weight: json["Weight"] == null ? undefined : json["Weight"], - }; +export function ResourcesBlkioWeightDeviceInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourcesBlkioWeightDeviceInner { + if (json == null) { + return json; + } + return { + + 'Path': json['Path'] == null ? undefined : json['Path'], + 'Weight': json['Weight'] == null ? undefined : json['Weight'], + }; } export function ResourcesBlkioWeightDeviceInnerToJSON(json: any): ResourcesBlkioWeightDeviceInner { - return ResourcesBlkioWeightDeviceInnerToJSONTyped(json, false); + return ResourcesBlkioWeightDeviceInnerToJSONTyped(json, false); } -export function ResourcesBlkioWeightDeviceInnerToJSONTyped( - value?: ResourcesBlkioWeightDeviceInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourcesBlkioWeightDeviceInnerToJSONTyped(value?: ResourcesBlkioWeightDeviceInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Path: value["Path"], - Weight: value["Weight"], - }; + return { + + 'Path': value['Path'], + 'Weight': value['Weight'], + }; } + diff --git a/src/clients/docker/models/ResourcesUlimitsInner.ts b/src/clients/docker/models/ResourcesUlimitsInner.ts index 4bba13c868..15ae5acd0a 100644 --- a/src/clients/docker/models/ResourcesUlimitsInner.ts +++ b/src/clients/docker/models/ResourcesUlimitsInner.ts @@ -2,83 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ResourcesUlimitsInner */ export interface ResourcesUlimitsInner { - /** - * Name of ulimit - * @type {string} - * @memberof ResourcesUlimitsInner - */ - Name?: string; - /** - * Soft limit - * @type {number} - * @memberof ResourcesUlimitsInner - */ - Soft?: number; - /** - * Hard limit - * @type {number} - * @memberof ResourcesUlimitsInner - */ - Hard?: number; + /** + * Name of ulimit + * @type {string} + * @memberof ResourcesUlimitsInner + */ + Name?: string; + /** + * Soft limit + * @type {number} + * @memberof ResourcesUlimitsInner + */ + Soft?: number; + /** + * Hard limit + * @type {number} + * @memberof ResourcesUlimitsInner + */ + Hard?: number; } /** * Check if a given object implements the ResourcesUlimitsInner interface. */ export function instanceOfResourcesUlimitsInner(value: object): value is ResourcesUlimitsInner { - return true; + return true; } export function ResourcesUlimitsInnerFromJSON(json: any): ResourcesUlimitsInner { - return ResourcesUlimitsInnerFromJSONTyped(json, false); + return ResourcesUlimitsInnerFromJSONTyped(json, false); } -export function ResourcesUlimitsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResourcesUlimitsInner { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Soft: json["Soft"] == null ? undefined : json["Soft"], - Hard: json["Hard"] == null ? undefined : json["Hard"], - }; +export function ResourcesUlimitsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourcesUlimitsInner { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Soft': json['Soft'] == null ? undefined : json['Soft'], + 'Hard': json['Hard'] == null ? undefined : json['Hard'], + }; } export function ResourcesUlimitsInnerToJSON(json: any): ResourcesUlimitsInner { - return ResourcesUlimitsInnerToJSONTyped(json, false); + return ResourcesUlimitsInnerToJSONTyped(json, false); } -export function ResourcesUlimitsInnerToJSONTyped( - value?: ResourcesUlimitsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourcesUlimitsInnerToJSONTyped(value?: ResourcesUlimitsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Soft: value["Soft"], - Hard: value["Hard"], - }; + return { + + 'Name': value['Name'], + 'Soft': value['Soft'], + 'Hard': value['Hard'], + }; } + diff --git a/src/clients/docker/models/RestartPolicy.ts b/src/clients/docker/models/RestartPolicy.ts index 3df8150253..9ba8d7691b 100644 --- a/src/clients/docker/models/RestartPolicy.ts +++ b/src/clients/docker/models/RestartPolicy.ts @@ -2,95 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface RestartPolicy */ export interface RestartPolicy { - /** - * - Empty string means not to restart - * - `no` Do not automatically restart - * - `always` Always restart - * - `unless-stopped` Restart always except when the user has manually stopped the container - * - `on-failure` Restart only when the container exit code is non-zero - * - * @type {string} - * @memberof RestartPolicy - */ - Name?: RestartPolicyNameEnum; - /** - * If `on-failure` is used, the number of times to retry before giving up. - * - * @type {number} - * @memberof RestartPolicy - */ - MaximumRetryCount?: number; + /** + * - Empty string means not to restart + * - `no` Do not automatically restart + * - `always` Always restart + * - `unless-stopped` Restart always except when the user has manually stopped the container + * - `on-failure` Restart only when the container exit code is non-zero + * + * @type {string} + * @memberof RestartPolicy + */ + Name?: RestartPolicyNameEnum; + /** + * If `on-failure` is used, the number of times to retry before giving up. + * + * @type {number} + * @memberof RestartPolicy + */ + MaximumRetryCount?: number; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum RestartPolicyNameEnum { - Empty = "", - No = "no", - Always = "always", - UnlessStopped = "unless-stopped", - OnFailure = "on-failure", + Empty = '', + No = 'no', + Always = 'always', + UnlessStopped = 'unless-stopped', + OnFailure = 'on-failure' } + /** * Check if a given object implements the RestartPolicy interface. */ export function instanceOfRestartPolicy(value: object): value is RestartPolicy { - return true; + return true; } export function RestartPolicyFromJSON(json: any): RestartPolicy { - return RestartPolicyFromJSONTyped(json, false); + return RestartPolicyFromJSONTyped(json, false); } export function RestartPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): RestartPolicy { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - MaximumRetryCount: json["MaximumRetryCount"] == null ? undefined : json["MaximumRetryCount"], - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'MaximumRetryCount': json['MaximumRetryCount'] == null ? undefined : json['MaximumRetryCount'], + }; } export function RestartPolicyToJSON(json: any): RestartPolicy { - return RestartPolicyToJSONTyped(json, false); + return RestartPolicyToJSONTyped(json, false); } -export function RestartPolicyToJSONTyped( - value?: RestartPolicy | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RestartPolicyToJSONTyped(value?: RestartPolicy | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - MaximumRetryCount: value["MaximumRetryCount"], - }; + return { + + 'Name': value['Name'], + 'MaximumRetryCount': value['MaximumRetryCount'], + }; } + diff --git a/src/clients/docker/models/Runtime.ts b/src/clients/docker/models/Runtime.ts index f23e60d2ee..4c36e43c60 100644 --- a/src/clients/docker/models/Runtime.ts +++ b/src/clients/docker/models/Runtime.ts @@ -2,83 +2,83 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface Runtime */ export interface Runtime { - /** - * Name and, optional, path, of the OCI executable binary. - * - * If the path is omitted, the daemon searches the host's `$PATH` for the - * binary and uses the first result. - * - * @type {string} - * @memberof Runtime - */ - path?: string; - /** - * List of command-line arguments to pass to the runtime when invoked. - * - * @type {Array} - * @memberof Runtime - */ - runtimeArgs?: Array | null; + /** + * Name and, optional, path, of the OCI executable binary. + * + * If the path is omitted, the daemon searches the host's `$PATH` for the + * binary and uses the first result. + * + * @type {string} + * @memberof Runtime + */ + path?: string; + /** + * List of command-line arguments to pass to the runtime when invoked. + * + * @type {Array} + * @memberof Runtime + */ + runtimeArgs?: Array | null; } /** * Check if a given object implements the Runtime interface. */ export function instanceOfRuntime(value: object): value is Runtime { - return true; + return true; } export function RuntimeFromJSON(json: any): Runtime { - return RuntimeFromJSONTyped(json, false); + return RuntimeFromJSONTyped(json, false); } export function RuntimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Runtime { - if (json == null) { - return json; - } - return { - path: json["path"] == null ? undefined : json["path"], - runtimeArgs: json["runtimeArgs"] == null ? undefined : json["runtimeArgs"], - }; + if (json == null) { + return json; + } + return { + + 'path': json['path'] == null ? undefined : json['path'], + 'runtimeArgs': json['runtimeArgs'] == null ? undefined : json['runtimeArgs'], + }; } export function RuntimeToJSON(json: any): Runtime { - return RuntimeToJSONTyped(json, false); + return RuntimeToJSONTyped(json, false); } -export function RuntimeToJSONTyped( - value?: Runtime | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RuntimeToJSONTyped(value?: Runtime | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - runtimeArgs: value["runtimeArgs"], - }; + return { + + 'path': value['path'], + 'runtimeArgs': value['runtimeArgs'], + }; } + diff --git a/src/clients/docker/models/Secret.ts b/src/clients/docker/models/Secret.ts index 8b9b1a72c8..dbd9a866e7 100644 --- a/src/clients/docker/models/Secret.ts +++ b/src/clients/docker/models/Secret.ts @@ -2,111 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { SecretSpec } from "./SecretSpec"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { SecretSpec } from './SecretSpec'; import { - SecretSpecFromJSON, - SecretSpecFromJSONTyped, - SecretSpecToJSON, - SecretSpecToJSONTyped, -} from "./SecretSpec"; + SecretSpecFromJSON, + SecretSpecFromJSONTyped, + SecretSpecToJSON, + SecretSpecToJSONTyped, +} from './SecretSpec'; /** - * + * * @export * @interface Secret */ export interface Secret { - /** - * - * @type {string} - * @memberof Secret - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Secret - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Secret - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Secret - */ - UpdatedAt?: string; - /** - * - * @type {SecretSpec} - * @memberof Secret - */ - Spec?: SecretSpec; + /** + * + * @type {string} + * @memberof Secret + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Secret + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Secret + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Secret + */ + UpdatedAt?: string; + /** + * + * @type {SecretSpec} + * @memberof Secret + */ + Spec?: SecretSpec; } /** * Check if a given object implements the Secret interface. */ export function instanceOfSecret(value: object): value is Secret { - return true; + return true; } export function SecretFromJSON(json: any): Secret { - return SecretFromJSONTyped(json, false); + return SecretFromJSONTyped(json, false); } export function SecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): Secret { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : SecretSpecFromJSON(json["Spec"]), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : SecretSpecFromJSON(json['Spec']), + }; } export function SecretToJSON(json: any): Secret { - return SecretToJSONTyped(json, false); + return SecretToJSONTyped(json, false); } -export function SecretToJSONTyped( - value?: Secret | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SecretToJSONTyped(value?: Secret | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: SecretSpecToJSON(value["Spec"]), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': SecretSpecToJSON(value['Spec']), + }; } + diff --git a/src/clients/docker/models/SecretCreateRequest.ts b/src/clients/docker/models/SecretCreateRequest.ts index b0bfb2b3fa..89c46102d2 100644 --- a/src/clients/docker/models/SecretCreateRequest.ts +++ b/src/clients/docker/models/SecretCreateRequest.ts @@ -2,107 +2,109 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Driver } from "./Driver"; -import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; +import { mapValues } from '../runtime'; +import type { Driver } from './Driver'; +import { + DriverFromJSON, + DriverFromJSONTyped, + DriverToJSON, + DriverToJSONTyped, +} from './Driver'; /** - * + * * @export * @interface SecretCreateRequest */ export interface SecretCreateRequest { - /** - * User-defined name of the secret. - * @type {string} - * @memberof SecretCreateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof SecretCreateRequest - */ - Labels?: { [key: string]: string }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. - * - * This field is only used to _create_ a secret, and is not returned by - * other endpoints. - * - * @type {string} - * @memberof SecretCreateRequest - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof SecretCreateRequest - */ - Driver?: Driver; - /** - * - * @type {Driver} - * @memberof SecretCreateRequest - */ - Templating?: Driver; + /** + * User-defined name of the secret. + * @type {string} + * @memberof SecretCreateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof SecretCreateRequest + */ + Labels?: { [key: string]: string; }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * data to store as secret. + * + * This field is only used to _create_ a secret, and is not returned by + * other endpoints. + * + * @type {string} + * @memberof SecretCreateRequest + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof SecretCreateRequest + */ + Driver?: Driver; + /** + * + * @type {Driver} + * @memberof SecretCreateRequest + */ + Templating?: Driver; } /** * Check if a given object implements the SecretCreateRequest interface. */ export function instanceOfSecretCreateRequest(value: object): value is SecretCreateRequest { - return true; + return true; } export function SecretCreateRequestFromJSON(json: any): SecretCreateRequest { - return SecretCreateRequestFromJSONTyped(json, false); + return SecretCreateRequestFromJSONTyped(json, false); } -export function SecretCreateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SecretCreateRequest { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Data: json["Data"] == null ? undefined : json["Data"], - Driver: json["Driver"] == null ? undefined : DriverFromJSON(json["Driver"]), - Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), - }; +export function SecretCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretCreateRequest { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Data': json['Data'] == null ? undefined : json['Data'], + 'Driver': json['Driver'] == null ? undefined : DriverFromJSON(json['Driver']), + 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), + }; } export function SecretCreateRequestToJSON(json: any): SecretCreateRequest { - return SecretCreateRequestToJSONTyped(json, false); + return SecretCreateRequestToJSONTyped(json, false); } -export function SecretCreateRequestToJSONTyped( - value?: SecretCreateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SecretCreateRequestToJSONTyped(value?: SecretCreateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - Data: value["Data"], - Driver: DriverToJSON(value["Driver"]), - Templating: DriverToJSON(value["Templating"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Data': value['Data'], + 'Driver': DriverToJSON(value['Driver']), + 'Templating': DriverToJSON(value['Templating']), + }; } + diff --git a/src/clients/docker/models/SecretSpec.ts b/src/clients/docker/models/SecretSpec.ts index cae65d57ea..540b76f551 100644 --- a/src/clients/docker/models/SecretSpec.ts +++ b/src/clients/docker/models/SecretSpec.ts @@ -2,104 +2,109 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Driver } from "./Driver"; -import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; +import { mapValues } from '../runtime'; +import type { Driver } from './Driver'; +import { + DriverFromJSON, + DriverFromJSONTyped, + DriverToJSON, + DriverToJSONTyped, +} from './Driver'; /** - * + * * @export * @interface SecretSpec */ export interface SecretSpec { - /** - * User-defined name of the secret. - * @type {string} - * @memberof SecretSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof SecretSpec - */ - Labels?: { [key: string]: string }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. - * - * This field is only used to _create_ a secret, and is not returned by - * other endpoints. - * - * @type {string} - * @memberof SecretSpec - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof SecretSpec - */ - Driver?: Driver; - /** - * - * @type {Driver} - * @memberof SecretSpec - */ - Templating?: Driver; + /** + * User-defined name of the secret. + * @type {string} + * @memberof SecretSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof SecretSpec + */ + Labels?: { [key: string]: string; }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * data to store as secret. + * + * This field is only used to _create_ a secret, and is not returned by + * other endpoints. + * + * @type {string} + * @memberof SecretSpec + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof SecretSpec + */ + Driver?: Driver; + /** + * + * @type {Driver} + * @memberof SecretSpec + */ + Templating?: Driver; } /** * Check if a given object implements the SecretSpec interface. */ export function instanceOfSecretSpec(value: object): value is SecretSpec { - return true; + return true; } export function SecretSpecFromJSON(json: any): SecretSpec { - return SecretSpecFromJSONTyped(json, false); + return SecretSpecFromJSONTyped(json, false); } export function SecretSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSpec { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Data: json["Data"] == null ? undefined : json["Data"], - Driver: json["Driver"] == null ? undefined : DriverFromJSON(json["Driver"]), - Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Data': json['Data'] == null ? undefined : json['Data'], + 'Driver': json['Driver'] == null ? undefined : DriverFromJSON(json['Driver']), + 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), + }; } export function SecretSpecToJSON(json: any): SecretSpec { - return SecretSpecToJSONTyped(json, false); + return SecretSpecToJSONTyped(json, false); } -export function SecretSpecToJSONTyped( - value?: SecretSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SecretSpecToJSONTyped(value?: SecretSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - Data: value["Data"], - Driver: DriverToJSON(value["Driver"]), - Templating: DriverToJSON(value["Templating"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Data': value['Data'], + 'Driver': DriverToJSON(value['Driver']), + 'Templating': DriverToJSON(value['Templating']), + }; } + diff --git a/src/clients/docker/models/Service.ts b/src/clients/docker/models/Service.ts index 8f612abbb3..09450e8ba5 100644 --- a/src/clients/docker/models/Service.ts +++ b/src/clients/docker/models/Service.ts @@ -2,175 +2,171 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { ServiceServiceStatus } from "./ServiceServiceStatus"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { ServiceServiceStatus } from './ServiceServiceStatus'; import { - ServiceServiceStatusFromJSON, - ServiceServiceStatusFromJSONTyped, - ServiceServiceStatusToJSON, - ServiceServiceStatusToJSONTyped, -} from "./ServiceServiceStatus"; -import type { ServiceJobStatus } from "./ServiceJobStatus"; + ServiceServiceStatusFromJSON, + ServiceServiceStatusFromJSONTyped, + ServiceServiceStatusToJSON, + ServiceServiceStatusToJSONTyped, +} from './ServiceServiceStatus'; +import type { ServiceJobStatus } from './ServiceJobStatus'; import { - ServiceJobStatusFromJSON, - ServiceJobStatusFromJSONTyped, - ServiceJobStatusToJSON, - ServiceJobStatusToJSONTyped, -} from "./ServiceJobStatus"; -import type { ServiceSpec } from "./ServiceSpec"; + ServiceJobStatusFromJSON, + ServiceJobStatusFromJSONTyped, + ServiceJobStatusToJSON, + ServiceJobStatusToJSONTyped, +} from './ServiceJobStatus'; +import type { ServiceSpec } from './ServiceSpec'; import { - ServiceSpecFromJSON, - ServiceSpecFromJSONTyped, - ServiceSpecToJSON, - ServiceSpecToJSONTyped, -} from "./ServiceSpec"; -import type { ServiceUpdateStatus } from "./ServiceUpdateStatus"; + ServiceSpecFromJSON, + ServiceSpecFromJSONTyped, + ServiceSpecToJSON, + ServiceSpecToJSONTyped, +} from './ServiceSpec'; +import type { ServiceUpdateStatus } from './ServiceUpdateStatus'; import { - ServiceUpdateStatusFromJSON, - ServiceUpdateStatusFromJSONTyped, - ServiceUpdateStatusToJSON, - ServiceUpdateStatusToJSONTyped, -} from "./ServiceUpdateStatus"; -import type { ServiceEndpoint } from "./ServiceEndpoint"; + ServiceUpdateStatusFromJSON, + ServiceUpdateStatusFromJSONTyped, + ServiceUpdateStatusToJSON, + ServiceUpdateStatusToJSONTyped, +} from './ServiceUpdateStatus'; +import type { ServiceEndpoint } from './ServiceEndpoint'; import { - ServiceEndpointFromJSON, - ServiceEndpointFromJSONTyped, - ServiceEndpointToJSON, - ServiceEndpointToJSONTyped, -} from "./ServiceEndpoint"; + ServiceEndpointFromJSON, + ServiceEndpointFromJSONTyped, + ServiceEndpointToJSON, + ServiceEndpointToJSONTyped, +} from './ServiceEndpoint'; /** - * + * * @export * @interface Service */ export interface Service { - /** - * - * @type {string} - * @memberof Service - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Service - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Service - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Service - */ - UpdatedAt?: string; - /** - * - * @type {ServiceSpec} - * @memberof Service - */ - Spec?: ServiceSpec; - /** - * - * @type {ServiceEndpoint} - * @memberof Service - */ - Endpoint?: ServiceEndpoint; - /** - * - * @type {ServiceUpdateStatus} - * @memberof Service - */ - UpdateStatus?: ServiceUpdateStatus; - /** - * - * @type {ServiceServiceStatus} - * @memberof Service - */ - ServiceStatus?: ServiceServiceStatus; - /** - * - * @type {ServiceJobStatus} - * @memberof Service - */ - JobStatus?: ServiceJobStatus; + /** + * + * @type {string} + * @memberof Service + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Service + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Service + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Service + */ + UpdatedAt?: string; + /** + * + * @type {ServiceSpec} + * @memberof Service + */ + Spec?: ServiceSpec; + /** + * + * @type {ServiceEndpoint} + * @memberof Service + */ + Endpoint?: ServiceEndpoint; + /** + * + * @type {ServiceUpdateStatus} + * @memberof Service + */ + UpdateStatus?: ServiceUpdateStatus; + /** + * + * @type {ServiceServiceStatus} + * @memberof Service + */ + ServiceStatus?: ServiceServiceStatus; + /** + * + * @type {ServiceJobStatus} + * @memberof Service + */ + JobStatus?: ServiceJobStatus; } /** * Check if a given object implements the Service interface. */ export function instanceOfService(value: object): value is Service { - return true; + return true; } export function ServiceFromJSON(json: any): Service { - return ServiceFromJSONTyped(json, false); + return ServiceFromJSONTyped(json, false); } export function ServiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Service { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : ServiceSpecFromJSON(json["Spec"]), - Endpoint: json["Endpoint"] == null ? undefined : ServiceEndpointFromJSON(json["Endpoint"]), - UpdateStatus: - json["UpdateStatus"] == null ? undefined : ServiceUpdateStatusFromJSON(json["UpdateStatus"]), - ServiceStatus: - json["ServiceStatus"] == null - ? undefined - : ServiceServiceStatusFromJSON(json["ServiceStatus"]), - JobStatus: json["JobStatus"] == null ? undefined : ServiceJobStatusFromJSON(json["JobStatus"]), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : ServiceSpecFromJSON(json['Spec']), + 'Endpoint': json['Endpoint'] == null ? undefined : ServiceEndpointFromJSON(json['Endpoint']), + 'UpdateStatus': json['UpdateStatus'] == null ? undefined : ServiceUpdateStatusFromJSON(json['UpdateStatus']), + 'ServiceStatus': json['ServiceStatus'] == null ? undefined : ServiceServiceStatusFromJSON(json['ServiceStatus']), + 'JobStatus': json['JobStatus'] == null ? undefined : ServiceJobStatusFromJSON(json['JobStatus']), + }; } export function ServiceToJSON(json: any): Service { - return ServiceToJSONTyped(json, false); + return ServiceToJSONTyped(json, false); } -export function ServiceToJSONTyped( - value?: Service | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceToJSONTyped(value?: Service | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: ServiceSpecToJSON(value["Spec"]), - Endpoint: ServiceEndpointToJSON(value["Endpoint"]), - UpdateStatus: ServiceUpdateStatusToJSON(value["UpdateStatus"]), - ServiceStatus: ServiceServiceStatusToJSON(value["ServiceStatus"]), - JobStatus: ServiceJobStatusToJSON(value["JobStatus"]), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': ServiceSpecToJSON(value['Spec']), + 'Endpoint': ServiceEndpointToJSON(value['Endpoint']), + 'UpdateStatus': ServiceUpdateStatusToJSON(value['UpdateStatus']), + 'ServiceStatus': ServiceServiceStatusToJSON(value['ServiceStatus']), + 'JobStatus': ServiceJobStatusToJSON(value['JobStatus']), + }; } + diff --git a/src/clients/docker/models/ServiceCreateRequest.ts b/src/clients/docker/models/ServiceCreateRequest.ts index ded156f72c..39cdec6965 100644 --- a/src/clients/docker/models/ServiceCreateRequest.ts +++ b/src/clients/docker/models/ServiceCreateRequest.ts @@ -2,179 +2,163 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; +import { mapValues } from '../runtime'; +import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from "./NetworkAttachmentConfig"; -import type { ServiceSpecRollbackConfig } from "./ServiceSpecRollbackConfig"; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from './NetworkAttachmentConfig'; +import type { ServiceSpecRollbackConfig } from './ServiceSpecRollbackConfig'; import { - ServiceSpecRollbackConfigFromJSON, - ServiceSpecRollbackConfigFromJSONTyped, - ServiceSpecRollbackConfigToJSON, - ServiceSpecRollbackConfigToJSONTyped, -} from "./ServiceSpecRollbackConfig"; -import type { ServiceSpecUpdateConfig } from "./ServiceSpecUpdateConfig"; + ServiceSpecRollbackConfigFromJSON, + ServiceSpecRollbackConfigFromJSONTyped, + ServiceSpecRollbackConfigToJSON, + ServiceSpecRollbackConfigToJSONTyped, +} from './ServiceSpecRollbackConfig'; +import type { ServiceSpecUpdateConfig } from './ServiceSpecUpdateConfig'; import { - ServiceSpecUpdateConfigFromJSON, - ServiceSpecUpdateConfigFromJSONTyped, - ServiceSpecUpdateConfigToJSON, - ServiceSpecUpdateConfigToJSONTyped, -} from "./ServiceSpecUpdateConfig"; -import type { EndpointSpec } from "./EndpointSpec"; + ServiceSpecUpdateConfigFromJSON, + ServiceSpecUpdateConfigFromJSONTyped, + ServiceSpecUpdateConfigToJSON, + ServiceSpecUpdateConfigToJSONTyped, +} from './ServiceSpecUpdateConfig'; +import type { EndpointSpec } from './EndpointSpec'; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from "./EndpointSpec"; -import type { TaskSpec } from "./TaskSpec"; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from './EndpointSpec'; +import type { TaskSpec } from './TaskSpec'; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from "./TaskSpec"; -import type { ServiceSpecMode } from "./ServiceSpecMode"; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from './TaskSpec'; +import type { ServiceSpecMode } from './ServiceSpecMode'; import { - ServiceSpecModeFromJSON, - ServiceSpecModeFromJSONTyped, - ServiceSpecModeToJSON, - ServiceSpecModeToJSONTyped, -} from "./ServiceSpecMode"; + ServiceSpecModeFromJSON, + ServiceSpecModeFromJSONTyped, + ServiceSpecModeToJSON, + ServiceSpecModeToJSONTyped, +} from './ServiceSpecMode'; /** - * + * * @export * @interface ServiceCreateRequest */ export interface ServiceCreateRequest { - /** - * Name of the service. - * @type {string} - * @memberof ServiceCreateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ServiceCreateRequest - */ - Labels?: { [key: string]: string }; - /** - * - * @type {TaskSpec} - * @memberof ServiceCreateRequest - */ - TaskTemplate?: TaskSpec; - /** - * - * @type {ServiceSpecMode} - * @memberof ServiceCreateRequest - */ - Mode?: ServiceSpecMode; - /** - * - * @type {ServiceSpecUpdateConfig} - * @memberof ServiceCreateRequest - */ - UpdateConfig?: ServiceSpecUpdateConfig; - /** - * - * @type {ServiceSpecRollbackConfig} - * @memberof ServiceCreateRequest - */ - RollbackConfig?: ServiceSpecRollbackConfig; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof ServiceCreateRequest - */ - Networks?: Array; - /** - * - * @type {EndpointSpec} - * @memberof ServiceCreateRequest - */ - EndpointSpec?: EndpointSpec; + /** + * Name of the service. + * @type {string} + * @memberof ServiceCreateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ServiceCreateRequest + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {TaskSpec} + * @memberof ServiceCreateRequest + */ + TaskTemplate?: TaskSpec; + /** + * + * @type {ServiceSpecMode} + * @memberof ServiceCreateRequest + */ + Mode?: ServiceSpecMode; + /** + * + * @type {ServiceSpecUpdateConfig} + * @memberof ServiceCreateRequest + */ + UpdateConfig?: ServiceSpecUpdateConfig; + /** + * + * @type {ServiceSpecRollbackConfig} + * @memberof ServiceCreateRequest + */ + RollbackConfig?: ServiceSpecRollbackConfig; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof ServiceCreateRequest + */ + Networks?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceCreateRequest + */ + EndpointSpec?: EndpointSpec; } /** * Check if a given object implements the ServiceCreateRequest interface. */ export function instanceOfServiceCreateRequest(value: object): value is ServiceCreateRequest { - return true; + return true; } export function ServiceCreateRequestFromJSON(json: any): ServiceCreateRequest { - return ServiceCreateRequestFromJSONTyped(json, false); + return ServiceCreateRequestFromJSONTyped(json, false); } -export function ServiceCreateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceCreateRequest { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - TaskTemplate: json["TaskTemplate"] == null ? undefined : TaskSpecFromJSON(json["TaskTemplate"]), - Mode: json["Mode"] == null ? undefined : ServiceSpecModeFromJSON(json["Mode"]), - UpdateConfig: - json["UpdateConfig"] == null - ? undefined - : ServiceSpecUpdateConfigFromJSON(json["UpdateConfig"]), - RollbackConfig: - json["RollbackConfig"] == null - ? undefined - : ServiceSpecRollbackConfigFromJSON(json["RollbackConfig"]), - Networks: - json["Networks"] == null - ? undefined - : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), - EndpointSpec: - json["EndpointSpec"] == null ? undefined : EndpointSpecFromJSON(json["EndpointSpec"]), - }; +export function ServiceCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceCreateRequest { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'TaskTemplate': json['TaskTemplate'] == null ? undefined : TaskSpecFromJSON(json['TaskTemplate']), + 'Mode': json['Mode'] == null ? undefined : ServiceSpecModeFromJSON(json['Mode']), + 'UpdateConfig': json['UpdateConfig'] == null ? undefined : ServiceSpecUpdateConfigFromJSON(json['UpdateConfig']), + 'RollbackConfig': json['RollbackConfig'] == null ? undefined : ServiceSpecRollbackConfigFromJSON(json['RollbackConfig']), + 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), + 'EndpointSpec': json['EndpointSpec'] == null ? undefined : EndpointSpecFromJSON(json['EndpointSpec']), + }; } export function ServiceCreateRequestToJSON(json: any): ServiceCreateRequest { - return ServiceCreateRequestToJSONTyped(json, false); + return ServiceCreateRequestToJSONTyped(json, false); } -export function ServiceCreateRequestToJSONTyped( - value?: ServiceCreateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceCreateRequestToJSONTyped(value?: ServiceCreateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - TaskTemplate: TaskSpecToJSON(value["TaskTemplate"]), - Mode: ServiceSpecModeToJSON(value["Mode"]), - UpdateConfig: ServiceSpecUpdateConfigToJSON(value["UpdateConfig"]), - RollbackConfig: ServiceSpecRollbackConfigToJSON(value["RollbackConfig"]), - Networks: - value["Networks"] == null - ? undefined - : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), - EndpointSpec: EndpointSpecToJSON(value["EndpointSpec"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'TaskTemplate': TaskSpecToJSON(value['TaskTemplate']), + 'Mode': ServiceSpecModeToJSON(value['Mode']), + 'UpdateConfig': ServiceSpecUpdateConfigToJSON(value['UpdateConfig']), + 'RollbackConfig': ServiceSpecRollbackConfigToJSON(value['RollbackConfig']), + 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), + 'EndpointSpec': EndpointSpecToJSON(value['EndpointSpec']), + }; } + diff --git a/src/clients/docker/models/ServiceCreateResponse.ts b/src/clients/docker/models/ServiceCreateResponse.ts index 3428a971a4..8501d0fc25 100644 --- a/src/clients/docker/models/ServiceCreateResponse.ts +++ b/src/clients/docker/models/ServiceCreateResponse.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ServiceCreateResponse */ export interface ServiceCreateResponse { - /** - * The ID of the created service. - * @type {string} - * @memberof ServiceCreateResponse - */ - ID?: string; - /** - * Optional warning message - * @type {string} - * @memberof ServiceCreateResponse - */ - Warning?: string; + /** + * The ID of the created service. + * @type {string} + * @memberof ServiceCreateResponse + */ + ID?: string; + /** + * Optional warning message + * @type {string} + * @memberof ServiceCreateResponse + */ + Warning?: string; } /** * Check if a given object implements the ServiceCreateResponse interface. */ export function instanceOfServiceCreateResponse(value: object): value is ServiceCreateResponse { - return true; + return true; } export function ServiceCreateResponseFromJSON(json: any): ServiceCreateResponse { - return ServiceCreateResponseFromJSONTyped(json, false); + return ServiceCreateResponseFromJSONTyped(json, false); } -export function ServiceCreateResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceCreateResponse { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Warning: json["Warning"] == null ? undefined : json["Warning"], - }; +export function ServiceCreateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceCreateResponse { + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Warning': json['Warning'] == null ? undefined : json['Warning'], + }; } export function ServiceCreateResponseToJSON(json: any): ServiceCreateResponse { - return ServiceCreateResponseToJSONTyped(json, false); + return ServiceCreateResponseToJSONTyped(json, false); } -export function ServiceCreateResponseToJSONTyped( - value?: ServiceCreateResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceCreateResponseToJSONTyped(value?: ServiceCreateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Warning: value["Warning"], - }; + return { + + 'ID': value['ID'], + 'Warning': value['Warning'], + }; } + diff --git a/src/clients/docker/models/ServiceEndpoint.ts b/src/clients/docker/models/ServiceEndpoint.ts index b568bd65d0..74f653d2ac 100644 --- a/src/clients/docker/models/ServiceEndpoint.ts +++ b/src/clients/docker/models/ServiceEndpoint.ts @@ -2,117 +2,102 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ServiceEndpointVirtualIPsInner } from "./ServiceEndpointVirtualIPsInner"; +import { mapValues } from '../runtime'; +import type { ServiceEndpointVirtualIPsInner } from './ServiceEndpointVirtualIPsInner'; import { - ServiceEndpointVirtualIPsInnerFromJSON, - ServiceEndpointVirtualIPsInnerFromJSONTyped, - ServiceEndpointVirtualIPsInnerToJSON, - ServiceEndpointVirtualIPsInnerToJSONTyped, -} from "./ServiceEndpointVirtualIPsInner"; -import type { EndpointSpec } from "./EndpointSpec"; + ServiceEndpointVirtualIPsInnerFromJSON, + ServiceEndpointVirtualIPsInnerFromJSONTyped, + ServiceEndpointVirtualIPsInnerToJSON, + ServiceEndpointVirtualIPsInnerToJSONTyped, +} from './ServiceEndpointVirtualIPsInner'; +import type { EndpointSpec } from './EndpointSpec'; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from "./EndpointSpec"; -import type { EndpointPortConfig } from "./EndpointPortConfig"; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from './EndpointSpec'; +import type { EndpointPortConfig } from './EndpointPortConfig'; import { - EndpointPortConfigFromJSON, - EndpointPortConfigFromJSONTyped, - EndpointPortConfigToJSON, - EndpointPortConfigToJSONTyped, -} from "./EndpointPortConfig"; + EndpointPortConfigFromJSON, + EndpointPortConfigFromJSONTyped, + EndpointPortConfigToJSON, + EndpointPortConfigToJSONTyped, +} from './EndpointPortConfig'; /** - * + * * @export * @interface ServiceEndpoint */ export interface ServiceEndpoint { - /** - * - * @type {EndpointSpec} - * @memberof ServiceEndpoint - */ - Spec?: EndpointSpec; - /** - * - * @type {Array} - * @memberof ServiceEndpoint - */ - Ports?: Array; - /** - * - * @type {Array} - * @memberof ServiceEndpoint - */ - VirtualIPs?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceEndpoint + */ + Spec?: EndpointSpec; + /** + * + * @type {Array} + * @memberof ServiceEndpoint + */ + Ports?: Array; + /** + * + * @type {Array} + * @memberof ServiceEndpoint + */ + VirtualIPs?: Array; } /** * Check if a given object implements the ServiceEndpoint interface. */ export function instanceOfServiceEndpoint(value: object): value is ServiceEndpoint { - return true; + return true; } export function ServiceEndpointFromJSON(json: any): ServiceEndpoint { - return ServiceEndpointFromJSONTyped(json, false); + return ServiceEndpointFromJSONTyped(json, false); } -export function ServiceEndpointFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceEndpoint { - if (json == null) { - return json; - } - return { - Spec: json["Spec"] == null ? undefined : EndpointSpecFromJSON(json["Spec"]), - Ports: - json["Ports"] == null - ? undefined - : (json["Ports"] as Array).map(EndpointPortConfigFromJSON), - VirtualIPs: - json["VirtualIPs"] == null - ? undefined - : (json["VirtualIPs"] as Array).map(ServiceEndpointVirtualIPsInnerFromJSON), - }; +export function ServiceEndpointFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoint { + if (json == null) { + return json; + } + return { + + 'Spec': json['Spec'] == null ? undefined : EndpointSpecFromJSON(json['Spec']), + 'Ports': json['Ports'] == null ? undefined : ((json['Ports'] as Array).map(EndpointPortConfigFromJSON)), + 'VirtualIPs': json['VirtualIPs'] == null ? undefined : ((json['VirtualIPs'] as Array).map(ServiceEndpointVirtualIPsInnerFromJSON)), + }; } export function ServiceEndpointToJSON(json: any): ServiceEndpoint { - return ServiceEndpointToJSONTyped(json, false); + return ServiceEndpointToJSONTyped(json, false); } -export function ServiceEndpointToJSONTyped( - value?: ServiceEndpoint | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceEndpointToJSONTyped(value?: ServiceEndpoint | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Spec: EndpointSpecToJSON(value["Spec"]), - Ports: - value["Ports"] == null - ? undefined - : (value["Ports"] as Array).map(EndpointPortConfigToJSON), - VirtualIPs: - value["VirtualIPs"] == null - ? undefined - : (value["VirtualIPs"] as Array).map(ServiceEndpointVirtualIPsInnerToJSON), - }; + return { + + 'Spec': EndpointSpecToJSON(value['Spec']), + 'Ports': value['Ports'] == null ? undefined : ((value['Ports'] as Array).map(EndpointPortConfigToJSON)), + 'VirtualIPs': value['VirtualIPs'] == null ? undefined : ((value['VirtualIPs'] as Array).map(ServiceEndpointVirtualIPsInnerToJSON)), + }; } + diff --git a/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts b/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts index d2e6581ca5..a2cebab250 100644 --- a/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts +++ b/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts @@ -2,77 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ServiceEndpointVirtualIPsInner */ export interface ServiceEndpointVirtualIPsInner { - /** - * - * @type {string} - * @memberof ServiceEndpointVirtualIPsInner - */ - NetworkID?: string; - /** - * - * @type {string} - * @memberof ServiceEndpointVirtualIPsInner - */ - Addr?: string; + /** + * + * @type {string} + * @memberof ServiceEndpointVirtualIPsInner + */ + NetworkID?: string; + /** + * + * @type {string} + * @memberof ServiceEndpointVirtualIPsInner + */ + Addr?: string; } /** * Check if a given object implements the ServiceEndpointVirtualIPsInner interface. */ -export function instanceOfServiceEndpointVirtualIPsInner( - value: object, -): value is ServiceEndpointVirtualIPsInner { - return true; +export function instanceOfServiceEndpointVirtualIPsInner(value: object): value is ServiceEndpointVirtualIPsInner { + return true; } export function ServiceEndpointVirtualIPsInnerFromJSON(json: any): ServiceEndpointVirtualIPsInner { - return ServiceEndpointVirtualIPsInnerFromJSONTyped(json, false); + return ServiceEndpointVirtualIPsInnerFromJSONTyped(json, false); } -export function ServiceEndpointVirtualIPsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceEndpointVirtualIPsInner { - if (json == null) { - return json; - } - return { - NetworkID: json["NetworkID"] == null ? undefined : json["NetworkID"], - Addr: json["Addr"] == null ? undefined : json["Addr"], - }; +export function ServiceEndpointVirtualIPsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpointVirtualIPsInner { + if (json == null) { + return json; + } + return { + + 'NetworkID': json['NetworkID'] == null ? undefined : json['NetworkID'], + 'Addr': json['Addr'] == null ? undefined : json['Addr'], + }; } export function ServiceEndpointVirtualIPsInnerToJSON(json: any): ServiceEndpointVirtualIPsInner { - return ServiceEndpointVirtualIPsInnerToJSONTyped(json, false); + return ServiceEndpointVirtualIPsInnerToJSONTyped(json, false); } -export function ServiceEndpointVirtualIPsInnerToJSONTyped( - value?: ServiceEndpointVirtualIPsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceEndpointVirtualIPsInnerToJSONTyped(value?: ServiceEndpointVirtualIPsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NetworkID: value["NetworkID"], - Addr: value["Addr"], - }; + return { + + 'NetworkID': value['NetworkID'], + 'Addr': value['Addr'], + }; } + diff --git a/src/clients/docker/models/ServiceJobStatus.ts b/src/clients/docker/models/ServiceJobStatus.ts index aa12481449..8d026edb1c 100644 --- a/src/clients/docker/models/ServiceJobStatus.ts +++ b/src/clients/docker/models/ServiceJobStatus.ts @@ -2,90 +2,86 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ObjectVersion } from "./ObjectVersion"; +import { mapValues } from '../runtime'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; /** * 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. - * + * * @export * @interface ServiceJobStatus */ export interface ServiceJobStatus { - /** - * - * @type {ObjectVersion} - * @memberof ServiceJobStatus - */ - JobIteration?: ObjectVersion; - /** - * The last time, as observed by the server, that this job was - * started. - * - * @type {string} - * @memberof ServiceJobStatus - */ - LastExecution?: string; + /** + * + * @type {ObjectVersion} + * @memberof ServiceJobStatus + */ + JobIteration?: ObjectVersion; + /** + * The last time, as observed by the server, that this job was + * started. + * + * @type {string} + * @memberof ServiceJobStatus + */ + LastExecution?: string; } /** * Check if a given object implements the ServiceJobStatus interface. */ export function instanceOfServiceJobStatus(value: object): value is ServiceJobStatus { - return true; + return true; } export function ServiceJobStatusFromJSON(json: any): ServiceJobStatus { - return ServiceJobStatusFromJSONTyped(json, false); + return ServiceJobStatusFromJSONTyped(json, false); } -export function ServiceJobStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceJobStatus { - if (json == null) { - return json; - } - return { - JobIteration: - json["JobIteration"] == null ? undefined : ObjectVersionFromJSON(json["JobIteration"]), - LastExecution: json["LastExecution"] == null ? undefined : json["LastExecution"], - }; +export function ServiceJobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceJobStatus { + if (json == null) { + return json; + } + return { + + 'JobIteration': json['JobIteration'] == null ? undefined : ObjectVersionFromJSON(json['JobIteration']), + 'LastExecution': json['LastExecution'] == null ? undefined : json['LastExecution'], + }; } export function ServiceJobStatusToJSON(json: any): ServiceJobStatus { - return ServiceJobStatusToJSONTyped(json, false); + return ServiceJobStatusToJSONTyped(json, false); } -export function ServiceJobStatusToJSONTyped( - value?: ServiceJobStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceJobStatusToJSONTyped(value?: ServiceJobStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - JobIteration: ObjectVersionToJSON(value["JobIteration"]), - LastExecution: value["LastExecution"], - }; + return { + + 'JobIteration': ObjectVersionToJSON(value['JobIteration']), + 'LastExecution': value['LastExecution'], + }; } + diff --git a/src/clients/docker/models/ServiceServiceStatus.ts b/src/clients/docker/models/ServiceServiceStatus.ts index 3db4ad2d2b..414fdb9171 100644 --- a/src/clients/docker/models/ServiceServiceStatus.ts +++ b/src/clients/docker/models/ServiceServiceStatus.ts @@ -2,95 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The status of the service's tasks. Provided only when requested as * part of a ServiceList operation. - * + * * @export * @interface ServiceServiceStatus */ export interface ServiceServiceStatus { - /** - * The number of tasks for the service currently in the Running state. - * - * @type {number} - * @memberof ServiceServiceStatus - */ - RunningTasks?: number; - /** - * The number of tasks for the service desired to be running. - * For replicated services, this is the replica count from the - * service spec. For global services, this is computed by taking - * count of all tasks for the service with a Desired State other - * than Shutdown. - * - * @type {number} - * @memberof ServiceServiceStatus - */ - DesiredTasks?: number; - /** - * The number of tasks for a job that are in the Completed state. - * This field must be cross-referenced with the service type, as the - * value of 0 may mean the service is not in a job mode, or it may - * mean the job-mode service has no tasks yet Completed. - * - * @type {number} - * @memberof ServiceServiceStatus - */ - CompletedTasks?: number; + /** + * The number of tasks for the service currently in the Running state. + * + * @type {number} + * @memberof ServiceServiceStatus + */ + RunningTasks?: number; + /** + * The number of tasks for the service desired to be running. + * For replicated services, this is the replica count from the + * service spec. For global services, this is computed by taking + * count of all tasks for the service with a Desired State other + * than Shutdown. + * + * @type {number} + * @memberof ServiceServiceStatus + */ + DesiredTasks?: number; + /** + * The number of tasks for a job that are in the Completed state. + * This field must be cross-referenced with the service type, as the + * value of 0 may mean the service is not in a job mode, or it may + * mean the job-mode service has no tasks yet Completed. + * + * @type {number} + * @memberof ServiceServiceStatus + */ + CompletedTasks?: number; } /** * Check if a given object implements the ServiceServiceStatus interface. */ export function instanceOfServiceServiceStatus(value: object): value is ServiceServiceStatus { - return true; + return true; } export function ServiceServiceStatusFromJSON(json: any): ServiceServiceStatus { - return ServiceServiceStatusFromJSONTyped(json, false); + return ServiceServiceStatusFromJSONTyped(json, false); } -export function ServiceServiceStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceServiceStatus { - if (json == null) { - return json; - } - return { - RunningTasks: json["RunningTasks"] == null ? undefined : json["RunningTasks"], - DesiredTasks: json["DesiredTasks"] == null ? undefined : json["DesiredTasks"], - CompletedTasks: json["CompletedTasks"] == null ? undefined : json["CompletedTasks"], - }; +export function ServiceServiceStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceServiceStatus { + if (json == null) { + return json; + } + return { + + 'RunningTasks': json['RunningTasks'] == null ? undefined : json['RunningTasks'], + 'DesiredTasks': json['DesiredTasks'] == null ? undefined : json['DesiredTasks'], + 'CompletedTasks': json['CompletedTasks'] == null ? undefined : json['CompletedTasks'], + }; } export function ServiceServiceStatusToJSON(json: any): ServiceServiceStatus { - return ServiceServiceStatusToJSONTyped(json, false); + return ServiceServiceStatusToJSONTyped(json, false); } -export function ServiceServiceStatusToJSONTyped( - value?: ServiceServiceStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceServiceStatusToJSONTyped(value?: ServiceServiceStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - RunningTasks: value["RunningTasks"], - DesiredTasks: value["DesiredTasks"], - CompletedTasks: value["CompletedTasks"], - }; + return { + + 'RunningTasks': value['RunningTasks'], + 'DesiredTasks': value['DesiredTasks'], + 'CompletedTasks': value['CompletedTasks'], + }; } + diff --git a/src/clients/docker/models/ServiceSpec.ts b/src/clients/docker/models/ServiceSpec.ts index 89dbc2faca..dc9ff5c789 100644 --- a/src/clients/docker/models/ServiceSpec.ts +++ b/src/clients/docker/models/ServiceSpec.ts @@ -2,59 +2,59 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; +import { mapValues } from '../runtime'; +import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from "./NetworkAttachmentConfig"; -import type { ServiceSpecRollbackConfig } from "./ServiceSpecRollbackConfig"; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from './NetworkAttachmentConfig'; +import type { ServiceSpecRollbackConfig } from './ServiceSpecRollbackConfig'; import { - ServiceSpecRollbackConfigFromJSON, - ServiceSpecRollbackConfigFromJSONTyped, - ServiceSpecRollbackConfigToJSON, - ServiceSpecRollbackConfigToJSONTyped, -} from "./ServiceSpecRollbackConfig"; -import type { ServiceSpecUpdateConfig } from "./ServiceSpecUpdateConfig"; + ServiceSpecRollbackConfigFromJSON, + ServiceSpecRollbackConfigFromJSONTyped, + ServiceSpecRollbackConfigToJSON, + ServiceSpecRollbackConfigToJSONTyped, +} from './ServiceSpecRollbackConfig'; +import type { ServiceSpecUpdateConfig } from './ServiceSpecUpdateConfig'; import { - ServiceSpecUpdateConfigFromJSON, - ServiceSpecUpdateConfigFromJSONTyped, - ServiceSpecUpdateConfigToJSON, - ServiceSpecUpdateConfigToJSONTyped, -} from "./ServiceSpecUpdateConfig"; -import type { EndpointSpec } from "./EndpointSpec"; + ServiceSpecUpdateConfigFromJSON, + ServiceSpecUpdateConfigFromJSONTyped, + ServiceSpecUpdateConfigToJSON, + ServiceSpecUpdateConfigToJSONTyped, +} from './ServiceSpecUpdateConfig'; +import type { EndpointSpec } from './EndpointSpec'; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from "./EndpointSpec"; -import type { TaskSpec } from "./TaskSpec"; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from './EndpointSpec'; +import type { TaskSpec } from './TaskSpec'; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from "./TaskSpec"; -import type { ServiceSpecMode } from "./ServiceSpecMode"; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from './TaskSpec'; +import type { ServiceSpecMode } from './ServiceSpecMode'; import { - ServiceSpecModeFromJSON, - ServiceSpecModeFromJSONTyped, - ServiceSpecModeToJSON, - ServiceSpecModeToJSONTyped, -} from "./ServiceSpecMode"; + ServiceSpecModeFromJSON, + ServiceSpecModeFromJSONTyped, + ServiceSpecModeToJSON, + ServiceSpecModeToJSONTyped, +} from './ServiceSpecMode'; /** * User modifiable configuration for a service. @@ -62,116 +62,103 @@ import { * @interface ServiceSpec */ export interface ServiceSpec { - /** - * Name of the service. - * @type {string} - * @memberof ServiceSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ServiceSpec - */ - Labels?: { [key: string]: string }; - /** - * - * @type {TaskSpec} - * @memberof ServiceSpec - */ - TaskTemplate?: TaskSpec; - /** - * - * @type {ServiceSpecMode} - * @memberof ServiceSpec - */ - Mode?: ServiceSpecMode; - /** - * - * @type {ServiceSpecUpdateConfig} - * @memberof ServiceSpec - */ - UpdateConfig?: ServiceSpecUpdateConfig; - /** - * - * @type {ServiceSpecRollbackConfig} - * @memberof ServiceSpec - */ - RollbackConfig?: ServiceSpecRollbackConfig; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof ServiceSpec - */ - Networks?: Array; - /** - * - * @type {EndpointSpec} - * @memberof ServiceSpec - */ - EndpointSpec?: EndpointSpec; + /** + * Name of the service. + * @type {string} + * @memberof ServiceSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ServiceSpec + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {TaskSpec} + * @memberof ServiceSpec + */ + TaskTemplate?: TaskSpec; + /** + * + * @type {ServiceSpecMode} + * @memberof ServiceSpec + */ + Mode?: ServiceSpecMode; + /** + * + * @type {ServiceSpecUpdateConfig} + * @memberof ServiceSpec + */ + UpdateConfig?: ServiceSpecUpdateConfig; + /** + * + * @type {ServiceSpecRollbackConfig} + * @memberof ServiceSpec + */ + RollbackConfig?: ServiceSpecRollbackConfig; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof ServiceSpec + */ + Networks?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceSpec + */ + EndpointSpec?: EndpointSpec; } /** * Check if a given object implements the ServiceSpec interface. */ export function instanceOfServiceSpec(value: object): value is ServiceSpec { - return true; + return true; } export function ServiceSpecFromJSON(json: any): ServiceSpec { - return ServiceSpecFromJSONTyped(json, false); + return ServiceSpecFromJSONTyped(json, false); } export function ServiceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpec { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - TaskTemplate: json["TaskTemplate"] == null ? undefined : TaskSpecFromJSON(json["TaskTemplate"]), - Mode: json["Mode"] == null ? undefined : ServiceSpecModeFromJSON(json["Mode"]), - UpdateConfig: - json["UpdateConfig"] == null - ? undefined - : ServiceSpecUpdateConfigFromJSON(json["UpdateConfig"]), - RollbackConfig: - json["RollbackConfig"] == null - ? undefined - : ServiceSpecRollbackConfigFromJSON(json["RollbackConfig"]), - Networks: - json["Networks"] == null - ? undefined - : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), - EndpointSpec: - json["EndpointSpec"] == null ? undefined : EndpointSpecFromJSON(json["EndpointSpec"]), - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'TaskTemplate': json['TaskTemplate'] == null ? undefined : TaskSpecFromJSON(json['TaskTemplate']), + 'Mode': json['Mode'] == null ? undefined : ServiceSpecModeFromJSON(json['Mode']), + 'UpdateConfig': json['UpdateConfig'] == null ? undefined : ServiceSpecUpdateConfigFromJSON(json['UpdateConfig']), + 'RollbackConfig': json['RollbackConfig'] == null ? undefined : ServiceSpecRollbackConfigFromJSON(json['RollbackConfig']), + 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), + 'EndpointSpec': json['EndpointSpec'] == null ? undefined : EndpointSpecFromJSON(json['EndpointSpec']), + }; } export function ServiceSpecToJSON(json: any): ServiceSpec { - return ServiceSpecToJSONTyped(json, false); + return ServiceSpecToJSONTyped(json, false); } -export function ServiceSpecToJSONTyped( - value?: ServiceSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceSpecToJSONTyped(value?: ServiceSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - TaskTemplate: TaskSpecToJSON(value["TaskTemplate"]), - Mode: ServiceSpecModeToJSON(value["Mode"]), - UpdateConfig: ServiceSpecUpdateConfigToJSON(value["UpdateConfig"]), - RollbackConfig: ServiceSpecRollbackConfigToJSON(value["RollbackConfig"]), - Networks: - value["Networks"] == null - ? undefined - : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), - EndpointSpec: EndpointSpecToJSON(value["EndpointSpec"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'TaskTemplate': TaskSpecToJSON(value['TaskTemplate']), + 'Mode': ServiceSpecModeToJSON(value['Mode']), + 'UpdateConfig': ServiceSpecUpdateConfigToJSON(value['UpdateConfig']), + 'RollbackConfig': ServiceSpecRollbackConfigToJSON(value['RollbackConfig']), + 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), + 'EndpointSpec': EndpointSpecToJSON(value['EndpointSpec']), + }; } + diff --git a/src/clients/docker/models/ServiceSpecMode.ts b/src/clients/docker/models/ServiceSpecMode.ts index e42c5f97ce..d292b7f5d7 100644 --- a/src/clients/docker/models/ServiceSpecMode.ts +++ b/src/clients/docker/models/ServiceSpecMode.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ServiceSpecModeReplicated } from "./ServiceSpecModeReplicated"; +import { mapValues } from '../runtime'; +import type { ServiceSpecModeReplicated } from './ServiceSpecModeReplicated'; import { - ServiceSpecModeReplicatedFromJSON, - ServiceSpecModeReplicatedFromJSONTyped, - ServiceSpecModeReplicatedToJSON, - ServiceSpecModeReplicatedToJSONTyped, -} from "./ServiceSpecModeReplicated"; -import type { ServiceSpecModeReplicatedJob } from "./ServiceSpecModeReplicatedJob"; + ServiceSpecModeReplicatedFromJSON, + ServiceSpecModeReplicatedFromJSONTyped, + ServiceSpecModeReplicatedToJSON, + ServiceSpecModeReplicatedToJSONTyped, +} from './ServiceSpecModeReplicated'; +import type { ServiceSpecModeReplicatedJob } from './ServiceSpecModeReplicatedJob'; import { - ServiceSpecModeReplicatedJobFromJSON, - ServiceSpecModeReplicatedJobFromJSONTyped, - ServiceSpecModeReplicatedJobToJSON, - ServiceSpecModeReplicatedJobToJSONTyped, -} from "./ServiceSpecModeReplicatedJob"; + ServiceSpecModeReplicatedJobFromJSON, + ServiceSpecModeReplicatedJobFromJSONTyped, + ServiceSpecModeReplicatedJobToJSON, + ServiceSpecModeReplicatedJobToJSONTyped, +} from './ServiceSpecModeReplicatedJob'; /** * Scheduling mode for the service. @@ -34,82 +34,73 @@ import { * @interface ServiceSpecMode */ export interface ServiceSpecMode { - /** - * - * @type {ServiceSpecModeReplicated} - * @memberof ServiceSpecMode - */ - Replicated?: ServiceSpecModeReplicated; - /** - * - * @type {object} - * @memberof ServiceSpecMode - */ - Global?: object; - /** - * - * @type {ServiceSpecModeReplicatedJob} - * @memberof ServiceSpecMode - */ - ReplicatedJob?: ServiceSpecModeReplicatedJob; - /** - * The mode used for services which run a task to the completed state - * on each valid node. - * - * @type {object} - * @memberof ServiceSpecMode - */ - GlobalJob?: object; + /** + * + * @type {ServiceSpecModeReplicated} + * @memberof ServiceSpecMode + */ + Replicated?: ServiceSpecModeReplicated; + /** + * + * @type {object} + * @memberof ServiceSpecMode + */ + Global?: object; + /** + * + * @type {ServiceSpecModeReplicatedJob} + * @memberof ServiceSpecMode + */ + ReplicatedJob?: ServiceSpecModeReplicatedJob; + /** + * The mode used for services which run a task to the completed state + * on each valid node. + * + * @type {object} + * @memberof ServiceSpecMode + */ + GlobalJob?: object; } /** * Check if a given object implements the ServiceSpecMode interface. */ export function instanceOfServiceSpecMode(value: object): value is ServiceSpecMode { - return true; + return true; } export function ServiceSpecModeFromJSON(json: any): ServiceSpecMode { - return ServiceSpecModeFromJSONTyped(json, false); + return ServiceSpecModeFromJSONTyped(json, false); } -export function ServiceSpecModeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceSpecMode { - if (json == null) { - return json; - } - return { - Replicated: - json["Replicated"] == null - ? undefined - : ServiceSpecModeReplicatedFromJSON(json["Replicated"]), - Global: json["Global"] == null ? undefined : json["Global"], - ReplicatedJob: - json["ReplicatedJob"] == null - ? undefined - : ServiceSpecModeReplicatedJobFromJSON(json["ReplicatedJob"]), - GlobalJob: json["GlobalJob"] == null ? undefined : json["GlobalJob"], - }; +export function ServiceSpecModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecMode { + if (json == null) { + return json; + } + return { + + 'Replicated': json['Replicated'] == null ? undefined : ServiceSpecModeReplicatedFromJSON(json['Replicated']), + 'Global': json['Global'] == null ? undefined : json['Global'], + 'ReplicatedJob': json['ReplicatedJob'] == null ? undefined : ServiceSpecModeReplicatedJobFromJSON(json['ReplicatedJob']), + 'GlobalJob': json['GlobalJob'] == null ? undefined : json['GlobalJob'], + }; } export function ServiceSpecModeToJSON(json: any): ServiceSpecMode { - return ServiceSpecModeToJSONTyped(json, false); + return ServiceSpecModeToJSONTyped(json, false); } -export function ServiceSpecModeToJSONTyped( - value?: ServiceSpecMode | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceSpecModeToJSONTyped(value?: ServiceSpecMode | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Replicated: ServiceSpecModeReplicatedToJSON(value["Replicated"]), - Global: value["Global"], - ReplicatedJob: ServiceSpecModeReplicatedJobToJSON(value["ReplicatedJob"]), - GlobalJob: value["GlobalJob"], - }; + return { + + 'Replicated': ServiceSpecModeReplicatedToJSON(value['Replicated']), + 'Global': value['Global'], + 'ReplicatedJob': ServiceSpecModeReplicatedJobToJSON(value['ReplicatedJob']), + 'GlobalJob': value['GlobalJob'], + }; } + diff --git a/src/clients/docker/models/ServiceSpecModeReplicated.ts b/src/clients/docker/models/ServiceSpecModeReplicated.ts index d69e32f1b7..5dacd7221b 100644 --- a/src/clients/docker/models/ServiceSpecModeReplicated.ts +++ b/src/clients/docker/models/ServiceSpecModeReplicated.ts @@ -2,69 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ServiceSpecModeReplicated */ export interface ServiceSpecModeReplicated { - /** - * - * @type {number} - * @memberof ServiceSpecModeReplicated - */ - Replicas?: number; + /** + * + * @type {number} + * @memberof ServiceSpecModeReplicated + */ + Replicas?: number; } /** * Check if a given object implements the ServiceSpecModeReplicated interface. */ -export function instanceOfServiceSpecModeReplicated( - value: object, -): value is ServiceSpecModeReplicated { - return true; +export function instanceOfServiceSpecModeReplicated(value: object): value is ServiceSpecModeReplicated { + return true; } export function ServiceSpecModeReplicatedFromJSON(json: any): ServiceSpecModeReplicated { - return ServiceSpecModeReplicatedFromJSONTyped(json, false); + return ServiceSpecModeReplicatedFromJSONTyped(json, false); } -export function ServiceSpecModeReplicatedFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceSpecModeReplicated { - if (json == null) { - return json; - } - return { - Replicas: json["Replicas"] == null ? undefined : json["Replicas"], - }; +export function ServiceSpecModeReplicatedFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecModeReplicated { + if (json == null) { + return json; + } + return { + + 'Replicas': json['Replicas'] == null ? undefined : json['Replicas'], + }; } export function ServiceSpecModeReplicatedToJSON(json: any): ServiceSpecModeReplicated { - return ServiceSpecModeReplicatedToJSONTyped(json, false); + return ServiceSpecModeReplicatedToJSONTyped(json, false); } -export function ServiceSpecModeReplicatedToJSONTyped( - value?: ServiceSpecModeReplicated | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceSpecModeReplicatedToJSONTyped(value?: ServiceSpecModeReplicated | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Replicas: value["Replicas"], - }; + return { + + 'Replicas': value['Replicas'], + }; } + diff --git a/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts b/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts index 28bfe71d24..25dc0b0d3b 100644 --- a/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts +++ b/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts @@ -2,82 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The mode used for services with a finite number of tasks that run * to a completed state. - * + * * @export * @interface ServiceSpecModeReplicatedJob */ export interface ServiceSpecModeReplicatedJob { - /** - * The maximum number of replicas to run simultaneously. - * - * @type {number} - * @memberof ServiceSpecModeReplicatedJob - */ - MaxConcurrent?: number; - /** - * The total number of replicas desired to reach the Completed - * state. If unset, will default to the value of `MaxConcurrent` - * - * @type {number} - * @memberof ServiceSpecModeReplicatedJob - */ - TotalCompletions?: number; + /** + * The maximum number of replicas to run simultaneously. + * + * @type {number} + * @memberof ServiceSpecModeReplicatedJob + */ + MaxConcurrent?: number; + /** + * The total number of replicas desired to reach the Completed + * state. If unset, will default to the value of `MaxConcurrent` + * + * @type {number} + * @memberof ServiceSpecModeReplicatedJob + */ + TotalCompletions?: number; } /** * Check if a given object implements the ServiceSpecModeReplicatedJob interface. */ -export function instanceOfServiceSpecModeReplicatedJob( - value: object, -): value is ServiceSpecModeReplicatedJob { - return true; +export function instanceOfServiceSpecModeReplicatedJob(value: object): value is ServiceSpecModeReplicatedJob { + return true; } export function ServiceSpecModeReplicatedJobFromJSON(json: any): ServiceSpecModeReplicatedJob { - return ServiceSpecModeReplicatedJobFromJSONTyped(json, false); + return ServiceSpecModeReplicatedJobFromJSONTyped(json, false); } -export function ServiceSpecModeReplicatedJobFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceSpecModeReplicatedJob { - if (json == null) { - return json; - } - return { - MaxConcurrent: json["MaxConcurrent"] == null ? undefined : json["MaxConcurrent"], - TotalCompletions: json["TotalCompletions"] == null ? undefined : json["TotalCompletions"], - }; +export function ServiceSpecModeReplicatedJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecModeReplicatedJob { + if (json == null) { + return json; + } + return { + + 'MaxConcurrent': json['MaxConcurrent'] == null ? undefined : json['MaxConcurrent'], + 'TotalCompletions': json['TotalCompletions'] == null ? undefined : json['TotalCompletions'], + }; } export function ServiceSpecModeReplicatedJobToJSON(json: any): ServiceSpecModeReplicatedJob { - return ServiceSpecModeReplicatedJobToJSONTyped(json, false); + return ServiceSpecModeReplicatedJobToJSONTyped(json, false); } -export function ServiceSpecModeReplicatedJobToJSONTyped( - value?: ServiceSpecModeReplicatedJob | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceSpecModeReplicatedJobToJSONTyped(value?: ServiceSpecModeReplicatedJob | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - MaxConcurrent: value["MaxConcurrent"], - TotalCompletions: value["TotalCompletions"], - }; + return { + + 'MaxConcurrent': value['MaxConcurrent'], + 'TotalCompletions': value['TotalCompletions'], + }; } + diff --git a/src/clients/docker/models/ServiceSpecRollbackConfig.ts b/src/clients/docker/models/ServiceSpecRollbackConfig.ts index 43c1923fab..d1f2f58cdb 100644 --- a/src/clients/docker/models/ServiceSpecRollbackConfig.ts +++ b/src/clients/docker/models/ServiceSpecRollbackConfig.ts @@ -2,139 +2,135 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Specification for the rollback strategy of the service. * @export * @interface ServiceSpecRollbackConfig */ export interface ServiceSpecRollbackConfig { - /** - * Maximum number of tasks to be rolled back in one iteration (0 means - * unlimited parallelism). - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - Parallelism?: number; - /** - * Amount of time between rollback iterations, in nanoseconds. - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - Delay?: number; - /** - * Action to take if an rolled back task fails to run, or stops - * running during the rollback. - * - * @type {string} - * @memberof ServiceSpecRollbackConfig - */ - FailureAction?: ServiceSpecRollbackConfigFailureActionEnum; - /** - * Amount of time to monitor each rolled back task for failures, in - * nanoseconds. - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - Monitor?: number; - /** - * The fraction of tasks that may fail during a rollback before the - * failure action is invoked, specified as a floating point number - * between 0 and 1. - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - MaxFailureRatio?: number; - /** - * The order of operations when rolling back a task. Either the old - * task is shut down before the new task is started, or the new task - * is started before the old task is shut down. - * - * @type {string} - * @memberof ServiceSpecRollbackConfig - */ - Order?: ServiceSpecRollbackConfigOrderEnum; + /** + * Maximum number of tasks to be rolled back in one iteration (0 means + * unlimited parallelism). + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + Parallelism?: number; + /** + * Amount of time between rollback iterations, in nanoseconds. + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + Delay?: number; + /** + * Action to take if an rolled back task fails to run, or stops + * running during the rollback. + * + * @type {string} + * @memberof ServiceSpecRollbackConfig + */ + FailureAction?: ServiceSpecRollbackConfigFailureActionEnum; + /** + * Amount of time to monitor each rolled back task for failures, in + * nanoseconds. + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + Monitor?: number; + /** + * The fraction of tasks that may fail during a rollback before the + * failure action is invoked, specified as a floating point number + * between 0 and 1. + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + MaxFailureRatio?: number; + /** + * The order of operations when rolling back a task. Either the old + * task is shut down before the new task is started, or the new task + * is started before the old task is shut down. + * + * @type {string} + * @memberof ServiceSpecRollbackConfig + */ + Order?: ServiceSpecRollbackConfigOrderEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ServiceSpecRollbackConfigFailureActionEnum { - Continue = "continue", - Pause = "pause", + Continue = 'continue', + Pause = 'pause' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ServiceSpecRollbackConfigOrderEnum { - StopFirst = "stop-first", - StartFirst = "start-first", + StopFirst = 'stop-first', + StartFirst = 'start-first' } + /** * Check if a given object implements the ServiceSpecRollbackConfig interface. */ -export function instanceOfServiceSpecRollbackConfig( - value: object, -): value is ServiceSpecRollbackConfig { - return true; +export function instanceOfServiceSpecRollbackConfig(value: object): value is ServiceSpecRollbackConfig { + return true; } export function ServiceSpecRollbackConfigFromJSON(json: any): ServiceSpecRollbackConfig { - return ServiceSpecRollbackConfigFromJSONTyped(json, false); + return ServiceSpecRollbackConfigFromJSONTyped(json, false); } -export function ServiceSpecRollbackConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceSpecRollbackConfig { - if (json == null) { - return json; - } - return { - Parallelism: json["Parallelism"] == null ? undefined : json["Parallelism"], - Delay: json["Delay"] == null ? undefined : json["Delay"], - FailureAction: json["FailureAction"] == null ? undefined : json["FailureAction"], - Monitor: json["Monitor"] == null ? undefined : json["Monitor"], - MaxFailureRatio: json["MaxFailureRatio"] == null ? undefined : json["MaxFailureRatio"], - Order: json["Order"] == null ? undefined : json["Order"], - }; +export function ServiceSpecRollbackConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecRollbackConfig { + if (json == null) { + return json; + } + return { + + 'Parallelism': json['Parallelism'] == null ? undefined : json['Parallelism'], + 'Delay': json['Delay'] == null ? undefined : json['Delay'], + 'FailureAction': json['FailureAction'] == null ? undefined : json['FailureAction'], + 'Monitor': json['Monitor'] == null ? undefined : json['Monitor'], + 'MaxFailureRatio': json['MaxFailureRatio'] == null ? undefined : json['MaxFailureRatio'], + 'Order': json['Order'] == null ? undefined : json['Order'], + }; } export function ServiceSpecRollbackConfigToJSON(json: any): ServiceSpecRollbackConfig { - return ServiceSpecRollbackConfigToJSONTyped(json, false); + return ServiceSpecRollbackConfigToJSONTyped(json, false); } -export function ServiceSpecRollbackConfigToJSONTyped( - value?: ServiceSpecRollbackConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceSpecRollbackConfigToJSONTyped(value?: ServiceSpecRollbackConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Parallelism: value["Parallelism"], - Delay: value["Delay"], - FailureAction: value["FailureAction"], - Monitor: value["Monitor"], - MaxFailureRatio: value["MaxFailureRatio"], - Order: value["Order"], - }; + return { + + 'Parallelism': value['Parallelism'], + 'Delay': value['Delay'], + 'FailureAction': value['FailureAction'], + 'Monitor': value['Monitor'], + 'MaxFailureRatio': value['MaxFailureRatio'], + 'Order': value['Order'], + }; } + diff --git a/src/clients/docker/models/ServiceSpecUpdateConfig.ts b/src/clients/docker/models/ServiceSpecUpdateConfig.ts index 71b4526c73..4dcdf4d909 100644 --- a/src/clients/docker/models/ServiceSpecUpdateConfig.ts +++ b/src/clients/docker/models/ServiceSpecUpdateConfig.ts @@ -2,137 +2,135 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Specification for the update strategy of the service. * @export * @interface ServiceSpecUpdateConfig */ export interface ServiceSpecUpdateConfig { - /** - * Maximum number of tasks to be updated in one iteration (0 means - * unlimited parallelism). - * - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - Parallelism?: number; - /** - * Amount of time between updates, in nanoseconds. - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - Delay?: number; - /** - * Action to take if an updated task fails to run, or stops running - * during the update. - * - * @type {string} - * @memberof ServiceSpecUpdateConfig - */ - FailureAction?: ServiceSpecUpdateConfigFailureActionEnum; - /** - * Amount of time to monitor each updated task for failures, in - * nanoseconds. - * - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - Monitor?: number; - /** - * The fraction of tasks that may fail during an update before the - * failure action is invoked, specified as a floating point number - * between 0 and 1. - * - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - MaxFailureRatio?: number; - /** - * The order of operations when rolling out an updated task. Either - * the old task is shut down before the new task is started, or the - * new task is started before the old task is shut down. - * - * @type {string} - * @memberof ServiceSpecUpdateConfig - */ - Order?: ServiceSpecUpdateConfigOrderEnum; + /** + * Maximum number of tasks to be updated in one iteration (0 means + * unlimited parallelism). + * + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + Parallelism?: number; + /** + * Amount of time between updates, in nanoseconds. + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + Delay?: number; + /** + * Action to take if an updated task fails to run, or stops running + * during the update. + * + * @type {string} + * @memberof ServiceSpecUpdateConfig + */ + FailureAction?: ServiceSpecUpdateConfigFailureActionEnum; + /** + * Amount of time to monitor each updated task for failures, in + * nanoseconds. + * + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + Monitor?: number; + /** + * The fraction of tasks that may fail during an update before the + * failure action is invoked, specified as a floating point number + * between 0 and 1. + * + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + MaxFailureRatio?: number; + /** + * The order of operations when rolling out an updated task. Either + * the old task is shut down before the new task is started, or the + * new task is started before the old task is shut down. + * + * @type {string} + * @memberof ServiceSpecUpdateConfig + */ + Order?: ServiceSpecUpdateConfigOrderEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ServiceSpecUpdateConfigFailureActionEnum { - Continue = "continue", - Pause = "pause", - Rollback = "rollback", + Continue = 'continue', + Pause = 'pause', + Rollback = 'rollback' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ServiceSpecUpdateConfigOrderEnum { - StopFirst = "stop-first", - StartFirst = "start-first", + StopFirst = 'stop-first', + StartFirst = 'start-first' } + /** * Check if a given object implements the ServiceSpecUpdateConfig interface. */ export function instanceOfServiceSpecUpdateConfig(value: object): value is ServiceSpecUpdateConfig { - return true; + return true; } export function ServiceSpecUpdateConfigFromJSON(json: any): ServiceSpecUpdateConfig { - return ServiceSpecUpdateConfigFromJSONTyped(json, false); + return ServiceSpecUpdateConfigFromJSONTyped(json, false); } -export function ServiceSpecUpdateConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceSpecUpdateConfig { - if (json == null) { - return json; - } - return { - Parallelism: json["Parallelism"] == null ? undefined : json["Parallelism"], - Delay: json["Delay"] == null ? undefined : json["Delay"], - FailureAction: json["FailureAction"] == null ? undefined : json["FailureAction"], - Monitor: json["Monitor"] == null ? undefined : json["Monitor"], - MaxFailureRatio: json["MaxFailureRatio"] == null ? undefined : json["MaxFailureRatio"], - Order: json["Order"] == null ? undefined : json["Order"], - }; +export function ServiceSpecUpdateConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecUpdateConfig { + if (json == null) { + return json; + } + return { + + 'Parallelism': json['Parallelism'] == null ? undefined : json['Parallelism'], + 'Delay': json['Delay'] == null ? undefined : json['Delay'], + 'FailureAction': json['FailureAction'] == null ? undefined : json['FailureAction'], + 'Monitor': json['Monitor'] == null ? undefined : json['Monitor'], + 'MaxFailureRatio': json['MaxFailureRatio'] == null ? undefined : json['MaxFailureRatio'], + 'Order': json['Order'] == null ? undefined : json['Order'], + }; } export function ServiceSpecUpdateConfigToJSON(json: any): ServiceSpecUpdateConfig { - return ServiceSpecUpdateConfigToJSONTyped(json, false); + return ServiceSpecUpdateConfigToJSONTyped(json, false); } -export function ServiceSpecUpdateConfigToJSONTyped( - value?: ServiceSpecUpdateConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceSpecUpdateConfigToJSONTyped(value?: ServiceSpecUpdateConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Parallelism: value["Parallelism"], - Delay: value["Delay"], - FailureAction: value["FailureAction"], - Monitor: value["Monitor"], - MaxFailureRatio: value["MaxFailureRatio"], - Order: value["Order"], - }; + return { + + 'Parallelism': value['Parallelism'], + 'Delay': value['Delay'], + 'FailureAction': value['FailureAction'], + 'Monitor': value['Monitor'], + 'MaxFailureRatio': value['MaxFailureRatio'], + 'Order': value['Order'], + }; } + diff --git a/src/clients/docker/models/ServiceUpdateRequest.ts b/src/clients/docker/models/ServiceUpdateRequest.ts index 26ac5e62c9..b5dd07093a 100644 --- a/src/clients/docker/models/ServiceUpdateRequest.ts +++ b/src/clients/docker/models/ServiceUpdateRequest.ts @@ -2,179 +2,163 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; +import { mapValues } from '../runtime'; +import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from "./NetworkAttachmentConfig"; -import type { ServiceSpecRollbackConfig } from "./ServiceSpecRollbackConfig"; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from './NetworkAttachmentConfig'; +import type { ServiceSpecRollbackConfig } from './ServiceSpecRollbackConfig'; import { - ServiceSpecRollbackConfigFromJSON, - ServiceSpecRollbackConfigFromJSONTyped, - ServiceSpecRollbackConfigToJSON, - ServiceSpecRollbackConfigToJSONTyped, -} from "./ServiceSpecRollbackConfig"; -import type { ServiceSpecUpdateConfig } from "./ServiceSpecUpdateConfig"; + ServiceSpecRollbackConfigFromJSON, + ServiceSpecRollbackConfigFromJSONTyped, + ServiceSpecRollbackConfigToJSON, + ServiceSpecRollbackConfigToJSONTyped, +} from './ServiceSpecRollbackConfig'; +import type { ServiceSpecUpdateConfig } from './ServiceSpecUpdateConfig'; import { - ServiceSpecUpdateConfigFromJSON, - ServiceSpecUpdateConfigFromJSONTyped, - ServiceSpecUpdateConfigToJSON, - ServiceSpecUpdateConfigToJSONTyped, -} from "./ServiceSpecUpdateConfig"; -import type { EndpointSpec } from "./EndpointSpec"; + ServiceSpecUpdateConfigFromJSON, + ServiceSpecUpdateConfigFromJSONTyped, + ServiceSpecUpdateConfigToJSON, + ServiceSpecUpdateConfigToJSONTyped, +} from './ServiceSpecUpdateConfig'; +import type { EndpointSpec } from './EndpointSpec'; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from "./EndpointSpec"; -import type { TaskSpec } from "./TaskSpec"; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from './EndpointSpec'; +import type { TaskSpec } from './TaskSpec'; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from "./TaskSpec"; -import type { ServiceSpecMode } from "./ServiceSpecMode"; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from './TaskSpec'; +import type { ServiceSpecMode } from './ServiceSpecMode'; import { - ServiceSpecModeFromJSON, - ServiceSpecModeFromJSONTyped, - ServiceSpecModeToJSON, - ServiceSpecModeToJSONTyped, -} from "./ServiceSpecMode"; + ServiceSpecModeFromJSON, + ServiceSpecModeFromJSONTyped, + ServiceSpecModeToJSON, + ServiceSpecModeToJSONTyped, +} from './ServiceSpecMode'; /** - * + * * @export * @interface ServiceUpdateRequest */ export interface ServiceUpdateRequest { - /** - * Name of the service. - * @type {string} - * @memberof ServiceUpdateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ServiceUpdateRequest - */ - Labels?: { [key: string]: string }; - /** - * - * @type {TaskSpec} - * @memberof ServiceUpdateRequest - */ - TaskTemplate?: TaskSpec; - /** - * - * @type {ServiceSpecMode} - * @memberof ServiceUpdateRequest - */ - Mode?: ServiceSpecMode; - /** - * - * @type {ServiceSpecUpdateConfig} - * @memberof ServiceUpdateRequest - */ - UpdateConfig?: ServiceSpecUpdateConfig; - /** - * - * @type {ServiceSpecRollbackConfig} - * @memberof ServiceUpdateRequest - */ - RollbackConfig?: ServiceSpecRollbackConfig; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof ServiceUpdateRequest - */ - Networks?: Array; - /** - * - * @type {EndpointSpec} - * @memberof ServiceUpdateRequest - */ - EndpointSpec?: EndpointSpec; + /** + * Name of the service. + * @type {string} + * @memberof ServiceUpdateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ServiceUpdateRequest + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {TaskSpec} + * @memberof ServiceUpdateRequest + */ + TaskTemplate?: TaskSpec; + /** + * + * @type {ServiceSpecMode} + * @memberof ServiceUpdateRequest + */ + Mode?: ServiceSpecMode; + /** + * + * @type {ServiceSpecUpdateConfig} + * @memberof ServiceUpdateRequest + */ + UpdateConfig?: ServiceSpecUpdateConfig; + /** + * + * @type {ServiceSpecRollbackConfig} + * @memberof ServiceUpdateRequest + */ + RollbackConfig?: ServiceSpecRollbackConfig; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof ServiceUpdateRequest + */ + Networks?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceUpdateRequest + */ + EndpointSpec?: EndpointSpec; } /** * Check if a given object implements the ServiceUpdateRequest interface. */ export function instanceOfServiceUpdateRequest(value: object): value is ServiceUpdateRequest { - return true; + return true; } export function ServiceUpdateRequestFromJSON(json: any): ServiceUpdateRequest { - return ServiceUpdateRequestFromJSONTyped(json, false); + return ServiceUpdateRequestFromJSONTyped(json, false); } -export function ServiceUpdateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceUpdateRequest { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - TaskTemplate: json["TaskTemplate"] == null ? undefined : TaskSpecFromJSON(json["TaskTemplate"]), - Mode: json["Mode"] == null ? undefined : ServiceSpecModeFromJSON(json["Mode"]), - UpdateConfig: - json["UpdateConfig"] == null - ? undefined - : ServiceSpecUpdateConfigFromJSON(json["UpdateConfig"]), - RollbackConfig: - json["RollbackConfig"] == null - ? undefined - : ServiceSpecRollbackConfigFromJSON(json["RollbackConfig"]), - Networks: - json["Networks"] == null - ? undefined - : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), - EndpointSpec: - json["EndpointSpec"] == null ? undefined : EndpointSpecFromJSON(json["EndpointSpec"]), - }; +export function ServiceUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceUpdateRequest { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'TaskTemplate': json['TaskTemplate'] == null ? undefined : TaskSpecFromJSON(json['TaskTemplate']), + 'Mode': json['Mode'] == null ? undefined : ServiceSpecModeFromJSON(json['Mode']), + 'UpdateConfig': json['UpdateConfig'] == null ? undefined : ServiceSpecUpdateConfigFromJSON(json['UpdateConfig']), + 'RollbackConfig': json['RollbackConfig'] == null ? undefined : ServiceSpecRollbackConfigFromJSON(json['RollbackConfig']), + 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), + 'EndpointSpec': json['EndpointSpec'] == null ? undefined : EndpointSpecFromJSON(json['EndpointSpec']), + }; } export function ServiceUpdateRequestToJSON(json: any): ServiceUpdateRequest { - return ServiceUpdateRequestToJSONTyped(json, false); + return ServiceUpdateRequestToJSONTyped(json, false); } -export function ServiceUpdateRequestToJSONTyped( - value?: ServiceUpdateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceUpdateRequestToJSONTyped(value?: ServiceUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - TaskTemplate: TaskSpecToJSON(value["TaskTemplate"]), - Mode: ServiceSpecModeToJSON(value["Mode"]), - UpdateConfig: ServiceSpecUpdateConfigToJSON(value["UpdateConfig"]), - RollbackConfig: ServiceSpecRollbackConfigToJSON(value["RollbackConfig"]), - Networks: - value["Networks"] == null - ? undefined - : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), - EndpointSpec: EndpointSpecToJSON(value["EndpointSpec"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'TaskTemplate': TaskSpecToJSON(value['TaskTemplate']), + 'Mode': ServiceSpecModeToJSON(value['Mode']), + 'UpdateConfig': ServiceSpecUpdateConfigToJSON(value['UpdateConfig']), + 'RollbackConfig': ServiceSpecRollbackConfigToJSON(value['RollbackConfig']), + 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), + 'EndpointSpec': EndpointSpecToJSON(value['EndpointSpec']), + }; } + diff --git a/src/clients/docker/models/ServiceUpdateResponse.ts b/src/clients/docker/models/ServiceUpdateResponse.ts index e5bb2325f2..e80e379d55 100644 --- a/src/clients/docker/models/ServiceUpdateResponse.ts +++ b/src/clients/docker/models/ServiceUpdateResponse.ts @@ -2,67 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ServiceUpdateResponse */ export interface ServiceUpdateResponse { - /** - * Optional warning messages - * @type {Array} - * @memberof ServiceUpdateResponse - */ - Warnings?: Array; + /** + * Optional warning messages + * @type {Array} + * @memberof ServiceUpdateResponse + */ + Warnings?: Array; } /** * Check if a given object implements the ServiceUpdateResponse interface. */ export function instanceOfServiceUpdateResponse(value: object): value is ServiceUpdateResponse { - return true; + return true; } export function ServiceUpdateResponseFromJSON(json: any): ServiceUpdateResponse { - return ServiceUpdateResponseFromJSONTyped(json, false); + return ServiceUpdateResponseFromJSONTyped(json, false); } -export function ServiceUpdateResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceUpdateResponse { - if (json == null) { - return json; - } - return { - Warnings: json["Warnings"] == null ? undefined : json["Warnings"], - }; +export function ServiceUpdateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceUpdateResponse { + if (json == null) { + return json; + } + return { + + 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], + }; } export function ServiceUpdateResponseToJSON(json: any): ServiceUpdateResponse { - return ServiceUpdateResponseToJSONTyped(json, false); + return ServiceUpdateResponseToJSONTyped(json, false); } -export function ServiceUpdateResponseToJSONTyped( - value?: ServiceUpdateResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceUpdateResponseToJSONTyped(value?: ServiceUpdateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Warnings: value["Warnings"], - }; + return { + + 'Warnings': value['Warnings'], + }; } + diff --git a/src/clients/docker/models/ServiceUpdateStatus.ts b/src/clients/docker/models/ServiceUpdateStatus.ts index ccb4ac3091..b25edb822d 100644 --- a/src/clients/docker/models/ServiceUpdateStatus.ts +++ b/src/clients/docker/models/ServiceUpdateStatus.ts @@ -2,101 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The status of a service update. * @export * @interface ServiceUpdateStatus */ export interface ServiceUpdateStatus { - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - State?: ServiceUpdateStatusStateEnum; - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - StartedAt?: string; - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - CompletedAt?: string; - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - Message?: string; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + State?: ServiceUpdateStatusStateEnum; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + StartedAt?: string; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + CompletedAt?: string; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + Message?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ServiceUpdateStatusStateEnum { - Updating = "updating", - Paused = "paused", - Completed = "completed", + Updating = 'updating', + Paused = 'paused', + Completed = 'completed' } + /** * Check if a given object implements the ServiceUpdateStatus interface. */ export function instanceOfServiceUpdateStatus(value: object): value is ServiceUpdateStatus { - return true; + return true; } export function ServiceUpdateStatusFromJSON(json: any): ServiceUpdateStatus { - return ServiceUpdateStatusFromJSONTyped(json, false); + return ServiceUpdateStatusFromJSONTyped(json, false); } -export function ServiceUpdateStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ServiceUpdateStatus { - if (json == null) { - return json; - } - return { - State: json["State"] == null ? undefined : json["State"], - StartedAt: json["StartedAt"] == null ? undefined : json["StartedAt"], - CompletedAt: json["CompletedAt"] == null ? undefined : json["CompletedAt"], - Message: json["Message"] == null ? undefined : json["Message"], - }; +export function ServiceUpdateStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceUpdateStatus { + if (json == null) { + return json; + } + return { + + 'State': json['State'] == null ? undefined : json['State'], + 'StartedAt': json['StartedAt'] == null ? undefined : json['StartedAt'], + 'CompletedAt': json['CompletedAt'] == null ? undefined : json['CompletedAt'], + 'Message': json['Message'] == null ? undefined : json['Message'], + }; } export function ServiceUpdateStatusToJSON(json: any): ServiceUpdateStatus { - return ServiceUpdateStatusToJSONTyped(json, false); + return ServiceUpdateStatusToJSONTyped(json, false); } -export function ServiceUpdateStatusToJSONTyped( - value?: ServiceUpdateStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ServiceUpdateStatusToJSONTyped(value?: ServiceUpdateStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - State: value["State"], - StartedAt: value["StartedAt"], - CompletedAt: value["CompletedAt"], - Message: value["Message"], - }; + return { + + 'State': value['State'], + 'StartedAt': value['StartedAt'], + 'CompletedAt': value['CompletedAt'], + 'Message': value['Message'], + }; } + diff --git a/src/clients/docker/models/Swarm.ts b/src/clients/docker/models/Swarm.ts index 922934a0c4..accd7cb342 100644 --- a/src/clients/docker/models/Swarm.ts +++ b/src/clients/docker/models/Swarm.ts @@ -2,183 +2,185 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { JoinTokens } from "./JoinTokens"; +import { mapValues } from '../runtime'; +import type { JoinTokens } from './JoinTokens'; import { - JoinTokensFromJSON, - JoinTokensFromJSONTyped, - JoinTokensToJSON, - JoinTokensToJSONTyped, -} from "./JoinTokens"; -import type { ObjectVersion } from "./ObjectVersion"; + JoinTokensFromJSON, + JoinTokensFromJSONTyped, + JoinTokensToJSON, + JoinTokensToJSONTyped, +} from './JoinTokens'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { TLSInfo } from "./TLSInfo"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { TLSInfo } from './TLSInfo'; import { - TLSInfoFromJSON, - TLSInfoFromJSONTyped, - TLSInfoToJSON, - TLSInfoToJSONTyped, -} from "./TLSInfo"; -import type { SwarmSpec } from "./SwarmSpec"; + TLSInfoFromJSON, + TLSInfoFromJSONTyped, + TLSInfoToJSON, + TLSInfoToJSONTyped, +} from './TLSInfo'; +import type { SwarmSpec } from './SwarmSpec'; import { - SwarmSpecFromJSON, - SwarmSpecFromJSONTyped, - SwarmSpecToJSON, - SwarmSpecToJSONTyped, -} from "./SwarmSpec"; + SwarmSpecFromJSON, + SwarmSpecFromJSONTyped, + SwarmSpecToJSON, + SwarmSpecToJSONTyped, +} from './SwarmSpec'; /** - * + * * @export * @interface Swarm */ export interface Swarm { - /** - * The ID of the swarm. - * @type {string} - * @memberof Swarm - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Swarm - */ - Version?: ObjectVersion; - /** - * Date and time at which the swarm was initialised in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Swarm - */ - CreatedAt?: string; - /** - * Date and time at which the swarm was last updated in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Swarm - */ - UpdatedAt?: string; - /** - * - * @type {SwarmSpec} - * @memberof Swarm - */ - Spec?: SwarmSpec; - /** - * - * @type {TLSInfo} - * @memberof Swarm - */ - TLSInfo?: TLSInfo; - /** - * Whether there is currently a root CA rotation in progress for the swarm - * - * @type {boolean} - * @memberof Swarm - */ - RootRotationInProgress?: boolean; - /** - * DataPathPort specifies the data path port number for data traffic. - * Acceptable port range is 1024 to 49151. - * If no port is set or is set to 0, the default port (4789) is used. - * - * @type {number} - * @memberof Swarm - */ - DataPathPort?: number; - /** - * Default Address Pool specifies default subnet pools for global scope - * networks. - * - * @type {Array} - * @memberof Swarm - */ - DefaultAddrPool?: Array; - /** - * SubnetSize specifies the subnet size of the networks created from the - * default subnet pool. - * - * @type {number} - * @memberof Swarm - */ - SubnetSize?: number; - /** - * - * @type {JoinTokens} - * @memberof Swarm - */ - JoinTokens?: JoinTokens; + /** + * The ID of the swarm. + * @type {string} + * @memberof Swarm + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Swarm + */ + Version?: ObjectVersion; + /** + * Date and time at which the swarm was initialised in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Swarm + */ + CreatedAt?: string; + /** + * Date and time at which the swarm was last updated in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Swarm + */ + UpdatedAt?: string; + /** + * + * @type {SwarmSpec} + * @memberof Swarm + */ + Spec?: SwarmSpec; + /** + * + * @type {TLSInfo} + * @memberof Swarm + */ + TLSInfo?: TLSInfo; + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @type {boolean} + * @memberof Swarm + */ + RootRotationInProgress?: boolean; + /** + * DataPathPort specifies the data path port number for data traffic. + * Acceptable port range is 1024 to 49151. + * If no port is set or is set to 0, the default port (4789) is used. + * + * @type {number} + * @memberof Swarm + */ + DataPathPort?: number; + /** + * Default Address Pool specifies default subnet pools for global scope + * networks. + * + * @type {Array} + * @memberof Swarm + */ + DefaultAddrPool?: Array; + /** + * SubnetSize specifies the subnet size of the networks created from the + * default subnet pool. + * + * @type {number} + * @memberof Swarm + */ + SubnetSize?: number; + /** + * + * @type {JoinTokens} + * @memberof Swarm + */ + JoinTokens?: JoinTokens; } /** * Check if a given object implements the Swarm interface. */ export function instanceOfSwarm(value: object): value is Swarm { - return true; + return true; } export function SwarmFromJSON(json: any): Swarm { - return SwarmFromJSONTyped(json, false); + return SwarmFromJSONTyped(json, false); } export function SwarmFromJSONTyped(json: any, ignoreDiscriminator: boolean): Swarm { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Spec: json["Spec"] == null ? undefined : SwarmSpecFromJSON(json["Spec"]), - TLSInfo: json["TLSInfo"] == null ? undefined : TLSInfoFromJSON(json["TLSInfo"]), - RootRotationInProgress: - json["RootRotationInProgress"] == null ? undefined : json["RootRotationInProgress"], - DataPathPort: json["DataPathPort"] == null ? undefined : json["DataPathPort"], - DefaultAddrPool: json["DefaultAddrPool"] == null ? undefined : json["DefaultAddrPool"], - SubnetSize: json["SubnetSize"] == null ? undefined : json["SubnetSize"], - JoinTokens: json["JoinTokens"] == null ? undefined : JoinTokensFromJSON(json["JoinTokens"]), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Spec': json['Spec'] == null ? undefined : SwarmSpecFromJSON(json['Spec']), + 'TLSInfo': json['TLSInfo'] == null ? undefined : TLSInfoFromJSON(json['TLSInfo']), + 'RootRotationInProgress': json['RootRotationInProgress'] == null ? undefined : json['RootRotationInProgress'], + 'DataPathPort': json['DataPathPort'] == null ? undefined : json['DataPathPort'], + 'DefaultAddrPool': json['DefaultAddrPool'] == null ? undefined : json['DefaultAddrPool'], + 'SubnetSize': json['SubnetSize'] == null ? undefined : json['SubnetSize'], + 'JoinTokens': json['JoinTokens'] == null ? undefined : JoinTokensFromJSON(json['JoinTokens']), + }; } export function SwarmToJSON(json: any): Swarm { - return SwarmToJSONTyped(json, false); + return SwarmToJSONTyped(json, false); } export function SwarmToJSONTyped(value?: Swarm | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Spec: SwarmSpecToJSON(value["Spec"]), - TLSInfo: TLSInfoToJSON(value["TLSInfo"]), - RootRotationInProgress: value["RootRotationInProgress"], - DataPathPort: value["DataPathPort"], - DefaultAddrPool: value["DefaultAddrPool"], - SubnetSize: value["SubnetSize"], - JoinTokens: JoinTokensToJSON(value["JoinTokens"]), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Spec': SwarmSpecToJSON(value['Spec']), + 'TLSInfo': TLSInfoToJSON(value['TLSInfo']), + 'RootRotationInProgress': value['RootRotationInProgress'], + 'DataPathPort': value['DataPathPort'], + 'DefaultAddrPool': value['DefaultAddrPool'], + 'SubnetSize': value['SubnetSize'], + 'JoinTokens': JoinTokensToJSON(value['JoinTokens']), + }; } + diff --git a/src/clients/docker/models/SwarmInfo.ts b/src/clients/docker/models/SwarmInfo.ts index ac23879ddb..adc27f05b1 100644 --- a/src/clients/docker/models/SwarmInfo.ts +++ b/src/clients/docker/models/SwarmInfo.ts @@ -2,161 +2,156 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ClusterInfo } from "./ClusterInfo"; +import { mapValues } from '../runtime'; +import type { ClusterInfo } from './ClusterInfo'; import { - ClusterInfoFromJSON, - ClusterInfoFromJSONTyped, - ClusterInfoToJSON, - ClusterInfoToJSONTyped, -} from "./ClusterInfo"; -import type { PeerNode } from "./PeerNode"; + ClusterInfoFromJSON, + ClusterInfoFromJSONTyped, + ClusterInfoToJSON, + ClusterInfoToJSONTyped, +} from './ClusterInfo'; +import type { PeerNode } from './PeerNode'; import { - PeerNodeFromJSON, - PeerNodeFromJSONTyped, - PeerNodeToJSON, - PeerNodeToJSONTyped, -} from "./PeerNode"; -import type { LocalNodeState } from "./LocalNodeState"; + PeerNodeFromJSON, + PeerNodeFromJSONTyped, + PeerNodeToJSON, + PeerNodeToJSONTyped, +} from './PeerNode'; +import type { LocalNodeState } from './LocalNodeState'; import { - LocalNodeStateFromJSON, - LocalNodeStateFromJSONTyped, - LocalNodeStateToJSON, - LocalNodeStateToJSONTyped, -} from "./LocalNodeState"; + LocalNodeStateFromJSON, + LocalNodeStateFromJSONTyped, + LocalNodeStateToJSON, + LocalNodeStateToJSONTyped, +} from './LocalNodeState'; /** * Represents generic information about swarm. - * + * * @export * @interface SwarmInfo */ export interface SwarmInfo { - /** - * Unique identifier of for this node in the swarm. - * @type {string} - * @memberof SwarmInfo - */ - NodeID?: string; - /** - * IP address at which this node can be reached by other nodes in the - * swarm. - * - * @type {string} - * @memberof SwarmInfo - */ - NodeAddr?: string; - /** - * - * @type {LocalNodeState} - * @memberof SwarmInfo - */ - LocalNodeState?: LocalNodeState; - /** - * - * @type {boolean} - * @memberof SwarmInfo - */ - ControlAvailable?: boolean; - /** - * - * @type {string} - * @memberof SwarmInfo - */ - Error?: string; - /** - * List of ID's and addresses of other managers in the swarm. - * - * @type {Array} - * @memberof SwarmInfo - */ - RemoteManagers?: Array | null; - /** - * Total number of nodes in the swarm. - * @type {number} - * @memberof SwarmInfo - */ - Nodes?: number | null; - /** - * Total number of managers in the swarm. - * @type {number} - * @memberof SwarmInfo - */ - Managers?: number | null; - /** - * - * @type {ClusterInfo} - * @memberof SwarmInfo - */ - Cluster?: ClusterInfo | null; + /** + * Unique identifier of for this node in the swarm. + * @type {string} + * @memberof SwarmInfo + */ + NodeID?: string; + /** + * IP address at which this node can be reached by other nodes in the + * swarm. + * + * @type {string} + * @memberof SwarmInfo + */ + NodeAddr?: string; + /** + * + * @type {LocalNodeState} + * @memberof SwarmInfo + */ + LocalNodeState?: LocalNodeState; + /** + * + * @type {boolean} + * @memberof SwarmInfo + */ + ControlAvailable?: boolean; + /** + * + * @type {string} + * @memberof SwarmInfo + */ + Error?: string; + /** + * List of ID's and addresses of other managers in the swarm. + * + * @type {Array} + * @memberof SwarmInfo + */ + RemoteManagers?: Array | null; + /** + * Total number of nodes in the swarm. + * @type {number} + * @memberof SwarmInfo + */ + Nodes?: number | null; + /** + * Total number of managers in the swarm. + * @type {number} + * @memberof SwarmInfo + */ + Managers?: number | null; + /** + * + * @type {ClusterInfo} + * @memberof SwarmInfo + */ + Cluster?: ClusterInfo | null; } + + /** * Check if a given object implements the SwarmInfo interface. */ export function instanceOfSwarmInfo(value: object): value is SwarmInfo { - return true; + return true; } export function SwarmInfoFromJSON(json: any): SwarmInfo { - return SwarmInfoFromJSONTyped(json, false); + return SwarmInfoFromJSONTyped(json, false); } export function SwarmInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmInfo { - if (json == null) { - return json; - } - return { - NodeID: json["NodeID"] == null ? undefined : json["NodeID"], - NodeAddr: json["NodeAddr"] == null ? undefined : json["NodeAddr"], - LocalNodeState: - json["LocalNodeState"] == null ? undefined : LocalNodeStateFromJSON(json["LocalNodeState"]), - ControlAvailable: json["ControlAvailable"] == null ? undefined : json["ControlAvailable"], - Error: json["Error"] == null ? undefined : json["Error"], - RemoteManagers: - json["RemoteManagers"] == null - ? undefined - : (json["RemoteManagers"] as Array).map(PeerNodeFromJSON), - Nodes: json["Nodes"] == null ? undefined : json["Nodes"], - Managers: json["Managers"] == null ? undefined : json["Managers"], - Cluster: json["Cluster"] == null ? undefined : ClusterInfoFromJSON(json["Cluster"]), - }; + if (json == null) { + return json; + } + return { + + 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], + 'NodeAddr': json['NodeAddr'] == null ? undefined : json['NodeAddr'], + 'LocalNodeState': json['LocalNodeState'] == null ? undefined : LocalNodeStateFromJSON(json['LocalNodeState']), + 'ControlAvailable': json['ControlAvailable'] == null ? undefined : json['ControlAvailable'], + 'Error': json['Error'] == null ? undefined : json['Error'], + 'RemoteManagers': json['RemoteManagers'] == null ? undefined : ((json['RemoteManagers'] as Array).map(PeerNodeFromJSON)), + 'Nodes': json['Nodes'] == null ? undefined : json['Nodes'], + 'Managers': json['Managers'] == null ? undefined : json['Managers'], + 'Cluster': json['Cluster'] == null ? undefined : ClusterInfoFromJSON(json['Cluster']), + }; } export function SwarmInfoToJSON(json: any): SwarmInfo { - return SwarmInfoToJSONTyped(json, false); + return SwarmInfoToJSONTyped(json, false); } -export function SwarmInfoToJSONTyped( - value?: SwarmInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmInfoToJSONTyped(value?: SwarmInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NodeID: value["NodeID"], - NodeAddr: value["NodeAddr"], - LocalNodeState: LocalNodeStateToJSON(value["LocalNodeState"]), - ControlAvailable: value["ControlAvailable"], - Error: value["Error"], - RemoteManagers: - value["RemoteManagers"] == null - ? undefined - : (value["RemoteManagers"] as Array).map(PeerNodeToJSON), - Nodes: value["Nodes"], - Managers: value["Managers"], - Cluster: ClusterInfoToJSON(value["Cluster"]), - }; + return { + + 'NodeID': value['NodeID'], + 'NodeAddr': value['NodeAddr'], + 'LocalNodeState': LocalNodeStateToJSON(value['LocalNodeState']), + 'ControlAvailable': value['ControlAvailable'], + 'Error': value['Error'], + 'RemoteManagers': value['RemoteManagers'] == null ? undefined : ((value['RemoteManagers'] as Array).map(PeerNodeToJSON)), + 'Nodes': value['Nodes'], + 'Managers': value['Managers'], + 'Cluster': ClusterInfoToJSON(value['Cluster']), + }; } + diff --git a/src/clients/docker/models/SwarmInitRequest.ts b/src/clients/docker/models/SwarmInitRequest.ts index 7c09d8c63b..4150150a55 100644 --- a/src/clients/docker/models/SwarmInitRequest.ts +++ b/src/clients/docker/models/SwarmInitRequest.ts @@ -2,160 +2,157 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SwarmSpec } from "./SwarmSpec"; +import { mapValues } from '../runtime'; +import type { SwarmSpec } from './SwarmSpec'; import { - SwarmSpecFromJSON, - SwarmSpecFromJSONTyped, - SwarmSpecToJSON, - SwarmSpecToJSONTyped, -} from "./SwarmSpec"; + SwarmSpecFromJSON, + SwarmSpecFromJSONTyped, + SwarmSpecToJSON, + SwarmSpecToJSONTyped, +} from './SwarmSpec'; /** - * + * * @export * @interface SwarmInitRequest */ export interface SwarmInitRequest { - /** - * Listen address used for inter-manager communication, as well - * as determining the networking interface used for the VXLAN - * Tunnel Endpoint (VTEP). This can either be an address/port - * combination in the form `192.168.1.1:4567`, or an interface - * followed by a port number, like `eth0:4567`. If the port number - * is omitted, the default swarm listening port is used. - * - * @type {string} - * @memberof SwarmInitRequest - */ - ListenAddr?: string; - /** - * Externally reachable address advertised to other nodes. This - * can either be an address/port combination in the form - * `192.168.1.1:4567`, or an interface followed by a port number, - * like `eth0:4567`. If the port number is omitted, the port - * number from the listen address is used. If `AdvertiseAddr` is - * not specified, it will be automatically detected when possible. - * - * @type {string} - * @memberof SwarmInitRequest - */ - AdvertiseAddr?: string; - /** - * Address or interface to use for data path traffic (format: - * ``), for example, `192.168.1.1`, or an interface, - * like `eth0`. If `DataPathAddr` is unspecified, the same address - * as `AdvertiseAddr` is used. - * - * The `DataPathAddr` specifies the address that global scope - * network drivers will publish towards other nodes in order to - * reach the containers running on this node. Using this parameter - * it is possible to separate the container data traffic from the - * management traffic of the cluster. - * - * @type {string} - * @memberof SwarmInitRequest - */ - DataPathAddr?: string; - /** - * DataPathPort specifies the data path port number for data traffic. - * Acceptable port range is 1024 to 49151. - * if no port is set or is set to 0, default port 4789 will be used. - * - * @type {number} - * @memberof SwarmInitRequest - */ - DataPathPort?: number; - /** - * Default Address Pool specifies default subnet pools for global - * scope networks. - * - * @type {Array} - * @memberof SwarmInitRequest - */ - DefaultAddrPool?: Array; - /** - * Force creation of a new swarm. - * @type {boolean} - * @memberof SwarmInitRequest - */ - ForceNewCluster?: boolean; - /** - * SubnetSize specifies the subnet size of the networks created - * from the default subnet pool. - * - * @type {number} - * @memberof SwarmInitRequest - */ - SubnetSize?: number; - /** - * - * @type {SwarmSpec} - * @memberof SwarmInitRequest - */ - Spec?: SwarmSpec; + /** + * Listen address used for inter-manager communication, as well + * as determining the networking interface used for the VXLAN + * Tunnel Endpoint (VTEP). This can either be an address/port + * combination in the form `192.168.1.1:4567`, or an interface + * followed by a port number, like `eth0:4567`. If the port number + * is omitted, the default swarm listening port is used. + * + * @type {string} + * @memberof SwarmInitRequest + */ + ListenAddr?: string; + /** + * Externally reachable address advertised to other nodes. This + * can either be an address/port combination in the form + * `192.168.1.1:4567`, or an interface followed by a port number, + * like `eth0:4567`. If the port number is omitted, the port + * number from the listen address is used. If `AdvertiseAddr` is + * not specified, it will be automatically detected when possible. + * + * @type {string} + * @memberof SwarmInitRequest + */ + AdvertiseAddr?: string; + /** + * Address or interface to use for data path traffic (format: + * ``), for example, `192.168.1.1`, or an interface, + * like `eth0`. If `DataPathAddr` is unspecified, the same address + * as `AdvertiseAddr` is used. + * + * The `DataPathAddr` specifies the address that global scope + * network drivers will publish towards other nodes in order to + * reach the containers running on this node. Using this parameter + * it is possible to separate the container data traffic from the + * management traffic of the cluster. + * + * @type {string} + * @memberof SwarmInitRequest + */ + DataPathAddr?: string; + /** + * DataPathPort specifies the data path port number for data traffic. + * Acceptable port range is 1024 to 49151. + * if no port is set or is set to 0, default port 4789 will be used. + * + * @type {number} + * @memberof SwarmInitRequest + */ + DataPathPort?: number; + /** + * Default Address Pool specifies default subnet pools for global + * scope networks. + * + * @type {Array} + * @memberof SwarmInitRequest + */ + DefaultAddrPool?: Array; + /** + * Force creation of a new swarm. + * @type {boolean} + * @memberof SwarmInitRequest + */ + ForceNewCluster?: boolean; + /** + * SubnetSize specifies the subnet size of the networks created + * from the default subnet pool. + * + * @type {number} + * @memberof SwarmInitRequest + */ + SubnetSize?: number; + /** + * + * @type {SwarmSpec} + * @memberof SwarmInitRequest + */ + Spec?: SwarmSpec; } /** * Check if a given object implements the SwarmInitRequest interface. */ export function instanceOfSwarmInitRequest(value: object): value is SwarmInitRequest { - return true; + return true; } export function SwarmInitRequestFromJSON(json: any): SwarmInitRequest { - return SwarmInitRequestFromJSONTyped(json, false); + return SwarmInitRequestFromJSONTyped(json, false); } -export function SwarmInitRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmInitRequest { - if (json == null) { - return json; - } - return { - ListenAddr: json["ListenAddr"] == null ? undefined : json["ListenAddr"], - AdvertiseAddr: json["AdvertiseAddr"] == null ? undefined : json["AdvertiseAddr"], - DataPathAddr: json["DataPathAddr"] == null ? undefined : json["DataPathAddr"], - DataPathPort: json["DataPathPort"] == null ? undefined : json["DataPathPort"], - DefaultAddrPool: json["DefaultAddrPool"] == null ? undefined : json["DefaultAddrPool"], - ForceNewCluster: json["ForceNewCluster"] == null ? undefined : json["ForceNewCluster"], - SubnetSize: json["SubnetSize"] == null ? undefined : json["SubnetSize"], - Spec: json["Spec"] == null ? undefined : SwarmSpecFromJSON(json["Spec"]), - }; +export function SwarmInitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmInitRequest { + if (json == null) { + return json; + } + return { + + 'ListenAddr': json['ListenAddr'] == null ? undefined : json['ListenAddr'], + 'AdvertiseAddr': json['AdvertiseAddr'] == null ? undefined : json['AdvertiseAddr'], + 'DataPathAddr': json['DataPathAddr'] == null ? undefined : json['DataPathAddr'], + 'DataPathPort': json['DataPathPort'] == null ? undefined : json['DataPathPort'], + 'DefaultAddrPool': json['DefaultAddrPool'] == null ? undefined : json['DefaultAddrPool'], + 'ForceNewCluster': json['ForceNewCluster'] == null ? undefined : json['ForceNewCluster'], + 'SubnetSize': json['SubnetSize'] == null ? undefined : json['SubnetSize'], + 'Spec': json['Spec'] == null ? undefined : SwarmSpecFromJSON(json['Spec']), + }; } export function SwarmInitRequestToJSON(json: any): SwarmInitRequest { - return SwarmInitRequestToJSONTyped(json, false); + return SwarmInitRequestToJSONTyped(json, false); } -export function SwarmInitRequestToJSONTyped( - value?: SwarmInitRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmInitRequestToJSONTyped(value?: SwarmInitRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ListenAddr: value["ListenAddr"], - AdvertiseAddr: value["AdvertiseAddr"], - DataPathAddr: value["DataPathAddr"], - DataPathPort: value["DataPathPort"], - DefaultAddrPool: value["DefaultAddrPool"], - ForceNewCluster: value["ForceNewCluster"], - SubnetSize: value["SubnetSize"], - Spec: SwarmSpecToJSON(value["Spec"]), - }; + return { + + 'ListenAddr': value['ListenAddr'], + 'AdvertiseAddr': value['AdvertiseAddr'], + 'DataPathAddr': value['DataPathAddr'], + 'DataPathPort': value['DataPathPort'], + 'DefaultAddrPool': value['DefaultAddrPool'], + 'ForceNewCluster': value['ForceNewCluster'], + 'SubnetSize': value['SubnetSize'], + 'Spec': SwarmSpecToJSON(value['Spec']), + }; } + diff --git a/src/clients/docker/models/SwarmJoinRequest.ts b/src/clients/docker/models/SwarmJoinRequest.ts index 2927c300e1..272b1b5af8 100644 --- a/src/clients/docker/models/SwarmJoinRequest.ts +++ b/src/clients/docker/models/SwarmJoinRequest.ts @@ -2,119 +2,116 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SwarmJoinRequest */ export interface SwarmJoinRequest { - /** - * Listen address used for inter-manager communication if the node - * gets promoted to manager, as well as determining the networking - * interface used for the VXLAN Tunnel Endpoint (VTEP). - * - * @type {string} - * @memberof SwarmJoinRequest - */ - ListenAddr?: string; - /** - * Externally reachable address advertised to other nodes. This - * can either be an address/port combination in the form - * `192.168.1.1:4567`, or an interface followed by a port number, - * like `eth0:4567`. If the port number is omitted, the port - * number from the listen address is used. If `AdvertiseAddr` is - * not specified, it will be automatically detected when possible. - * - * @type {string} - * @memberof SwarmJoinRequest - */ - AdvertiseAddr?: string; - /** - * Address or interface to use for data path traffic (format: - * ``), for example, `192.168.1.1`, or an interface, - * like `eth0`. If `DataPathAddr` is unspecified, the same address - * as `AdvertiseAddr` is used. - * - * The `DataPathAddr` specifies the address that global scope - * network drivers will publish towards other nodes in order to - * reach the containers running on this node. Using this parameter - * it is possible to separate the container data traffic from the - * management traffic of the cluster. - * - * @type {string} - * @memberof SwarmJoinRequest - */ - DataPathAddr?: string; - /** - * Addresses of manager nodes already participating in the swarm. - * - * @type {Array} - * @memberof SwarmJoinRequest - */ - RemoteAddrs?: Array; - /** - * Secret token for joining this swarm. - * @type {string} - * @memberof SwarmJoinRequest - */ - JoinToken?: string; + /** + * Listen address used for inter-manager communication if the node + * gets promoted to manager, as well as determining the networking + * interface used for the VXLAN Tunnel Endpoint (VTEP). + * + * @type {string} + * @memberof SwarmJoinRequest + */ + ListenAddr?: string; + /** + * Externally reachable address advertised to other nodes. This + * can either be an address/port combination in the form + * `192.168.1.1:4567`, or an interface followed by a port number, + * like `eth0:4567`. If the port number is omitted, the port + * number from the listen address is used. If `AdvertiseAddr` is + * not specified, it will be automatically detected when possible. + * + * @type {string} + * @memberof SwarmJoinRequest + */ + AdvertiseAddr?: string; + /** + * Address or interface to use for data path traffic (format: + * ``), for example, `192.168.1.1`, or an interface, + * like `eth0`. If `DataPathAddr` is unspecified, the same address + * as `AdvertiseAddr` is used. + * + * The `DataPathAddr` specifies the address that global scope + * network drivers will publish towards other nodes in order to + * reach the containers running on this node. Using this parameter + * it is possible to separate the container data traffic from the + * management traffic of the cluster. + * + * @type {string} + * @memberof SwarmJoinRequest + */ + DataPathAddr?: string; + /** + * Addresses of manager nodes already participating in the swarm. + * + * @type {Array} + * @memberof SwarmJoinRequest + */ + RemoteAddrs?: Array; + /** + * Secret token for joining this swarm. + * @type {string} + * @memberof SwarmJoinRequest + */ + JoinToken?: string; } /** * Check if a given object implements the SwarmJoinRequest interface. */ export function instanceOfSwarmJoinRequest(value: object): value is SwarmJoinRequest { - return true; + return true; } export function SwarmJoinRequestFromJSON(json: any): SwarmJoinRequest { - return SwarmJoinRequestFromJSONTyped(json, false); + return SwarmJoinRequestFromJSONTyped(json, false); } -export function SwarmJoinRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmJoinRequest { - if (json == null) { - return json; - } - return { - ListenAddr: json["ListenAddr"] == null ? undefined : json["ListenAddr"], - AdvertiseAddr: json["AdvertiseAddr"] == null ? undefined : json["AdvertiseAddr"], - DataPathAddr: json["DataPathAddr"] == null ? undefined : json["DataPathAddr"], - RemoteAddrs: json["RemoteAddrs"] == null ? undefined : json["RemoteAddrs"], - JoinToken: json["JoinToken"] == null ? undefined : json["JoinToken"], - }; +export function SwarmJoinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmJoinRequest { + if (json == null) { + return json; + } + return { + + 'ListenAddr': json['ListenAddr'] == null ? undefined : json['ListenAddr'], + 'AdvertiseAddr': json['AdvertiseAddr'] == null ? undefined : json['AdvertiseAddr'], + 'DataPathAddr': json['DataPathAddr'] == null ? undefined : json['DataPathAddr'], + 'RemoteAddrs': json['RemoteAddrs'] == null ? undefined : json['RemoteAddrs'], + 'JoinToken': json['JoinToken'] == null ? undefined : json['JoinToken'], + }; } export function SwarmJoinRequestToJSON(json: any): SwarmJoinRequest { - return SwarmJoinRequestToJSONTyped(json, false); + return SwarmJoinRequestToJSONTyped(json, false); } -export function SwarmJoinRequestToJSONTyped( - value?: SwarmJoinRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmJoinRequestToJSONTyped(value?: SwarmJoinRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ListenAddr: value["ListenAddr"], - AdvertiseAddr: value["AdvertiseAddr"], - DataPathAddr: value["DataPathAddr"], - RemoteAddrs: value["RemoteAddrs"], - JoinToken: value["JoinToken"], - }; + return { + + 'ListenAddr': value['ListenAddr'], + 'AdvertiseAddr': value['AdvertiseAddr'], + 'DataPathAddr': value['DataPathAddr'], + 'RemoteAddrs': value['RemoteAddrs'], + 'JoinToken': value['JoinToken'], + }; } + diff --git a/src/clients/docker/models/SwarmSpec.ts b/src/clients/docker/models/SwarmSpec.ts index 60562ebdbe..56b6014945 100644 --- a/src/clients/docker/models/SwarmSpec.ts +++ b/src/clients/docker/models/SwarmSpec.ts @@ -2,59 +2,59 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SwarmSpecDispatcher } from "./SwarmSpecDispatcher"; +import { mapValues } from '../runtime'; +import type { SwarmSpecDispatcher } from './SwarmSpecDispatcher'; import { - SwarmSpecDispatcherFromJSON, - SwarmSpecDispatcherFromJSONTyped, - SwarmSpecDispatcherToJSON, - SwarmSpecDispatcherToJSONTyped, -} from "./SwarmSpecDispatcher"; -import type { SwarmSpecOrchestration } from "./SwarmSpecOrchestration"; + SwarmSpecDispatcherFromJSON, + SwarmSpecDispatcherFromJSONTyped, + SwarmSpecDispatcherToJSON, + SwarmSpecDispatcherToJSONTyped, +} from './SwarmSpecDispatcher'; +import type { SwarmSpecOrchestration } from './SwarmSpecOrchestration'; import { - SwarmSpecOrchestrationFromJSON, - SwarmSpecOrchestrationFromJSONTyped, - SwarmSpecOrchestrationToJSON, - SwarmSpecOrchestrationToJSONTyped, -} from "./SwarmSpecOrchestration"; -import type { SwarmSpecCAConfig } from "./SwarmSpecCAConfig"; + SwarmSpecOrchestrationFromJSON, + SwarmSpecOrchestrationFromJSONTyped, + SwarmSpecOrchestrationToJSON, + SwarmSpecOrchestrationToJSONTyped, +} from './SwarmSpecOrchestration'; +import type { SwarmSpecCAConfig } from './SwarmSpecCAConfig'; import { - SwarmSpecCAConfigFromJSON, - SwarmSpecCAConfigFromJSONTyped, - SwarmSpecCAConfigToJSON, - SwarmSpecCAConfigToJSONTyped, -} from "./SwarmSpecCAConfig"; -import type { SwarmSpecTaskDefaults } from "./SwarmSpecTaskDefaults"; + SwarmSpecCAConfigFromJSON, + SwarmSpecCAConfigFromJSONTyped, + SwarmSpecCAConfigToJSON, + SwarmSpecCAConfigToJSONTyped, +} from './SwarmSpecCAConfig'; +import type { SwarmSpecTaskDefaults } from './SwarmSpecTaskDefaults'; import { - SwarmSpecTaskDefaultsFromJSON, - SwarmSpecTaskDefaultsFromJSONTyped, - SwarmSpecTaskDefaultsToJSON, - SwarmSpecTaskDefaultsToJSONTyped, -} from "./SwarmSpecTaskDefaults"; -import type { SwarmSpecRaft } from "./SwarmSpecRaft"; + SwarmSpecTaskDefaultsFromJSON, + SwarmSpecTaskDefaultsFromJSONTyped, + SwarmSpecTaskDefaultsToJSON, + SwarmSpecTaskDefaultsToJSONTyped, +} from './SwarmSpecTaskDefaults'; +import type { SwarmSpecRaft } from './SwarmSpecRaft'; import { - SwarmSpecRaftFromJSON, - SwarmSpecRaftFromJSONTyped, - SwarmSpecRaftToJSON, - SwarmSpecRaftToJSONTyped, -} from "./SwarmSpecRaft"; -import type { SwarmSpecEncryptionConfig } from "./SwarmSpecEncryptionConfig"; + SwarmSpecRaftFromJSON, + SwarmSpecRaftFromJSONTyped, + SwarmSpecRaftToJSON, + SwarmSpecRaftToJSONTyped, +} from './SwarmSpecRaft'; +import type { SwarmSpecEncryptionConfig } from './SwarmSpecEncryptionConfig'; import { - SwarmSpecEncryptionConfigFromJSON, - SwarmSpecEncryptionConfigFromJSONTyped, - SwarmSpecEncryptionConfigToJSON, - SwarmSpecEncryptionConfigToJSONTyped, -} from "./SwarmSpecEncryptionConfig"; + SwarmSpecEncryptionConfigFromJSON, + SwarmSpecEncryptionConfigFromJSONTyped, + SwarmSpecEncryptionConfigToJSON, + SwarmSpecEncryptionConfigToJSONTyped, +} from './SwarmSpecEncryptionConfig'; /** * User modifiable swarm configuration. @@ -62,113 +62,103 @@ import { * @interface SwarmSpec */ export interface SwarmSpec { - /** - * Name of the swarm. - * @type {string} - * @memberof SwarmSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof SwarmSpec - */ - Labels?: { [key: string]: string }; - /** - * - * @type {SwarmSpecOrchestration} - * @memberof SwarmSpec - */ - Orchestration?: SwarmSpecOrchestration | null; - /** - * - * @type {SwarmSpecRaft} - * @memberof SwarmSpec - */ - Raft?: SwarmSpecRaft; - /** - * - * @type {SwarmSpecDispatcher} - * @memberof SwarmSpec - */ - Dispatcher?: SwarmSpecDispatcher | null; - /** - * - * @type {SwarmSpecCAConfig} - * @memberof SwarmSpec - */ - CAConfig?: SwarmSpecCAConfig | null; - /** - * - * @type {SwarmSpecEncryptionConfig} - * @memberof SwarmSpec - */ - EncryptionConfig?: SwarmSpecEncryptionConfig; - /** - * - * @type {SwarmSpecTaskDefaults} - * @memberof SwarmSpec - */ - TaskDefaults?: SwarmSpecTaskDefaults; + /** + * Name of the swarm. + * @type {string} + * @memberof SwarmSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof SwarmSpec + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {SwarmSpecOrchestration} + * @memberof SwarmSpec + */ + Orchestration?: SwarmSpecOrchestration | null; + /** + * + * @type {SwarmSpecRaft} + * @memberof SwarmSpec + */ + Raft?: SwarmSpecRaft; + /** + * + * @type {SwarmSpecDispatcher} + * @memberof SwarmSpec + */ + Dispatcher?: SwarmSpecDispatcher | null; + /** + * + * @type {SwarmSpecCAConfig} + * @memberof SwarmSpec + */ + CAConfig?: SwarmSpecCAConfig | null; + /** + * + * @type {SwarmSpecEncryptionConfig} + * @memberof SwarmSpec + */ + EncryptionConfig?: SwarmSpecEncryptionConfig; + /** + * + * @type {SwarmSpecTaskDefaults} + * @memberof SwarmSpec + */ + TaskDefaults?: SwarmSpecTaskDefaults; } /** * Check if a given object implements the SwarmSpec interface. */ export function instanceOfSwarmSpec(value: object): value is SwarmSpec { - return true; + return true; } export function SwarmSpecFromJSON(json: any): SwarmSpec { - return SwarmSpecFromJSONTyped(json, false); + return SwarmSpecFromJSONTyped(json, false); } export function SwarmSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpec { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Orchestration: - json["Orchestration"] == null - ? undefined - : SwarmSpecOrchestrationFromJSON(json["Orchestration"]), - Raft: json["Raft"] == null ? undefined : SwarmSpecRaftFromJSON(json["Raft"]), - Dispatcher: - json["Dispatcher"] == null ? undefined : SwarmSpecDispatcherFromJSON(json["Dispatcher"]), - CAConfig: json["CAConfig"] == null ? undefined : SwarmSpecCAConfigFromJSON(json["CAConfig"]), - EncryptionConfig: - json["EncryptionConfig"] == null - ? undefined - : SwarmSpecEncryptionConfigFromJSON(json["EncryptionConfig"]), - TaskDefaults: - json["TaskDefaults"] == null - ? undefined - : SwarmSpecTaskDefaultsFromJSON(json["TaskDefaults"]), - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Orchestration': json['Orchestration'] == null ? undefined : SwarmSpecOrchestrationFromJSON(json['Orchestration']), + 'Raft': json['Raft'] == null ? undefined : SwarmSpecRaftFromJSON(json['Raft']), + 'Dispatcher': json['Dispatcher'] == null ? undefined : SwarmSpecDispatcherFromJSON(json['Dispatcher']), + 'CAConfig': json['CAConfig'] == null ? undefined : SwarmSpecCAConfigFromJSON(json['CAConfig']), + 'EncryptionConfig': json['EncryptionConfig'] == null ? undefined : SwarmSpecEncryptionConfigFromJSON(json['EncryptionConfig']), + 'TaskDefaults': json['TaskDefaults'] == null ? undefined : SwarmSpecTaskDefaultsFromJSON(json['TaskDefaults']), + }; } export function SwarmSpecToJSON(json: any): SwarmSpec { - return SwarmSpecToJSONTyped(json, false); + return SwarmSpecToJSONTyped(json, false); } -export function SwarmSpecToJSONTyped( - value?: SwarmSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecToJSONTyped(value?: SwarmSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Labels: value["Labels"], - Orchestration: SwarmSpecOrchestrationToJSON(value["Orchestration"]), - Raft: SwarmSpecRaftToJSON(value["Raft"]), - Dispatcher: SwarmSpecDispatcherToJSON(value["Dispatcher"]), - CAConfig: SwarmSpecCAConfigToJSON(value["CAConfig"]), - EncryptionConfig: SwarmSpecEncryptionConfigToJSON(value["EncryptionConfig"]), - TaskDefaults: SwarmSpecTaskDefaultsToJSON(value["TaskDefaults"]), - }; + return { + + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Orchestration': SwarmSpecOrchestrationToJSON(value['Orchestration']), + 'Raft': SwarmSpecRaftToJSON(value['Raft']), + 'Dispatcher': SwarmSpecDispatcherToJSON(value['Dispatcher']), + 'CAConfig': SwarmSpecCAConfigToJSON(value['CAConfig']), + 'EncryptionConfig': SwarmSpecEncryptionConfigToJSON(value['EncryptionConfig']), + 'TaskDefaults': SwarmSpecTaskDefaultsToJSON(value['TaskDefaults']), + }; } + diff --git a/src/clients/docker/models/SwarmSpecCAConfig.ts b/src/clients/docker/models/SwarmSpecCAConfig.ts index fa009cfa96..0e2eede73b 100644 --- a/src/clients/docker/models/SwarmSpecCAConfig.ts +++ b/src/clients/docker/models/SwarmSpecCAConfig.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SwarmSpecCAConfigExternalCAsInner } from "./SwarmSpecCAConfigExternalCAsInner"; +import { mapValues } from '../runtime'; +import type { SwarmSpecCAConfigExternalCAsInner } from './SwarmSpecCAConfigExternalCAsInner'; import { - SwarmSpecCAConfigExternalCAsInnerFromJSON, - SwarmSpecCAConfigExternalCAsInnerFromJSONTyped, - SwarmSpecCAConfigExternalCAsInnerToJSON, - SwarmSpecCAConfigExternalCAsInnerToJSONTyped, -} from "./SwarmSpecCAConfigExternalCAsInner"; + SwarmSpecCAConfigExternalCAsInnerFromJSON, + SwarmSpecCAConfigExternalCAsInnerFromJSONTyped, + SwarmSpecCAConfigExternalCAsInnerToJSON, + SwarmSpecCAConfigExternalCAsInnerToJSONTyped, +} from './SwarmSpecCAConfigExternalCAsInner'; /** * CA configuration. @@ -27,97 +27,88 @@ import { * @interface SwarmSpecCAConfig */ export interface SwarmSpecCAConfig { - /** - * The duration node certificates are issued for. - * @type {number} - * @memberof SwarmSpecCAConfig - */ - NodeCertExpiry?: number; - /** - * Configuration for forwarding signing requests to an external - * certificate authority. - * - * @type {Array} - * @memberof SwarmSpecCAConfig - */ - ExternalCAs?: Array; - /** - * The desired signing CA certificate for all swarm node TLS leaf - * certificates, in PEM format. - * - * @type {string} - * @memberof SwarmSpecCAConfig - */ - SigningCACert?: string; - /** - * The desired signing CA key for all swarm node TLS leaf certificates, - * in PEM format. - * - * @type {string} - * @memberof SwarmSpecCAConfig - */ - SigningCAKey?: string; - /** - * An integer whose purpose is to force swarm to generate a new - * signing CA certificate and key, if none have been specified in - * `SigningCACert` and `SigningCAKey` - * - * @type {number} - * @memberof SwarmSpecCAConfig - */ - ForceRotate?: number; + /** + * The duration node certificates are issued for. + * @type {number} + * @memberof SwarmSpecCAConfig + */ + NodeCertExpiry?: number; + /** + * Configuration for forwarding signing requests to an external + * certificate authority. + * + * @type {Array} + * @memberof SwarmSpecCAConfig + */ + ExternalCAs?: Array; + /** + * The desired signing CA certificate for all swarm node TLS leaf + * certificates, in PEM format. + * + * @type {string} + * @memberof SwarmSpecCAConfig + */ + SigningCACert?: string; + /** + * The desired signing CA key for all swarm node TLS leaf certificates, + * in PEM format. + * + * @type {string} + * @memberof SwarmSpecCAConfig + */ + SigningCAKey?: string; + /** + * An integer whose purpose is to force swarm to generate a new + * signing CA certificate and key, if none have been specified in + * `SigningCACert` and `SigningCAKey` + * + * @type {number} + * @memberof SwarmSpecCAConfig + */ + ForceRotate?: number; } /** * Check if a given object implements the SwarmSpecCAConfig interface. */ export function instanceOfSwarmSpecCAConfig(value: object): value is SwarmSpecCAConfig { - return true; + return true; } export function SwarmSpecCAConfigFromJSON(json: any): SwarmSpecCAConfig { - return SwarmSpecCAConfigFromJSONTyped(json, false); + return SwarmSpecCAConfigFromJSONTyped(json, false); } -export function SwarmSpecCAConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecCAConfig { - if (json == null) { - return json; - } - return { - NodeCertExpiry: json["NodeCertExpiry"] == null ? undefined : json["NodeCertExpiry"], - ExternalCAs: - json["ExternalCAs"] == null - ? undefined - : (json["ExternalCAs"] as Array).map(SwarmSpecCAConfigExternalCAsInnerFromJSON), - SigningCACert: json["SigningCACert"] == null ? undefined : json["SigningCACert"], - SigningCAKey: json["SigningCAKey"] == null ? undefined : json["SigningCAKey"], - ForceRotate: json["ForceRotate"] == null ? undefined : json["ForceRotate"], - }; +export function SwarmSpecCAConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecCAConfig { + if (json == null) { + return json; + } + return { + + 'NodeCertExpiry': json['NodeCertExpiry'] == null ? undefined : json['NodeCertExpiry'], + 'ExternalCAs': json['ExternalCAs'] == null ? undefined : ((json['ExternalCAs'] as Array).map(SwarmSpecCAConfigExternalCAsInnerFromJSON)), + 'SigningCACert': json['SigningCACert'] == null ? undefined : json['SigningCACert'], + 'SigningCAKey': json['SigningCAKey'] == null ? undefined : json['SigningCAKey'], + 'ForceRotate': json['ForceRotate'] == null ? undefined : json['ForceRotate'], + }; } export function SwarmSpecCAConfigToJSON(json: any): SwarmSpecCAConfig { - return SwarmSpecCAConfigToJSONTyped(json, false); + return SwarmSpecCAConfigToJSONTyped(json, false); } -export function SwarmSpecCAConfigToJSONTyped( - value?: SwarmSpecCAConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecCAConfigToJSONTyped(value?: SwarmSpecCAConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - NodeCertExpiry: value["NodeCertExpiry"], - ExternalCAs: - value["ExternalCAs"] == null - ? undefined - : (value["ExternalCAs"] as Array).map(SwarmSpecCAConfigExternalCAsInnerToJSON), - SigningCACert: value["SigningCACert"], - SigningCAKey: value["SigningCAKey"], - ForceRotate: value["ForceRotate"], - }; + return { + + 'NodeCertExpiry': value['NodeCertExpiry'], + 'ExternalCAs': value['ExternalCAs'] == null ? undefined : ((value['ExternalCAs'] as Array).map(SwarmSpecCAConfigExternalCAsInnerToJSON)), + 'SigningCACert': value['SigningCACert'], + 'SigningCAKey': value['SigningCAKey'], + 'ForceRotate': value['ForceRotate'], + }; } + diff --git a/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts b/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts index 18becdd375..6ee653408e 100644 --- a/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts +++ b/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts @@ -2,113 +2,105 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SwarmSpecCAConfigExternalCAsInner */ export interface SwarmSpecCAConfigExternalCAsInner { - /** - * Protocol for communication with the external CA (currently - * only `cfssl` is supported). - * - * @type {string} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - Protocol?: SwarmSpecCAConfigExternalCAsInnerProtocolEnum; - /** - * URL where certificate signing requests should be sent. - * - * @type {string} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - URL?: string; - /** - * An object with key/value pairs that are interpreted as - * protocol-specific options for the external CA driver. - * - * @type {{ [key: string]: string; }} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - Options?: { [key: string]: string }; - /** - * The root CA certificate (in PEM format) this external CA uses - * to issue TLS certificates (assumed to be to the current swarm - * root CA certificate if not provided). - * - * @type {string} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - CACert?: string; + /** + * Protocol for communication with the external CA (currently + * only `cfssl` is supported). + * + * @type {string} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + Protocol?: SwarmSpecCAConfigExternalCAsInnerProtocolEnum; + /** + * URL where certificate signing requests should be sent. + * + * @type {string} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + URL?: string; + /** + * An object with key/value pairs that are interpreted as + * protocol-specific options for the external CA driver. + * + * @type {{ [key: string]: string; }} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + Options?: { [key: string]: string; }; + /** + * The root CA certificate (in PEM format) this external CA uses + * to issue TLS certificates (assumed to be to the current swarm + * root CA certificate if not provided). + * + * @type {string} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + CACert?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SwarmSpecCAConfigExternalCAsInnerProtocolEnum { - Cfssl = "cfssl", + Cfssl = 'cfssl' } + /** * Check if a given object implements the SwarmSpecCAConfigExternalCAsInner interface. */ -export function instanceOfSwarmSpecCAConfigExternalCAsInner( - value: object, -): value is SwarmSpecCAConfigExternalCAsInner { - return true; +export function instanceOfSwarmSpecCAConfigExternalCAsInner(value: object): value is SwarmSpecCAConfigExternalCAsInner { + return true; } -export function SwarmSpecCAConfigExternalCAsInnerFromJSON( - json: any, -): SwarmSpecCAConfigExternalCAsInner { - return SwarmSpecCAConfigExternalCAsInnerFromJSONTyped(json, false); +export function SwarmSpecCAConfigExternalCAsInnerFromJSON(json: any): SwarmSpecCAConfigExternalCAsInner { + return SwarmSpecCAConfigExternalCAsInnerFromJSONTyped(json, false); } -export function SwarmSpecCAConfigExternalCAsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecCAConfigExternalCAsInner { - if (json == null) { - return json; - } - return { - Protocol: json["Protocol"] == null ? undefined : json["Protocol"], - URL: json["URL"] == null ? undefined : json["URL"], - Options: json["Options"] == null ? undefined : json["Options"], - CACert: json["CACert"] == null ? undefined : json["CACert"], - }; +export function SwarmSpecCAConfigExternalCAsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecCAConfigExternalCAsInner { + if (json == null) { + return json; + } + return { + + 'Protocol': json['Protocol'] == null ? undefined : json['Protocol'], + 'URL': json['URL'] == null ? undefined : json['URL'], + 'Options': json['Options'] == null ? undefined : json['Options'], + 'CACert': json['CACert'] == null ? undefined : json['CACert'], + }; } -export function SwarmSpecCAConfigExternalCAsInnerToJSON( - json: any, -): SwarmSpecCAConfigExternalCAsInner { - return SwarmSpecCAConfigExternalCAsInnerToJSONTyped(json, false); +export function SwarmSpecCAConfigExternalCAsInnerToJSON(json: any): SwarmSpecCAConfigExternalCAsInner { + return SwarmSpecCAConfigExternalCAsInnerToJSONTyped(json, false); } -export function SwarmSpecCAConfigExternalCAsInnerToJSONTyped( - value?: SwarmSpecCAConfigExternalCAsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecCAConfigExternalCAsInnerToJSONTyped(value?: SwarmSpecCAConfigExternalCAsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Protocol: value["Protocol"], - URL: value["URL"], - Options: value["Options"], - CACert: value["CACert"], - }; + return { + + 'Protocol': value['Protocol'], + 'URL': value['URL'], + 'Options': value['Options'], + 'CACert': value['CACert'], + }; } + diff --git a/src/clients/docker/models/SwarmSpecDispatcher.ts b/src/clients/docker/models/SwarmSpecDispatcher.ts index bcbc8e9fa5..a2314d7682 100644 --- a/src/clients/docker/models/SwarmSpecDispatcher.ts +++ b/src/clients/docker/models/SwarmSpecDispatcher.ts @@ -2,68 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Dispatcher configuration. * @export * @interface SwarmSpecDispatcher */ export interface SwarmSpecDispatcher { - /** - * The delay for an agent to send a heartbeat to the dispatcher. - * - * @type {number} - * @memberof SwarmSpecDispatcher - */ - HeartbeatPeriod?: number; + /** + * The delay for an agent to send a heartbeat to the dispatcher. + * + * @type {number} + * @memberof SwarmSpecDispatcher + */ + HeartbeatPeriod?: number; } /** * Check if a given object implements the SwarmSpecDispatcher interface. */ export function instanceOfSwarmSpecDispatcher(value: object): value is SwarmSpecDispatcher { - return true; + return true; } export function SwarmSpecDispatcherFromJSON(json: any): SwarmSpecDispatcher { - return SwarmSpecDispatcherFromJSONTyped(json, false); + return SwarmSpecDispatcherFromJSONTyped(json, false); } -export function SwarmSpecDispatcherFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecDispatcher { - if (json == null) { - return json; - } - return { - HeartbeatPeriod: json["HeartbeatPeriod"] == null ? undefined : json["HeartbeatPeriod"], - }; +export function SwarmSpecDispatcherFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecDispatcher { + if (json == null) { + return json; + } + return { + + 'HeartbeatPeriod': json['HeartbeatPeriod'] == null ? undefined : json['HeartbeatPeriod'], + }; } export function SwarmSpecDispatcherToJSON(json: any): SwarmSpecDispatcher { - return SwarmSpecDispatcherToJSONTyped(json, false); + return SwarmSpecDispatcherToJSONTyped(json, false); } -export function SwarmSpecDispatcherToJSONTyped( - value?: SwarmSpecDispatcher | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecDispatcherToJSONTyped(value?: SwarmSpecDispatcher | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - HeartbeatPeriod: value["HeartbeatPeriod"], - }; + return { + + 'HeartbeatPeriod': value['HeartbeatPeriod'], + }; } + diff --git a/src/clients/docker/models/SwarmSpecEncryptionConfig.ts b/src/clients/docker/models/SwarmSpecEncryptionConfig.ts index bc25caa4c8..a0301bdc60 100644 --- a/src/clients/docker/models/SwarmSpecEncryptionConfig.ts +++ b/src/clients/docker/models/SwarmSpecEncryptionConfig.ts @@ -2,71 +2,66 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Parameters related to encryption-at-rest. * @export * @interface SwarmSpecEncryptionConfig */ export interface SwarmSpecEncryptionConfig { - /** - * If set, generate a key and use it to lock data stored on the - * managers. - * - * @type {boolean} - * @memberof SwarmSpecEncryptionConfig - */ - AutoLockManagers?: boolean; + /** + * If set, generate a key and use it to lock data stored on the + * managers. + * + * @type {boolean} + * @memberof SwarmSpecEncryptionConfig + */ + AutoLockManagers?: boolean; } /** * Check if a given object implements the SwarmSpecEncryptionConfig interface. */ -export function instanceOfSwarmSpecEncryptionConfig( - value: object, -): value is SwarmSpecEncryptionConfig { - return true; +export function instanceOfSwarmSpecEncryptionConfig(value: object): value is SwarmSpecEncryptionConfig { + return true; } export function SwarmSpecEncryptionConfigFromJSON(json: any): SwarmSpecEncryptionConfig { - return SwarmSpecEncryptionConfigFromJSONTyped(json, false); + return SwarmSpecEncryptionConfigFromJSONTyped(json, false); } -export function SwarmSpecEncryptionConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecEncryptionConfig { - if (json == null) { - return json; - } - return { - AutoLockManagers: json["AutoLockManagers"] == null ? undefined : json["AutoLockManagers"], - }; +export function SwarmSpecEncryptionConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecEncryptionConfig { + if (json == null) { + return json; + } + return { + + 'AutoLockManagers': json['AutoLockManagers'] == null ? undefined : json['AutoLockManagers'], + }; } export function SwarmSpecEncryptionConfigToJSON(json: any): SwarmSpecEncryptionConfig { - return SwarmSpecEncryptionConfigToJSONTyped(json, false); + return SwarmSpecEncryptionConfigToJSONTyped(json, false); } -export function SwarmSpecEncryptionConfigToJSONTyped( - value?: SwarmSpecEncryptionConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecEncryptionConfigToJSONTyped(value?: SwarmSpecEncryptionConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - AutoLockManagers: value["AutoLockManagers"], - }; + return { + + 'AutoLockManagers': value['AutoLockManagers'], + }; } + diff --git a/src/clients/docker/models/SwarmSpecOrchestration.ts b/src/clients/docker/models/SwarmSpecOrchestration.ts index 55a38da927..ec9194bdc5 100644 --- a/src/clients/docker/models/SwarmSpecOrchestration.ts +++ b/src/clients/docker/models/SwarmSpecOrchestration.ts @@ -2,70 +2,66 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Orchestration configuration. * @export * @interface SwarmSpecOrchestration */ export interface SwarmSpecOrchestration { - /** - * The number of historic tasks to keep per instance or node. If - * negative, never remove completed or failed tasks. - * - * @type {number} - * @memberof SwarmSpecOrchestration - */ - TaskHistoryRetentionLimit?: number; + /** + * The number of historic tasks to keep per instance or node. If + * negative, never remove completed or failed tasks. + * + * @type {number} + * @memberof SwarmSpecOrchestration + */ + TaskHistoryRetentionLimit?: number; } /** * Check if a given object implements the SwarmSpecOrchestration interface. */ export function instanceOfSwarmSpecOrchestration(value: object): value is SwarmSpecOrchestration { - return true; + return true; } export function SwarmSpecOrchestrationFromJSON(json: any): SwarmSpecOrchestration { - return SwarmSpecOrchestrationFromJSONTyped(json, false); + return SwarmSpecOrchestrationFromJSONTyped(json, false); } -export function SwarmSpecOrchestrationFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecOrchestration { - if (json == null) { - return json; - } - return { - TaskHistoryRetentionLimit: - json["TaskHistoryRetentionLimit"] == null ? undefined : json["TaskHistoryRetentionLimit"], - }; +export function SwarmSpecOrchestrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecOrchestration { + if (json == null) { + return json; + } + return { + + 'TaskHistoryRetentionLimit': json['TaskHistoryRetentionLimit'] == null ? undefined : json['TaskHistoryRetentionLimit'], + }; } export function SwarmSpecOrchestrationToJSON(json: any): SwarmSpecOrchestration { - return SwarmSpecOrchestrationToJSONTyped(json, false); + return SwarmSpecOrchestrationToJSONTyped(json, false); } -export function SwarmSpecOrchestrationToJSONTyped( - value?: SwarmSpecOrchestration | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecOrchestrationToJSONTyped(value?: SwarmSpecOrchestration | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - TaskHistoryRetentionLimit: value["TaskHistoryRetentionLimit"], - }; + return { + + 'TaskHistoryRetentionLimit': value['TaskHistoryRetentionLimit'], + }; } + diff --git a/src/clients/docker/models/SwarmSpecRaft.ts b/src/clients/docker/models/SwarmSpecRaft.ts index 8472c1e361..ffa7b1747d 100644 --- a/src/clients/docker/models/SwarmSpecRaft.ts +++ b/src/clients/docker/models/SwarmSpecRaft.ts @@ -2,111 +2,110 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Raft configuration. * @export * @interface SwarmSpecRaft */ export interface SwarmSpecRaft { - /** - * The number of log entries between snapshots. - * @type {number} - * @memberof SwarmSpecRaft - */ - SnapshotInterval?: number; - /** - * The number of snapshots to keep beyond the current snapshot. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - KeepOldSnapshots?: number; - /** - * The number of log entries to keep around to sync up slow followers - * after a snapshot is created. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - LogEntriesForSlowFollowers?: number; - /** - * The number of ticks that a follower will wait for a message from - * the leader before becoming a candidate and starting an election. - * `ElectionTick` must be greater than `HeartbeatTick`. - * - * A tick currently defaults to one second, so these translate - * directly to seconds currently, but this is NOT guaranteed. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - ElectionTick?: number; - /** - * The number of ticks between heartbeats. Every HeartbeatTick ticks, - * the leader will send a heartbeat to the followers. - * - * A tick currently defaults to one second, so these translate - * directly to seconds currently, but this is NOT guaranteed. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - HeartbeatTick?: number; + /** + * The number of log entries between snapshots. + * @type {number} + * @memberof SwarmSpecRaft + */ + SnapshotInterval?: number; + /** + * The number of snapshots to keep beyond the current snapshot. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + KeepOldSnapshots?: number; + /** + * The number of log entries to keep around to sync up slow followers + * after a snapshot is created. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + LogEntriesForSlowFollowers?: number; + /** + * The number of ticks that a follower will wait for a message from + * the leader before becoming a candidate and starting an election. + * `ElectionTick` must be greater than `HeartbeatTick`. + * + * A tick currently defaults to one second, so these translate + * directly to seconds currently, but this is NOT guaranteed. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + ElectionTick?: number; + /** + * The number of ticks between heartbeats. Every HeartbeatTick ticks, + * the leader will send a heartbeat to the followers. + * + * A tick currently defaults to one second, so these translate + * directly to seconds currently, but this is NOT guaranteed. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + HeartbeatTick?: number; } /** * Check if a given object implements the SwarmSpecRaft interface. */ export function instanceOfSwarmSpecRaft(value: object): value is SwarmSpecRaft { - return true; + return true; } export function SwarmSpecRaftFromJSON(json: any): SwarmSpecRaft { - return SwarmSpecRaftFromJSONTyped(json, false); + return SwarmSpecRaftFromJSONTyped(json, false); } export function SwarmSpecRaftFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecRaft { - if (json == null) { - return json; - } - return { - SnapshotInterval: json["SnapshotInterval"] == null ? undefined : json["SnapshotInterval"], - KeepOldSnapshots: json["KeepOldSnapshots"] == null ? undefined : json["KeepOldSnapshots"], - LogEntriesForSlowFollowers: - json["LogEntriesForSlowFollowers"] == null ? undefined : json["LogEntriesForSlowFollowers"], - ElectionTick: json["ElectionTick"] == null ? undefined : json["ElectionTick"], - HeartbeatTick: json["HeartbeatTick"] == null ? undefined : json["HeartbeatTick"], - }; + if (json == null) { + return json; + } + return { + + 'SnapshotInterval': json['SnapshotInterval'] == null ? undefined : json['SnapshotInterval'], + 'KeepOldSnapshots': json['KeepOldSnapshots'] == null ? undefined : json['KeepOldSnapshots'], + 'LogEntriesForSlowFollowers': json['LogEntriesForSlowFollowers'] == null ? undefined : json['LogEntriesForSlowFollowers'], + 'ElectionTick': json['ElectionTick'] == null ? undefined : json['ElectionTick'], + 'HeartbeatTick': json['HeartbeatTick'] == null ? undefined : json['HeartbeatTick'], + }; } export function SwarmSpecRaftToJSON(json: any): SwarmSpecRaft { - return SwarmSpecRaftToJSONTyped(json, false); + return SwarmSpecRaftToJSONTyped(json, false); } -export function SwarmSpecRaftToJSONTyped( - value?: SwarmSpecRaft | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecRaftToJSONTyped(value?: SwarmSpecRaft | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - SnapshotInterval: value["SnapshotInterval"], - KeepOldSnapshots: value["KeepOldSnapshots"], - LogEntriesForSlowFollowers: value["LogEntriesForSlowFollowers"], - ElectionTick: value["ElectionTick"], - HeartbeatTick: value["HeartbeatTick"], - }; + return { + + 'SnapshotInterval': value['SnapshotInterval'], + 'KeepOldSnapshots': value['KeepOldSnapshots'], + 'LogEntriesForSlowFollowers': value['LogEntriesForSlowFollowers'], + 'ElectionTick': value['ElectionTick'], + 'HeartbeatTick': value['HeartbeatTick'], + }; } + diff --git a/src/clients/docker/models/SwarmSpecTaskDefaults.ts b/src/clients/docker/models/SwarmSpecTaskDefaults.ts index e4d030aaf6..704a77dbcc 100644 --- a/src/clients/docker/models/SwarmSpecTaskDefaults.ts +++ b/src/clients/docker/models/SwarmSpecTaskDefaults.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SwarmSpecTaskDefaultsLogDriver } from "./SwarmSpecTaskDefaultsLogDriver"; +import { mapValues } from '../runtime'; +import type { SwarmSpecTaskDefaultsLogDriver } from './SwarmSpecTaskDefaultsLogDriver'; import { - SwarmSpecTaskDefaultsLogDriverFromJSON, - SwarmSpecTaskDefaultsLogDriverFromJSONTyped, - SwarmSpecTaskDefaultsLogDriverToJSON, - SwarmSpecTaskDefaultsLogDriverToJSONTyped, -} from "./SwarmSpecTaskDefaultsLogDriver"; + SwarmSpecTaskDefaultsLogDriverFromJSON, + SwarmSpecTaskDefaultsLogDriverFromJSONTyped, + SwarmSpecTaskDefaultsLogDriverToJSON, + SwarmSpecTaskDefaultsLogDriverToJSONTyped, +} from './SwarmSpecTaskDefaultsLogDriver'; /** * Defaults for creating tasks in this cluster. @@ -27,53 +27,47 @@ import { * @interface SwarmSpecTaskDefaults */ export interface SwarmSpecTaskDefaults { - /** - * - * @type {SwarmSpecTaskDefaultsLogDriver} - * @memberof SwarmSpecTaskDefaults - */ - LogDriver?: SwarmSpecTaskDefaultsLogDriver; + /** + * + * @type {SwarmSpecTaskDefaultsLogDriver} + * @memberof SwarmSpecTaskDefaults + */ + LogDriver?: SwarmSpecTaskDefaultsLogDriver; } /** * Check if a given object implements the SwarmSpecTaskDefaults interface. */ export function instanceOfSwarmSpecTaskDefaults(value: object): value is SwarmSpecTaskDefaults { - return true; + return true; } export function SwarmSpecTaskDefaultsFromJSON(json: any): SwarmSpecTaskDefaults { - return SwarmSpecTaskDefaultsFromJSONTyped(json, false); + return SwarmSpecTaskDefaultsFromJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecTaskDefaults { - if (json == null) { - return json; - } - return { - LogDriver: - json["LogDriver"] == null - ? undefined - : SwarmSpecTaskDefaultsLogDriverFromJSON(json["LogDriver"]), - }; +export function SwarmSpecTaskDefaultsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecTaskDefaults { + if (json == null) { + return json; + } + return { + + 'LogDriver': json['LogDriver'] == null ? undefined : SwarmSpecTaskDefaultsLogDriverFromJSON(json['LogDriver']), + }; } export function SwarmSpecTaskDefaultsToJSON(json: any): SwarmSpecTaskDefaults { - return SwarmSpecTaskDefaultsToJSONTyped(json, false); + return SwarmSpecTaskDefaultsToJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsToJSONTyped( - value?: SwarmSpecTaskDefaults | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecTaskDefaultsToJSONTyped(value?: SwarmSpecTaskDefaults | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - LogDriver: SwarmSpecTaskDefaultsLogDriverToJSON(value["LogDriver"]), - }; + return { + + 'LogDriver': SwarmSpecTaskDefaultsLogDriverToJSON(value['LogDriver']), + }; } + diff --git a/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts b/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts index 1817c4c14d..99ebf6a288 100644 --- a/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts +++ b/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts @@ -2,85 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface SwarmSpecTaskDefaultsLogDriver */ export interface SwarmSpecTaskDefaultsLogDriver { - /** - * The log driver to use as a default for new tasks. - * - * @type {string} - * @memberof SwarmSpecTaskDefaultsLogDriver - */ - Name?: string; - /** - * Driver-specific options for the selected log driver, specified - * as key/value pairs. - * - * @type {{ [key: string]: string; }} - * @memberof SwarmSpecTaskDefaultsLogDriver - */ - Options?: { [key: string]: string }; + /** + * The log driver to use as a default for new tasks. + * + * @type {string} + * @memberof SwarmSpecTaskDefaultsLogDriver + */ + Name?: string; + /** + * Driver-specific options for the selected log driver, specified + * as key/value pairs. + * + * @type {{ [key: string]: string; }} + * @memberof SwarmSpecTaskDefaultsLogDriver + */ + Options?: { [key: string]: string; }; } /** * Check if a given object implements the SwarmSpecTaskDefaultsLogDriver interface. */ -export function instanceOfSwarmSpecTaskDefaultsLogDriver( - value: object, -): value is SwarmSpecTaskDefaultsLogDriver { - return true; +export function instanceOfSwarmSpecTaskDefaultsLogDriver(value: object): value is SwarmSpecTaskDefaultsLogDriver { + return true; } export function SwarmSpecTaskDefaultsLogDriverFromJSON(json: any): SwarmSpecTaskDefaultsLogDriver { - return SwarmSpecTaskDefaultsLogDriverFromJSONTyped(json, false); + return SwarmSpecTaskDefaultsLogDriverFromJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsLogDriverFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmSpecTaskDefaultsLogDriver { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Options: json["Options"] == null ? undefined : json["Options"], - }; +export function SwarmSpecTaskDefaultsLogDriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecTaskDefaultsLogDriver { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function SwarmSpecTaskDefaultsLogDriverToJSON(json: any): SwarmSpecTaskDefaultsLogDriver { - return SwarmSpecTaskDefaultsLogDriverToJSONTyped(json, false); + return SwarmSpecTaskDefaultsLogDriverToJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsLogDriverToJSONTyped( - value?: SwarmSpecTaskDefaultsLogDriver | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmSpecTaskDefaultsLogDriverToJSONTyped(value?: SwarmSpecTaskDefaultsLogDriver | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Options: value["Options"], - }; + return { + + 'Name': value['Name'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/SwarmUnlockRequest.ts b/src/clients/docker/models/SwarmUnlockRequest.ts index 9c2d227a23..c4b3e28de0 100644 --- a/src/clients/docker/models/SwarmUnlockRequest.ts +++ b/src/clients/docker/models/SwarmUnlockRequest.ts @@ -2,67 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SwarmUnlockRequest */ export interface SwarmUnlockRequest { - /** - * The swarm's unlock key. - * @type {string} - * @memberof SwarmUnlockRequest - */ - UnlockKey?: string; + /** + * The swarm's unlock key. + * @type {string} + * @memberof SwarmUnlockRequest + */ + UnlockKey?: string; } /** * Check if a given object implements the SwarmUnlockRequest interface. */ export function instanceOfSwarmUnlockRequest(value: object): value is SwarmUnlockRequest { - return true; + return true; } export function SwarmUnlockRequestFromJSON(json: any): SwarmUnlockRequest { - return SwarmUnlockRequestFromJSONTyped(json, false); + return SwarmUnlockRequestFromJSONTyped(json, false); } -export function SwarmUnlockRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SwarmUnlockRequest { - if (json == null) { - return json; - } - return { - UnlockKey: json["UnlockKey"] == null ? undefined : json["UnlockKey"], - }; +export function SwarmUnlockRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmUnlockRequest { + if (json == null) { + return json; + } + return { + + 'UnlockKey': json['UnlockKey'] == null ? undefined : json['UnlockKey'], + }; } export function SwarmUnlockRequestToJSON(json: any): SwarmUnlockRequest { - return SwarmUnlockRequestToJSONTyped(json, false); + return SwarmUnlockRequestToJSONTyped(json, false); } -export function SwarmUnlockRequestToJSONTyped( - value?: SwarmUnlockRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SwarmUnlockRequestToJSONTyped(value?: SwarmUnlockRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - UnlockKey: value["UnlockKey"], - }; + return { + + 'UnlockKey': value['UnlockKey'], + }; } + diff --git a/src/clients/docker/models/SystemAuthResponse.ts b/src/clients/docker/models/SystemAuthResponse.ts index b29d08e9c4..d3eb3611c4 100644 --- a/src/clients/docker/models/SystemAuthResponse.ts +++ b/src/clients/docker/models/SystemAuthResponse.ts @@ -2,76 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SystemAuthResponse */ export interface SystemAuthResponse { - /** - * The status of the authentication - * @type {string} - * @memberof SystemAuthResponse - */ - Status: string; - /** - * An opaque token used to authenticate a user after a successful login - * @type {string} - * @memberof SystemAuthResponse - */ - IdentityToken?: string; + /** + * The status of the authentication + * @type {string} + * @memberof SystemAuthResponse + */ + Status: string; + /** + * An opaque token used to authenticate a user after a successful login + * @type {string} + * @memberof SystemAuthResponse + */ + IdentityToken?: string; } /** * Check if a given object implements the SystemAuthResponse interface. */ export function instanceOfSystemAuthResponse(value: object): value is SystemAuthResponse { - if (!("Status" in value) || value["Status"] === undefined) return false; - return true; + if (!('Status' in value) || value['Status'] === undefined) return false; + return true; } export function SystemAuthResponseFromJSON(json: any): SystemAuthResponse { - return SystemAuthResponseFromJSONTyped(json, false); + return SystemAuthResponseFromJSONTyped(json, false); } -export function SystemAuthResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SystemAuthResponse { - if (json == null) { - return json; - } - return { - Status: json["Status"], - IdentityToken: json["IdentityToken"] == null ? undefined : json["IdentityToken"], - }; +export function SystemAuthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemAuthResponse { + if (json == null) { + return json; + } + return { + + 'Status': json['Status'], + 'IdentityToken': json['IdentityToken'] == null ? undefined : json['IdentityToken'], + }; } export function SystemAuthResponseToJSON(json: any): SystemAuthResponse { - return SystemAuthResponseToJSONTyped(json, false); + return SystemAuthResponseToJSONTyped(json, false); } -export function SystemAuthResponseToJSONTyped( - value?: SystemAuthResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemAuthResponseToJSONTyped(value?: SystemAuthResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Status: value["Status"], - IdentityToken: value["IdentityToken"], - }; + return { + + 'Status': value['Status'], + 'IdentityToken': value['IdentityToken'], + }; } + diff --git a/src/clients/docker/models/SystemDataUsageResponse.ts b/src/clients/docker/models/SystemDataUsageResponse.ts index 87f783e2e4..c9712c0beb 100644 --- a/src/clients/docker/models/SystemDataUsageResponse.ts +++ b/src/clients/docker/models/SystemDataUsageResponse.ts @@ -2,139 +2,125 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { BuildCache } from "./BuildCache"; +import { mapValues } from '../runtime'; +import type { BuildCache } from './BuildCache'; +import { + BuildCacheFromJSON, + BuildCacheFromJSONTyped, + BuildCacheToJSON, + BuildCacheToJSONTyped, +} from './BuildCache'; +import type { ImageSummary } from './ImageSummary'; import { - BuildCacheFromJSON, - BuildCacheFromJSONTyped, - BuildCacheToJSON, - BuildCacheToJSONTyped, -} from "./BuildCache"; -import type { ImageSummary } from "./ImageSummary"; + ImageSummaryFromJSON, + ImageSummaryFromJSONTyped, + ImageSummaryToJSON, + ImageSummaryToJSONTyped, +} from './ImageSummary'; +import type { Volume } from './Volume'; import { - ImageSummaryFromJSON, - ImageSummaryFromJSONTyped, - ImageSummaryToJSON, - ImageSummaryToJSONTyped, -} from "./ImageSummary"; -import type { Volume } from "./Volume"; -import { VolumeFromJSON, VolumeFromJSONTyped, VolumeToJSON, VolumeToJSONTyped } from "./Volume"; -import type { ContainerSummary } from "./ContainerSummary"; + VolumeFromJSON, + VolumeFromJSONTyped, + VolumeToJSON, + VolumeToJSONTyped, +} from './Volume'; +import type { ContainerSummary } from './ContainerSummary'; import { - ContainerSummaryFromJSON, - ContainerSummaryFromJSONTyped, - ContainerSummaryToJSON, - ContainerSummaryToJSONTyped, -} from "./ContainerSummary"; + ContainerSummaryFromJSON, + ContainerSummaryFromJSONTyped, + ContainerSummaryToJSON, + ContainerSummaryToJSONTyped, +} from './ContainerSummary'; /** - * + * * @export * @interface SystemDataUsageResponse */ export interface SystemDataUsageResponse { - /** - * - * @type {number} - * @memberof SystemDataUsageResponse - */ - LayersSize?: number; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - Images?: Array; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - Containers?: Array; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - Volumes?: Array; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - BuildCache?: Array; + /** + * + * @type {number} + * @memberof SystemDataUsageResponse + */ + LayersSize?: number; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + Images?: Array; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + Containers?: Array; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + Volumes?: Array; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + BuildCache?: Array; } /** * Check if a given object implements the SystemDataUsageResponse interface. */ export function instanceOfSystemDataUsageResponse(value: object): value is SystemDataUsageResponse { - return true; + return true; } export function SystemDataUsageResponseFromJSON(json: any): SystemDataUsageResponse { - return SystemDataUsageResponseFromJSONTyped(json, false); + return SystemDataUsageResponseFromJSONTyped(json, false); } -export function SystemDataUsageResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SystemDataUsageResponse { - if (json == null) { - return json; - } - return { - LayersSize: json["LayersSize"] == null ? undefined : json["LayersSize"], - Images: - json["Images"] == null ? undefined : (json["Images"] as Array).map(ImageSummaryFromJSON), - Containers: - json["Containers"] == null - ? undefined - : (json["Containers"] as Array).map(ContainerSummaryFromJSON), - Volumes: - json["Volumes"] == null ? undefined : (json["Volumes"] as Array).map(VolumeFromJSON), - BuildCache: - json["BuildCache"] == null - ? undefined - : (json["BuildCache"] as Array).map(BuildCacheFromJSON), - }; +export function SystemDataUsageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemDataUsageResponse { + if (json == null) { + return json; + } + return { + + 'LayersSize': json['LayersSize'] == null ? undefined : json['LayersSize'], + 'Images': json['Images'] == null ? undefined : ((json['Images'] as Array).map(ImageSummaryFromJSON)), + 'Containers': json['Containers'] == null ? undefined : ((json['Containers'] as Array).map(ContainerSummaryFromJSON)), + 'Volumes': json['Volumes'] == null ? undefined : ((json['Volumes'] as Array).map(VolumeFromJSON)), + 'BuildCache': json['BuildCache'] == null ? undefined : ((json['BuildCache'] as Array).map(BuildCacheFromJSON)), + }; } export function SystemDataUsageResponseToJSON(json: any): SystemDataUsageResponse { - return SystemDataUsageResponseToJSONTyped(json, false); + return SystemDataUsageResponseToJSONTyped(json, false); } -export function SystemDataUsageResponseToJSONTyped( - value?: SystemDataUsageResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemDataUsageResponseToJSONTyped(value?: SystemDataUsageResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - LayersSize: value["LayersSize"], - Images: - value["Images"] == null ? undefined : (value["Images"] as Array).map(ImageSummaryToJSON), - Containers: - value["Containers"] == null - ? undefined - : (value["Containers"] as Array).map(ContainerSummaryToJSON), - Volumes: - value["Volumes"] == null ? undefined : (value["Volumes"] as Array).map(VolumeToJSON), - BuildCache: - value["BuildCache"] == null - ? undefined - : (value["BuildCache"] as Array).map(BuildCacheToJSON), - }; + return { + + 'LayersSize': value['LayersSize'], + 'Images': value['Images'] == null ? undefined : ((value['Images'] as Array).map(ImageSummaryToJSON)), + 'Containers': value['Containers'] == null ? undefined : ((value['Containers'] as Array).map(ContainerSummaryToJSON)), + 'Volumes': value['Volumes'] == null ? undefined : ((value['Volumes'] as Array).map(VolumeToJSON)), + 'BuildCache': value['BuildCache'] == null ? undefined : ((value['BuildCache'] as Array).map(BuildCacheToJSON)), + }; } + diff --git a/src/clients/docker/models/SystemInfo.ts b/src/clients/docker/models/SystemInfo.ts index aadd471db5..d5ba41d8b7 100644 --- a/src/clients/docker/models/SystemInfo.ts +++ b/src/clients/docker/models/SystemInfo.ts @@ -2,791 +2,777 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginsInfo } from "./PluginsInfo"; +import { mapValues } from '../runtime'; +import type { PluginsInfo } from './PluginsInfo'; +import { + PluginsInfoFromJSON, + PluginsInfoFromJSONTyped, + PluginsInfoToJSON, + PluginsInfoToJSONTyped, +} from './PluginsInfo'; +import type { GenericResourcesInner } from './GenericResourcesInner'; import { - PluginsInfoFromJSON, - PluginsInfoFromJSONTyped, - PluginsInfoToJSON, - PluginsInfoToJSONTyped, -} from "./PluginsInfo"; -import type { GenericResourcesInner } from "./GenericResourcesInner"; + GenericResourcesInnerFromJSON, + GenericResourcesInnerFromJSONTyped, + GenericResourcesInnerToJSON, + GenericResourcesInnerToJSONTyped, +} from './GenericResourcesInner'; +import type { Runtime } from './Runtime'; import { - GenericResourcesInnerFromJSON, - GenericResourcesInnerFromJSONTyped, - GenericResourcesInnerToJSON, - GenericResourcesInnerToJSONTyped, -} from "./GenericResourcesInner"; -import type { Runtime } from "./Runtime"; + RuntimeFromJSON, + RuntimeFromJSONTyped, + RuntimeToJSON, + RuntimeToJSONTyped, +} from './Runtime'; +import type { SystemInfoDefaultAddressPoolsInner } from './SystemInfoDefaultAddressPoolsInner'; import { - RuntimeFromJSON, - RuntimeFromJSONTyped, - RuntimeToJSON, - RuntimeToJSONTyped, -} from "./Runtime"; -import type { SystemInfoDefaultAddressPoolsInner } from "./SystemInfoDefaultAddressPoolsInner"; + SystemInfoDefaultAddressPoolsInnerFromJSON, + SystemInfoDefaultAddressPoolsInnerFromJSONTyped, + SystemInfoDefaultAddressPoolsInnerToJSON, + SystemInfoDefaultAddressPoolsInnerToJSONTyped, +} from './SystemInfoDefaultAddressPoolsInner'; +import type { Commit } from './Commit'; import { - SystemInfoDefaultAddressPoolsInnerFromJSON, - SystemInfoDefaultAddressPoolsInnerFromJSONTyped, - SystemInfoDefaultAddressPoolsInnerToJSON, - SystemInfoDefaultAddressPoolsInnerToJSONTyped, -} from "./SystemInfoDefaultAddressPoolsInner"; -import type { Commit } from "./Commit"; -import { CommitFromJSON, CommitFromJSONTyped, CommitToJSON, CommitToJSONTyped } from "./Commit"; -import type { RegistryServiceConfig } from "./RegistryServiceConfig"; + CommitFromJSON, + CommitFromJSONTyped, + CommitToJSON, + CommitToJSONTyped, +} from './Commit'; +import type { RegistryServiceConfig } from './RegistryServiceConfig'; import { - RegistryServiceConfigFromJSON, - RegistryServiceConfigFromJSONTyped, - RegistryServiceConfigToJSON, - RegistryServiceConfigToJSONTyped, -} from "./RegistryServiceConfig"; -import type { SwarmInfo } from "./SwarmInfo"; + RegistryServiceConfigFromJSON, + RegistryServiceConfigFromJSONTyped, + RegistryServiceConfigToJSON, + RegistryServiceConfigToJSONTyped, +} from './RegistryServiceConfig'; +import type { SwarmInfo } from './SwarmInfo'; import { - SwarmInfoFromJSON, - SwarmInfoFromJSONTyped, - SwarmInfoToJSON, - SwarmInfoToJSONTyped, -} from "./SwarmInfo"; + SwarmInfoFromJSON, + SwarmInfoFromJSONTyped, + SwarmInfoToJSON, + SwarmInfoToJSONTyped, +} from './SwarmInfo'; /** - * + * * @export * @interface SystemInfo */ export interface SystemInfo { - /** - * Unique identifier of the daemon. - * - *


- * - * > **Note**: The format of the ID itself is not part of the API, and - * > should not be considered stable. - * - * @type {string} - * @memberof SystemInfo - */ - ID?: string; - /** - * Total number of containers on the host. - * @type {number} - * @memberof SystemInfo - */ - Containers?: number; - /** - * Number of containers with status `"running"`. - * - * @type {number} - * @memberof SystemInfo - */ - ContainersRunning?: number; - /** - * Number of containers with status `"paused"`. - * - * @type {number} - * @memberof SystemInfo - */ - ContainersPaused?: number; - /** - * Number of containers with status `"stopped"`. - * - * @type {number} - * @memberof SystemInfo - */ - ContainersStopped?: number; - /** - * Total number of images on the host. - * - * Both _tagged_ and _untagged_ (dangling) images are counted. - * - * @type {number} - * @memberof SystemInfo - */ - Images?: number; - /** - * Name of the storage driver in use. - * @type {string} - * @memberof SystemInfo - */ - Driver?: string; - /** - * Information specific to the storage driver, provided as - * "label" / "value" pairs. - * - * This information is provided by the storage driver, and formatted - * in a way consistent with the output of `docker info` on the command - * line. - * - *


- * - * > **Note**: The information returned in this field, including the - * > formatting of values and labels, should not be considered stable, - * > and may change without notice. - * - * @type {Array>} - * @memberof SystemInfo - */ - DriverStatus?: Array>; - /** - * Root directory of persistent Docker state. - * - * Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` - * on Windows. - * - * @type {string} - * @memberof SystemInfo - */ - DockerRootDir?: string; - /** - * - * @type {PluginsInfo} - * @memberof SystemInfo - */ - Plugins?: PluginsInfo; - /** - * Indicates if the host has memory limit support enabled. - * @type {boolean} - * @memberof SystemInfo - */ - MemoryLimit?: boolean; - /** - * Indicates if the host has memory swap limit support enabled. - * @type {boolean} - * @memberof SystemInfo - */ - SwapLimit?: boolean; - /** - * Indicates if the host has kernel memory TCP limit support enabled. This - * field is omitted if not supported. - * - * Kernel memory TCP limits are not supported when using cgroups v2, which - * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. - * - * @type {boolean} - * @memberof SystemInfo - */ - KernelMemoryTCP?: boolean; - /** - * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by - * the host. - * - * @type {boolean} - * @memberof SystemInfo - */ - CpuCfsPeriod?: boolean; - /** - * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by - * the host. - * - * @type {boolean} - * @memberof SystemInfo - */ - CpuCfsQuota?: boolean; - /** - * Indicates if CPU Shares limiting is supported by the host. - * - * @type {boolean} - * @memberof SystemInfo - */ - CPUShares?: boolean; - /** - * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. - * - * See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) - * - * @type {boolean} - * @memberof SystemInfo - */ - CPUSet?: boolean; - /** - * Indicates if the host kernel has PID limit support enabled. - * @type {boolean} - * @memberof SystemInfo - */ - PidsLimit?: boolean; - /** - * Indicates if OOM killer disable is supported on the host. - * @type {boolean} - * @memberof SystemInfo - */ - OomKillDisable?: boolean; - /** - * Indicates IPv4 forwarding is enabled. - * @type {boolean} - * @memberof SystemInfo - */ - IPv4Forwarding?: boolean; - /** - * Indicates if `bridge-nf-call-iptables` is available on the host. - * @type {boolean} - * @memberof SystemInfo - */ - BridgeNfIptables?: boolean; - /** - * Indicates if `bridge-nf-call-ip6tables` is available on the host. - * @type {boolean} - * @memberof SystemInfo - */ - BridgeNfIp6tables?: boolean; - /** - * Indicates if the daemon is running in debug-mode / with debug-level - * logging enabled. - * - * @type {boolean} - * @memberof SystemInfo - */ - Debug?: boolean; - /** - * The total number of file Descriptors in use by the daemon process. - * - * This information is only returned if debug-mode is enabled. - * - * @type {number} - * @memberof SystemInfo - */ - NFd?: number; - /** - * The number of goroutines that currently exist. - * - * This information is only returned if debug-mode is enabled. - * - * @type {number} - * @memberof SystemInfo - */ - NGoroutines?: number; - /** - * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) - * format with nano-seconds. - * - * @type {string} - * @memberof SystemInfo - */ - SystemTime?: string; - /** - * The logging driver to use as a default for new containers. - * - * @type {string} - * @memberof SystemInfo - */ - LoggingDriver?: string; - /** - * The driver to use for managing cgroups. - * - * @type {string} - * @memberof SystemInfo - */ - CgroupDriver?: SystemInfoCgroupDriverEnum; - /** - * The version of the cgroup. - * - * @type {string} - * @memberof SystemInfo - */ - CgroupVersion?: SystemInfoCgroupVersionEnum; - /** - * Number of event listeners subscribed. - * @type {number} - * @memberof SystemInfo - */ - NEventsListener?: number; - /** - * Kernel version of the host. - * - * On Linux, this information obtained from `uname`. On Windows this - * information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ - * registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. - * - * @type {string} - * @memberof SystemInfo - */ - KernelVersion?: string; - /** - * Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" - * or "Windows Server 2016 Datacenter" - * - * @type {string} - * @memberof SystemInfo - */ - OperatingSystem?: string; - /** - * Version of the host's operating system - * - *


- * - * > **Note**: The information returned in this field, including its - * > very existence, and the formatting of values, should not be considered - * > stable, and may change without notice. - * - * @type {string} - * @memberof SystemInfo - */ - OSVersion?: string; - /** - * Generic type of the operating system of the host, as returned by the - * Go runtime (`GOOS`). - * - * Currently returned values are "linux" and "windows". A full list of - * possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). - * - * @type {string} - * @memberof SystemInfo - */ - OSType?: string; - /** - * Hardware architecture of the host, as returned by the Go runtime - * (`GOARCH`). - * - * A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). - * - * @type {string} - * @memberof SystemInfo - */ - Architecture?: string; - /** - * The number of logical CPUs usable by the daemon. - * - * The number of available CPUs is checked by querying the operating - * system when the daemon starts. Changes to operating system CPU - * allocation after the daemon is started are not reflected. - * - * @type {number} - * @memberof SystemInfo - */ - NCPU?: number; - /** - * Total amount of physical memory available on the host, in bytes. - * - * @type {number} - * @memberof SystemInfo - */ - MemTotal?: number; - /** - * Address / URL of the index server that is used for image search, - * and as a default for user authentication for Docker Hub and Docker Cloud. - * - * @type {string} - * @memberof SystemInfo - */ - IndexServerAddress?: string; - /** - * - * @type {RegistryServiceConfig} - * @memberof SystemInfo - */ - RegistryConfig?: RegistryServiceConfig | null; - /** - * User-defined resources can be either Integer resources (e.g, `SSD=3`) or - * String resources (e.g, `GPU=UUID1`). - * - * @type {Array} - * @memberof SystemInfo - */ - GenericResources?: Array; - /** - * HTTP-proxy configured for the daemon. This value is obtained from the - * [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. - * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL - * are masked in the API response. - * - * Containers do not automatically inherit this configuration. - * - * @type {string} - * @memberof SystemInfo - */ - HttpProxy?: string; - /** - * HTTPS-proxy configured for the daemon. This value is obtained from the - * [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. - * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL - * are masked in the API response. - * - * Containers do not automatically inherit this configuration. - * - * @type {string} - * @memberof SystemInfo - */ - HttpsProxy?: string; - /** - * Comma-separated list of domain extensions for which no proxy should be - * used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) - * environment variable. - * - * Containers do not automatically inherit this configuration. - * - * @type {string} - * @memberof SystemInfo - */ - NoProxy?: string; - /** - * Hostname of the host. - * @type {string} - * @memberof SystemInfo - */ - Name?: string; - /** - * User-defined labels (key/value metadata) as set on the daemon. - * - *


- * - * > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, - * > set through the daemon configuration, and _node_ labels, set from a - * > manager node in the Swarm. Node labels are not included in this - * > field. Node labels can be retrieved using the `/nodes/(id)` endpoint - * > on a manager node in the Swarm. - * - * @type {Array} - * @memberof SystemInfo - */ - Labels?: Array; - /** - * Indicates if experimental features are enabled on the daemon. - * - * @type {boolean} - * @memberof SystemInfo - */ - ExperimentalBuild?: boolean; - /** - * Version string of the daemon. - * - * @type {string} - * @memberof SystemInfo - */ - ServerVersion?: string; - /** - * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) - * runtimes configured on the daemon. Keys hold the "name" used to - * reference the runtime. - * - * The Docker daemon relies on an OCI compliant runtime (invoked via the - * `containerd` daemon) as its interface to the Linux kernel namespaces, - * cgroups, and SELinux. - * - * The default runtime is `runc`, and automatically configured. Additional - * runtimes can be configured by the user and will be listed here. - * - * @type {{ [key: string]: Runtime; }} - * @memberof SystemInfo - */ - Runtimes?: { [key: string]: Runtime }; - /** - * Name of the default OCI runtime that is used when starting containers. - * - * The default can be overridden per-container at create time. - * - * @type {string} - * @memberof SystemInfo - */ - DefaultRuntime?: string; - /** - * - * @type {SwarmInfo} - * @memberof SystemInfo - */ - Swarm?: SwarmInfo; - /** - * Indicates if live restore is enabled. - * - * If enabled, containers are kept running when the daemon is shutdown - * or upon daemon start if running containers are detected. - * - * @type {boolean} - * @memberof SystemInfo - */ - LiveRestoreEnabled?: boolean; - /** - * Represents the isolation technology to use as a default for containers. - * The supported values are platform-specific. - * - * If no isolation value is specified on daemon start, on Windows client, - * the default is `hyperv`, and on Windows server, the default is `process`. - * - * This option is currently not used on other platforms. - * - * @type {string} - * @memberof SystemInfo - */ - Isolation?: SystemInfoIsolationEnum; - /** - * Name and, optional, path of the `docker-init` binary. - * - * If the path is omitted, the daemon searches the host's `$PATH` for the - * binary and uses the first result. - * - * @type {string} - * @memberof SystemInfo - */ - InitBinary?: string; - /** - * - * @type {Commit} - * @memberof SystemInfo - */ - ContainerdCommit?: Commit; - /** - * - * @type {Commit} - * @memberof SystemInfo - */ - RuncCommit?: Commit; - /** - * - * @type {Commit} - * @memberof SystemInfo - */ - InitCommit?: Commit; - /** - * List of security features that are enabled on the daemon, such as - * apparmor, seccomp, SELinux, user-namespaces (userns), rootless and - * no-new-privileges. - * - * Additional configuration options for each security feature may - * be present, and are included as a comma-separated list of key/value - * pairs. - * - * @type {Array} - * @memberof SystemInfo - */ - SecurityOptions?: Array; - /** - * Reports a summary of the product license on the daemon. - * - * If a commercial license has been applied to the daemon, information - * such as number of nodes, and expiration are included. - * - * @type {string} - * @memberof SystemInfo - */ - ProductLicense?: string; - /** - * List of custom default address pools for local networks, which can be - * specified in the daemon.json file or dockerd option. - * - * Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 - * 10.10.[0-255].0/24 address pools. - * - * @type {Array} - * @memberof SystemInfo - */ - DefaultAddressPools?: Array; - /** - * List of warnings / informational messages about missing features, or - * issues related to the daemon configuration. - * - * These messages can be printed by the client as information to the user. - * - * @type {Array} - * @memberof SystemInfo - */ - Warnings?: Array; + /** + * Unique identifier of the daemon. + * + *


+ * + * > **Note**: The format of the ID itself is not part of the API, and + * > should not be considered stable. + * + * @type {string} + * @memberof SystemInfo + */ + ID?: string; + /** + * Total number of containers on the host. + * @type {number} + * @memberof SystemInfo + */ + Containers?: number; + /** + * Number of containers with status `"running"`. + * + * @type {number} + * @memberof SystemInfo + */ + ContainersRunning?: number; + /** + * Number of containers with status `"paused"`. + * + * @type {number} + * @memberof SystemInfo + */ + ContainersPaused?: number; + /** + * Number of containers with status `"stopped"`. + * + * @type {number} + * @memberof SystemInfo + */ + ContainersStopped?: number; + /** + * Total number of images on the host. + * + * Both _tagged_ and _untagged_ (dangling) images are counted. + * + * @type {number} + * @memberof SystemInfo + */ + Images?: number; + /** + * Name of the storage driver in use. + * @type {string} + * @memberof SystemInfo + */ + Driver?: string; + /** + * Information specific to the storage driver, provided as + * "label" / "value" pairs. + * + * This information is provided by the storage driver, and formatted + * in a way consistent with the output of `docker info` on the command + * line. + * + *


+ * + * > **Note**: The information returned in this field, including the + * > formatting of values and labels, should not be considered stable, + * > and may change without notice. + * + * @type {Array>} + * @memberof SystemInfo + */ + DriverStatus?: Array>; + /** + * Root directory of persistent Docker state. + * + * Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + * on Windows. + * + * @type {string} + * @memberof SystemInfo + */ + DockerRootDir?: string; + /** + * + * @type {PluginsInfo} + * @memberof SystemInfo + */ + Plugins?: PluginsInfo; + /** + * Indicates if the host has memory limit support enabled. + * @type {boolean} + * @memberof SystemInfo + */ + MemoryLimit?: boolean; + /** + * Indicates if the host has memory swap limit support enabled. + * @type {boolean} + * @memberof SystemInfo + */ + SwapLimit?: boolean; + /** + * Indicates if the host has kernel memory TCP limit support enabled. This + * field is omitted if not supported. + * + * Kernel memory TCP limits are not supported when using cgroups v2, which + * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + * + * @type {boolean} + * @memberof SystemInfo + */ + KernelMemoryTCP?: boolean; + /** + * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + * the host. + * + * @type {boolean} + * @memberof SystemInfo + */ + CpuCfsPeriod?: boolean; + /** + * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + * the host. + * + * @type {boolean} + * @memberof SystemInfo + */ + CpuCfsQuota?: boolean; + /** + * Indicates if CPU Shares limiting is supported by the host. + * + * @type {boolean} + * @memberof SystemInfo + */ + CPUShares?: boolean; + /** + * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + * + * See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + * + * @type {boolean} + * @memberof SystemInfo + */ + CPUSet?: boolean; + /** + * Indicates if the host kernel has PID limit support enabled. + * @type {boolean} + * @memberof SystemInfo + */ + PidsLimit?: boolean; + /** + * Indicates if OOM killer disable is supported on the host. + * @type {boolean} + * @memberof SystemInfo + */ + OomKillDisable?: boolean; + /** + * Indicates IPv4 forwarding is enabled. + * @type {boolean} + * @memberof SystemInfo + */ + IPv4Forwarding?: boolean; + /** + * Indicates if `bridge-nf-call-iptables` is available on the host. + * @type {boolean} + * @memberof SystemInfo + */ + BridgeNfIptables?: boolean; + /** + * Indicates if `bridge-nf-call-ip6tables` is available on the host. + * @type {boolean} + * @memberof SystemInfo + */ + BridgeNfIp6tables?: boolean; + /** + * Indicates if the daemon is running in debug-mode / with debug-level + * logging enabled. + * + * @type {boolean} + * @memberof SystemInfo + */ + Debug?: boolean; + /** + * The total number of file Descriptors in use by the daemon process. + * + * This information is only returned if debug-mode is enabled. + * + * @type {number} + * @memberof SystemInfo + */ + NFd?: number; + /** + * The number of goroutines that currently exist. + * + * This information is only returned if debug-mode is enabled. + * + * @type {number} + * @memberof SystemInfo + */ + NGoroutines?: number; + /** + * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + * format with nano-seconds. + * + * @type {string} + * @memberof SystemInfo + */ + SystemTime?: string; + /** + * The logging driver to use as a default for new containers. + * + * @type {string} + * @memberof SystemInfo + */ + LoggingDriver?: string; + /** + * The driver to use for managing cgroups. + * + * @type {string} + * @memberof SystemInfo + */ + CgroupDriver?: SystemInfoCgroupDriverEnum; + /** + * The version of the cgroup. + * + * @type {string} + * @memberof SystemInfo + */ + CgroupVersion?: SystemInfoCgroupVersionEnum; + /** + * Number of event listeners subscribed. + * @type {number} + * @memberof SystemInfo + */ + NEventsListener?: number; + /** + * Kernel version of the host. + * + * On Linux, this information obtained from `uname`. On Windows this + * information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + * registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + * + * @type {string} + * @memberof SystemInfo + */ + KernelVersion?: string; + /** + * Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" + * or "Windows Server 2016 Datacenter" + * + * @type {string} + * @memberof SystemInfo + */ + OperatingSystem?: string; + /** + * Version of the host's operating system + * + *


+ * + * > **Note**: The information returned in this field, including its + * > very existence, and the formatting of values, should not be considered + * > stable, and may change without notice. + * + * @type {string} + * @memberof SystemInfo + */ + OSVersion?: string; + /** + * Generic type of the operating system of the host, as returned by the + * Go runtime (`GOOS`). + * + * Currently returned values are "linux" and "windows". A full list of + * possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + * + * @type {string} + * @memberof SystemInfo + */ + OSType?: string; + /** + * Hardware architecture of the host, as returned by the Go runtime + * (`GOARCH`). + * + * A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + * + * @type {string} + * @memberof SystemInfo + */ + Architecture?: string; + /** + * The number of logical CPUs usable by the daemon. + * + * The number of available CPUs is checked by querying the operating + * system when the daemon starts. Changes to operating system CPU + * allocation after the daemon is started are not reflected. + * + * @type {number} + * @memberof SystemInfo + */ + NCPU?: number; + /** + * Total amount of physical memory available on the host, in bytes. + * + * @type {number} + * @memberof SystemInfo + */ + MemTotal?: number; + /** + * Address / URL of the index server that is used for image search, + * and as a default for user authentication for Docker Hub and Docker Cloud. + * + * @type {string} + * @memberof SystemInfo + */ + IndexServerAddress?: string; + /** + * + * @type {RegistryServiceConfig} + * @memberof SystemInfo + */ + RegistryConfig?: RegistryServiceConfig | null; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + * String resources (e.g, `GPU=UUID1`). + * + * @type {Array} + * @memberof SystemInfo + */ + GenericResources?: Array; + /** + * HTTP-proxy configured for the daemon. This value is obtained from the + * [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + * are masked in the API response. + * + * Containers do not automatically inherit this configuration. + * + * @type {string} + * @memberof SystemInfo + */ + HttpProxy?: string; + /** + * HTTPS-proxy configured for the daemon. This value is obtained from the + * [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + * are masked in the API response. + * + * Containers do not automatically inherit this configuration. + * + * @type {string} + * @memberof SystemInfo + */ + HttpsProxy?: string; + /** + * Comma-separated list of domain extensions for which no proxy should be + * used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + * environment variable. + * + * Containers do not automatically inherit this configuration. + * + * @type {string} + * @memberof SystemInfo + */ + NoProxy?: string; + /** + * Hostname of the host. + * @type {string} + * @memberof SystemInfo + */ + Name?: string; + /** + * User-defined labels (key/value metadata) as set on the daemon. + * + *


+ * + * > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + * > set through the daemon configuration, and _node_ labels, set from a + * > manager node in the Swarm. Node labels are not included in this + * > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + * > on a manager node in the Swarm. + * + * @type {Array} + * @memberof SystemInfo + */ + Labels?: Array; + /** + * Indicates if experimental features are enabled on the daemon. + * + * @type {boolean} + * @memberof SystemInfo + */ + ExperimentalBuild?: boolean; + /** + * Version string of the daemon. + * + * @type {string} + * @memberof SystemInfo + */ + ServerVersion?: string; + /** + * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + * runtimes configured on the daemon. Keys hold the "name" used to + * reference the runtime. + * + * The Docker daemon relies on an OCI compliant runtime (invoked via the + * `containerd` daemon) as its interface to the Linux kernel namespaces, + * cgroups, and SELinux. + * + * The default runtime is `runc`, and automatically configured. Additional + * runtimes can be configured by the user and will be listed here. + * + * @type {{ [key: string]: Runtime; }} + * @memberof SystemInfo + */ + Runtimes?: { [key: string]: Runtime; }; + /** + * Name of the default OCI runtime that is used when starting containers. + * + * The default can be overridden per-container at create time. + * + * @type {string} + * @memberof SystemInfo + */ + DefaultRuntime?: string; + /** + * + * @type {SwarmInfo} + * @memberof SystemInfo + */ + Swarm?: SwarmInfo; + /** + * Indicates if live restore is enabled. + * + * If enabled, containers are kept running when the daemon is shutdown + * or upon daemon start if running containers are detected. + * + * @type {boolean} + * @memberof SystemInfo + */ + LiveRestoreEnabled?: boolean; + /** + * Represents the isolation technology to use as a default for containers. + * The supported values are platform-specific. + * + * If no isolation value is specified on daemon start, on Windows client, + * the default is `hyperv`, and on Windows server, the default is `process`. + * + * This option is currently not used on other platforms. + * + * @type {string} + * @memberof SystemInfo + */ + Isolation?: SystemInfoIsolationEnum; + /** + * Name and, optional, path of the `docker-init` binary. + * + * If the path is omitted, the daemon searches the host's `$PATH` for the + * binary and uses the first result. + * + * @type {string} + * @memberof SystemInfo + */ + InitBinary?: string; + /** + * + * @type {Commit} + * @memberof SystemInfo + */ + ContainerdCommit?: Commit; + /** + * + * @type {Commit} + * @memberof SystemInfo + */ + RuncCommit?: Commit; + /** + * + * @type {Commit} + * @memberof SystemInfo + */ + InitCommit?: Commit; + /** + * List of security features that are enabled on the daemon, such as + * apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + * no-new-privileges. + * + * Additional configuration options for each security feature may + * be present, and are included as a comma-separated list of key/value + * pairs. + * + * @type {Array} + * @memberof SystemInfo + */ + SecurityOptions?: Array; + /** + * Reports a summary of the product license on the daemon. + * + * If a commercial license has been applied to the daemon, information + * such as number of nodes, and expiration are included. + * + * @type {string} + * @memberof SystemInfo + */ + ProductLicense?: string; + /** + * List of custom default address pools for local networks, which can be + * specified in the daemon.json file or dockerd option. + * + * Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + * 10.10.[0-255].0/24 address pools. + * + * @type {Array} + * @memberof SystemInfo + */ + DefaultAddressPools?: Array; + /** + * List of warnings / informational messages about missing features, or + * issues related to the daemon configuration. + * + * These messages can be printed by the client as information to the user. + * + * @type {Array} + * @memberof SystemInfo + */ + Warnings?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SystemInfoCgroupDriverEnum { - Cgroupfs = "cgroupfs", - Systemd = "systemd", - None = "none", + Cgroupfs = 'cgroupfs', + Systemd = 'systemd', + None = 'none' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SystemInfoCgroupVersionEnum { - _1 = "1", - _2 = "2", + _1 = '1', + _2 = '2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SystemInfoIsolationEnum { - Default = "default", - Hyperv = "hyperv", - Process = "process", + Default = 'default', + Hyperv = 'hyperv', + Process = 'process' } + /** * Check if a given object implements the SystemInfo interface. */ export function instanceOfSystemInfo(value: object): value is SystemInfo { - return true; + return true; } export function SystemInfoFromJSON(json: any): SystemInfo { - return SystemInfoFromJSONTyped(json, false); + return SystemInfoFromJSONTyped(json, false); } export function SystemInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfo { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Containers: json["Containers"] == null ? undefined : json["Containers"], - ContainersRunning: json["ContainersRunning"] == null ? undefined : json["ContainersRunning"], - ContainersPaused: json["ContainersPaused"] == null ? undefined : json["ContainersPaused"], - ContainersStopped: json["ContainersStopped"] == null ? undefined : json["ContainersStopped"], - Images: json["Images"] == null ? undefined : json["Images"], - Driver: json["Driver"] == null ? undefined : json["Driver"], - DriverStatus: json["DriverStatus"] == null ? undefined : json["DriverStatus"], - DockerRootDir: json["DockerRootDir"] == null ? undefined : json["DockerRootDir"], - Plugins: json["Plugins"] == null ? undefined : PluginsInfoFromJSON(json["Plugins"]), - MemoryLimit: json["MemoryLimit"] == null ? undefined : json["MemoryLimit"], - SwapLimit: json["SwapLimit"] == null ? undefined : json["SwapLimit"], - KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], - CpuCfsPeriod: json["CpuCfsPeriod"] == null ? undefined : json["CpuCfsPeriod"], - CpuCfsQuota: json["CpuCfsQuota"] == null ? undefined : json["CpuCfsQuota"], - CPUShares: json["CPUShares"] == null ? undefined : json["CPUShares"], - CPUSet: json["CPUSet"] == null ? undefined : json["CPUSet"], - PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], - OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], - IPv4Forwarding: json["IPv4Forwarding"] == null ? undefined : json["IPv4Forwarding"], - BridgeNfIptables: json["BridgeNfIptables"] == null ? undefined : json["BridgeNfIptables"], - BridgeNfIp6tables: json["BridgeNfIp6tables"] == null ? undefined : json["BridgeNfIp6tables"], - Debug: json["Debug"] == null ? undefined : json["Debug"], - NFd: json["NFd"] == null ? undefined : json["NFd"], - NGoroutines: json["NGoroutines"] == null ? undefined : json["NGoroutines"], - SystemTime: json["SystemTime"] == null ? undefined : json["SystemTime"], - LoggingDriver: json["LoggingDriver"] == null ? undefined : json["LoggingDriver"], - CgroupDriver: json["CgroupDriver"] == null ? undefined : json["CgroupDriver"], - CgroupVersion: json["CgroupVersion"] == null ? undefined : json["CgroupVersion"], - NEventsListener: json["NEventsListener"] == null ? undefined : json["NEventsListener"], - KernelVersion: json["KernelVersion"] == null ? undefined : json["KernelVersion"], - OperatingSystem: json["OperatingSystem"] == null ? undefined : json["OperatingSystem"], - OSVersion: json["OSVersion"] == null ? undefined : json["OSVersion"], - OSType: json["OSType"] == null ? undefined : json["OSType"], - Architecture: json["Architecture"] == null ? undefined : json["Architecture"], - NCPU: json["NCPU"] == null ? undefined : json["NCPU"], - MemTotal: json["MemTotal"] == null ? undefined : json["MemTotal"], - IndexServerAddress: json["IndexServerAddress"] == null ? undefined : json["IndexServerAddress"], - RegistryConfig: - json["RegistryConfig"] == null - ? undefined - : RegistryServiceConfigFromJSON(json["RegistryConfig"]), - GenericResources: - json["GenericResources"] == null - ? undefined - : (json["GenericResources"] as Array).map(GenericResourcesInnerFromJSON), - HttpProxy: json["HttpProxy"] == null ? undefined : json["HttpProxy"], - HttpsProxy: json["HttpsProxy"] == null ? undefined : json["HttpsProxy"], - NoProxy: json["NoProxy"] == null ? undefined : json["NoProxy"], - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - ExperimentalBuild: json["ExperimentalBuild"] == null ? undefined : json["ExperimentalBuild"], - ServerVersion: json["ServerVersion"] == null ? undefined : json["ServerVersion"], - Runtimes: json["Runtimes"] == null ? undefined : mapValues(json["Runtimes"], RuntimeFromJSON), - DefaultRuntime: json["DefaultRuntime"] == null ? undefined : json["DefaultRuntime"], - Swarm: json["Swarm"] == null ? undefined : SwarmInfoFromJSON(json["Swarm"]), - LiveRestoreEnabled: json["LiveRestoreEnabled"] == null ? undefined : json["LiveRestoreEnabled"], - Isolation: json["Isolation"] == null ? undefined : json["Isolation"], - InitBinary: json["InitBinary"] == null ? undefined : json["InitBinary"], - ContainerdCommit: - json["ContainerdCommit"] == null ? undefined : CommitFromJSON(json["ContainerdCommit"]), - RuncCommit: json["RuncCommit"] == null ? undefined : CommitFromJSON(json["RuncCommit"]), - InitCommit: json["InitCommit"] == null ? undefined : CommitFromJSON(json["InitCommit"]), - SecurityOptions: json["SecurityOptions"] == null ? undefined : json["SecurityOptions"], - ProductLicense: json["ProductLicense"] == null ? undefined : json["ProductLicense"], - DefaultAddressPools: - json["DefaultAddressPools"] == null - ? undefined - : (json["DefaultAddressPools"] as Array).map( - SystemInfoDefaultAddressPoolsInnerFromJSON, - ), - Warnings: json["Warnings"] == null ? undefined : json["Warnings"], - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Containers': json['Containers'] == null ? undefined : json['Containers'], + 'ContainersRunning': json['ContainersRunning'] == null ? undefined : json['ContainersRunning'], + 'ContainersPaused': json['ContainersPaused'] == null ? undefined : json['ContainersPaused'], + 'ContainersStopped': json['ContainersStopped'] == null ? undefined : json['ContainersStopped'], + 'Images': json['Images'] == null ? undefined : json['Images'], + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'DriverStatus': json['DriverStatus'] == null ? undefined : json['DriverStatus'], + 'DockerRootDir': json['DockerRootDir'] == null ? undefined : json['DockerRootDir'], + 'Plugins': json['Plugins'] == null ? undefined : PluginsInfoFromJSON(json['Plugins']), + 'MemoryLimit': json['MemoryLimit'] == null ? undefined : json['MemoryLimit'], + 'SwapLimit': json['SwapLimit'] == null ? undefined : json['SwapLimit'], + 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], + 'CpuCfsPeriod': json['CpuCfsPeriod'] == null ? undefined : json['CpuCfsPeriod'], + 'CpuCfsQuota': json['CpuCfsQuota'] == null ? undefined : json['CpuCfsQuota'], + 'CPUShares': json['CPUShares'] == null ? undefined : json['CPUShares'], + 'CPUSet': json['CPUSet'] == null ? undefined : json['CPUSet'], + 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], + 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], + 'IPv4Forwarding': json['IPv4Forwarding'] == null ? undefined : json['IPv4Forwarding'], + 'BridgeNfIptables': json['BridgeNfIptables'] == null ? undefined : json['BridgeNfIptables'], + 'BridgeNfIp6tables': json['BridgeNfIp6tables'] == null ? undefined : json['BridgeNfIp6tables'], + 'Debug': json['Debug'] == null ? undefined : json['Debug'], + 'NFd': json['NFd'] == null ? undefined : json['NFd'], + 'NGoroutines': json['NGoroutines'] == null ? undefined : json['NGoroutines'], + 'SystemTime': json['SystemTime'] == null ? undefined : json['SystemTime'], + 'LoggingDriver': json['LoggingDriver'] == null ? undefined : json['LoggingDriver'], + 'CgroupDriver': json['CgroupDriver'] == null ? undefined : json['CgroupDriver'], + 'CgroupVersion': json['CgroupVersion'] == null ? undefined : json['CgroupVersion'], + 'NEventsListener': json['NEventsListener'] == null ? undefined : json['NEventsListener'], + 'KernelVersion': json['KernelVersion'] == null ? undefined : json['KernelVersion'], + 'OperatingSystem': json['OperatingSystem'] == null ? undefined : json['OperatingSystem'], + 'OSVersion': json['OSVersion'] == null ? undefined : json['OSVersion'], + 'OSType': json['OSType'] == null ? undefined : json['OSType'], + 'Architecture': json['Architecture'] == null ? undefined : json['Architecture'], + 'NCPU': json['NCPU'] == null ? undefined : json['NCPU'], + 'MemTotal': json['MemTotal'] == null ? undefined : json['MemTotal'], + 'IndexServerAddress': json['IndexServerAddress'] == null ? undefined : json['IndexServerAddress'], + 'RegistryConfig': json['RegistryConfig'] == null ? undefined : RegistryServiceConfigFromJSON(json['RegistryConfig']), + 'GenericResources': json['GenericResources'] == null ? undefined : ((json['GenericResources'] as Array).map(GenericResourcesInnerFromJSON)), + 'HttpProxy': json['HttpProxy'] == null ? undefined : json['HttpProxy'], + 'HttpsProxy': json['HttpsProxy'] == null ? undefined : json['HttpsProxy'], + 'NoProxy': json['NoProxy'] == null ? undefined : json['NoProxy'], + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'ExperimentalBuild': json['ExperimentalBuild'] == null ? undefined : json['ExperimentalBuild'], + 'ServerVersion': json['ServerVersion'] == null ? undefined : json['ServerVersion'], + 'Runtimes': json['Runtimes'] == null ? undefined : (mapValues(json['Runtimes'], RuntimeFromJSON)), + 'DefaultRuntime': json['DefaultRuntime'] == null ? undefined : json['DefaultRuntime'], + 'Swarm': json['Swarm'] == null ? undefined : SwarmInfoFromJSON(json['Swarm']), + 'LiveRestoreEnabled': json['LiveRestoreEnabled'] == null ? undefined : json['LiveRestoreEnabled'], + 'Isolation': json['Isolation'] == null ? undefined : json['Isolation'], + 'InitBinary': json['InitBinary'] == null ? undefined : json['InitBinary'], + 'ContainerdCommit': json['ContainerdCommit'] == null ? undefined : CommitFromJSON(json['ContainerdCommit']), + 'RuncCommit': json['RuncCommit'] == null ? undefined : CommitFromJSON(json['RuncCommit']), + 'InitCommit': json['InitCommit'] == null ? undefined : CommitFromJSON(json['InitCommit']), + 'SecurityOptions': json['SecurityOptions'] == null ? undefined : json['SecurityOptions'], + 'ProductLicense': json['ProductLicense'] == null ? undefined : json['ProductLicense'], + 'DefaultAddressPools': json['DefaultAddressPools'] == null ? undefined : ((json['DefaultAddressPools'] as Array).map(SystemInfoDefaultAddressPoolsInnerFromJSON)), + 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], + }; } export function SystemInfoToJSON(json: any): SystemInfo { - return SystemInfoToJSONTyped(json, false); + return SystemInfoToJSONTyped(json, false); } -export function SystemInfoToJSONTyped( - value?: SystemInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemInfoToJSONTyped(value?: SystemInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ID: value["ID"], - Containers: value["Containers"], - ContainersRunning: value["ContainersRunning"], - ContainersPaused: value["ContainersPaused"], - ContainersStopped: value["ContainersStopped"], - Images: value["Images"], - Driver: value["Driver"], - DriverStatus: value["DriverStatus"], - DockerRootDir: value["DockerRootDir"], - Plugins: PluginsInfoToJSON(value["Plugins"]), - MemoryLimit: value["MemoryLimit"], - SwapLimit: value["SwapLimit"], - KernelMemoryTCP: value["KernelMemoryTCP"], - CpuCfsPeriod: value["CpuCfsPeriod"], - CpuCfsQuota: value["CpuCfsQuota"], - CPUShares: value["CPUShares"], - CPUSet: value["CPUSet"], - PidsLimit: value["PidsLimit"], - OomKillDisable: value["OomKillDisable"], - IPv4Forwarding: value["IPv4Forwarding"], - BridgeNfIptables: value["BridgeNfIptables"], - BridgeNfIp6tables: value["BridgeNfIp6tables"], - Debug: value["Debug"], - NFd: value["NFd"], - NGoroutines: value["NGoroutines"], - SystemTime: value["SystemTime"], - LoggingDriver: value["LoggingDriver"], - CgroupDriver: value["CgroupDriver"], - CgroupVersion: value["CgroupVersion"], - NEventsListener: value["NEventsListener"], - KernelVersion: value["KernelVersion"], - OperatingSystem: value["OperatingSystem"], - OSVersion: value["OSVersion"], - OSType: value["OSType"], - Architecture: value["Architecture"], - NCPU: value["NCPU"], - MemTotal: value["MemTotal"], - IndexServerAddress: value["IndexServerAddress"], - RegistryConfig: RegistryServiceConfigToJSON(value["RegistryConfig"]), - GenericResources: - value["GenericResources"] == null - ? undefined - : (value["GenericResources"] as Array).map(GenericResourcesInnerToJSON), - HttpProxy: value["HttpProxy"], - HttpsProxy: value["HttpsProxy"], - NoProxy: value["NoProxy"], - Name: value["Name"], - Labels: value["Labels"], - ExperimentalBuild: value["ExperimentalBuild"], - ServerVersion: value["ServerVersion"], - Runtimes: value["Runtimes"] == null ? undefined : mapValues(value["Runtimes"], RuntimeToJSON), - DefaultRuntime: value["DefaultRuntime"], - Swarm: SwarmInfoToJSON(value["Swarm"]), - LiveRestoreEnabled: value["LiveRestoreEnabled"], - Isolation: value["Isolation"], - InitBinary: value["InitBinary"], - ContainerdCommit: CommitToJSON(value["ContainerdCommit"]), - RuncCommit: CommitToJSON(value["RuncCommit"]), - InitCommit: CommitToJSON(value["InitCommit"]), - SecurityOptions: value["SecurityOptions"], - ProductLicense: value["ProductLicense"], - DefaultAddressPools: - value["DefaultAddressPools"] == null - ? undefined - : (value["DefaultAddressPools"] as Array).map( - SystemInfoDefaultAddressPoolsInnerToJSON, - ), - Warnings: value["Warnings"], - }; + return { + + 'ID': value['ID'], + 'Containers': value['Containers'], + 'ContainersRunning': value['ContainersRunning'], + 'ContainersPaused': value['ContainersPaused'], + 'ContainersStopped': value['ContainersStopped'], + 'Images': value['Images'], + 'Driver': value['Driver'], + 'DriverStatus': value['DriverStatus'], + 'DockerRootDir': value['DockerRootDir'], + 'Plugins': PluginsInfoToJSON(value['Plugins']), + 'MemoryLimit': value['MemoryLimit'], + 'SwapLimit': value['SwapLimit'], + 'KernelMemoryTCP': value['KernelMemoryTCP'], + 'CpuCfsPeriod': value['CpuCfsPeriod'], + 'CpuCfsQuota': value['CpuCfsQuota'], + 'CPUShares': value['CPUShares'], + 'CPUSet': value['CPUSet'], + 'PidsLimit': value['PidsLimit'], + 'OomKillDisable': value['OomKillDisable'], + 'IPv4Forwarding': value['IPv4Forwarding'], + 'BridgeNfIptables': value['BridgeNfIptables'], + 'BridgeNfIp6tables': value['BridgeNfIp6tables'], + 'Debug': value['Debug'], + 'NFd': value['NFd'], + 'NGoroutines': value['NGoroutines'], + 'SystemTime': value['SystemTime'], + 'LoggingDriver': value['LoggingDriver'], + 'CgroupDriver': value['CgroupDriver'], + 'CgroupVersion': value['CgroupVersion'], + 'NEventsListener': value['NEventsListener'], + 'KernelVersion': value['KernelVersion'], + 'OperatingSystem': value['OperatingSystem'], + 'OSVersion': value['OSVersion'], + 'OSType': value['OSType'], + 'Architecture': value['Architecture'], + 'NCPU': value['NCPU'], + 'MemTotal': value['MemTotal'], + 'IndexServerAddress': value['IndexServerAddress'], + 'RegistryConfig': RegistryServiceConfigToJSON(value['RegistryConfig']), + 'GenericResources': value['GenericResources'] == null ? undefined : ((value['GenericResources'] as Array).map(GenericResourcesInnerToJSON)), + 'HttpProxy': value['HttpProxy'], + 'HttpsProxy': value['HttpsProxy'], + 'NoProxy': value['NoProxy'], + 'Name': value['Name'], + 'Labels': value['Labels'], + 'ExperimentalBuild': value['ExperimentalBuild'], + 'ServerVersion': value['ServerVersion'], + 'Runtimes': value['Runtimes'] == null ? undefined : (mapValues(value['Runtimes'], RuntimeToJSON)), + 'DefaultRuntime': value['DefaultRuntime'], + 'Swarm': SwarmInfoToJSON(value['Swarm']), + 'LiveRestoreEnabled': value['LiveRestoreEnabled'], + 'Isolation': value['Isolation'], + 'InitBinary': value['InitBinary'], + 'ContainerdCommit': CommitToJSON(value['ContainerdCommit']), + 'RuncCommit': CommitToJSON(value['RuncCommit']), + 'InitCommit': CommitToJSON(value['InitCommit']), + 'SecurityOptions': value['SecurityOptions'], + 'ProductLicense': value['ProductLicense'], + 'DefaultAddressPools': value['DefaultAddressPools'] == null ? undefined : ((value['DefaultAddressPools'] as Array).map(SystemInfoDefaultAddressPoolsInnerToJSON)), + 'Warnings': value['Warnings'], + }; } + diff --git a/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts b/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts index 90b5c89996..35dba90485 100644 --- a/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts +++ b/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts @@ -2,81 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SystemInfoDefaultAddressPoolsInner */ export interface SystemInfoDefaultAddressPoolsInner { - /** - * The network address in CIDR format - * @type {string} - * @memberof SystemInfoDefaultAddressPoolsInner - */ - Base?: string; - /** - * The network pool size - * @type {number} - * @memberof SystemInfoDefaultAddressPoolsInner - */ - Size?: number; + /** + * The network address in CIDR format + * @type {string} + * @memberof SystemInfoDefaultAddressPoolsInner + */ + Base?: string; + /** + * The network pool size + * @type {number} + * @memberof SystemInfoDefaultAddressPoolsInner + */ + Size?: number; } /** * Check if a given object implements the SystemInfoDefaultAddressPoolsInner interface. */ -export function instanceOfSystemInfoDefaultAddressPoolsInner( - value: object, -): value is SystemInfoDefaultAddressPoolsInner { - return true; +export function instanceOfSystemInfoDefaultAddressPoolsInner(value: object): value is SystemInfoDefaultAddressPoolsInner { + return true; } -export function SystemInfoDefaultAddressPoolsInnerFromJSON( - json: any, -): SystemInfoDefaultAddressPoolsInner { - return SystemInfoDefaultAddressPoolsInnerFromJSONTyped(json, false); +export function SystemInfoDefaultAddressPoolsInnerFromJSON(json: any): SystemInfoDefaultAddressPoolsInner { + return SystemInfoDefaultAddressPoolsInnerFromJSONTyped(json, false); } -export function SystemInfoDefaultAddressPoolsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SystemInfoDefaultAddressPoolsInner { - if (json == null) { - return json; - } - return { - Base: json["Base"] == null ? undefined : json["Base"], - Size: json["Size"] == null ? undefined : json["Size"], - }; +export function SystemInfoDefaultAddressPoolsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfoDefaultAddressPoolsInner { + if (json == null) { + return json; + } + return { + + 'Base': json['Base'] == null ? undefined : json['Base'], + 'Size': json['Size'] == null ? undefined : json['Size'], + }; } -export function SystemInfoDefaultAddressPoolsInnerToJSON( - json: any, -): SystemInfoDefaultAddressPoolsInner { - return SystemInfoDefaultAddressPoolsInnerToJSONTyped(json, false); +export function SystemInfoDefaultAddressPoolsInnerToJSON(json: any): SystemInfoDefaultAddressPoolsInner { + return SystemInfoDefaultAddressPoolsInnerToJSONTyped(json, false); } -export function SystemInfoDefaultAddressPoolsInnerToJSONTyped( - value?: SystemInfoDefaultAddressPoolsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemInfoDefaultAddressPoolsInnerToJSONTyped(value?: SystemInfoDefaultAddressPoolsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Base: value["Base"], - Size: value["Size"], - }; + return { + + 'Base': value['Base'], + 'Size': value['Size'], + }; } + diff --git a/src/clients/docker/models/SystemVersion.ts b/src/clients/docker/models/SystemVersion.ts index 2b419248b6..b2a5edcb4e 100644 --- a/src/clients/docker/models/SystemVersion.ts +++ b/src/clients/docker/models/SystemVersion.ts @@ -2,190 +2,183 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SystemVersionPlatform } from "./SystemVersionPlatform"; +import { mapValues } from '../runtime'; +import type { SystemVersionPlatform } from './SystemVersionPlatform'; import { - SystemVersionPlatformFromJSON, - SystemVersionPlatformFromJSONTyped, - SystemVersionPlatformToJSON, - SystemVersionPlatformToJSONTyped, -} from "./SystemVersionPlatform"; -import type { SystemVersionComponentsInner } from "./SystemVersionComponentsInner"; + SystemVersionPlatformFromJSON, + SystemVersionPlatformFromJSONTyped, + SystemVersionPlatformToJSON, + SystemVersionPlatformToJSONTyped, +} from './SystemVersionPlatform'; +import type { SystemVersionComponentsInner } from './SystemVersionComponentsInner'; import { - SystemVersionComponentsInnerFromJSON, - SystemVersionComponentsInnerFromJSONTyped, - SystemVersionComponentsInnerToJSON, - SystemVersionComponentsInnerToJSONTyped, -} from "./SystemVersionComponentsInner"; + SystemVersionComponentsInnerFromJSON, + SystemVersionComponentsInnerFromJSONTyped, + SystemVersionComponentsInnerToJSON, + SystemVersionComponentsInnerToJSONTyped, +} from './SystemVersionComponentsInner'; /** * Response of Engine API: GET "/version" - * + * * @export * @interface SystemVersion */ export interface SystemVersion { - /** - * - * @type {SystemVersionPlatform} - * @memberof SystemVersion - */ - Platform?: SystemVersionPlatform; - /** - * Information about system components - * - * @type {Array} - * @memberof SystemVersion - */ - Components?: Array; - /** - * The version of the daemon - * @type {string} - * @memberof SystemVersion - */ - Version?: string; - /** - * The default (and highest) API version that is supported by the daemon - * - * @type {string} - * @memberof SystemVersion - */ - ApiVersion?: string; - /** - * The minimum API version that is supported by the daemon - * - * @type {string} - * @memberof SystemVersion - */ - MinAPIVersion?: string; - /** - * The Git commit of the source code that was used to build the daemon - * - * @type {string} - * @memberof SystemVersion - */ - GitCommit?: string; - /** - * The version Go used to compile the daemon, and the version of the Go - * runtime in use. - * - * @type {string} - * @memberof SystemVersion - */ - GoVersion?: string; - /** - * The operating system that the daemon is running on ("linux" or "windows") - * - * @type {string} - * @memberof SystemVersion - */ - Os?: string; - /** - * The architecture that the daemon is running on - * - * @type {string} - * @memberof SystemVersion - */ - Arch?: string; - /** - * The kernel version (`uname -r`) that the daemon is running on. - * - * This field is omitted when empty. - * - * @type {string} - * @memberof SystemVersion - */ - KernelVersion?: string; - /** - * Indicates if the daemon is started with experimental features enabled. - * - * This field is omitted when empty / false. - * - * @type {boolean} - * @memberof SystemVersion - */ - Experimental?: boolean; - /** - * The date and time that the daemon was compiled. - * - * @type {string} - * @memberof SystemVersion - */ - BuildTime?: string; + /** + * + * @type {SystemVersionPlatform} + * @memberof SystemVersion + */ + Platform?: SystemVersionPlatform; + /** + * Information about system components + * + * @type {Array} + * @memberof SystemVersion + */ + Components?: Array; + /** + * The version of the daemon + * @type {string} + * @memberof SystemVersion + */ + Version?: string; + /** + * The default (and highest) API version that is supported by the daemon + * + * @type {string} + * @memberof SystemVersion + */ + ApiVersion?: string; + /** + * The minimum API version that is supported by the daemon + * + * @type {string} + * @memberof SystemVersion + */ + MinAPIVersion?: string; + /** + * The Git commit of the source code that was used to build the daemon + * + * @type {string} + * @memberof SystemVersion + */ + GitCommit?: string; + /** + * The version Go used to compile the daemon, and the version of the Go + * runtime in use. + * + * @type {string} + * @memberof SystemVersion + */ + GoVersion?: string; + /** + * The operating system that the daemon is running on ("linux" or "windows") + * + * @type {string} + * @memberof SystemVersion + */ + Os?: string; + /** + * The architecture that the daemon is running on + * + * @type {string} + * @memberof SystemVersion + */ + Arch?: string; + /** + * The kernel version (`uname -r`) that the daemon is running on. + * + * This field is omitted when empty. + * + * @type {string} + * @memberof SystemVersion + */ + KernelVersion?: string; + /** + * Indicates if the daemon is started with experimental features enabled. + * + * This field is omitted when empty / false. + * + * @type {boolean} + * @memberof SystemVersion + */ + Experimental?: boolean; + /** + * The date and time that the daemon was compiled. + * + * @type {string} + * @memberof SystemVersion + */ + BuildTime?: string; } /** * Check if a given object implements the SystemVersion interface. */ export function instanceOfSystemVersion(value: object): value is SystemVersion { - return true; + return true; } export function SystemVersionFromJSON(json: any): SystemVersion { - return SystemVersionFromJSONTyped(json, false); + return SystemVersionFromJSONTyped(json, false); } export function SystemVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersion { - if (json == null) { - return json; - } - return { - Platform: - json["Platform"] == null ? undefined : SystemVersionPlatformFromJSON(json["Platform"]), - Components: - json["Components"] == null - ? undefined - : (json["Components"] as Array).map(SystemVersionComponentsInnerFromJSON), - Version: json["Version"] == null ? undefined : json["Version"], - ApiVersion: json["ApiVersion"] == null ? undefined : json["ApiVersion"], - MinAPIVersion: json["MinAPIVersion"] == null ? undefined : json["MinAPIVersion"], - GitCommit: json["GitCommit"] == null ? undefined : json["GitCommit"], - GoVersion: json["GoVersion"] == null ? undefined : json["GoVersion"], - Os: json["Os"] == null ? undefined : json["Os"], - Arch: json["Arch"] == null ? undefined : json["Arch"], - KernelVersion: json["KernelVersion"] == null ? undefined : json["KernelVersion"], - Experimental: json["Experimental"] == null ? undefined : json["Experimental"], - BuildTime: json["BuildTime"] == null ? undefined : json["BuildTime"], - }; + if (json == null) { + return json; + } + return { + + 'Platform': json['Platform'] == null ? undefined : SystemVersionPlatformFromJSON(json['Platform']), + 'Components': json['Components'] == null ? undefined : ((json['Components'] as Array).map(SystemVersionComponentsInnerFromJSON)), + 'Version': json['Version'] == null ? undefined : json['Version'], + 'ApiVersion': json['ApiVersion'] == null ? undefined : json['ApiVersion'], + 'MinAPIVersion': json['MinAPIVersion'] == null ? undefined : json['MinAPIVersion'], + 'GitCommit': json['GitCommit'] == null ? undefined : json['GitCommit'], + 'GoVersion': json['GoVersion'] == null ? undefined : json['GoVersion'], + 'Os': json['Os'] == null ? undefined : json['Os'], + 'Arch': json['Arch'] == null ? undefined : json['Arch'], + 'KernelVersion': json['KernelVersion'] == null ? undefined : json['KernelVersion'], + 'Experimental': json['Experimental'] == null ? undefined : json['Experimental'], + 'BuildTime': json['BuildTime'] == null ? undefined : json['BuildTime'], + }; } export function SystemVersionToJSON(json: any): SystemVersion { - return SystemVersionToJSONTyped(json, false); + return SystemVersionToJSONTyped(json, false); } -export function SystemVersionToJSONTyped( - value?: SystemVersion | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemVersionToJSONTyped(value?: SystemVersion | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Platform: SystemVersionPlatformToJSON(value["Platform"]), - Components: - value["Components"] == null - ? undefined - : (value["Components"] as Array).map(SystemVersionComponentsInnerToJSON), - Version: value["Version"], - ApiVersion: value["ApiVersion"], - MinAPIVersion: value["MinAPIVersion"], - GitCommit: value["GitCommit"], - GoVersion: value["GoVersion"], - Os: value["Os"], - Arch: value["Arch"], - KernelVersion: value["KernelVersion"], - Experimental: value["Experimental"], - BuildTime: value["BuildTime"], - }; + return { + + 'Platform': SystemVersionPlatformToJSON(value['Platform']), + 'Components': value['Components'] == null ? undefined : ((value['Components'] as Array).map(SystemVersionComponentsInnerToJSON)), + 'Version': value['Version'], + 'ApiVersion': value['ApiVersion'], + 'MinAPIVersion': value['MinAPIVersion'], + 'GitCommit': value['GitCommit'], + 'GoVersion': value['GoVersion'], + 'Os': value['Os'], + 'Arch': value['Arch'], + 'KernelVersion': value['KernelVersion'], + 'Experimental': value['Experimental'], + 'BuildTime': value['BuildTime'], + }; } + diff --git a/src/clients/docker/models/SystemVersionComponentsInner.ts b/src/clients/docker/models/SystemVersionComponentsInner.ts index 9b72e06f37..2c4621f037 100644 --- a/src/clients/docker/models/SystemVersionComponentsInner.ts +++ b/src/clients/docker/models/SystemVersionComponentsInner.ts @@ -2,95 +2,90 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SystemVersionComponentsInner */ export interface SystemVersionComponentsInner { - /** - * Name of the component - * - * @type {string} - * @memberof SystemVersionComponentsInner - */ - Name: string; - /** - * Version of the component - * - * @type {string} - * @memberof SystemVersionComponentsInner - */ - Version: string; - /** - * Key/value pairs of strings with additional information about the - * component. These values are intended for informational purposes - * only, and their content is not defined, and not part of the API - * specification. - * - * These messages can be printed by the client as information to the user. - * - * @type {object} - * @memberof SystemVersionComponentsInner - */ - Details?: object | null; + /** + * Name of the component + * + * @type {string} + * @memberof SystemVersionComponentsInner + */ + Name: string; + /** + * Version of the component + * + * @type {string} + * @memberof SystemVersionComponentsInner + */ + Version: string; + /** + * Key/value pairs of strings with additional information about the + * component. These values are intended for informational purposes + * only, and their content is not defined, and not part of the API + * specification. + * + * These messages can be printed by the client as information to the user. + * + * @type {object} + * @memberof SystemVersionComponentsInner + */ + Details?: object | null; } /** * Check if a given object implements the SystemVersionComponentsInner interface. */ -export function instanceOfSystemVersionComponentsInner( - value: object, -): value is SystemVersionComponentsInner { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Version" in value) || value["Version"] === undefined) return false; - return true; +export function instanceOfSystemVersionComponentsInner(value: object): value is SystemVersionComponentsInner { + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Version' in value) || value['Version'] === undefined) return false; + return true; } export function SystemVersionComponentsInnerFromJSON(json: any): SystemVersionComponentsInner { - return SystemVersionComponentsInnerFromJSONTyped(json, false); + return SystemVersionComponentsInnerFromJSONTyped(json, false); } -export function SystemVersionComponentsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SystemVersionComponentsInner { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Version: json["Version"], - Details: json["Details"] == null ? undefined : json["Details"], - }; +export function SystemVersionComponentsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersionComponentsInner { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Version': json['Version'], + 'Details': json['Details'] == null ? undefined : json['Details'], + }; } export function SystemVersionComponentsInnerToJSON(json: any): SystemVersionComponentsInner { - return SystemVersionComponentsInnerToJSONTyped(json, false); + return SystemVersionComponentsInnerToJSONTyped(json, false); } -export function SystemVersionComponentsInnerToJSONTyped( - value?: SystemVersionComponentsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemVersionComponentsInnerToJSONTyped(value?: SystemVersionComponentsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Version: value["Version"], - Details: value["Details"], - }; + return { + + 'Name': value['Name'], + 'Version': value['Version'], + 'Details': value['Details'], + }; } + diff --git a/src/clients/docker/models/SystemVersionPlatform.ts b/src/clients/docker/models/SystemVersionPlatform.ts index 91b2690408..52d3b8bc68 100644 --- a/src/clients/docker/models/SystemVersionPlatform.ts +++ b/src/clients/docker/models/SystemVersionPlatform.ts @@ -2,68 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SystemVersionPlatform */ export interface SystemVersionPlatform { - /** - * - * @type {string} - * @memberof SystemVersionPlatform - */ - Name: string; + /** + * + * @type {string} + * @memberof SystemVersionPlatform + */ + Name: string; } /** * Check if a given object implements the SystemVersionPlatform interface. */ export function instanceOfSystemVersionPlatform(value: object): value is SystemVersionPlatform { - if (!("Name" in value) || value["Name"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + return true; } export function SystemVersionPlatformFromJSON(json: any): SystemVersionPlatform { - return SystemVersionPlatformFromJSONTyped(json, false); + return SystemVersionPlatformFromJSONTyped(json, false); } -export function SystemVersionPlatformFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SystemVersionPlatform { - if (json == null) { - return json; - } - return { - Name: json["Name"], - }; +export function SystemVersionPlatformFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersionPlatform { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + }; } export function SystemVersionPlatformToJSON(json: any): SystemVersionPlatform { - return SystemVersionPlatformToJSONTyped(json, false); + return SystemVersionPlatformToJSONTyped(json, false); } -export function SystemVersionPlatformToJSONTyped( - value?: SystemVersionPlatform | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SystemVersionPlatformToJSONTyped(value?: SystemVersionPlatform | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - }; + return { + + 'Name': value['Name'], + }; } + diff --git a/src/clients/docker/models/TLSInfo.ts b/src/clients/docker/models/TLSInfo.ts index b7d87524eb..f075ebe3c8 100644 --- a/src/clients/docker/models/TLSInfo.ts +++ b/src/clients/docker/models/TLSInfo.ts @@ -2,86 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Information about the issuer of leaf TLS certificates and the trusted root * CA certificate. - * + * * @export * @interface TLSInfo */ export interface TLSInfo { - /** - * The root CA certificate(s) that are used to validate leaf TLS - * certificates. - * - * @type {string} - * @memberof TLSInfo - */ - TrustRoot?: string; - /** - * The base64-url-safe-encoded raw subject bytes of the issuer. - * @type {string} - * @memberof TLSInfo - */ - CertIssuerSubject?: string; - /** - * The base64-url-safe-encoded raw public key bytes of the issuer. - * - * @type {string} - * @memberof TLSInfo - */ - CertIssuerPublicKey?: string; + /** + * The root CA certificate(s) that are used to validate leaf TLS + * certificates. + * + * @type {string} + * @memberof TLSInfo + */ + TrustRoot?: string; + /** + * The base64-url-safe-encoded raw subject bytes of the issuer. + * @type {string} + * @memberof TLSInfo + */ + CertIssuerSubject?: string; + /** + * The base64-url-safe-encoded raw public key bytes of the issuer. + * + * @type {string} + * @memberof TLSInfo + */ + CertIssuerPublicKey?: string; } /** * Check if a given object implements the TLSInfo interface. */ export function instanceOfTLSInfo(value: object): value is TLSInfo { - return true; + return true; } export function TLSInfoFromJSON(json: any): TLSInfo { - return TLSInfoFromJSONTyped(json, false); + return TLSInfoFromJSONTyped(json, false); } export function TLSInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TLSInfo { - if (json == null) { - return json; - } - return { - TrustRoot: json["TrustRoot"] == null ? undefined : json["TrustRoot"], - CertIssuerSubject: json["CertIssuerSubject"] == null ? undefined : json["CertIssuerSubject"], - CertIssuerPublicKey: - json["CertIssuerPublicKey"] == null ? undefined : json["CertIssuerPublicKey"], - }; + if (json == null) { + return json; + } + return { + + 'TrustRoot': json['TrustRoot'] == null ? undefined : json['TrustRoot'], + 'CertIssuerSubject': json['CertIssuerSubject'] == null ? undefined : json['CertIssuerSubject'], + 'CertIssuerPublicKey': json['CertIssuerPublicKey'] == null ? undefined : json['CertIssuerPublicKey'], + }; } export function TLSInfoToJSON(json: any): TLSInfo { - return TLSInfoToJSONTyped(json, false); + return TLSInfoToJSONTyped(json, false); } -export function TLSInfoToJSONTyped( - value?: TLSInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TLSInfoToJSONTyped(value?: TLSInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - TrustRoot: value["TrustRoot"], - CertIssuerSubject: value["CertIssuerSubject"], - CertIssuerPublicKey: value["CertIssuerPublicKey"], - }; + return { + + 'TrustRoot': value['TrustRoot'], + 'CertIssuerSubject': value['CertIssuerSubject'], + 'CertIssuerPublicKey': value['CertIssuerPublicKey'], + }; } + diff --git a/src/clients/docker/models/Task.ts b/src/clients/docker/models/Task.ts index fa40295735..f2a5afff43 100644 --- a/src/clients/docker/models/Task.ts +++ b/src/clients/docker/models/Task.ts @@ -2,211 +2,208 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GenericResourcesInner } from "./GenericResourcesInner"; +import { mapValues } from '../runtime'; +import type { GenericResourcesInner } from './GenericResourcesInner'; import { - GenericResourcesInnerFromJSON, - GenericResourcesInnerFromJSONTyped, - GenericResourcesInnerToJSON, - GenericResourcesInnerToJSONTyped, -} from "./GenericResourcesInner"; -import type { ObjectVersion } from "./ObjectVersion"; + GenericResourcesInnerFromJSON, + GenericResourcesInnerFromJSONTyped, + GenericResourcesInnerToJSON, + GenericResourcesInnerToJSONTyped, +} from './GenericResourcesInner'; +import type { ObjectVersion } from './ObjectVersion'; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from "./ObjectVersion"; -import type { TaskSpec } from "./TaskSpec"; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from './ObjectVersion'; +import type { TaskSpec } from './TaskSpec'; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from "./TaskSpec"; -import type { TaskStatus } from "./TaskStatus"; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from './TaskSpec'; +import type { TaskStatus } from './TaskStatus'; import { - TaskStatusFromJSON, - TaskStatusFromJSONTyped, - TaskStatusToJSON, - TaskStatusToJSONTyped, -} from "./TaskStatus"; -import type { TaskState } from "./TaskState"; + TaskStatusFromJSON, + TaskStatusFromJSONTyped, + TaskStatusToJSON, + TaskStatusToJSONTyped, +} from './TaskStatus'; +import type { TaskState } from './TaskState'; import { - TaskStateFromJSON, - TaskStateFromJSONTyped, - TaskStateToJSON, - TaskStateToJSONTyped, -} from "./TaskState"; + TaskStateFromJSON, + TaskStateFromJSONTyped, + TaskStateToJSON, + TaskStateToJSONTyped, +} from './TaskState'; /** - * + * * @export * @interface Task */ export interface Task { - /** - * The ID of the task. - * @type {string} - * @memberof Task - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Task - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Task - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Task - */ - UpdatedAt?: string; - /** - * Name of the task. - * @type {string} - * @memberof Task - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Task - */ - Labels?: { [key: string]: string }; - /** - * - * @type {TaskSpec} - * @memberof Task - */ - Spec?: TaskSpec; - /** - * The ID of the service this task is part of. - * @type {string} - * @memberof Task - */ - ServiceID?: string; - /** - * - * @type {number} - * @memberof Task - */ - Slot?: number; - /** - * The ID of the node that this task is on. - * @type {string} - * @memberof Task - */ - NodeID?: string; - /** - * User-defined resources can be either Integer resources (e.g, `SSD=3`) or - * String resources (e.g, `GPU=UUID1`). - * - * @type {Array} - * @memberof Task - */ - AssignedGenericResources?: Array; - /** - * - * @type {TaskStatus} - * @memberof Task - */ - Status?: TaskStatus; - /** - * - * @type {TaskState} - * @memberof Task - */ - DesiredState?: TaskState; - /** - * - * @type {ObjectVersion} - * @memberof Task - */ - JobIteration?: ObjectVersion; + /** + * The ID of the task. + * @type {string} + * @memberof Task + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Task + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Task + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Task + */ + UpdatedAt?: string; + /** + * Name of the task. + * @type {string} + * @memberof Task + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof Task + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {TaskSpec} + * @memberof Task + */ + Spec?: TaskSpec; + /** + * The ID of the service this task is part of. + * @type {string} + * @memberof Task + */ + ServiceID?: string; + /** + * + * @type {number} + * @memberof Task + */ + Slot?: number; + /** + * The ID of the node that this task is on. + * @type {string} + * @memberof Task + */ + NodeID?: string; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + * String resources (e.g, `GPU=UUID1`). + * + * @type {Array} + * @memberof Task + */ + AssignedGenericResources?: Array; + /** + * + * @type {TaskStatus} + * @memberof Task + */ + Status?: TaskStatus; + /** + * + * @type {TaskState} + * @memberof Task + */ + DesiredState?: TaskState; + /** + * + * @type {ObjectVersion} + * @memberof Task + */ + JobIteration?: ObjectVersion; } + + /** * Check if a given object implements the Task interface. */ export function instanceOfTask(value: object): value is Task { - return true; + return true; } export function TaskFromJSON(json: any): Task { - return TaskFromJSONTyped(json, false); + return TaskFromJSONTyped(json, false); } export function TaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): Task { - if (json == null) { - return json; - } - return { - ID: json["ID"] == null ? undefined : json["ID"], - Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], - Name: json["Name"] == null ? undefined : json["Name"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Spec: json["Spec"] == null ? undefined : TaskSpecFromJSON(json["Spec"]), - ServiceID: json["ServiceID"] == null ? undefined : json["ServiceID"], - Slot: json["Slot"] == null ? undefined : json["Slot"], - NodeID: json["NodeID"] == null ? undefined : json["NodeID"], - AssignedGenericResources: - json["AssignedGenericResources"] == null - ? undefined - : (json["AssignedGenericResources"] as Array).map(GenericResourcesInnerFromJSON), - Status: json["Status"] == null ? undefined : TaskStatusFromJSON(json["Status"]), - DesiredState: - json["DesiredState"] == null ? undefined : TaskStateFromJSON(json["DesiredState"]), - JobIteration: - json["JobIteration"] == null ? undefined : ObjectVersionFromJSON(json["JobIteration"]), - }; + if (json == null) { + return json; + } + return { + + 'ID': json['ID'] == null ? undefined : json['ID'], + 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Spec': json['Spec'] == null ? undefined : TaskSpecFromJSON(json['Spec']), + 'ServiceID': json['ServiceID'] == null ? undefined : json['ServiceID'], + 'Slot': json['Slot'] == null ? undefined : json['Slot'], + 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], + 'AssignedGenericResources': json['AssignedGenericResources'] == null ? undefined : ((json['AssignedGenericResources'] as Array).map(GenericResourcesInnerFromJSON)), + 'Status': json['Status'] == null ? undefined : TaskStatusFromJSON(json['Status']), + 'DesiredState': json['DesiredState'] == null ? undefined : TaskStateFromJSON(json['DesiredState']), + 'JobIteration': json['JobIteration'] == null ? undefined : ObjectVersionFromJSON(json['JobIteration']), + }; } export function TaskToJSON(json: any): Task { - return TaskToJSONTyped(json, false); + return TaskToJSONTyped(json, false); } export function TaskToJSONTyped(value?: Task | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - ID: value["ID"], - Version: ObjectVersionToJSON(value["Version"]), - CreatedAt: value["CreatedAt"], - UpdatedAt: value["UpdatedAt"], - Name: value["Name"], - Labels: value["Labels"], - Spec: TaskSpecToJSON(value["Spec"]), - ServiceID: value["ServiceID"], - Slot: value["Slot"], - NodeID: value["NodeID"], - AssignedGenericResources: - value["AssignedGenericResources"] == null - ? undefined - : (value["AssignedGenericResources"] as Array).map(GenericResourcesInnerToJSON), - Status: TaskStatusToJSON(value["Status"]), - DesiredState: TaskStateToJSON(value["DesiredState"]), - JobIteration: ObjectVersionToJSON(value["JobIteration"]), - }; + return { + + 'ID': value['ID'], + 'Version': ObjectVersionToJSON(value['Version']), + 'CreatedAt': value['CreatedAt'], + 'UpdatedAt': value['UpdatedAt'], + 'Name': value['Name'], + 'Labels': value['Labels'], + 'Spec': TaskSpecToJSON(value['Spec']), + 'ServiceID': value['ServiceID'], + 'Slot': value['Slot'], + 'NodeID': value['NodeID'], + 'AssignedGenericResources': value['AssignedGenericResources'] == null ? undefined : ((value['AssignedGenericResources'] as Array).map(GenericResourcesInnerToJSON)), + 'Status': TaskStatusToJSON(value['Status']), + 'DesiredState': TaskStateToJSON(value['DesiredState']), + 'JobIteration': ObjectVersionToJSON(value['JobIteration']), + }; } + diff --git a/src/clients/docker/models/TaskSpec.ts b/src/clients/docker/models/TaskSpec.ts index 1caea4c0fe..968e7d6de1 100644 --- a/src/clients/docker/models/TaskSpec.ts +++ b/src/clients/docker/models/TaskSpec.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; +import { mapValues } from '../runtime'; +import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from "./NetworkAttachmentConfig"; -import type { TaskSpecContainerSpec } from "./TaskSpecContainerSpec"; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from './NetworkAttachmentConfig'; +import type { TaskSpecContainerSpec } from './TaskSpecContainerSpec'; import { - TaskSpecContainerSpecFromJSON, - TaskSpecContainerSpecFromJSONTyped, - TaskSpecContainerSpecToJSON, - TaskSpecContainerSpecToJSONTyped, -} from "./TaskSpecContainerSpec"; -import type { TaskSpecPluginSpec } from "./TaskSpecPluginSpec"; + TaskSpecContainerSpecFromJSON, + TaskSpecContainerSpecFromJSONTyped, + TaskSpecContainerSpecToJSON, + TaskSpecContainerSpecToJSONTyped, +} from './TaskSpecContainerSpec'; +import type { TaskSpecPluginSpec } from './TaskSpecPluginSpec'; import { - TaskSpecPluginSpecFromJSON, - TaskSpecPluginSpecFromJSONTyped, - TaskSpecPluginSpecToJSON, - TaskSpecPluginSpecToJSONTyped, -} from "./TaskSpecPluginSpec"; -import type { TaskSpecRestartPolicy } from "./TaskSpecRestartPolicy"; + TaskSpecPluginSpecFromJSON, + TaskSpecPluginSpecFromJSONTyped, + TaskSpecPluginSpecToJSON, + TaskSpecPluginSpecToJSONTyped, +} from './TaskSpecPluginSpec'; +import type { TaskSpecRestartPolicy } from './TaskSpecRestartPolicy'; import { - TaskSpecRestartPolicyFromJSON, - TaskSpecRestartPolicyFromJSONTyped, - TaskSpecRestartPolicyToJSON, - TaskSpecRestartPolicyToJSONTyped, -} from "./TaskSpecRestartPolicy"; -import type { TaskSpecResources } from "./TaskSpecResources"; + TaskSpecRestartPolicyFromJSON, + TaskSpecRestartPolicyFromJSONTyped, + TaskSpecRestartPolicyToJSON, + TaskSpecRestartPolicyToJSONTyped, +} from './TaskSpecRestartPolicy'; +import type { TaskSpecResources } from './TaskSpecResources'; import { - TaskSpecResourcesFromJSON, - TaskSpecResourcesFromJSONTyped, - TaskSpecResourcesToJSON, - TaskSpecResourcesToJSONTyped, -} from "./TaskSpecResources"; -import type { TaskSpecLogDriver } from "./TaskSpecLogDriver"; + TaskSpecResourcesFromJSON, + TaskSpecResourcesFromJSONTyped, + TaskSpecResourcesToJSON, + TaskSpecResourcesToJSONTyped, +} from './TaskSpecResources'; +import type { TaskSpecLogDriver } from './TaskSpecLogDriver'; import { - TaskSpecLogDriverFromJSON, - TaskSpecLogDriverFromJSONTyped, - TaskSpecLogDriverToJSON, - TaskSpecLogDriverToJSONTyped, -} from "./TaskSpecLogDriver"; -import type { TaskSpecNetworkAttachmentSpec } from "./TaskSpecNetworkAttachmentSpec"; + TaskSpecLogDriverFromJSON, + TaskSpecLogDriverFromJSONTyped, + TaskSpecLogDriverToJSON, + TaskSpecLogDriverToJSONTyped, +} from './TaskSpecLogDriver'; +import type { TaskSpecNetworkAttachmentSpec } from './TaskSpecNetworkAttachmentSpec'; import { - TaskSpecNetworkAttachmentSpecFromJSON, - TaskSpecNetworkAttachmentSpecFromJSONTyped, - TaskSpecNetworkAttachmentSpecToJSON, - TaskSpecNetworkAttachmentSpecToJSONTyped, -} from "./TaskSpecNetworkAttachmentSpec"; -import type { TaskSpecPlacement } from "./TaskSpecPlacement"; + TaskSpecNetworkAttachmentSpecFromJSON, + TaskSpecNetworkAttachmentSpecFromJSONTyped, + TaskSpecNetworkAttachmentSpecToJSON, + TaskSpecNetworkAttachmentSpecToJSONTyped, +} from './TaskSpecNetworkAttachmentSpec'; +import type { TaskSpecPlacement } from './TaskSpecPlacement'; import { - TaskSpecPlacementFromJSON, - TaskSpecPlacementFromJSONTyped, - TaskSpecPlacementToJSON, - TaskSpecPlacementToJSONTyped, -} from "./TaskSpecPlacement"; + TaskSpecPlacementFromJSON, + TaskSpecPlacementFromJSONTyped, + TaskSpecPlacementToJSON, + TaskSpecPlacementToJSONTyped, +} from './TaskSpecPlacement'; /** * User modifiable task configuration. @@ -76,138 +76,122 @@ import { * @interface TaskSpec */ export interface TaskSpec { - /** - * - * @type {TaskSpecPluginSpec} - * @memberof TaskSpec - */ - PluginSpec?: TaskSpecPluginSpec; - /** - * - * @type {TaskSpecContainerSpec} - * @memberof TaskSpec - */ - ContainerSpec?: TaskSpecContainerSpec; - /** - * - * @type {TaskSpecNetworkAttachmentSpec} - * @memberof TaskSpec - */ - NetworkAttachmentSpec?: TaskSpecNetworkAttachmentSpec; - /** - * - * @type {TaskSpecResources} - * @memberof TaskSpec - */ - Resources?: TaskSpecResources; - /** - * - * @type {TaskSpecRestartPolicy} - * @memberof TaskSpec - */ - RestartPolicy?: TaskSpecRestartPolicy; - /** - * - * @type {TaskSpecPlacement} - * @memberof TaskSpec - */ - Placement?: TaskSpecPlacement; - /** - * A counter that triggers an update even if no relevant parameters have - * been changed. - * - * @type {number} - * @memberof TaskSpec - */ - ForceUpdate?: number; - /** - * Runtime is the type of runtime specified for the task executor. - * - * @type {string} - * @memberof TaskSpec - */ - Runtime?: string; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof TaskSpec - */ - Networks?: Array; - /** - * - * @type {TaskSpecLogDriver} - * @memberof TaskSpec - */ - LogDriver?: TaskSpecLogDriver; + /** + * + * @type {TaskSpecPluginSpec} + * @memberof TaskSpec + */ + PluginSpec?: TaskSpecPluginSpec; + /** + * + * @type {TaskSpecContainerSpec} + * @memberof TaskSpec + */ + ContainerSpec?: TaskSpecContainerSpec; + /** + * + * @type {TaskSpecNetworkAttachmentSpec} + * @memberof TaskSpec + */ + NetworkAttachmentSpec?: TaskSpecNetworkAttachmentSpec; + /** + * + * @type {TaskSpecResources} + * @memberof TaskSpec + */ + Resources?: TaskSpecResources; + /** + * + * @type {TaskSpecRestartPolicy} + * @memberof TaskSpec + */ + RestartPolicy?: TaskSpecRestartPolicy; + /** + * + * @type {TaskSpecPlacement} + * @memberof TaskSpec + */ + Placement?: TaskSpecPlacement; + /** + * A counter that triggers an update even if no relevant parameters have + * been changed. + * + * @type {number} + * @memberof TaskSpec + */ + ForceUpdate?: number; + /** + * Runtime is the type of runtime specified for the task executor. + * + * @type {string} + * @memberof TaskSpec + */ + Runtime?: string; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof TaskSpec + */ + Networks?: Array; + /** + * + * @type {TaskSpecLogDriver} + * @memberof TaskSpec + */ + LogDriver?: TaskSpecLogDriver; } /** * Check if a given object implements the TaskSpec interface. */ export function instanceOfTaskSpec(value: object): value is TaskSpec { - return true; + return true; } export function TaskSpecFromJSON(json: any): TaskSpec { - return TaskSpecFromJSONTyped(json, false); + return TaskSpecFromJSONTyped(json, false); } export function TaskSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpec { - if (json == null) { - return json; - } - return { - PluginSpec: - json["PluginSpec"] == null ? undefined : TaskSpecPluginSpecFromJSON(json["PluginSpec"]), - ContainerSpec: - json["ContainerSpec"] == null - ? undefined - : TaskSpecContainerSpecFromJSON(json["ContainerSpec"]), - NetworkAttachmentSpec: - json["NetworkAttachmentSpec"] == null - ? undefined - : TaskSpecNetworkAttachmentSpecFromJSON(json["NetworkAttachmentSpec"]), - Resources: json["Resources"] == null ? undefined : TaskSpecResourcesFromJSON(json["Resources"]), - RestartPolicy: - json["RestartPolicy"] == null - ? undefined - : TaskSpecRestartPolicyFromJSON(json["RestartPolicy"]), - Placement: json["Placement"] == null ? undefined : TaskSpecPlacementFromJSON(json["Placement"]), - ForceUpdate: json["ForceUpdate"] == null ? undefined : json["ForceUpdate"], - Runtime: json["Runtime"] == null ? undefined : json["Runtime"], - Networks: - json["Networks"] == null - ? undefined - : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), - LogDriver: json["LogDriver"] == null ? undefined : TaskSpecLogDriverFromJSON(json["LogDriver"]), - }; + if (json == null) { + return json; + } + return { + + 'PluginSpec': json['PluginSpec'] == null ? undefined : TaskSpecPluginSpecFromJSON(json['PluginSpec']), + 'ContainerSpec': json['ContainerSpec'] == null ? undefined : TaskSpecContainerSpecFromJSON(json['ContainerSpec']), + 'NetworkAttachmentSpec': json['NetworkAttachmentSpec'] == null ? undefined : TaskSpecNetworkAttachmentSpecFromJSON(json['NetworkAttachmentSpec']), + 'Resources': json['Resources'] == null ? undefined : TaskSpecResourcesFromJSON(json['Resources']), + 'RestartPolicy': json['RestartPolicy'] == null ? undefined : TaskSpecRestartPolicyFromJSON(json['RestartPolicy']), + 'Placement': json['Placement'] == null ? undefined : TaskSpecPlacementFromJSON(json['Placement']), + 'ForceUpdate': json['ForceUpdate'] == null ? undefined : json['ForceUpdate'], + 'Runtime': json['Runtime'] == null ? undefined : json['Runtime'], + 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), + 'LogDriver': json['LogDriver'] == null ? undefined : TaskSpecLogDriverFromJSON(json['LogDriver']), + }; } export function TaskSpecToJSON(json: any): TaskSpec { - return TaskSpecToJSONTyped(json, false); + return TaskSpecToJSONTyped(json, false); } -export function TaskSpecToJSONTyped( - value?: TaskSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecToJSONTyped(value?: TaskSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - PluginSpec: TaskSpecPluginSpecToJSON(value["PluginSpec"]), - ContainerSpec: TaskSpecContainerSpecToJSON(value["ContainerSpec"]), - NetworkAttachmentSpec: TaskSpecNetworkAttachmentSpecToJSON(value["NetworkAttachmentSpec"]), - Resources: TaskSpecResourcesToJSON(value["Resources"]), - RestartPolicy: TaskSpecRestartPolicyToJSON(value["RestartPolicy"]), - Placement: TaskSpecPlacementToJSON(value["Placement"]), - ForceUpdate: value["ForceUpdate"], - Runtime: value["Runtime"], - Networks: - value["Networks"] == null - ? undefined - : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), - LogDriver: TaskSpecLogDriverToJSON(value["LogDriver"]), - }; + return { + + 'PluginSpec': TaskSpecPluginSpecToJSON(value['PluginSpec']), + 'ContainerSpec': TaskSpecContainerSpecToJSON(value['ContainerSpec']), + 'NetworkAttachmentSpec': TaskSpecNetworkAttachmentSpecToJSON(value['NetworkAttachmentSpec']), + 'Resources': TaskSpecResourcesToJSON(value['Resources']), + 'RestartPolicy': TaskSpecRestartPolicyToJSON(value['RestartPolicy']), + 'Placement': TaskSpecPlacementToJSON(value['Placement']), + 'ForceUpdate': value['ForceUpdate'], + 'Runtime': value['Runtime'], + 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), + 'LogDriver': TaskSpecLogDriverToJSON(value['LogDriver']), + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpec.ts b/src/clients/docker/models/TaskSpecContainerSpec.ts index af312e868d..54d8d4095a 100644 --- a/src/clients/docker/models/TaskSpecContainerSpec.ts +++ b/src/clients/docker/models/TaskSpecContainerSpec.ts @@ -2,398 +2,376 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; +import { mapValues } from '../runtime'; +import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; +import { + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from './ResourcesUlimitsInner'; +import type { HealthConfig } from './HealthConfig'; import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from "./ResourcesUlimitsInner"; -import type { HealthConfig } from "./HealthConfig"; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from './HealthConfig'; +import type { Mount } from './Mount'; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from "./HealthConfig"; -import type { Mount } from "./Mount"; -import { MountFromJSON, MountFromJSONTyped, MountToJSON, MountToJSONTyped } from "./Mount"; -import type { TaskSpecContainerSpecDNSConfig } from "./TaskSpecContainerSpecDNSConfig"; + MountFromJSON, + MountFromJSONTyped, + MountToJSON, + MountToJSONTyped, +} from './Mount'; +import type { TaskSpecContainerSpecDNSConfig } from './TaskSpecContainerSpecDNSConfig'; import { - TaskSpecContainerSpecDNSConfigFromJSON, - TaskSpecContainerSpecDNSConfigFromJSONTyped, - TaskSpecContainerSpecDNSConfigToJSON, - TaskSpecContainerSpecDNSConfigToJSONTyped, -} from "./TaskSpecContainerSpecDNSConfig"; -import type { TaskSpecContainerSpecPrivileges } from "./TaskSpecContainerSpecPrivileges"; + TaskSpecContainerSpecDNSConfigFromJSON, + TaskSpecContainerSpecDNSConfigFromJSONTyped, + TaskSpecContainerSpecDNSConfigToJSON, + TaskSpecContainerSpecDNSConfigToJSONTyped, +} from './TaskSpecContainerSpecDNSConfig'; +import type { TaskSpecContainerSpecPrivileges } from './TaskSpecContainerSpecPrivileges'; import { - TaskSpecContainerSpecPrivilegesFromJSON, - TaskSpecContainerSpecPrivilegesFromJSONTyped, - TaskSpecContainerSpecPrivilegesToJSON, - TaskSpecContainerSpecPrivilegesToJSONTyped, -} from "./TaskSpecContainerSpecPrivileges"; -import type { TaskSpecContainerSpecConfigsInner } from "./TaskSpecContainerSpecConfigsInner"; + TaskSpecContainerSpecPrivilegesFromJSON, + TaskSpecContainerSpecPrivilegesFromJSONTyped, + TaskSpecContainerSpecPrivilegesToJSON, + TaskSpecContainerSpecPrivilegesToJSONTyped, +} from './TaskSpecContainerSpecPrivileges'; +import type { TaskSpecContainerSpecConfigsInner } from './TaskSpecContainerSpecConfigsInner'; import { - TaskSpecContainerSpecConfigsInnerFromJSON, - TaskSpecContainerSpecConfigsInnerFromJSONTyped, - TaskSpecContainerSpecConfigsInnerToJSON, - TaskSpecContainerSpecConfigsInnerToJSONTyped, -} from "./TaskSpecContainerSpecConfigsInner"; -import type { TaskSpecContainerSpecSecretsInner } from "./TaskSpecContainerSpecSecretsInner"; + TaskSpecContainerSpecConfigsInnerFromJSON, + TaskSpecContainerSpecConfigsInnerFromJSONTyped, + TaskSpecContainerSpecConfigsInnerToJSON, + TaskSpecContainerSpecConfigsInnerToJSONTyped, +} from './TaskSpecContainerSpecConfigsInner'; +import type { TaskSpecContainerSpecSecretsInner } from './TaskSpecContainerSpecSecretsInner'; import { - TaskSpecContainerSpecSecretsInnerFromJSON, - TaskSpecContainerSpecSecretsInnerFromJSONTyped, - TaskSpecContainerSpecSecretsInnerToJSON, - TaskSpecContainerSpecSecretsInnerToJSONTyped, -} from "./TaskSpecContainerSpecSecretsInner"; + TaskSpecContainerSpecSecretsInnerFromJSON, + TaskSpecContainerSpecSecretsInnerFromJSONTyped, + TaskSpecContainerSpecSecretsInnerToJSON, + TaskSpecContainerSpecSecretsInnerToJSONTyped, +} from './TaskSpecContainerSpecSecretsInner'; /** * 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`. - * + * * @export * @interface TaskSpecContainerSpec */ export interface TaskSpecContainerSpec { - /** - * The image name to use for the container - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Image?: string; - /** - * User-defined key/value data. - * @type {{ [key: string]: string; }} - * @memberof TaskSpecContainerSpec - */ - Labels?: { [key: string]: string }; - /** - * The command to be run in the image. - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Command?: Array; - /** - * Arguments to the command. - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Args?: Array; - /** - * The hostname to use for the container, as a valid - * [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. - * - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Hostname?: string; - /** - * A list of environment variables in the form `VAR=value`. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Env?: Array; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Dir?: string; - /** - * The user inside the container. - * @type {string} - * @memberof TaskSpecContainerSpec - */ - User?: string; - /** - * A list of additional groups that the container process will run as. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Groups?: Array; - /** - * - * @type {TaskSpecContainerSpecPrivileges} - * @memberof TaskSpecContainerSpec - */ - Privileges?: TaskSpecContainerSpecPrivileges; - /** - * Whether a pseudo-TTY should be allocated. - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - TTY?: boolean; - /** - * Open `stdin` - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - OpenStdin?: boolean; - /** - * Mount the container's root filesystem as read only. - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - ReadOnly?: boolean; - /** - * Specification for mounts to be added to containers created as part - * of the service. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Mounts?: Array; - /** - * Signal to stop the container. - * @type {string} - * @memberof TaskSpecContainerSpec - */ - StopSignal?: string; - /** - * Amount of time to wait for the container to terminate before - * forcefully killing it. - * - * @type {number} - * @memberof TaskSpecContainerSpec - */ - StopGracePeriod?: number; - /** - * - * @type {HealthConfig} - * @memberof TaskSpecContainerSpec - */ - HealthCheck?: HealthConfig; - /** - * A list of hostname/IP mappings to add to the container's `hosts` - * file. The format of extra hosts is specified in the - * [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) - * man page: - * - * IP_address canonical_hostname [aliases...] - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Hosts?: Array; - /** - * - * @type {TaskSpecContainerSpecDNSConfig} - * @memberof TaskSpecContainerSpec - */ - DNSConfig?: TaskSpecContainerSpecDNSConfig; - /** - * Secrets contains references to zero or more secrets that will be - * exposed to the service. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Secrets?: Array; - /** - * Configs contains references to zero or more configs that will be - * exposed to the service. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Configs?: Array; - /** - * Isolation technology of the containers running the service. - * (Windows only) - * - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Isolation?: TaskSpecContainerSpecIsolationEnum; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - Init?: boolean | null; - /** - * Set kernel namedspaced parameters (sysctls) in the container. - * The Sysctls option on services accepts the same sysctls as the - * are supported on containers. Note that while the same sysctls are - * supported, no guarantees or checks are made about their - * suitability for a clustered environment, and it's up to the user - * to determine whether a given sysctl will work properly in a - * Service. - * - * @type {{ [key: string]: string; }} - * @memberof TaskSpecContainerSpec - */ - Sysctls?: { [key: string]: string }; - /** - * A list of kernel capabilities to add to the default set - * for the container. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - CapabilityAdd?: Array; - /** - * A list of kernel capabilities to drop from the default set - * for the container. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - CapabilityDrop?: Array; - /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Ulimits?: Array; + /** + * The image name to use for the container + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Image?: string; + /** + * User-defined key/value data. + * @type {{ [key: string]: string; }} + * @memberof TaskSpecContainerSpec + */ + Labels?: { [key: string]: string; }; + /** + * The command to be run in the image. + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Command?: Array; + /** + * Arguments to the command. + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Args?: Array; + /** + * The hostname to use for the container, as a valid + * [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + * + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Hostname?: string; + /** + * A list of environment variables in the form `VAR=value`. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Env?: Array; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Dir?: string; + /** + * The user inside the container. + * @type {string} + * @memberof TaskSpecContainerSpec + */ + User?: string; + /** + * A list of additional groups that the container process will run as. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Groups?: Array; + /** + * + * @type {TaskSpecContainerSpecPrivileges} + * @memberof TaskSpecContainerSpec + */ + Privileges?: TaskSpecContainerSpecPrivileges; + /** + * Whether a pseudo-TTY should be allocated. + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + TTY?: boolean; + /** + * Open `stdin` + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + OpenStdin?: boolean; + /** + * Mount the container's root filesystem as read only. + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + ReadOnly?: boolean; + /** + * Specification for mounts to be added to containers created as part + * of the service. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Mounts?: Array; + /** + * Signal to stop the container. + * @type {string} + * @memberof TaskSpecContainerSpec + */ + StopSignal?: string; + /** + * Amount of time to wait for the container to terminate before + * forcefully killing it. + * + * @type {number} + * @memberof TaskSpecContainerSpec + */ + StopGracePeriod?: number; + /** + * + * @type {HealthConfig} + * @memberof TaskSpecContainerSpec + */ + HealthCheck?: HealthConfig; + /** + * A list of hostname/IP mappings to add to the container's `hosts` + * file. The format of extra hosts is specified in the + * [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + * man page: + * + * IP_address canonical_hostname [aliases...] + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Hosts?: Array; + /** + * + * @type {TaskSpecContainerSpecDNSConfig} + * @memberof TaskSpecContainerSpec + */ + DNSConfig?: TaskSpecContainerSpecDNSConfig; + /** + * Secrets contains references to zero or more secrets that will be + * exposed to the service. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Secrets?: Array; + /** + * Configs contains references to zero or more configs that will be + * exposed to the service. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Configs?: Array; + /** + * Isolation technology of the containers running the service. + * (Windows only) + * + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Isolation?: TaskSpecContainerSpecIsolationEnum; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + Init?: boolean | null; + /** + * Set kernel namedspaced parameters (sysctls) in the container. + * The Sysctls option on services accepts the same sysctls as the + * are supported on containers. Note that while the same sysctls are + * supported, no guarantees or checks are made about their + * suitability for a clustered environment, and it's up to the user + * to determine whether a given sysctl will work properly in a + * Service. + * + * @type {{ [key: string]: string; }} + * @memberof TaskSpecContainerSpec + */ + Sysctls?: { [key: string]: string; }; + /** + * A list of kernel capabilities to add to the default set + * for the container. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + CapabilityAdd?: Array; + /** + * A list of kernel capabilities to drop from the default set + * for the container. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + CapabilityDrop?: Array; + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Ulimits?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum TaskSpecContainerSpecIsolationEnum { - Default = "default", - Process = "process", - Hyperv = "hyperv", + Default = 'default', + Process = 'process', + Hyperv = 'hyperv' } + /** * Check if a given object implements the TaskSpecContainerSpec interface. */ export function instanceOfTaskSpecContainerSpec(value: object): value is TaskSpecContainerSpec { - return true; + return true; } export function TaskSpecContainerSpecFromJSON(json: any): TaskSpecContainerSpec { - return TaskSpecContainerSpecFromJSONTyped(json, false); + return TaskSpecContainerSpecFromJSONTyped(json, false); } -export function TaskSpecContainerSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpec { - if (json == null) { - return json; - } - return { - Image: json["Image"] == null ? undefined : json["Image"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - Command: json["Command"] == null ? undefined : json["Command"], - Args: json["Args"] == null ? undefined : json["Args"], - Hostname: json["Hostname"] == null ? undefined : json["Hostname"], - Env: json["Env"] == null ? undefined : json["Env"], - Dir: json["Dir"] == null ? undefined : json["Dir"], - User: json["User"] == null ? undefined : json["User"], - Groups: json["Groups"] == null ? undefined : json["Groups"], - Privileges: - json["Privileges"] == null - ? undefined - : TaskSpecContainerSpecPrivilegesFromJSON(json["Privileges"]), - TTY: json["TTY"] == null ? undefined : json["TTY"], - OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], - ReadOnly: json["ReadOnly"] == null ? undefined : json["ReadOnly"], - Mounts: json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountFromJSON), - StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], - StopGracePeriod: json["StopGracePeriod"] == null ? undefined : json["StopGracePeriod"], - HealthCheck: - json["HealthCheck"] == null ? undefined : HealthConfigFromJSON(json["HealthCheck"]), - Hosts: json["Hosts"] == null ? undefined : json["Hosts"], - DNSConfig: - json["DNSConfig"] == null - ? undefined - : TaskSpecContainerSpecDNSConfigFromJSON(json["DNSConfig"]), - Secrets: - json["Secrets"] == null - ? undefined - : (json["Secrets"] as Array).map(TaskSpecContainerSpecSecretsInnerFromJSON), - Configs: - json["Configs"] == null - ? undefined - : (json["Configs"] as Array).map(TaskSpecContainerSpecConfigsInnerFromJSON), - Isolation: json["Isolation"] == null ? undefined : json["Isolation"], - Init: json["Init"] == null ? undefined : json["Init"], - Sysctls: json["Sysctls"] == null ? undefined : json["Sysctls"], - CapabilityAdd: json["CapabilityAdd"] == null ? undefined : json["CapabilityAdd"], - CapabilityDrop: json["CapabilityDrop"] == null ? undefined : json["CapabilityDrop"], - Ulimits: - json["Ulimits"] == null - ? undefined - : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), - }; +export function TaskSpecContainerSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpec { + if (json == null) { + return json; + } + return { + + 'Image': json['Image'] == null ? undefined : json['Image'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'Command': json['Command'] == null ? undefined : json['Command'], + 'Args': json['Args'] == null ? undefined : json['Args'], + 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], + 'Env': json['Env'] == null ? undefined : json['Env'], + 'Dir': json['Dir'] == null ? undefined : json['Dir'], + 'User': json['User'] == null ? undefined : json['User'], + 'Groups': json['Groups'] == null ? undefined : json['Groups'], + 'Privileges': json['Privileges'] == null ? undefined : TaskSpecContainerSpecPrivilegesFromJSON(json['Privileges']), + 'TTY': json['TTY'] == null ? undefined : json['TTY'], + 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], + 'ReadOnly': json['ReadOnly'] == null ? undefined : json['ReadOnly'], + 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountFromJSON)), + 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], + 'StopGracePeriod': json['StopGracePeriod'] == null ? undefined : json['StopGracePeriod'], + 'HealthCheck': json['HealthCheck'] == null ? undefined : HealthConfigFromJSON(json['HealthCheck']), + 'Hosts': json['Hosts'] == null ? undefined : json['Hosts'], + 'DNSConfig': json['DNSConfig'] == null ? undefined : TaskSpecContainerSpecDNSConfigFromJSON(json['DNSConfig']), + 'Secrets': json['Secrets'] == null ? undefined : ((json['Secrets'] as Array).map(TaskSpecContainerSpecSecretsInnerFromJSON)), + 'Configs': json['Configs'] == null ? undefined : ((json['Configs'] as Array).map(TaskSpecContainerSpecConfigsInnerFromJSON)), + 'Isolation': json['Isolation'] == null ? undefined : json['Isolation'], + 'Init': json['Init'] == null ? undefined : json['Init'], + 'Sysctls': json['Sysctls'] == null ? undefined : json['Sysctls'], + 'CapabilityAdd': json['CapabilityAdd'] == null ? undefined : json['CapabilityAdd'], + 'CapabilityDrop': json['CapabilityDrop'] == null ? undefined : json['CapabilityDrop'], + 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), + }; } export function TaskSpecContainerSpecToJSON(json: any): TaskSpecContainerSpec { - return TaskSpecContainerSpecToJSONTyped(json, false); + return TaskSpecContainerSpecToJSONTyped(json, false); } -export function TaskSpecContainerSpecToJSONTyped( - value?: TaskSpecContainerSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecToJSONTyped(value?: TaskSpecContainerSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Image: value["Image"], - Labels: value["Labels"], - Command: value["Command"], - Args: value["Args"], - Hostname: value["Hostname"], - Env: value["Env"], - Dir: value["Dir"], - User: value["User"], - Groups: value["Groups"], - Privileges: TaskSpecContainerSpecPrivilegesToJSON(value["Privileges"]), - TTY: value["TTY"], - OpenStdin: value["OpenStdin"], - ReadOnly: value["ReadOnly"], - Mounts: value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountToJSON), - StopSignal: value["StopSignal"], - StopGracePeriod: value["StopGracePeriod"], - HealthCheck: HealthConfigToJSON(value["HealthCheck"]), - Hosts: value["Hosts"], - DNSConfig: TaskSpecContainerSpecDNSConfigToJSON(value["DNSConfig"]), - Secrets: - value["Secrets"] == null - ? undefined - : (value["Secrets"] as Array).map(TaskSpecContainerSpecSecretsInnerToJSON), - Configs: - value["Configs"] == null - ? undefined - : (value["Configs"] as Array).map(TaskSpecContainerSpecConfigsInnerToJSON), - Isolation: value["Isolation"], - Init: value["Init"], - Sysctls: value["Sysctls"], - CapabilityAdd: value["CapabilityAdd"], - CapabilityDrop: value["CapabilityDrop"], - Ulimits: - value["Ulimits"] == null - ? undefined - : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), - }; + return { + + 'Image': value['Image'], + 'Labels': value['Labels'], + 'Command': value['Command'], + 'Args': value['Args'], + 'Hostname': value['Hostname'], + 'Env': value['Env'], + 'Dir': value['Dir'], + 'User': value['User'], + 'Groups': value['Groups'], + 'Privileges': TaskSpecContainerSpecPrivilegesToJSON(value['Privileges']), + 'TTY': value['TTY'], + 'OpenStdin': value['OpenStdin'], + 'ReadOnly': value['ReadOnly'], + 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountToJSON)), + 'StopSignal': value['StopSignal'], + 'StopGracePeriod': value['StopGracePeriod'], + 'HealthCheck': HealthConfigToJSON(value['HealthCheck']), + 'Hosts': value['Hosts'], + 'DNSConfig': TaskSpecContainerSpecDNSConfigToJSON(value['DNSConfig']), + 'Secrets': value['Secrets'] == null ? undefined : ((value['Secrets'] as Array).map(TaskSpecContainerSpecSecretsInnerToJSON)), + 'Configs': value['Configs'] == null ? undefined : ((value['Configs'] as Array).map(TaskSpecContainerSpecConfigsInnerToJSON)), + 'Isolation': value['Isolation'], + 'Init': value['Init'], + 'Sysctls': value['Sysctls'], + 'CapabilityAdd': value['CapabilityAdd'], + 'CapabilityDrop': value['CapabilityDrop'], + 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts b/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts index 74126afc92..4f04bb363c 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts @@ -2,120 +2,108 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TaskSpecContainerSpecConfigsInnerFile } from "./TaskSpecContainerSpecConfigsInnerFile"; +import { mapValues } from '../runtime'; +import type { TaskSpecContainerSpecConfigsInnerFile } from './TaskSpecContainerSpecConfigsInnerFile'; import { - TaskSpecContainerSpecConfigsInnerFileFromJSON, - TaskSpecContainerSpecConfigsInnerFileFromJSONTyped, - TaskSpecContainerSpecConfigsInnerFileToJSON, - TaskSpecContainerSpecConfigsInnerFileToJSONTyped, -} from "./TaskSpecContainerSpecConfigsInnerFile"; + TaskSpecContainerSpecConfigsInnerFileFromJSON, + TaskSpecContainerSpecConfigsInnerFileFromJSONTyped, + TaskSpecContainerSpecConfigsInnerFileToJSON, + TaskSpecContainerSpecConfigsInnerFileToJSONTyped, +} from './TaskSpecContainerSpecConfigsInnerFile'; /** - * + * * @export * @interface TaskSpecContainerSpecConfigsInner */ export interface TaskSpecContainerSpecConfigsInner { - /** - * - * @type {TaskSpecContainerSpecConfigsInnerFile} - * @memberof TaskSpecContainerSpecConfigsInner - */ - File?: TaskSpecContainerSpecConfigsInnerFile; - /** - * Runtime represents a target that is not mounted into the - * container but is used by the task - * - *


- * - * > **Note**: `Configs.File` and `Configs.Runtime` are mutually - * > exclusive - * - * @type {object} - * @memberof TaskSpecContainerSpecConfigsInner - */ - Runtime?: object; - /** - * ConfigID represents the ID of the specific config that we're - * referencing. - * - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInner - */ - ConfigID?: string; - /** - * ConfigName is the name of the config that this references, - * but this is just provided for lookup/display purposes. The - * config in the reference will be identified by its ID. - * - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInner - */ - ConfigName?: string; + /** + * + * @type {TaskSpecContainerSpecConfigsInnerFile} + * @memberof TaskSpecContainerSpecConfigsInner + */ + File?: TaskSpecContainerSpecConfigsInnerFile; + /** + * Runtime represents a target that is not mounted into the + * container but is used by the task + * + *


+ * + * > **Note**: `Configs.File` and `Configs.Runtime` are mutually + * > exclusive + * + * @type {object} + * @memberof TaskSpecContainerSpecConfigsInner + */ + Runtime?: object; + /** + * ConfigID represents the ID of the specific config that we're + * referencing. + * + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInner + */ + ConfigID?: string; + /** + * ConfigName is the name of the config that this references, + * but this is just provided for lookup/display purposes. The + * config in the reference will be identified by its ID. + * + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInner + */ + ConfigName?: string; } /** * Check if a given object implements the TaskSpecContainerSpecConfigsInner interface. */ -export function instanceOfTaskSpecContainerSpecConfigsInner( - value: object, -): value is TaskSpecContainerSpecConfigsInner { - return true; +export function instanceOfTaskSpecContainerSpecConfigsInner(value: object): value is TaskSpecContainerSpecConfigsInner { + return true; } -export function TaskSpecContainerSpecConfigsInnerFromJSON( - json: any, -): TaskSpecContainerSpecConfigsInner { - return TaskSpecContainerSpecConfigsInnerFromJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerFromJSON(json: any): TaskSpecContainerSpecConfigsInner { + return TaskSpecContainerSpecConfigsInnerFromJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecConfigsInner { - if (json == null) { - return json; - } - return { - File: - json["File"] == null - ? undefined - : TaskSpecContainerSpecConfigsInnerFileFromJSON(json["File"]), - Runtime: json["Runtime"] == null ? undefined : json["Runtime"], - ConfigID: json["ConfigID"] == null ? undefined : json["ConfigID"], - ConfigName: json["ConfigName"] == null ? undefined : json["ConfigName"], - }; +export function TaskSpecContainerSpecConfigsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecConfigsInner { + if (json == null) { + return json; + } + return { + + 'File': json['File'] == null ? undefined : TaskSpecContainerSpecConfigsInnerFileFromJSON(json['File']), + 'Runtime': json['Runtime'] == null ? undefined : json['Runtime'], + 'ConfigID': json['ConfigID'] == null ? undefined : json['ConfigID'], + 'ConfigName': json['ConfigName'] == null ? undefined : json['ConfigName'], + }; } -export function TaskSpecContainerSpecConfigsInnerToJSON( - json: any, -): TaskSpecContainerSpecConfigsInner { - return TaskSpecContainerSpecConfigsInnerToJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerToJSON(json: any): TaskSpecContainerSpecConfigsInner { + return TaskSpecContainerSpecConfigsInnerToJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerToJSONTyped( - value?: TaskSpecContainerSpecConfigsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecConfigsInnerToJSONTyped(value?: TaskSpecContainerSpecConfigsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - File: TaskSpecContainerSpecConfigsInnerFileToJSON(value["File"]), - Runtime: value["Runtime"], - ConfigID: value["ConfigID"], - ConfigName: value["ConfigName"], - }; + return { + + 'File': TaskSpecContainerSpecConfigsInnerFileToJSON(value['File']), + 'Runtime': value['Runtime'], + 'ConfigID': value['ConfigID'], + 'ConfigName': value['ConfigName'], + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts b/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts index 22cc8fb1c4..e95cd10357 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts @@ -2,103 +2,94 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * File represents a specific target that is backed by a file. - * + * *


- * + * * > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive - * + * * @export * @interface TaskSpecContainerSpecConfigsInnerFile */ export interface TaskSpecContainerSpecConfigsInnerFile { - /** - * Name represents the final filename in the filesystem. - * - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - Name?: string; - /** - * UID represents the file UID. - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - UID?: string; - /** - * GID represents the file GID. - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - GID?: string; - /** - * Mode represents the FileMode of the file. - * @type {number} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - Mode?: number; + /** + * Name represents the final filename in the filesystem. + * + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + Name?: string; + /** + * UID represents the file UID. + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + UID?: string; + /** + * GID represents the file GID. + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + GID?: string; + /** + * Mode represents the FileMode of the file. + * @type {number} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + Mode?: number; } /** * Check if a given object implements the TaskSpecContainerSpecConfigsInnerFile interface. */ -export function instanceOfTaskSpecContainerSpecConfigsInnerFile( - value: object, -): value is TaskSpecContainerSpecConfigsInnerFile { - return true; +export function instanceOfTaskSpecContainerSpecConfigsInnerFile(value: object): value is TaskSpecContainerSpecConfigsInnerFile { + return true; } -export function TaskSpecContainerSpecConfigsInnerFileFromJSON( - json: any, -): TaskSpecContainerSpecConfigsInnerFile { - return TaskSpecContainerSpecConfigsInnerFileFromJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerFileFromJSON(json: any): TaskSpecContainerSpecConfigsInnerFile { + return TaskSpecContainerSpecConfigsInnerFileFromJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerFileFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecConfigsInnerFile { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - UID: json["UID"] == null ? undefined : json["UID"], - GID: json["GID"] == null ? undefined : json["GID"], - Mode: json["Mode"] == null ? undefined : json["Mode"], - }; +export function TaskSpecContainerSpecConfigsInnerFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecConfigsInnerFile { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'UID': json['UID'] == null ? undefined : json['UID'], + 'GID': json['GID'] == null ? undefined : json['GID'], + 'Mode': json['Mode'] == null ? undefined : json['Mode'], + }; } -export function TaskSpecContainerSpecConfigsInnerFileToJSON( - json: any, -): TaskSpecContainerSpecConfigsInnerFile { - return TaskSpecContainerSpecConfigsInnerFileToJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerFileToJSON(json: any): TaskSpecContainerSpecConfigsInnerFile { + return TaskSpecContainerSpecConfigsInnerFileToJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerFileToJSONTyped( - value?: TaskSpecContainerSpecConfigsInnerFile | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecConfigsInnerFileToJSONTyped(value?: TaskSpecContainerSpecConfigsInnerFile | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - UID: value["UID"], - GID: value["GID"], - Mode: value["Mode"], - }; + return { + + 'Name': value['Name'], + 'UID': value['UID'], + 'GID': value['GID'], + 'Mode': value['Mode'], + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts b/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts index 95cf9169fd..1b1f45f010 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts @@ -2,89 +2,84 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Specification for DNS related configurations in resolver configuration * file (`resolv.conf`). - * + * * @export * @interface TaskSpecContainerSpecDNSConfig */ export interface TaskSpecContainerSpecDNSConfig { - /** - * The IP addresses of the name servers. - * @type {Array} - * @memberof TaskSpecContainerSpecDNSConfig - */ - Nameservers?: Array; - /** - * A search list for host-name lookup. - * @type {Array} - * @memberof TaskSpecContainerSpecDNSConfig - */ - Search?: Array; - /** - * A list of internal resolver variables to be modified (e.g., - * `debug`, `ndots:3`, etc.). - * - * @type {Array} - * @memberof TaskSpecContainerSpecDNSConfig - */ - Options?: Array; + /** + * The IP addresses of the name servers. + * @type {Array} + * @memberof TaskSpecContainerSpecDNSConfig + */ + Nameservers?: Array; + /** + * A search list for host-name lookup. + * @type {Array} + * @memberof TaskSpecContainerSpecDNSConfig + */ + Search?: Array; + /** + * A list of internal resolver variables to be modified (e.g., + * `debug`, `ndots:3`, etc.). + * + * @type {Array} + * @memberof TaskSpecContainerSpecDNSConfig + */ + Options?: Array; } /** * Check if a given object implements the TaskSpecContainerSpecDNSConfig interface. */ -export function instanceOfTaskSpecContainerSpecDNSConfig( - value: object, -): value is TaskSpecContainerSpecDNSConfig { - return true; +export function instanceOfTaskSpecContainerSpecDNSConfig(value: object): value is TaskSpecContainerSpecDNSConfig { + return true; } export function TaskSpecContainerSpecDNSConfigFromJSON(json: any): TaskSpecContainerSpecDNSConfig { - return TaskSpecContainerSpecDNSConfigFromJSONTyped(json, false); + return TaskSpecContainerSpecDNSConfigFromJSONTyped(json, false); } -export function TaskSpecContainerSpecDNSConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecDNSConfig { - if (json == null) { - return json; - } - return { - Nameservers: json["Nameservers"] == null ? undefined : json["Nameservers"], - Search: json["Search"] == null ? undefined : json["Search"], - Options: json["Options"] == null ? undefined : json["Options"], - }; +export function TaskSpecContainerSpecDNSConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecDNSConfig { + if (json == null) { + return json; + } + return { + + 'Nameservers': json['Nameservers'] == null ? undefined : json['Nameservers'], + 'Search': json['Search'] == null ? undefined : json['Search'], + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function TaskSpecContainerSpecDNSConfigToJSON(json: any): TaskSpecContainerSpecDNSConfig { - return TaskSpecContainerSpecDNSConfigToJSONTyped(json, false); + return TaskSpecContainerSpecDNSConfigToJSONTyped(json, false); } -export function TaskSpecContainerSpecDNSConfigToJSONTyped( - value?: TaskSpecContainerSpecDNSConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecDNSConfigToJSONTyped(value?: TaskSpecContainerSpecDNSConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Nameservers: value["Nameservers"], - Search: value["Search"], - Options: value["Options"], - }; + return { + + 'Nameservers': value['Nameservers'], + 'Search': value['Search'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts b/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts index 0722278d47..11e8c91b77 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TaskSpecContainerSpecPrivilegesCredentialSpec } from "./TaskSpecContainerSpecPrivilegesCredentialSpec"; +import { mapValues } from '../runtime'; +import type { TaskSpecContainerSpecPrivilegesCredentialSpec } from './TaskSpecContainerSpecPrivilegesCredentialSpec'; import { - TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON, - TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped, - TaskSpecContainerSpecPrivilegesCredentialSpecToJSON, - TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped, -} from "./TaskSpecContainerSpecPrivilegesCredentialSpec"; -import type { TaskSpecContainerSpecPrivilegesSELinuxContext } from "./TaskSpecContainerSpecPrivilegesSELinuxContext"; + TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON, + TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped, + TaskSpecContainerSpecPrivilegesCredentialSpecToJSON, + TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped, +} from './TaskSpecContainerSpecPrivilegesCredentialSpec'; +import type { TaskSpecContainerSpecPrivilegesSELinuxContext } from './TaskSpecContainerSpecPrivilegesSELinuxContext'; import { - TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON, - TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped, - TaskSpecContainerSpecPrivilegesSELinuxContextToJSON, - TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped, -} from "./TaskSpecContainerSpecPrivilegesSELinuxContext"; + TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON, + TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped, + TaskSpecContainerSpecPrivilegesSELinuxContextToJSON, + TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped, +} from './TaskSpecContainerSpecPrivilegesSELinuxContext'; /** * Security options for the container @@ -34,68 +34,55 @@ import { * @interface TaskSpecContainerSpecPrivileges */ export interface TaskSpecContainerSpecPrivileges { - /** - * - * @type {TaskSpecContainerSpecPrivilegesCredentialSpec} - * @memberof TaskSpecContainerSpecPrivileges - */ - CredentialSpec?: TaskSpecContainerSpecPrivilegesCredentialSpec; - /** - * - * @type {TaskSpecContainerSpecPrivilegesSELinuxContext} - * @memberof TaskSpecContainerSpecPrivileges - */ - SELinuxContext?: TaskSpecContainerSpecPrivilegesSELinuxContext; + /** + * + * @type {TaskSpecContainerSpecPrivilegesCredentialSpec} + * @memberof TaskSpecContainerSpecPrivileges + */ + CredentialSpec?: TaskSpecContainerSpecPrivilegesCredentialSpec; + /** + * + * @type {TaskSpecContainerSpecPrivilegesSELinuxContext} + * @memberof TaskSpecContainerSpecPrivileges + */ + SELinuxContext?: TaskSpecContainerSpecPrivilegesSELinuxContext; } /** * Check if a given object implements the TaskSpecContainerSpecPrivileges interface. */ -export function instanceOfTaskSpecContainerSpecPrivileges( - value: object, -): value is TaskSpecContainerSpecPrivileges { - return true; +export function instanceOfTaskSpecContainerSpecPrivileges(value: object): value is TaskSpecContainerSpecPrivileges { + return true; } -export function TaskSpecContainerSpecPrivilegesFromJSON( - json: any, -): TaskSpecContainerSpecPrivileges { - return TaskSpecContainerSpecPrivilegesFromJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesFromJSON(json: any): TaskSpecContainerSpecPrivileges { + return TaskSpecContainerSpecPrivilegesFromJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecPrivileges { - if (json == null) { - return json; - } - return { - CredentialSpec: - json["CredentialSpec"] == null - ? undefined - : TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON(json["CredentialSpec"]), - SELinuxContext: - json["SELinuxContext"] == null - ? undefined - : TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON(json["SELinuxContext"]), - }; +export function TaskSpecContainerSpecPrivilegesFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecPrivileges { + if (json == null) { + return json; + } + return { + + 'CredentialSpec': json['CredentialSpec'] == null ? undefined : TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON(json['CredentialSpec']), + 'SELinuxContext': json['SELinuxContext'] == null ? undefined : TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON(json['SELinuxContext']), + }; } export function TaskSpecContainerSpecPrivilegesToJSON(json: any): TaskSpecContainerSpecPrivileges { - return TaskSpecContainerSpecPrivilegesToJSONTyped(json, false); + return TaskSpecContainerSpecPrivilegesToJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesToJSONTyped( - value?: TaskSpecContainerSpecPrivileges | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecPrivilegesToJSONTyped(value?: TaskSpecContainerSpecPrivileges | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - CredentialSpec: TaskSpecContainerSpecPrivilegesCredentialSpecToJSON(value["CredentialSpec"]), - SELinuxContext: TaskSpecContainerSpecPrivilegesSELinuxContextToJSON(value["SELinuxContext"]), - }; + return { + + 'CredentialSpec': TaskSpecContainerSpecPrivilegesCredentialSpecToJSON(value['CredentialSpec']), + 'SELinuxContext': TaskSpecContainerSpecPrivilegesSELinuxContextToJSON(value['SELinuxContext']), + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts index b8a2d67b45..d813be4c4c 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts @@ -2,120 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * CredentialSpec for managed service account (Windows only) * @export * @interface TaskSpecContainerSpecPrivilegesCredentialSpec */ export interface TaskSpecContainerSpecPrivilegesCredentialSpec { - /** - * Load credential spec from a Swarm Config with the given ID. - * The specified config must also be present in the Configs - * field with the Runtime property set. - * - *


- * - * - * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, - * > and `CredentialSpec.Config` are mutually exclusive. - * - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec - */ - Config?: string; - /** - * Load credential spec from this file. The file is read by - * the daemon, and must be present in the `CredentialSpecs` - * subdirectory in the docker data directory, which defaults - * to `C:\ProgramData\Docker\` on Windows. - * - * For example, specifying `spec.json` loads - * `C:\ProgramData\Docker\CredentialSpecs\spec.json`. - * - *


- * - * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, - * > and `CredentialSpec.Config` are mutually exclusive. - * - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec - */ - File?: string; - /** - * Load credential spec from this value in the Windows - * registry. The specified registry value must be located in: - * - * `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` - * - *


- * - * - * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, - * > and `CredentialSpec.Config` are mutually exclusive. - * - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec - */ - Registry?: string; + /** + * Load credential spec from a Swarm Config with the given ID. + * The specified config must also be present in the Configs + * field with the Runtime property set. + * + *


+ * + * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + * + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec + */ + Config?: string; + /** + * Load credential spec from this file. The file is read by + * the daemon, and must be present in the `CredentialSpecs` + * subdirectory in the docker data directory, which defaults + * to `C:\ProgramData\Docker\` on Windows. + * + * For example, specifying `spec.json` loads + * `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + * + *


+ * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + * + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec + */ + File?: string; + /** + * Load credential spec from this value in the Windows + * registry. The specified registry value must be located in: + * + * `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + * + *


+ * + * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + * + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec + */ + Registry?: string; } /** * Check if a given object implements the TaskSpecContainerSpecPrivilegesCredentialSpec interface. */ -export function instanceOfTaskSpecContainerSpecPrivilegesCredentialSpec( - value: object, -): value is TaskSpecContainerSpecPrivilegesCredentialSpec { - return true; +export function instanceOfTaskSpecContainerSpecPrivilegesCredentialSpec(value: object): value is TaskSpecContainerSpecPrivilegesCredentialSpec { + return true; } -export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON( - json: any, -): TaskSpecContainerSpecPrivilegesCredentialSpec { - return TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON(json: any): TaskSpecContainerSpecPrivilegesCredentialSpec { + return TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecPrivilegesCredentialSpec { - if (json == null) { - return json; - } - return { - Config: json["Config"] == null ? undefined : json["Config"], - File: json["File"] == null ? undefined : json["File"], - Registry: json["Registry"] == null ? undefined : json["Registry"], - }; +export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecPrivilegesCredentialSpec { + if (json == null) { + return json; + } + return { + + 'Config': json['Config'] == null ? undefined : json['Config'], + 'File': json['File'] == null ? undefined : json['File'], + 'Registry': json['Registry'] == null ? undefined : json['Registry'], + }; } -export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSON( - json: any, -): TaskSpecContainerSpecPrivilegesCredentialSpec { - return TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSON(json: any): TaskSpecContainerSpecPrivilegesCredentialSpec { + return TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped( - value?: TaskSpecContainerSpecPrivilegesCredentialSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped(value?: TaskSpecContainerSpecPrivilegesCredentialSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Config: value["Config"], - File: value["File"], - Registry: value["Registry"], - }; + return { + + 'Config': value['Config'], + 'File': value['File'], + 'Registry': value['Registry'], + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts index 38d3b218c7..7da1e22368 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts @@ -2,105 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * SELinux labels of the container * @export * @interface TaskSpecContainerSpecPrivilegesSELinuxContext */ export interface TaskSpecContainerSpecPrivilegesSELinuxContext { - /** - * Disable SELinux - * @type {boolean} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Disable?: boolean; - /** - * SELinux user label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - User?: string; - /** - * SELinux role label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Role?: string; - /** - * SELinux type label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Type?: string; - /** - * SELinux level label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Level?: string; + /** + * Disable SELinux + * @type {boolean} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Disable?: boolean; + /** + * SELinux user label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + User?: string; + /** + * SELinux role label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Role?: string; + /** + * SELinux type label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Type?: string; + /** + * SELinux level label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Level?: string; } /** * Check if a given object implements the TaskSpecContainerSpecPrivilegesSELinuxContext interface. */ -export function instanceOfTaskSpecContainerSpecPrivilegesSELinuxContext( - value: object, -): value is TaskSpecContainerSpecPrivilegesSELinuxContext { - return true; +export function instanceOfTaskSpecContainerSpecPrivilegesSELinuxContext(value: object): value is TaskSpecContainerSpecPrivilegesSELinuxContext { + return true; } -export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON( - json: any, -): TaskSpecContainerSpecPrivilegesSELinuxContext { - return TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON(json: any): TaskSpecContainerSpecPrivilegesSELinuxContext { + return TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecPrivilegesSELinuxContext { - if (json == null) { - return json; - } - return { - Disable: json["Disable"] == null ? undefined : json["Disable"], - User: json["User"] == null ? undefined : json["User"], - Role: json["Role"] == null ? undefined : json["Role"], - Type: json["Type"] == null ? undefined : json["Type"], - Level: json["Level"] == null ? undefined : json["Level"], - }; +export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecPrivilegesSELinuxContext { + if (json == null) { + return json; + } + return { + + 'Disable': json['Disable'] == null ? undefined : json['Disable'], + 'User': json['User'] == null ? undefined : json['User'], + 'Role': json['Role'] == null ? undefined : json['Role'], + 'Type': json['Type'] == null ? undefined : json['Type'], + 'Level': json['Level'] == null ? undefined : json['Level'], + }; } -export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSON( - json: any, -): TaskSpecContainerSpecPrivilegesSELinuxContext { - return TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSON(json: any): TaskSpecContainerSpecPrivilegesSELinuxContext { + return TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped( - value?: TaskSpecContainerSpecPrivilegesSELinuxContext | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped(value?: TaskSpecContainerSpecPrivilegesSELinuxContext | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Disable: value["Disable"], - User: value["User"], - Role: value["Role"], - Type: value["Type"], - Level: value["Level"], - }; + return { + + 'Disable': value['Disable'], + 'User': value['User'], + 'Role': value['Role'], + 'Type': value['Type'], + 'Level': value['Level'], + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts b/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts index 6d41046585..c582f3175c 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts @@ -2,105 +2,93 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TaskSpecContainerSpecSecretsInnerFile } from "./TaskSpecContainerSpecSecretsInnerFile"; +import { mapValues } from '../runtime'; +import type { TaskSpecContainerSpecSecretsInnerFile } from './TaskSpecContainerSpecSecretsInnerFile'; import { - TaskSpecContainerSpecSecretsInnerFileFromJSON, - TaskSpecContainerSpecSecretsInnerFileFromJSONTyped, - TaskSpecContainerSpecSecretsInnerFileToJSON, - TaskSpecContainerSpecSecretsInnerFileToJSONTyped, -} from "./TaskSpecContainerSpecSecretsInnerFile"; + TaskSpecContainerSpecSecretsInnerFileFromJSON, + TaskSpecContainerSpecSecretsInnerFileFromJSONTyped, + TaskSpecContainerSpecSecretsInnerFileToJSON, + TaskSpecContainerSpecSecretsInnerFileToJSONTyped, +} from './TaskSpecContainerSpecSecretsInnerFile'; /** - * + * * @export * @interface TaskSpecContainerSpecSecretsInner */ export interface TaskSpecContainerSpecSecretsInner { - /** - * - * @type {TaskSpecContainerSpecSecretsInnerFile} - * @memberof TaskSpecContainerSpecSecretsInner - */ - File?: TaskSpecContainerSpecSecretsInnerFile; - /** - * SecretID represents the ID of the specific secret that we're - * referencing. - * - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInner - */ - SecretID?: string; - /** - * SecretName is the name of the secret that this references, - * but this is just provided for lookup/display purposes. The - * secret in the reference will be identified by its ID. - * - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInner - */ - SecretName?: string; + /** + * + * @type {TaskSpecContainerSpecSecretsInnerFile} + * @memberof TaskSpecContainerSpecSecretsInner + */ + File?: TaskSpecContainerSpecSecretsInnerFile; + /** + * SecretID represents the ID of the specific secret that we're + * referencing. + * + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInner + */ + SecretID?: string; + /** + * SecretName is the name of the secret that this references, + * but this is just provided for lookup/display purposes. The + * secret in the reference will be identified by its ID. + * + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInner + */ + SecretName?: string; } /** * Check if a given object implements the TaskSpecContainerSpecSecretsInner interface. */ -export function instanceOfTaskSpecContainerSpecSecretsInner( - value: object, -): value is TaskSpecContainerSpecSecretsInner { - return true; +export function instanceOfTaskSpecContainerSpecSecretsInner(value: object): value is TaskSpecContainerSpecSecretsInner { + return true; } -export function TaskSpecContainerSpecSecretsInnerFromJSON( - json: any, -): TaskSpecContainerSpecSecretsInner { - return TaskSpecContainerSpecSecretsInnerFromJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerFromJSON(json: any): TaskSpecContainerSpecSecretsInner { + return TaskSpecContainerSpecSecretsInnerFromJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecSecretsInner { - if (json == null) { - return json; - } - return { - File: - json["File"] == null - ? undefined - : TaskSpecContainerSpecSecretsInnerFileFromJSON(json["File"]), - SecretID: json["SecretID"] == null ? undefined : json["SecretID"], - SecretName: json["SecretName"] == null ? undefined : json["SecretName"], - }; +export function TaskSpecContainerSpecSecretsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecSecretsInner { + if (json == null) { + return json; + } + return { + + 'File': json['File'] == null ? undefined : TaskSpecContainerSpecSecretsInnerFileFromJSON(json['File']), + 'SecretID': json['SecretID'] == null ? undefined : json['SecretID'], + 'SecretName': json['SecretName'] == null ? undefined : json['SecretName'], + }; } -export function TaskSpecContainerSpecSecretsInnerToJSON( - json: any, -): TaskSpecContainerSpecSecretsInner { - return TaskSpecContainerSpecSecretsInnerToJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerToJSON(json: any): TaskSpecContainerSpecSecretsInner { + return TaskSpecContainerSpecSecretsInnerToJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerToJSONTyped( - value?: TaskSpecContainerSpecSecretsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecSecretsInnerToJSONTyped(value?: TaskSpecContainerSpecSecretsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - File: TaskSpecContainerSpecSecretsInnerFileToJSON(value["File"]), - SecretID: value["SecretID"], - SecretName: value["SecretName"], - }; + return { + + 'File': TaskSpecContainerSpecSecretsInnerFileToJSON(value['File']), + 'SecretID': value['SecretID'], + 'SecretName': value['SecretName'], + }; } + diff --git a/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts b/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts index 2db4e16aeb..8e34e5efe0 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts @@ -2,99 +2,90 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * File represents a specific target that is backed by a file. - * + * * @export * @interface TaskSpecContainerSpecSecretsInnerFile */ export interface TaskSpecContainerSpecSecretsInnerFile { - /** - * Name represents the final filename in the filesystem. - * - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - Name?: string; - /** - * UID represents the file UID. - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - UID?: string; - /** - * GID represents the file GID. - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - GID?: string; - /** - * Mode represents the FileMode of the file. - * @type {number} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - Mode?: number; + /** + * Name represents the final filename in the filesystem. + * + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + Name?: string; + /** + * UID represents the file UID. + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + UID?: string; + /** + * GID represents the file GID. + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + GID?: string; + /** + * Mode represents the FileMode of the file. + * @type {number} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + Mode?: number; } /** * Check if a given object implements the TaskSpecContainerSpecSecretsInnerFile interface. */ -export function instanceOfTaskSpecContainerSpecSecretsInnerFile( - value: object, -): value is TaskSpecContainerSpecSecretsInnerFile { - return true; +export function instanceOfTaskSpecContainerSpecSecretsInnerFile(value: object): value is TaskSpecContainerSpecSecretsInnerFile { + return true; } -export function TaskSpecContainerSpecSecretsInnerFileFromJSON( - json: any, -): TaskSpecContainerSpecSecretsInnerFile { - return TaskSpecContainerSpecSecretsInnerFileFromJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerFileFromJSON(json: any): TaskSpecContainerSpecSecretsInnerFile { + return TaskSpecContainerSpecSecretsInnerFileFromJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerFileFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecContainerSpecSecretsInnerFile { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - UID: json["UID"] == null ? undefined : json["UID"], - GID: json["GID"] == null ? undefined : json["GID"], - Mode: json["Mode"] == null ? undefined : json["Mode"], - }; +export function TaskSpecContainerSpecSecretsInnerFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecSecretsInnerFile { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'UID': json['UID'] == null ? undefined : json['UID'], + 'GID': json['GID'] == null ? undefined : json['GID'], + 'Mode': json['Mode'] == null ? undefined : json['Mode'], + }; } -export function TaskSpecContainerSpecSecretsInnerFileToJSON( - json: any, -): TaskSpecContainerSpecSecretsInnerFile { - return TaskSpecContainerSpecSecretsInnerFileToJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerFileToJSON(json: any): TaskSpecContainerSpecSecretsInnerFile { + return TaskSpecContainerSpecSecretsInnerFileToJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerFileToJSONTyped( - value?: TaskSpecContainerSpecSecretsInnerFile | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecSecretsInnerFileToJSONTyped(value?: TaskSpecContainerSpecSecretsInnerFile | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - UID: value["UID"], - GID: value["GID"], - Mode: value["Mode"], - }; + return { + + 'Name': value['Name'], + 'UID': value['UID'], + 'GID': value['GID'], + 'Mode': value['Mode'], + }; } + diff --git a/src/clients/docker/models/TaskSpecLogDriver.ts b/src/clients/docker/models/TaskSpecLogDriver.ts index 8c6c46a665..accb6d702f 100644 --- a/src/clients/docker/models/TaskSpecLogDriver.ts +++ b/src/clients/docker/models/TaskSpecLogDriver.ts @@ -2,78 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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. - * + * * @export * @interface TaskSpecLogDriver */ export interface TaskSpecLogDriver { - /** - * - * @type {string} - * @memberof TaskSpecLogDriver - */ - Name?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof TaskSpecLogDriver - */ - Options?: { [key: string]: string }; + /** + * + * @type {string} + * @memberof TaskSpecLogDriver + */ + Name?: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof TaskSpecLogDriver + */ + Options?: { [key: string]: string; }; } /** * Check if a given object implements the TaskSpecLogDriver interface. */ export function instanceOfTaskSpecLogDriver(value: object): value is TaskSpecLogDriver { - return true; + return true; } export function TaskSpecLogDriverFromJSON(json: any): TaskSpecLogDriver { - return TaskSpecLogDriverFromJSONTyped(json, false); + return TaskSpecLogDriverFromJSONTyped(json, false); } -export function TaskSpecLogDriverFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecLogDriver { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Options: json["Options"] == null ? undefined : json["Options"], - }; +export function TaskSpecLogDriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecLogDriver { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Options': json['Options'] == null ? undefined : json['Options'], + }; } export function TaskSpecLogDriverToJSON(json: any): TaskSpecLogDriver { - return TaskSpecLogDriverToJSONTyped(json, false); + return TaskSpecLogDriverToJSONTyped(json, false); } -export function TaskSpecLogDriverToJSONTyped( - value?: TaskSpecLogDriver | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecLogDriverToJSONTyped(value?: TaskSpecLogDriver | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Options: value["Options"], - }; + return { + + 'Name': value['Name'], + 'Options': value['Options'], + }; } + diff --git a/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts b/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts index 424c82be67..67f704aad2 100644 --- a/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts +++ b/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts @@ -2,78 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * 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`. - * + * * @export * @interface TaskSpecNetworkAttachmentSpec */ export interface TaskSpecNetworkAttachmentSpec { - /** - * ID of the container represented by this task - * @type {string} - * @memberof TaskSpecNetworkAttachmentSpec - */ - ContainerID?: string; + /** + * ID of the container represented by this task + * @type {string} + * @memberof TaskSpecNetworkAttachmentSpec + */ + ContainerID?: string; } /** * Check if a given object implements the TaskSpecNetworkAttachmentSpec interface. */ -export function instanceOfTaskSpecNetworkAttachmentSpec( - value: object, -): value is TaskSpecNetworkAttachmentSpec { - return true; +export function instanceOfTaskSpecNetworkAttachmentSpec(value: object): value is TaskSpecNetworkAttachmentSpec { + return true; } export function TaskSpecNetworkAttachmentSpecFromJSON(json: any): TaskSpecNetworkAttachmentSpec { - return TaskSpecNetworkAttachmentSpecFromJSONTyped(json, false); + return TaskSpecNetworkAttachmentSpecFromJSONTyped(json, false); } -export function TaskSpecNetworkAttachmentSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecNetworkAttachmentSpec { - if (json == null) { - return json; - } - return { - ContainerID: json["ContainerID"] == null ? undefined : json["ContainerID"], - }; +export function TaskSpecNetworkAttachmentSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecNetworkAttachmentSpec { + if (json == null) { + return json; + } + return { + + 'ContainerID': json['ContainerID'] == null ? undefined : json['ContainerID'], + }; } export function TaskSpecNetworkAttachmentSpecToJSON(json: any): TaskSpecNetworkAttachmentSpec { - return TaskSpecNetworkAttachmentSpecToJSONTyped(json, false); + return TaskSpecNetworkAttachmentSpecToJSONTyped(json, false); } -export function TaskSpecNetworkAttachmentSpecToJSONTyped( - value?: TaskSpecNetworkAttachmentSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecNetworkAttachmentSpecToJSONTyped(value?: TaskSpecNetworkAttachmentSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ContainerID: value["ContainerID"], - }; + return { + + 'ContainerID': value['ContainerID'], + }; } + diff --git a/src/clients/docker/models/TaskSpecPlacement.ts b/src/clients/docker/models/TaskSpecPlacement.ts index ac23be9940..6bcfd6c073 100644 --- a/src/clients/docker/models/TaskSpecPlacement.ts +++ b/src/clients/docker/models/TaskSpecPlacement.ts @@ -2,146 +2,131 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TaskSpecPlacementPreferencesInner } from "./TaskSpecPlacementPreferencesInner"; +import { mapValues } from '../runtime'; +import type { TaskSpecPlacementPreferencesInner } from './TaskSpecPlacementPreferencesInner'; import { - TaskSpecPlacementPreferencesInnerFromJSON, - TaskSpecPlacementPreferencesInnerFromJSONTyped, - TaskSpecPlacementPreferencesInnerToJSON, - TaskSpecPlacementPreferencesInnerToJSONTyped, -} from "./TaskSpecPlacementPreferencesInner"; -import type { Platform } from "./Platform"; + TaskSpecPlacementPreferencesInnerFromJSON, + TaskSpecPlacementPreferencesInnerFromJSONTyped, + TaskSpecPlacementPreferencesInnerToJSON, + TaskSpecPlacementPreferencesInnerToJSONTyped, +} from './TaskSpecPlacementPreferencesInner'; +import type { Platform } from './Platform'; import { - PlatformFromJSON, - PlatformFromJSONTyped, - PlatformToJSON, - PlatformToJSONTyped, -} from "./Platform"; + PlatformFromJSON, + PlatformFromJSONTyped, + PlatformToJSON, + PlatformToJSONTyped, +} from './Platform'; /** - * + * * @export * @interface TaskSpecPlacement */ export interface TaskSpecPlacement { - /** - * An array of constraint expressions to limit the set of nodes where - * a task can be scheduled. Constraint expressions can either use a - * _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find - * nodes that satisfy every expression (AND match). Constraints can - * match node or Docker Engine labels as follows: - * - * node attribute | matches | example - * ---------------------|--------------------------------|----------------------------------------------- - * `node.id` | Node ID | `node.id==2ivku8v2gvtg4` - * `node.hostname` | Node hostname | `node.hostname!=node-2` - * `node.role` | Node role (`manager`/`worker`) | `node.role==manager` - * `node.platform.os` | Node operating system | `node.platform.os==windows` - * `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` - * `node.labels` | User-defined node labels | `node.labels.security==high` - * `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` - * - * `engine.labels` apply to Docker Engine labels like operating system, - * drivers, etc. Swarm administrators add `node.labels` for operational - * purposes by using the [`node update endpoint`](#operation/NodeUpdate). - * - * @type {Array} - * @memberof TaskSpecPlacement - */ - Constraints?: Array; - /** - * Preferences provide a way to make the scheduler aware of factors - * such as topology. They are provided in order from highest to - * lowest precedence. - * - * @type {Array} - * @memberof TaskSpecPlacement - */ - Preferences?: Array; - /** - * Maximum number of replicas for per node (default value is 0, which - * is unlimited) - * - * @type {number} - * @memberof TaskSpecPlacement - */ - MaxReplicas?: number; - /** - * Platforms stores all the platforms that the service's image can - * run on. This field is used in the platform filter for scheduling. - * If empty, then the platform filter is off, meaning there are no - * scheduling restrictions. - * - * @type {Array} - * @memberof TaskSpecPlacement - */ - Platforms?: Array; + /** + * An array of constraint expressions to limit the set of nodes where + * a task can be scheduled. Constraint expressions can either use a + * _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + * nodes that satisfy every expression (AND match). Constraints can + * match node or Docker Engine labels as follows: + * + * node attribute | matches | example + * ---------------------|--------------------------------|----------------------------------------------- + * `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + * `node.hostname` | Node hostname | `node.hostname!=node-2` + * `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + * `node.platform.os` | Node operating system | `node.platform.os==windows` + * `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + * `node.labels` | User-defined node labels | `node.labels.security==high` + * `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` + * + * `engine.labels` apply to Docker Engine labels like operating system, + * drivers, etc. Swarm administrators add `node.labels` for operational + * purposes by using the [`node update endpoint`](#operation/NodeUpdate). + * + * @type {Array} + * @memberof TaskSpecPlacement + */ + Constraints?: Array; + /** + * Preferences provide a way to make the scheduler aware of factors + * such as topology. They are provided in order from highest to + * lowest precedence. + * + * @type {Array} + * @memberof TaskSpecPlacement + */ + Preferences?: Array; + /** + * Maximum number of replicas for per node (default value is 0, which + * is unlimited) + * + * @type {number} + * @memberof TaskSpecPlacement + */ + MaxReplicas?: number; + /** + * Platforms stores all the platforms that the service's image can + * run on. This field is used in the platform filter for scheduling. + * If empty, then the platform filter is off, meaning there are no + * scheduling restrictions. + * + * @type {Array} + * @memberof TaskSpecPlacement + */ + Platforms?: Array; } /** * Check if a given object implements the TaskSpecPlacement interface. */ export function instanceOfTaskSpecPlacement(value: object): value is TaskSpecPlacement { - return true; + return true; } export function TaskSpecPlacementFromJSON(json: any): TaskSpecPlacement { - return TaskSpecPlacementFromJSONTyped(json, false); + return TaskSpecPlacementFromJSONTyped(json, false); } -export function TaskSpecPlacementFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecPlacement { - if (json == null) { - return json; - } - return { - Constraints: json["Constraints"] == null ? undefined : json["Constraints"], - Preferences: - json["Preferences"] == null - ? undefined - : (json["Preferences"] as Array).map(TaskSpecPlacementPreferencesInnerFromJSON), - MaxReplicas: json["MaxReplicas"] == null ? undefined : json["MaxReplicas"], - Platforms: - json["Platforms"] == null - ? undefined - : (json["Platforms"] as Array).map(PlatformFromJSON), - }; +export function TaskSpecPlacementFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPlacement { + if (json == null) { + return json; + } + return { + + 'Constraints': json['Constraints'] == null ? undefined : json['Constraints'], + 'Preferences': json['Preferences'] == null ? undefined : ((json['Preferences'] as Array).map(TaskSpecPlacementPreferencesInnerFromJSON)), + 'MaxReplicas': json['MaxReplicas'] == null ? undefined : json['MaxReplicas'], + 'Platforms': json['Platforms'] == null ? undefined : ((json['Platforms'] as Array).map(PlatformFromJSON)), + }; } export function TaskSpecPlacementToJSON(json: any): TaskSpecPlacement { - return TaskSpecPlacementToJSONTyped(json, false); + return TaskSpecPlacementToJSONTyped(json, false); } -export function TaskSpecPlacementToJSONTyped( - value?: TaskSpecPlacement | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecPlacementToJSONTyped(value?: TaskSpecPlacement | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Constraints: value["Constraints"], - Preferences: - value["Preferences"] == null - ? undefined - : (value["Preferences"] as Array).map(TaskSpecPlacementPreferencesInnerToJSON), - MaxReplicas: value["MaxReplicas"], - Platforms: - value["Platforms"] == null - ? undefined - : (value["Platforms"] as Array).map(PlatformToJSON), - }; + return { + + 'Constraints': value['Constraints'], + 'Preferences': value['Preferences'] == null ? undefined : ((value['Preferences'] as Array).map(TaskSpecPlacementPreferencesInnerToJSON)), + 'MaxReplicas': value['MaxReplicas'], + 'Platforms': value['Platforms'] == null ? undefined : ((value['Platforms'] as Array).map(PlatformToJSON)), + }; } + diff --git a/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts b/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts index 5ba85bf8d8..c6e8388bbf 100644 --- a/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts +++ b/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts @@ -2,84 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TaskSpecPlacementPreferencesInnerSpread } from "./TaskSpecPlacementPreferencesInnerSpread"; +import { mapValues } from '../runtime'; +import type { TaskSpecPlacementPreferencesInnerSpread } from './TaskSpecPlacementPreferencesInnerSpread'; import { - TaskSpecPlacementPreferencesInnerSpreadFromJSON, - TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped, - TaskSpecPlacementPreferencesInnerSpreadToJSON, - TaskSpecPlacementPreferencesInnerSpreadToJSONTyped, -} from "./TaskSpecPlacementPreferencesInnerSpread"; + TaskSpecPlacementPreferencesInnerSpreadFromJSON, + TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped, + TaskSpecPlacementPreferencesInnerSpreadToJSON, + TaskSpecPlacementPreferencesInnerSpreadToJSONTyped, +} from './TaskSpecPlacementPreferencesInnerSpread'; /** - * + * * @export * @interface TaskSpecPlacementPreferencesInner */ export interface TaskSpecPlacementPreferencesInner { - /** - * - * @type {TaskSpecPlacementPreferencesInnerSpread} - * @memberof TaskSpecPlacementPreferencesInner - */ - Spread?: TaskSpecPlacementPreferencesInnerSpread; + /** + * + * @type {TaskSpecPlacementPreferencesInnerSpread} + * @memberof TaskSpecPlacementPreferencesInner + */ + Spread?: TaskSpecPlacementPreferencesInnerSpread; } /** * Check if a given object implements the TaskSpecPlacementPreferencesInner interface. */ -export function instanceOfTaskSpecPlacementPreferencesInner( - value: object, -): value is TaskSpecPlacementPreferencesInner { - return true; +export function instanceOfTaskSpecPlacementPreferencesInner(value: object): value is TaskSpecPlacementPreferencesInner { + return true; } -export function TaskSpecPlacementPreferencesInnerFromJSON( - json: any, -): TaskSpecPlacementPreferencesInner { - return TaskSpecPlacementPreferencesInnerFromJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerFromJSON(json: any): TaskSpecPlacementPreferencesInner { + return TaskSpecPlacementPreferencesInnerFromJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecPlacementPreferencesInner { - if (json == null) { - return json; - } - return { - Spread: - json["Spread"] == null - ? undefined - : TaskSpecPlacementPreferencesInnerSpreadFromJSON(json["Spread"]), - }; +export function TaskSpecPlacementPreferencesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPlacementPreferencesInner { + if (json == null) { + return json; + } + return { + + 'Spread': json['Spread'] == null ? undefined : TaskSpecPlacementPreferencesInnerSpreadFromJSON(json['Spread']), + }; } -export function TaskSpecPlacementPreferencesInnerToJSON( - json: any, -): TaskSpecPlacementPreferencesInner { - return TaskSpecPlacementPreferencesInnerToJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerToJSON(json: any): TaskSpecPlacementPreferencesInner { + return TaskSpecPlacementPreferencesInnerToJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerToJSONTyped( - value?: TaskSpecPlacementPreferencesInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecPlacementPreferencesInnerToJSONTyped(value?: TaskSpecPlacementPreferencesInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Spread: TaskSpecPlacementPreferencesInnerSpreadToJSON(value["Spread"]), - }; + return { + + 'Spread': TaskSpecPlacementPreferencesInnerSpreadToJSON(value['Spread']), + }; } + diff --git a/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts b/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts index b656178b18..b0867da291 100644 --- a/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts +++ b/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts @@ -2,74 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface TaskSpecPlacementPreferencesInnerSpread */ export interface TaskSpecPlacementPreferencesInnerSpread { - /** - * label descriptor, such as `engine.labels.az`. - * - * @type {string} - * @memberof TaskSpecPlacementPreferencesInnerSpread - */ - SpreadDescriptor?: string; + /** + * label descriptor, such as `engine.labels.az`. + * + * @type {string} + * @memberof TaskSpecPlacementPreferencesInnerSpread + */ + SpreadDescriptor?: string; } /** * Check if a given object implements the TaskSpecPlacementPreferencesInnerSpread interface. */ -export function instanceOfTaskSpecPlacementPreferencesInnerSpread( - value: object, -): value is TaskSpecPlacementPreferencesInnerSpread { - return true; +export function instanceOfTaskSpecPlacementPreferencesInnerSpread(value: object): value is TaskSpecPlacementPreferencesInnerSpread { + return true; } -export function TaskSpecPlacementPreferencesInnerSpreadFromJSON( - json: any, -): TaskSpecPlacementPreferencesInnerSpread { - return TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerSpreadFromJSON(json: any): TaskSpecPlacementPreferencesInnerSpread { + return TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecPlacementPreferencesInnerSpread { - if (json == null) { - return json; - } - return { - SpreadDescriptor: json["SpreadDescriptor"] == null ? undefined : json["SpreadDescriptor"], - }; +export function TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPlacementPreferencesInnerSpread { + if (json == null) { + return json; + } + return { + + 'SpreadDescriptor': json['SpreadDescriptor'] == null ? undefined : json['SpreadDescriptor'], + }; } -export function TaskSpecPlacementPreferencesInnerSpreadToJSON( - json: any, -): TaskSpecPlacementPreferencesInnerSpread { - return TaskSpecPlacementPreferencesInnerSpreadToJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerSpreadToJSON(json: any): TaskSpecPlacementPreferencesInnerSpread { + return TaskSpecPlacementPreferencesInnerSpreadToJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerSpreadToJSONTyped( - value?: TaskSpecPlacementPreferencesInnerSpread | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecPlacementPreferencesInnerSpreadToJSONTyped(value?: TaskSpecPlacementPreferencesInnerSpread | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - SpreadDescriptor: value["SpreadDescriptor"], - }; + return { + + 'SpreadDescriptor': value['SpreadDescriptor'], + }; } + diff --git a/src/clients/docker/models/TaskSpecPluginSpec.ts b/src/clients/docker/models/TaskSpecPluginSpec.ts index 51a7d3f587..7071e9d3fc 100644 --- a/src/clients/docker/models/TaskSpecPluginSpec.ts +++ b/src/clients/docker/models/TaskSpecPluginSpec.ts @@ -2,113 +2,104 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PluginPrivilege } from "./PluginPrivilege"; +import { mapValues } from '../runtime'; +import type { PluginPrivilege } from './PluginPrivilege'; import { - PluginPrivilegeFromJSON, - PluginPrivilegeFromJSONTyped, - PluginPrivilegeToJSON, - PluginPrivilegeToJSONTyped, -} from "./PluginPrivilege"; + PluginPrivilegeFromJSON, + PluginPrivilegeFromJSONTyped, + PluginPrivilegeToJSON, + PluginPrivilegeToJSONTyped, +} from './PluginPrivilege'; /** * 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`. - * + * * @export * @interface TaskSpecPluginSpec */ export interface TaskSpecPluginSpec { - /** - * The name or 'alias' to use for the plugin. - * @type {string} - * @memberof TaskSpecPluginSpec - */ - Name?: string; - /** - * The plugin image reference to use. - * @type {string} - * @memberof TaskSpecPluginSpec - */ - Remote?: string; - /** - * Disable the plugin once scheduled. - * @type {boolean} - * @memberof TaskSpecPluginSpec - */ - Disabled?: boolean; - /** - * - * @type {Array} - * @memberof TaskSpecPluginSpec - */ - PluginPrivilege?: Array; + /** + * The name or 'alias' to use for the plugin. + * @type {string} + * @memberof TaskSpecPluginSpec + */ + Name?: string; + /** + * The plugin image reference to use. + * @type {string} + * @memberof TaskSpecPluginSpec + */ + Remote?: string; + /** + * Disable the plugin once scheduled. + * @type {boolean} + * @memberof TaskSpecPluginSpec + */ + Disabled?: boolean; + /** + * + * @type {Array} + * @memberof TaskSpecPluginSpec + */ + PluginPrivilege?: Array; } /** * Check if a given object implements the TaskSpecPluginSpec interface. */ export function instanceOfTaskSpecPluginSpec(value: object): value is TaskSpecPluginSpec { - return true; + return true; } export function TaskSpecPluginSpecFromJSON(json: any): TaskSpecPluginSpec { - return TaskSpecPluginSpecFromJSONTyped(json, false); + return TaskSpecPluginSpecFromJSONTyped(json, false); } -export function TaskSpecPluginSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecPluginSpec { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Remote: json["Remote"] == null ? undefined : json["Remote"], - Disabled: json["Disabled"] == null ? undefined : json["Disabled"], - PluginPrivilege: - json["PluginPrivilege"] == null - ? undefined - : (json["PluginPrivilege"] as Array).map(PluginPrivilegeFromJSON), - }; +export function TaskSpecPluginSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPluginSpec { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Remote': json['Remote'] == null ? undefined : json['Remote'], + 'Disabled': json['Disabled'] == null ? undefined : json['Disabled'], + 'PluginPrivilege': json['PluginPrivilege'] == null ? undefined : ((json['PluginPrivilege'] as Array).map(PluginPrivilegeFromJSON)), + }; } export function TaskSpecPluginSpecToJSON(json: any): TaskSpecPluginSpec { - return TaskSpecPluginSpecToJSONTyped(json, false); + return TaskSpecPluginSpecToJSONTyped(json, false); } -export function TaskSpecPluginSpecToJSONTyped( - value?: TaskSpecPluginSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecPluginSpecToJSONTyped(value?: TaskSpecPluginSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Remote: value["Remote"], - Disabled: value["Disabled"], - PluginPrivilege: - value["PluginPrivilege"] == null - ? undefined - : (value["PluginPrivilege"] as Array).map(PluginPrivilegeToJSON), - }; + return { + + 'Name': value['Name'], + 'Remote': value['Remote'], + 'Disabled': value['Disabled'], + 'PluginPrivilege': value['PluginPrivilege'] == null ? undefined : ((value['PluginPrivilege'] as Array).map(PluginPrivilegeToJSON)), + }; } + diff --git a/src/clients/docker/models/TaskSpecResources.ts b/src/clients/docker/models/TaskSpecResources.ts index 0470a68444..9e031e941c 100644 --- a/src/clients/docker/models/TaskSpecResources.ts +++ b/src/clients/docker/models/TaskSpecResources.ts @@ -2,88 +2,89 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceObject } from "./ResourceObject"; +import { mapValues } from '../runtime'; +import type { ResourceObject } from './ResourceObject'; +import { + ResourceObjectFromJSON, + ResourceObjectFromJSONTyped, + ResourceObjectToJSON, + ResourceObjectToJSONTyped, +} from './ResourceObject'; +import type { Limit } from './Limit'; import { - ResourceObjectFromJSON, - ResourceObjectFromJSONTyped, - ResourceObjectToJSON, - ResourceObjectToJSONTyped, -} from "./ResourceObject"; -import type { Limit } from "./Limit"; -import { LimitFromJSON, LimitFromJSONTyped, LimitToJSON, LimitToJSONTyped } from "./Limit"; + LimitFromJSON, + LimitFromJSONTyped, + LimitToJSON, + LimitToJSONTyped, +} from './Limit'; /** * Resource requirements which apply to each individual container created * as part of the service. - * + * * @export * @interface TaskSpecResources */ export interface TaskSpecResources { - /** - * - * @type {Limit} - * @memberof TaskSpecResources - */ - Limits?: Limit; - /** - * - * @type {ResourceObject} - * @memberof TaskSpecResources - */ - Reservations?: ResourceObject; + /** + * + * @type {Limit} + * @memberof TaskSpecResources + */ + Limits?: Limit; + /** + * + * @type {ResourceObject} + * @memberof TaskSpecResources + */ + Reservations?: ResourceObject; } /** * Check if a given object implements the TaskSpecResources interface. */ export function instanceOfTaskSpecResources(value: object): value is TaskSpecResources { - return true; + return true; } export function TaskSpecResourcesFromJSON(json: any): TaskSpecResources { - return TaskSpecResourcesFromJSONTyped(json, false); + return TaskSpecResourcesFromJSONTyped(json, false); } -export function TaskSpecResourcesFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecResources { - if (json == null) { - return json; - } - return { - Limits: json["Limits"] == null ? undefined : LimitFromJSON(json["Limits"]), - Reservations: - json["Reservations"] == null ? undefined : ResourceObjectFromJSON(json["Reservations"]), - }; +export function TaskSpecResourcesFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecResources { + if (json == null) { + return json; + } + return { + + 'Limits': json['Limits'] == null ? undefined : LimitFromJSON(json['Limits']), + 'Reservations': json['Reservations'] == null ? undefined : ResourceObjectFromJSON(json['Reservations']), + }; } export function TaskSpecResourcesToJSON(json: any): TaskSpecResources { - return TaskSpecResourcesToJSONTyped(json, false); + return TaskSpecResourcesToJSONTyped(json, false); } -export function TaskSpecResourcesToJSONTyped( - value?: TaskSpecResources | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecResourcesToJSONTyped(value?: TaskSpecResources | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Limits: LimitToJSON(value["Limits"]), - Reservations: ResourceObjectToJSON(value["Reservations"]), - }; + return { + + 'Limits': LimitToJSON(value['Limits']), + 'Reservations': ResourceObjectToJSON(value['Reservations']), + }; } + diff --git a/src/clients/docker/models/TaskSpecRestartPolicy.ts b/src/clients/docker/models/TaskSpecRestartPolicy.ts index 9eca8558b1..7971ba45b3 100644 --- a/src/clients/docker/models/TaskSpecRestartPolicy.ts +++ b/src/clients/docker/models/TaskSpecRestartPolicy.ts @@ -2,107 +2,105 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Specification for the restart policy which applies to containers * created as part of this service. - * + * * @export * @interface TaskSpecRestartPolicy */ export interface TaskSpecRestartPolicy { - /** - * Condition for restart. - * @type {string} - * @memberof TaskSpecRestartPolicy - */ - Condition?: TaskSpecRestartPolicyConditionEnum; - /** - * Delay between restart attempts. - * @type {number} - * @memberof TaskSpecRestartPolicy - */ - Delay?: number; - /** - * Maximum attempts to restart a given container before giving up - * (default value is 0, which is ignored). - * - * @type {number} - * @memberof TaskSpecRestartPolicy - */ - MaxAttempts?: number; - /** - * Windows is the time window used to evaluate the restart policy - * (default value is 0, which is unbounded). - * - * @type {number} - * @memberof TaskSpecRestartPolicy - */ - Window?: number; + /** + * Condition for restart. + * @type {string} + * @memberof TaskSpecRestartPolicy + */ + Condition?: TaskSpecRestartPolicyConditionEnum; + /** + * Delay between restart attempts. + * @type {number} + * @memberof TaskSpecRestartPolicy + */ + Delay?: number; + /** + * Maximum attempts to restart a given container before giving up + * (default value is 0, which is ignored). + * + * @type {number} + * @memberof TaskSpecRestartPolicy + */ + MaxAttempts?: number; + /** + * Windows is the time window used to evaluate the restart policy + * (default value is 0, which is unbounded). + * + * @type {number} + * @memberof TaskSpecRestartPolicy + */ + Window?: number; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum TaskSpecRestartPolicyConditionEnum { - None = "none", - OnFailure = "on-failure", - Any = "any", + None = 'none', + OnFailure = 'on-failure', + Any = 'any' } + /** * Check if a given object implements the TaskSpecRestartPolicy interface. */ export function instanceOfTaskSpecRestartPolicy(value: object): value is TaskSpecRestartPolicy { - return true; + return true; } export function TaskSpecRestartPolicyFromJSON(json: any): TaskSpecRestartPolicy { - return TaskSpecRestartPolicyFromJSONTyped(json, false); + return TaskSpecRestartPolicyFromJSONTyped(json, false); } -export function TaskSpecRestartPolicyFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskSpecRestartPolicy { - if (json == null) { - return json; - } - return { - Condition: json["Condition"] == null ? undefined : json["Condition"], - Delay: json["Delay"] == null ? undefined : json["Delay"], - MaxAttempts: json["MaxAttempts"] == null ? undefined : json["MaxAttempts"], - Window: json["Window"] == null ? undefined : json["Window"], - }; +export function TaskSpecRestartPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecRestartPolicy { + if (json == null) { + return json; + } + return { + + 'Condition': json['Condition'] == null ? undefined : json['Condition'], + 'Delay': json['Delay'] == null ? undefined : json['Delay'], + 'MaxAttempts': json['MaxAttempts'] == null ? undefined : json['MaxAttempts'], + 'Window': json['Window'] == null ? undefined : json['Window'], + }; } export function TaskSpecRestartPolicyToJSON(json: any): TaskSpecRestartPolicy { - return TaskSpecRestartPolicyToJSONTyped(json, false); + return TaskSpecRestartPolicyToJSONTyped(json, false); } -export function TaskSpecRestartPolicyToJSONTyped( - value?: TaskSpecRestartPolicy | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskSpecRestartPolicyToJSONTyped(value?: TaskSpecRestartPolicy | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Condition: value["Condition"], - Delay: value["Delay"], - MaxAttempts: value["MaxAttempts"], - Window: value["Window"], - }; + return { + + 'Condition': value['Condition'], + 'Delay': value['Delay'], + 'MaxAttempts': value['MaxAttempts'], + 'Window': value['Window'], + }; } + diff --git a/src/clients/docker/models/TaskState.ts b/src/clients/docker/models/TaskState.ts index 458a8e53f7..8d8e13370d 100644 --- a/src/clients/docker/models/TaskState.ts +++ b/src/clients/docker/models/TaskState.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,51 +13,53 @@ */ /** - * + * * @export * @enum {string} */ export enum TaskState { - New = "new", - Allocated = "allocated", - Pending = "pending", - Assigned = "assigned", - Accepted = "accepted", - Preparing = "preparing", - Ready = "ready", - Starting = "starting", - Running = "running", - Complete = "complete", - Shutdown = "shutdown", - Failed = "failed", - Rejected = "rejected", - Remove = "remove", - Orphaned = "orphaned", + New = 'new', + Allocated = 'allocated', + Pending = 'pending', + Assigned = 'assigned', + Accepted = 'accepted', + Preparing = 'preparing', + Ready = 'ready', + Starting = 'starting', + Running = 'running', + Complete = 'complete', + Shutdown = 'shutdown', + Failed = 'failed', + Rejected = 'rejected', + Remove = 'remove', + Orphaned = 'orphaned' } + export function instanceOfTaskState(value: any): boolean { - for (const key in TaskState) { - if (Object.prototype.hasOwnProperty.call(TaskState, key)) { - if (TaskState[key as keyof typeof TaskState] === value) { - return true; - } + for (const key in TaskState) { + if (Object.prototype.hasOwnProperty.call(TaskState, key)) { + if (TaskState[key as keyof typeof TaskState] === value) { + return true; + } + } } - } - return false; + return false; } export function TaskStateFromJSON(json: any): TaskState { - return TaskStateFromJSONTyped(json, false); + return TaskStateFromJSONTyped(json, false); } export function TaskStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskState { - return json as TaskState; + return json as TaskState; } export function TaskStateToJSON(value?: TaskState | null): any { - return value as any; + return value as any; } export function TaskStateToJSONTyped(value: any, ignoreDiscriminator: boolean): TaskState { - return value as TaskState; + return value as TaskState; } + diff --git a/src/clients/docker/models/TaskStatus.ts b/src/clients/docker/models/TaskStatus.ts index 8bddcbf091..6c986ac716 100644 --- a/src/clients/docker/models/TaskStatus.ts +++ b/src/clients/docker/models/TaskStatus.ts @@ -2,114 +2,113 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TaskStatusContainerStatus } from "./TaskStatusContainerStatus"; +import { mapValues } from '../runtime'; +import type { TaskStatusContainerStatus } from './TaskStatusContainerStatus'; import { - TaskStatusContainerStatusFromJSON, - TaskStatusContainerStatusFromJSONTyped, - TaskStatusContainerStatusToJSON, - TaskStatusContainerStatusToJSONTyped, -} from "./TaskStatusContainerStatus"; -import type { TaskState } from "./TaskState"; + TaskStatusContainerStatusFromJSON, + TaskStatusContainerStatusFromJSONTyped, + TaskStatusContainerStatusToJSON, + TaskStatusContainerStatusToJSONTyped, +} from './TaskStatusContainerStatus'; +import type { TaskState } from './TaskState'; import { - TaskStateFromJSON, - TaskStateFromJSONTyped, - TaskStateToJSON, - TaskStateToJSONTyped, -} from "./TaskState"; + TaskStateFromJSON, + TaskStateFromJSONTyped, + TaskStateToJSON, + TaskStateToJSONTyped, +} from './TaskState'; /** - * + * * @export * @interface TaskStatus */ export interface TaskStatus { - /** - * - * @type {string} - * @memberof TaskStatus - */ - Timestamp?: string; - /** - * - * @type {TaskState} - * @memberof TaskStatus - */ - State?: TaskState; - /** - * - * @type {string} - * @memberof TaskStatus - */ - Message?: string; - /** - * - * @type {string} - * @memberof TaskStatus - */ - Err?: string; - /** - * - * @type {TaskStatusContainerStatus} - * @memberof TaskStatus - */ - ContainerStatus?: TaskStatusContainerStatus; + /** + * + * @type {string} + * @memberof TaskStatus + */ + Timestamp?: string; + /** + * + * @type {TaskState} + * @memberof TaskStatus + */ + State?: TaskState; + /** + * + * @type {string} + * @memberof TaskStatus + */ + Message?: string; + /** + * + * @type {string} + * @memberof TaskStatus + */ + Err?: string; + /** + * + * @type {TaskStatusContainerStatus} + * @memberof TaskStatus + */ + ContainerStatus?: TaskStatusContainerStatus; } + + /** * Check if a given object implements the TaskStatus interface. */ export function instanceOfTaskStatus(value: object): value is TaskStatus { - return true; + return true; } export function TaskStatusFromJSON(json: any): TaskStatus { - return TaskStatusFromJSONTyped(json, false); + return TaskStatusFromJSONTyped(json, false); } export function TaskStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskStatus { - if (json == null) { - return json; - } - return { - Timestamp: json["Timestamp"] == null ? undefined : json["Timestamp"], - State: json["State"] == null ? undefined : TaskStateFromJSON(json["State"]), - Message: json["Message"] == null ? undefined : json["Message"], - Err: json["Err"] == null ? undefined : json["Err"], - ContainerStatus: - json["ContainerStatus"] == null - ? undefined - : TaskStatusContainerStatusFromJSON(json["ContainerStatus"]), - }; + if (json == null) { + return json; + } + return { + + 'Timestamp': json['Timestamp'] == null ? undefined : json['Timestamp'], + 'State': json['State'] == null ? undefined : TaskStateFromJSON(json['State']), + 'Message': json['Message'] == null ? undefined : json['Message'], + 'Err': json['Err'] == null ? undefined : json['Err'], + 'ContainerStatus': json['ContainerStatus'] == null ? undefined : TaskStatusContainerStatusFromJSON(json['ContainerStatus']), + }; } export function TaskStatusToJSON(json: any): TaskStatus { - return TaskStatusToJSONTyped(json, false); + return TaskStatusToJSONTyped(json, false); } -export function TaskStatusToJSONTyped( - value?: TaskStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskStatusToJSONTyped(value?: TaskStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Timestamp: value["Timestamp"], - State: TaskStateToJSON(value["State"]), - Message: value["Message"], - Err: value["Err"], - ContainerStatus: TaskStatusContainerStatusToJSON(value["ContainerStatus"]), - }; + return { + + 'Timestamp': value['Timestamp'], + 'State': TaskStateToJSON(value['State']), + 'Message': value['Message'], + 'Err': value['Err'], + 'ContainerStatus': TaskStatusContainerStatusToJSON(value['ContainerStatus']), + }; } + diff --git a/src/clients/docker/models/TaskStatusContainerStatus.ts b/src/clients/docker/models/TaskStatusContainerStatus.ts index 45587059ad..ce3d36e22e 100644 --- a/src/clients/docker/models/TaskStatusContainerStatus.ts +++ b/src/clients/docker/models/TaskStatusContainerStatus.ts @@ -2,85 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface TaskStatusContainerStatus */ export interface TaskStatusContainerStatus { - /** - * - * @type {string} - * @memberof TaskStatusContainerStatus - */ - ContainerID?: string; - /** - * - * @type {number} - * @memberof TaskStatusContainerStatus - */ - PID?: number; - /** - * - * @type {number} - * @memberof TaskStatusContainerStatus - */ - ExitCode?: number; + /** + * + * @type {string} + * @memberof TaskStatusContainerStatus + */ + ContainerID?: string; + /** + * + * @type {number} + * @memberof TaskStatusContainerStatus + */ + PID?: number; + /** + * + * @type {number} + * @memberof TaskStatusContainerStatus + */ + ExitCode?: number; } /** * Check if a given object implements the TaskStatusContainerStatus interface. */ -export function instanceOfTaskStatusContainerStatus( - value: object, -): value is TaskStatusContainerStatus { - return true; +export function instanceOfTaskStatusContainerStatus(value: object): value is TaskStatusContainerStatus { + return true; } export function TaskStatusContainerStatusFromJSON(json: any): TaskStatusContainerStatus { - return TaskStatusContainerStatusFromJSONTyped(json, false); + return TaskStatusContainerStatusFromJSONTyped(json, false); } -export function TaskStatusContainerStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TaskStatusContainerStatus { - if (json == null) { - return json; - } - return { - ContainerID: json["ContainerID"] == null ? undefined : json["ContainerID"], - PID: json["PID"] == null ? undefined : json["PID"], - ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], - }; +export function TaskStatusContainerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskStatusContainerStatus { + if (json == null) { + return json; + } + return { + + 'ContainerID': json['ContainerID'] == null ? undefined : json['ContainerID'], + 'PID': json['PID'] == null ? undefined : json['PID'], + 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], + }; } export function TaskStatusContainerStatusToJSON(json: any): TaskStatusContainerStatus { - return TaskStatusContainerStatusToJSONTyped(json, false); + return TaskStatusContainerStatusToJSONTyped(json, false); } -export function TaskStatusContainerStatusToJSONTyped( - value?: TaskStatusContainerStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TaskStatusContainerStatusToJSONTyped(value?: TaskStatusContainerStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ContainerID: value["ContainerID"], - PID: value["PID"], - ExitCode: value["ExitCode"], - }; + return { + + 'ContainerID': value['ContainerID'], + 'PID': value['PID'], + 'ExitCode': value['ExitCode'], + }; } + diff --git a/src/clients/docker/models/ThrottleDevice.ts b/src/clients/docker/models/ThrottleDevice.ts index 6df3e5f307..1370e41ad5 100644 --- a/src/clients/docker/models/ThrottleDevice.ts +++ b/src/clients/docker/models/ThrottleDevice.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ThrottleDevice */ export interface ThrottleDevice { - /** - * Device path - * @type {string} - * @memberof ThrottleDevice - */ - Path?: string; - /** - * Rate - * @type {number} - * @memberof ThrottleDevice - */ - Rate?: number; + /** + * Device path + * @type {string} + * @memberof ThrottleDevice + */ + Path?: string; + /** + * Rate + * @type {number} + * @memberof ThrottleDevice + */ + Rate?: number; } /** * Check if a given object implements the ThrottleDevice interface. */ export function instanceOfThrottleDevice(value: object): value is ThrottleDevice { - return true; + return true; } export function ThrottleDeviceFromJSON(json: any): ThrottleDevice { - return ThrottleDeviceFromJSONTyped(json, false); + return ThrottleDeviceFromJSONTyped(json, false); } -export function ThrottleDeviceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ThrottleDevice { - if (json == null) { - return json; - } - return { - Path: json["Path"] == null ? undefined : json["Path"], - Rate: json["Rate"] == null ? undefined : json["Rate"], - }; +export function ThrottleDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ThrottleDevice { + if (json == null) { + return json; + } + return { + + 'Path': json['Path'] == null ? undefined : json['Path'], + 'Rate': json['Rate'] == null ? undefined : json['Rate'], + }; } export function ThrottleDeviceToJSON(json: any): ThrottleDevice { - return ThrottleDeviceToJSONTyped(json, false); + return ThrottleDeviceToJSONTyped(json, false); } -export function ThrottleDeviceToJSONTyped( - value?: ThrottleDevice | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ThrottleDeviceToJSONTyped(value?: ThrottleDevice | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Path: value["Path"], - Rate: value["Rate"], - }; + return { + + 'Path': value['Path'], + 'Rate': value['Rate'], + }; } + diff --git a/src/clients/docker/models/UnlockKeyResponse.ts b/src/clients/docker/models/UnlockKeyResponse.ts index 1952e9002d..3e4bf22d32 100644 --- a/src/clients/docker/models/UnlockKeyResponse.ts +++ b/src/clients/docker/models/UnlockKeyResponse.ts @@ -2,67 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UnlockKeyResponse */ export interface UnlockKeyResponse { - /** - * The swarm's unlock key. - * @type {string} - * @memberof UnlockKeyResponse - */ - UnlockKey?: string; + /** + * The swarm's unlock key. + * @type {string} + * @memberof UnlockKeyResponse + */ + UnlockKey?: string; } /** * Check if a given object implements the UnlockKeyResponse interface. */ export function instanceOfUnlockKeyResponse(value: object): value is UnlockKeyResponse { - return true; + return true; } export function UnlockKeyResponseFromJSON(json: any): UnlockKeyResponse { - return UnlockKeyResponseFromJSONTyped(json, false); + return UnlockKeyResponseFromJSONTyped(json, false); } -export function UnlockKeyResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UnlockKeyResponse { - if (json == null) { - return json; - } - return { - UnlockKey: json["UnlockKey"] == null ? undefined : json["UnlockKey"], - }; +export function UnlockKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnlockKeyResponse { + if (json == null) { + return json; + } + return { + + 'UnlockKey': json['UnlockKey'] == null ? undefined : json['UnlockKey'], + }; } export function UnlockKeyResponseToJSON(json: any): UnlockKeyResponse { - return UnlockKeyResponseToJSONTyped(json, false); + return UnlockKeyResponseToJSONTyped(json, false); } -export function UnlockKeyResponseToJSONTyped( - value?: UnlockKeyResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UnlockKeyResponseToJSONTyped(value?: UnlockKeyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - UnlockKey: value["UnlockKey"], - }; + return { + + 'UnlockKey': value['UnlockKey'], + }; } + diff --git a/src/clients/docker/models/Volume.ts b/src/clients/docker/models/Volume.ts index def19b9d8d..9427b79292 100644 --- a/src/clients/docker/models/Volume.ts +++ b/src/clients/docker/models/Volume.ts @@ -2,176 +2,176 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { VolumeUsageData } from "./VolumeUsageData"; +import { mapValues } from '../runtime'; +import type { VolumeUsageData } from './VolumeUsageData'; import { - VolumeUsageDataFromJSON, - VolumeUsageDataFromJSONTyped, - VolumeUsageDataToJSON, - VolumeUsageDataToJSONTyped, -} from "./VolumeUsageData"; -import type { ClusterVolume } from "./ClusterVolume"; + VolumeUsageDataFromJSON, + VolumeUsageDataFromJSONTyped, + VolumeUsageDataToJSON, + VolumeUsageDataToJSONTyped, +} from './VolumeUsageData'; +import type { ClusterVolume } from './ClusterVolume'; import { - ClusterVolumeFromJSON, - ClusterVolumeFromJSONTyped, - ClusterVolumeToJSON, - ClusterVolumeToJSONTyped, -} from "./ClusterVolume"; + ClusterVolumeFromJSON, + ClusterVolumeFromJSONTyped, + ClusterVolumeToJSON, + ClusterVolumeToJSONTyped, +} from './ClusterVolume'; /** - * + * * @export * @interface Volume */ export interface Volume { - /** - * Name of the volume. - * @type {string} - * @memberof Volume - */ - Name: string; - /** - * Name of the volume driver used by the volume. - * @type {string} - * @memberof Volume - */ - Driver: string; - /** - * Mount path of the volume on the host. - * @type {string} - * @memberof Volume - */ - Mountpoint: string; - /** - * Date/Time the volume was created. - * @type {string} - * @memberof Volume - */ - CreatedAt?: string; - /** - * Low-level details about the volume, provided by the volume driver. - * Details are returned as a map with key/value pairs: - * `{"key":"value","key2":"value2"}`. - * - * The `Status` field is optional, and is omitted if the volume driver - * does not support this feature. - * - * @type {{ [key: string]: object; }} - * @memberof Volume - */ - Status?: { [key: string]: object }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Volume - */ - Labels: { [key: string]: string }; - /** - * The level at which the volume exists. Either `global` for cluster-wide, - * or `local` for machine level. - * - * @type {string} - * @memberof Volume - */ - Scope: VolumeScopeEnum; - /** - * - * @type {ClusterVolume} - * @memberof Volume - */ - ClusterVolume?: ClusterVolume; - /** - * The driver specific options used when creating the volume. - * - * @type {{ [key: string]: string; }} - * @memberof Volume - */ - Options: { [key: string]: string }; - /** - * - * @type {VolumeUsageData} - * @memberof Volume - */ - UsageData?: VolumeUsageData | null; + /** + * Name of the volume. + * @type {string} + * @memberof Volume + */ + Name: string; + /** + * Name of the volume driver used by the volume. + * @type {string} + * @memberof Volume + */ + Driver: string; + /** + * Mount path of the volume on the host. + * @type {string} + * @memberof Volume + */ + Mountpoint: string; + /** + * Date/Time the volume was created. + * @type {string} + * @memberof Volume + */ + CreatedAt?: string; + /** + * Low-level details about the volume, provided by the volume driver. + * Details are returned as a map with key/value pairs: + * `{"key":"value","key2":"value2"}`. + * + * The `Status` field is optional, and is omitted if the volume driver + * does not support this feature. + * + * @type {{ [key: string]: object; }} + * @memberof Volume + */ + Status?: { [key: string]: object; }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof Volume + */ + Labels: { [key: string]: string; }; + /** + * The level at which the volume exists. Either `global` for cluster-wide, + * or `local` for machine level. + * + * @type {string} + * @memberof Volume + */ + Scope: VolumeScopeEnum; + /** + * + * @type {ClusterVolume} + * @memberof Volume + */ + ClusterVolume?: ClusterVolume; + /** + * The driver specific options used when creating the volume. + * + * @type {{ [key: string]: string; }} + * @memberof Volume + */ + Options: { [key: string]: string; }; + /** + * + * @type {VolumeUsageData} + * @memberof Volume + */ + UsageData?: VolumeUsageData | null; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum VolumeScopeEnum { - Local = "local", - Global = "global", + Local = 'local', + Global = 'global' } + /** * Check if a given object implements the Volume interface. */ export function instanceOfVolume(value: object): value is Volume { - if (!("Name" in value) || value["Name"] === undefined) return false; - if (!("Driver" in value) || value["Driver"] === undefined) return false; - if (!("Mountpoint" in value) || value["Mountpoint"] === undefined) return false; - if (!("Labels" in value) || value["Labels"] === undefined) return false; - if (!("Scope" in value) || value["Scope"] === undefined) return false; - if (!("Options" in value) || value["Options"] === undefined) return false; - return true; + if (!('Name' in value) || value['Name'] === undefined) return false; + if (!('Driver' in value) || value['Driver'] === undefined) return false; + if (!('Mountpoint' in value) || value['Mountpoint'] === undefined) return false; + if (!('Labels' in value) || value['Labels'] === undefined) return false; + if (!('Scope' in value) || value['Scope'] === undefined) return false; + if (!('Options' in value) || value['Options'] === undefined) return false; + return true; } export function VolumeFromJSON(json: any): Volume { - return VolumeFromJSONTyped(json, false); + return VolumeFromJSONTyped(json, false); } export function VolumeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Volume { - if (json == null) { - return json; - } - return { - Name: json["Name"], - Driver: json["Driver"], - Mountpoint: json["Mountpoint"], - CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], - Status: json["Status"] == null ? undefined : json["Status"], - Labels: json["Labels"], - Scope: json["Scope"], - ClusterVolume: - json["ClusterVolume"] == null ? undefined : ClusterVolumeFromJSON(json["ClusterVolume"]), - Options: json["Options"], - UsageData: json["UsageData"] == null ? undefined : VolumeUsageDataFromJSON(json["UsageData"]), - }; + if (json == null) { + return json; + } + return { + + 'Name': json['Name'], + 'Driver': json['Driver'], + 'Mountpoint': json['Mountpoint'], + 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], + 'Status': json['Status'] == null ? undefined : json['Status'], + 'Labels': json['Labels'], + 'Scope': json['Scope'], + 'ClusterVolume': json['ClusterVolume'] == null ? undefined : ClusterVolumeFromJSON(json['ClusterVolume']), + 'Options': json['Options'], + 'UsageData': json['UsageData'] == null ? undefined : VolumeUsageDataFromJSON(json['UsageData']), + }; } export function VolumeToJSON(json: any): Volume { - return VolumeToJSONTyped(json, false); + return VolumeToJSONTyped(json, false); } -export function VolumeToJSONTyped( - value?: Volume | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function VolumeToJSONTyped(value?: Volume | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Driver: value["Driver"], - Mountpoint: value["Mountpoint"], - CreatedAt: value["CreatedAt"], - Status: value["Status"], - Labels: value["Labels"], - Scope: value["Scope"], - ClusterVolume: ClusterVolumeToJSON(value["ClusterVolume"]), - Options: value["Options"], - UsageData: VolumeUsageDataToJSON(value["UsageData"]), - }; + return { + + 'Name': value['Name'], + 'Driver': value['Driver'], + 'Mountpoint': value['Mountpoint'], + 'CreatedAt': value['CreatedAt'], + 'Status': value['Status'], + 'Labels': value['Labels'], + 'Scope': value['Scope'], + 'ClusterVolume': ClusterVolumeToJSON(value['ClusterVolume']), + 'Options': value['Options'], + 'UsageData': VolumeUsageDataToJSON(value['UsageData']), + }; } + diff --git a/src/clients/docker/models/VolumeCreateOptions.ts b/src/clients/docker/models/VolumeCreateOptions.ts index c377032ba1..dd5fac3f2a 100644 --- a/src/clients/docker/models/VolumeCreateOptions.ts +++ b/src/clients/docker/models/VolumeCreateOptions.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ClusterVolumeSpec } from "./ClusterVolumeSpec"; +import { mapValues } from '../runtime'; +import type { ClusterVolumeSpec } from './ClusterVolumeSpec'; import { - ClusterVolumeSpecFromJSON, - ClusterVolumeSpecFromJSONTyped, - ClusterVolumeSpecToJSON, - ClusterVolumeSpecToJSONTyped, -} from "./ClusterVolumeSpec"; + ClusterVolumeSpecFromJSON, + ClusterVolumeSpecFromJSONTyped, + ClusterVolumeSpecToJSON, + ClusterVolumeSpecToJSONTyped, +} from './ClusterVolumeSpec'; /** * Volume configuration @@ -27,88 +27,82 @@ import { * @interface VolumeCreateOptions */ export interface VolumeCreateOptions { - /** - * The new volume's name. If not specified, Docker generates a name. - * - * @type {string} - * @memberof VolumeCreateOptions - */ - Name?: string; - /** - * Name of the volume driver to use. - * @type {string} - * @memberof VolumeCreateOptions - */ - Driver?: string; - /** - * A mapping of driver options and values. These options are - * passed directly to the driver and are driver specific. - * - * @type {{ [key: string]: string; }} - * @memberof VolumeCreateOptions - */ - DriverOpts?: { [key: string]: string }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof VolumeCreateOptions - */ - Labels?: { [key: string]: string }; - /** - * - * @type {ClusterVolumeSpec} - * @memberof VolumeCreateOptions - */ - ClusterVolumeSpec?: ClusterVolumeSpec; + /** + * The new volume's name. If not specified, Docker generates a name. + * + * @type {string} + * @memberof VolumeCreateOptions + */ + Name?: string; + /** + * Name of the volume driver to use. + * @type {string} + * @memberof VolumeCreateOptions + */ + Driver?: string; + /** + * A mapping of driver options and values. These options are + * passed directly to the driver and are driver specific. + * + * @type {{ [key: string]: string; }} + * @memberof VolumeCreateOptions + */ + DriverOpts?: { [key: string]: string; }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof VolumeCreateOptions + */ + Labels?: { [key: string]: string; }; + /** + * + * @type {ClusterVolumeSpec} + * @memberof VolumeCreateOptions + */ + ClusterVolumeSpec?: ClusterVolumeSpec; } /** * Check if a given object implements the VolumeCreateOptions interface. */ export function instanceOfVolumeCreateOptions(value: object): value is VolumeCreateOptions { - return true; + return true; } export function VolumeCreateOptionsFromJSON(json: any): VolumeCreateOptions { - return VolumeCreateOptionsFromJSONTyped(json, false); + return VolumeCreateOptionsFromJSONTyped(json, false); } -export function VolumeCreateOptionsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): VolumeCreateOptions { - if (json == null) { - return json; - } - return { - Name: json["Name"] == null ? undefined : json["Name"], - Driver: json["Driver"] == null ? undefined : json["Driver"], - DriverOpts: json["DriverOpts"] == null ? undefined : json["DriverOpts"], - Labels: json["Labels"] == null ? undefined : json["Labels"], - ClusterVolumeSpec: - json["ClusterVolumeSpec"] == null - ? undefined - : ClusterVolumeSpecFromJSON(json["ClusterVolumeSpec"]), - }; +export function VolumeCreateOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeCreateOptions { + if (json == null) { + return json; + } + return { + + 'Name': json['Name'] == null ? undefined : json['Name'], + 'Driver': json['Driver'] == null ? undefined : json['Driver'], + 'DriverOpts': json['DriverOpts'] == null ? undefined : json['DriverOpts'], + 'Labels': json['Labels'] == null ? undefined : json['Labels'], + 'ClusterVolumeSpec': json['ClusterVolumeSpec'] == null ? undefined : ClusterVolumeSpecFromJSON(json['ClusterVolumeSpec']), + }; } export function VolumeCreateOptionsToJSON(json: any): VolumeCreateOptions { - return VolumeCreateOptionsToJSONTyped(json, false); + return VolumeCreateOptionsToJSONTyped(json, false); } -export function VolumeCreateOptionsToJSONTyped( - value?: VolumeCreateOptions | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function VolumeCreateOptionsToJSONTyped(value?: VolumeCreateOptions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Name: value["Name"], - Driver: value["Driver"], - DriverOpts: value["DriverOpts"], - Labels: value["Labels"], - ClusterVolumeSpec: ClusterVolumeSpecToJSON(value["ClusterVolumeSpec"]), - }; + return { + + 'Name': value['Name'], + 'Driver': value['Driver'], + 'DriverOpts': value['DriverOpts'], + 'Labels': value['Labels'], + 'ClusterVolumeSpec': ClusterVolumeSpecToJSON(value['ClusterVolumeSpec']), + }; } + diff --git a/src/clients/docker/models/VolumeListResponse.ts b/src/clients/docker/models/VolumeListResponse.ts index c98ab2545c..d076b92855 100644 --- a/src/clients/docker/models/VolumeListResponse.ts +++ b/src/clients/docker/models/VolumeListResponse.ts @@ -2,19 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Volume } from "./Volume"; -import { VolumeFromJSON, VolumeFromJSONTyped, VolumeToJSON, VolumeToJSONTyped } from "./Volume"; +import { mapValues } from '../runtime'; +import type { Volume } from './Volume'; +import { + VolumeFromJSON, + VolumeFromJSONTyped, + VolumeToJSON, + VolumeToJSONTyped, +} from './Volume'; /** * Volume list response @@ -22,61 +27,56 @@ import { VolumeFromJSON, VolumeFromJSONTyped, VolumeToJSON, VolumeToJSONTyped } * @interface VolumeListResponse */ export interface VolumeListResponse { - /** - * List of volumes - * @type {Array} - * @memberof VolumeListResponse - */ - Volumes?: Array; - /** - * Warnings that occurred when fetching the list of volumes. - * - * @type {Array} - * @memberof VolumeListResponse - */ - Warnings?: Array; + /** + * List of volumes + * @type {Array} + * @memberof VolumeListResponse + */ + Volumes?: Array; + /** + * Warnings that occurred when fetching the list of volumes. + * + * @type {Array} + * @memberof VolumeListResponse + */ + Warnings?: Array; } /** * Check if a given object implements the VolumeListResponse interface. */ export function instanceOfVolumeListResponse(value: object): value is VolumeListResponse { - return true; + return true; } export function VolumeListResponseFromJSON(json: any): VolumeListResponse { - return VolumeListResponseFromJSONTyped(json, false); + return VolumeListResponseFromJSONTyped(json, false); } -export function VolumeListResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): VolumeListResponse { - if (json == null) { - return json; - } - return { - Volumes: - json["Volumes"] == null ? undefined : (json["Volumes"] as Array).map(VolumeFromJSON), - Warnings: json["Warnings"] == null ? undefined : json["Warnings"], - }; +export function VolumeListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeListResponse { + if (json == null) { + return json; + } + return { + + 'Volumes': json['Volumes'] == null ? undefined : ((json['Volumes'] as Array).map(VolumeFromJSON)), + 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], + }; } export function VolumeListResponseToJSON(json: any): VolumeListResponse { - return VolumeListResponseToJSONTyped(json, false); + return VolumeListResponseToJSONTyped(json, false); } -export function VolumeListResponseToJSONTyped( - value?: VolumeListResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function VolumeListResponseToJSONTyped(value?: VolumeListResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Volumes: - value["Volumes"] == null ? undefined : (value["Volumes"] as Array).map(VolumeToJSON), - Warnings: value["Warnings"], - }; + return { + + 'Volumes': value['Volumes'] == null ? undefined : ((value['Volumes'] as Array).map(VolumeToJSON)), + 'Warnings': value['Warnings'], + }; } + diff --git a/src/clients/docker/models/VolumePruneResponse.ts b/src/clients/docker/models/VolumePruneResponse.ts index 16d09ba44e..5aa44ef868 100644 --- a/src/clients/docker/models/VolumePruneResponse.ts +++ b/src/clients/docker/models/VolumePruneResponse.ts @@ -2,75 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface VolumePruneResponse */ export interface VolumePruneResponse { - /** - * Volumes that were deleted - * @type {Array} - * @memberof VolumePruneResponse - */ - VolumesDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof VolumePruneResponse - */ - SpaceReclaimed?: number; + /** + * Volumes that were deleted + * @type {Array} + * @memberof VolumePruneResponse + */ + VolumesDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof VolumePruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the VolumePruneResponse interface. */ export function instanceOfVolumePruneResponse(value: object): value is VolumePruneResponse { - return true; + return true; } export function VolumePruneResponseFromJSON(json: any): VolumePruneResponse { - return VolumePruneResponseFromJSONTyped(json, false); + return VolumePruneResponseFromJSONTyped(json, false); } -export function VolumePruneResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): VolumePruneResponse { - if (json == null) { - return json; - } - return { - VolumesDeleted: json["VolumesDeleted"] == null ? undefined : json["VolumesDeleted"], - SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], - }; +export function VolumePruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumePruneResponse { + if (json == null) { + return json; + } + return { + + 'VolumesDeleted': json['VolumesDeleted'] == null ? undefined : json['VolumesDeleted'], + 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], + }; } export function VolumePruneResponseToJSON(json: any): VolumePruneResponse { - return VolumePruneResponseToJSONTyped(json, false); + return VolumePruneResponseToJSONTyped(json, false); } -export function VolumePruneResponseToJSONTyped( - value?: VolumePruneResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function VolumePruneResponseToJSONTyped(value?: VolumePruneResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - VolumesDeleted: value["VolumesDeleted"], - SpaceReclaimed: value["SpaceReclaimed"], - }; + return { + + 'VolumesDeleted': value['VolumesDeleted'], + 'SpaceReclaimed': value['SpaceReclaimed'], + }; } + diff --git a/src/clients/docker/models/VolumeUpdateRequest.ts b/src/clients/docker/models/VolumeUpdateRequest.ts index ec92486595..1f343025cc 100644 --- a/src/clients/docker/models/VolumeUpdateRequest.ts +++ b/src/clients/docker/models/VolumeUpdateRequest.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ClusterVolumeSpec } from "./ClusterVolumeSpec"; +import { mapValues } from '../runtime'; +import type { ClusterVolumeSpec } from './ClusterVolumeSpec'; import { - ClusterVolumeSpecFromJSON, - ClusterVolumeSpecFromJSONTyped, - ClusterVolumeSpecToJSON, - ClusterVolumeSpecToJSONTyped, -} from "./ClusterVolumeSpec"; + ClusterVolumeSpecFromJSON, + ClusterVolumeSpecFromJSONTyped, + ClusterVolumeSpecToJSON, + ClusterVolumeSpecToJSONTyped, +} from './ClusterVolumeSpec'; /** * Volume configuration @@ -27,50 +27,47 @@ import { * @interface VolumeUpdateRequest */ export interface VolumeUpdateRequest { - /** - * - * @type {ClusterVolumeSpec} - * @memberof VolumeUpdateRequest - */ - Spec?: ClusterVolumeSpec; + /** + * + * @type {ClusterVolumeSpec} + * @memberof VolumeUpdateRequest + */ + Spec?: ClusterVolumeSpec; } /** * Check if a given object implements the VolumeUpdateRequest interface. */ export function instanceOfVolumeUpdateRequest(value: object): value is VolumeUpdateRequest { - return true; + return true; } export function VolumeUpdateRequestFromJSON(json: any): VolumeUpdateRequest { - return VolumeUpdateRequestFromJSONTyped(json, false); + return VolumeUpdateRequestFromJSONTyped(json, false); } -export function VolumeUpdateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): VolumeUpdateRequest { - if (json == null) { - return json; - } - return { - Spec: json["Spec"] == null ? undefined : ClusterVolumeSpecFromJSON(json["Spec"]), - }; +export function VolumeUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeUpdateRequest { + if (json == null) { + return json; + } + return { + + 'Spec': json['Spec'] == null ? undefined : ClusterVolumeSpecFromJSON(json['Spec']), + }; } export function VolumeUpdateRequestToJSON(json: any): VolumeUpdateRequest { - return VolumeUpdateRequestToJSONTyped(json, false); + return VolumeUpdateRequestToJSONTyped(json, false); } -export function VolumeUpdateRequestToJSONTyped( - value?: VolumeUpdateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function VolumeUpdateRequestToJSONTyped(value?: VolumeUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Spec: ClusterVolumeSpecToJSON(value["Spec"]), - }; + return { + + 'Spec': ClusterVolumeSpecToJSON(value['Spec']), + }; } + diff --git a/src/clients/docker/models/VolumeUsageData.ts b/src/clients/docker/models/VolumeUsageData.ts index b58dfc7675..fb5ca83548 100644 --- a/src/clients/docker/models/VolumeUsageData.ts +++ b/src/clients/docker/models/VolumeUsageData.ts @@ -2,85 +2,82 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Usage details about the volume. This information is used by the * `GET /system/df` endpoint, and omitted in other endpoints. - * + * * @export * @interface VolumeUsageData */ export interface VolumeUsageData { - /** - * Amount of disk space used by the volume (in bytes). This information - * is only available for volumes created with the `"local"` volume - * driver. For volumes created with other volume drivers, this field - * is set to `-1` ("not available") - * - * @type {number} - * @memberof VolumeUsageData - */ - Size: number; - /** - * The number of containers referencing this volume. This field - * is set to `-1` if the reference-count is not available. - * - * @type {number} - * @memberof VolumeUsageData - */ - RefCount: number; + /** + * Amount of disk space used by the volume (in bytes). This information + * is only available for volumes created with the `"local"` volume + * driver. For volumes created with other volume drivers, this field + * is set to `-1` ("not available") + * + * @type {number} + * @memberof VolumeUsageData + */ + Size: number; + /** + * The number of containers referencing this volume. This field + * is set to `-1` if the reference-count is not available. + * + * @type {number} + * @memberof VolumeUsageData + */ + RefCount: number; } /** * Check if a given object implements the VolumeUsageData interface. */ export function instanceOfVolumeUsageData(value: object): value is VolumeUsageData { - if (!("Size" in value) || value["Size"] === undefined) return false; - if (!("RefCount" in value) || value["RefCount"] === undefined) return false; - return true; + if (!('Size' in value) || value['Size'] === undefined) return false; + if (!('RefCount' in value) || value['RefCount'] === undefined) return false; + return true; } export function VolumeUsageDataFromJSON(json: any): VolumeUsageData { - return VolumeUsageDataFromJSONTyped(json, false); + return VolumeUsageDataFromJSONTyped(json, false); } -export function VolumeUsageDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): VolumeUsageData { - if (json == null) { - return json; - } - return { - Size: json["Size"], - RefCount: json["RefCount"], - }; +export function VolumeUsageDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeUsageData { + if (json == null) { + return json; + } + return { + + 'Size': json['Size'], + 'RefCount': json['RefCount'], + }; } export function VolumeUsageDataToJSON(json: any): VolumeUsageData { - return VolumeUsageDataToJSONTyped(json, false); + return VolumeUsageDataToJSONTyped(json, false); } -export function VolumeUsageDataToJSONTyped( - value?: VolumeUsageData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function VolumeUsageDataToJSONTyped(value?: VolumeUsageData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - Size: value["Size"], - RefCount: value["RefCount"], - }; + return { + + 'Size': value['Size'], + 'RefCount': value['RefCount'], + }; } + diff --git a/src/clients/docker/models/index.ts b/src/clients/docker/models/index.ts index 88960486a5..ac9e7f4cda 100644 --- a/src/clients/docker/models/index.ts +++ b/src/clients/docker/models/index.ts @@ -1,208 +1,208 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./Address"; -export * from "./AuthConfig"; -export * from "./BuildCache"; -export * from "./BuildInfo"; -export * from "./BuildPruneResponse"; -export * from "./ChangeType"; -export * from "./ClusterInfo"; -export * from "./ClusterVolume"; -export * from "./ClusterVolumeInfo"; -export * from "./ClusterVolumePublishStatusInner"; -export * from "./ClusterVolumeSpec"; -export * from "./ClusterVolumeSpecAccessMode"; -export * from "./ClusterVolumeSpecAccessModeAccessibilityRequirements"; -export * from "./ClusterVolumeSpecAccessModeCapacityRange"; -export * from "./ClusterVolumeSpecAccessModeSecretsInner"; -export * from "./Commit"; -export * from "./Config"; -export * from "./ConfigCreateRequest"; -export * from "./ConfigReference"; -export * from "./ConfigSpec"; -export * from "./ContainerConfig"; -export * from "./ContainerCreateRequest"; -export * from "./ContainerCreateResponse"; -export * from "./ContainerInspectResponse"; -export * from "./ContainerPruneResponse"; -export * from "./ContainerState"; -export * from "./ContainerSummary"; -export * from "./ContainerSummaryHostConfig"; -export * from "./ContainerSummaryNetworkSettings"; -export * from "./ContainerTopResponse"; -export * from "./ContainerUpdateRequest"; -export * from "./ContainerUpdateResponse"; -export * from "./ContainerWaitExitError"; -export * from "./ContainerWaitResponse"; -export * from "./CreateImageInfo"; -export * from "./DeviceMapping"; -export * from "./DeviceRequest"; -export * from "./DistributionInspect"; -export * from "./Driver"; -export * from "./EndpointIPAMConfig"; -export * from "./EndpointPortConfig"; -export * from "./EndpointSettings"; -export * from "./EndpointSpec"; -export * from "./EngineDescription"; -export * from "./EngineDescriptionPluginsInner"; -export * from "./ErrorDetail"; -export * from "./ErrorResponse"; -export * from "./EventActor"; -export * from "./EventMessage"; -export * from "./ExecConfig"; -export * from "./ExecInspectResponse"; -export * from "./ExecStartConfig"; -export * from "./FilesystemChange"; -export * from "./GenericResourcesInner"; -export * from "./GenericResourcesInnerDiscreteResourceSpec"; -export * from "./GenericResourcesInnerNamedResourceSpec"; -export * from "./GraphDriverData"; -export * from "./Health"; -export * from "./HealthConfig"; -export * from "./HealthcheckResult"; -export * from "./HistoryResponseItem"; -export * from "./HostConfig"; -export * from "./HostConfigAllOfLogConfig"; -export * from "./IPAM"; -export * from "./IPAMConfig"; -export * from "./IdResponse"; -export * from "./ImageConfig"; -export * from "./ImageDeleteResponseItem"; -export * from "./ImageID"; -export * from "./ImageInspect"; -export * from "./ImageInspectMetadata"; -export * from "./ImageInspectRootFS"; -export * from "./ImagePruneResponse"; -export * from "./ImageSearchResponseItem"; -export * from "./ImageSummary"; -export * from "./IndexInfo"; -export * from "./JoinTokens"; -export * from "./Limit"; -export * from "./LocalNodeState"; -export * from "./ManagerStatus"; -export * from "./Mount"; -export * from "./MountBindOptions"; -export * from "./MountPoint"; -export * from "./MountTmpfsOptions"; -export * from "./MountVolumeOptions"; -export * from "./MountVolumeOptionsDriverConfig"; -export * from "./Network"; -export * from "./NetworkAttachmentConfig"; -export * from "./NetworkConnectRequest"; -export * from "./NetworkContainer"; -export * from "./NetworkCreateRequest"; -export * from "./NetworkCreateResponse"; -export * from "./NetworkDisconnectRequest"; -export * from "./NetworkPruneResponse"; -export * from "./NetworkSettings"; -export * from "./NetworkingConfig"; -export * from "./Node"; -export * from "./NodeDescription"; -export * from "./NodeSpec"; -export * from "./NodeState"; -export * from "./NodeStatus"; -export * from "./OCIDescriptor"; -export * from "./OCIPlatform"; -export * from "./ObjectVersion"; -export * from "./PeerInfo"; -export * from "./PeerNode"; -export * from "./Platform"; -export * from "./Plugin"; -export * from "./PluginConfig"; -export * from "./PluginConfigArgs"; -export * from "./PluginConfigInterface"; -export * from "./PluginConfigLinux"; -export * from "./PluginConfigNetwork"; -export * from "./PluginConfigRootfs"; -export * from "./PluginConfigUser"; -export * from "./PluginDevice"; -export * from "./PluginEnv"; -export * from "./PluginInterfaceType"; -export * from "./PluginMount"; -export * from "./PluginPrivilege"; -export * from "./PluginSettings"; -export * from "./PluginsInfo"; -export * from "./Port"; -export * from "./PortBinding"; -export * from "./ProcessConfig"; -export * from "./ProgressDetail"; -export * from "./PushImageInfo"; -export * from "./Reachability"; -export * from "./RegistryServiceConfig"; -export * from "./ResourceObject"; -export * from "./Resources"; -export * from "./ResourcesBlkioWeightDeviceInner"; -export * from "./ResourcesUlimitsInner"; -export * from "./RestartPolicy"; -export * from "./Runtime"; -export * from "./Secret"; -export * from "./SecretCreateRequest"; -export * from "./SecretSpec"; -export * from "./Service"; -export * from "./ServiceCreateRequest"; -export * from "./ServiceCreateResponse"; -export * from "./ServiceEndpoint"; -export * from "./ServiceEndpointVirtualIPsInner"; -export * from "./ServiceJobStatus"; -export * from "./ServiceServiceStatus"; -export * from "./ServiceSpec"; -export * from "./ServiceSpecMode"; -export * from "./ServiceSpecModeReplicated"; -export * from "./ServiceSpecModeReplicatedJob"; -export * from "./ServiceSpecRollbackConfig"; -export * from "./ServiceSpecUpdateConfig"; -export * from "./ServiceUpdateRequest"; -export * from "./ServiceUpdateResponse"; -export * from "./ServiceUpdateStatus"; -export * from "./Swarm"; -export * from "./SwarmInfo"; -export * from "./SwarmInitRequest"; -export * from "./SwarmJoinRequest"; -export * from "./SwarmSpec"; -export * from "./SwarmSpecCAConfig"; -export * from "./SwarmSpecCAConfigExternalCAsInner"; -export * from "./SwarmSpecDispatcher"; -export * from "./SwarmSpecEncryptionConfig"; -export * from "./SwarmSpecOrchestration"; -export * from "./SwarmSpecRaft"; -export * from "./SwarmSpecTaskDefaults"; -export * from "./SwarmSpecTaskDefaultsLogDriver"; -export * from "./SwarmUnlockRequest"; -export * from "./SystemAuthResponse"; -export * from "./SystemDataUsageResponse"; -export * from "./SystemInfo"; -export * from "./SystemInfoDefaultAddressPoolsInner"; -export * from "./SystemVersion"; -export * from "./SystemVersionComponentsInner"; -export * from "./SystemVersionPlatform"; -export * from "./TLSInfo"; -export * from "./Task"; -export * from "./TaskSpec"; -export * from "./TaskSpecContainerSpec"; -export * from "./TaskSpecContainerSpecConfigsInner"; -export * from "./TaskSpecContainerSpecConfigsInnerFile"; -export * from "./TaskSpecContainerSpecDNSConfig"; -export * from "./TaskSpecContainerSpecPrivileges"; -export * from "./TaskSpecContainerSpecPrivilegesCredentialSpec"; -export * from "./TaskSpecContainerSpecPrivilegesSELinuxContext"; -export * from "./TaskSpecContainerSpecSecretsInner"; -export * from "./TaskSpecContainerSpecSecretsInnerFile"; -export * from "./TaskSpecLogDriver"; -export * from "./TaskSpecNetworkAttachmentSpec"; -export * from "./TaskSpecPlacement"; -export * from "./TaskSpecPlacementPreferencesInner"; -export * from "./TaskSpecPlacementPreferencesInnerSpread"; -export * from "./TaskSpecPluginSpec"; -export * from "./TaskSpecResources"; -export * from "./TaskSpecRestartPolicy"; -export * from "./TaskState"; -export * from "./TaskStatus"; -export * from "./TaskStatusContainerStatus"; -export * from "./ThrottleDevice"; -export * from "./UnlockKeyResponse"; -export * from "./Volume"; -export * from "./VolumeCreateOptions"; -export * from "./VolumeListResponse"; -export * from "./VolumePruneResponse"; -export * from "./VolumeUpdateRequest"; -export * from "./VolumeUsageData"; +export * from './Address'; +export * from './AuthConfig'; +export * from './BuildCache'; +export * from './BuildInfo'; +export * from './BuildPruneResponse'; +export * from './ChangeType'; +export * from './ClusterInfo'; +export * from './ClusterVolume'; +export * from './ClusterVolumeInfo'; +export * from './ClusterVolumePublishStatusInner'; +export * from './ClusterVolumeSpec'; +export * from './ClusterVolumeSpecAccessMode'; +export * from './ClusterVolumeSpecAccessModeAccessibilityRequirements'; +export * from './ClusterVolumeSpecAccessModeCapacityRange'; +export * from './ClusterVolumeSpecAccessModeSecretsInner'; +export * from './Commit'; +export * from './Config'; +export * from './ConfigCreateRequest'; +export * from './ConfigReference'; +export * from './ConfigSpec'; +export * from './ContainerConfig'; +export * from './ContainerCreateRequest'; +export * from './ContainerCreateResponse'; +export * from './ContainerInspectResponse'; +export * from './ContainerPruneResponse'; +export * from './ContainerState'; +export * from './ContainerSummary'; +export * from './ContainerSummaryHostConfig'; +export * from './ContainerSummaryNetworkSettings'; +export * from './ContainerTopResponse'; +export * from './ContainerUpdateRequest'; +export * from './ContainerUpdateResponse'; +export * from './ContainerWaitExitError'; +export * from './ContainerWaitResponse'; +export * from './CreateImageInfo'; +export * from './DeviceMapping'; +export * from './DeviceRequest'; +export * from './DistributionInspect'; +export * from './Driver'; +export * from './EndpointIPAMConfig'; +export * from './EndpointPortConfig'; +export * from './EndpointSettings'; +export * from './EndpointSpec'; +export * from './EngineDescription'; +export * from './EngineDescriptionPluginsInner'; +export * from './ErrorDetail'; +export * from './ErrorResponse'; +export * from './EventActor'; +export * from './EventMessage'; +export * from './ExecConfig'; +export * from './ExecInspectResponse'; +export * from './ExecStartConfig'; +export * from './FilesystemChange'; +export * from './GenericResourcesInner'; +export * from './GenericResourcesInnerDiscreteResourceSpec'; +export * from './GenericResourcesInnerNamedResourceSpec'; +export * from './GraphDriverData'; +export * from './Health'; +export * from './HealthConfig'; +export * from './HealthcheckResult'; +export * from './HistoryResponseItem'; +export * from './HostConfig'; +export * from './HostConfigAllOfLogConfig'; +export * from './IPAM'; +export * from './IPAMConfig'; +export * from './IdResponse'; +export * from './ImageConfig'; +export * from './ImageDeleteResponseItem'; +export * from './ImageID'; +export * from './ImageInspect'; +export * from './ImageInspectMetadata'; +export * from './ImageInspectRootFS'; +export * from './ImagePruneResponse'; +export * from './ImageSearchResponseItem'; +export * from './ImageSummary'; +export * from './IndexInfo'; +export * from './JoinTokens'; +export * from './Limit'; +export * from './LocalNodeState'; +export * from './ManagerStatus'; +export * from './Mount'; +export * from './MountBindOptions'; +export * from './MountPoint'; +export * from './MountTmpfsOptions'; +export * from './MountVolumeOptions'; +export * from './MountVolumeOptionsDriverConfig'; +export * from './Network'; +export * from './NetworkAttachmentConfig'; +export * from './NetworkConnectRequest'; +export * from './NetworkContainer'; +export * from './NetworkCreateRequest'; +export * from './NetworkCreateResponse'; +export * from './NetworkDisconnectRequest'; +export * from './NetworkPruneResponse'; +export * from './NetworkSettings'; +export * from './NetworkingConfig'; +export * from './Node'; +export * from './NodeDescription'; +export * from './NodeSpec'; +export * from './NodeState'; +export * from './NodeStatus'; +export * from './OCIDescriptor'; +export * from './OCIPlatform'; +export * from './ObjectVersion'; +export * from './PeerInfo'; +export * from './PeerNode'; +export * from './Platform'; +export * from './Plugin'; +export * from './PluginConfig'; +export * from './PluginConfigArgs'; +export * from './PluginConfigInterface'; +export * from './PluginConfigLinux'; +export * from './PluginConfigNetwork'; +export * from './PluginConfigRootfs'; +export * from './PluginConfigUser'; +export * from './PluginDevice'; +export * from './PluginEnv'; +export * from './PluginInterfaceType'; +export * from './PluginMount'; +export * from './PluginPrivilege'; +export * from './PluginSettings'; +export * from './PluginsInfo'; +export * from './Port'; +export * from './PortBinding'; +export * from './ProcessConfig'; +export * from './ProgressDetail'; +export * from './PushImageInfo'; +export * from './Reachability'; +export * from './RegistryServiceConfig'; +export * from './ResourceObject'; +export * from './Resources'; +export * from './ResourcesBlkioWeightDeviceInner'; +export * from './ResourcesUlimitsInner'; +export * from './RestartPolicy'; +export * from './Runtime'; +export * from './Secret'; +export * from './SecretCreateRequest'; +export * from './SecretSpec'; +export * from './Service'; +export * from './ServiceCreateRequest'; +export * from './ServiceCreateResponse'; +export * from './ServiceEndpoint'; +export * from './ServiceEndpointVirtualIPsInner'; +export * from './ServiceJobStatus'; +export * from './ServiceServiceStatus'; +export * from './ServiceSpec'; +export * from './ServiceSpecMode'; +export * from './ServiceSpecModeReplicated'; +export * from './ServiceSpecModeReplicatedJob'; +export * from './ServiceSpecRollbackConfig'; +export * from './ServiceSpecUpdateConfig'; +export * from './ServiceUpdateRequest'; +export * from './ServiceUpdateResponse'; +export * from './ServiceUpdateStatus'; +export * from './Swarm'; +export * from './SwarmInfo'; +export * from './SwarmInitRequest'; +export * from './SwarmJoinRequest'; +export * from './SwarmSpec'; +export * from './SwarmSpecCAConfig'; +export * from './SwarmSpecCAConfigExternalCAsInner'; +export * from './SwarmSpecDispatcher'; +export * from './SwarmSpecEncryptionConfig'; +export * from './SwarmSpecOrchestration'; +export * from './SwarmSpecRaft'; +export * from './SwarmSpecTaskDefaults'; +export * from './SwarmSpecTaskDefaultsLogDriver'; +export * from './SwarmUnlockRequest'; +export * from './SystemAuthResponse'; +export * from './SystemDataUsageResponse'; +export * from './SystemInfo'; +export * from './SystemInfoDefaultAddressPoolsInner'; +export * from './SystemVersion'; +export * from './SystemVersionComponentsInner'; +export * from './SystemVersionPlatform'; +export * from './TLSInfo'; +export * from './Task'; +export * from './TaskSpec'; +export * from './TaskSpecContainerSpec'; +export * from './TaskSpecContainerSpecConfigsInner'; +export * from './TaskSpecContainerSpecConfigsInnerFile'; +export * from './TaskSpecContainerSpecDNSConfig'; +export * from './TaskSpecContainerSpecPrivileges'; +export * from './TaskSpecContainerSpecPrivilegesCredentialSpec'; +export * from './TaskSpecContainerSpecPrivilegesSELinuxContext'; +export * from './TaskSpecContainerSpecSecretsInner'; +export * from './TaskSpecContainerSpecSecretsInnerFile'; +export * from './TaskSpecLogDriver'; +export * from './TaskSpecNetworkAttachmentSpec'; +export * from './TaskSpecPlacement'; +export * from './TaskSpecPlacementPreferencesInner'; +export * from './TaskSpecPlacementPreferencesInnerSpread'; +export * from './TaskSpecPluginSpec'; +export * from './TaskSpecResources'; +export * from './TaskSpecRestartPolicy'; +export * from './TaskState'; +export * from './TaskStatus'; +export * from './TaskStatusContainerStatus'; +export * from './ThrottleDevice'; +export * from './UnlockKeyResponse'; +export * from './Volume'; +export * from './VolumeCreateOptions'; +export * from './VolumeListResponse'; +export * from './VolumePruneResponse'; +export * from './VolumeUpdateRequest'; +export * from './VolumeUsageData'; diff --git a/src/clients/docker/runtime.ts b/src/clients/docker/runtime.ts index f41ded5b30..68c9fe88ae 100644 --- a/src/clients/docker/runtime.ts +++ b/src/clients/docker/runtime.ts @@ -2,88 +2,86 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "http://localhost/v1.44".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts b/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts index 6449b4d1ca..f5cd2ed778 100644 --- a/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts +++ b/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts @@ -5,14 +5,15 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ArtifactV1FlinkArtifact, ArtifactV1FlinkArtifactList, @@ -20,526 +21,429 @@ import type { CreateArtifactV1FlinkArtifactRequest, Failure, GetArtifactV1FlinkArtifact200Response, -} from "../models/index"; +} from '../models/index'; import { - ArtifactV1FlinkArtifactFromJSON, - ArtifactV1FlinkArtifactToJSON, - ArtifactV1FlinkArtifactListFromJSON, - ArtifactV1FlinkArtifactListToJSON, - CreateArtifactV1FlinkArtifact201ResponseFromJSON, - CreateArtifactV1FlinkArtifact201ResponseToJSON, - CreateArtifactV1FlinkArtifactRequestFromJSON, - CreateArtifactV1FlinkArtifactRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetArtifactV1FlinkArtifact200ResponseFromJSON, - GetArtifactV1FlinkArtifact200ResponseToJSON, -} from "../models/index"; + ArtifactV1FlinkArtifactFromJSON, + ArtifactV1FlinkArtifactToJSON, + ArtifactV1FlinkArtifactListFromJSON, + ArtifactV1FlinkArtifactListToJSON, + CreateArtifactV1FlinkArtifact201ResponseFromJSON, + CreateArtifactV1FlinkArtifact201ResponseToJSON, + CreateArtifactV1FlinkArtifactRequestFromJSON, + CreateArtifactV1FlinkArtifactRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetArtifactV1FlinkArtifact200ResponseFromJSON, + GetArtifactV1FlinkArtifact200ResponseToJSON, +} from '../models/index'; export interface CreateArtifactV1FlinkArtifactOperationRequest { - cloud: string; - region: string; - CreateArtifactV1FlinkArtifactRequest?: CreateArtifactV1FlinkArtifactRequest; + cloud: string; + region: string; + CreateArtifactV1FlinkArtifactRequest?: CreateArtifactV1FlinkArtifactRequest; } export interface DeleteArtifactV1FlinkArtifactRequest { - cloud: string; - region: string; - environment: string; - id: string; + cloud: string; + region: string; + environment: string; + id: string; } export interface GetArtifactV1FlinkArtifactRequest { - cloud: string; - region: string; - environment: string; - id: string; + cloud: string; + region: string; + environment: string; + id: string; } export interface ListArtifactV1FlinkArtifactsRequest { - cloud: string; - region: string; - environment: string; - page_size?: number; - page_token?: string; + cloud: string; + region: string; + environment: string; + page_size?: number; + page_token?: string; } export interface UpdateArtifactV1FlinkArtifactRequest { - cloud: string; - region: string; - environment: string; - id: string; - ArtifactV1FlinkArtifact?: Omit; + cloud: string; + region: string; + environment: string; + id: string; + ArtifactV1FlinkArtifact?: Omit; } /** - * + * */ export class FlinkArtifactsArtifactV1Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. - * Create a new Flink Artifact. - */ - async createArtifactV1FlinkArtifactRaw( - requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cloud"] == null) { - throw new runtime.RequiredError( - "cloud", - 'Required parameter "cloud" was null or undefined when calling createArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["region"] == null) { - throw new runtime.RequiredError( - "region", - 'Required parameter "region" was null or undefined when calling createArtifactV1FlinkArtifact().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["cloud"] != null) { - queryParameters["cloud"] = requestParameters["cloud"]; - } - - if (requestParameters["region"] != null) { - queryParameters["region"] = requestParameters["region"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - - const response = await this.request( - { - path: `/artifact/v1/flink-artifacts`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateArtifactV1FlinkArtifactRequestToJSON( - requestParameters["CreateArtifactV1FlinkArtifactRequest"], - ), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateArtifactV1FlinkArtifact201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. - * Create a new Flink Artifact. - */ - async createArtifactV1FlinkArtifact( - requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. - * Delete a Flink Artifact - */ - async deleteArtifactV1FlinkArtifactRaw( - requestParameters: DeleteArtifactV1FlinkArtifactRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cloud"] == null) { - throw new runtime.RequiredError( - "cloud", - 'Required parameter "cloud" was null or undefined when calling deleteArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["region"] == null) { - throw new runtime.RequiredError( - "region", - 'Required parameter "region" was null or undefined when calling deleteArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling deleteArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling deleteArtifactV1FlinkArtifact().', - ); - } - const queryParameters: any = {}; - - if (requestParameters["cloud"] != null) { - queryParameters["cloud"] = requestParameters["cloud"]; - } - - if (requestParameters["region"] != null) { - queryParameters["region"] = requestParameters["region"]; - } - - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - - const response = await this.request( - { - path: `/artifact/v1/flink-artifacts/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. - * Delete a Flink Artifact - */ - async deleteArtifactV1FlinkArtifact( - requestParameters: DeleteArtifactV1FlinkArtifactRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. - * Read a Flink Artifact - */ - async getArtifactV1FlinkArtifactRaw( - requestParameters: GetArtifactV1FlinkArtifactRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cloud"] == null) { - throw new runtime.RequiredError( - "cloud", - 'Required parameter "cloud" was null or undefined when calling getArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["region"] == null) { - throw new runtime.RequiredError( - "region", - 'Required parameter "region" was null or undefined when calling getArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling getArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling getArtifactV1FlinkArtifact().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["cloud"] != null) { - queryParameters["cloud"] = requestParameters["cloud"]; - } - - if (requestParameters["region"] != null) { - queryParameters["region"] = requestParameters["region"]; - } - - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - - const response = await this.request( - { - path: `/artifact/v1/flink-artifacts/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. - * Read a Flink Artifact - */ - async getArtifactV1FlinkArtifact( - requestParameters: GetArtifactV1FlinkArtifactRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. - * List of Flink Artifacts - */ - async listArtifactV1FlinkArtifactsRaw( - requestParameters: ListArtifactV1FlinkArtifactsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cloud"] == null) { - throw new runtime.RequiredError( - "cloud", - 'Required parameter "cloud" was null or undefined when calling listArtifactV1FlinkArtifacts().', - ); - } - - if (requestParameters["region"] == null) { - throw new runtime.RequiredError( - "region", - 'Required parameter "region" was null or undefined when calling listArtifactV1FlinkArtifacts().', - ); - } - - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling listArtifactV1FlinkArtifacts().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["cloud"] != null) { - queryParameters["cloud"] = requestParameters["cloud"]; - } - - if (requestParameters["region"] != null) { - queryParameters["region"] = requestParameters["region"]; - } - - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; - } - - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; - } - - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - - const response = await this.request( - { - path: `/artifact/v1/flink-artifacts`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ArtifactV1FlinkArtifactListFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. - * List of Flink Artifacts - */ - async listArtifactV1FlinkArtifacts( - requestParameters: ListArtifactV1FlinkArtifactsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listArtifactV1FlinkArtifactsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. - * Update a Flink Artifact - */ - async updateArtifactV1FlinkArtifactRaw( - requestParameters: UpdateArtifactV1FlinkArtifactRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cloud"] == null) { - throw new runtime.RequiredError( - "cloud", - 'Required parameter "cloud" was null or undefined when calling updateArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["region"] == null) { - throw new runtime.RequiredError( - "region", - 'Required parameter "region" was null or undefined when calling updateArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling updateArtifactV1FlinkArtifact().', - ); - } - - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling updateArtifactV1FlinkArtifact().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["cloud"] != null) { - queryParameters["cloud"] = requestParameters["cloud"]; - } - - if (requestParameters["region"] != null) { - queryParameters["region"] = requestParameters["region"]; - } - - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. + * Create a new Flink Artifact. + */ + async createArtifactV1FlinkArtifactRaw(requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cloud'] == null) { + throw new runtime.RequiredError( + 'cloud', + 'Required parameter "cloud" was null or undefined when calling createArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['region'] == null) { + throw new runtime.RequiredError( + 'region', + 'Required parameter "region" was null or undefined when calling createArtifactV1FlinkArtifact().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cloud'] != null) { + queryParameters['cloud'] = requestParameters['cloud']; + } + + if (requestParameters['region'] != null) { + queryParameters['region'] = requestParameters['region']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/artifact/v1/flink-artifacts`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateArtifactV1FlinkArtifactRequestToJSON(requestParameters['CreateArtifactV1FlinkArtifactRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateArtifactV1FlinkArtifact201ResponseFromJSON(jsonValue)); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. + * Create a new Flink Artifact. + */ + async createArtifactV1FlinkArtifact(requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. + * Delete a Flink Artifact + */ + async deleteArtifactV1FlinkArtifactRaw(requestParameters: DeleteArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cloud'] == null) { + throw new runtime.RequiredError( + 'cloud', + 'Required parameter "cloud" was null or undefined when calling deleteArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['region'] == null) { + throw new runtime.RequiredError( + 'region', + 'Required parameter "region" was null or undefined when calling deleteArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling deleteArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteArtifactV1FlinkArtifact().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cloud'] != null) { + queryParameters['cloud'] = requestParameters['cloud']; + } + + if (requestParameters['region'] != null) { + queryParameters['region'] = requestParameters['region']; + } + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/artifact/v1/flink-artifacts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. + * Delete a Flink Artifact + */ + async deleteArtifactV1FlinkArtifact(requestParameters: DeleteArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. + * Read a Flink Artifact + */ + async getArtifactV1FlinkArtifactRaw(requestParameters: GetArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cloud'] == null) { + throw new runtime.RequiredError( + 'cloud', + 'Required parameter "cloud" was null or undefined when calling getArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['region'] == null) { + throw new runtime.RequiredError( + 'region', + 'Required parameter "region" was null or undefined when calling getArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling getArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getArtifactV1FlinkArtifact().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cloud'] != null) { + queryParameters['cloud'] = requestParameters['cloud']; + } + + if (requestParameters['region'] != null) { + queryParameters['region'] = requestParameters['region']; + } + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/artifact/v1/flink-artifacts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue)); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. + * Read a Flink Artifact + */ + async getArtifactV1FlinkArtifact(requestParameters: GetArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. + * List of Flink Artifacts + */ + async listArtifactV1FlinkArtifactsRaw(requestParameters: ListArtifactV1FlinkArtifactsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cloud'] == null) { + throw new runtime.RequiredError( + 'cloud', + 'Required parameter "cloud" was null or undefined when calling listArtifactV1FlinkArtifacts().' + ); + } + + if (requestParameters['region'] == null) { + throw new runtime.RequiredError( + 'region', + 'Required parameter "region" was null or undefined when calling listArtifactV1FlinkArtifacts().' + ); + } + + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling listArtifactV1FlinkArtifacts().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cloud'] != null) { + queryParameters['cloud'] = requestParameters['cloud']; + } + + if (requestParameters['region'] != null) { + queryParameters['region'] = requestParameters['region']; + } + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/artifact/v1/flink-artifacts`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactV1FlinkArtifactListFromJSON(jsonValue)); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. + * List of Flink Artifacts + */ + async listArtifactV1FlinkArtifacts(requestParameters: ListArtifactV1FlinkArtifactsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listArtifactV1FlinkArtifactsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. + * Update a Flink Artifact + */ + async updateArtifactV1FlinkArtifactRaw(requestParameters: UpdateArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cloud'] == null) { + throw new runtime.RequiredError( + 'cloud', + 'Required parameter "cloud" was null or undefined when calling updateArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['region'] == null) { + throw new runtime.RequiredError( + 'region', + 'Required parameter "region" was null or undefined when calling updateArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling updateArtifactV1FlinkArtifact().' + ); + } + + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateArtifactV1FlinkArtifact().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['cloud'] != null) { + queryParameters['cloud'] = requestParameters['cloud']; + } + + if (requestParameters['region'] != null) { + queryParameters['region'] = requestParameters['region']; + } + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/artifact/v1/flink-artifacts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ArtifactV1FlinkArtifactToJSON(requestParameters['ArtifactV1FlinkArtifact']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue)); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. + * Update a Flink Artifact + */ + async updateArtifactV1FlinkArtifact(requestParameters: UpdateArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/artifact/v1/flink-artifacts/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "PATCH", - headers: headerParameters, - query: queryParameters, - body: ArtifactV1FlinkArtifactToJSON(requestParameters["ArtifactV1FlinkArtifact"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. - * Update a Flink Artifact - */ - async updateArtifactV1FlinkArtifact( - requestParameters: UpdateArtifactV1FlinkArtifactRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts b/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts index dcc2eb3943..73278bb4b2 100644 --- a/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts +++ b/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts @@ -5,87 +5,70 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { Failure, PresignedUploadUrlArtifactV1PresignedUrl200Response, PresignedUploadUrlArtifactV1PresignedUrlRequest, -} from "../models/index"; +} from '../models/index'; import { - FailureFromJSON, - FailureToJSON, - PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON, - PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON, - PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON, - PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON, -} from "../models/index"; + FailureFromJSON, + FailureToJSON, + PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON, + PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON, + PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON, + PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON, +} from '../models/index'; export interface PresignedUploadUrlArtifactV1PresignedUrlOperationRequest { - PresignedUploadUrlArtifactV1PresignedUrlRequest?: PresignedUploadUrlArtifactV1PresignedUrlRequest; + PresignedUploadUrlArtifactV1PresignedUrlRequest?: PresignedUploadUrlArtifactV1PresignedUrlRequest; } /** - * + * */ export class PresignedUrlsArtifactV1Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. - * Request a presigned upload URL for a new Flink Artifact. - */ - async presignedUploadUrlArtifactV1PresignedUrlRaw( - requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. + * Request a presigned upload URL for a new Flink Artifact. + */ + async presignedUploadUrlArtifactV1PresignedUrlRaw(requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - headerParameters["Content-Type"] = "application/json"; + const headerParameters: runtime.HTTPHeaders = {}; - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/artifact/v1/presigned-upload-url`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON(requestParameters['PresignedUploadUrlArtifactV1PresignedUrlRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON(jsonValue)); } - const response = await this.request( - { - path: `/artifact/v1/presigned-upload-url`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON( - requestParameters["PresignedUploadUrlArtifactV1PresignedUrlRequest"], - ), - }, - initOverrides, - ); - return new runtime.JSONApiResponse(response, (jsonValue) => - PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON(jsonValue), - ); - } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. + * Request a presigned upload URL for a new Flink Artifact. + */ + async presignedUploadUrlArtifactV1PresignedUrl(requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.presignedUploadUrlArtifactV1PresignedUrlRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. - * Request a presigned upload URL for a new Flink Artifact. - */ - async presignedUploadUrlArtifactV1PresignedUrl( - requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.presignedUploadUrlArtifactV1PresignedUrlRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } } diff --git a/src/clients/flinkArtifacts/apis/index.ts b/src/clients/flinkArtifacts/apis/index.ts index 6c476c429a..41ea99d442 100644 --- a/src/clients/flinkArtifacts/apis/index.ts +++ b/src/clients/flinkArtifacts/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./FlinkArtifactsArtifactV1Api"; -export * from "./PresignedUrlsArtifactV1Api"; +export * from './FlinkArtifactsArtifactV1Api'; +export * from './PresignedUrlsArtifactV1Api'; diff --git a/src/clients/flinkArtifacts/index.ts b/src/clients/flinkArtifacts/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/flinkArtifacts/index.ts +++ b/src/clients/flinkArtifacts/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts index 7f5f957d0f..8d4dcf4740 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts @@ -5,209 +5,198 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; +import { mapValues } from '../runtime'; +import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from "./ArtifactV1FlinkArtifactVersion"; -import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from './ArtifactV1FlinkArtifactVersion'; +import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from './ArtifactV1FlinkArtifactMetadata'; /** * FlinkArtifact objects represent Flink Artifacts on Confluent Cloud. - * - * + * + * * ## The Flink Artifacts Model * * @export * @interface ArtifactV1FlinkArtifact */ export interface ArtifactV1FlinkArtifact { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - readonly api_version?: ArtifactV1FlinkArtifactApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - readonly kind?: ArtifactV1FlinkArtifactKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - readonly id?: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof ArtifactV1FlinkArtifact - */ - metadata?: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - region?: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - environment?: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - display_name?: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof ArtifactV1FlinkArtifact - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof ArtifactV1FlinkArtifact - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + readonly api_version?: ArtifactV1FlinkArtifactApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + readonly kind?: ArtifactV1FlinkArtifactKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + readonly id?: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof ArtifactV1FlinkArtifact + */ + metadata?: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + region?: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + environment?: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + display_name?: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof ArtifactV1FlinkArtifact + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof ArtifactV1FlinkArtifact + */ + versions?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1FlinkArtifactApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1FlinkArtifactKindEnum { - FlinkArtifact = "FlinkArtifact", + FlinkArtifact = 'FlinkArtifact' } + /** * Check if a given object implements the ArtifactV1FlinkArtifact interface. */ export function instanceOfArtifactV1FlinkArtifact(value: object): value is ArtifactV1FlinkArtifact { - return true; + return true; } export function ArtifactV1FlinkArtifactFromJSON(json: any): ArtifactV1FlinkArtifact { - return ArtifactV1FlinkArtifactFromJSONTyped(json, false); + return ArtifactV1FlinkArtifactFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifact { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null - ? undefined - : ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), - cloud: json["cloud"] == null ? undefined : json["cloud"], - region: json["region"] == null ? undefined : json["region"], - environment: json["environment"] == null ? undefined : json["environment"], - display_name: json["display_name"] == null ? undefined : json["display_name"], - _class: json["class"] == null ? undefined : json["class"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - description: json["description"] == null ? undefined : json["description"], - documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], - runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], - versions: - json["versions"] == null - ? undefined - : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), - }; +export function ArtifactV1FlinkArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifact { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), + 'cloud': json['cloud'] == null ? undefined : json['cloud'], + 'region': json['region'] == null ? undefined : json['region'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + '_class': json['class'] == null ? undefined : json['class'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'description': json['description'] == null ? undefined : json['description'], + 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], + 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], + 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), + }; } export function ArtifactV1FlinkArtifactToJSON(json: any): ArtifactV1FlinkArtifact { - return ArtifactV1FlinkArtifactToJSONTyped(json, false); + return ArtifactV1FlinkArtifactToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - display_name: value["display_name"], - class: value["_class"], - content_format: value["content_format"], - description: value["description"], - documentation_link: value["documentation_link"], - runtime_language: value["runtime_language"], - versions: - value["versions"] == null - ? undefined - : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), - }; + return { + + 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + 'display_name': value['display_name'], + 'class': value['_class'], + 'content_format': value['content_format'], + 'description': value['description'], + 'documentation_link': value['documentation_link'], + 'runtime_language': value['runtime_language'], + 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts index 6f40a5afbd..719327dfe0 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts @@ -5,132 +5,122 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1FlinkArtifactListMetadata } from "./ArtifactV1FlinkArtifactListMetadata"; +import { mapValues } from '../runtime'; +import type { ArtifactV1FlinkArtifactListMetadata } from './ArtifactV1FlinkArtifactListMetadata'; import { - ArtifactV1FlinkArtifactListMetadataFromJSON, - ArtifactV1FlinkArtifactListMetadataFromJSONTyped, - ArtifactV1FlinkArtifactListMetadataToJSON, - ArtifactV1FlinkArtifactListMetadataToJSONTyped, -} from "./ArtifactV1FlinkArtifactListMetadata"; -import type { ArtifactV1FlinkArtifactListDataInner } from "./ArtifactV1FlinkArtifactListDataInner"; + ArtifactV1FlinkArtifactListMetadataFromJSON, + ArtifactV1FlinkArtifactListMetadataFromJSONTyped, + ArtifactV1FlinkArtifactListMetadataToJSON, + ArtifactV1FlinkArtifactListMetadataToJSONTyped, +} from './ArtifactV1FlinkArtifactListMetadata'; +import type { ArtifactV1FlinkArtifactListDataInner } from './ArtifactV1FlinkArtifactListDataInner'; import { - ArtifactV1FlinkArtifactListDataInnerFromJSON, - ArtifactV1FlinkArtifactListDataInnerFromJSONTyped, - ArtifactV1FlinkArtifactListDataInnerToJSON, - ArtifactV1FlinkArtifactListDataInnerToJSONTyped, -} from "./ArtifactV1FlinkArtifactListDataInner"; + ArtifactV1FlinkArtifactListDataInnerFromJSON, + ArtifactV1FlinkArtifactListDataInnerFromJSONTyped, + ArtifactV1FlinkArtifactListDataInnerToJSON, + ArtifactV1FlinkArtifactListDataInnerToJSONTyped, +} from './ArtifactV1FlinkArtifactListDataInner'; /** * FlinkArtifact objects represent Flink Artifacts on Confluent Cloud. - * - * + * + * * ## The Flink Artifacts Model * * @export * @interface ArtifactV1FlinkArtifactList */ export interface ArtifactV1FlinkArtifactList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1FlinkArtifactList - */ - readonly api_version: ArtifactV1FlinkArtifactListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1FlinkArtifactList - */ - readonly kind: ArtifactV1FlinkArtifactListKindEnum; - /** - * - * @type {ArtifactV1FlinkArtifactListMetadata} - * @memberof ArtifactV1FlinkArtifactList - */ - metadata: ArtifactV1FlinkArtifactListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof ArtifactV1FlinkArtifactList - */ - data: Set | null; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1FlinkArtifactList + */ + readonly api_version: ArtifactV1FlinkArtifactListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1FlinkArtifactList + */ + readonly kind: ArtifactV1FlinkArtifactListKindEnum; + /** + * + * @type {ArtifactV1FlinkArtifactListMetadata} + * @memberof ArtifactV1FlinkArtifactList + */ + metadata: ArtifactV1FlinkArtifactListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof ArtifactV1FlinkArtifactList + */ + data: Set | null; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1FlinkArtifactListApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1FlinkArtifactListKindEnum { - FlinkArtifactList = "FlinkArtifactList", + FlinkArtifactList = 'FlinkArtifactList' } + /** * Check if a given object implements the ArtifactV1FlinkArtifactList interface. */ -export function instanceOfArtifactV1FlinkArtifactList( - value: object, -): value is ArtifactV1FlinkArtifactList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactList(value: object): value is ArtifactV1FlinkArtifactList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ArtifactV1FlinkArtifactListFromJSON(json: any): ArtifactV1FlinkArtifactList { - return ArtifactV1FlinkArtifactListFromJSONTyped(json, false); + return ArtifactV1FlinkArtifactListFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifactList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ArtifactV1FlinkArtifactListMetadataFromJSON(json["metadata"]), - data: - json["data"] == null - ? null - : new Set((json["data"] as Array).map(ArtifactV1FlinkArtifactListDataInnerFromJSON)), - }; +export function ArtifactV1FlinkArtifactListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ArtifactV1FlinkArtifactListMetadataFromJSON(json['metadata']), + 'data': (json['data'] == null ? null : new Set((json['data'] as Array).map(ArtifactV1FlinkArtifactListDataInnerFromJSON))), + }; } export function ArtifactV1FlinkArtifactListToJSON(json: any): ArtifactV1FlinkArtifactList { - return ArtifactV1FlinkArtifactListToJSONTyped(json, false); + return ArtifactV1FlinkArtifactListToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1FlinkArtifactListMetadataToJSON(value["metadata"]), - data: - value["data"] == null - ? null - : Array.from(value["data"] as Set).map(ArtifactV1FlinkArtifactListDataInnerToJSON), - }; + return { + + 'metadata': ArtifactV1FlinkArtifactListMetadataToJSON(value['metadata']), + 'data': (value['data'] == null ? null : Array.from(value['data'] as Set).map(ArtifactV1FlinkArtifactListDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts index d732ceb258..dbd0438acf 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts @@ -5,214 +5,200 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; +import { mapValues } from '../runtime'; +import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from "./ArtifactV1FlinkArtifactVersion"; -import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from './ArtifactV1FlinkArtifactVersion'; +import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from './ArtifactV1FlinkArtifactMetadata'; /** - * + * * @export * @interface ArtifactV1FlinkArtifactListDataInner */ export interface ArtifactV1FlinkArtifactListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - readonly api_version?: ArtifactV1FlinkArtifactListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - readonly kind?: ArtifactV1FlinkArtifactListDataInnerKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - readonly id: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - metadata: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + readonly api_version?: ArtifactV1FlinkArtifactListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + readonly kind?: ArtifactV1FlinkArtifactListDataInnerKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + readonly id: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + metadata: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + versions?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1FlinkArtifactListDataInnerApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1FlinkArtifactListDataInnerKindEnum { - FlinkArtifact = "FlinkArtifact", + FlinkArtifact = 'FlinkArtifact' } + /** * Check if a given object implements the ArtifactV1FlinkArtifactListDataInner interface. */ -export function instanceOfArtifactV1FlinkArtifactListDataInner( - value: object, -): value is ArtifactV1FlinkArtifactListDataInner { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cloud" in value) || value["cloud"] === undefined) return false; - if (!("region" in value) || value["region"] === undefined) return false; - if (!("environment" in value) || value["environment"] === undefined) return false; - if (!("display_name" in value) || value["display_name"] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactListDataInner(value: object): value is ArtifactV1FlinkArtifactListDataInner { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cloud' in value) || value['cloud'] === undefined) return false; + if (!('region' in value) || value['region'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + if (!('display_name' in value) || value['display_name'] === undefined) return false; + return true; } -export function ArtifactV1FlinkArtifactListDataInnerFromJSON( - json: any, -): ArtifactV1FlinkArtifactListDataInner { - return ArtifactV1FlinkArtifactListDataInnerFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListDataInnerFromJSON(json: any): ArtifactV1FlinkArtifactListDataInner { + return ArtifactV1FlinkArtifactListDataInnerFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifactListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"], - metadata: ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), - cloud: json["cloud"], - region: json["region"], - environment: json["environment"], - display_name: json["display_name"], - _class: json["class"] == null ? undefined : json["class"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - description: json["description"] == null ? undefined : json["description"], - documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], - runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], - versions: - json["versions"] == null - ? undefined - : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), - }; +export function ArtifactV1FlinkArtifactListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'], + 'metadata': ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), + 'cloud': json['cloud'], + 'region': json['region'], + 'environment': json['environment'], + 'display_name': json['display_name'], + '_class': json['class'] == null ? undefined : json['class'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'description': json['description'] == null ? undefined : json['description'], + 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], + 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], + 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), + }; } -export function ArtifactV1FlinkArtifactListDataInnerToJSON( - json: any, -): ArtifactV1FlinkArtifactListDataInner { - return ArtifactV1FlinkArtifactListDataInnerToJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListDataInnerToJSON(json: any): ArtifactV1FlinkArtifactListDataInner { + return ArtifactV1FlinkArtifactListDataInnerToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListDataInnerToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - display_name: value["display_name"], - class: value["_class"], - content_format: value["content_format"], - description: value["description"], - documentation_link: value["documentation_link"], - runtime_language: value["runtime_language"], - versions: - value["versions"] == null - ? undefined - : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), - }; + return { + + 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + 'display_name': value['display_name'], + 'class': value['_class'], + 'content_format': value['content_format'], + 'description': value['description'], + 'documentation_link': value['documentation_link'], + 'runtime_language': value['runtime_language'], + 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts index fc8af69a52..5ddb6c8a63 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts @@ -5,102 +5,93 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ArtifactV1FlinkArtifactListMetadata */ export interface ArtifactV1FlinkArtifactListMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + total_size?: number; } /** * Check if a given object implements the ArtifactV1FlinkArtifactListMetadata interface. */ -export function instanceOfArtifactV1FlinkArtifactListMetadata( - value: object, -): value is ArtifactV1FlinkArtifactListMetadata { - return true; +export function instanceOfArtifactV1FlinkArtifactListMetadata(value: object): value is ArtifactV1FlinkArtifactListMetadata { + return true; } -export function ArtifactV1FlinkArtifactListMetadataFromJSON( - json: any, -): ArtifactV1FlinkArtifactListMetadata { - return ArtifactV1FlinkArtifactListMetadataFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListMetadataFromJSON(json: any): ArtifactV1FlinkArtifactListMetadata { + return ArtifactV1FlinkArtifactListMetadataFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifactListMetadata { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; +export function ArtifactV1FlinkArtifactListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactListMetadata { + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } -export function ArtifactV1FlinkArtifactListMetadataToJSON( - json: any, -): ArtifactV1FlinkArtifactListMetadata { - return ArtifactV1FlinkArtifactListMetadataToJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListMetadataToJSON(json: any): ArtifactV1FlinkArtifactListMetadata { + return ArtifactV1FlinkArtifactListMetadataToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListMetadataToJSONTyped( - value?: ArtifactV1FlinkArtifactListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactListMetadataToJSONTyped(value?: ArtifactV1FlinkArtifactListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts index 19e142f6c4..b8b6f8552a 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts @@ -5,98 +5,91 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ArtifactV1FlinkArtifactMetadata */ export interface ArtifactV1FlinkArtifactMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ArtifactV1FlinkArtifactMetadata interface. */ -export function instanceOfArtifactV1FlinkArtifactMetadata( - value: object, -): value is ArtifactV1FlinkArtifactMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactMetadata(value: object): value is ArtifactV1FlinkArtifactMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } -export function ArtifactV1FlinkArtifactMetadataFromJSON( - json: any, -): ArtifactV1FlinkArtifactMetadata { - return ArtifactV1FlinkArtifactMetadataFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactMetadataFromJSON(json: any): ArtifactV1FlinkArtifactMetadata { + return ArtifactV1FlinkArtifactMetadataFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifactMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function ArtifactV1FlinkArtifactMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function ArtifactV1FlinkArtifactMetadataToJSON(json: any): ArtifactV1FlinkArtifactMetadata { - return ArtifactV1FlinkArtifactMetadataToJSONTyped(json, false); + return ArtifactV1FlinkArtifactMetadataToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactMetadataToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts index d17950a826..ade6394d3e 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts @@ -5,117 +5,112 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1FlinkArtifactVersionUploadSource } from "./ArtifactV1FlinkArtifactVersionUploadSource"; +import { mapValues } from '../runtime'; +import type { ArtifactV1FlinkArtifactVersionUploadSource } from './ArtifactV1FlinkArtifactVersionUploadSource'; import { - ArtifactV1FlinkArtifactVersionUploadSourceFromJSON, - ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped, - ArtifactV1FlinkArtifactVersionUploadSourceToJSON, - ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped, -} from "./ArtifactV1FlinkArtifactVersionUploadSource"; -import type { ArtifactV1FlinkArtifact } from "./ArtifactV1FlinkArtifact"; + ArtifactV1FlinkArtifactVersionUploadSourceFromJSON, + ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped, + ArtifactV1FlinkArtifactVersionUploadSourceToJSON, + ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped, +} from './ArtifactV1FlinkArtifactVersionUploadSource'; +import type { ArtifactV1FlinkArtifact } from './ArtifactV1FlinkArtifact'; import { - ArtifactV1FlinkArtifactFromJSON, - ArtifactV1FlinkArtifactFromJSONTyped, - ArtifactV1FlinkArtifactToJSON, - ArtifactV1FlinkArtifactToJSONTyped, -} from "./ArtifactV1FlinkArtifact"; + ArtifactV1FlinkArtifactFromJSON, + ArtifactV1FlinkArtifactFromJSONTyped, + ArtifactV1FlinkArtifactToJSON, + ArtifactV1FlinkArtifactToJSONTyped, +} from './ArtifactV1FlinkArtifact'; /** * Version of the Flink Artifact - * + * * @export * @interface ArtifactV1FlinkArtifactVersion */ export interface ArtifactV1FlinkArtifactVersion { - /** - * Version id of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactVersion - */ - version: string; - /** - * Release Notes of the Flink Artifact version. - * @type {string} - * @memberof ArtifactV1FlinkArtifactVersion - */ - release_notes?: string; - /** - * Flag to specify stability of the version - * @type {boolean} - * @memberof ArtifactV1FlinkArtifactVersion - */ - is_beta?: boolean; - /** - * The Flink Artifact this version belongs to. - * @type {ArtifactV1FlinkArtifact} - * @memberof ArtifactV1FlinkArtifactVersion - */ - artifact_id: ArtifactV1FlinkArtifact; - /** - * - * @type {ArtifactV1FlinkArtifactVersionUploadSource} - * @memberof ArtifactV1FlinkArtifactVersion - */ - upload_source: ArtifactV1FlinkArtifactVersionUploadSource; + /** + * Version id of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactVersion + */ + version: string; + /** + * Release Notes of the Flink Artifact version. + * @type {string} + * @memberof ArtifactV1FlinkArtifactVersion + */ + release_notes?: string; + /** + * Flag to specify stability of the version + * @type {boolean} + * @memberof ArtifactV1FlinkArtifactVersion + */ + is_beta?: boolean; + /** + * The Flink Artifact this version belongs to. + * @type {ArtifactV1FlinkArtifact} + * @memberof ArtifactV1FlinkArtifactVersion + */ + artifact_id: ArtifactV1FlinkArtifact; + /** + * + * @type {ArtifactV1FlinkArtifactVersionUploadSource} + * @memberof ArtifactV1FlinkArtifactVersion + */ + upload_source: ArtifactV1FlinkArtifactVersionUploadSource; } /** * Check if a given object implements the ArtifactV1FlinkArtifactVersion interface. */ -export function instanceOfArtifactV1FlinkArtifactVersion( - value: object, -): value is ArtifactV1FlinkArtifactVersion { - if (!("version" in value) || value["version"] === undefined) return false; - if (!("artifact_id" in value) || value["artifact_id"] === undefined) return false; - if (!("upload_source" in value) || value["upload_source"] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactVersion(value: object): value is ArtifactV1FlinkArtifactVersion { + if (!('version' in value) || value['version'] === undefined) return false; + if (!('artifact_id' in value) || value['artifact_id'] === undefined) return false; + if (!('upload_source' in value) || value['upload_source'] === undefined) return false; + return true; } export function ArtifactV1FlinkArtifactVersionFromJSON(json: any): ArtifactV1FlinkArtifactVersion { - return ArtifactV1FlinkArtifactVersionFromJSONTyped(json, false); + return ArtifactV1FlinkArtifactVersionFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifactVersion { - if (json == null) { - return json; - } - return { - version: json["version"], - release_notes: json["release_notes"] == null ? undefined : json["release_notes"], - is_beta: json["is_beta"] == null ? undefined : json["is_beta"], - artifact_id: ArtifactV1FlinkArtifactFromJSON(json["artifact_id"]), - upload_source: ArtifactV1FlinkArtifactVersionUploadSourceFromJSON(json["upload_source"]), - }; +export function ArtifactV1FlinkArtifactVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactVersion { + if (json == null) { + return json; + } + return { + + 'version': json['version'], + 'release_notes': json['release_notes'] == null ? undefined : json['release_notes'], + 'is_beta': json['is_beta'] == null ? undefined : json['is_beta'], + 'artifact_id': ArtifactV1FlinkArtifactFromJSON(json['artifact_id']), + 'upload_source': ArtifactV1FlinkArtifactVersionUploadSourceFromJSON(json['upload_source']), + }; } export function ArtifactV1FlinkArtifactVersionToJSON(json: any): ArtifactV1FlinkArtifactVersion { - return ArtifactV1FlinkArtifactVersionToJSONTyped(json, false); + return ArtifactV1FlinkArtifactVersionToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionToJSONTyped( - value?: ArtifactV1FlinkArtifactVersion | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactVersionToJSONTyped(value?: ArtifactV1FlinkArtifactVersion | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - version: value["version"], - release_notes: value["release_notes"], - is_beta: value["is_beta"], - artifact_id: ArtifactV1FlinkArtifactToJSON(value["artifact_id"]), - upload_source: ArtifactV1FlinkArtifactVersionUploadSourceToJSON(value["upload_source"]), - }; + return { + + 'version': value['version'], + 'release_notes': value['release_notes'], + 'is_beta': value['is_beta'], + 'artifact_id': ArtifactV1FlinkArtifactToJSON(value['artifact_id']), + 'upload_source': ArtifactV1FlinkArtifactVersionUploadSourceToJSON(value['upload_source']), + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts index 8609a3593c..e3790aaa63 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts @@ -5,74 +5,58 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { ArtifactV1UploadSourcePresignedUrl } from "./ArtifactV1UploadSourcePresignedUrl"; +import type { ArtifactV1UploadSourcePresignedUrl } from './ArtifactV1UploadSourcePresignedUrl'; import { - instanceOfArtifactV1UploadSourcePresignedUrl, - ArtifactV1UploadSourcePresignedUrlFromJSON, - ArtifactV1UploadSourcePresignedUrlFromJSONTyped, - ArtifactV1UploadSourcePresignedUrlToJSON, -} from "./ArtifactV1UploadSourcePresignedUrl"; + instanceOfArtifactV1UploadSourcePresignedUrl, + ArtifactV1UploadSourcePresignedUrlFromJSON, + ArtifactV1UploadSourcePresignedUrlFromJSONTyped, + ArtifactV1UploadSourcePresignedUrlToJSON, +} from './ArtifactV1UploadSourcePresignedUrl'; /** * @type ArtifactV1FlinkArtifactVersionUploadSource * Upload source of the Flink Artifact Version. * @export */ -export type ArtifactV1FlinkArtifactVersionUploadSource = { - location: "PRESIGNED_URL_LOCATION"; -} & ArtifactV1UploadSourcePresignedUrl; +export type ArtifactV1FlinkArtifactVersionUploadSource = { location: 'PRESIGNED_URL_LOCATION' } & ArtifactV1UploadSourcePresignedUrl; -export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSON( - json: any, -): ArtifactV1FlinkArtifactVersionUploadSource { - return ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSON(json: any): ArtifactV1FlinkArtifactVersionUploadSource { + return ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1FlinkArtifactVersionUploadSource { - if (json == null) { - return json; - } - switch (json["location"]) { - case "PRESIGNED_URL_LOCATION": - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { - location: "PRESIGNED_URL_LOCATION", - } as const); - default: - throw new Error( - `No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${json["location"]}'`, - ); - } +export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactVersionUploadSource { + if (json == null) { + return json; + } + switch (json['location']) { + case 'PRESIGNED_URL_LOCATION': + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { location: 'PRESIGNED_URL_LOCATION' } as const); + default: + throw new Error(`No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${json['location']}'`); + } } export function ArtifactV1FlinkArtifactVersionUploadSourceToJSON(json: any): any { - return ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped(json, false); + return ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped( - value?: ArtifactV1FlinkArtifactVersionUploadSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } - switch (value["location"]) { - case "PRESIGNED_URL_LOCATION": - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { - location: "PRESIGNED_URL_LOCATION", - } as const); - default: - throw new Error( - `No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${value["location"]}'`, - ); - } +export function ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped(value?: ArtifactV1FlinkArtifactVersionUploadSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['location']) { + case 'PRESIGNED_URL_LOCATION': + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { location: 'PRESIGNED_URL_LOCATION' } as const); + default: + throw new Error(`No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${value['location']}'`); + } + } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts index a6b2dd9ea1..f759143168 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts @@ -5,150 +5,138 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Request a presigned upload URL for new Flink Artifact. Note that * the URL policy expires in one hour. If the policy expires, you can request * a new presigned upload URL. - * - * + * + * * ## The Presigned Urls Model * * @export * @interface ArtifactV1PresignedUrl */ export interface ArtifactV1PresignedUrl { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly api_version?: ArtifactV1PresignedUrlApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly kind?: ArtifactV1PresignedUrlKindEnum; - /** - * Content format of the Flink Artifact archive. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly content_format?: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly region?: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly environment?: string; - /** - * Unique identifier of this upload. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly upload_id?: string; - /** - * Upload URL for the Flink Artifact archive. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly upload_url?: string; - /** - * Upload form data of the Flink Artifact. All values should be strings. - * @type {object} - * @memberof ArtifactV1PresignedUrl - */ - readonly upload_form_data?: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly api_version?: ArtifactV1PresignedUrlApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly kind?: ArtifactV1PresignedUrlKindEnum; + /** + * Content format of the Flink Artifact archive. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly content_format?: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly region?: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly environment?: string; + /** + * Unique identifier of this upload. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly upload_id?: string; + /** + * Upload URL for the Flink Artifact archive. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly upload_url?: string; + /** + * Upload form data of the Flink Artifact. All values should be strings. + * @type {object} + * @memberof ArtifactV1PresignedUrl + */ + readonly upload_form_data?: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1PresignedUrlApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1PresignedUrlKindEnum { - PresignedUrl = "PresignedUrl", + PresignedUrl = 'PresignedUrl' } + /** * Check if a given object implements the ArtifactV1PresignedUrl interface. */ export function instanceOfArtifactV1PresignedUrl(value: object): value is ArtifactV1PresignedUrl { - return true; + return true; } export function ArtifactV1PresignedUrlFromJSON(json: any): ArtifactV1PresignedUrl { - return ArtifactV1PresignedUrlFromJSONTyped(json, false); + return ArtifactV1PresignedUrlFromJSONTyped(json, false); } -export function ArtifactV1PresignedUrlFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1PresignedUrl { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - cloud: json["cloud"] == null ? undefined : json["cloud"], - region: json["region"] == null ? undefined : json["region"], - environment: json["environment"] == null ? undefined : json["environment"], - upload_id: json["upload_id"] == null ? undefined : json["upload_id"], - upload_url: json["upload_url"] == null ? undefined : json["upload_url"], - upload_form_data: json["upload_form_data"] == null ? undefined : json["upload_form_data"], - }; +export function ArtifactV1PresignedUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1PresignedUrl { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'cloud': json['cloud'] == null ? undefined : json['cloud'], + 'region': json['region'] == null ? undefined : json['region'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'upload_id': json['upload_id'] == null ? undefined : json['upload_id'], + 'upload_url': json['upload_url'] == null ? undefined : json['upload_url'], + 'upload_form_data': json['upload_form_data'] == null ? undefined : json['upload_form_data'], + }; } export function ArtifactV1PresignedUrlToJSON(json: any): ArtifactV1PresignedUrl { - return ArtifactV1PresignedUrlToJSONTyped(json, false); + return ArtifactV1PresignedUrlToJSONTyped(json, false); } -export function ArtifactV1PresignedUrlToJSONTyped( - value?: Omit< - ArtifactV1PresignedUrl, - | "api_version" - | "kind" - | "content_format" - | "cloud" - | "region" - | "environment" - | "upload_id" - | "upload_url" - | "upload_form_data" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1PresignedUrlToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts index c76cd5e156..9e6990aba5 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts @@ -5,146 +5,139 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1PresignedUrlRequestMetadata } from "./ArtifactV1PresignedUrlRequestMetadata"; +import { mapValues } from '../runtime'; +import type { ArtifactV1PresignedUrlRequestMetadata } from './ArtifactV1PresignedUrlRequestMetadata'; import { - ArtifactV1PresignedUrlRequestMetadataFromJSON, - ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, - ArtifactV1PresignedUrlRequestMetadataToJSON, - ArtifactV1PresignedUrlRequestMetadataToJSONTyped, -} from "./ArtifactV1PresignedUrlRequestMetadata"; + ArtifactV1PresignedUrlRequestMetadataFromJSON, + ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, + ArtifactV1PresignedUrlRequestMetadataToJSON, + ArtifactV1PresignedUrlRequestMetadataToJSONTyped, +} from './ArtifactV1PresignedUrlRequestMetadata'; /** * Request schema of the presigned upload URL. - * + * * @export * @interface ArtifactV1PresignedUrlRequest */ export interface ArtifactV1PresignedUrlRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - readonly api_version?: ArtifactV1PresignedUrlRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - readonly kind?: ArtifactV1PresignedUrlRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - readonly id?: string; - /** - * - * @type {ArtifactV1PresignedUrlRequestMetadata} - * @memberof ArtifactV1PresignedUrlRequest - */ - metadata?: ArtifactV1PresignedUrlRequestMetadata; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - content_format?: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - region?: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - environment?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + readonly api_version?: ArtifactV1PresignedUrlRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + readonly kind?: ArtifactV1PresignedUrlRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + readonly id?: string; + /** + * + * @type {ArtifactV1PresignedUrlRequestMetadata} + * @memberof ArtifactV1PresignedUrlRequest + */ + metadata?: ArtifactV1PresignedUrlRequestMetadata; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + content_format?: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + region?: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + environment?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1PresignedUrlRequestApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1PresignedUrlRequestKindEnum { - PresignedUrlRequest = "PresignedUrlRequest", + PresignedUrlRequest = 'PresignedUrlRequest' } + /** * Check if a given object implements the ArtifactV1PresignedUrlRequest interface. */ -export function instanceOfArtifactV1PresignedUrlRequest( - value: object, -): value is ArtifactV1PresignedUrlRequest { - return true; +export function instanceOfArtifactV1PresignedUrlRequest(value: object): value is ArtifactV1PresignedUrlRequest { + return true; } export function ArtifactV1PresignedUrlRequestFromJSON(json: any): ArtifactV1PresignedUrlRequest { - return ArtifactV1PresignedUrlRequestFromJSONTyped(json, false); + return ArtifactV1PresignedUrlRequestFromJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1PresignedUrlRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null - ? undefined - : ArtifactV1PresignedUrlRequestMetadataFromJSON(json["metadata"]), - content_format: json["content_format"] == null ? undefined : json["content_format"], - cloud: json["cloud"] == null ? undefined : json["cloud"], - region: json["region"] == null ? undefined : json["region"], - environment: json["environment"] == null ? undefined : json["environment"], - }; +export function ArtifactV1PresignedUrlRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1PresignedUrlRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : ArtifactV1PresignedUrlRequestMetadataFromJSON(json['metadata']), + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'cloud': json['cloud'] == null ? undefined : json['cloud'], + 'region': json['region'] == null ? undefined : json['region'], + 'environment': json['environment'] == null ? undefined : json['environment'], + }; } export function ArtifactV1PresignedUrlRequestToJSON(json: any): ArtifactV1PresignedUrlRequest { - return ArtifactV1PresignedUrlRequestToJSONTyped(json, false); + return ArtifactV1PresignedUrlRequestToJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1PresignedUrlRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1PresignedUrlRequestMetadataToJSON(value["metadata"]), - content_format: value["content_format"], - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - }; + return { + + 'metadata': ArtifactV1PresignedUrlRequestMetadataToJSON(value['metadata']), + 'content_format': value['content_format'], + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts index 864beec4e0..c9d9511240 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts @@ -5,103 +5,91 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ArtifactV1PresignedUrlRequestMetadata */ export interface ArtifactV1PresignedUrlRequestMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ArtifactV1PresignedUrlRequestMetadata interface. */ -export function instanceOfArtifactV1PresignedUrlRequestMetadata( - value: object, -): value is ArtifactV1PresignedUrlRequestMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfArtifactV1PresignedUrlRequestMetadata(value: object): value is ArtifactV1PresignedUrlRequestMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } -export function ArtifactV1PresignedUrlRequestMetadataFromJSON( - json: any, -): ArtifactV1PresignedUrlRequestMetadata { - return ArtifactV1PresignedUrlRequestMetadataFromJSONTyped(json, false); +export function ArtifactV1PresignedUrlRequestMetadataFromJSON(json: any): ArtifactV1PresignedUrlRequestMetadata { + return ArtifactV1PresignedUrlRequestMetadataFromJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1PresignedUrlRequestMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function ArtifactV1PresignedUrlRequestMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1PresignedUrlRequestMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } -export function ArtifactV1PresignedUrlRequestMetadataToJSON( - json: any, -): ArtifactV1PresignedUrlRequestMetadata { - return ArtifactV1PresignedUrlRequestMetadataToJSONTyped(json, false); +export function ArtifactV1PresignedUrlRequestMetadataToJSON(json: any): ArtifactV1PresignedUrlRequestMetadata { + return ArtifactV1PresignedUrlRequestMetadataToJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestMetadataToJSONTyped( - value?: Omit< - ArtifactV1PresignedUrlRequestMetadata, - "created_at" | "updated_at" | "deleted_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1PresignedUrlRequestMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts index 908d74839f..bbff0f7a26 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts @@ -5,140 +5,129 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1UploadSourcePresignedUrlMetadata } from "./ArtifactV1UploadSourcePresignedUrlMetadata"; +import { mapValues } from '../runtime'; +import type { ArtifactV1UploadSourcePresignedUrlMetadata } from './ArtifactV1UploadSourcePresignedUrlMetadata'; import { - ArtifactV1UploadSourcePresignedUrlMetadataFromJSON, - ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped, - ArtifactV1UploadSourcePresignedUrlMetadataToJSON, - ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped, -} from "./ArtifactV1UploadSourcePresignedUrlMetadata"; + ArtifactV1UploadSourcePresignedUrlMetadataFromJSON, + ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped, + ArtifactV1UploadSourcePresignedUrlMetadataToJSON, + ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped, +} from './ArtifactV1UploadSourcePresignedUrlMetadata'; /** * Request a presigned upload URL for new Flink Artifact. Note that * the URL policy expires in one hour. If the policy expires, you can request * a new presigned upload URL. - * - * + * + * * ## The Presigned Urls Model * * @export * @interface ArtifactV1UploadSourcePresignedUrl */ export interface ArtifactV1UploadSourcePresignedUrl { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - readonly api_version?: ArtifactV1UploadSourcePresignedUrlApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - readonly kind?: ArtifactV1UploadSourcePresignedUrlKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - readonly id?: string; - /** - * - * @type {ArtifactV1UploadSourcePresignedUrlMetadata} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - metadata?: ArtifactV1UploadSourcePresignedUrlMetadata; - /** - * Location of the Flink Artifact source. - * - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - location?: string; - /** - * Upload ID returned by the `/presigned-upload-url` API. This field returns an empty string in all responses. - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - upload_id?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + readonly api_version?: ArtifactV1UploadSourcePresignedUrlApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + readonly kind?: ArtifactV1UploadSourcePresignedUrlKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + readonly id?: string; + /** + * + * @type {ArtifactV1UploadSourcePresignedUrlMetadata} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + metadata?: ArtifactV1UploadSourcePresignedUrlMetadata; + /** + * Location of the Flink Artifact source. + * + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + location?: string; + /** + * Upload ID returned by the `/presigned-upload-url` API. This field returns an empty string in all responses. + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + upload_id?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1UploadSourcePresignedUrlApiVersionEnum { - ArtifactV1UploadSource = "artifact.v1/UploadSource", + ArtifactV1UploadSource = 'artifact.v1/UploadSource' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ArtifactV1UploadSourcePresignedUrlKindEnum { - PresignedUrl = "PresignedUrl", + PresignedUrl = 'PresignedUrl' } + /** * Check if a given object implements the ArtifactV1UploadSourcePresignedUrl interface. */ -export function instanceOfArtifactV1UploadSourcePresignedUrl( - value: object, -): value is ArtifactV1UploadSourcePresignedUrl { - return true; +export function instanceOfArtifactV1UploadSourcePresignedUrl(value: object): value is ArtifactV1UploadSourcePresignedUrl { + return true; } -export function ArtifactV1UploadSourcePresignedUrlFromJSON( - json: any, -): ArtifactV1UploadSourcePresignedUrl { - return ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlFromJSON(json: any): ArtifactV1UploadSourcePresignedUrl { + return ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1UploadSourcePresignedUrl { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null - ? undefined - : ArtifactV1UploadSourcePresignedUrlMetadataFromJSON(json["metadata"]), - location: json["location"] == null ? undefined : json["location"], - upload_id: json["upload_id"] == null ? undefined : json["upload_id"], - }; +export function ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1UploadSourcePresignedUrl { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : ArtifactV1UploadSourcePresignedUrlMetadataFromJSON(json['metadata']), + 'location': json['location'] == null ? undefined : json['location'], + 'upload_id': json['upload_id'] == null ? undefined : json['upload_id'], + }; } -export function ArtifactV1UploadSourcePresignedUrlToJSON( - json: any, -): ArtifactV1UploadSourcePresignedUrl { - return ArtifactV1UploadSourcePresignedUrlToJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlToJSON(json: any): ArtifactV1UploadSourcePresignedUrl { + return ArtifactV1UploadSourcePresignedUrlToJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1UploadSourcePresignedUrlToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1UploadSourcePresignedUrlMetadataToJSON(value["metadata"]), - location: value["location"], - upload_id: value["upload_id"], - }; + return { + + 'metadata': ArtifactV1UploadSourcePresignedUrlMetadataToJSON(value['metadata']), + 'location': value['location'], + 'upload_id': value['upload_id'], + }; } + diff --git a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts index 0271ccbe31..5d94b630e7 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts @@ -5,103 +5,91 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ArtifactV1UploadSourcePresignedUrlMetadata */ export interface ArtifactV1UploadSourcePresignedUrlMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ArtifactV1UploadSourcePresignedUrlMetadata interface. */ -export function instanceOfArtifactV1UploadSourcePresignedUrlMetadata( - value: object, -): value is ArtifactV1UploadSourcePresignedUrlMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfArtifactV1UploadSourcePresignedUrlMetadata(value: object): value is ArtifactV1UploadSourcePresignedUrlMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } -export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSON( - json: any, -): ArtifactV1UploadSourcePresignedUrlMetadata { - return ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSON(json: any): ArtifactV1UploadSourcePresignedUrlMetadata { + return ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ArtifactV1UploadSourcePresignedUrlMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1UploadSourcePresignedUrlMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } -export function ArtifactV1UploadSourcePresignedUrlMetadataToJSON( - json: any, -): ArtifactV1UploadSourcePresignedUrlMetadata { - return ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlMetadataToJSON(json: any): ArtifactV1UploadSourcePresignedUrlMetadata { + return ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped( - value?: Omit< - ArtifactV1UploadSourcePresignedUrlMetadata, - "created_at" | "updated_at" | "deleted_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts index 9a84ec2e6a..9bbe3d0948 100644 --- a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts +++ b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts @@ -5,215 +5,198 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; +import { mapValues } from '../runtime'; +import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from "./ArtifactV1FlinkArtifactVersion"; -import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from './ArtifactV1FlinkArtifactVersion'; +import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from './ArtifactV1FlinkArtifactMetadata'; /** - * + * * @export * @interface CreateArtifactV1FlinkArtifact201Response */ export interface CreateArtifactV1FlinkArtifact201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - readonly api_version?: CreateArtifactV1FlinkArtifact201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - readonly kind?: CreateArtifactV1FlinkArtifact201ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - readonly id?: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - metadata?: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + readonly api_version?: CreateArtifactV1FlinkArtifact201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + readonly kind?: CreateArtifactV1FlinkArtifact201ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + readonly id?: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + metadata?: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + versions?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateArtifactV1FlinkArtifact201ResponseApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateArtifactV1FlinkArtifact201ResponseKindEnum { - FlinkArtifact = "FlinkArtifact", + FlinkArtifact = 'FlinkArtifact' } + /** * Check if a given object implements the CreateArtifactV1FlinkArtifact201Response interface. */ -export function instanceOfCreateArtifactV1FlinkArtifact201Response( - value: object, -): value is CreateArtifactV1FlinkArtifact201Response { - if (!("cloud" in value) || value["cloud"] === undefined) return false; - if (!("region" in value) || value["region"] === undefined) return false; - if (!("environment" in value) || value["environment"] === undefined) return false; - if (!("display_name" in value) || value["display_name"] === undefined) return false; - return true; +export function instanceOfCreateArtifactV1FlinkArtifact201Response(value: object): value is CreateArtifactV1FlinkArtifact201Response { + if (!('cloud' in value) || value['cloud'] === undefined) return false; + if (!('region' in value) || value['region'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + if (!('display_name' in value) || value['display_name'] === undefined) return false; + return true; } -export function CreateArtifactV1FlinkArtifact201ResponseFromJSON( - json: any, -): CreateArtifactV1FlinkArtifact201Response { - return CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifact201ResponseFromJSON(json: any): CreateArtifactV1FlinkArtifact201Response { + return CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateArtifactV1FlinkArtifact201Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null - ? undefined - : ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), - cloud: json["cloud"], - region: json["region"], - environment: json["environment"], - display_name: json["display_name"], - _class: json["class"] == null ? undefined : json["class"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - description: json["description"] == null ? undefined : json["description"], - documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], - runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], - versions: - json["versions"] == null - ? undefined - : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), - }; +export function CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateArtifactV1FlinkArtifact201Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), + 'cloud': json['cloud'], + 'region': json['region'], + 'environment': json['environment'], + 'display_name': json['display_name'], + '_class': json['class'] == null ? undefined : json['class'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'description': json['description'] == null ? undefined : json['description'], + 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], + 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], + 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), + }; } -export function CreateArtifactV1FlinkArtifact201ResponseToJSON( - json: any, -): CreateArtifactV1FlinkArtifact201Response { - return CreateArtifactV1FlinkArtifact201ResponseToJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifact201ResponseToJSON(json: any): CreateArtifactV1FlinkArtifact201Response { + return CreateArtifactV1FlinkArtifact201ResponseToJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifact201ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateArtifactV1FlinkArtifact201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - display_name: value["display_name"], - class: value["_class"], - content_format: value["content_format"], - description: value["description"], - documentation_link: value["documentation_link"], - runtime_language: value["runtime_language"], - versions: - value["versions"] == null - ? undefined - : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), - }; + return { + + 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + 'display_name': value['display_name'], + 'class': value['_class'], + 'content_format': value['content_format'], + 'description': value['description'], + 'documentation_link': value['documentation_link'], + 'runtime_language': value['runtime_language'], + 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), + }; } + diff --git a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts index 28f263cb0e..471f386390 100644 --- a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts +++ b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts @@ -5,156 +5,147 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CreateArtifactV1FlinkArtifactRequestUploadSource } from "./CreateArtifactV1FlinkArtifactRequestUploadSource"; +import { mapValues } from '../runtime'; +import type { CreateArtifactV1FlinkArtifactRequestUploadSource } from './CreateArtifactV1FlinkArtifactRequestUploadSource'; import { - CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON, - CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped, - CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON, - CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped, -} from "./CreateArtifactV1FlinkArtifactRequestUploadSource"; + CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON, + CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped, + CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON, + CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped, +} from './CreateArtifactV1FlinkArtifactRequestUploadSource'; /** - * + * * @export * @interface CreateArtifactV1FlinkArtifactRequest */ export interface CreateArtifactV1FlinkArtifactRequest { - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - runtime_language?: string; - /** - * - * @type {CreateArtifactV1FlinkArtifactRequestUploadSource} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - upload_source: CreateArtifactV1FlinkArtifactRequestUploadSource; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + runtime_language?: string; + /** + * + * @type {CreateArtifactV1FlinkArtifactRequestUploadSource} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + upload_source: CreateArtifactV1FlinkArtifactRequestUploadSource; } /** * Check if a given object implements the CreateArtifactV1FlinkArtifactRequest interface. */ -export function instanceOfCreateArtifactV1FlinkArtifactRequest( - value: object, -): value is CreateArtifactV1FlinkArtifactRequest { - if (!("cloud" in value) || value["cloud"] === undefined) return false; - if (!("region" in value) || value["region"] === undefined) return false; - if (!("environment" in value) || value["environment"] === undefined) return false; - if (!("display_name" in value) || value["display_name"] === undefined) return false; - if (!("upload_source" in value) || value["upload_source"] === undefined) return false; - return true; +export function instanceOfCreateArtifactV1FlinkArtifactRequest(value: object): value is CreateArtifactV1FlinkArtifactRequest { + if (!('cloud' in value) || value['cloud'] === undefined) return false; + if (!('region' in value) || value['region'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + if (!('display_name' in value) || value['display_name'] === undefined) return false; + if (!('upload_source' in value) || value['upload_source'] === undefined) return false; + return true; } -export function CreateArtifactV1FlinkArtifactRequestFromJSON( - json: any, -): CreateArtifactV1FlinkArtifactRequest { - return CreateArtifactV1FlinkArtifactRequestFromJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifactRequestFromJSON(json: any): CreateArtifactV1FlinkArtifactRequest { + return CreateArtifactV1FlinkArtifactRequestFromJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateArtifactV1FlinkArtifactRequest { - if (json == null) { - return json; - } - return { - cloud: json["cloud"], - region: json["region"], - environment: json["environment"], - display_name: json["display_name"], - _class: json["class"] == null ? undefined : json["class"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - description: json["description"] == null ? undefined : json["description"], - documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], - runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], - upload_source: CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON(json["upload_source"]), - }; +export function CreateArtifactV1FlinkArtifactRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateArtifactV1FlinkArtifactRequest { + if (json == null) { + return json; + } + return { + + 'cloud': json['cloud'], + 'region': json['region'], + 'environment': json['environment'], + 'display_name': json['display_name'], + '_class': json['class'] == null ? undefined : json['class'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'description': json['description'] == null ? undefined : json['description'], + 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], + 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], + 'upload_source': CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON(json['upload_source']), + }; } -export function CreateArtifactV1FlinkArtifactRequestToJSON( - json: any, -): CreateArtifactV1FlinkArtifactRequest { - return CreateArtifactV1FlinkArtifactRequestToJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifactRequestToJSON(json: any): CreateArtifactV1FlinkArtifactRequest { + return CreateArtifactV1FlinkArtifactRequestToJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestToJSONTyped( - value?: CreateArtifactV1FlinkArtifactRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateArtifactV1FlinkArtifactRequestToJSONTyped(value?: CreateArtifactV1FlinkArtifactRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - display_name: value["display_name"], - class: value["_class"], - content_format: value["content_format"], - description: value["description"], - documentation_link: value["documentation_link"], - runtime_language: value["runtime_language"], - upload_source: CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON(value["upload_source"]), - }; + return { + + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + 'display_name': value['display_name'], + 'class': value['_class'], + 'content_format': value['content_format'], + 'description': value['description'], + 'documentation_link': value['documentation_link'], + 'runtime_language': value['runtime_language'], + 'upload_source': CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON(value['upload_source']), + }; } + diff --git a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts index 2359f92597..90af3c7b4e 100644 --- a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts +++ b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts @@ -5,74 +5,58 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { ArtifactV1UploadSourcePresignedUrl } from "./ArtifactV1UploadSourcePresignedUrl"; +import type { ArtifactV1UploadSourcePresignedUrl } from './ArtifactV1UploadSourcePresignedUrl'; import { - instanceOfArtifactV1UploadSourcePresignedUrl, - ArtifactV1UploadSourcePresignedUrlFromJSON, - ArtifactV1UploadSourcePresignedUrlFromJSONTyped, - ArtifactV1UploadSourcePresignedUrlToJSON, -} from "./ArtifactV1UploadSourcePresignedUrl"; + instanceOfArtifactV1UploadSourcePresignedUrl, + ArtifactV1UploadSourcePresignedUrlFromJSON, + ArtifactV1UploadSourcePresignedUrlFromJSONTyped, + ArtifactV1UploadSourcePresignedUrlToJSON, +} from './ArtifactV1UploadSourcePresignedUrl'; /** * @type CreateArtifactV1FlinkArtifactRequestUploadSource * Upload source of the Flink Artifact source. * @export */ -export type CreateArtifactV1FlinkArtifactRequestUploadSource = { - location: "PRESIGNED_URL_LOCATION"; -} & ArtifactV1UploadSourcePresignedUrl; +export type CreateArtifactV1FlinkArtifactRequestUploadSource = { location: 'PRESIGNED_URL_LOCATION' } & ArtifactV1UploadSourcePresignedUrl; -export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON( - json: any, -): CreateArtifactV1FlinkArtifactRequestUploadSource { - return CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON(json: any): CreateArtifactV1FlinkArtifactRequestUploadSource { + return CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateArtifactV1FlinkArtifactRequestUploadSource { - if (json == null) { - return json; - } - switch (json["location"]) { - case "PRESIGNED_URL_LOCATION": - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { - location: "PRESIGNED_URL_LOCATION", - } as const); - default: - throw new Error( - `No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${json["location"]}'`, - ); - } +export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateArtifactV1FlinkArtifactRequestUploadSource { + if (json == null) { + return json; + } + switch (json['location']) { + case 'PRESIGNED_URL_LOCATION': + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { location: 'PRESIGNED_URL_LOCATION' } as const); + default: + throw new Error(`No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${json['location']}'`); + } } export function CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON(json: any): any { - return CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped(json, false); + return CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped( - value?: CreateArtifactV1FlinkArtifactRequestUploadSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } - switch (value["location"]) { - case "PRESIGNED_URL_LOCATION": - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { - location: "PRESIGNED_URL_LOCATION", - } as const); - default: - throw new Error( - `No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${value["location"]}'`, - ); - } +export function CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped(value?: CreateArtifactV1FlinkArtifactRequestUploadSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['location']) { + case 'PRESIGNED_URL_LOCATION': + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { location: 'PRESIGNED_URL_LOCATION' } as const); + default: + throw new Error(`No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${value['location']}'`); + } + } + diff --git a/src/clients/flinkArtifacts/models/ErrorSource.ts b/src/clients/flinkArtifacts/models/ErrorSource.ts index fa16775f2d..09576636a0 100644 --- a/src/clients/flinkArtifacts/models/ErrorSource.ts +++ b/src/clients/flinkArtifacts/models/ErrorSource.ts @@ -5,69 +5,69 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - pointer: json["pointer"] == null ? undefined : json["pointer"], - parameter: json["parameter"] == null ? undefined : json["parameter"], - }; + if (json == null) { + return json; + } + return { + + 'pointer': json['pointer'] == null ? undefined : json['pointer'], + 'parameter': json['parameter'] == null ? undefined : json['parameter'], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped( - value?: ErrorSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - pointer: value["pointer"], - parameter: value["parameter"], - }; + return { + + 'pointer': value['pointer'], + 'parameter': value['parameter'], + }; } + diff --git a/src/clients/flinkArtifacts/models/Failure.ts b/src/clients/flinkArtifacts/models/Failure.ts index cb9fbf0e0f..e81a5b6062 100644 --- a/src/clients/flinkArtifacts/models/Failure.ts +++ b/src/clients/flinkArtifacts/models/Failure.ts @@ -5,62 +5,62 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!("errors" in value) || value["errors"] === undefined) return false; - return true; + if (!('errors' in value) || value['errors'] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - errors: new Set(json["errors"]), - }; + if (json == null) { + return json; + } + return { + + 'errors': new Set(json['errors']), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped( - value?: Failure | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - errors: Array.from(value["errors"] as Set), - }; + return { + + 'errors': Array.from(value['errors'] as Set), + }; } + diff --git a/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts b/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts index d9b8248228..4cf222b09d 100644 --- a/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts +++ b/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts @@ -5,218 +5,201 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; +import { mapValues } from '../runtime'; +import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from "./ArtifactV1FlinkArtifactVersion"; -import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from './ArtifactV1FlinkArtifactVersion'; +import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from "./ArtifactV1FlinkArtifactMetadata"; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from './ArtifactV1FlinkArtifactMetadata'; /** - * + * * @export * @interface GetArtifactV1FlinkArtifact200Response */ export interface GetArtifactV1FlinkArtifact200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - readonly api_version: GetArtifactV1FlinkArtifact200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - readonly kind: GetArtifactV1FlinkArtifact200ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - readonly id: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - metadata?: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + readonly api_version: GetArtifactV1FlinkArtifact200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + readonly kind: GetArtifactV1FlinkArtifact200ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + readonly id: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + metadata?: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + versions?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetArtifactV1FlinkArtifact200ResponseApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetArtifactV1FlinkArtifact200ResponseKindEnum { - FlinkArtifact = "FlinkArtifact", + FlinkArtifact = 'FlinkArtifact' } + /** * Check if a given object implements the GetArtifactV1FlinkArtifact200Response interface. */ -export function instanceOfGetArtifactV1FlinkArtifact200Response( - value: object, -): value is GetArtifactV1FlinkArtifact200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("id" in value) || value["id"] === undefined) return false; - if (!("cloud" in value) || value["cloud"] === undefined) return false; - if (!("region" in value) || value["region"] === undefined) return false; - if (!("environment" in value) || value["environment"] === undefined) return false; - if (!("display_name" in value) || value["display_name"] === undefined) return false; - return true; +export function instanceOfGetArtifactV1FlinkArtifact200Response(value: object): value is GetArtifactV1FlinkArtifact200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('cloud' in value) || value['cloud'] === undefined) return false; + if (!('region' in value) || value['region'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + if (!('display_name' in value) || value['display_name'] === undefined) return false; + return true; } -export function GetArtifactV1FlinkArtifact200ResponseFromJSON( - json: any, -): GetArtifactV1FlinkArtifact200Response { - return GetArtifactV1FlinkArtifact200ResponseFromJSONTyped(json, false); +export function GetArtifactV1FlinkArtifact200ResponseFromJSON(json: any): GetArtifactV1FlinkArtifact200Response { + return GetArtifactV1FlinkArtifact200ResponseFromJSONTyped(json, false); } -export function GetArtifactV1FlinkArtifact200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetArtifactV1FlinkArtifact200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - id: json["id"], - metadata: - json["metadata"] == null - ? undefined - : ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), - cloud: json["cloud"], - region: json["region"], - environment: json["environment"], - display_name: json["display_name"], - _class: json["class"] == null ? undefined : json["class"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - description: json["description"] == null ? undefined : json["description"], - documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], - runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], - versions: - json["versions"] == null - ? undefined - : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), - }; +export function GetArtifactV1FlinkArtifact200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetArtifactV1FlinkArtifact200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'id': json['id'], + 'metadata': json['metadata'] == null ? undefined : ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), + 'cloud': json['cloud'], + 'region': json['region'], + 'environment': json['environment'], + 'display_name': json['display_name'], + '_class': json['class'] == null ? undefined : json['class'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'description': json['description'] == null ? undefined : json['description'], + 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], + 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], + 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), + }; } -export function GetArtifactV1FlinkArtifact200ResponseToJSON( - json: any, -): GetArtifactV1FlinkArtifact200Response { - return GetArtifactV1FlinkArtifact200ResponseToJSONTyped(json, false); +export function GetArtifactV1FlinkArtifact200ResponseToJSON(json: any): GetArtifactV1FlinkArtifact200Response { + return GetArtifactV1FlinkArtifact200ResponseToJSONTyped(json, false); } -export function GetArtifactV1FlinkArtifact200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetArtifactV1FlinkArtifact200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - display_name: value["display_name"], - class: value["_class"], - content_format: value["content_format"], - description: value["description"], - documentation_link: value["documentation_link"], - runtime_language: value["runtime_language"], - versions: - value["versions"] == null - ? undefined - : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), - }; + return { + + 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + 'display_name': value['display_name'], + 'class': value['_class'], + 'content_format': value['content_format'], + 'description': value['description'], + 'documentation_link': value['documentation_link'], + 'runtime_language': value['runtime_language'], + 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), + }; } + diff --git a/src/clients/flinkArtifacts/models/ListMeta.ts b/src/clients/flinkArtifacts/models/ListMeta.ts index 13715d8b69..4d1b67487f 100644 --- a/src/clients/flinkArtifacts/models/ListMeta.ts +++ b/src/clients/flinkArtifacts/models/ListMeta.ts @@ -5,93 +5,93 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. - * @type {string} - * @memberof ListMeta - */ - first?: string | null; - /** - * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. - * @type {string} - * @memberof ListMeta - */ - last?: string | null; - /** - * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. - * @type {string} - * @memberof ListMeta - */ - prev?: string | null; - /** - * A link to the next page of results. If a response does not contain a next link, then there is no more data available. - * @type {string} - * @memberof ListMeta - */ - next?: string | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ListMeta - */ - total_size?: number; + /** + * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. + * @type {string} + * @memberof ListMeta + */ + first?: string | null; + /** + * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. + * @type {string} + * @memberof ListMeta + */ + last?: string | null; + /** + * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. + * @type {string} + * @memberof ListMeta + */ + prev?: string | null; + /** + * A link to the next page of results. If a response does not contain a next link, then there is no more data available. + * @type {string} + * @memberof ListMeta + */ + next?: string | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ListMeta + */ + total_size?: number; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped( - value?: ListMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/flinkArtifacts/models/ModelError.ts b/src/clients/flinkArtifacts/models/ModelError.ts index 70a61063ab..96c984cb43 100644 --- a/src/clients/flinkArtifacts/models/ModelError.ts +++ b/src/clients/flinkArtifacts/models/ModelError.ts @@ -5,21 +5,21 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorSource } from "./ErrorSource"; +import { mapValues } from '../runtime'; +import type { ErrorSource } from './ErrorSource'; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from "./ErrorSource"; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from './ErrorSource'; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - status: json["status"] == null ? undefined : json["status"], - code: json["code"] == null ? undefined : json["code"], - title: json["title"] == null ? undefined : json["title"], - detail: json["detail"] == null ? undefined : json["detail"], - source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'code': json['code'] == null ? undefined : json['code'], + 'title': json['title'] == null ? undefined : json['title'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped( - value?: ModelError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - status: value["status"], - code: value["code"], - title: value["title"], - detail: value["detail"], - source: ErrorSourceToJSON(value["source"]), - }; + return { + + 'id': value['id'], + 'status': value['status'], + 'code': value['code'], + 'title': value['title'], + 'detail': value['detail'], + 'source': ErrorSourceToJSON(value['source']), + }; } + diff --git a/src/clients/flinkArtifacts/models/ObjectMeta.ts b/src/clients/flinkArtifacts/models/ObjectMeta.ts index a7d0bf4519..05139f434c 100644 --- a/src/clients/flinkArtifacts/models/ObjectMeta.ts +++ b/src/clients/flinkArtifacts/models/ObjectMeta.ts @@ -5,91 +5,89 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_name?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly deleted_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_name?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped( - value?: Omit< - ObjectMeta, - "self" | "resource_name" | "created_at" | "updated_at" | "deleted_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkArtifacts/models/ObjectReference.ts b/src/clients/flinkArtifacts/models/ObjectReference.ts index d3ebe4a6af..b1ebafc894 100644 --- a/src/clients/flinkArtifacts/models/ObjectReference.ts +++ b/src/clients/flinkArtifacts/models/ObjectReference.ts @@ -5,103 +5,100 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface ObjectReference */ export interface ObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof ObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof ObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof ObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly resource_name: string; - /** - * API group and version of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly api_version?: string; - /** - * Kind of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly kind?: string; + /** + * ID of the referred resource + * @type {string} + * @memberof ObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof ObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof ObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly resource_name: string; + /** + * API group and version of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly api_version?: string; + /** + * Kind of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly kind?: string; } /** * Check if a given object implements the ObjectReference interface. */ export function instanceOfObjectReference(value: object): value is ObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function ObjectReferenceFromJSON(json: any): ObjectReference { - return ObjectReferenceFromJSONTyped(json, false); + return ObjectReferenceFromJSONTyped(json, false); } -export function ObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - environment: json["environment"] == null ? undefined : json["environment"], - related: json["related"], - resource_name: json["resource_name"], - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function ObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'related': json['related'], + 'resource_name': json['resource_name'], + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function ObjectReferenceToJSON(json: any): ObjectReference { - return ObjectReferenceToJSONTyped(json, false); + return ObjectReferenceToJSONTyped(json, false); } -export function ObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - environment: value["environment"], - }; + return { + + 'id': value['id'], + 'environment': value['environment'], + }; } + diff --git a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts index 8ff97e678d..66e303e2ed 100644 --- a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts +++ b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts @@ -5,152 +5,134 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PresignedUploadUrlArtifactV1PresignedUrl200Response */ export interface PresignedUploadUrlArtifactV1PresignedUrl200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly api_version: PresignedUploadUrlArtifactV1PresignedUrl200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly kind: PresignedUploadUrlArtifactV1PresignedUrl200ResponseKindEnum; - /** - * Content format of the Flink Artifact archive. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly content_format?: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly region?: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly environment?: string; - /** - * Unique identifier of this upload. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly upload_id?: string; - /** - * Upload URL for the Flink Artifact archive. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly upload_url?: string; - /** - * Upload form data of the Flink Artifact. All values should be strings. - * @type {object} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly upload_form_data?: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly api_version: PresignedUploadUrlArtifactV1PresignedUrl200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly kind: PresignedUploadUrlArtifactV1PresignedUrl200ResponseKindEnum; + /** + * Content format of the Flink Artifact archive. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly content_format?: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly region?: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly environment?: string; + /** + * Unique identifier of this upload. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly upload_id?: string; + /** + * Upload URL for the Flink Artifact archive. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly upload_url?: string; + /** + * Upload form data of the Flink Artifact. All values should be strings. + * @type {object} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly upload_form_data?: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PresignedUploadUrlArtifactV1PresignedUrl200ResponseApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PresignedUploadUrlArtifactV1PresignedUrl200ResponseKindEnum { - PresignedUrl = "PresignedUrl", + PresignedUrl = 'PresignedUrl' } + /** * Check if a given object implements the PresignedUploadUrlArtifactV1PresignedUrl200Response interface. */ -export function instanceOfPresignedUploadUrlArtifactV1PresignedUrl200Response( - value: object, -): value is PresignedUploadUrlArtifactV1PresignedUrl200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - return true; +export function instanceOfPresignedUploadUrlArtifactV1PresignedUrl200Response(value: object): value is PresignedUploadUrlArtifactV1PresignedUrl200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + return true; } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON( - json: any, -): PresignedUploadUrlArtifactV1PresignedUrl200Response { - return PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrl200Response { + return PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PresignedUploadUrlArtifactV1PresignedUrl200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - content_format: json["content_format"] == null ? undefined : json["content_format"], - cloud: json["cloud"] == null ? undefined : json["cloud"], - region: json["region"] == null ? undefined : json["region"], - environment: json["environment"] == null ? undefined : json["environment"], - upload_id: json["upload_id"] == null ? undefined : json["upload_id"], - upload_url: json["upload_url"] == null ? undefined : json["upload_url"], - upload_form_data: json["upload_form_data"] == null ? undefined : json["upload_form_data"], - }; +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PresignedUploadUrlArtifactV1PresignedUrl200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'content_format': json['content_format'] == null ? undefined : json['content_format'], + 'cloud': json['cloud'] == null ? undefined : json['cloud'], + 'region': json['region'] == null ? undefined : json['region'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'upload_id': json['upload_id'] == null ? undefined : json['upload_id'], + 'upload_url': json['upload_url'] == null ? undefined : json['upload_url'], + 'upload_form_data': json['upload_form_data'] == null ? undefined : json['upload_form_data'], + }; } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON( - json: any, -): PresignedUploadUrlArtifactV1PresignedUrl200Response { - return PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrl200Response { + return PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped( - value?: Omit< - PresignedUploadUrlArtifactV1PresignedUrl200Response, - | "api_version" - | "kind" - | "content_format" - | "cloud" - | "region" - | "environment" - | "upload_id" - | "upload_url" - | "upload_form_data" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts index c5f9c5e850..7bba037130 100644 --- a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts +++ b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts @@ -5,156 +5,142 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ArtifactV1PresignedUrlRequestMetadata } from "./ArtifactV1PresignedUrlRequestMetadata"; +import { mapValues } from '../runtime'; +import type { ArtifactV1PresignedUrlRequestMetadata } from './ArtifactV1PresignedUrlRequestMetadata'; import { - ArtifactV1PresignedUrlRequestMetadataFromJSON, - ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, - ArtifactV1PresignedUrlRequestMetadataToJSON, - ArtifactV1PresignedUrlRequestMetadataToJSONTyped, -} from "./ArtifactV1PresignedUrlRequestMetadata"; + ArtifactV1PresignedUrlRequestMetadataFromJSON, + ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, + ArtifactV1PresignedUrlRequestMetadataToJSON, + ArtifactV1PresignedUrlRequestMetadataToJSONTyped, +} from './ArtifactV1PresignedUrlRequestMetadata'; /** - * + * * @export * @interface PresignedUploadUrlArtifactV1PresignedUrlRequest */ export interface PresignedUploadUrlArtifactV1PresignedUrlRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - readonly api_version?: PresignedUploadUrlArtifactV1PresignedUrlRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - readonly kind?: PresignedUploadUrlArtifactV1PresignedUrlRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - readonly id?: string; - /** - * - * @type {ArtifactV1PresignedUrlRequestMetadata} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - metadata?: ArtifactV1PresignedUrlRequestMetadata; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - content_format: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - region: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - environment: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + readonly api_version?: PresignedUploadUrlArtifactV1PresignedUrlRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + readonly kind?: PresignedUploadUrlArtifactV1PresignedUrlRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + readonly id?: string; + /** + * + * @type {ArtifactV1PresignedUrlRequestMetadata} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + metadata?: ArtifactV1PresignedUrlRequestMetadata; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + content_format: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + region: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + environment: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PresignedUploadUrlArtifactV1PresignedUrlRequestApiVersionEnum { - ArtifactV1 = "artifact/v1", + ArtifactV1 = 'artifact/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PresignedUploadUrlArtifactV1PresignedUrlRequestKindEnum { - PresignedUrlRequest = "PresignedUrlRequest", + PresignedUrlRequest = 'PresignedUrlRequest' } + /** * Check if a given object implements the PresignedUploadUrlArtifactV1PresignedUrlRequest interface. */ -export function instanceOfPresignedUploadUrlArtifactV1PresignedUrlRequest( - value: object, -): value is PresignedUploadUrlArtifactV1PresignedUrlRequest { - if (!("content_format" in value) || value["content_format"] === undefined) return false; - if (!("cloud" in value) || value["cloud"] === undefined) return false; - if (!("region" in value) || value["region"] === undefined) return false; - if (!("environment" in value) || value["environment"] === undefined) return false; - return true; +export function instanceOfPresignedUploadUrlArtifactV1PresignedUrlRequest(value: object): value is PresignedUploadUrlArtifactV1PresignedUrlRequest { + if (!('content_format' in value) || value['content_format'] === undefined) return false; + if (!('cloud' in value) || value['cloud'] === undefined) return false; + if (!('region' in value) || value['region'] === undefined) return false; + if (!('environment' in value) || value['environment'] === undefined) return false; + return true; } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON( - json: any, -): PresignedUploadUrlArtifactV1PresignedUrlRequest { - return PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrlRequest { + return PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PresignedUploadUrlArtifactV1PresignedUrlRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null - ? undefined - : ArtifactV1PresignedUrlRequestMetadataFromJSON(json["metadata"]), - content_format: json["content_format"], - cloud: json["cloud"], - region: json["region"], - environment: json["environment"], - }; +export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PresignedUploadUrlArtifactV1PresignedUrlRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : ArtifactV1PresignedUrlRequestMetadataFromJSON(json['metadata']), + 'content_format': json['content_format'], + 'cloud': json['cloud'], + 'region': json['region'], + 'environment': json['environment'], + }; } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON( - json: any, -): PresignedUploadUrlArtifactV1PresignedUrlRequest { - return PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrlRequest { + return PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped( - value?: Omit< - PresignedUploadUrlArtifactV1PresignedUrlRequest, - "api_version" | "kind" | "id" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ArtifactV1PresignedUrlRequestMetadataToJSON(value["metadata"]), - content_format: value["content_format"], - cloud: value["cloud"], - region: value["region"], - environment: value["environment"], - }; + return { + + 'metadata': ArtifactV1PresignedUrlRequestMetadataToJSON(value['metadata']), + 'content_format': value['content_format'], + 'cloud': value['cloud'], + 'region': value['region'], + 'environment': value['environment'], + }; } + diff --git a/src/clients/flinkArtifacts/models/index.ts b/src/clients/flinkArtifacts/models/index.ts index 6376488926..af74a6545c 100644 --- a/src/clients/flinkArtifacts/models/index.ts +++ b/src/clients/flinkArtifacts/models/index.ts @@ -1,26 +1,26 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ArtifactV1FlinkArtifact"; -export * from "./ArtifactV1FlinkArtifactList"; -export * from "./ArtifactV1FlinkArtifactListDataInner"; -export * from "./ArtifactV1FlinkArtifactListMetadata"; -export * from "./ArtifactV1FlinkArtifactMetadata"; -export * from "./ArtifactV1FlinkArtifactVersion"; -export * from "./ArtifactV1FlinkArtifactVersionUploadSource"; -export * from "./ArtifactV1PresignedUrl"; -export * from "./ArtifactV1PresignedUrlRequest"; -export * from "./ArtifactV1PresignedUrlRequestMetadata"; -export * from "./ArtifactV1UploadSourcePresignedUrl"; -export * from "./ArtifactV1UploadSourcePresignedUrlMetadata"; -export * from "./CreateArtifactV1FlinkArtifact201Response"; -export * from "./CreateArtifactV1FlinkArtifactRequest"; -export * from "./CreateArtifactV1FlinkArtifactRequestUploadSource"; -export * from "./ErrorSource"; -export * from "./Failure"; -export * from "./GetArtifactV1FlinkArtifact200Response"; -export * from "./ListMeta"; -export * from "./ModelError"; -export * from "./ObjectMeta"; -export * from "./ObjectReference"; -export * from "./PresignedUploadUrlArtifactV1PresignedUrl200Response"; -export * from "./PresignedUploadUrlArtifactV1PresignedUrlRequest"; +export * from './ArtifactV1FlinkArtifact'; +export * from './ArtifactV1FlinkArtifactList'; +export * from './ArtifactV1FlinkArtifactListDataInner'; +export * from './ArtifactV1FlinkArtifactListMetadata'; +export * from './ArtifactV1FlinkArtifactMetadata'; +export * from './ArtifactV1FlinkArtifactVersion'; +export * from './ArtifactV1FlinkArtifactVersionUploadSource'; +export * from './ArtifactV1PresignedUrl'; +export * from './ArtifactV1PresignedUrlRequest'; +export * from './ArtifactV1PresignedUrlRequestMetadata'; +export * from './ArtifactV1UploadSourcePresignedUrl'; +export * from './ArtifactV1UploadSourcePresignedUrlMetadata'; +export * from './CreateArtifactV1FlinkArtifact201Response'; +export * from './CreateArtifactV1FlinkArtifactRequest'; +export * from './CreateArtifactV1FlinkArtifactRequestUploadSource'; +export * from './ErrorSource'; +export * from './Failure'; +export * from './GetArtifactV1FlinkArtifact200Response'; +export * from './ListMeta'; +export * from './ModelError'; +export * from './ObjectMeta'; +export * from './ObjectReference'; +export * from './PresignedUploadUrlArtifactV1PresignedUrl200Response'; +export * from './PresignedUploadUrlArtifactV1PresignedUrlRequest'; diff --git a/src/clients/flinkArtifacts/runtime.ts b/src/clients/flinkArtifacts/runtime.ts index c15991b3e1..acd93a55e0 100644 --- a/src/clients/flinkArtifacts/runtime.ts +++ b/src/clients/flinkArtifacts/runtime.ts @@ -5,85 +5,83 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://api.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts b/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts index e10d35b9b0..ba52630a65 100644 --- a/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts +++ b/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts @@ -5,14 +5,15 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CreateFcpmV2ComputePool202Response, CreateFcpmV2ComputePoolRequest, @@ -20,406 +21,307 @@ import type { GetFcpmV2ComputePool200Response, ListFcpmV2ComputePools200Response, UpdateFcpmV2ComputePoolRequest, -} from "../models/index"; +} from '../models/index'; import { - CreateFcpmV2ComputePool202ResponseFromJSON, - CreateFcpmV2ComputePool202ResponseToJSON, - CreateFcpmV2ComputePoolRequestFromJSON, - CreateFcpmV2ComputePoolRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetFcpmV2ComputePool200ResponseFromJSON, - GetFcpmV2ComputePool200ResponseToJSON, - ListFcpmV2ComputePools200ResponseFromJSON, - ListFcpmV2ComputePools200ResponseToJSON, - UpdateFcpmV2ComputePoolRequestFromJSON, - UpdateFcpmV2ComputePoolRequestToJSON, -} from "../models/index"; + CreateFcpmV2ComputePool202ResponseFromJSON, + CreateFcpmV2ComputePool202ResponseToJSON, + CreateFcpmV2ComputePoolRequestFromJSON, + CreateFcpmV2ComputePoolRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetFcpmV2ComputePool200ResponseFromJSON, + GetFcpmV2ComputePool200ResponseToJSON, + ListFcpmV2ComputePools200ResponseFromJSON, + ListFcpmV2ComputePools200ResponseToJSON, + UpdateFcpmV2ComputePoolRequestFromJSON, + UpdateFcpmV2ComputePoolRequestToJSON, +} from '../models/index'; export interface CreateFcpmV2ComputePoolOperationRequest { - CreateFcpmV2ComputePoolRequest?: CreateFcpmV2ComputePoolRequest; + CreateFcpmV2ComputePoolRequest?: CreateFcpmV2ComputePoolRequest; } export interface DeleteFcpmV2ComputePoolRequest { - environment: string; - id: string; + environment: string; + id: string; } export interface GetFcpmV2ComputePoolRequest { - environment: string; - id: string; + environment: string; + id: string; } export interface ListFcpmV2ComputePoolsRequest { - environment: string; - spec_region?: string; - spec_network?: string; - page_size?: number; - page_token?: string; + environment: string; + spec_region?: string; + spec_network?: string; + page_size?: number; + page_token?: string; } export interface UpdateFcpmV2ComputePoolOperationRequest { - id: string; - UpdateFcpmV2ComputePoolRequest?: UpdateFcpmV2ComputePoolRequest; + id: string; + UpdateFcpmV2ComputePoolRequest?: UpdateFcpmV2ComputePoolRequest; } /** - * + * */ export class ComputePoolsFcpmV2Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. - * Create a Compute Pool - */ - async createFcpmV2ComputePoolRaw( - requestParameters: CreateFcpmV2ComputePoolOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - - const response = await this.request( - { - path: `/fcpm/v2/compute-pools`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateFcpmV2ComputePoolRequestToJSON( - requestParameters["CreateFcpmV2ComputePoolRequest"], - ), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateFcpmV2ComputePool202ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. - * Create a Compute Pool - */ - async createFcpmV2ComputePool( - requestParameters: CreateFcpmV2ComputePoolOperationRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createFcpmV2ComputePoolRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. - * Delete a Compute Pool - */ - async deleteFcpmV2ComputePoolRaw( - requestParameters: DeleteFcpmV2ComputePoolRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling deleteFcpmV2ComputePool().', - ); - } - - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling deleteFcpmV2ComputePool().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - const response = await this.request( - { - path: `/fcpm/v2/compute-pools/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. - * Delete a Compute Pool - */ - async deleteFcpmV2ComputePool( - requestParameters: DeleteFcpmV2ComputePoolRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteFcpmV2ComputePoolRaw(requestParameters, initOverrides); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. - * Read a Compute Pool - */ - async getFcpmV2ComputePoolRaw( - requestParameters: GetFcpmV2ComputePoolRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling getFcpmV2ComputePool().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. + * Create a Compute Pool + */ + async createFcpmV2ComputePoolRaw(requestParameters: CreateFcpmV2ComputePoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/fcpm/v2/compute-pools`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateFcpmV2ComputePoolRequestToJSON(requestParameters['CreateFcpmV2ComputePoolRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateFcpmV2ComputePool202ResponseFromJSON(jsonValue)); } - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling getFcpmV2ComputePool().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. + * Create a Compute Pool + */ + async createFcpmV2ComputePool(requestParameters: CreateFcpmV2ComputePoolOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createFcpmV2ComputePoolRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } - - const response = await this.request( - { - path: `/fcpm/v2/compute-pools/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetFcpmV2ComputePool200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. - * Read a Compute Pool - */ - async getFcpmV2ComputePool( - requestParameters: GetFcpmV2ComputePoolRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getFcpmV2ComputePoolRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. - * List of Compute Pools - */ - async listFcpmV2ComputePoolsRaw( - requestParameters: ListFcpmV2ComputePoolsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["environment"] == null) { - throw new runtime.RequiredError( - "environment", - 'Required parameter "environment" was null or undefined when calling listFcpmV2ComputePools().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["spec_region"] != null) { - queryParameters["spec.region"] = requestParameters["spec_region"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. + * Delete a Compute Pool + */ + async deleteFcpmV2ComputePoolRaw(requestParameters: DeleteFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling deleteFcpmV2ComputePool().' + ); + } + + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling deleteFcpmV2ComputePool().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/fcpm/v2/compute-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["environment"] != null) { - queryParameters["environment"] = requestParameters["environment"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. + * Delete a Compute Pool + */ + async deleteFcpmV2ComputePool(requestParameters: DeleteFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteFcpmV2ComputePoolRaw(requestParameters, initOverrides); } - if (requestParameters["spec_network"] != null) { - queryParameters["spec.network"] = requestParameters["spec_network"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. + * Read a Compute Pool + */ + async getFcpmV2ComputePoolRaw(requestParameters: GetFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling getFcpmV2ComputePool().' + ); + } + + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getFcpmV2ComputePool().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/fcpm/v2/compute-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetFcpmV2ComputePool200ResponseFromJSON(jsonValue)); } - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. + * Read a Compute Pool + */ + async getFcpmV2ComputePool(requestParameters: GetFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getFcpmV2ComputePoolRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. + * List of Compute Pools + */ + async listFcpmV2ComputePoolsRaw(requestParameters: ListFcpmV2ComputePoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['environment'] == null) { + throw new runtime.RequiredError( + 'environment', + 'Required parameter "environment" was null or undefined when calling listFcpmV2ComputePools().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['spec_region'] != null) { + queryParameters['spec.region'] = requestParameters['spec_region']; + } + + if (requestParameters['environment'] != null) { + queryParameters['environment'] = requestParameters['environment']; + } + + if (requestParameters['spec_network'] != null) { + queryParameters['spec.network'] = requestParameters['spec_network']; + } + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/fcpm/v2/compute-pools`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListFcpmV2ComputePools200ResponseFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. + * List of Compute Pools + */ + async listFcpmV2ComputePools(requestParameters: ListFcpmV2ComputePoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listFcpmV2ComputePoolsRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/fcpm/v2/compute-pools`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListFcpmV2ComputePools200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. - * List of Compute Pools - */ - async listFcpmV2ComputePools( - requestParameters: ListFcpmV2ComputePoolsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listFcpmV2ComputePoolsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. - * Update a Compute Pool - */ - async updateFcpmV2ComputePoolRaw( - requestParameters: UpdateFcpmV2ComputePoolOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling updateFcpmV2ComputePool().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. + * Update a Compute Pool + */ + async updateFcpmV2ComputePoolRaw(requestParameters: UpdateFcpmV2ComputePoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling updateFcpmV2ComputePool().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } + + const response = await this.request({ + path: `/fcpm/v2/compute-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: UpdateFcpmV2ComputePoolRequestToJSON(requestParameters['UpdateFcpmV2ComputePoolRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetFcpmV2ComputePool200ResponseFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. + * Update a Compute Pool + */ + async updateFcpmV2ComputePool(requestParameters: UpdateFcpmV2ComputePoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateFcpmV2ComputePoolRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/fcpm/v2/compute-pools/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "PATCH", - headers: headerParameters, - query: queryParameters, - body: UpdateFcpmV2ComputePoolRequestToJSON( - requestParameters["UpdateFcpmV2ComputePoolRequest"], - ), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetFcpmV2ComputePool200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. - * Update a Compute Pool - */ - async updateFcpmV2ComputePool( - requestParameters: UpdateFcpmV2ComputePoolOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateFcpmV2ComputePoolRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts b/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts index fdcbf4161d..5876dc2b62 100644 --- a/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts +++ b/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts @@ -5,100 +5,88 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { Failure, FcpmV2RegionList } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + Failure, + FcpmV2RegionList, +} from '../models/index'; import { - FailureFromJSON, - FailureToJSON, - FcpmV2RegionListFromJSON, - FcpmV2RegionListToJSON, -} from "../models/index"; + FailureFromJSON, + FailureToJSON, + FcpmV2RegionListFromJSON, + FcpmV2RegionListToJSON, +} from '../models/index'; export interface ListFcpmV2RegionsRequest { - cloud?: string; - region_name?: string; - page_size?: number; - page_token?: string; + cloud?: string; + region_name?: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class RegionsFcpmV2Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. - * List of Regions - */ - async listFcpmV2RegionsRaw( - requestParameters: ListFcpmV2RegionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - if (requestParameters["cloud"] != null) { - queryParameters["cloud"] = requestParameters["cloud"]; - } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. + * List of Regions + */ + async listFcpmV2RegionsRaw(requestParameters: ListFcpmV2RegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - if (requestParameters["region_name"] != null) { - queryParameters["region_name"] = requestParameters["region_name"]; - } + if (requestParameters['cloud'] != null) { + queryParameters['cloud'] = requestParameters['cloud']; + } - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; - } + if (requestParameters['region_name'] != null) { + queryParameters['region_name'] = requestParameters['region_name']; + } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; - } + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "confluent-sts-access-token", - [], - ); - } + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); + } - const response = await this.request( - { - path: `/fcpm/v2/regions`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); + const response = await this.request({ + path: `/fcpm/v2/regions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => - FcpmV2RegionListFromJSON(jsonValue), - ); - } + return new runtime.JSONApiResponse(response, (jsonValue) => FcpmV2RegionListFromJSON(jsonValue)); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. + * List of Regions + */ + async listFcpmV2Regions(requestParameters: ListFcpmV2RegionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listFcpmV2RegionsRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. - * List of Regions - */ - async listFcpmV2Regions( - requestParameters: ListFcpmV2RegionsRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listFcpmV2RegionsRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/flinkComputePool/apis/index.ts b/src/clients/flinkComputePool/apis/index.ts index 4b043f5432..d9f515b842 100644 --- a/src/clients/flinkComputePool/apis/index.ts +++ b/src/clients/flinkComputePool/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ComputePoolsFcpmV2Api"; -export * from "./RegionsFcpmV2Api"; +export * from './ComputePoolsFcpmV2Api'; +export * from './RegionsFcpmV2Api'; diff --git a/src/clients/flinkComputePool/index.ts b/src/clients/flinkComputePool/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/flinkComputePool/index.ts +++ b/src/clients/flinkComputePool/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts index bc912fdf0f..fbda3a7561 100644 --- a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts +++ b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts @@ -5,147 +5,138 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from "./FcpmV2ComputePoolStatus"; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from './FcpmV2ComputePoolStatus'; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, -} from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; -import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, +} from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; +import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from './FcpmV2ComputePoolMetadata'; /** - * + * * @export * @interface CreateFcpmV2ComputePool202Response */ export interface CreateFcpmV2ComputePool202Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateFcpmV2ComputePool202Response - */ - readonly api_version?: CreateFcpmV2ComputePool202ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateFcpmV2ComputePool202Response - */ - readonly kind?: CreateFcpmV2ComputePool202ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof CreateFcpmV2ComputePool202Response - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof CreateFcpmV2ComputePool202Response - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} - * @memberof CreateFcpmV2ComputePool202Response - */ - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof CreateFcpmV2ComputePool202Response - */ - status: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateFcpmV2ComputePool202Response + */ + readonly api_version?: CreateFcpmV2ComputePool202ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateFcpmV2ComputePool202Response + */ + readonly kind?: CreateFcpmV2ComputePool202ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof CreateFcpmV2ComputePool202Response + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof CreateFcpmV2ComputePool202Response + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} + * @memberof CreateFcpmV2ComputePool202Response + */ + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof CreateFcpmV2ComputePool202Response + */ + status: FcpmV2ComputePoolStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateFcpmV2ComputePool202ResponseApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateFcpmV2ComputePool202ResponseKindEnum { - ComputePool = "ComputePool", + ComputePool = 'ComputePool' } + /** * Check if a given object implements the CreateFcpmV2ComputePool202Response interface. */ -export function instanceOfCreateFcpmV2ComputePool202Response( - value: object, -): value is CreateFcpmV2ComputePool202Response { - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfCreateFcpmV2ComputePool202Response(value: object): value is CreateFcpmV2ComputePool202Response { + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } -export function CreateFcpmV2ComputePool202ResponseFromJSON( - json: any, -): CreateFcpmV2ComputePool202Response { - return CreateFcpmV2ComputePool202ResponseFromJSONTyped(json, false); +export function CreateFcpmV2ComputePool202ResponseFromJSON(json: any): CreateFcpmV2ComputePool202Response { + return CreateFcpmV2ComputePool202ResponseFromJSONTyped(json, false); } -export function CreateFcpmV2ComputePool202ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateFcpmV2ComputePool202Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json["spec"]), - status: FcpmV2ComputePoolStatusFromJSON(json["status"]), - }; +export function CreateFcpmV2ComputePool202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFcpmV2ComputePool202Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), + 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json['spec']), + 'status': FcpmV2ComputePoolStatusFromJSON(json['status']), + }; } -export function CreateFcpmV2ComputePool202ResponseToJSON( - json: any, -): CreateFcpmV2ComputePool202Response { - return CreateFcpmV2ComputePool202ResponseToJSONTyped(json, false); +export function CreateFcpmV2ComputePool202ResponseToJSON(json: any): CreateFcpmV2ComputePool202Response { + return CreateFcpmV2ComputePool202ResponseToJSONTyped(json, false); } -export function CreateFcpmV2ComputePool202ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateFcpmV2ComputePool202ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value["spec"]), - status: FcpmV2ComputePoolStatusToJSON(value["status"]), - }; + return { + + 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), + 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value['spec']), + 'status': FcpmV2ComputePoolStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts index ffbb4bbceb..21bafe3c37 100644 --- a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts +++ b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts @@ -5,142 +5,137 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from "./FcpmV2ComputePoolStatus"; -import type { CreateFcpmV2ComputePoolRequestAllOfSpec } from "./CreateFcpmV2ComputePoolRequestAllOfSpec"; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from './FcpmV2ComputePoolStatus'; +import type { CreateFcpmV2ComputePoolRequestAllOfSpec } from './CreateFcpmV2ComputePoolRequestAllOfSpec'; import { - CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON, - CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, - CreateFcpmV2ComputePoolRequestAllOfSpecToJSON, - CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, -} from "./CreateFcpmV2ComputePoolRequestAllOfSpec"; -import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; + CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON, + CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, + CreateFcpmV2ComputePoolRequestAllOfSpecToJSON, + CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, +} from './CreateFcpmV2ComputePoolRequestAllOfSpec'; +import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from './FcpmV2ComputePoolMetadata'; /** - * + * * @export * @interface CreateFcpmV2ComputePoolRequest */ export interface CreateFcpmV2ComputePoolRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateFcpmV2ComputePoolRequest - */ - readonly api_version?: CreateFcpmV2ComputePoolRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateFcpmV2ComputePoolRequest - */ - readonly kind?: CreateFcpmV2ComputePoolRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof CreateFcpmV2ComputePoolRequest - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof CreateFcpmV2ComputePoolRequest - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {CreateFcpmV2ComputePoolRequestAllOfSpec} - * @memberof CreateFcpmV2ComputePoolRequest - */ - spec: CreateFcpmV2ComputePoolRequestAllOfSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof CreateFcpmV2ComputePoolRequest - */ - status?: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateFcpmV2ComputePoolRequest + */ + readonly api_version?: CreateFcpmV2ComputePoolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateFcpmV2ComputePoolRequest + */ + readonly kind?: CreateFcpmV2ComputePoolRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof CreateFcpmV2ComputePoolRequest + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof CreateFcpmV2ComputePoolRequest + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {CreateFcpmV2ComputePoolRequestAllOfSpec} + * @memberof CreateFcpmV2ComputePoolRequest + */ + spec: CreateFcpmV2ComputePoolRequestAllOfSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof CreateFcpmV2ComputePoolRequest + */ + status?: FcpmV2ComputePoolStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateFcpmV2ComputePoolRequestApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateFcpmV2ComputePoolRequestKindEnum { - ComputePool = "ComputePool", + ComputePool = 'ComputePool' } + /** * Check if a given object implements the CreateFcpmV2ComputePoolRequest interface. */ -export function instanceOfCreateFcpmV2ComputePoolRequest( - value: object, -): value is CreateFcpmV2ComputePoolRequest { - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfCreateFcpmV2ComputePoolRequest(value: object): value is CreateFcpmV2ComputePoolRequest { + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function CreateFcpmV2ComputePoolRequestFromJSON(json: any): CreateFcpmV2ComputePoolRequest { - return CreateFcpmV2ComputePoolRequestFromJSONTyped(json, false); + return CreateFcpmV2ComputePoolRequestFromJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateFcpmV2ComputePoolRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), - spec: CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json["status"]), - }; +export function CreateFcpmV2ComputePoolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFcpmV2ComputePoolRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), + 'spec': CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json['status']), + }; } export function CreateFcpmV2ComputePoolRequestToJSON(json: any): CreateFcpmV2ComputePoolRequest { - return CreateFcpmV2ComputePoolRequestToJSONTyped(json, false); + return CreateFcpmV2ComputePoolRequestToJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateFcpmV2ComputePoolRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), - spec: CreateFcpmV2ComputePoolRequestAllOfSpecToJSON(value["spec"]), - status: FcpmV2ComputePoolStatusToJSON(value["status"]), - }; + return { + + 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), + 'spec': CreateFcpmV2ComputePoolRequestAllOfSpecToJSON(value['spec']), + 'status': FcpmV2ComputePoolStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts index b53de40f24..d8c4c7910f 100644 --- a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts +++ b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts @@ -5,78 +5,69 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CreateFcpmV2ComputePoolRequestAllOfSpec */ export interface CreateFcpmV2ComputePoolRequestAllOfSpec { - /** - * - * @type {any} - * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec - */ - environment?: any | null; - /** - * - * @type {any} - * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec - */ - network?: any | null; + /** + * + * @type {any} + * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec + */ + environment?: any | null; + /** + * + * @type {any} + * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec + */ + network?: any | null; } /** * Check if a given object implements the CreateFcpmV2ComputePoolRequestAllOfSpec interface. */ -export function instanceOfCreateFcpmV2ComputePoolRequestAllOfSpec( - value: object, -): value is CreateFcpmV2ComputePoolRequestAllOfSpec { - return true; +export function instanceOfCreateFcpmV2ComputePoolRequestAllOfSpec(value: object): value is CreateFcpmV2ComputePoolRequestAllOfSpec { + return true; } -export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON( - json: any, -): CreateFcpmV2ComputePoolRequestAllOfSpec { - return CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); +export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json: any): CreateFcpmV2ComputePoolRequestAllOfSpec { + return CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateFcpmV2ComputePoolRequestAllOfSpec { - if (json == null) { - return json; - } - return { - environment: json["environment"] == null ? undefined : json["environment"], - network: json["network"] == null ? undefined : json["network"], - }; +export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFcpmV2ComputePoolRequestAllOfSpec { + if (json == null) { + return json; + } + return { + + 'environment': json['environment'] == null ? undefined : json['environment'], + 'network': json['network'] == null ? undefined : json['network'], + }; } -export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSON( - json: any, -): CreateFcpmV2ComputePoolRequestAllOfSpec { - return CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); +export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSON(json: any): CreateFcpmV2ComputePoolRequestAllOfSpec { + return CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped( - value?: CreateFcpmV2ComputePoolRequestAllOfSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(value?: CreateFcpmV2ComputePoolRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - environment: value["environment"], - network: value["network"], - }; + return { + + 'environment': value['environment'], + 'network': value['network'], + }; } + diff --git a/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts b/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts index c85ec5e64b..d07d581ed5 100644 --- a/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts +++ b/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts @@ -5,91 +5,86 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface EnvScopedObjectReference */ export interface EnvScopedObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof EnvScopedObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof EnvScopedObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the EnvScopedObjectReference interface. */ -export function instanceOfEnvScopedObjectReference( - value: object, -): value is EnvScopedObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; +export function instanceOfEnvScopedObjectReference(value: object): value is EnvScopedObjectReference { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function EnvScopedObjectReferenceFromJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceFromJSONTyped(json, false); + return EnvScopedObjectReferenceFromJSONTyped(json, false); } -export function EnvScopedObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EnvScopedObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - environment: json["environment"] == null ? undefined : json["environment"], - related: json["related"], - resource_name: json["resource_name"], - }; +export function EnvScopedObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvScopedObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'related': json['related'], + 'resource_name': json['resource_name'], + }; } export function EnvScopedObjectReferenceToJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceToJSONTyped(json, false); + return EnvScopedObjectReferenceToJSONTyped(json, false); } -export function EnvScopedObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EnvScopedObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - environment: value["environment"], - }; + return { + + 'id': value['id'], + 'environment': value['environment'], + }; } + diff --git a/src/clients/flinkComputePool/models/ErrorSource.ts b/src/clients/flinkComputePool/models/ErrorSource.ts index 7ccc2758d0..bb4604e71f 100644 --- a/src/clients/flinkComputePool/models/ErrorSource.ts +++ b/src/clients/flinkComputePool/models/ErrorSource.ts @@ -5,69 +5,69 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - pointer: json["pointer"] == null ? undefined : json["pointer"], - parameter: json["parameter"] == null ? undefined : json["parameter"], - }; + if (json == null) { + return json; + } + return { + + 'pointer': json['pointer'] == null ? undefined : json['pointer'], + 'parameter': json['parameter'] == null ? undefined : json['parameter'], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped( - value?: ErrorSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - pointer: value["pointer"], - parameter: value["parameter"], - }; + return { + + 'pointer': value['pointer'], + 'parameter': value['parameter'], + }; } + diff --git a/src/clients/flinkComputePool/models/Failure.ts b/src/clients/flinkComputePool/models/Failure.ts index ba7d6211de..5cfaa1f081 100644 --- a/src/clients/flinkComputePool/models/Failure.ts +++ b/src/clients/flinkComputePool/models/Failure.ts @@ -5,62 +5,62 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!("errors" in value) || value["errors"] === undefined) return false; - return true; + if (!('errors' in value) || value['errors'] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - errors: new Set(json["errors"]), - }; + if (json == null) { + return json; + } + return { + + 'errors': new Set(json['errors']), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped( - value?: Failure | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - errors: Array.from(value["errors"] as Set), - }; + return { + + 'errors': Array.from(value['errors'] as Set), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts index 00d017194c..e01ec8f121 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts @@ -5,144 +5,141 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from "./FcpmV2ComputePoolStatus"; -import type { FcpmV2ComputePoolSpec } from "./FcpmV2ComputePoolSpec"; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from './FcpmV2ComputePoolStatus'; +import type { FcpmV2ComputePoolSpec } from './FcpmV2ComputePoolSpec'; import { - FcpmV2ComputePoolSpecFromJSON, - FcpmV2ComputePoolSpecFromJSONTyped, - FcpmV2ComputePoolSpecToJSON, - FcpmV2ComputePoolSpecToJSONTyped, -} from "./FcpmV2ComputePoolSpec"; -import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolSpecFromJSON, + FcpmV2ComputePoolSpecFromJSONTyped, + FcpmV2ComputePoolSpecToJSON, + FcpmV2ComputePoolSpecToJSONTyped, +} from './FcpmV2ComputePoolSpec'; +import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from './FcpmV2ComputePoolMetadata'; /** * A Compute Pool represents a set of compute resources that is used to run your Queries. * The resources (CPUs, memory,…) provided by a Compute Pool are shared between all Queries that use it. - * - * + * + * * ## The Compute Pools Model * * @export * @interface FcpmV2ComputePool */ export interface FcpmV2ComputePool { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2ComputePool - */ - readonly api_version?: FcpmV2ComputePoolApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2ComputePool - */ - readonly kind?: FcpmV2ComputePoolKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2ComputePool - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof FcpmV2ComputePool - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {FcpmV2ComputePoolSpec} - * @memberof FcpmV2ComputePool - */ - spec?: FcpmV2ComputePoolSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof FcpmV2ComputePool - */ - status?: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2ComputePool + */ + readonly api_version?: FcpmV2ComputePoolApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2ComputePool + */ + readonly kind?: FcpmV2ComputePoolKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2ComputePool + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof FcpmV2ComputePool + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {FcpmV2ComputePoolSpec} + * @memberof FcpmV2ComputePool + */ + spec?: FcpmV2ComputePoolSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof FcpmV2ComputePool + */ + status?: FcpmV2ComputePoolStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2ComputePoolApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2ComputePoolKindEnum { - ComputePool = "ComputePool", + ComputePool = 'ComputePool' } + /** * Check if a given object implements the FcpmV2ComputePool interface. */ export function instanceOfFcpmV2ComputePool(value: object): value is FcpmV2ComputePool { - return true; + return true; } export function FcpmV2ComputePoolFromJSON(json: any): FcpmV2ComputePool { - return FcpmV2ComputePoolFromJSONTyped(json, false); + return FcpmV2ComputePoolFromJSONTyped(json, false); } -export function FcpmV2ComputePoolFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePool { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), - spec: json["spec"] == null ? undefined : FcpmV2ComputePoolSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json["status"]), - }; +export function FcpmV2ComputePoolFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePool { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), + 'spec': json['spec'] == null ? undefined : FcpmV2ComputePoolSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json['status']), + }; } export function FcpmV2ComputePoolToJSON(json: any): FcpmV2ComputePool { - return FcpmV2ComputePoolToJSONTyped(json, false); + return FcpmV2ComputePoolToJSONTyped(json, false); } -export function FcpmV2ComputePoolToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), - spec: FcpmV2ComputePoolSpecToJSON(value["spec"]), - status: FcpmV2ComputePoolStatusToJSON(value["status"]), - }; + return { + + 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), + 'spec': FcpmV2ComputePoolSpecToJSON(value['spec']), + 'status': FcpmV2ComputePoolStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts index 949ca22057..48a73f4302 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts @@ -5,125 +5,123 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolListDataInner } from "./FcpmV2ComputePoolListDataInner"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolListDataInner } from './FcpmV2ComputePoolListDataInner'; import { - FcpmV2ComputePoolListDataInnerFromJSON, - FcpmV2ComputePoolListDataInnerFromJSONTyped, - FcpmV2ComputePoolListDataInnerToJSON, - FcpmV2ComputePoolListDataInnerToJSONTyped, -} from "./FcpmV2ComputePoolListDataInner"; -import type { FcpmV2ComputePoolListMetadata } from "./FcpmV2ComputePoolListMetadata"; + FcpmV2ComputePoolListDataInnerFromJSON, + FcpmV2ComputePoolListDataInnerFromJSONTyped, + FcpmV2ComputePoolListDataInnerToJSON, + FcpmV2ComputePoolListDataInnerToJSONTyped, +} from './FcpmV2ComputePoolListDataInner'; +import type { FcpmV2ComputePoolListMetadata } from './FcpmV2ComputePoolListMetadata'; import { - FcpmV2ComputePoolListMetadataFromJSON, - FcpmV2ComputePoolListMetadataFromJSONTyped, - FcpmV2ComputePoolListMetadataToJSON, - FcpmV2ComputePoolListMetadataToJSONTyped, -} from "./FcpmV2ComputePoolListMetadata"; + FcpmV2ComputePoolListMetadataFromJSON, + FcpmV2ComputePoolListMetadataFromJSONTyped, + FcpmV2ComputePoolListMetadataToJSON, + FcpmV2ComputePoolListMetadataToJSONTyped, +} from './FcpmV2ComputePoolListMetadata'; /** * A Compute Pool represents a set of compute resources that is used to run your Queries. * The resources (CPUs, memory,…) provided by a Compute Pool are shared between all Queries that use it. - * - * + * + * * ## The Compute Pools Model * * @export * @interface FcpmV2ComputePoolList */ export interface FcpmV2ComputePoolList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2ComputePoolList - */ - readonly api_version: FcpmV2ComputePoolListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2ComputePoolList - */ - readonly kind: FcpmV2ComputePoolListKindEnum; - /** - * - * @type {FcpmV2ComputePoolListMetadata} - * @memberof FcpmV2ComputePoolList - */ - metadata: FcpmV2ComputePoolListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof FcpmV2ComputePoolList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2ComputePoolList + */ + readonly api_version: FcpmV2ComputePoolListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2ComputePoolList + */ + readonly kind: FcpmV2ComputePoolListKindEnum; + /** + * + * @type {FcpmV2ComputePoolListMetadata} + * @memberof FcpmV2ComputePoolList + */ + metadata: FcpmV2ComputePoolListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof FcpmV2ComputePoolList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2ComputePoolListApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2ComputePoolListKindEnum { - ComputePoolList = "ComputePoolList", + ComputePoolList = 'ComputePoolList' } + /** * Check if a given object implements the FcpmV2ComputePoolList interface. */ export function instanceOfFcpmV2ComputePoolList(value: object): value is FcpmV2ComputePoolList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function FcpmV2ComputePoolListFromJSON(json: any): FcpmV2ComputePoolList { - return FcpmV2ComputePoolListFromJSONTyped(json, false); + return FcpmV2ComputePoolListFromJSONTyped(json, false); } -export function FcpmV2ComputePoolListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePoolList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: FcpmV2ComputePoolListMetadataFromJSON(json["metadata"]), - data: new Set((json["data"] as Array).map(FcpmV2ComputePoolListDataInnerFromJSON)), - }; +export function FcpmV2ComputePoolListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': FcpmV2ComputePoolListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(FcpmV2ComputePoolListDataInnerFromJSON))), + }; } export function FcpmV2ComputePoolListToJSON(json: any): FcpmV2ComputePoolList { - return FcpmV2ComputePoolListToJSONTyped(json, false); + return FcpmV2ComputePoolListToJSONTyped(json, false); } -export function FcpmV2ComputePoolListToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolListMetadataToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map(FcpmV2ComputePoolListDataInnerToJSON), - }; + return { + + 'metadata': FcpmV2ComputePoolListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(FcpmV2ComputePoolListDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts index 5f0149ea37..d50ec69663 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts @@ -5,137 +5,133 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from "./FcpmV2ComputePoolStatus"; -import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from './FcpmV2ComputePoolStatus'; +import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from './FcpmV2ComputePoolMetadata'; /** - * + * * @export * @interface FcpmV2ComputePoolListDataInner */ export interface FcpmV2ComputePoolListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2ComputePoolListDataInner - */ - readonly api_version?: FcpmV2ComputePoolListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2ComputePoolListDataInner - */ - readonly kind?: FcpmV2ComputePoolListDataInnerKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2ComputePoolListDataInner - */ - readonly id: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof FcpmV2ComputePoolListDataInner - */ - metadata: FcpmV2ComputePoolMetadata; - /** - * - * @type {object} - * @memberof FcpmV2ComputePoolListDataInner - */ - spec: object; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof FcpmV2ComputePoolListDataInner - */ - status: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2ComputePoolListDataInner + */ + readonly api_version?: FcpmV2ComputePoolListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2ComputePoolListDataInner + */ + readonly kind?: FcpmV2ComputePoolListDataInnerKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2ComputePoolListDataInner + */ + readonly id: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof FcpmV2ComputePoolListDataInner + */ + metadata: FcpmV2ComputePoolMetadata; + /** + * + * @type {object} + * @memberof FcpmV2ComputePoolListDataInner + */ + spec: object; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof FcpmV2ComputePoolListDataInner + */ + status: FcpmV2ComputePoolStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2ComputePoolListDataInnerApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2ComputePoolListDataInnerKindEnum { - ComputePool = "ComputePool", + ComputePool = 'ComputePool' } + /** * Check if a given object implements the FcpmV2ComputePoolListDataInner interface. */ -export function instanceOfFcpmV2ComputePoolListDataInner( - value: object, -): value is FcpmV2ComputePoolListDataInner { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfFcpmV2ComputePoolListDataInner(value: object): value is FcpmV2ComputePoolListDataInner { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } export function FcpmV2ComputePoolListDataInnerFromJSON(json: any): FcpmV2ComputePoolListDataInner { - return FcpmV2ComputePoolListDataInnerFromJSONTyped(json, false); + return FcpmV2ComputePoolListDataInnerFromJSONTyped(json, false); } -export function FcpmV2ComputePoolListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePoolListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"], - metadata: FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), - spec: json["spec"], - status: FcpmV2ComputePoolStatusFromJSON(json["status"]), - }; +export function FcpmV2ComputePoolListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'], + 'metadata': FcpmV2ComputePoolMetadataFromJSON(json['metadata']), + 'spec': json['spec'], + 'status': FcpmV2ComputePoolStatusFromJSON(json['status']), + }; } export function FcpmV2ComputePoolListDataInnerToJSON(json: any): FcpmV2ComputePoolListDataInner { - return FcpmV2ComputePoolListDataInnerToJSONTyped(json, false); + return FcpmV2ComputePoolListDataInnerToJSONTyped(json, false); } -export function FcpmV2ComputePoolListDataInnerToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), - spec: value["spec"], - status: FcpmV2ComputePoolStatusToJSON(value["status"]), - }; + return { + + 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), + 'spec': value['spec'], + 'status': FcpmV2ComputePoolStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts index e793bf7513..9eff215f0c 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts @@ -5,98 +5,93 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface FcpmV2ComputePoolListMetadata */ export interface FcpmV2ComputePoolListMetadata { - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof FcpmV2ComputePoolListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof FcpmV2ComputePoolListMetadata + */ + total_size?: number; } /** * Check if a given object implements the FcpmV2ComputePoolListMetadata interface. */ -export function instanceOfFcpmV2ComputePoolListMetadata( - value: object, -): value is FcpmV2ComputePoolListMetadata { - return true; +export function instanceOfFcpmV2ComputePoolListMetadata(value: object): value is FcpmV2ComputePoolListMetadata { + return true; } export function FcpmV2ComputePoolListMetadataFromJSON(json: any): FcpmV2ComputePoolListMetadata { - return FcpmV2ComputePoolListMetadataFromJSONTyped(json, false); + return FcpmV2ComputePoolListMetadataFromJSONTyped(json, false); } -export function FcpmV2ComputePoolListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePoolListMetadata { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; +export function FcpmV2ComputePoolListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolListMetadata { + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function FcpmV2ComputePoolListMetadataToJSON(json: any): FcpmV2ComputePoolListMetadata { - return FcpmV2ComputePoolListMetadataToJSONTyped(json, false); + return FcpmV2ComputePoolListMetadataToJSONTyped(json, false); } -export function FcpmV2ComputePoolListMetadataToJSONTyped( - value?: FcpmV2ComputePoolListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolListMetadataToJSONTyped(value?: FcpmV2ComputePoolListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts index fdb536eced..4fdf83a6bb 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts @@ -5,96 +5,91 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface FcpmV2ComputePoolMetadata */ export interface FcpmV2ComputePoolMetadata { - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2ComputePoolMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2ComputePoolMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2ComputePoolMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2ComputePoolMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2ComputePoolMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2ComputePoolMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the FcpmV2ComputePoolMetadata interface. */ -export function instanceOfFcpmV2ComputePoolMetadata( - value: object, -): value is FcpmV2ComputePoolMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfFcpmV2ComputePoolMetadata(value: object): value is FcpmV2ComputePoolMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function FcpmV2ComputePoolMetadataFromJSON(json: any): FcpmV2ComputePoolMetadata { - return FcpmV2ComputePoolMetadataFromJSONTyped(json, false); + return FcpmV2ComputePoolMetadataFromJSONTyped(json, false); } -export function FcpmV2ComputePoolMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePoolMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function FcpmV2ComputePoolMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function FcpmV2ComputePoolMetadataToJSON(json: any): FcpmV2ComputePoolMetadata { - return FcpmV2ComputePoolMetadataToJSONTyped(json, false); + return FcpmV2ComputePoolMetadataToJSONTyped(json, false); } -export function FcpmV2ComputePoolMetadataToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts index 8aa7f70cc7..6b3f090da0 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts @@ -5,28 +5,28 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GlobalObjectReference } from "./GlobalObjectReference"; +import { mapValues } from '../runtime'; +import type { GlobalObjectReference } from './GlobalObjectReference'; import { - GlobalObjectReferenceFromJSON, - GlobalObjectReferenceFromJSONTyped, - GlobalObjectReferenceToJSON, - GlobalObjectReferenceToJSONTyped, -} from "./GlobalObjectReference"; -import type { EnvScopedObjectReference } from "./EnvScopedObjectReference"; + GlobalObjectReferenceFromJSON, + GlobalObjectReferenceFromJSONTyped, + GlobalObjectReferenceToJSON, + GlobalObjectReferenceToJSONTyped, +} from './GlobalObjectReference'; +import type { EnvScopedObjectReference } from './EnvScopedObjectReference'; import { - EnvScopedObjectReferenceFromJSON, - EnvScopedObjectReferenceFromJSONTyped, - EnvScopedObjectReferenceToJSON, - EnvScopedObjectReferenceToJSONTyped, -} from "./EnvScopedObjectReference"; + EnvScopedObjectReferenceFromJSON, + EnvScopedObjectReferenceFromJSONTyped, + EnvScopedObjectReferenceToJSON, + EnvScopedObjectReferenceToJSONTyped, +} from './EnvScopedObjectReference'; /** * The desired state of the Compute Pool @@ -34,103 +34,98 @@ import { * @interface FcpmV2ComputePoolSpec */ export interface FcpmV2ComputePoolSpec { - /** - * The name of the Flink compute pool. - * @type {string} - * @memberof FcpmV2ComputePoolSpec - */ - display_name?: string; - /** - * The cloud service provider that runs the compute pool. - * @type {string} - * @memberof FcpmV2ComputePoolSpec - */ - cloud?: string; - /** - * Flink compute pools in the region provided will be able to use this identity pool - * @type {string} - * @memberof FcpmV2ComputePoolSpec - */ - region?: string; - /** - * Maximum number of Confluent Flink Units (CFUs) that the Flink compute pool should auto-scale to. - * - * @type {number} - * @memberof FcpmV2ComputePoolSpec - */ - max_cfu?: number; - /** - * The flag to enable AI computing using Ray for the Flink compute pool. It's available in the Early Access API - * lifecycle stage only. - * - * @type {boolean} - * @memberof FcpmV2ComputePoolSpec - */ - enable_ai?: boolean; - /** - * The environment to which this belongs. - * @type {GlobalObjectReference} - * @memberof FcpmV2ComputePoolSpec - */ - environment?: GlobalObjectReference; - /** - * The network to which this belongs. - * @type {EnvScopedObjectReference} - * @memberof FcpmV2ComputePoolSpec - */ - network?: EnvScopedObjectReference; + /** + * The name of the Flink compute pool. + * @type {string} + * @memberof FcpmV2ComputePoolSpec + */ + display_name?: string; + /** + * The cloud service provider that runs the compute pool. + * @type {string} + * @memberof FcpmV2ComputePoolSpec + */ + cloud?: string; + /** + * Flink compute pools in the region provided will be able to use this identity pool + * @type {string} + * @memberof FcpmV2ComputePoolSpec + */ + region?: string; + /** + * Maximum number of Confluent Flink Units (CFUs) that the Flink compute pool should auto-scale to. + * + * @type {number} + * @memberof FcpmV2ComputePoolSpec + */ + max_cfu?: number; + /** + * The flag to enable AI computing using Ray for the Flink compute pool. It's available in the Early Access API + * lifecycle stage only. + * + * @type {boolean} + * @memberof FcpmV2ComputePoolSpec + */ + enable_ai?: boolean; + /** + * The environment to which this belongs. + * @type {GlobalObjectReference} + * @memberof FcpmV2ComputePoolSpec + */ + environment?: GlobalObjectReference; + /** + * The network to which this belongs. + * @type {EnvScopedObjectReference} + * @memberof FcpmV2ComputePoolSpec + */ + network?: EnvScopedObjectReference; } /** * Check if a given object implements the FcpmV2ComputePoolSpec interface. */ export function instanceOfFcpmV2ComputePoolSpec(value: object): value is FcpmV2ComputePoolSpec { - return true; + return true; } export function FcpmV2ComputePoolSpecFromJSON(json: any): FcpmV2ComputePoolSpec { - return FcpmV2ComputePoolSpecFromJSONTyped(json, false); + return FcpmV2ComputePoolSpecFromJSONTyped(json, false); } -export function FcpmV2ComputePoolSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePoolSpec { - if (json == null) { - return json; - } - return { - display_name: json["display_name"] == null ? undefined : json["display_name"], - cloud: json["cloud"] == null ? undefined : json["cloud"], - region: json["region"] == null ? undefined : json["region"], - max_cfu: json["max_cfu"] == null ? undefined : json["max_cfu"], - enable_ai: json["enable_ai"] == null ? undefined : json["enable_ai"], - environment: - json["environment"] == null ? undefined : GlobalObjectReferenceFromJSON(json["environment"]), - network: - json["network"] == null ? undefined : EnvScopedObjectReferenceFromJSON(json["network"]), - }; +export function FcpmV2ComputePoolSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolSpec { + if (json == null) { + return json; + } + return { + + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'cloud': json['cloud'] == null ? undefined : json['cloud'], + 'region': json['region'] == null ? undefined : json['region'], + 'max_cfu': json['max_cfu'] == null ? undefined : json['max_cfu'], + 'enable_ai': json['enable_ai'] == null ? undefined : json['enable_ai'], + 'environment': json['environment'] == null ? undefined : GlobalObjectReferenceFromJSON(json['environment']), + 'network': json['network'] == null ? undefined : EnvScopedObjectReferenceFromJSON(json['network']), + }; } export function FcpmV2ComputePoolSpecToJSON(json: any): FcpmV2ComputePoolSpec { - return FcpmV2ComputePoolSpecToJSONTyped(json, false); + return FcpmV2ComputePoolSpecToJSONTyped(json, false); } -export function FcpmV2ComputePoolSpecToJSONTyped( - value?: FcpmV2ComputePoolSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolSpecToJSONTyped(value?: FcpmV2ComputePoolSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - display_name: value["display_name"], - cloud: value["cloud"], - region: value["region"], - max_cfu: value["max_cfu"], - enable_ai: value["enable_ai"], - environment: GlobalObjectReferenceToJSON(value["environment"]), - network: EnvScopedObjectReferenceToJSON(value["network"]), - }; + return { + + 'display_name': value['display_name'], + 'cloud': value['cloud'], + 'region': value['region'], + 'max_cfu': value['max_cfu'], + 'enable_ai': value['enable_ai'], + 'environment': GlobalObjectReferenceToJSON(value['environment']), + 'network': EnvScopedObjectReferenceToJSON(value['network']), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts index 007134e946..50f314a2da 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts @@ -5,71 +5,69 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The status of the Compute Pool * @export * @interface FcpmV2ComputePoolStatus */ export interface FcpmV2ComputePoolStatus { - /** - * Status of the Flink compute pool. - * @type {string} - * @memberof FcpmV2ComputePoolStatus - */ - readonly phase: string; - /** - * The number of Confluent Flink Units (CFUs) currently allocated to this Flink compute pool. - * @type {number} - * @memberof FcpmV2ComputePoolStatus - */ - readonly current_cfu: number; + /** + * Status of the Flink compute pool. + * @type {string} + * @memberof FcpmV2ComputePoolStatus + */ + readonly phase: string; + /** + * The number of Confluent Flink Units (CFUs) currently allocated to this Flink compute pool. + * @type {number} + * @memberof FcpmV2ComputePoolStatus + */ + readonly current_cfu: number; } /** * Check if a given object implements the FcpmV2ComputePoolStatus interface. */ export function instanceOfFcpmV2ComputePoolStatus(value: object): value is FcpmV2ComputePoolStatus { - if (!("phase" in value) || value["phase"] === undefined) return false; - if (!("current_cfu" in value) || value["current_cfu"] === undefined) return false; - return true; + if (!('phase' in value) || value['phase'] === undefined) return false; + if (!('current_cfu' in value) || value['current_cfu'] === undefined) return false; + return true; } export function FcpmV2ComputePoolStatusFromJSON(json: any): FcpmV2ComputePoolStatus { - return FcpmV2ComputePoolStatusFromJSONTyped(json, false); + return FcpmV2ComputePoolStatusFromJSONTyped(json, false); } -export function FcpmV2ComputePoolStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2ComputePoolStatus { - if (json == null) { - return json; - } - return { - phase: json["phase"], - current_cfu: json["current_cfu"], - }; +export function FcpmV2ComputePoolStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolStatus { + if (json == null) { + return json; + } + return { + + 'phase': json['phase'], + 'current_cfu': json['current_cfu'], + }; } export function FcpmV2ComputePoolStatusToJSON(json: any): FcpmV2ComputePoolStatus { - return FcpmV2ComputePoolStatusToJSONTyped(json, false); + return FcpmV2ComputePoolStatusToJSONTyped(json, false); } -export function FcpmV2ComputePoolStatusToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2Region.ts b/src/clients/flinkComputePool/models/FcpmV2Region.ts index 27451f18e4..2b66ae4f87 100644 --- a/src/clients/flinkComputePool/models/FcpmV2Region.ts +++ b/src/clients/flinkComputePool/models/FcpmV2Region.ts @@ -5,156 +5,146 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2RegionMetadata } from "./FcpmV2RegionMetadata"; +import { mapValues } from '../runtime'; +import type { FcpmV2RegionMetadata } from './FcpmV2RegionMetadata'; import { - FcpmV2RegionMetadataFromJSON, - FcpmV2RegionMetadataFromJSONTyped, - FcpmV2RegionMetadataToJSON, - FcpmV2RegionMetadataToJSONTyped, -} from "./FcpmV2RegionMetadata"; + FcpmV2RegionMetadataFromJSON, + FcpmV2RegionMetadataFromJSONTyped, + FcpmV2RegionMetadataToJSON, + FcpmV2RegionMetadataToJSONTyped, +} from './FcpmV2RegionMetadata'; /** * `Region` objects represent cloud provider regions available when placing Flink compute pools. * The API allows you to list Flink regions. - * - * + * + * * ## The Regions Model * * @export * @interface FcpmV2Region */ export interface FcpmV2Region { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2Region - */ - readonly api_version?: FcpmV2RegionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2Region - */ - readonly kind?: FcpmV2RegionKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2Region - */ - readonly id?: string; - /** - * - * @type {FcpmV2RegionMetadata} - * @memberof FcpmV2Region - */ - metadata?: FcpmV2RegionMetadata; - /** - * The display name. - * @type {string} - * @memberof FcpmV2Region - */ - readonly display_name?: string; - /** - * The cloud service provider that hosts the region. - * @type {string} - * @memberof FcpmV2Region - */ - readonly cloud?: string; - /** - * The region name. - * @type {string} - * @memberof FcpmV2Region - */ - readonly region_name?: string; - /** - * The regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2Region - */ - readonly http_endpoint?: string; - /** - * The private regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2Region - */ - readonly private_http_endpoint?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2Region + */ + readonly api_version?: FcpmV2RegionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2Region + */ + readonly kind?: FcpmV2RegionKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2Region + */ + readonly id?: string; + /** + * + * @type {FcpmV2RegionMetadata} + * @memberof FcpmV2Region + */ + metadata?: FcpmV2RegionMetadata; + /** + * The display name. + * @type {string} + * @memberof FcpmV2Region + */ + readonly display_name?: string; + /** + * The cloud service provider that hosts the region. + * @type {string} + * @memberof FcpmV2Region + */ + readonly cloud?: string; + /** + * The region name. + * @type {string} + * @memberof FcpmV2Region + */ + readonly region_name?: string; + /** + * The regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2Region + */ + readonly http_endpoint?: string; + /** + * The private regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2Region + */ + readonly private_http_endpoint?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2RegionApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2RegionKindEnum { - Region = "Region", + Region = 'Region' } + /** * Check if a given object implements the FcpmV2Region interface. */ export function instanceOfFcpmV2Region(value: object): value is FcpmV2Region { - return true; + return true; } export function FcpmV2RegionFromJSON(json: any): FcpmV2Region { - return FcpmV2RegionFromJSONTyped(json, false); + return FcpmV2RegionFromJSONTyped(json, false); } export function FcpmV2RegionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2Region { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: json["metadata"] == null ? undefined : FcpmV2RegionMetadataFromJSON(json["metadata"]), - display_name: json["display_name"] == null ? undefined : json["display_name"], - cloud: json["cloud"] == null ? undefined : json["cloud"], - region_name: json["region_name"] == null ? undefined : json["region_name"], - http_endpoint: json["http_endpoint"] == null ? undefined : json["http_endpoint"], - private_http_endpoint: - json["private_http_endpoint"] == null ? undefined : json["private_http_endpoint"], - }; + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : FcpmV2RegionMetadataFromJSON(json['metadata']), + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'cloud': json['cloud'] == null ? undefined : json['cloud'], + 'region_name': json['region_name'] == null ? undefined : json['region_name'], + 'http_endpoint': json['http_endpoint'] == null ? undefined : json['http_endpoint'], + 'private_http_endpoint': json['private_http_endpoint'] == null ? undefined : json['private_http_endpoint'], + }; } export function FcpmV2RegionToJSON(json: any): FcpmV2Region { - return FcpmV2RegionToJSONTyped(json, false); + return FcpmV2RegionToJSONTyped(json, false); } -export function FcpmV2RegionToJSONTyped( - value?: Omit< - FcpmV2Region, - | "api_version" - | "kind" - | "id" - | "display_name" - | "cloud" - | "region_name" - | "http_endpoint" - | "private_http_endpoint" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2RegionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2RegionMetadataToJSON(value["metadata"]), - }; + return { + + 'metadata': FcpmV2RegionMetadataToJSON(value['metadata']), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionList.ts b/src/clients/flinkComputePool/models/FcpmV2RegionList.ts index 5c149383d5..534e7d1560 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionList.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionList.ts @@ -5,125 +5,123 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2RegionListDataInner } from "./FcpmV2RegionListDataInner"; +import { mapValues } from '../runtime'; +import type { FcpmV2RegionListDataInner } from './FcpmV2RegionListDataInner'; import { - FcpmV2RegionListDataInnerFromJSON, - FcpmV2RegionListDataInnerFromJSONTyped, - FcpmV2RegionListDataInnerToJSON, - FcpmV2RegionListDataInnerToJSONTyped, -} from "./FcpmV2RegionListDataInner"; -import type { FcpmV2RegionListMetadata } from "./FcpmV2RegionListMetadata"; + FcpmV2RegionListDataInnerFromJSON, + FcpmV2RegionListDataInnerFromJSONTyped, + FcpmV2RegionListDataInnerToJSON, + FcpmV2RegionListDataInnerToJSONTyped, +} from './FcpmV2RegionListDataInner'; +import type { FcpmV2RegionListMetadata } from './FcpmV2RegionListMetadata'; import { - FcpmV2RegionListMetadataFromJSON, - FcpmV2RegionListMetadataFromJSONTyped, - FcpmV2RegionListMetadataToJSON, - FcpmV2RegionListMetadataToJSONTyped, -} from "./FcpmV2RegionListMetadata"; + FcpmV2RegionListMetadataFromJSON, + FcpmV2RegionListMetadataFromJSONTyped, + FcpmV2RegionListMetadataToJSON, + FcpmV2RegionListMetadataToJSONTyped, +} from './FcpmV2RegionListMetadata'; /** * `Region` objects represent cloud provider regions available when placing Flink compute pools. * The API allows you to list Flink regions. - * - * + * + * * ## The Regions Model * * @export * @interface FcpmV2RegionList */ export interface FcpmV2RegionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2RegionList - */ - readonly api_version: FcpmV2RegionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2RegionList - */ - readonly kind: FcpmV2RegionListKindEnum; - /** - * - * @type {FcpmV2RegionListMetadata} - * @memberof FcpmV2RegionList - */ - metadata: FcpmV2RegionListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof FcpmV2RegionList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2RegionList + */ + readonly api_version: FcpmV2RegionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2RegionList + */ + readonly kind: FcpmV2RegionListKindEnum; + /** + * + * @type {FcpmV2RegionListMetadata} + * @memberof FcpmV2RegionList + */ + metadata: FcpmV2RegionListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof FcpmV2RegionList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2RegionListApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2RegionListKindEnum { - RegionList = "RegionList", + RegionList = 'RegionList' } + /** * Check if a given object implements the FcpmV2RegionList interface. */ export function instanceOfFcpmV2RegionList(value: object): value is FcpmV2RegionList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function FcpmV2RegionListFromJSON(json: any): FcpmV2RegionList { - return FcpmV2RegionListFromJSONTyped(json, false); + return FcpmV2RegionListFromJSONTyped(json, false); } -export function FcpmV2RegionListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2RegionList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: FcpmV2RegionListMetadataFromJSON(json["metadata"]), - data: new Set((json["data"] as Array).map(FcpmV2RegionListDataInnerFromJSON)), - }; +export function FcpmV2RegionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': FcpmV2RegionListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(FcpmV2RegionListDataInnerFromJSON))), + }; } export function FcpmV2RegionListToJSON(json: any): FcpmV2RegionList { - return FcpmV2RegionListToJSONTyped(json, false); + return FcpmV2RegionListToJSONTyped(json, false); } -export function FcpmV2RegionListToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2RegionListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2RegionListMetadataToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map(FcpmV2RegionListDataInnerToJSON), - }; + return { + + 'metadata': FcpmV2RegionListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(FcpmV2RegionListDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts b/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts index 728a1130f4..7ed41c6511 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts @@ -5,162 +5,147 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2RegionMetadata } from "./FcpmV2RegionMetadata"; +import { mapValues } from '../runtime'; +import type { FcpmV2RegionMetadata } from './FcpmV2RegionMetadata'; import { - FcpmV2RegionMetadataFromJSON, - FcpmV2RegionMetadataFromJSONTyped, - FcpmV2RegionMetadataToJSON, - FcpmV2RegionMetadataToJSONTyped, -} from "./FcpmV2RegionMetadata"; + FcpmV2RegionMetadataFromJSON, + FcpmV2RegionMetadataFromJSONTyped, + FcpmV2RegionMetadataToJSON, + FcpmV2RegionMetadataToJSONTyped, +} from './FcpmV2RegionMetadata'; /** - * + * * @export * @interface FcpmV2RegionListDataInner */ export interface FcpmV2RegionListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly api_version?: FcpmV2RegionListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly kind?: FcpmV2RegionListDataInnerKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly id: string; - /** - * - * @type {FcpmV2RegionMetadata} - * @memberof FcpmV2RegionListDataInner - */ - metadata: FcpmV2RegionMetadata; - /** - * The display name. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly display_name: string; - /** - * The cloud service provider that hosts the region. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly cloud: string; - /** - * The region name. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly region_name: string; - /** - * The regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly http_endpoint: string; - /** - * The private regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly private_http_endpoint?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly api_version?: FcpmV2RegionListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly kind?: FcpmV2RegionListDataInnerKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly id: string; + /** + * + * @type {FcpmV2RegionMetadata} + * @memberof FcpmV2RegionListDataInner + */ + metadata: FcpmV2RegionMetadata; + /** + * The display name. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly display_name: string; + /** + * The cloud service provider that hosts the region. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly cloud: string; + /** + * The region name. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly region_name: string; + /** + * The regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly http_endpoint: string; + /** + * The private regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly private_http_endpoint?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2RegionListDataInnerApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum FcpmV2RegionListDataInnerKindEnum { - Region = "Region", + Region = 'Region' } + /** * Check if a given object implements the FcpmV2RegionListDataInner interface. */ -export function instanceOfFcpmV2RegionListDataInner( - value: object, -): value is FcpmV2RegionListDataInner { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("display_name" in value) || value["display_name"] === undefined) return false; - if (!("cloud" in value) || value["cloud"] === undefined) return false; - if (!("region_name" in value) || value["region_name"] === undefined) return false; - if (!("http_endpoint" in value) || value["http_endpoint"] === undefined) return false; - return true; +export function instanceOfFcpmV2RegionListDataInner(value: object): value is FcpmV2RegionListDataInner { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('display_name' in value) || value['display_name'] === undefined) return false; + if (!('cloud' in value) || value['cloud'] === undefined) return false; + if (!('region_name' in value) || value['region_name'] === undefined) return false; + if (!('http_endpoint' in value) || value['http_endpoint'] === undefined) return false; + return true; } export function FcpmV2RegionListDataInnerFromJSON(json: any): FcpmV2RegionListDataInner { - return FcpmV2RegionListDataInnerFromJSONTyped(json, false); + return FcpmV2RegionListDataInnerFromJSONTyped(json, false); } -export function FcpmV2RegionListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2RegionListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"], - metadata: FcpmV2RegionMetadataFromJSON(json["metadata"]), - display_name: json["display_name"], - cloud: json["cloud"], - region_name: json["region_name"], - http_endpoint: json["http_endpoint"], - private_http_endpoint: - json["private_http_endpoint"] == null ? undefined : json["private_http_endpoint"], - }; +export function FcpmV2RegionListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'], + 'metadata': FcpmV2RegionMetadataFromJSON(json['metadata']), + 'display_name': json['display_name'], + 'cloud': json['cloud'], + 'region_name': json['region_name'], + 'http_endpoint': json['http_endpoint'], + 'private_http_endpoint': json['private_http_endpoint'] == null ? undefined : json['private_http_endpoint'], + }; } export function FcpmV2RegionListDataInnerToJSON(json: any): FcpmV2RegionListDataInner { - return FcpmV2RegionListDataInnerToJSONTyped(json, false); + return FcpmV2RegionListDataInnerToJSONTyped(json, false); } -export function FcpmV2RegionListDataInnerToJSONTyped( - value?: Omit< - FcpmV2RegionListDataInner, - | "api_version" - | "kind" - | "id" - | "display_name" - | "cloud" - | "region_name" - | "http_endpoint" - | "private_http_endpoint" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2RegionListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2RegionMetadataToJSON(value["metadata"]), - }; + return { + + 'metadata': FcpmV2RegionMetadataToJSON(value['metadata']), + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts index 359dfcd4c7..262663a247 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts @@ -5,98 +5,93 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface FcpmV2RegionListMetadata */ export interface FcpmV2RegionListMetadata { - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof FcpmV2RegionListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof FcpmV2RegionListMetadata + */ + total_size?: number; } /** * Check if a given object implements the FcpmV2RegionListMetadata interface. */ -export function instanceOfFcpmV2RegionListMetadata( - value: object, -): value is FcpmV2RegionListMetadata { - return true; +export function instanceOfFcpmV2RegionListMetadata(value: object): value is FcpmV2RegionListMetadata { + return true; } export function FcpmV2RegionListMetadataFromJSON(json: any): FcpmV2RegionListMetadata { - return FcpmV2RegionListMetadataFromJSONTyped(json, false); + return FcpmV2RegionListMetadataFromJSONTyped(json, false); } -export function FcpmV2RegionListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2RegionListMetadata { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; +export function FcpmV2RegionListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionListMetadata { + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function FcpmV2RegionListMetadataToJSON(json: any): FcpmV2RegionListMetadata { - return FcpmV2RegionListMetadataToJSONTyped(json, false); + return FcpmV2RegionListMetadataToJSONTyped(json, false); } -export function FcpmV2RegionListMetadataToJSONTyped( - value?: FcpmV2RegionListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2RegionListMetadataToJSONTyped(value?: FcpmV2RegionListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts index 55d3299bcd..be12637345 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts @@ -5,94 +5,91 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface FcpmV2RegionMetadata */ export interface FcpmV2RegionMetadata { - /** - * - * @type {any} - * @memberof FcpmV2RegionMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2RegionMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2RegionMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2RegionMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof FcpmV2RegionMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2RegionMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2RegionMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2RegionMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the FcpmV2RegionMetadata interface. */ export function instanceOfFcpmV2RegionMetadata(value: object): value is FcpmV2RegionMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function FcpmV2RegionMetadataFromJSON(json: any): FcpmV2RegionMetadata { - return FcpmV2RegionMetadataFromJSONTyped(json, false); + return FcpmV2RegionMetadataFromJSONTyped(json, false); } -export function FcpmV2RegionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): FcpmV2RegionMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function FcpmV2RegionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function FcpmV2RegionMetadataToJSON(json: any): FcpmV2RegionMetadata { - return FcpmV2RegionMetadataToJSONTyped(json, false); + return FcpmV2RegionMetadataToJSONTyped(json, false); } -export function FcpmV2RegionMetadataToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FcpmV2RegionMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts b/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts index 8e188cd4cd..1c45eb23fc 100644 --- a/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts +++ b/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts @@ -5,148 +5,141 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from "./FcpmV2ComputePoolStatus"; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from './FcpmV2ComputePoolStatus'; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, -} from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; -import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, +} from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; +import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from './FcpmV2ComputePoolMetadata'; /** - * + * * @export * @interface GetFcpmV2ComputePool200Response */ export interface GetFcpmV2ComputePool200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetFcpmV2ComputePool200Response - */ - readonly api_version: GetFcpmV2ComputePool200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetFcpmV2ComputePool200Response - */ - readonly kind: GetFcpmV2ComputePool200ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof GetFcpmV2ComputePool200Response - */ - readonly id: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof GetFcpmV2ComputePool200Response - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} - * @memberof GetFcpmV2ComputePool200Response - */ - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof GetFcpmV2ComputePool200Response - */ - status: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetFcpmV2ComputePool200Response + */ + readonly api_version: GetFcpmV2ComputePool200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetFcpmV2ComputePool200Response + */ + readonly kind: GetFcpmV2ComputePool200ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof GetFcpmV2ComputePool200Response + */ + readonly id: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof GetFcpmV2ComputePool200Response + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} + * @memberof GetFcpmV2ComputePool200Response + */ + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof GetFcpmV2ComputePool200Response + */ + status: FcpmV2ComputePoolStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetFcpmV2ComputePool200ResponseApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetFcpmV2ComputePool200ResponseKindEnum { - ComputePool = "ComputePool", + ComputePool = 'ComputePool' } + /** * Check if a given object implements the GetFcpmV2ComputePool200Response interface. */ -export function instanceOfGetFcpmV2ComputePool200Response( - value: object, -): value is GetFcpmV2ComputePool200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("id" in value) || value["id"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfGetFcpmV2ComputePool200Response(value: object): value is GetFcpmV2ComputePool200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } -export function GetFcpmV2ComputePool200ResponseFromJSON( - json: any, -): GetFcpmV2ComputePool200Response { - return GetFcpmV2ComputePool200ResponseFromJSONTyped(json, false); +export function GetFcpmV2ComputePool200ResponseFromJSON(json: any): GetFcpmV2ComputePool200Response { + return GetFcpmV2ComputePool200ResponseFromJSONTyped(json, false); } -export function GetFcpmV2ComputePool200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetFcpmV2ComputePool200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - id: json["id"], - metadata: - json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json["spec"]), - status: FcpmV2ComputePoolStatusFromJSON(json["status"]), - }; +export function GetFcpmV2ComputePool200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetFcpmV2ComputePool200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'id': json['id'], + 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), + 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json['spec']), + 'status': FcpmV2ComputePoolStatusFromJSON(json['status']), + }; } export function GetFcpmV2ComputePool200ResponseToJSON(json: any): GetFcpmV2ComputePool200Response { - return GetFcpmV2ComputePool200ResponseToJSONTyped(json, false); + return GetFcpmV2ComputePool200ResponseToJSONTyped(json, false); } -export function GetFcpmV2ComputePool200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetFcpmV2ComputePool200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value["spec"]), - status: FcpmV2ComputePoolStatusToJSON(value["status"]), - }; + return { + + 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), + 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value['spec']), + 'status': FcpmV2ComputePoolStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkComputePool/models/GlobalObjectReference.ts b/src/clients/flinkComputePool/models/GlobalObjectReference.ts index fd50f5b7b8..f7089ae5f1 100644 --- a/src/clients/flinkComputePool/models/GlobalObjectReference.ts +++ b/src/clients/flinkComputePool/models/GlobalObjectReference.ts @@ -5,81 +5,78 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface GlobalObjectReference */ export interface GlobalObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - id: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof GlobalObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + id: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof GlobalObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the GlobalObjectReference interface. */ export function instanceOfGlobalObjectReference(value: object): value is GlobalObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function GlobalObjectReferenceFromJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceFromJSONTyped(json, false); + return GlobalObjectReferenceFromJSONTyped(json, false); } -export function GlobalObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GlobalObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - related: json["related"], - resource_name: json["resource_name"], - }; +export function GlobalObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'related': json['related'], + 'resource_name': json['resource_name'], + }; } export function GlobalObjectReferenceToJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceToJSONTyped(json, false); + return GlobalObjectReferenceToJSONTyped(json, false); } -export function GlobalObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GlobalObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - }; + return { + + 'id': value['id'], + }; } + diff --git a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts index e97ce26319..176e0634ad 100644 --- a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts +++ b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts @@ -5,126 +5,118 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolListMetadata } from "./FcpmV2ComputePoolListMetadata"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolListMetadata } from './FcpmV2ComputePoolListMetadata'; import { - FcpmV2ComputePoolListMetadataFromJSON, - FcpmV2ComputePoolListMetadataFromJSONTyped, - FcpmV2ComputePoolListMetadataToJSON, - FcpmV2ComputePoolListMetadataToJSONTyped, -} from "./FcpmV2ComputePoolListMetadata"; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInner } from "./ListFcpmV2ComputePools200ResponseAllOfDataInner"; + FcpmV2ComputePoolListMetadataFromJSON, + FcpmV2ComputePoolListMetadataFromJSONTyped, + FcpmV2ComputePoolListMetadataToJSON, + FcpmV2ComputePoolListMetadataToJSONTyped, +} from './FcpmV2ComputePoolListMetadata'; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInner } from './ListFcpmV2ComputePools200ResponseAllOfDataInner'; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped, -} from "./ListFcpmV2ComputePools200ResponseAllOfDataInner"; + ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped, +} from './ListFcpmV2ComputePools200ResponseAllOfDataInner'; /** - * + * * @export * @interface ListFcpmV2ComputePools200Response */ export interface ListFcpmV2ComputePools200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ListFcpmV2ComputePools200Response - */ - readonly api_version: ListFcpmV2ComputePools200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ListFcpmV2ComputePools200Response - */ - readonly kind: ListFcpmV2ComputePools200ResponseKindEnum; - /** - * - * @type {FcpmV2ComputePoolListMetadata} - * @memberof ListFcpmV2ComputePools200Response - */ - metadata: FcpmV2ComputePoolListMetadata; - /** - * - * @type {Array} - * @memberof ListFcpmV2ComputePools200Response - */ - data: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ListFcpmV2ComputePools200Response + */ + readonly api_version: ListFcpmV2ComputePools200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ListFcpmV2ComputePools200Response + */ + readonly kind: ListFcpmV2ComputePools200ResponseKindEnum; + /** + * + * @type {FcpmV2ComputePoolListMetadata} + * @memberof ListFcpmV2ComputePools200Response + */ + metadata: FcpmV2ComputePoolListMetadata; + /** + * + * @type {Array} + * @memberof ListFcpmV2ComputePools200Response + */ + data: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ListFcpmV2ComputePools200ResponseApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ListFcpmV2ComputePools200ResponseKindEnum { - ComputePoolList = "ComputePoolList", + ComputePoolList = 'ComputePoolList' } + /** * Check if a given object implements the ListFcpmV2ComputePools200Response interface. */ -export function instanceOfListFcpmV2ComputePools200Response( - value: object, -): value is ListFcpmV2ComputePools200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfListFcpmV2ComputePools200Response(value: object): value is ListFcpmV2ComputePools200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function ListFcpmV2ComputePools200ResponseFromJSON( - json: any, -): ListFcpmV2ComputePools200Response { - return ListFcpmV2ComputePools200ResponseFromJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseFromJSON(json: any): ListFcpmV2ComputePools200Response { + return ListFcpmV2ComputePools200ResponseFromJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListFcpmV2ComputePools200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: FcpmV2ComputePoolListMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON), - }; +export function ListFcpmV2ComputePools200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFcpmV2ComputePools200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': FcpmV2ComputePoolListMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON)), + }; } -export function ListFcpmV2ComputePools200ResponseToJSON( - json: any, -): ListFcpmV2ComputePools200Response { - return ListFcpmV2ComputePools200ResponseToJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseToJSON(json: any): ListFcpmV2ComputePools200Response { + return ListFcpmV2ComputePools200ResponseToJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListFcpmV2ComputePools200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolListMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON), - }; + return { + + 'metadata': FcpmV2ComputePoolListMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts index cd0aa3a61e..bbb2bc9268 100644 --- a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts +++ b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts @@ -5,81 +5,69 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; +import { mapValues } from '../runtime'; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, -} from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, +} from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; /** - * + * * @export * @interface ListFcpmV2ComputePools200ResponseAllOfDataInner */ export interface ListFcpmV2ComputePools200ResponseAllOfDataInner { - /** - * - * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} - * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInner - */ - spec?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; + /** + * + * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} + * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInner + */ + spec?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; } /** * Check if a given object implements the ListFcpmV2ComputePools200ResponseAllOfDataInner interface. */ -export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInner( - value: object, -): value is ListFcpmV2ComputePools200ResponseAllOfDataInner { - return true; +export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInner(value: object): value is ListFcpmV2ComputePools200ResponseAllOfDataInner { + return true; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON( - json: any, -): ListFcpmV2ComputePools200ResponseAllOfDataInner { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInner { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListFcpmV2ComputePools200ResponseAllOfDataInner { - if (json == null) { - return json; - } - return { - spec: - json["spec"] == null - ? undefined - : ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json["spec"]), - }; +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFcpmV2ComputePools200ResponseAllOfDataInner { + if (json == null) { + return json; + } + return { + + 'spec': json['spec'] == null ? undefined : ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json['spec']), + }; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON( - json: any, -): ListFcpmV2ComputePools200ResponseAllOfDataInner { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInner { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped( - value?: ListFcpmV2ComputePools200ResponseAllOfDataInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped(value?: ListFcpmV2ComputePools200ResponseAllOfDataInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value["spec"]), - }; + return { + + 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value['spec']), + }; } + diff --git a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts index 0501ef2df4..de53729c93 100644 --- a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts +++ b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts @@ -5,78 +5,69 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec */ export interface ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - /** - * - * @type {any} - * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec - */ - environment?: any | null; - /** - * - * @type {any} - * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec - */ - network?: any | null; + /** + * + * @type {any} + * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec + */ + environment?: any | null; + /** + * + * @type {any} + * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec + */ + network?: any | null; } /** * Check if a given object implements the ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec interface. */ -export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInnerSpec( - value: object, -): value is ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - return true; +export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInnerSpec(value: object): value is ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + return true; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON( - json: any, -): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - if (json == null) { - return json; - } - return { - environment: json["environment"] == null ? undefined : json["environment"], - network: json["network"] == null ? undefined : json["network"], - }; +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + if (json == null) { + return json; + } + return { + + 'environment': json['environment'] == null ? undefined : json['environment'], + 'network': json['network'] == null ? undefined : json['network'], + }; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON( - json: any, -): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped( - value?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped(value?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - environment: value["environment"], - network: value["network"], - }; + return { + + 'environment': value['environment'], + 'network': value['network'], + }; } + diff --git a/src/clients/flinkComputePool/models/ListMeta.ts b/src/clients/flinkComputePool/models/ListMeta.ts index f82c218c2f..e2affd30f1 100644 --- a/src/clients/flinkComputePool/models/ListMeta.ts +++ b/src/clients/flinkComputePool/models/ListMeta.ts @@ -5,93 +5,93 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. - * @type {string} - * @memberof ListMeta - */ - first?: string | null; - /** - * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. - * @type {string} - * @memberof ListMeta - */ - last?: string | null; - /** - * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. - * @type {string} - * @memberof ListMeta - */ - prev?: string | null; - /** - * A link to the next page of results. If a response does not contain a next link, then there is no more data available. - * @type {string} - * @memberof ListMeta - */ - next?: string | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ListMeta - */ - total_size?: number; + /** + * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. + * @type {string} + * @memberof ListMeta + */ + first?: string | null; + /** + * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. + * @type {string} + * @memberof ListMeta + */ + last?: string | null; + /** + * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. + * @type {string} + * @memberof ListMeta + */ + prev?: string | null; + /** + * A link to the next page of results. If a response does not contain a next link, then there is no more data available. + * @type {string} + * @memberof ListMeta + */ + next?: string | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ListMeta + */ + total_size?: number; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped( - value?: ListMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/flinkComputePool/models/ModelError.ts b/src/clients/flinkComputePool/models/ModelError.ts index feb9669fcb..729d09393d 100644 --- a/src/clients/flinkComputePool/models/ModelError.ts +++ b/src/clients/flinkComputePool/models/ModelError.ts @@ -5,21 +5,21 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorSource } from "./ErrorSource"; +import { mapValues } from '../runtime'; +import type { ErrorSource } from './ErrorSource'; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from "./ErrorSource"; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from './ErrorSource'; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - status: json["status"] == null ? undefined : json["status"], - code: json["code"] == null ? undefined : json["code"], - title: json["title"] == null ? undefined : json["title"], - detail: json["detail"] == null ? undefined : json["detail"], - source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'code': json['code'] == null ? undefined : json['code'], + 'title': json['title'] == null ? undefined : json['title'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped( - value?: ModelError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - status: value["status"], - code: value["code"], - title: value["title"], - detail: value["detail"], - source: ErrorSourceToJSON(value["source"]), - }; + return { + + 'id': value['id'], + 'status': value['status'], + 'code': value['code'], + 'title': value['title'], + 'detail': value['detail'], + 'source': ErrorSourceToJSON(value['source']), + }; } + diff --git a/src/clients/flinkComputePool/models/ObjectMeta.ts b/src/clients/flinkComputePool/models/ObjectMeta.ts index 0c4d83d6ad..19008bb09e 100644 --- a/src/clients/flinkComputePool/models/ObjectMeta.ts +++ b/src/clients/flinkComputePool/models/ObjectMeta.ts @@ -5,91 +5,89 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_name?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly deleted_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_name?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped( - value?: Omit< - ObjectMeta, - "self" | "resource_name" | "created_at" | "updated_at" | "deleted_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkComputePool/models/ObjectReference.ts b/src/clients/flinkComputePool/models/ObjectReference.ts index 4dfde26dcb..c818f9ec61 100644 --- a/src/clients/flinkComputePool/models/ObjectReference.ts +++ b/src/clients/flinkComputePool/models/ObjectReference.ts @@ -5,103 +5,100 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface ObjectReference */ export interface ObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof ObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof ObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof ObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly resource_name: string; - /** - * API group and version of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly api_version?: string; - /** - * Kind of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly kind?: string; + /** + * ID of the referred resource + * @type {string} + * @memberof ObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof ObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof ObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly resource_name: string; + /** + * API group and version of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly api_version?: string; + /** + * Kind of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly kind?: string; } /** * Check if a given object implements the ObjectReference interface. */ export function instanceOfObjectReference(value: object): value is ObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function ObjectReferenceFromJSON(json: any): ObjectReference { - return ObjectReferenceFromJSONTyped(json, false); + return ObjectReferenceFromJSONTyped(json, false); } -export function ObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - environment: json["environment"] == null ? undefined : json["environment"], - related: json["related"], - resource_name: json["resource_name"], - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function ObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'related': json['related'], + 'resource_name': json['resource_name'], + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function ObjectReferenceToJSON(json: any): ObjectReference { - return ObjectReferenceToJSONTyped(json, false); + return ObjectReferenceToJSONTyped(json, false); } -export function ObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - environment: value["environment"], - }; + return { + + 'id': value['id'], + 'environment': value['environment'], + }; } + diff --git a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts index 716d535030..3a52adab2e 100644 --- a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts +++ b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts @@ -5,142 +5,137 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; +import { mapValues } from '../runtime'; +import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from "./FcpmV2ComputePoolStatus"; -import type { UpdateFcpmV2ComputePoolRequestAllOfSpec } from "./UpdateFcpmV2ComputePoolRequestAllOfSpec"; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from './FcpmV2ComputePoolStatus'; +import type { UpdateFcpmV2ComputePoolRequestAllOfSpec } from './UpdateFcpmV2ComputePoolRequestAllOfSpec'; import { - UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON, - UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, - UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON, - UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, -} from "./UpdateFcpmV2ComputePoolRequestAllOfSpec"; -import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; + UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON, + UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, + UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON, + UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, +} from './UpdateFcpmV2ComputePoolRequestAllOfSpec'; +import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from "./FcpmV2ComputePoolMetadata"; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from './FcpmV2ComputePoolMetadata'; /** - * + * * @export * @interface UpdateFcpmV2ComputePoolRequest */ export interface UpdateFcpmV2ComputePoolRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - readonly api_version?: UpdateFcpmV2ComputePoolRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - readonly kind?: UpdateFcpmV2ComputePoolRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {UpdateFcpmV2ComputePoolRequestAllOfSpec} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - spec: UpdateFcpmV2ComputePoolRequestAllOfSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - status?: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + readonly api_version?: UpdateFcpmV2ComputePoolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + readonly kind?: UpdateFcpmV2ComputePoolRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {UpdateFcpmV2ComputePoolRequestAllOfSpec} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + spec: UpdateFcpmV2ComputePoolRequestAllOfSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + status?: FcpmV2ComputePoolStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum UpdateFcpmV2ComputePoolRequestApiVersionEnum { - FcpmV2 = "fcpm/v2", + FcpmV2 = 'fcpm/v2' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum UpdateFcpmV2ComputePoolRequestKindEnum { - ComputePool = "ComputePool", + ComputePool = 'ComputePool' } + /** * Check if a given object implements the UpdateFcpmV2ComputePoolRequest interface. */ -export function instanceOfUpdateFcpmV2ComputePoolRequest( - value: object, -): value is UpdateFcpmV2ComputePoolRequest { - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfUpdateFcpmV2ComputePoolRequest(value: object): value is UpdateFcpmV2ComputePoolRequest { + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function UpdateFcpmV2ComputePoolRequestFromJSON(json: any): UpdateFcpmV2ComputePoolRequest { - return UpdateFcpmV2ComputePoolRequestFromJSONTyped(json, false); + return UpdateFcpmV2ComputePoolRequestFromJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateFcpmV2ComputePoolRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - id: json["id"] == null ? undefined : json["id"], - metadata: - json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), - spec: UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json["status"]), - }; +export function UpdateFcpmV2ComputePoolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateFcpmV2ComputePoolRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'id': json['id'] == null ? undefined : json['id'], + 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), + 'spec': UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json['status']), + }; } export function UpdateFcpmV2ComputePoolRequestToJSON(json: any): UpdateFcpmV2ComputePoolRequest { - return UpdateFcpmV2ComputePoolRequestToJSONTyped(json, false); + return UpdateFcpmV2ComputePoolRequestToJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateFcpmV2ComputePoolRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), - spec: UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON(value["spec"]), - status: FcpmV2ComputePoolStatusToJSON(value["status"]), - }; + return { + + 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), + 'spec': UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON(value['spec']), + 'status': FcpmV2ComputePoolStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts index 365d28f66f..99ada9403f 100644 --- a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts +++ b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts @@ -5,71 +5,62 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UpdateFcpmV2ComputePoolRequestAllOfSpec */ export interface UpdateFcpmV2ComputePoolRequestAllOfSpec { - /** - * - * @type {any} - * @memberof UpdateFcpmV2ComputePoolRequestAllOfSpec - */ - environment: any | null; + /** + * + * @type {any} + * @memberof UpdateFcpmV2ComputePoolRequestAllOfSpec + */ + environment: any | null; } /** * Check if a given object implements the UpdateFcpmV2ComputePoolRequestAllOfSpec interface. */ -export function instanceOfUpdateFcpmV2ComputePoolRequestAllOfSpec( - value: object, -): value is UpdateFcpmV2ComputePoolRequestAllOfSpec { - if (!("environment" in value) || value["environment"] === undefined) return false; - return true; +export function instanceOfUpdateFcpmV2ComputePoolRequestAllOfSpec(value: object): value is UpdateFcpmV2ComputePoolRequestAllOfSpec { + if (!('environment' in value) || value['environment'] === undefined) return false; + return true; } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON( - json: any, -): UpdateFcpmV2ComputePoolRequestAllOfSpec { - return UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); +export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json: any): UpdateFcpmV2ComputePoolRequestAllOfSpec { + return UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateFcpmV2ComputePoolRequestAllOfSpec { - if (json == null) { - return json; - } - return { - environment: json["environment"], - }; +export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateFcpmV2ComputePoolRequestAllOfSpec { + if (json == null) { + return json; + } + return { + + 'environment': json['environment'], + }; } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON( - json: any, -): UpdateFcpmV2ComputePoolRequestAllOfSpec { - return UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); +export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON(json: any): UpdateFcpmV2ComputePoolRequestAllOfSpec { + return UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped( - value?: UpdateFcpmV2ComputePoolRequestAllOfSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(value?: UpdateFcpmV2ComputePoolRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - environment: value["environment"], - }; + return { + + 'environment': value['environment'], + }; } + diff --git a/src/clients/flinkComputePool/models/index.ts b/src/clients/flinkComputePool/models/index.ts index 4fb7a2b982..e0a9098cb7 100644 --- a/src/clients/flinkComputePool/models/index.ts +++ b/src/clients/flinkComputePool/models/index.ts @@ -1,31 +1,31 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./CreateFcpmV2ComputePool202Response"; -export * from "./CreateFcpmV2ComputePoolRequest"; -export * from "./CreateFcpmV2ComputePoolRequestAllOfSpec"; -export * from "./EnvScopedObjectReference"; -export * from "./ErrorSource"; -export * from "./Failure"; -export * from "./FcpmV2ComputePool"; -export * from "./FcpmV2ComputePoolList"; -export * from "./FcpmV2ComputePoolListDataInner"; -export * from "./FcpmV2ComputePoolListMetadata"; -export * from "./FcpmV2ComputePoolMetadata"; -export * from "./FcpmV2ComputePoolSpec"; -export * from "./FcpmV2ComputePoolStatus"; -export * from "./FcpmV2Region"; -export * from "./FcpmV2RegionList"; -export * from "./FcpmV2RegionListDataInner"; -export * from "./FcpmV2RegionListMetadata"; -export * from "./FcpmV2RegionMetadata"; -export * from "./GetFcpmV2ComputePool200Response"; -export * from "./GlobalObjectReference"; -export * from "./ListFcpmV2ComputePools200Response"; -export * from "./ListFcpmV2ComputePools200ResponseAllOfDataInner"; -export * from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; -export * from "./ListMeta"; -export * from "./ModelError"; -export * from "./ObjectMeta"; -export * from "./ObjectReference"; -export * from "./UpdateFcpmV2ComputePoolRequest"; -export * from "./UpdateFcpmV2ComputePoolRequestAllOfSpec"; +export * from './CreateFcpmV2ComputePool202Response'; +export * from './CreateFcpmV2ComputePoolRequest'; +export * from './CreateFcpmV2ComputePoolRequestAllOfSpec'; +export * from './EnvScopedObjectReference'; +export * from './ErrorSource'; +export * from './Failure'; +export * from './FcpmV2ComputePool'; +export * from './FcpmV2ComputePoolList'; +export * from './FcpmV2ComputePoolListDataInner'; +export * from './FcpmV2ComputePoolListMetadata'; +export * from './FcpmV2ComputePoolMetadata'; +export * from './FcpmV2ComputePoolSpec'; +export * from './FcpmV2ComputePoolStatus'; +export * from './FcpmV2Region'; +export * from './FcpmV2RegionList'; +export * from './FcpmV2RegionListDataInner'; +export * from './FcpmV2RegionListMetadata'; +export * from './FcpmV2RegionMetadata'; +export * from './GetFcpmV2ComputePool200Response'; +export * from './GlobalObjectReference'; +export * from './ListFcpmV2ComputePools200Response'; +export * from './ListFcpmV2ComputePools200ResponseAllOfDataInner'; +export * from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; +export * from './ListMeta'; +export * from './ModelError'; +export * from './ObjectMeta'; +export * from './ObjectReference'; +export * from './UpdateFcpmV2ComputePoolRequest'; +export * from './UpdateFcpmV2ComputePoolRequestAllOfSpec'; diff --git a/src/clients/flinkComputePool/runtime.ts b/src/clients/flinkComputePool/runtime.ts index bde357f003..8cb8b43b64 100644 --- a/src/clients/flinkComputePool/runtime.ts +++ b/src/clients/flinkComputePool/runtime.ts @@ -5,85 +5,83 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://api.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/flinkSql/.openapi-generator/FILES b/src/clients/flinkSql/.openapi-generator/FILES index 47cb313744..c0dbb3ebb3 100644 --- a/src/clients/flinkSql/.openapi-generator/FILES +++ b/src/clients/flinkSql/.openapi-generator/FILES @@ -1,14 +1,22 @@ +apis/AgentsSqlV1Api.ts apis/ConnectionsSqlV1Api.ts +apis/MaterializedTableVersionsSqlV1Api.ts +apis/MaterializedTablesSqlV1Api.ts apis/StatementExceptionsSqlV1Api.ts apis/StatementResultsSqlV1Api.ts apis/StatementsSqlV1Api.ts +apis/ToolsSqlV1Api.ts apis/index.ts index.ts models/ColumnDetails.ts +models/CreateSqlv1AgentRequest.ts models/CreateSqlv1Connection201Response.ts models/CreateSqlv1ConnectionRequest.ts +models/CreateSqlv1MaterializedTable201Response.ts +models/CreateSqlv1MaterializedTableRequest.ts models/CreateSqlv1Statement201Response.ts models/CreateSqlv1StatementRequest.ts +models/CreateSqlv1ToolRequest.ts models/DataType.ts models/ErrorSource.ts models/ExceptionListMeta.ts @@ -16,6 +24,7 @@ models/Failure.ts models/GetSqlv1Connection200Response.ts models/GetSqlv1Statement200Response.ts models/GetSqlv1StatementResult200Response.ts +models/GetSqlv1Tool200Response.ts models/JsonPatchRequestAddReplace.ts models/JsonPatchRequestMoveCopy.ts models/JsonPatchRequestRemove.ts @@ -25,6 +34,13 @@ models/ObjectMeta.ts models/PatchRequestInner.ts models/ResultListMeta.ts models/RowFieldType.ts +models/SqlV1Agent.ts +models/SqlV1AgentList.ts +models/SqlV1AgentMetadata.ts +models/SqlV1AgentSpec.ts +models/SqlV1AgentStatus.ts +models/SqlV1ColumnCommon.ts +models/SqlV1ComputedColumn.ts models/SqlV1Connection.ts models/SqlV1ConnectionList.ts models/SqlV1ConnectionListDataInner.ts @@ -33,9 +49,27 @@ models/SqlV1ConnectionMetadata.ts models/SqlV1ConnectionSpec.ts models/SqlV1ConnectionSpecAuthData.ts models/SqlV1ConnectionStatus.ts +models/SqlV1MaterializedTable.ts +models/SqlV1MaterializedTableColumnDetails.ts +models/SqlV1MaterializedTableConstraint.ts +models/SqlV1MaterializedTableDistribution.ts +models/SqlV1MaterializedTableList.ts +models/SqlV1MaterializedTableMetadata.ts +models/SqlV1MaterializedTableSpec.ts +models/SqlV1MaterializedTableStatus.ts +models/SqlV1MaterializedTableVersion.ts +models/SqlV1MaterializedTableVersionList.ts +models/SqlV1MaterializedTableVersionMetadata.ts +models/SqlV1MaterializedTableVersionSpec.ts +models/SqlV1MaterializedTableWarning.ts +models/SqlV1MaterializedTableWatermark.ts +models/SqlV1MetadataColumn.ts +models/SqlV1PhysicalColumn.ts models/SqlV1PlaintextProvider.ts +models/SqlV1ResourceChange.ts models/SqlV1ResultSchema.ts models/SqlV1ScalingStatus.ts +models/SqlV1StateLimitStatus.ts models/SqlV1Statement.ts models/SqlV1StatementException.ts models/SqlV1StatementExceptionList.ts @@ -47,9 +81,20 @@ models/SqlV1StatementResult.ts models/SqlV1StatementResultResults.ts models/SqlV1StatementSpec.ts models/SqlV1StatementStatus.ts +models/SqlV1StatementStatusAffectedResource.ts models/SqlV1StatementTraits.ts +models/SqlV1StatementWarning.ts +models/SqlV1Tool.ts +models/SqlV1ToolList.ts +models/SqlV1ToolListDataInner.ts +models/SqlV1ToolListMetadata.ts +models/SqlV1ToolMetadata.ts +models/SqlV1ToolSpec.ts +models/SqlV1ToolStatus.ts models/StatementObjectMeta.ts +models/UpdateSqlv1AgentRequest.ts models/UpdateSqlv1ConnectionRequest.ts +models/UpdateSqlv1MaterializedTableRequest.ts models/UpdateSqlv1StatementRequest.ts models/index.ts runtime.ts diff --git a/src/clients/flinkSql/apis/AgentsSqlV1Api.ts b/src/clients/flinkSql/apis/AgentsSqlV1Api.ts new file mode 100644 index 0000000000..4e9086717f --- /dev/null +++ b/src/clients/flinkSql/apis/AgentsSqlV1Api.ts @@ -0,0 +1,397 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CreateSqlv1AgentRequest, + Failure, + SqlV1Agent, + SqlV1AgentList, + UpdateSqlv1AgentRequest, +} from '../models/index'; +import { + CreateSqlv1AgentRequestFromJSON, + CreateSqlv1AgentRequestToJSON, + FailureFromJSON, + FailureToJSON, + SqlV1AgentFromJSON, + SqlV1AgentToJSON, + SqlV1AgentListFromJSON, + SqlV1AgentListToJSON, + UpdateSqlv1AgentRequestFromJSON, + UpdateSqlv1AgentRequestToJSON, +} from '../models/index'; + +export interface CreateSqlv1AgentOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + CreateSqlv1AgentRequest?: CreateSqlv1AgentRequest; +} + +export interface DeleteSqlv1AgentRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; +} + +export interface GetSqlv1AgentRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; +} + +export interface ListSqlv1AgentsRequest { + organization_id: string; + environment_id: string; + page_size?: number; + page_token?: string; +} + +export interface UpdateSqlv1AgentOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; + UpdateSqlv1AgentRequest: UpdateSqlv1AgentRequest; +} + +/** + * + */ +export class AgentsSqlV1Api extends runtime.BaseAPI { + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. + * Create an Agent + */ + async createSqlv1AgentRaw(requestParameters: CreateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Agent().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Agent().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1Agent().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1AgentRequestToJSON(requestParameters['CreateSqlv1AgentRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1AgentRequestFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. + * Create an Agent + */ + async createSqlv1Agent(requestParameters: CreateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. + * Delete an Agent + */ + async deleteSqlv1AgentRaw(requestParameters: DeleteSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Agent().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Agent().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1Agent().' + ); + } + + if (requestParameters['agent_name'] == null) { + throw new runtime.RequiredError( + 'agent_name', + 'Required parameter "agent_name" was null or undefined when calling deleteSqlv1Agent().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"agent_name"}}`, encodeURIComponent(String(requestParameters['agent_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. + * Delete an Agent + */ + async deleteSqlv1Agent(requestParameters: DeleteSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSqlv1AgentRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. + * Read an Agent + */ + async getSqlv1AgentRaw(requestParameters: GetSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Agent().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Agent().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1Agent().' + ); + } + + if (requestParameters['agent_name'] == null) { + throw new runtime.RequiredError( + 'agent_name', + 'Required parameter "agent_name" was null or undefined when calling getSqlv1Agent().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"agent_name"}}`, encodeURIComponent(String(requestParameters['agent_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. + * Read an Agent + */ + async getSqlv1Agent(requestParameters: GetSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. + * List all agents + */ + async listSqlv1AgentsRaw(requestParameters: ListSqlv1AgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Agents().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Agents().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/agents`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. + * List all agents + */ + async listSqlv1Agents(requestParameters: ListSqlv1AgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listSqlv1AgentsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. + * Alter an Agent + */ + async updateSqlv1AgentRaw(requestParameters: UpdateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Agent().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Agent().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1Agent().' + ); + } + + if (requestParameters['agent_name'] == null) { + throw new runtime.RequiredError( + 'agent_name', + 'Required parameter "agent_name" was null or undefined when calling updateSqlv1Agent().' + ); + } + + if (requestParameters['UpdateSqlv1AgentRequest'] == null) { + throw new runtime.RequiredError( + 'UpdateSqlv1AgentRequest', + 'Required parameter "UpdateSqlv1AgentRequest" was null or undefined when calling updateSqlv1Agent().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"agent_name"}}`, encodeURIComponent(String(requestParameters['agent_name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1AgentRequestToJSON(requestParameters['UpdateSqlv1AgentRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. + * Alter an Agent + */ + async updateSqlv1Agent(requestParameters: UpdateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts b/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts index 60e0247c71..b13be692ea 100644 --- a/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts @@ -5,14 +5,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CreateSqlv1Connection201Response, CreateSqlv1ConnectionRequest, @@ -20,441 +21,320 @@ import type { GetSqlv1Connection200Response, SqlV1ConnectionList, UpdateSqlv1ConnectionRequest, -} from "../models/index"; +} from '../models/index'; import { - CreateSqlv1Connection201ResponseFromJSON, - CreateSqlv1Connection201ResponseToJSON, - CreateSqlv1ConnectionRequestFromJSON, - CreateSqlv1ConnectionRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetSqlv1Connection200ResponseFromJSON, - GetSqlv1Connection200ResponseToJSON, - SqlV1ConnectionListFromJSON, - SqlV1ConnectionListToJSON, - UpdateSqlv1ConnectionRequestFromJSON, - UpdateSqlv1ConnectionRequestToJSON, -} from "../models/index"; + CreateSqlv1Connection201ResponseFromJSON, + CreateSqlv1Connection201ResponseToJSON, + CreateSqlv1ConnectionRequestFromJSON, + CreateSqlv1ConnectionRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Connection200ResponseFromJSON, + GetSqlv1Connection200ResponseToJSON, + SqlV1ConnectionListFromJSON, + SqlV1ConnectionListToJSON, + UpdateSqlv1ConnectionRequestFromJSON, + UpdateSqlv1ConnectionRequestToJSON, +} from '../models/index'; export interface CreateSqlv1ConnectionOperationRequest { - organization_id: string; - environment_id: string; - CreateSqlv1ConnectionRequest?: CreateSqlv1ConnectionRequest; + organization_id: string; + environment_id: string; + CreateSqlv1ConnectionRequest?: CreateSqlv1ConnectionRequest; } export interface DeleteSqlv1ConnectionRequest { - organization_id: string; - environment_id: string; - connection_name: string; + organization_id: string; + environment_id: string; + connection_name: string; } export interface GetSqlv1ConnectionRequest { - organization_id: string; - environment_id: string; - connection_name: string; + organization_id: string; + environment_id: string; + connection_name: string; } export interface ListSqlv1ConnectionsRequest { - organization_id: string; - environment_id: string; - spec_connection_type?: string; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + spec_connection_type?: string; + page_size?: number; + page_token?: string; } export interface UpdateSqlv1ConnectionOperationRequest { - organization_id: string; - environment_id: string; - connection_name: string; - UpdateSqlv1ConnectionRequest?: UpdateSqlv1ConnectionRequest; + organization_id: string; + environment_id: string; + connection_name: string; + UpdateSqlv1ConnectionRequest?: UpdateSqlv1ConnectionRequest; } /** - * + * */ export class ConnectionsSqlV1Api extends runtime.BaseAPI { - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. - * Create a Connection - */ - async createSqlv1ConnectionRaw( - requestParameters: CreateSqlv1ConnectionOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling createSqlv1Connection().', - ); - } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling createSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. + * Create a Connection + */ + async createSqlv1ConnectionRaw(requestParameters: CreateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Connection().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Connection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1ConnectionRequestToJSON(requestParameters['CreateSqlv1ConnectionRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1Connection201ResponseFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1ConnectionRequestToJSON(requestParameters["CreateSqlv1ConnectionRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateSqlv1Connection201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. - * Create a Connection - */ - async createSqlv1Connection( - requestParameters: CreateSqlv1ConnectionOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createSqlv1ConnectionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Connection - */ - async deleteSqlv1ConnectionRaw( - requestParameters: DeleteSqlv1ConnectionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. + * Create a Connection + */ + async createSqlv1Connection(requestParameters: CreateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSqlv1ConnectionRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Connection + */ + async deleteSqlv1ConnectionRaw(requestParameters: DeleteSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Connection().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Connection().' + ); + } + + if (requestParameters['connection_name'] == null) { + throw new runtime.RequiredError( + 'connection_name', + 'Required parameter "connection_name" was null or undefined when calling deleteSqlv1Connection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"connection_name"}}`, encodeURIComponent(String(requestParameters['connection_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["connection_name"] == null) { - throw new runtime.RequiredError( - "connection_name", - 'Required parameter "connection_name" was null or undefined when calling deleteSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Connection + */ + async deleteSqlv1Connection(requestParameters: DeleteSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSqlv1ConnectionRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"connection_name"}}`, - encodeURIComponent(String(requestParameters["connection_name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Connection - */ - async deleteSqlv1Connection( - requestParameters: DeleteSqlv1ConnectionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteSqlv1ConnectionRaw(requestParameters, initOverrides); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. - * Read a Connection - */ - async getSqlv1ConnectionRaw( - requestParameters: GetSqlv1ConnectionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling getSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. + * Read a Connection + */ + async getSqlv1ConnectionRaw(requestParameters: GetSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Connection().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Connection().' + ); + } + + if (requestParameters['connection_name'] == null) { + throw new runtime.RequiredError( + 'connection_name', + 'Required parameter "connection_name" was null or undefined when calling getSqlv1Connection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"connection_name"}}`, encodeURIComponent(String(requestParameters['connection_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1Connection200ResponseFromJSON(jsonValue)); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling getSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. + * Read a Connection + */ + async getSqlv1Connection(requestParameters: GetSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1ConnectionRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["connection_name"] == null) { - throw new runtime.RequiredError( - "connection_name", - 'Required parameter "connection_name" was null or undefined when calling getSqlv1Connection().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. + * List of Connections + */ + async listSqlv1ConnectionsRaw(requestParameters: ListSqlv1ConnectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Connections().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Connections().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['spec_connection_type'] != null) { + queryParameters['spec.connection_type'] = requestParameters['spec_connection_type']; + } + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1ConnectionListFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"connection_name"}}`, - encodeURIComponent(String(requestParameters["connection_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetSqlv1Connection200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. - * Read a Connection - */ - async getSqlv1Connection( - requestParameters: GetSqlv1ConnectionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSqlv1ConnectionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. - * List of Connections - */ - async listSqlv1ConnectionsRaw( - requestParameters: ListSqlv1ConnectionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling listSqlv1Connections().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. + * List of Connections + */ + async listSqlv1Connections(requestParameters: ListSqlv1ConnectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listSqlv1ConnectionsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling listSqlv1Connections().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. + * Update a Connection + */ + async updateSqlv1ConnectionRaw(requestParameters: UpdateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Connection().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Connection().' + ); + } + + if (requestParameters['connection_name'] == null) { + throw new runtime.RequiredError( + 'connection_name', + 'Required parameter "connection_name" was null or undefined when calling updateSqlv1Connection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"connection_name"}}`, encodeURIComponent(String(requestParameters['connection_name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1ConnectionRequestToJSON(requestParameters['UpdateSqlv1ConnectionRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - if (requestParameters["spec_connection_type"] != null) { - queryParameters["spec.connection_type"] = requestParameters["spec_connection_type"]; + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. + * Update a Connection + */ + async updateSqlv1Connection(requestParameters: UpdateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateSqlv1ConnectionRaw(requestParameters, initOverrides); } - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; - } - - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SqlV1ConnectionListFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. - * List of Connections - */ - async listSqlv1Connections( - requestParameters: ListSqlv1ConnectionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listSqlv1ConnectionsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. - * Update a Connection - */ - async updateSqlv1ConnectionRaw( - requestParameters: UpdateSqlv1ConnectionOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Connection().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Connection().', - ); - } - - if (requestParameters["connection_name"] == null) { - throw new runtime.RequiredError( - "connection_name", - 'Required parameter "connection_name" was null or undefined when calling updateSqlv1Connection().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"connection_name"}}`, - encodeURIComponent(String(requestParameters["connection_name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: UpdateSqlv1ConnectionRequestToJSON(requestParameters["UpdateSqlv1ConnectionRequest"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. - * Update a Connection - */ - async updateSqlv1Connection( - requestParameters: UpdateSqlv1ConnectionOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateSqlv1ConnectionRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts b/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts new file mode 100644 index 0000000000..c47ca8a8ab --- /dev/null +++ b/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts @@ -0,0 +1,196 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + Failure, + SqlV1MaterializedTableVersion, + SqlV1MaterializedTableVersionList, +} from '../models/index'; +import { + FailureFromJSON, + FailureToJSON, + SqlV1MaterializedTableVersionFromJSON, + SqlV1MaterializedTableVersionToJSON, + SqlV1MaterializedTableVersionListFromJSON, + SqlV1MaterializedTableVersionListToJSON, +} from '../models/index'; + +export interface GetSqlv1MaterializedTableVersionRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + version: number; +} + +export interface ListSqlv1MaterializedTableVersionsRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + page_size?: number; + page_token?: string; +} + +/** + * + */ +export class MaterializedTableVersionsSqlV1Api extends runtime.BaseAPI { + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. + * Read a materialized table version + */ + async getSqlv1MaterializedTableVersionRaw(requestParameters: GetSqlv1MaterializedTableVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTableVersion().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTableVersion().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTableVersion().' + ); + } + + if (requestParameters['table_name'] == null) { + throw new runtime.RequiredError( + 'table_name', + 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTableVersion().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling getSqlv1MaterializedTableVersion().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions/{version}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableVersionFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. + * Read a materialized table version + */ + async getSqlv1MaterializedTableVersion(requestParameters: GetSqlv1MaterializedTableVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1MaterializedTableVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + * List all the versions of a materialized table + */ + async listSqlv1MaterializedTableVersionsRaw(requestParameters: ListSqlv1MaterializedTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTableVersions().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTableVersions().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling listSqlv1MaterializedTableVersions().' + ); + } + + if (requestParameters['table_name'] == null) { + throw new runtime.RequiredError( + 'table_name', + 'Required parameter "table_name" was null or undefined when calling listSqlv1MaterializedTableVersions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableVersionListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + * List all the versions of a materialized table + */ + async listSqlv1MaterializedTableVersions(requestParameters: ListSqlv1MaterializedTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listSqlv1MaterializedTableVersionsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts b/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts new file mode 100644 index 0000000000..a86f5ebf12 --- /dev/null +++ b/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts @@ -0,0 +1,400 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CreateSqlv1MaterializedTable201Response, + CreateSqlv1MaterializedTableRequest, + Failure, + SqlV1MaterializedTable, + SqlV1MaterializedTableList, + UpdateSqlv1MaterializedTableRequest, +} from '../models/index'; +import { + CreateSqlv1MaterializedTable201ResponseFromJSON, + CreateSqlv1MaterializedTable201ResponseToJSON, + CreateSqlv1MaterializedTableRequestFromJSON, + CreateSqlv1MaterializedTableRequestToJSON, + FailureFromJSON, + FailureToJSON, + SqlV1MaterializedTableFromJSON, + SqlV1MaterializedTableToJSON, + SqlV1MaterializedTableListFromJSON, + SqlV1MaterializedTableListToJSON, + UpdateSqlv1MaterializedTableRequestFromJSON, + UpdateSqlv1MaterializedTableRequestToJSON, +} from '../models/index'; + +export interface CreateSqlv1MaterializedTableOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + CreateSqlv1MaterializedTableRequest?: CreateSqlv1MaterializedTableRequest; +} + +export interface DeleteSqlv1MaterializedTableRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; +} + +export interface GetSqlv1MaterializedTableRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; +} + +export interface ListSqlv1MaterializedTablesRequest { + organization_id: string; + environment_id: string; + page_size?: number; + page_token?: string; +} + +export interface UpdateSqlv1MaterializedTableOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + UpdateSqlv1MaterializedTableRequest: UpdateSqlv1MaterializedTableRequest; +} + +/** + * + */ +export class MaterializedTablesSqlV1Api extends runtime.BaseAPI { + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. + * Create a materialized table + */ + async createSqlv1MaterializedTableRaw(requestParameters: CreateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling createSqlv1MaterializedTable().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling createSqlv1MaterializedTable().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1MaterializedTable().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1MaterializedTableRequestToJSON(requestParameters['CreateSqlv1MaterializedTableRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1MaterializedTable201ResponseFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. + * Create a materialized table + */ + async createSqlv1MaterializedTable(requestParameters: CreateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. + * Delete a materialized table + */ + async deleteSqlv1MaterializedTableRaw(requestParameters: DeleteSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1MaterializedTable().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1MaterializedTable().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1MaterializedTable().' + ); + } + + if (requestParameters['table_name'] == null) { + throw new runtime.RequiredError( + 'table_name', + 'Required parameter "table_name" was null or undefined when calling deleteSqlv1MaterializedTable().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. + * Delete a materialized table + */ + async deleteSqlv1MaterializedTable(requestParameters: DeleteSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSqlv1MaterializedTableRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. + * Read a materialized table + */ + async getSqlv1MaterializedTableRaw(requestParameters: GetSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTable().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTable().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTable().' + ); + } + + if (requestParameters['table_name'] == null) { + throw new runtime.RequiredError( + 'table_name', + 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTable().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. + * Read a materialized table + */ + async getSqlv1MaterializedTable(requestParameters: GetSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. + * List all materialized tables + */ + async listSqlv1MaterializedTablesRaw(requestParameters: ListSqlv1MaterializedTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTables().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTables().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/materialized-tables`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. + * List all materialized tables + */ + async listSqlv1MaterializedTables(requestParameters: ListSqlv1MaterializedTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listSqlv1MaterializedTablesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + * Update/Evolve a materialized table + */ + async updateSqlv1MaterializedTableRaw(requestParameters: UpdateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1MaterializedTable().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1MaterializedTable().' + ); + } + + if (requestParameters['kafka_cluster_id'] == null) { + throw new runtime.RequiredError( + 'kafka_cluster_id', + 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1MaterializedTable().' + ); + } + + if (requestParameters['table_name'] == null) { + throw new runtime.RequiredError( + 'table_name', + 'Required parameter "table_name" was null or undefined when calling updateSqlv1MaterializedTable().' + ); + } + + if (requestParameters['UpdateSqlv1MaterializedTableRequest'] == null) { + throw new runtime.RequiredError( + 'UpdateSqlv1MaterializedTableRequest', + 'Required parameter "UpdateSqlv1MaterializedTableRequest" was null or undefined when calling updateSqlv1MaterializedTable().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1MaterializedTableRequestToJSON(requestParameters['UpdateSqlv1MaterializedTableRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + * Update/Evolve a materialized table + */ + async updateSqlv1MaterializedTable(requestParameters: UpdateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts index f3671420c4..4281aed52c 100644 --- a/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts @@ -5,108 +5,92 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { Failure, SqlV1StatementExceptionList } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + Failure, + SqlV1StatementExceptionList, +} from '../models/index'; import { - FailureFromJSON, - FailureToJSON, - SqlV1StatementExceptionListFromJSON, - SqlV1StatementExceptionListToJSON, -} from "../models/index"; + FailureFromJSON, + FailureToJSON, + SqlV1StatementExceptionListFromJSON, + SqlV1StatementExceptionListToJSON, +} from '../models/index'; export interface GetSqlv1StatementExceptionsRequest { - organization_id: string; - environment_id: string; - statement_name: string; + organization_id: string; + environment_id: string; + statement_name: string; } /** - * + * */ export class StatementExceptionsSqlV1Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. - * List of Statement Exceptions - */ - async getSqlv1StatementExceptionsRaw( - requestParameters: GetSqlv1StatementExceptionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementExceptions().', - ); - } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementExceptions().', - ); - } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. + * List of Statement Exceptions + */ + async getSqlv1StatementExceptionsRaw(requestParameters: GetSqlv1StatementExceptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementExceptions().' + ); + } - if (requestParameters["statement_name"] == null) { - throw new runtime.RequiredError( - "statement_name", - 'Required parameter "statement_name" was null or undefined when calling getSqlv1StatementExceptions().', - ); - } + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementExceptions().' + ); + } + + if (requestParameters['statement_name'] == null) { + throw new runtime.RequiredError( + 'statement_name', + 'Required parameter "statement_name" was null or undefined when calling getSqlv1StatementExceptions().' + ); + } + + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}/exceptions`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1StatementExceptionListFromJSON(jsonValue)); } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}/exceptions` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"statement_name"}}`, - encodeURIComponent(String(requestParameters["statement_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - return new runtime.JSONApiResponse(response, (jsonValue) => - SqlV1StatementExceptionListFromJSON(jsonValue), - ); - } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. + * List of Statement Exceptions + */ + async getSqlv1StatementExceptions(requestParameters: GetSqlv1StatementExceptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1StatementExceptionsRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. - * List of Statement Exceptions - */ - async getSqlv1StatementExceptions( - requestParameters: GetSqlv1StatementExceptionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSqlv1StatementExceptionsRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts index 1b6d4aedc5..82c7988a6d 100644 --- a/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts @@ -5,110 +5,97 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { Failure, GetSqlv1StatementResult200Response } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + Failure, + GetSqlv1StatementResult200Response, +} from '../models/index'; import { - FailureFromJSON, - FailureToJSON, - GetSqlv1StatementResult200ResponseFromJSON, - GetSqlv1StatementResult200ResponseToJSON, -} from "../models/index"; + FailureFromJSON, + FailureToJSON, + GetSqlv1StatementResult200ResponseFromJSON, + GetSqlv1StatementResult200ResponseToJSON, +} from '../models/index'; export interface GetSqlv1StatementResultRequest { - organization_id: string; - environment_id: string; - name: string; - page_token?: string; + organization_id: string; + environment_id: string; + name: string; + page_token?: string; } /** - * + * */ export class StatementResultsSqlV1Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. - * Read Statement Result - */ - async getSqlv1StatementResultRaw( - requestParameters: GetSqlv1StatementResultRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementResult().', - ); - } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementResult().', - ); - } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. + * Read Statement Result + */ + async getSqlv1StatementResultRaw(requestParameters: GetSqlv1StatementResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementResult().' + ); + } - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getSqlv1StatementResult().', - ); - } + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementResult().' + ); + } - const queryParameters: any = {}; + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getSqlv1StatementResult().' + ); + } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; - } + const queryParameters: any = {}; + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{name}/results`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1StatementResult200ResponseFromJSON(jsonValue)); } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{name}/results` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - return new runtime.JSONApiResponse(response, (jsonValue) => - GetSqlv1StatementResult200ResponseFromJSON(jsonValue), - ); - } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. + * Read Statement Result + */ + async getSqlv1StatementResult(requestParameters: GetSqlv1StatementResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1StatementResultRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. - * Read Statement Result - */ - async getSqlv1StatementResult( - requestParameters: GetSqlv1StatementResultRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSqlv1StatementResultRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/flinkSql/apis/StatementsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementsSqlV1Api.ts index 8729414a7f..2a8b83a7df 100644 --- a/src/clients/flinkSql/apis/StatementsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementsSqlV1Api.ts @@ -5,14 +5,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CreateSqlv1Statement201Response, CreateSqlv1StatementRequest, @@ -21,537 +22,419 @@ import type { PatchRequestInner, SqlV1StatementList, UpdateSqlv1StatementRequest, -} from "../models/index"; +} from '../models/index'; import { - CreateSqlv1Statement201ResponseFromJSON, - CreateSqlv1Statement201ResponseToJSON, - CreateSqlv1StatementRequestFromJSON, - CreateSqlv1StatementRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetSqlv1Statement200ResponseFromJSON, - GetSqlv1Statement200ResponseToJSON, - PatchRequestInnerFromJSON, - PatchRequestInnerToJSON, - SqlV1StatementListFromJSON, - SqlV1StatementListToJSON, - UpdateSqlv1StatementRequestFromJSON, - UpdateSqlv1StatementRequestToJSON, -} from "../models/index"; + CreateSqlv1Statement201ResponseFromJSON, + CreateSqlv1Statement201ResponseToJSON, + CreateSqlv1StatementRequestFromJSON, + CreateSqlv1StatementRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Statement200ResponseFromJSON, + GetSqlv1Statement200ResponseToJSON, + PatchRequestInnerFromJSON, + PatchRequestInnerToJSON, + SqlV1StatementListFromJSON, + SqlV1StatementListToJSON, + UpdateSqlv1StatementRequestFromJSON, + UpdateSqlv1StatementRequestToJSON, +} from '../models/index'; export interface CreateSqlv1StatementOperationRequest { - organization_id: string; - environment_id: string; - CreateSqlv1StatementRequest?: CreateSqlv1StatementRequest; + organization_id: string; + environment_id: string; + CreateSqlv1StatementRequest?: CreateSqlv1StatementRequest; } export interface DeleteSqlv1StatementRequest { - organization_id: string; - environment_id: string; - statement_name: string; + organization_id: string; + environment_id: string; + statement_name: string; } export interface GetSqlv1StatementRequest { - organization_id: string; - environment_id: string; - statement_name: string; + organization_id: string; + environment_id: string; + statement_name: string; } export interface ListSqlv1StatementsRequest { - organization_id: string; - environment_id: string; - spec_compute_pool_id?: string; - page_size?: number; - page_token?: string; - label_selector?: string; + organization_id: string; + environment_id: string; + spec_compute_pool_id?: string; + page_size?: number; + page_token?: string; + label_selector?: string; } export interface PatchSqlv1StatementRequest { - organization_id: string; - environment_id: string; - statement_name: string; - PatchRequestInner?: Array; + organization_id: string; + environment_id: string; + statement_name: string; + PatchRequestInner?: Array; } export interface UpdateSqlv1StatementOperationRequest { - organization_id: string; - environment_id: string; - statement_name: string; - UpdateSqlv1StatementRequest?: UpdateSqlv1StatementRequest; + organization_id: string; + environment_id: string; + statement_name: string; + UpdateSqlv1StatementRequest?: UpdateSqlv1StatementRequest; } /** - * + * */ export class StatementsSqlV1Api extends runtime.BaseAPI { - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. - * Create a Statement - */ - async createSqlv1StatementRaw( - requestParameters: CreateSqlv1StatementOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling createSqlv1Statement().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling createSqlv1Statement().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1StatementRequestToJSON(requestParameters["CreateSqlv1StatementRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateSqlv1Statement201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. - * Create a Statement - */ - async createSqlv1Statement( - requestParameters: CreateSqlv1StatementOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createSqlv1StatementRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Statement - */ - async deleteSqlv1StatementRaw( - requestParameters: DeleteSqlv1StatementRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Statement().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. + * Create a Statement + */ + async createSqlv1StatementRaw(requestParameters: CreateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Statement().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Statement().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1StatementRequestToJSON(requestParameters['CreateSqlv1StatementRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1Statement201ResponseFromJSON(jsonValue)); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Statement().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. + * Create a Statement + */ + async createSqlv1Statement(requestParameters: CreateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSqlv1StatementRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["statement_name"] == null) { - throw new runtime.RequiredError( - "statement_name", - 'Required parameter "statement_name" was null or undefined when calling deleteSqlv1Statement().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Statement + */ + async deleteSqlv1StatementRaw(requestParameters: DeleteSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Statement().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Statement().' + ); + } + + if (requestParameters['statement_name'] == null) { + throw new runtime.RequiredError( + 'statement_name', + 'Required parameter "statement_name" was null or undefined when calling deleteSqlv1Statement().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"statement_name"}}`, - encodeURIComponent(String(requestParameters["statement_name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Statement - */ - async deleteSqlv1Statement( - requestParameters: DeleteSqlv1StatementRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteSqlv1StatementRaw(requestParameters, initOverrides); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. - * Read a Statement - */ - async getSqlv1StatementRaw( - requestParameters: GetSqlv1StatementRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling getSqlv1Statement().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Statement + */ + async deleteSqlv1Statement(requestParameters: DeleteSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSqlv1StatementRaw(requestParameters, initOverrides); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling getSqlv1Statement().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. + * Read a Statement + */ + async getSqlv1StatementRaw(requestParameters: GetSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Statement().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Statement().' + ); + } + + if (requestParameters['statement_name'] == null) { + throw new runtime.RequiredError( + 'statement_name', + 'Required parameter "statement_name" was null or undefined when calling getSqlv1Statement().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1Statement200ResponseFromJSON(jsonValue)); } - if (requestParameters["statement_name"] == null) { - throw new runtime.RequiredError( - "statement_name", - 'Required parameter "statement_name" was null or undefined when calling getSqlv1Statement().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. + * Read a Statement + */ + async getSqlv1Statement(requestParameters: GetSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1StatementRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"statement_name"}}`, - encodeURIComponent(String(requestParameters["statement_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetSqlv1Statement200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. - * Read a Statement - */ - async getSqlv1Statement( - requestParameters: GetSqlv1StatementRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSqlv1StatementRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. - * List of Statements - */ - async listSqlv1StatementsRaw( - requestParameters: ListSqlv1StatementsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling listSqlv1Statements().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. + * List of Statements + */ + async listSqlv1StatementsRaw(requestParameters: ListSqlv1StatementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Statements().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Statements().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['spec_compute_pool_id'] != null) { + queryParameters['spec.compute_pool_id'] = requestParameters['spec_compute_pool_id']; + } + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + if (requestParameters['label_selector'] != null) { + queryParameters['label_selector'] = requestParameters['label_selector']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1StatementListFromJSON(jsonValue)); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling listSqlv1Statements().', - ); + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. + * List of Statements + */ + async listSqlv1Statements(requestParameters: ListSqlv1StatementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listSqlv1StatementsRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["spec_compute_pool_id"] != null) { - queryParameters["spec.compute_pool_id"] = requestParameters["spec_compute_pool_id"]; + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. + * Patch a Statement + */ + async patchSqlv1StatementRaw(requestParameters: PatchSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling patchSqlv1Statement().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling patchSqlv1Statement().' + ); + } + + if (requestParameters['statement_name'] == null) { + throw new runtime.RequiredError( + 'statement_name', + 'Required parameter "statement_name" was null or undefined when calling patchSqlv1Statement().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json-patch+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: requestParameters['PatchRequestInner']!.map(PatchRequestInnerToJSON), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1Statement201ResponseFromJSON(jsonValue)); } - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. + * Patch a Statement + */ + async patchSqlv1Statement(requestParameters: PatchSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.patchSqlv1StatementRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Statement + */ + async updateSqlv1StatementRaw(requestParameters: UpdateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Statement().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Statement().' + ); + } + + if (requestParameters['statement_name'] == null) { + throw new runtime.RequiredError( + 'statement_name', + 'Required parameter "statement_name" was null or undefined when calling updateSqlv1Statement().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1StatementRequestToJSON(requestParameters['UpdateSqlv1StatementRequest']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["label_selector"] != null) { - queryParameters["label_selector"] = requestParameters["label_selector"]; + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Statement + */ + async updateSqlv1Statement(requestParameters: UpdateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateSqlv1StatementRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SqlV1StatementListFromJSON(jsonValue), - ); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. - * List of Statements - */ - async listSqlv1Statements( - requestParameters: ListSqlv1StatementsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listSqlv1StatementsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. - * Patch a Statement - */ - async patchSqlv1StatementRaw( - requestParameters: PatchSqlv1StatementRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling patchSqlv1Statement().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling patchSqlv1Statement().', - ); - } - - if (requestParameters["statement_name"] == null) { - throw new runtime.RequiredError( - "statement_name", - 'Required parameter "statement_name" was null or undefined when calling patchSqlv1Statement().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json-patch+json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"statement_name"}}`, - encodeURIComponent(String(requestParameters["statement_name"])), - ), - method: "PATCH", - headers: headerParameters, - query: queryParameters, - body: requestParameters["PatchRequestInner"]!.map(PatchRequestInnerToJSON), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateSqlv1Statement201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. - * Patch a Statement - */ - async patchSqlv1Statement( - requestParameters: PatchSqlv1StatementRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.patchSqlv1StatementRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Statement - */ - async updateSqlv1StatementRaw( - requestParameters: UpdateSqlv1StatementOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Statement().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Statement().', - ); - } - - if (requestParameters["statement_name"] == null) { - throw new runtime.RequiredError( - "statement_name", - 'Required parameter "statement_name" was null or undefined when calling updateSqlv1Statement().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace( - `{${"statement_name"}}`, - encodeURIComponent(String(requestParameters["statement_name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: UpdateSqlv1StatementRequestToJSON(requestParameters["UpdateSqlv1StatementRequest"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Statement - */ - async updateSqlv1Statement( - requestParameters: UpdateSqlv1StatementOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateSqlv1StatementRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/flinkSql/apis/ToolsSqlV1Api.ts b/src/clients/flinkSql/apis/ToolsSqlV1Api.ts new file mode 100644 index 0000000000..58e340e55c --- /dev/null +++ b/src/clients/flinkSql/apis/ToolsSqlV1Api.ts @@ -0,0 +1,292 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + CreateSqlv1ToolRequest, + Failure, + GetSqlv1Tool200Response, + SqlV1ToolList, +} from '../models/index'; +import { + CreateSqlv1ToolRequestFromJSON, + CreateSqlv1ToolRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Tool200ResponseFromJSON, + GetSqlv1Tool200ResponseToJSON, + SqlV1ToolListFromJSON, + SqlV1ToolListToJSON, +} from '../models/index'; + +export interface CreateSqlv1ToolOperationRequest { + organization_id: string; + environment_id: string; + CreateSqlv1ToolRequest?: CreateSqlv1ToolRequest; +} + +export interface DeleteSqlv1ToolRequest { + organization_id: string; + environment_id: string; + database_name: string; + tool_name: string; +} + +export interface GetSqlv1ToolRequest { + organization_id: string; + environment_id: string; + database_name: string; + tool_name: string; +} + +export interface ListSqlv1ToolsRequest { + organization_id: string; + environment_id: string; + database_name: string; + page_size?: number; + page_token?: string; +} + +/** + * + */ +export class ToolsSqlV1Api extends runtime.BaseAPI { + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. + * Create a Tool + */ + async createSqlv1ToolRaw(requestParameters: CreateSqlv1ToolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Tool().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Tool().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/tools`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1ToolRequestToJSON(requestParameters['CreateSqlv1ToolRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1ToolRequestFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. + * Create a Tool + */ + async createSqlv1Tool(requestParameters: CreateSqlv1ToolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createSqlv1ToolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. + * Delete a Tool + */ + async deleteSqlv1ToolRaw(requestParameters: DeleteSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Tool().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Tool().' + ); + } + + if (requestParameters['database_name'] == null) { + throw new runtime.RequiredError( + 'database_name', + 'Required parameter "database_name" was null or undefined when calling deleteSqlv1Tool().' + ); + } + + if (requestParameters['tool_name'] == null) { + throw new runtime.RequiredError( + 'tool_name', + 'Required parameter "tool_name" was null or undefined when calling deleteSqlv1Tool().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"database_name"}}`, encodeURIComponent(String(requestParameters['database_name']))).replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters['tool_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. + * Delete a Tool + */ + async deleteSqlv1Tool(requestParameters: DeleteSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteSqlv1ToolRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. + * Read a Tool + */ + async getSqlv1ToolRaw(requestParameters: GetSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Tool().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Tool().' + ); + } + + if (requestParameters['database_name'] == null) { + throw new runtime.RequiredError( + 'database_name', + 'Required parameter "database_name" was null or undefined when calling getSqlv1Tool().' + ); + } + + if (requestParameters['tool_name'] == null) { + throw new runtime.RequiredError( + 'tool_name', + 'Required parameter "tool_name" was null or undefined when calling getSqlv1Tool().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"database_name"}}`, encodeURIComponent(String(requestParameters['database_name']))).replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters['tool_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1Tool200ResponseFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. + * Read a Tool + */ + async getSqlv1Tool(requestParameters: GetSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSqlv1ToolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. + * List of Tools + */ + async listSqlv1ToolsRaw(requestParameters: ListSqlv1ToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Tools().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Tools().' + ); + } + + if (requestParameters['database_name'] == null) { + throw new runtime.RequiredError( + 'database_name', + 'Required parameter "database_name" was null or undefined when calling listSqlv1Tools().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"database_name"}}`, encodeURIComponent(String(requestParameters['database_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1ToolListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. + * List of Tools + */ + async listSqlv1Tools(requestParameters: ListSqlv1ToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listSqlv1ToolsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/src/clients/flinkSql/apis/index.ts b/src/clients/flinkSql/apis/index.ts index 4147fcacc2..2041888bc8 100644 --- a/src/clients/flinkSql/apis/index.ts +++ b/src/clients/flinkSql/apis/index.ts @@ -1,6 +1,10 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ConnectionsSqlV1Api"; -export * from "./StatementExceptionsSqlV1Api"; -export * from "./StatementResultsSqlV1Api"; -export * from "./StatementsSqlV1Api"; +export * from './AgentsSqlV1Api'; +export * from './ConnectionsSqlV1Api'; +export * from './MaterializedTableVersionsSqlV1Api'; +export * from './MaterializedTablesSqlV1Api'; +export * from './StatementExceptionsSqlV1Api'; +export * from './StatementResultsSqlV1Api'; +export * from './StatementsSqlV1Api'; +export * from './ToolsSqlV1Api'; diff --git a/src/clients/flinkSql/index.ts b/src/clients/flinkSql/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/flinkSql/index.ts +++ b/src/clients/flinkSql/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/flinkSql/models/ColumnDetails.ts b/src/clients/flinkSql/models/ColumnDetails.ts index a511c7afc2..3a95e434a5 100644 --- a/src/clients/flinkSql/models/ColumnDetails.ts +++ b/src/clients/flinkSql/models/ColumnDetails.ts @@ -5,21 +5,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { DataType } from "./DataType"; +import { mapValues } from '../runtime'; +import type { DataType } from './DataType'; import { - DataTypeFromJSON, - DataTypeFromJSONTyped, - DataTypeToJSON, - DataTypeToJSONTyped, -} from "./DataType"; + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from './DataType'; /** * A column in the results schema. @@ -27,57 +27,57 @@ import { * @interface ColumnDetails */ export interface ColumnDetails { - /** - * The name of the SQL table column. - * @type {string} - * @memberof ColumnDetails - */ - name: string; - /** - * JSON object in TableSchema format; describes the data returned by the results serving API. - * @type {DataType} - * @memberof ColumnDetails - */ - type: DataType; + /** + * The name of the SQL table column. + * @type {string} + * @memberof ColumnDetails + */ + name: string; + /** + * JSON object in TableSchema format; describes the data returned by the results serving API. + * @type {DataType} + * @memberof ColumnDetails + */ + type: DataType; } /** * Check if a given object implements the ColumnDetails interface. */ export function instanceOfColumnDetails(value: object): value is ColumnDetails { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("type" in value) || value["type"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; } export function ColumnDetailsFromJSON(json: any): ColumnDetails { - return ColumnDetailsFromJSONTyped(json, false); + return ColumnDetailsFromJSONTyped(json, false); } export function ColumnDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ColumnDetails { - if (json == null) { - return json; - } - return { - name: json["name"], - type: DataTypeFromJSON(json["type"]), - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': DataTypeFromJSON(json['type']), + }; } export function ColumnDetailsToJSON(json: any): ColumnDetails { - return ColumnDetailsToJSONTyped(json, false); + return ColumnDetailsToJSONTyped(json, false); } -export function ColumnDetailsToJSONTyped( - value?: ColumnDetails | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ColumnDetailsToJSONTyped(value?: ColumnDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - type: DataTypeToJSON(value["type"]), - }; + return { + + 'name': value['name'], + 'type': DataTypeToJSON(value['type']), + }; } + diff --git a/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts b/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts new file mode 100644 index 0000000000..5b144d46bc --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1AgentMetadata } from './SqlV1AgentMetadata'; +import { + SqlV1AgentMetadataFromJSON, + SqlV1AgentMetadataFromJSONTyped, + SqlV1AgentMetadataToJSON, + SqlV1AgentMetadataToJSONTyped, +} from './SqlV1AgentMetadata'; +import type { SqlV1AgentStatus } from './SqlV1AgentStatus'; +import { + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from './SqlV1AgentStatus'; + +/** + * + * @export + * @interface CreateSqlv1AgentRequest + */ +export interface CreateSqlv1AgentRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly api_version: CreateSqlv1AgentRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly kind: CreateSqlv1AgentRequestKindEnum; + /** + * + * @type {SqlV1AgentMetadata} + * @memberof CreateSqlv1AgentRequest + */ + metadata: SqlV1AgentMetadata; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1AgentRequest + */ + spec: object; + /** + * + * @type {SqlV1AgentStatus} + * @memberof CreateSqlv1AgentRequest + */ + readonly status?: SqlV1AgentStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1AgentRequestApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1AgentRequestKindEnum { + Agent = 'Agent' +} + + +/** + * Check if a given object implements the CreateSqlv1AgentRequest interface. + */ +export function instanceOfCreateSqlv1AgentRequest(value: object): value is CreateSqlv1AgentRequest { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function CreateSqlv1AgentRequestFromJSON(json: any): CreateSqlv1AgentRequest { + return CreateSqlv1AgentRequestFromJSONTyped(json, false); +} + +export function CreateSqlv1AgentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1AgentRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1AgentMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1AgentStatusFromJSON(json['status']), + }; +} + +export function CreateSqlv1AgentRequestToJSON(json: any): CreateSqlv1AgentRequest { + return CreateSqlv1AgentRequestToJSONTyped(json, false); +} + +export function CreateSqlv1AgentRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1AgentMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + }; +} + diff --git a/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts b/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts index de7f6127b0..cc27a1d74d 100644 --- a/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts @@ -5,140 +5,131 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from "./SqlV1ConnectionStatus"; -import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from './SqlV1ConnectionStatus'; +import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from './SqlV1ConnectionMetadata'; /** - * + * * @export * @interface CreateSqlv1Connection201Response */ export interface CreateSqlv1Connection201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1Connection201Response - */ - readonly api_version?: CreateSqlv1Connection201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1Connection201Response - */ - readonly kind?: CreateSqlv1Connection201ResponseKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof CreateSqlv1Connection201Response - */ - metadata?: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1Connection201Response - */ - name?: string; - /** - * - * @type {object} - * @memberof CreateSqlv1Connection201Response - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof CreateSqlv1Connection201Response - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1Connection201Response + */ + readonly api_version?: CreateSqlv1Connection201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1Connection201Response + */ + readonly kind?: CreateSqlv1Connection201ResponseKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof CreateSqlv1Connection201Response + */ + metadata?: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1Connection201Response + */ + name?: string; + /** + * + * @type {object} + * @memberof CreateSqlv1Connection201Response + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof CreateSqlv1Connection201Response + */ + status?: SqlV1ConnectionStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1Connection201ResponseApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1Connection201ResponseKindEnum { - Connection = "Connection", + Connection = 'Connection' } + /** * Check if a given object implements the CreateSqlv1Connection201Response interface. */ -export function instanceOfCreateSqlv1Connection201Response( - value: object, -): value is CreateSqlv1Connection201Response { - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfCreateSqlv1Connection201Response(value: object): value is CreateSqlv1Connection201Response { + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } -export function CreateSqlv1Connection201ResponseFromJSON( - json: any, -): CreateSqlv1Connection201Response { - return CreateSqlv1Connection201ResponseFromJSONTyped(json, false); +export function CreateSqlv1Connection201ResponseFromJSON(json: any): CreateSqlv1Connection201Response { + return CreateSqlv1Connection201ResponseFromJSONTyped(json, false); } -export function CreateSqlv1Connection201ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateSqlv1Connection201Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json["metadata"]), - name: json["name"] == null ? undefined : json["name"], - spec: json["spec"], - status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), - }; +export function CreateSqlv1Connection201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1Connection201Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), + }; } -export function CreateSqlv1Connection201ResponseToJSON( - json: any, -): CreateSqlv1Connection201Response { - return CreateSqlv1Connection201ResponseToJSONTyped(json, false); +export function CreateSqlv1Connection201ResponseToJSON(json: any): CreateSqlv1Connection201Response { + return CreateSqlv1Connection201ResponseToJSONTyped(json, false); } -export function CreateSqlv1Connection201ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateSqlv1Connection201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), - name: value["name"], - spec: value["spec"], - status: SqlV1ConnectionStatusToJSON(value["status"]), - }; + return { + + 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts b/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts index fa34eaecae..12d61c48e4 100644 --- a/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts @@ -5,137 +5,132 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from "./SqlV1ConnectionStatus"; -import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from './SqlV1ConnectionStatus'; +import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from './SqlV1ConnectionMetadata'; /** - * + * * @export * @interface CreateSqlv1ConnectionRequest */ export interface CreateSqlv1ConnectionRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1ConnectionRequest - */ - readonly api_version?: CreateSqlv1ConnectionRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1ConnectionRequest - */ - readonly kind?: CreateSqlv1ConnectionRequestKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof CreateSqlv1ConnectionRequest - */ - metadata?: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1ConnectionRequest - */ - name: string; - /** - * - * @type {object} - * @memberof CreateSqlv1ConnectionRequest - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof CreateSqlv1ConnectionRequest - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1ConnectionRequest + */ + readonly api_version?: CreateSqlv1ConnectionRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1ConnectionRequest + */ + readonly kind?: CreateSqlv1ConnectionRequestKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof CreateSqlv1ConnectionRequest + */ + metadata?: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1ConnectionRequest + */ + name: string; + /** + * + * @type {object} + * @memberof CreateSqlv1ConnectionRequest + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof CreateSqlv1ConnectionRequest + */ + status?: SqlV1ConnectionStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1ConnectionRequestApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1ConnectionRequestKindEnum { - Connection = "Connection", + Connection = 'Connection' } + /** * Check if a given object implements the CreateSqlv1ConnectionRequest interface. */ -export function instanceOfCreateSqlv1ConnectionRequest( - value: object, -): value is CreateSqlv1ConnectionRequest { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfCreateSqlv1ConnectionRequest(value: object): value is CreateSqlv1ConnectionRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function CreateSqlv1ConnectionRequestFromJSON(json: any): CreateSqlv1ConnectionRequest { - return CreateSqlv1ConnectionRequestFromJSONTyped(json, false); + return CreateSqlv1ConnectionRequestFromJSONTyped(json, false); } -export function CreateSqlv1ConnectionRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateSqlv1ConnectionRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json["metadata"]), - name: json["name"], - spec: json["spec"], - status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), - }; +export function CreateSqlv1ConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1ConnectionRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), + }; } export function CreateSqlv1ConnectionRequestToJSON(json: any): CreateSqlv1ConnectionRequest { - return CreateSqlv1ConnectionRequestToJSONTyped(json, false); + return CreateSqlv1ConnectionRequestToJSONTyped(json, false); } -export function CreateSqlv1ConnectionRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateSqlv1ConnectionRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), - name: value["name"], - spec: value["spec"], - status: SqlV1ConnectionStatusToJSON(value["status"]), - }; + return { + + 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts b/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts new file mode 100644 index 0000000000..73a0396805 --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableMetadata } from './SqlV1MaterializedTableMetadata'; +import { + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from './SqlV1MaterializedTableMetadata'; +import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from './SqlV1MaterializedTableStatus'; + +/** + * + * @export + * @interface CreateSqlv1MaterializedTable201Response + */ +export interface CreateSqlv1MaterializedTable201Response { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly api_version: CreateSqlv1MaterializedTable201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly kind: CreateSqlv1MaterializedTable201ResponseKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof CreateSqlv1MaterializedTable201Response + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1MaterializedTable201Response + */ + spec: object; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly status: SqlV1MaterializedTableStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1MaterializedTable201ResponseApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1MaterializedTable201ResponseKindEnum { + MaterializedTable = 'MaterializedTable' +} + + +/** + * Check if a given object implements the CreateSqlv1MaterializedTable201Response interface. + */ +export function instanceOfCreateSqlv1MaterializedTable201Response(value: object): value is CreateSqlv1MaterializedTable201Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function CreateSqlv1MaterializedTable201ResponseFromJSON(json: any): CreateSqlv1MaterializedTable201Response { + return CreateSqlv1MaterializedTable201ResponseFromJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTable201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1MaterializedTable201Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1MaterializedTableMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': json['spec'], + 'status': SqlV1MaterializedTableStatusFromJSON(json['status']), + }; +} + +export function CreateSqlv1MaterializedTable201ResponseToJSON(json: any): CreateSqlv1MaterializedTable201Response { + return CreateSqlv1MaterializedTable201ResponseToJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTable201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1MaterializedTableMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + }; +} + diff --git a/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts b/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts new file mode 100644 index 0000000000..6f98348956 --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableMetadata } from './SqlV1MaterializedTableMetadata'; +import { + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from './SqlV1MaterializedTableMetadata'; +import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from './SqlV1MaterializedTableStatus'; + +/** + * + * @export + * @interface CreateSqlv1MaterializedTableRequest + */ +export interface CreateSqlv1MaterializedTableRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly api_version: CreateSqlv1MaterializedTableRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly kind: CreateSqlv1MaterializedTableRequestKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof CreateSqlv1MaterializedTableRequest + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1MaterializedTableRequest + */ + spec: object; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly status?: SqlV1MaterializedTableStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1MaterializedTableRequestApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1MaterializedTableRequestKindEnum { + MaterializedTable = 'MaterializedTable' +} + + +/** + * Check if a given object implements the CreateSqlv1MaterializedTableRequest interface. + */ +export function instanceOfCreateSqlv1MaterializedTableRequest(value: object): value is CreateSqlv1MaterializedTableRequest { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function CreateSqlv1MaterializedTableRequestFromJSON(json: any): CreateSqlv1MaterializedTableRequest { + return CreateSqlv1MaterializedTableRequestFromJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTableRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1MaterializedTableRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1MaterializedTableMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json['status']), + }; +} + +export function CreateSqlv1MaterializedTableRequestToJSON(json: any): CreateSqlv1MaterializedTableRequest { + return CreateSqlv1MaterializedTableRequestToJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTableRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1MaterializedTableMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + }; +} + diff --git a/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts b/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts index ba3de035a9..871348fdf1 100644 --- a/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts @@ -5,170 +5,163 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from "./SqlV1StatementMetadata"; -import type { SqlV1StatementResult } from "./SqlV1StatementResult"; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from './SqlV1StatementMetadata'; +import type { SqlV1StatementResult } from './SqlV1StatementResult'; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from "./SqlV1StatementResult"; -import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from './SqlV1StatementResult'; +import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from "./SqlV1StatementStatus"; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from './SqlV1StatementStatus'; /** - * + * * @export * @interface CreateSqlv1Statement201Response */ export interface CreateSqlv1Statement201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - readonly api_version?: CreateSqlv1Statement201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - readonly kind?: CreateSqlv1Statement201ResponseKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof CreateSqlv1Statement201Response - */ - metadata?: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - name?: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof CreateSqlv1Statement201Response - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof CreateSqlv1Statement201Response - */ - status: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof CreateSqlv1Statement201Response - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + readonly api_version?: CreateSqlv1Statement201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + readonly kind?: CreateSqlv1Statement201ResponseKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof CreateSqlv1Statement201Response + */ + metadata?: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + name?: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof CreateSqlv1Statement201Response + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof CreateSqlv1Statement201Response + */ + status: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof CreateSqlv1Statement201Response + */ + result?: SqlV1StatementResult; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1Statement201ResponseApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1Statement201ResponseKindEnum { - Statement = "Statement", + Statement = 'Statement' } + /** * Check if a given object implements the CreateSqlv1Statement201Response interface. */ -export function instanceOfCreateSqlv1Statement201Response( - value: object, -): value is CreateSqlv1Statement201Response { - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfCreateSqlv1Statement201Response(value: object): value is CreateSqlv1Statement201Response { + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } -export function CreateSqlv1Statement201ResponseFromJSON( - json: any, -): CreateSqlv1Statement201Response { - return CreateSqlv1Statement201ResponseFromJSONTyped(json, false); +export function CreateSqlv1Statement201ResponseFromJSON(json: any): CreateSqlv1Statement201Response { + return CreateSqlv1Statement201ResponseFromJSONTyped(json, false); } -export function CreateSqlv1Statement201ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateSqlv1Statement201Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : SqlV1StatementMetadataFromJSON(json["metadata"]), - name: json["name"] == null ? undefined : json["name"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - spec: json["spec"], - status: SqlV1StatementStatusFromJSON(json["status"]), - result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), - }; +export function CreateSqlv1Statement201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1Statement201Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1StatementMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'spec': json['spec'], + 'status': SqlV1StatementStatusFromJSON(json['status']), + 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), + }; } export function CreateSqlv1Statement201ResponseToJSON(json: any): CreateSqlv1Statement201Response { - return CreateSqlv1Statement201ResponseToJSONTyped(json, false); + return CreateSqlv1Statement201ResponseToJSONTyped(json, false); } -export function CreateSqlv1Statement201ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateSqlv1Statement201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1StatementMetadataToJSON(value["metadata"]), - name: value["name"], - organization_id: value["organization_id"], - environment_id: value["environment_id"], - spec: value["spec"], - status: SqlV1StatementStatusToJSON(value["status"]), - result: SqlV1StatementResultToJSON(value["result"]), - }; + return { + + 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), + 'name': value['name'], + 'organization_id': value['organization_id'], + 'environment_id': value['environment_id'], + 'spec': value['spec'], + 'status': SqlV1StatementStatusToJSON(value['status']), + 'result': SqlV1StatementResultToJSON(value['result']), + }; } + diff --git a/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts b/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts index 0a9e6bb5e8..2d55ca60fb 100644 --- a/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts @@ -5,168 +5,163 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from "./SqlV1StatementMetadata"; -import type { SqlV1StatementResult } from "./SqlV1StatementResult"; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from './SqlV1StatementMetadata'; +import type { SqlV1StatementResult } from './SqlV1StatementResult'; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from "./SqlV1StatementResult"; -import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from './SqlV1StatementResult'; +import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from "./SqlV1StatementStatus"; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from './SqlV1StatementStatus'; /** - * + * * @export * @interface CreateSqlv1StatementRequest */ export interface CreateSqlv1StatementRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - readonly api_version?: CreateSqlv1StatementRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - readonly kind?: CreateSqlv1StatementRequestKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof CreateSqlv1StatementRequest - */ - metadata?: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof CreateSqlv1StatementRequest - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof CreateSqlv1StatementRequest - */ - status?: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof CreateSqlv1StatementRequest - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + readonly api_version?: CreateSqlv1StatementRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + readonly kind?: CreateSqlv1StatementRequestKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof CreateSqlv1StatementRequest + */ + metadata?: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof CreateSqlv1StatementRequest + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof CreateSqlv1StatementRequest + */ + status?: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof CreateSqlv1StatementRequest + */ + result?: SqlV1StatementResult; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1StatementRequestApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateSqlv1StatementRequestKindEnum { - Statement = "Statement", + Statement = 'Statement' } + /** * Check if a given object implements the CreateSqlv1StatementRequest interface. */ -export function instanceOfCreateSqlv1StatementRequest( - value: object, -): value is CreateSqlv1StatementRequest { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfCreateSqlv1StatementRequest(value: object): value is CreateSqlv1StatementRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function CreateSqlv1StatementRequestFromJSON(json: any): CreateSqlv1StatementRequest { - return CreateSqlv1StatementRequestFromJSONTyped(json, false); + return CreateSqlv1StatementRequestFromJSONTyped(json, false); } -export function CreateSqlv1StatementRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateSqlv1StatementRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : SqlV1StatementMetadataFromJSON(json["metadata"]), - name: json["name"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - spec: json["spec"], - status: json["status"] == null ? undefined : SqlV1StatementStatusFromJSON(json["status"]), - result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), - }; +export function CreateSqlv1StatementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1StatementRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1StatementMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1StatementStatusFromJSON(json['status']), + 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), + }; } export function CreateSqlv1StatementRequestToJSON(json: any): CreateSqlv1StatementRequest { - return CreateSqlv1StatementRequestToJSONTyped(json, false); + return CreateSqlv1StatementRequestToJSONTyped(json, false); } -export function CreateSqlv1StatementRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateSqlv1StatementRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1StatementMetadataToJSON(value["metadata"]), - name: value["name"], - organization_id: value["organization_id"], - environment_id: value["environment_id"], - spec: value["spec"], - status: SqlV1StatementStatusToJSON(value["status"]), - result: SqlV1StatementResultToJSON(value["result"]), - }; + return { + + 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), + 'name': value['name'], + 'organization_id': value['organization_id'], + 'environment_id': value['environment_id'], + 'spec': value['spec'], + 'status': SqlV1StatementStatusToJSON(value['status']), + 'result': SqlV1StatementResultToJSON(value['result']), + }; } + diff --git a/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts b/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts new file mode 100644 index 0000000000..9b4a1a1b9a --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts @@ -0,0 +1,136 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from './SqlV1ToolStatus'; +import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from './SqlV1ToolMetadata'; + +/** + * + * @export + * @interface CreateSqlv1ToolRequest + */ +export interface CreateSqlv1ToolRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + readonly api_version?: CreateSqlv1ToolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + readonly kind?: CreateSqlv1ToolRequestKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof CreateSqlv1ToolRequest + */ + metadata?: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + name: string; + /** + * + * @type {object} + * @memberof CreateSqlv1ToolRequest + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof CreateSqlv1ToolRequest + */ + status?: SqlV1ToolStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1ToolRequestApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum CreateSqlv1ToolRequestKindEnum { + Tool = 'Tool' +} + + +/** + * Check if a given object implements the CreateSqlv1ToolRequest interface. + */ +export function instanceOfCreateSqlv1ToolRequest(value: object): value is CreateSqlv1ToolRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function CreateSqlv1ToolRequestFromJSON(json: any): CreateSqlv1ToolRequest { + return CreateSqlv1ToolRequestFromJSONTyped(json, false); +} + +export function CreateSqlv1ToolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1ToolRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1ToolMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1ToolStatusFromJSON(json['status']), + }; +} + +export function CreateSqlv1ToolRequestToJSON(json: any): CreateSqlv1ToolRequest { + return CreateSqlv1ToolRequestToJSONTyped(json, false); +} + +export function CreateSqlv1ToolRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ToolStatusToJSON(value['status']), + }; +} + diff --git a/src/clients/flinkSql/models/DataType.ts b/src/clients/flinkSql/models/DataType.ts index ad090ecfda..89b79a6892 100644 --- a/src/clients/flinkSql/models/DataType.ts +++ b/src/clients/flinkSql/models/DataType.ts @@ -5,154 +5,159 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { RowFieldType } from "./RowFieldType"; +import { mapValues } from '../runtime'; +import type { RowFieldType } from './RowFieldType'; import { - RowFieldTypeFromJSON, - RowFieldTypeFromJSONTyped, - RowFieldTypeToJSON, - RowFieldTypeToJSONTyped, -} from "./RowFieldType"; + RowFieldTypeFromJSON, + RowFieldTypeFromJSONTyped, + RowFieldTypeToJSON, + RowFieldTypeToJSONTyped, +} from './RowFieldType'; /** - * + * * @export * @interface DataType */ export interface DataType { - /** - * The data type of the column. - * @type {string} - * @memberof DataType - */ - type: string; - /** - * Indicates whether values in this column can be null. - * @type {boolean} - * @memberof DataType - */ - nullable: boolean; - /** - * The length of the data type. - * @type {number} - * @memberof DataType - */ - length?: number; - /** - * The precision of the data type. - * @type {number} - * @memberof DataType - */ - precision?: number; - /** - * The scale of the data type. - * @type {number} - * @memberof DataType - */ - scale?: number; - /** - * The type of the key in the data type (if applicable). - * @type {DataType} - * @memberof DataType - */ - key_type?: DataType; - /** - * The type of the value in the data type (if applicable). - * @type {DataType} - * @memberof DataType - */ - value_type?: DataType; - /** - * The type of the element in the data type (if applicable). - * @type {DataType} - * @memberof DataType - */ - element_type?: DataType; - /** - * The fields of the element in the data type (if applicable). - * @type {Array} - * @memberof DataType - */ - fields?: Array; - /** - * The resolution of the data type (if applicable). - * @type {string} - * @memberof DataType - */ - resolution?: string; - /** - * The fractional precision of the data type (if applicable). - * @type {number} - * @memberof DataType - */ - fractional_precision?: number; + /** + * The data type of the column. + * @type {string} + * @memberof DataType + */ + type: string; + /** + * Indicates whether values in this column can be null. + * @type {boolean} + * @memberof DataType + */ + nullable: boolean; + /** + * The length of the data type. + * @type {number} + * @memberof DataType + */ + length?: number; + /** + * The precision of the data type. + * @type {number} + * @memberof DataType + */ + precision?: number; + /** + * The scale of the data type. + * @type {number} + * @memberof DataType + */ + scale?: number; + /** + * The type of the key in the data type (if applicable). + * @type {DataType} + * @memberof DataType + */ + key_type?: DataType; + /** + * The type of the value in the data type (if applicable). + * @type {DataType} + * @memberof DataType + */ + value_type?: DataType; + /** + * The type of the element in the data type (if applicable). + * @type {DataType} + * @memberof DataType + */ + element_type?: DataType; + /** + * The fields of the element in the data type (if applicable). + * @type {Array} + * @memberof DataType + */ + fields?: Array; + /** + * The resolution of the data type (if applicable). + * @type {string} + * @memberof DataType + */ + resolution?: string; + /** + * The fractional precision of the data type (if applicable). + * @type {number} + * @memberof DataType + */ + fractional_precision?: number; + /** + * The class name of the structured data type (if applicable). + * @type {string} + * @memberof DataType + */ + class_name?: string; } /** * Check if a given object implements the DataType interface. */ export function instanceOfDataType(value: object): value is DataType { - if (!("type" in value) || value["type"] === undefined) return false; - if (!("nullable" in value) || value["nullable"] === undefined) return false; - return true; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('nullable' in value) || value['nullable'] === undefined) return false; + return true; } export function DataTypeFromJSON(json: any): DataType { - return DataTypeFromJSONTyped(json, false); + return DataTypeFromJSONTyped(json, false); } export function DataTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataType { - if (json == null) { - return json; - } - return { - type: json["type"], - nullable: json["nullable"], - length: json["length"] == null ? undefined : json["length"], - precision: json["precision"] == null ? undefined : json["precision"], - scale: json["scale"] == null ? undefined : json["scale"], - key_type: json["key_type"] == null ? undefined : DataTypeFromJSON(json["key_type"]), - value_type: json["value_type"] == null ? undefined : DataTypeFromJSON(json["value_type"]), - element_type: json["element_type"] == null ? undefined : DataTypeFromJSON(json["element_type"]), - fields: - json["fields"] == null ? undefined : (json["fields"] as Array).map(RowFieldTypeFromJSON), - resolution: json["resolution"] == null ? undefined : json["resolution"], - fractional_precision: - json["fractional_precision"] == null ? undefined : json["fractional_precision"], - }; + if (json == null) { + return json; + } + return { + + 'type': json['type'], + 'nullable': json['nullable'], + 'length': json['length'] == null ? undefined : json['length'], + 'precision': json['precision'] == null ? undefined : json['precision'], + 'scale': json['scale'] == null ? undefined : json['scale'], + 'key_type': json['key_type'] == null ? undefined : DataTypeFromJSON(json['key_type']), + 'value_type': json['value_type'] == null ? undefined : DataTypeFromJSON(json['value_type']), + 'element_type': json['element_type'] == null ? undefined : DataTypeFromJSON(json['element_type']), + 'fields': json['fields'] == null ? undefined : ((json['fields'] as Array).map(RowFieldTypeFromJSON)), + 'resolution': json['resolution'] == null ? undefined : json['resolution'], + 'fractional_precision': json['fractional_precision'] == null ? undefined : json['fractional_precision'], + 'class_name': json['class_name'] == null ? undefined : json['class_name'], + }; } export function DataTypeToJSON(json: any): DataType { - return DataTypeToJSONTyped(json, false); + return DataTypeToJSONTyped(json, false); } -export function DataTypeToJSONTyped( - value?: DataType | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DataTypeToJSONTyped(value?: DataType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - type: value["type"], - nullable: value["nullable"], - length: value["length"], - precision: value["precision"], - scale: value["scale"], - key_type: DataTypeToJSON(value["key_type"]), - value_type: DataTypeToJSON(value["value_type"]), - element_type: DataTypeToJSON(value["element_type"]), - fields: - value["fields"] == null ? undefined : (value["fields"] as Array).map(RowFieldTypeToJSON), - resolution: value["resolution"], - fractional_precision: value["fractional_precision"], - }; + return { + + 'type': value['type'], + 'nullable': value['nullable'], + 'length': value['length'], + 'precision': value['precision'], + 'scale': value['scale'], + 'key_type': DataTypeToJSON(value['key_type']), + 'value_type': DataTypeToJSON(value['value_type']), + 'element_type': DataTypeToJSON(value['element_type']), + 'fields': value['fields'] == null ? undefined : ((value['fields'] as Array).map(RowFieldTypeToJSON)), + 'resolution': value['resolution'], + 'fractional_precision': value['fractional_precision'], + 'class_name': value['class_name'], + }; } + diff --git a/src/clients/flinkSql/models/ErrorSource.ts b/src/clients/flinkSql/models/ErrorSource.ts index 6e8f1985d8..867abe8a62 100644 --- a/src/clients/flinkSql/models/ErrorSource.ts +++ b/src/clients/flinkSql/models/ErrorSource.ts @@ -5,69 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - pointer: json["pointer"] == null ? undefined : json["pointer"], - parameter: json["parameter"] == null ? undefined : json["parameter"], - }; + if (json == null) { + return json; + } + return { + + 'pointer': json['pointer'] == null ? undefined : json['pointer'], + 'parameter': json['parameter'] == null ? undefined : json['parameter'], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped( - value?: ErrorSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - pointer: value["pointer"], - parameter: value["parameter"], - }; + return { + + 'pointer': value['pointer'], + 'parameter': value['parameter'], + }; } + diff --git a/src/clients/flinkSql/models/ExceptionListMeta.ts b/src/clients/flinkSql/models/ExceptionListMeta.ts index a13f92946d..82e0b5a2ad 100644 --- a/src/clients/flinkSql/models/ExceptionListMeta.ts +++ b/src/clients/flinkSql/models/ExceptionListMeta.ts @@ -5,64 +5,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ExceptionListMeta */ export interface ExceptionListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ExceptionListMeta - */ - self?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ExceptionListMeta + */ + self?: string; } /** * Check if a given object implements the ExceptionListMeta interface. */ export function instanceOfExceptionListMeta(value: object): value is ExceptionListMeta { - return true; + return true; } export function ExceptionListMetaFromJSON(json: any): ExceptionListMeta { - return ExceptionListMetaFromJSONTyped(json, false); + return ExceptionListMetaFromJSONTyped(json, false); } -export function ExceptionListMetaFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExceptionListMeta { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - }; +export function ExceptionListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExceptionListMeta { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + }; } export function ExceptionListMetaToJSON(json: any): ExceptionListMeta { - return ExceptionListMetaToJSONTyped(json, false); + return ExceptionListMetaToJSONTyped(json, false); } -export function ExceptionListMetaToJSONTyped( - value?: ExceptionListMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExceptionListMetaToJSONTyped(value?: ExceptionListMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - }; + return { + + 'self': value['self'], + }; } + diff --git a/src/clients/flinkSql/models/Failure.ts b/src/clients/flinkSql/models/Failure.ts index 44d91ad68f..9cb5185891 100644 --- a/src/clients/flinkSql/models/Failure.ts +++ b/src/clients/flinkSql/models/Failure.ts @@ -5,62 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!("errors" in value) || value["errors"] === undefined) return false; - return true; + if (!('errors' in value) || value['errors'] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - errors: new Set(json["errors"]), - }; + if (json == null) { + return json; + } + return { + + 'errors': new Set(json['errors']), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped( - value?: Failure | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - errors: Array.from(value["errors"] as Set), - }; + return { + + 'errors': Array.from(value['errors'] as Set), + }; } + diff --git a/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts b/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts index f019952bb2..0066ed87ee 100644 --- a/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts @@ -5,138 +5,134 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from "./SqlV1ConnectionStatus"; -import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from './SqlV1ConnectionStatus'; +import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from './SqlV1ConnectionMetadata'; /** - * + * * @export * @interface GetSqlv1Connection200Response */ export interface GetSqlv1Connection200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1Connection200Response - */ - readonly api_version: GetSqlv1Connection200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1Connection200Response - */ - readonly kind: GetSqlv1Connection200ResponseKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof GetSqlv1Connection200Response - */ - metadata: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof GetSqlv1Connection200Response - */ - name?: string; - /** - * - * @type {object} - * @memberof GetSqlv1Connection200Response - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof GetSqlv1Connection200Response - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Connection200Response + */ + readonly api_version: GetSqlv1Connection200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Connection200Response + */ + readonly kind: GetSqlv1Connection200ResponseKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof GetSqlv1Connection200Response + */ + metadata: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof GetSqlv1Connection200Response + */ + name?: string; + /** + * + * @type {object} + * @memberof GetSqlv1Connection200Response + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof GetSqlv1Connection200Response + */ + status?: SqlV1ConnectionStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetSqlv1Connection200ResponseApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetSqlv1Connection200ResponseKindEnum { - Connection = "Connection", + Connection = 'Connection' } + /** * Check if a given object implements the GetSqlv1Connection200Response interface. */ -export function instanceOfGetSqlv1Connection200Response( - value: object, -): value is GetSqlv1Connection200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfGetSqlv1Connection200Response(value: object): value is GetSqlv1Connection200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function GetSqlv1Connection200ResponseFromJSON(json: any): GetSqlv1Connection200Response { - return GetSqlv1Connection200ResponseFromJSONTyped(json, false); + return GetSqlv1Connection200ResponseFromJSONTyped(json, false); } -export function GetSqlv1Connection200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetSqlv1Connection200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: SqlV1ConnectionMetadataFromJSON(json["metadata"]), - name: json["name"] == null ? undefined : json["name"], - spec: json["spec"], - status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), - }; +export function GetSqlv1Connection200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1Connection200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1ConnectionMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), + }; } export function GetSqlv1Connection200ResponseToJSON(json: any): GetSqlv1Connection200Response { - return GetSqlv1Connection200ResponseToJSONTyped(json, false); + return GetSqlv1Connection200ResponseToJSONTyped(json, false); } -export function GetSqlv1Connection200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetSqlv1Connection200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), - name: value["name"], - spec: value["spec"], - status: SqlV1ConnectionStatusToJSON(value["status"]), - }; + return { + + 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts b/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts index 6a97fcd2d7..34255f22d5 100644 --- a/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts @@ -5,170 +5,166 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from "./SqlV1StatementMetadata"; -import type { SqlV1StatementResult } from "./SqlV1StatementResult"; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from './SqlV1StatementMetadata'; +import type { SqlV1StatementResult } from './SqlV1StatementResult'; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from "./SqlV1StatementResult"; -import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from './SqlV1StatementResult'; +import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from "./SqlV1StatementStatus"; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from './SqlV1StatementStatus'; /** - * + * * @export * @interface GetSqlv1Statement200Response */ export interface GetSqlv1Statement200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - readonly api_version: GetSqlv1Statement200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - readonly kind: GetSqlv1Statement200ResponseKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof GetSqlv1Statement200Response - */ - metadata: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - name?: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof GetSqlv1Statement200Response - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof GetSqlv1Statement200Response - */ - status: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof GetSqlv1Statement200Response - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + readonly api_version: GetSqlv1Statement200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + readonly kind: GetSqlv1Statement200ResponseKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof GetSqlv1Statement200Response + */ + metadata: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + name?: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof GetSqlv1Statement200Response + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof GetSqlv1Statement200Response + */ + status: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof GetSqlv1Statement200Response + */ + result?: SqlV1StatementResult; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetSqlv1Statement200ResponseApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetSqlv1Statement200ResponseKindEnum { - Statement = "Statement", + Statement = 'Statement' } + /** * Check if a given object implements the GetSqlv1Statement200Response interface. */ -export function instanceOfGetSqlv1Statement200Response( - value: object, -): value is GetSqlv1Statement200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfGetSqlv1Statement200Response(value: object): value is GetSqlv1Statement200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } export function GetSqlv1Statement200ResponseFromJSON(json: any): GetSqlv1Statement200Response { - return GetSqlv1Statement200ResponseFromJSONTyped(json, false); + return GetSqlv1Statement200ResponseFromJSONTyped(json, false); } -export function GetSqlv1Statement200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetSqlv1Statement200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: SqlV1StatementMetadataFromJSON(json["metadata"]), - name: json["name"] == null ? undefined : json["name"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - spec: json["spec"], - status: SqlV1StatementStatusFromJSON(json["status"]), - result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), - }; +export function GetSqlv1Statement200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1Statement200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1StatementMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'spec': json['spec'], + 'status': SqlV1StatementStatusFromJSON(json['status']), + 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), + }; } export function GetSqlv1Statement200ResponseToJSON(json: any): GetSqlv1Statement200Response { - return GetSqlv1Statement200ResponseToJSONTyped(json, false); + return GetSqlv1Statement200ResponseToJSONTyped(json, false); } -export function GetSqlv1Statement200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetSqlv1Statement200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1StatementMetadataToJSON(value["metadata"]), - name: value["name"], - organization_id: value["organization_id"], - environment_id: value["environment_id"], - spec: value["spec"], - status: SqlV1StatementStatusToJSON(value["status"]), - result: SqlV1StatementResultToJSON(value["result"]), - }; + return { + + 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), + 'name': value['name'], + 'organization_id': value['organization_id'], + 'environment_id': value['environment_id'], + 'spec': value['spec'], + 'status': SqlV1StatementStatusToJSON(value['status']), + 'result': SqlV1StatementResultToJSON(value['result']), + }; } + diff --git a/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts b/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts index 8019b6bc98..cfd628a405 100644 --- a/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts @@ -5,121 +5,113 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResultListMeta } from "./ResultListMeta"; +import { mapValues } from '../runtime'; +import type { ResultListMeta } from './ResultListMeta'; import { - ResultListMetaFromJSON, - ResultListMetaFromJSONTyped, - ResultListMetaToJSON, - ResultListMetaToJSONTyped, -} from "./ResultListMeta"; + ResultListMetaFromJSON, + ResultListMetaFromJSONTyped, + ResultListMetaToJSON, + ResultListMetaToJSONTyped, +} from './ResultListMeta'; /** - * + * * @export * @interface GetSqlv1StatementResult200Response */ export interface GetSqlv1StatementResult200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1StatementResult200Response - */ - api_version: GetSqlv1StatementResult200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1StatementResult200Response - */ - kind: GetSqlv1StatementResult200ResponseKindEnum; - /** - * - * @type {ResultListMeta} - * @memberof GetSqlv1StatementResult200Response - */ - metadata: ResultListMeta; - /** - * - * @type {object} - * @memberof GetSqlv1StatementResult200Response - */ - results: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1StatementResult200Response + */ + api_version: GetSqlv1StatementResult200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1StatementResult200Response + */ + kind: GetSqlv1StatementResult200ResponseKindEnum; + /** + * + * @type {ResultListMeta} + * @memberof GetSqlv1StatementResult200Response + */ + metadata: ResultListMeta; + /** + * + * @type {object} + * @memberof GetSqlv1StatementResult200Response + */ + results: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetSqlv1StatementResult200ResponseApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetSqlv1StatementResult200ResponseKindEnum { - StatementResult = "StatementResult", + StatementResult = 'StatementResult' } + /** * Check if a given object implements the GetSqlv1StatementResult200Response interface. */ -export function instanceOfGetSqlv1StatementResult200Response( - value: object, -): value is GetSqlv1StatementResult200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("results" in value) || value["results"] === undefined) return false; - return true; +export function instanceOfGetSqlv1StatementResult200Response(value: object): value is GetSqlv1StatementResult200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; + return true; } -export function GetSqlv1StatementResult200ResponseFromJSON( - json: any, -): GetSqlv1StatementResult200Response { - return GetSqlv1StatementResult200ResponseFromJSONTyped(json, false); +export function GetSqlv1StatementResult200ResponseFromJSON(json: any): GetSqlv1StatementResult200Response { + return GetSqlv1StatementResult200ResponseFromJSONTyped(json, false); } -export function GetSqlv1StatementResult200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetSqlv1StatementResult200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ResultListMetaFromJSON(json["metadata"]), - results: json["results"], - }; +export function GetSqlv1StatementResult200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1StatementResult200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ResultListMetaFromJSON(json['metadata']), + 'results': json['results'], + }; } -export function GetSqlv1StatementResult200ResponseToJSON( - json: any, -): GetSqlv1StatementResult200Response { - return GetSqlv1StatementResult200ResponseToJSONTyped(json, false); +export function GetSqlv1StatementResult200ResponseToJSON(json: any): GetSqlv1StatementResult200Response { + return GetSqlv1StatementResult200ResponseToJSONTyped(json, false); } -export function GetSqlv1StatementResult200ResponseToJSONTyped( - value?: GetSqlv1StatementResult200Response | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetSqlv1StatementResult200ResponseToJSONTyped(value?: GetSqlv1StatementResult200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: ResultListMetaToJSON(value["metadata"]), - results: value["results"], - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': ResultListMetaToJSON(value['metadata']), + 'results': value['results'], + }; } + diff --git a/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts b/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts new file mode 100644 index 0000000000..b3202f7d2c --- /dev/null +++ b/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts @@ -0,0 +1,139 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from './SqlV1ToolStatus'; +import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from './SqlV1ToolMetadata'; + +/** + * + * @export + * @interface GetSqlv1Tool200Response + */ +export interface GetSqlv1Tool200Response { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + readonly api_version: GetSqlv1Tool200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + readonly kind: GetSqlv1Tool200ResponseKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof GetSqlv1Tool200Response + */ + metadata: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + name: string; + /** + * + * @type {object} + * @memberof GetSqlv1Tool200Response + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof GetSqlv1Tool200Response + */ + status?: SqlV1ToolStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum GetSqlv1Tool200ResponseApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum GetSqlv1Tool200ResponseKindEnum { + Tool = 'Tool' +} + + +/** + * Check if a given object implements the GetSqlv1Tool200Response interface. + */ +export function instanceOfGetSqlv1Tool200Response(value: object): value is GetSqlv1Tool200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function GetSqlv1Tool200ResponseFromJSON(json: any): GetSqlv1Tool200Response { + return GetSqlv1Tool200ResponseFromJSONTyped(json, false); +} + +export function GetSqlv1Tool200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1Tool200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1ToolMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1ToolStatusFromJSON(json['status']), + }; +} + +export function GetSqlv1Tool200ResponseToJSON(json: any): GetSqlv1Tool200Response { + return GetSqlv1Tool200ResponseToJSONTyped(json, false); +} + +export function GetSqlv1Tool200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ToolStatusToJSON(value['status']), + }; +} + diff --git a/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts b/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts index 1d8f007aa4..74177a1eed 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts @@ -5,95 +5,91 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * This option is used to add or replace a value for a field * @export * @interface JsonPatchRequestAddReplace */ export interface JsonPatchRequestAddReplace { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestAddReplace - */ - path: string; - /** - * The value to add, replace or test. - * @type {any} - * @memberof JsonPatchRequestAddReplace - */ - value: any | null; - /** - * The operation to perform. - * @type {string} - * @memberof JsonPatchRequestAddReplace - */ - op: JsonPatchRequestAddReplaceOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestAddReplace + */ + path: string; + /** + * The value to add, replace or test. + * @type {any} + * @memberof JsonPatchRequestAddReplace + */ + value: any | null; + /** + * The operation to perform. + * @type {string} + * @memberof JsonPatchRequestAddReplace + */ + op: JsonPatchRequestAddReplaceOpEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum JsonPatchRequestAddReplaceOpEnum { - Add = "ADD", - Replace = "REPLACE", - Test = "TEST", + Add = 'ADD', + Replace = 'REPLACE', + Test = 'TEST' } + /** * Check if a given object implements the JsonPatchRequestAddReplace interface. */ -export function instanceOfJsonPatchRequestAddReplace( - value: object, -): value is JsonPatchRequestAddReplace { - if (!("path" in value) || value["path"] === undefined) return false; - if (!("value" in value) || value["value"] === undefined) return false; - if (!("op" in value) || value["op"] === undefined) return false; - return true; +export function instanceOfJsonPatchRequestAddReplace(value: object): value is JsonPatchRequestAddReplace { + if (!('path' in value) || value['path'] === undefined) return false; + if (!('value' in value) || value['value'] === undefined) return false; + if (!('op' in value) || value['op'] === undefined) return false; + return true; } export function JsonPatchRequestAddReplaceFromJSON(json: any): JsonPatchRequestAddReplace { - return JsonPatchRequestAddReplaceFromJSONTyped(json, false); + return JsonPatchRequestAddReplaceFromJSONTyped(json, false); } -export function JsonPatchRequestAddReplaceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): JsonPatchRequestAddReplace { - if (json == null) { - return json; - } - return { - path: json["path"], - value: json["value"], - op: json["op"], - }; +export function JsonPatchRequestAddReplaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatchRequestAddReplace { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'value': json['value'], + 'op': json['op'], + }; } export function JsonPatchRequestAddReplaceToJSON(json: any): JsonPatchRequestAddReplace { - return JsonPatchRequestAddReplaceToJSONTyped(json, false); + return JsonPatchRequestAddReplaceToJSONTyped(json, false); } -export function JsonPatchRequestAddReplaceToJSONTyped( - value?: JsonPatchRequestAddReplace | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JsonPatchRequestAddReplaceToJSONTyped(value?: JsonPatchRequestAddReplace | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - value: value["value"], - op: value["op"], - }; + return { + + 'path': value['path'], + 'value': value['value'], + 'op': value['op'], + }; } + diff --git a/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts b/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts index 3333174af1..85e535984e 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts @@ -5,94 +5,90 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * This option is used to move or copy a field * @export * @interface JsonPatchRequestMoveCopy */ export interface JsonPatchRequestMoveCopy { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestMoveCopy - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JsonPatchRequestMoveCopy - */ - op: JsonPatchRequestMoveCopyOpEnum; - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestMoveCopy - */ - from: string; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestMoveCopy + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JsonPatchRequestMoveCopy + */ + op: JsonPatchRequestMoveCopyOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestMoveCopy + */ + from: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum JsonPatchRequestMoveCopyOpEnum { - Move = "MOVE", - Copy = "COPY", + Move = 'MOVE', + Copy = 'COPY' } + /** * Check if a given object implements the JsonPatchRequestMoveCopy interface. */ -export function instanceOfJsonPatchRequestMoveCopy( - value: object, -): value is JsonPatchRequestMoveCopy { - if (!("path" in value) || value["path"] === undefined) return false; - if (!("op" in value) || value["op"] === undefined) return false; - if (!("from" in value) || value["from"] === undefined) return false; - return true; +export function instanceOfJsonPatchRequestMoveCopy(value: object): value is JsonPatchRequestMoveCopy { + if (!('path' in value) || value['path'] === undefined) return false; + if (!('op' in value) || value['op'] === undefined) return false; + if (!('from' in value) || value['from'] === undefined) return false; + return true; } export function JsonPatchRequestMoveCopyFromJSON(json: any): JsonPatchRequestMoveCopy { - return JsonPatchRequestMoveCopyFromJSONTyped(json, false); + return JsonPatchRequestMoveCopyFromJSONTyped(json, false); } -export function JsonPatchRequestMoveCopyFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): JsonPatchRequestMoveCopy { - if (json == null) { - return json; - } - return { - path: json["path"], - op: json["op"], - from: json["from"], - }; +export function JsonPatchRequestMoveCopyFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatchRequestMoveCopy { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'op': json['op'], + 'from': json['from'], + }; } export function JsonPatchRequestMoveCopyToJSON(json: any): JsonPatchRequestMoveCopy { - return JsonPatchRequestMoveCopyToJSONTyped(json, false); + return JsonPatchRequestMoveCopyToJSONTyped(json, false); } -export function JsonPatchRequestMoveCopyToJSONTyped( - value?: JsonPatchRequestMoveCopy | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JsonPatchRequestMoveCopyToJSONTyped(value?: JsonPatchRequestMoveCopy | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - op: value["op"], - from: value["from"], - }; + return { + + 'path': value['path'], + 'op': value['op'], + 'from': value['from'], + }; } + diff --git a/src/clients/flinkSql/models/JsonPatchRequestRemove.ts b/src/clients/flinkSql/models/JsonPatchRequestRemove.ts index 596ae87254..49533d4bc1 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestRemove.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestRemove.ts @@ -5,82 +5,80 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * This option is used to remove a field * @export * @interface JsonPatchRequestRemove */ export interface JsonPatchRequestRemove { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestRemove - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JsonPatchRequestRemove - */ - op: JsonPatchRequestRemoveOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestRemove + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JsonPatchRequestRemove + */ + op: JsonPatchRequestRemoveOpEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum JsonPatchRequestRemoveOpEnum { - Remove = "REMOVE", + Remove = 'REMOVE' } + /** * Check if a given object implements the JsonPatchRequestRemove interface. */ export function instanceOfJsonPatchRequestRemove(value: object): value is JsonPatchRequestRemove { - if (!("path" in value) || value["path"] === undefined) return false; - if (!("op" in value) || value["op"] === undefined) return false; - return true; + if (!('path' in value) || value['path'] === undefined) return false; + if (!('op' in value) || value['op'] === undefined) return false; + return true; } export function JsonPatchRequestRemoveFromJSON(json: any): JsonPatchRequestRemove { - return JsonPatchRequestRemoveFromJSONTyped(json, false); + return JsonPatchRequestRemoveFromJSONTyped(json, false); } -export function JsonPatchRequestRemoveFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): JsonPatchRequestRemove { - if (json == null) { - return json; - } - return { - path: json["path"], - op: json["op"], - }; +export function JsonPatchRequestRemoveFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatchRequestRemove { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'op': json['op'], + }; } export function JsonPatchRequestRemoveToJSON(json: any): JsonPatchRequestRemove { - return JsonPatchRequestRemoveToJSONTyped(json, false); + return JsonPatchRequestRemoveToJSONTyped(json, false); } -export function JsonPatchRequestRemoveToJSONTyped( - value?: JsonPatchRequestRemove | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JsonPatchRequestRemoveToJSONTyped(value?: JsonPatchRequestRemove | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - op: value["op"], - }; + return { + + 'path': value['path'], + 'op': value['op'], + }; } + diff --git a/src/clients/flinkSql/models/ListMeta.ts b/src/clients/flinkSql/models/ListMeta.ts index 63cc97aa7a..9c41dd7033 100644 --- a/src/clients/flinkSql/models/ListMeta.ts +++ b/src/clients/flinkSql/models/ListMeta.ts @@ -5,69 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ListMeta - */ - self?: string; - /** - * A URL that can be followed to get the next batch of results. - * @type {string} - * @memberof ListMeta - */ - next?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ListMeta + */ + self?: string; + /** + * A URL that can be followed to get the next batch of results. + * @type {string} + * @memberof ListMeta + */ + next?: string; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - next: json["next"] == null ? undefined : json["next"], - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped( - value?: ListMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + }; } + diff --git a/src/clients/flinkSql/models/ModelError.ts b/src/clients/flinkSql/models/ModelError.ts index f193e1bf1a..cb2fc51636 100644 --- a/src/clients/flinkSql/models/ModelError.ts +++ b/src/clients/flinkSql/models/ModelError.ts @@ -5,21 +5,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorSource } from "./ErrorSource"; +import { mapValues } from '../runtime'; +import type { ErrorSource } from './ErrorSource'; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from "./ErrorSource"; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from './ErrorSource'; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - status: json["status"] == null ? undefined : json["status"], - code: json["code"] == null ? undefined : json["code"], - title: json["title"] == null ? undefined : json["title"], - detail: json["detail"] == null ? undefined : json["detail"], - source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'code': json['code'] == null ? undefined : json['code'], + 'title': json['title'] == null ? undefined : json['title'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped( - value?: ModelError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - status: value["status"], - code: value["code"], - title: value["title"], - detail: value["detail"], - source: ErrorSourceToJSON(value["source"]), - }; + return { + + 'id': value['id'], + 'status': value['status'], + 'code': value['code'], + 'title': value['title'], + 'detail': value['detail'], + 'source': ErrorSourceToJSON(value['source']), + }; } + diff --git a/src/clients/flinkSql/models/ObjectMeta.ts b/src/clients/flinkSql/models/ObjectMeta.ts index ae3aca5c14..1c9c4119b6 100644 --- a/src/clients/flinkSql/models/ObjectMeta.ts +++ b/src/clients/flinkSql/models/ObjectMeta.ts @@ -5,94 +5,94 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The metadata of the statement. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - self: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - updated_at?: Date; - /** - * A system generated globally unique identifier for this resource. - * @type {string} - * @memberof ObjectMeta - */ - uid?: string; - /** - * A system generated string that uniquely identifies the version of this resource. - * @type {string} - * @memberof ObjectMeta - */ - resource_version?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + self: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof ObjectMeta + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof ObjectMeta + */ + resource_version?: string; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - self: json["self"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - uid: json["uid"] == null ? undefined : json["uid"], - resource_version: json["resource_version"] == null ? undefined : json["resource_version"], - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped( - value?: ObjectMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped(value?: ObjectMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), - updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), - uid: value["uid"], - resource_version: value["resource_version"], - }; + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + }; } + diff --git a/src/clients/flinkSql/models/PatchRequestInner.ts b/src/clients/flinkSql/models/PatchRequestInner.ts index e9f80c1b88..5b9bf140d6 100644 --- a/src/clients/flinkSql/models/PatchRequestInner.ts +++ b/src/clients/flinkSql/models/PatchRequestInner.ts @@ -5,90 +5,82 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { JsonPatchRequestAddReplace } from "./JsonPatchRequestAddReplace"; +import type { JsonPatchRequestAddReplace } from './JsonPatchRequestAddReplace'; import { - instanceOfJsonPatchRequestAddReplace, - JsonPatchRequestAddReplaceFromJSON, - JsonPatchRequestAddReplaceFromJSONTyped, - JsonPatchRequestAddReplaceToJSON, -} from "./JsonPatchRequestAddReplace"; -import type { JsonPatchRequestMoveCopy } from "./JsonPatchRequestMoveCopy"; + instanceOfJsonPatchRequestAddReplace, + JsonPatchRequestAddReplaceFromJSON, + JsonPatchRequestAddReplaceFromJSONTyped, + JsonPatchRequestAddReplaceToJSON, +} from './JsonPatchRequestAddReplace'; +import type { JsonPatchRequestMoveCopy } from './JsonPatchRequestMoveCopy'; import { - instanceOfJsonPatchRequestMoveCopy, - JsonPatchRequestMoveCopyFromJSON, - JsonPatchRequestMoveCopyFromJSONTyped, - JsonPatchRequestMoveCopyToJSON, -} from "./JsonPatchRequestMoveCopy"; -import type { JsonPatchRequestRemove } from "./JsonPatchRequestRemove"; + instanceOfJsonPatchRequestMoveCopy, + JsonPatchRequestMoveCopyFromJSON, + JsonPatchRequestMoveCopyFromJSONTyped, + JsonPatchRequestMoveCopyToJSON, +} from './JsonPatchRequestMoveCopy'; +import type { JsonPatchRequestRemove } from './JsonPatchRequestRemove'; import { - instanceOfJsonPatchRequestRemove, - JsonPatchRequestRemoveFromJSON, - JsonPatchRequestRemoveFromJSONTyped, - JsonPatchRequestRemoveToJSON, -} from "./JsonPatchRequestRemove"; + instanceOfJsonPatchRequestRemove, + JsonPatchRequestRemoveFromJSON, + JsonPatchRequestRemoveFromJSONTyped, + JsonPatchRequestRemoveToJSON, +} from './JsonPatchRequestRemove'; /** * @type PatchRequestInner - * + * * @export */ -export type PatchRequestInner = - | JsonPatchRequestAddReplace - | JsonPatchRequestMoveCopy - | JsonPatchRequestRemove; +export type PatchRequestInner = JsonPatchRequestAddReplace | JsonPatchRequestMoveCopy | JsonPatchRequestRemove; export function PatchRequestInnerFromJSON(json: any): PatchRequestInner { - return PatchRequestInnerFromJSONTyped(json, false); + return PatchRequestInnerFromJSONTyped(json, false); } -export function PatchRequestInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PatchRequestInner { - if (json == null) { - return json; - } - if (instanceOfJsonPatchRequestAddReplace(json)) { - return JsonPatchRequestAddReplaceFromJSONTyped(json, true); - } - if (instanceOfJsonPatchRequestMoveCopy(json)) { - return JsonPatchRequestMoveCopyFromJSONTyped(json, true); - } - if (instanceOfJsonPatchRequestRemove(json)) { - return JsonPatchRequestRemoveFromJSONTyped(json, true); - } +export function PatchRequestInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchRequestInner { + if (json == null) { + return json; + } + if (instanceOfJsonPatchRequestAddReplace(json)) { + return JsonPatchRequestAddReplaceFromJSONTyped(json, true); + } + if (instanceOfJsonPatchRequestMoveCopy(json)) { + return JsonPatchRequestMoveCopyFromJSONTyped(json, true); + } + if (instanceOfJsonPatchRequestRemove(json)) { + return JsonPatchRequestRemoveFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function PatchRequestInnerToJSON(json: any): any { - return PatchRequestInnerToJSONTyped(json, false); + return PatchRequestInnerToJSONTyped(json, false); } -export function PatchRequestInnerToJSONTyped( - value?: PatchRequestInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PatchRequestInnerToJSONTyped(value?: PatchRequestInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - if (instanceOfJsonPatchRequestAddReplace(value)) { - return JsonPatchRequestAddReplaceToJSON(value as JsonPatchRequestAddReplace); - } - if (instanceOfJsonPatchRequestMoveCopy(value)) { - return JsonPatchRequestMoveCopyToJSON(value as JsonPatchRequestMoveCopy); - } - if (instanceOfJsonPatchRequestRemove(value)) { - return JsonPatchRequestRemoveToJSON(value as JsonPatchRequestRemove); - } + if (instanceOfJsonPatchRequestAddReplace(value)) { + return JsonPatchRequestAddReplaceToJSON(value as JsonPatchRequestAddReplace); + } + if (instanceOfJsonPatchRequestMoveCopy(value)) { + return JsonPatchRequestMoveCopyToJSON(value as JsonPatchRequestMoveCopy); + } + if (instanceOfJsonPatchRequestRemove(value)) { + return JsonPatchRequestRemoveToJSON(value as JsonPatchRequestRemove); + } - return {}; + return {}; } + diff --git a/src/clients/flinkSql/models/ResultListMeta.ts b/src/clients/flinkSql/models/ResultListMeta.ts index c0472c2fb6..18130dba1b 100644 --- a/src/clients/flinkSql/models/ResultListMeta.ts +++ b/src/clients/flinkSql/models/ResultListMeta.ts @@ -5,79 +5,76 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ResultListMeta */ export interface ResultListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ResultListMeta - */ - self?: string; - /** - * A URL that can be followed to get the next batch of results. - * @type {string} - * @memberof ResultListMeta - */ - next?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ResultListMeta - */ - readonly created_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ResultListMeta + */ + self?: string; + /** + * A URL that can be followed to get the next batch of results. + * @type {string} + * @memberof ResultListMeta + */ + next?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ResultListMeta + */ + readonly created_at?: Date; } /** * Check if a given object implements the ResultListMeta interface. */ export function instanceOfResultListMeta(value: object): value is ResultListMeta { - return true; + return true; } export function ResultListMetaFromJSON(json: any): ResultListMeta { - return ResultListMetaFromJSONTyped(json, false); + return ResultListMetaFromJSONTyped(json, false); } -export function ResultListMetaFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResultListMeta { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - next: json["next"] == null ? undefined : json["next"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - }; +export function ResultListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResultListMeta { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + }; } export function ResultListMetaToJSON(json: any): ResultListMeta { - return ResultListMetaToJSONTyped(json, false); + return ResultListMetaToJSONTyped(json, false); } -export function ResultListMetaToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResultListMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + }; } + diff --git a/src/clients/flinkSql/models/RowFieldType.ts b/src/clients/flinkSql/models/RowFieldType.ts index 1c3d11360c..c93ffe30ea 100644 --- a/src/clients/flinkSql/models/RowFieldType.ts +++ b/src/clients/flinkSql/models/RowFieldType.ts @@ -5,87 +5,87 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { DataType } from "./DataType"; +import { mapValues } from '../runtime'; +import type { DataType } from './DataType'; import { - DataTypeFromJSON, - DataTypeFromJSONTyped, - DataTypeToJSON, - DataTypeToJSONTyped, -} from "./DataType"; + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from './DataType'; /** - * + * * @export * @interface RowFieldType */ export interface RowFieldType { - /** - * The name of the field. - * @type {string} - * @memberof RowFieldType - */ - name: string; - /** - * The data type of the field. - * @type {DataType} - * @memberof RowFieldType - */ - field_type: DataType; - /** - * The description of the field. - * @type {string} - * @memberof RowFieldType - */ - description?: string; + /** + * The name of the field. + * @type {string} + * @memberof RowFieldType + */ + name: string; + /** + * The data type of the field. + * @type {DataType} + * @memberof RowFieldType + */ + field_type: DataType; + /** + * The description of the field. + * @type {string} + * @memberof RowFieldType + */ + description?: string; } /** * Check if a given object implements the RowFieldType interface. */ export function instanceOfRowFieldType(value: object): value is RowFieldType { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("field_type" in value) || value["field_type"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('field_type' in value) || value['field_type'] === undefined) return false; + return true; } export function RowFieldTypeFromJSON(json: any): RowFieldType { - return RowFieldTypeFromJSONTyped(json, false); + return RowFieldTypeFromJSONTyped(json, false); } export function RowFieldTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): RowFieldType { - if (json == null) { - return json; - } - return { - name: json["name"], - field_type: DataTypeFromJSON(json["field_type"]), - description: json["description"] == null ? undefined : json["description"], - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'field_type': DataTypeFromJSON(json['field_type']), + 'description': json['description'] == null ? undefined : json['description'], + }; } export function RowFieldTypeToJSON(json: any): RowFieldType { - return RowFieldTypeToJSONTyped(json, false); + return RowFieldTypeToJSONTyped(json, false); } -export function RowFieldTypeToJSONTyped( - value?: RowFieldType | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RowFieldTypeToJSONTyped(value?: RowFieldType | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - field_type: DataTypeToJSON(value["field_type"]), - description: value["description"], - }; + return { + + 'name': value['name'], + 'field_type': DataTypeToJSON(value['field_type']), + 'description': value['description'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1Agent.ts b/src/clients/flinkSql/models/SqlV1Agent.ts new file mode 100644 index 0000000000..b7a0c17a5c --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1Agent.ts @@ -0,0 +1,161 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1AgentMetadata } from './SqlV1AgentMetadata'; +import { + SqlV1AgentMetadataFromJSON, + SqlV1AgentMetadataFromJSONTyped, + SqlV1AgentMetadataToJSON, + SqlV1AgentMetadataToJSONTyped, +} from './SqlV1AgentMetadata'; +import type { SqlV1AgentStatus } from './SqlV1AgentStatus'; +import { + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from './SqlV1AgentStatus'; +import type { SqlV1AgentSpec } from './SqlV1AgentSpec'; +import { + SqlV1AgentSpecFromJSON, + SqlV1AgentSpecFromJSONTyped, + SqlV1AgentSpecToJSON, + SqlV1AgentSpecToJSONTyped, +} from './SqlV1AgentSpec'; + +/** + * Represents an Agent resource. + * @export + * @interface SqlV1Agent + */ +export interface SqlV1Agent { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Agent + */ + readonly api_version: SqlV1AgentApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Agent + */ + readonly kind: SqlV1AgentKindEnum; + /** + * + * @type {SqlV1AgentMetadata} + * @memberof SqlV1Agent + */ + metadata: SqlV1AgentMetadata; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof SqlV1Agent + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1Agent + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1Agent + */ + readonly environment_id: string; + /** + * + * @type {SqlV1AgentSpec} + * @memberof SqlV1Agent + */ + spec: SqlV1AgentSpec; + /** + * + * @type {SqlV1AgentStatus} + * @memberof SqlV1Agent + */ + readonly status?: SqlV1AgentStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1AgentApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1AgentKindEnum { + Agent = 'Agent' +} + + +/** + * Check if a given object implements the SqlV1Agent interface. + */ +export function instanceOfSqlV1Agent(value: object): value is SqlV1Agent { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function SqlV1AgentFromJSON(json: any): SqlV1Agent { + return SqlV1AgentFromJSONTyped(json, false); +} + +export function SqlV1AgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Agent { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1AgentMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': SqlV1AgentSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1AgentStatusFromJSON(json['status']), + }; +} + +export function SqlV1AgentToJSON(json: any): SqlV1Agent { + return SqlV1AgentToJSONTyped(json, false); +} + +export function SqlV1AgentToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1AgentMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': SqlV1AgentSpecToJSON(value['spec']), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1AgentList.ts b/src/clients/flinkSql/models/SqlV1AgentList.ts new file mode 100644 index 0000000000..0efb7d1b35 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentList.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1Agent } from './SqlV1Agent'; +import { + SqlV1AgentFromJSON, + SqlV1AgentFromJSONTyped, + SqlV1AgentToJSON, + SqlV1AgentToJSONTyped, +} from './SqlV1Agent'; +import type { ListMeta } from './ListMeta'; +import { + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from './ListMeta'; + +/** + * A list of Agent resources. + * @export + * @interface SqlV1AgentList + */ +export interface SqlV1AgentList { + /** + * + * @type {string} + * @memberof SqlV1AgentList + */ + readonly api_version: SqlV1AgentListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1AgentList + */ + readonly kind: SqlV1AgentListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1AgentList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1AgentList + */ + data: Set; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1AgentListApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1AgentListKindEnum { + AgentList = 'AgentList' +} + + +/** + * Check if a given object implements the SqlV1AgentList interface. + */ +export function instanceOfSqlV1AgentList(value: object): value is SqlV1AgentList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; +} + +export function SqlV1AgentListFromJSON(json: any): SqlV1AgentList { + return SqlV1AgentListFromJSONTyped(json, false); +} + +export function SqlV1AgentListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ListMetaFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(SqlV1AgentFromJSON))), + }; +} + +export function SqlV1AgentListToJSON(json: any): SqlV1AgentList { + return SqlV1AgentListToJSONTyped(json, false); +} + +export function SqlV1AgentListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': ListMetaToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(SqlV1AgentToJSON)), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1AgentMetadata.ts b/src/clients/flinkSql/models/SqlV1AgentMetadata.ts new file mode 100644 index 0000000000..45072df92f --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentMetadata.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SqlV1AgentMetadata + */ +export interface SqlV1AgentMetadata { + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1AgentMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1AgentMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + resource_name?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1AgentMetadata + */ + labels?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the SqlV1AgentMetadata interface. + */ +export function instanceOfSqlV1AgentMetadata(value: object): value is SqlV1AgentMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; +} + +export function SqlV1AgentMetadataFromJSON(json: any): SqlV1AgentMetadata { + return SqlV1AgentMetadataFromJSONTyped(json, false); +} + +export function SqlV1AgentMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'labels': json['labels'] == null ? undefined : json['labels'], + }; +} + +export function SqlV1AgentMetadataToJSON(json: any): SqlV1AgentMetadata { + return SqlV1AgentMetadataToJSONTyped(json, false); +} + +export function SqlV1AgentMetadataToJSONTyped(value?: SqlV1AgentMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + 'resource_name': value['resource_name'], + 'labels': value['labels'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1AgentSpec.ts b/src/clients/flinkSql/models/SqlV1AgentSpec.ts new file mode 100644 index 0000000000..7f868da660 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentSpec.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The specifications of the Agent. + * @export + * @interface SqlV1AgentSpec + */ +export interface SqlV1AgentSpec { + /** + * The description of the agent. + * @type {string} + * @memberof SqlV1AgentSpec + */ + description?: string; + /** + * The name of the model the agent uses for inferencing. + * @type {string} + * @memberof SqlV1AgentSpec + */ + model?: string; + /** + * The instruction prompt that guides the agent's behavior. + * @type {string} + * @memberof SqlV1AgentSpec + */ + prompt?: string; + /** + * The list of tools available to the agent. + * @type {Array} + * @memberof SqlV1AgentSpec + */ + tools?: Array; + /** + * A set of key-value option pairs that configure the agent's behavior. + * @type {{ [key: string]: string; }} + * @memberof SqlV1AgentSpec + */ + properties?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the SqlV1AgentSpec interface. + */ +export function instanceOfSqlV1AgentSpec(value: object): value is SqlV1AgentSpec { + return true; +} + +export function SqlV1AgentSpecFromJSON(json: any): SqlV1AgentSpec { + return SqlV1AgentSpecFromJSONTyped(json, false); +} + +export function SqlV1AgentSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentSpec { + if (json == null) { + return json; + } + return { + + 'description': json['description'] == null ? undefined : json['description'], + 'model': json['model'] == null ? undefined : json['model'], + 'prompt': json['prompt'] == null ? undefined : json['prompt'], + 'tools': json['tools'] == null ? undefined : json['tools'], + 'properties': json['properties'] == null ? undefined : json['properties'], + }; +} + +export function SqlV1AgentSpecToJSON(json: any): SqlV1AgentSpec { + return SqlV1AgentSpecToJSONTyped(json, false); +} + +export function SqlV1AgentSpecToJSONTyped(value?: SqlV1AgentSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'description': value['description'], + 'model': value['model'], + 'prompt': value['prompt'], + 'tools': value['tools'], + 'properties': value['properties'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1AgentStatus.ts b/src/clients/flinkSql/models/SqlV1AgentStatus.ts new file mode 100644 index 0000000000..f957691662 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentStatus.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The status of the Agent. + * @export + * @interface SqlV1AgentStatus + */ +export interface SqlV1AgentStatus { + /** + * Describes the status of the agent: + * + * READY: The Agent is created; + * + * RUNNING: The Agent is created and running in a query; + * + * @type {string} + * @memberof SqlV1AgentStatus + */ + phase?: string; +} + +/** + * Check if a given object implements the SqlV1AgentStatus interface. + */ +export function instanceOfSqlV1AgentStatus(value: object): value is SqlV1AgentStatus { + return true; +} + +export function SqlV1AgentStatusFromJSON(json: any): SqlV1AgentStatus { + return SqlV1AgentStatusFromJSONTyped(json, false); +} + +export function SqlV1AgentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentStatus { + if (json == null) { + return json; + } + return { + + 'phase': json['phase'] == null ? undefined : json['phase'], + }; +} + +export function SqlV1AgentStatusToJSON(json: any): SqlV1AgentStatus { + return SqlV1AgentStatusToJSONTyped(json, false); +} + +export function SqlV1AgentStatusToJSONTyped(value?: SqlV1AgentStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phase': value['phase'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ColumnCommon.ts b/src/clients/flinkSql/models/SqlV1ColumnCommon.ts new file mode 100644 index 0000000000..4412683000 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ColumnCommon.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DataType } from './DataType'; +import { + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from './DataType'; + +/** + * + * @export + * @interface SqlV1ColumnCommon + */ +export interface SqlV1ColumnCommon { + /** + * The name of the column. + * @type {string} + * @memberof SqlV1ColumnCommon + */ + name: string; + /** + * + * @type {DataType} + * @memberof SqlV1ColumnCommon + */ + type: DataType; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1ColumnCommon + */ + comment?: string; +} + +/** + * Check if a given object implements the SqlV1ColumnCommon interface. + */ +export function instanceOfSqlV1ColumnCommon(value: object): value is SqlV1ColumnCommon { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function SqlV1ColumnCommonFromJSON(json: any): SqlV1ColumnCommon { + return SqlV1ColumnCommonFromJSONTyped(json, false); +} + +export function SqlV1ColumnCommonFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ColumnCommon { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': DataTypeFromJSON(json['type']), + 'comment': json['comment'] == null ? undefined : json['comment'], + }; +} + +export function SqlV1ColumnCommonToJSON(json: any): SqlV1ColumnCommon { + return SqlV1ColumnCommonToJSONTyped(json, false); +} + +export function SqlV1ColumnCommonToJSONTyped(value?: SqlV1ColumnCommon | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': DataTypeToJSON(value['type']), + 'comment': value['comment'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ComputedColumn.ts b/src/clients/flinkSql/models/SqlV1ComputedColumn.ts new file mode 100644 index 0000000000..de77f4c91c --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ComputedColumn.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Computed columns are generated via an expression. + * @export + * @interface SqlV1ComputedColumn + */ +export interface SqlV1ComputedColumn { + /** + * + * @type {any} + * @memberof SqlV1ComputedColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1ComputedColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + kind: SqlV1ComputedColumnKindEnum; + /** + * The SQL expression used to compute the column value. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + expression: string; + /** + * Indicates if the computed column is virtual. + * @type {boolean} + * @memberof SqlV1ComputedColumn + */ + virtual?: boolean; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1ComputedColumnKindEnum { + Computed = 'Computed' +} + + +/** + * Check if a given object implements the SqlV1ComputedColumn interface. + */ +export function instanceOfSqlV1ComputedColumn(value: object): value is SqlV1ComputedColumn { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('expression' in value) || value['expression'] === undefined) return false; + return true; +} + +export function SqlV1ComputedColumnFromJSON(json: any): SqlV1ComputedColumn { + return SqlV1ComputedColumnFromJSONTyped(json, false); +} + +export function SqlV1ComputedColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ComputedColumn { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': json['type'], + 'comment': json['comment'] == null ? undefined : json['comment'], + 'kind': json['kind'], + 'expression': json['expression'], + 'virtual': json['virtual'] == null ? undefined : json['virtual'], + }; +} + +export function SqlV1ComputedColumnToJSON(json: any): SqlV1ComputedColumn { + return SqlV1ComputedColumnToJSONTyped(json, false); +} + +export function SqlV1ComputedColumnToJSONTyped(value?: SqlV1ComputedColumn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': value['type'], + 'comment': value['comment'], + 'kind': value['kind'], + 'expression': value['expression'], + 'virtual': value['virtual'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1Connection.ts b/src/clients/flinkSql/models/SqlV1Connection.ts index 24442fc626..9d25d310f0 100644 --- a/src/clients/flinkSql/models/SqlV1Connection.ts +++ b/src/clients/flinkSql/models/SqlV1Connection.ts @@ -5,35 +5,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from "./SqlV1ConnectionStatus"; -import type { SqlV1ConnectionSpec } from "./SqlV1ConnectionSpec"; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from './SqlV1ConnectionStatus'; +import type { SqlV1ConnectionSpec } from './SqlV1ConnectionSpec'; import { - SqlV1ConnectionSpecFromJSON, - SqlV1ConnectionSpecFromJSONTyped, - SqlV1ConnectionSpecToJSON, - SqlV1ConnectionSpecToJSONTyped, -} from "./SqlV1ConnectionSpec"; -import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionSpecFromJSON, + SqlV1ConnectionSpecFromJSONTyped, + SqlV1ConnectionSpecToJSON, + SqlV1ConnectionSpecToJSONTyped, +} from './SqlV1ConnectionSpec'; +import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from './SqlV1ConnectionMetadata'; /** * `Connection` models a reusable endpoint and auth token to authenticate the caller to @@ -48,104 +48,101 @@ import { * @interface SqlV1Connection */ export interface SqlV1Connection { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1Connection - */ - readonly api_version?: SqlV1ConnectionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1Connection - */ - readonly kind?: SqlV1ConnectionKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof SqlV1Connection - */ - metadata?: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1Connection - */ - name?: string; - /** - * - * @type {SqlV1ConnectionSpec} - * @memberof SqlV1Connection - */ - spec?: SqlV1ConnectionSpec; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof SqlV1Connection - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Connection + */ + readonly api_version?: SqlV1ConnectionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Connection + */ + readonly kind?: SqlV1ConnectionKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof SqlV1Connection + */ + metadata?: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1Connection + */ + name?: string; + /** + * + * @type {SqlV1ConnectionSpec} + * @memberof SqlV1Connection + */ + spec?: SqlV1ConnectionSpec; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof SqlV1Connection + */ + status?: SqlV1ConnectionStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1ConnectionApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1ConnectionKindEnum { - Connection = "Connection", + Connection = 'Connection' } + /** * Check if a given object implements the SqlV1Connection interface. */ export function instanceOfSqlV1Connection(value: object): value is SqlV1Connection { - return true; + return true; } export function SqlV1ConnectionFromJSON(json: any): SqlV1Connection { - return SqlV1ConnectionFromJSONTyped(json, false); + return SqlV1ConnectionFromJSONTyped(json, false); } -export function SqlV1ConnectionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1Connection { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json["metadata"]), - name: json["name"] == null ? undefined : json["name"], - spec: json["spec"] == null ? undefined : SqlV1ConnectionSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), - }; +export function SqlV1ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Connection { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'spec': json['spec'] == null ? undefined : SqlV1ConnectionSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), + }; } export function SqlV1ConnectionToJSON(json: any): SqlV1Connection { - return SqlV1ConnectionToJSONTyped(json, false); + return SqlV1ConnectionToJSONTyped(json, false); } -export function SqlV1ConnectionToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), - name: value["name"], - spec: SqlV1ConnectionSpecToJSON(value["spec"]), - status: SqlV1ConnectionStatusToJSON(value["status"]), - }; + return { + + 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': SqlV1ConnectionSpecToJSON(value['spec']), + 'status': SqlV1ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionList.ts b/src/clients/flinkSql/models/SqlV1ConnectionList.ts index 0d2c7b6a5c..71e28d0bde 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionList.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionList.ts @@ -5,28 +5,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionListDataInner } from "./SqlV1ConnectionListDataInner"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionListDataInner } from './SqlV1ConnectionListDataInner'; import { - SqlV1ConnectionListDataInnerFromJSON, - SqlV1ConnectionListDataInnerFromJSONTyped, - SqlV1ConnectionListDataInnerToJSON, - SqlV1ConnectionListDataInnerToJSONTyped, -} from "./SqlV1ConnectionListDataInner"; -import type { SqlV1ConnectionListMetadata } from "./SqlV1ConnectionListMetadata"; + SqlV1ConnectionListDataInnerFromJSON, + SqlV1ConnectionListDataInnerFromJSONTyped, + SqlV1ConnectionListDataInnerToJSON, + SqlV1ConnectionListDataInnerToJSONTyped, +} from './SqlV1ConnectionListDataInner'; +import type { SqlV1ConnectionListMetadata } from './SqlV1ConnectionListMetadata'; import { - SqlV1ConnectionListMetadataFromJSON, - SqlV1ConnectionListMetadataFromJSONTyped, - SqlV1ConnectionListMetadataToJSON, - SqlV1ConnectionListMetadataToJSONTyped, -} from "./SqlV1ConnectionListMetadata"; + SqlV1ConnectionListMetadataFromJSON, + SqlV1ConnectionListMetadataFromJSONTyped, + SqlV1ConnectionListMetadataToJSON, + SqlV1ConnectionListMetadataToJSONTyped, +} from './SqlV1ConnectionListMetadata'; /** * `Connection` models a reusable endpoint and auth token to authenticate the caller to @@ -41,93 +41,91 @@ import { * @interface SqlV1ConnectionList */ export interface SqlV1ConnectionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1ConnectionList - */ - api_version: SqlV1ConnectionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1ConnectionList - */ - kind: SqlV1ConnectionListKindEnum; - /** - * - * @type {SqlV1ConnectionListMetadata} - * @memberof SqlV1ConnectionList - */ - metadata: SqlV1ConnectionListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1ConnectionList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ConnectionList + */ + api_version: SqlV1ConnectionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ConnectionList + */ + kind: SqlV1ConnectionListKindEnum; + /** + * + * @type {SqlV1ConnectionListMetadata} + * @memberof SqlV1ConnectionList + */ + metadata: SqlV1ConnectionListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1ConnectionList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1ConnectionListApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1ConnectionListKindEnum { - ConnectionList = "ConnectionList", + ConnectionList = 'ConnectionList' } + /** * Check if a given object implements the SqlV1ConnectionList interface. */ export function instanceOfSqlV1ConnectionList(value: object): value is SqlV1ConnectionList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function SqlV1ConnectionListFromJSON(json: any): SqlV1ConnectionList { - return SqlV1ConnectionListFromJSONTyped(json, false); + return SqlV1ConnectionListFromJSONTyped(json, false); } -export function SqlV1ConnectionListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: SqlV1ConnectionListMetadataFromJSON(json["metadata"]), - data: new Set((json["data"] as Array).map(SqlV1ConnectionListDataInnerFromJSON)), - }; +export function SqlV1ConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1ConnectionListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(SqlV1ConnectionListDataInnerFromJSON))), + }; } export function SqlV1ConnectionListToJSON(json: any): SqlV1ConnectionList { - return SqlV1ConnectionListToJSONTyped(json, false); + return SqlV1ConnectionListToJSONTyped(json, false); } -export function SqlV1ConnectionListToJSONTyped( - value?: SqlV1ConnectionList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionListToJSONTyped(value?: SqlV1ConnectionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: SqlV1ConnectionListMetadataToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map(SqlV1ConnectionListDataInnerToJSON), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': SqlV1ConnectionListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(SqlV1ConnectionListDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts b/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts index bb4b0d2b31..c726b2305a 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts @@ -5,140 +5,136 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from "./SqlV1ConnectionStatus"; -import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from './SqlV1ConnectionStatus'; +import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from "./SqlV1ConnectionMetadata"; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from './SqlV1ConnectionMetadata'; /** - * + * * @export * @interface SqlV1ConnectionListDataInner */ export interface SqlV1ConnectionListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1ConnectionListDataInner - */ - readonly api_version: SqlV1ConnectionListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1ConnectionListDataInner - */ - readonly kind: SqlV1ConnectionListDataInnerKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof SqlV1ConnectionListDataInner - */ - metadata: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1ConnectionListDataInner - */ - name: string; - /** - * - * @type {object} - * @memberof SqlV1ConnectionListDataInner - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof SqlV1ConnectionListDataInner - */ - status: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ConnectionListDataInner + */ + readonly api_version: SqlV1ConnectionListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ConnectionListDataInner + */ + readonly kind: SqlV1ConnectionListDataInnerKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof SqlV1ConnectionListDataInner + */ + metadata: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1ConnectionListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof SqlV1ConnectionListDataInner + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof SqlV1ConnectionListDataInner + */ + status: SqlV1ConnectionStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1ConnectionListDataInnerApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1ConnectionListDataInnerKindEnum { - Connection = "Connection", + Connection = 'Connection' } + /** * Check if a given object implements the SqlV1ConnectionListDataInner interface. */ -export function instanceOfSqlV1ConnectionListDataInner( - value: object, -): value is SqlV1ConnectionListDataInner { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfSqlV1ConnectionListDataInner(value: object): value is SqlV1ConnectionListDataInner { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } export function SqlV1ConnectionListDataInnerFromJSON(json: any): SqlV1ConnectionListDataInner { - return SqlV1ConnectionListDataInnerFromJSONTyped(json, false); + return SqlV1ConnectionListDataInnerFromJSONTyped(json, false); } -export function SqlV1ConnectionListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: SqlV1ConnectionMetadataFromJSON(json["metadata"]), - name: json["name"], - spec: json["spec"], - status: SqlV1ConnectionStatusFromJSON(json["status"]), - }; +export function SqlV1ConnectionListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1ConnectionMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'spec': json['spec'], + 'status': SqlV1ConnectionStatusFromJSON(json['status']), + }; } export function SqlV1ConnectionListDataInnerToJSON(json: any): SqlV1ConnectionListDataInner { - return SqlV1ConnectionListDataInnerToJSONTyped(json, false); + return SqlV1ConnectionListDataInnerToJSONTyped(json, false); } -export function SqlV1ConnectionListDataInnerToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), - name: value["name"], - spec: value["spec"], - status: SqlV1ConnectionStatusToJSON(value["status"]), - }; + return { + + 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts b/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts index 6e64c7daae..a81d189765 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts @@ -5,98 +5,93 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SqlV1ConnectionListMetadata */ export interface SqlV1ConnectionListMetadata { - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - self?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - next?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - prev?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + prev?: any | null; } /** * Check if a given object implements the SqlV1ConnectionListMetadata interface. */ -export function instanceOfSqlV1ConnectionListMetadata( - value: object, -): value is SqlV1ConnectionListMetadata { - return true; +export function instanceOfSqlV1ConnectionListMetadata(value: object): value is SqlV1ConnectionListMetadata { + return true; } export function SqlV1ConnectionListMetadataFromJSON(json: any): SqlV1ConnectionListMetadata { - return SqlV1ConnectionListMetadataFromJSONTyped(json, false); + return SqlV1ConnectionListMetadataFromJSONTyped(json, false); } -export function SqlV1ConnectionListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionListMetadata { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - next: json["next"] == null ? undefined : json["next"], - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - }; +export function SqlV1ConnectionListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionListMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + }; } export function SqlV1ConnectionListMetadataToJSON(json: any): SqlV1ConnectionListMetadata { - return SqlV1ConnectionListMetadataToJSONTyped(json, false); + return SqlV1ConnectionListMetadataToJSONTyped(json, false); } -export function SqlV1ConnectionListMetadataToJSONTyped( - value?: SqlV1ConnectionListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionListMetadataToJSONTyped(value?: SqlV1ConnectionListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - first: value["first"], - last: value["last"], - prev: value["prev"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts b/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts index d525d9d8b7..41892b42f2 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts @@ -5,105 +5,102 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SqlV1ConnectionMetadata */ export interface SqlV1ConnectionMetadata { - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1ConnectionMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1ConnectionMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - resource_version?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - resource_name?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ConnectionMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ConnectionMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + resource_name?: any | null; } /** * Check if a given object implements the SqlV1ConnectionMetadata interface. */ export function instanceOfSqlV1ConnectionMetadata(value: object): value is SqlV1ConnectionMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function SqlV1ConnectionMetadataFromJSON(json: any): SqlV1ConnectionMetadata { - return SqlV1ConnectionMetadataFromJSONTyped(json, false); + return SqlV1ConnectionMetadataFromJSONTyped(json, false); } -export function SqlV1ConnectionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - uid: json["uid"] == null ? undefined : json["uid"], - resource_version: json["resource_version"] == null ? undefined : json["resource_version"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - }; +export function SqlV1ConnectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + }; } export function SqlV1ConnectionMetadataToJSON(json: any): SqlV1ConnectionMetadata { - return SqlV1ConnectionMetadataToJSONTyped(json, false); + return SqlV1ConnectionMetadataToJSONTyped(json, false); } -export function SqlV1ConnectionMetadataToJSONTyped( - value?: SqlV1ConnectionMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionMetadataToJSONTyped(value?: SqlV1ConnectionMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), - updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), - uid: value["uid"], - resource_version: value["resource_version"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts b/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts index 74485abbf2..f1061ab184 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts @@ -5,21 +5,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionSpecAuthData } from "./SqlV1ConnectionSpecAuthData"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionSpecAuthData } from './SqlV1ConnectionSpecAuthData'; import { - SqlV1ConnectionSpecAuthDataFromJSON, - SqlV1ConnectionSpecAuthDataFromJSONTyped, - SqlV1ConnectionSpecAuthDataToJSON, - SqlV1ConnectionSpecAuthDataToJSONTyped, -} from "./SqlV1ConnectionSpecAuthData"; + SqlV1ConnectionSpecAuthDataFromJSON, + SqlV1ConnectionSpecAuthDataFromJSONTyped, + SqlV1ConnectionSpecAuthDataToJSON, + SqlV1ConnectionSpecAuthDataToJSONTyped, +} from './SqlV1ConnectionSpecAuthData'; /** * Encapsulates the model provider access details @@ -27,69 +27,63 @@ import { * @interface SqlV1ConnectionSpec */ export interface SqlV1ConnectionSpec { - /** - * The type of this connection. - * @type {string} - * @memberof SqlV1ConnectionSpec - */ - connection_type?: string; - /** - * The endpoint that is used to run model inferencing. - * @type {string} - * @memberof SqlV1ConnectionSpec - */ - endpoint?: string; - /** - * - * @type {SqlV1ConnectionSpecAuthData} - * @memberof SqlV1ConnectionSpec - */ - auth_data?: SqlV1ConnectionSpecAuthData; + /** + * The type of this connection. + * @type {string} + * @memberof SqlV1ConnectionSpec + */ + connection_type?: string; + /** + * The endpoint that is used to run model inferencing. + * @type {string} + * @memberof SqlV1ConnectionSpec + */ + endpoint?: string; + /** + * + * @type {SqlV1ConnectionSpecAuthData} + * @memberof SqlV1ConnectionSpec + */ + auth_data?: SqlV1ConnectionSpecAuthData; } /** * Check if a given object implements the SqlV1ConnectionSpec interface. */ export function instanceOfSqlV1ConnectionSpec(value: object): value is SqlV1ConnectionSpec { - return true; + return true; } export function SqlV1ConnectionSpecFromJSON(json: any): SqlV1ConnectionSpec { - return SqlV1ConnectionSpecFromJSONTyped(json, false); + return SqlV1ConnectionSpecFromJSONTyped(json, false); } -export function SqlV1ConnectionSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionSpec { - if (json == null) { - return json; - } - return { - connection_type: json["connection_type"] == null ? undefined : json["connection_type"], - endpoint: json["endpoint"] == null ? undefined : json["endpoint"], - auth_data: - json["auth_data"] == null - ? undefined - : SqlV1ConnectionSpecAuthDataFromJSON(json["auth_data"]), - }; +export function SqlV1ConnectionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionSpec { + if (json == null) { + return json; + } + return { + + 'connection_type': json['connection_type'] == null ? undefined : json['connection_type'], + 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], + 'auth_data': json['auth_data'] == null ? undefined : SqlV1ConnectionSpecAuthDataFromJSON(json['auth_data']), + }; } export function SqlV1ConnectionSpecToJSON(json: any): SqlV1ConnectionSpec { - return SqlV1ConnectionSpecToJSONTyped(json, false); + return SqlV1ConnectionSpecToJSONTyped(json, false); } -export function SqlV1ConnectionSpecToJSONTyped( - value?: SqlV1ConnectionSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionSpecToJSONTyped(value?: SqlV1ConnectionSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - connection_type: value["connection_type"], - endpoint: value["endpoint"], - auth_data: SqlV1ConnectionSpecAuthDataToJSON(value["auth_data"]), - }; + return { + + 'connection_type': value['connection_type'], + 'endpoint': value['endpoint'], + 'auth_data': SqlV1ConnectionSpecAuthDataToJSON(value['auth_data']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts b/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts index c6c4a22f96..a04848c41a 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts @@ -5,74 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { SqlV1PlaintextProvider } from "./SqlV1PlaintextProvider"; +import type { SqlV1PlaintextProvider } from './SqlV1PlaintextProvider'; import { - instanceOfSqlV1PlaintextProvider, - SqlV1PlaintextProviderFromJSON, - SqlV1PlaintextProviderFromJSONTyped, - SqlV1PlaintextProviderToJSON, -} from "./SqlV1PlaintextProvider"; + instanceOfSqlV1PlaintextProvider, + SqlV1PlaintextProviderFromJSON, + SqlV1PlaintextProviderFromJSONTyped, + SqlV1PlaintextProviderToJSON, +} from './SqlV1PlaintextProvider'; /** * @type SqlV1ConnectionSpecAuthData * The vendor specific authentication token details - * + * * The contents are stored as opaque bytes given in plaintext by an EnvAdmin. * In future, we would support more secure methods for distributing authentication tokens. - * + * * @export */ -export type SqlV1ConnectionSpecAuthData = { kind: "PlaintextProvider" } & SqlV1PlaintextProvider; +export type SqlV1ConnectionSpecAuthData = { kind: 'PlaintextProvider' } & SqlV1PlaintextProvider; export function SqlV1ConnectionSpecAuthDataFromJSON(json: any): SqlV1ConnectionSpecAuthData { - return SqlV1ConnectionSpecAuthDataFromJSONTyped(json, false); + return SqlV1ConnectionSpecAuthDataFromJSONTyped(json, false); } -export function SqlV1ConnectionSpecAuthDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionSpecAuthData { - if (json == null) { - return json; - } - switch (json["kind"]) { - case "PlaintextProvider": - return Object.assign({}, SqlV1PlaintextProviderFromJSONTyped(json, true), { - kind: "PlaintextProvider", - } as const); - default: - throw new Error( - `No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${json["kind"]}'`, - ); - } +export function SqlV1ConnectionSpecAuthDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionSpecAuthData { + if (json == null) { + return json; + } + switch (json['kind']) { + case 'PlaintextProvider': + return Object.assign({}, SqlV1PlaintextProviderFromJSONTyped(json, true), { kind: 'PlaintextProvider' } as const); + default: + throw new Error(`No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${json['kind']}'`); + } } export function SqlV1ConnectionSpecAuthDataToJSON(json: any): any { - return SqlV1ConnectionSpecAuthDataToJSONTyped(json, false); + return SqlV1ConnectionSpecAuthDataToJSONTyped(json, false); } -export function SqlV1ConnectionSpecAuthDataToJSONTyped( - value?: SqlV1ConnectionSpecAuthData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } - switch (value["kind"]) { - case "PlaintextProvider": - return Object.assign({}, SqlV1PlaintextProviderToJSON(value), { - kind: "PlaintextProvider", - } as const); - default: - throw new Error( - `No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${value["kind"]}'`, - ); - } +export function SqlV1ConnectionSpecAuthDataToJSONTyped(value?: SqlV1ConnectionSpecAuthData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['kind']) { + case 'PlaintextProvider': + return Object.assign({}, SqlV1PlaintextProviderToJSON(value), { kind: 'PlaintextProvider' } as const); + default: + throw new Error(`No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${value['kind']}'`); + } + } + diff --git a/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts b/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts index aeee99a29e..142354655c 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts @@ -5,77 +5,75 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The status of the Connection * @export * @interface SqlV1ConnectionStatus */ export interface SqlV1ConnectionStatus { - /** - * Describes the status of the connection: - * - * READY: The Connection is usable; - * - * UNREACHABLE: The Connection endpoint is unreachable; - * - * INVALID_AUTH: The Connection auth token is invalid; - * - * @type {string} - * @memberof SqlV1ConnectionStatus - */ - readonly phase: string; - /** - * Details about why connection transitioned into a given status. - * @type {string} - * @memberof SqlV1ConnectionStatus - */ - readonly detail?: string; + /** + * Describes the status of the connection: + * + * READY: The Connection is usable; + * + * UNREACHABLE: The Connection endpoint is unreachable; + * + * INVALID_AUTH: The Connection auth token is invalid; + * + * @type {string} + * @memberof SqlV1ConnectionStatus + */ + readonly phase: string; + /** + * Details about why connection transitioned into a given status. + * @type {string} + * @memberof SqlV1ConnectionStatus + */ + readonly detail?: string; } /** * Check if a given object implements the SqlV1ConnectionStatus interface. */ export function instanceOfSqlV1ConnectionStatus(value: object): value is SqlV1ConnectionStatus { - if (!("phase" in value) || value["phase"] === undefined) return false; - return true; + if (!('phase' in value) || value['phase'] === undefined) return false; + return true; } export function SqlV1ConnectionStatusFromJSON(json: any): SqlV1ConnectionStatus { - return SqlV1ConnectionStatusFromJSONTyped(json, false); + return SqlV1ConnectionStatusFromJSONTyped(json, false); } -export function SqlV1ConnectionStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ConnectionStatus { - if (json == null) { - return json; - } - return { - phase: json["phase"], - detail: json["detail"] == null ? undefined : json["detail"], - }; +export function SqlV1ConnectionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionStatus { + if (json == null) { + return json; + } + return { + + 'phase': json['phase'], + 'detail': json['detail'] == null ? undefined : json['detail'], + }; } export function SqlV1ConnectionStatusToJSON(json: any): SqlV1ConnectionStatus { - return SqlV1ConnectionStatusToJSONTyped(json, false); + return SqlV1ConnectionStatusToJSONTyped(json, false); } -export function SqlV1ConnectionStatusToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTable.ts b/src/clients/flinkSql/models/SqlV1MaterializedTable.ts new file mode 100644 index 0000000000..38a44af5db --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTable.ts @@ -0,0 +1,161 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableMetadata } from './SqlV1MaterializedTableMetadata'; +import { + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from './SqlV1MaterializedTableMetadata'; +import type { SqlV1MaterializedTableSpec } from './SqlV1MaterializedTableSpec'; +import { + SqlV1MaterializedTableSpecFromJSON, + SqlV1MaterializedTableSpecFromJSONTyped, + SqlV1MaterializedTableSpecToJSON, + SqlV1MaterializedTableSpecToJSONTyped, +} from './SqlV1MaterializedTableSpec'; +import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from './SqlV1MaterializedTableStatus'; + +/** + * Represents a Materialized Table resource. + * @export + * @interface SqlV1MaterializedTable + */ +export interface SqlV1MaterializedTable { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly api_version: SqlV1MaterializedTableApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly kind: SqlV1MaterializedTableKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof SqlV1MaterializedTable + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableSpec} + * @memberof SqlV1MaterializedTable + */ + spec: SqlV1MaterializedTableSpec; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof SqlV1MaterializedTable + */ + readonly status?: SqlV1MaterializedTableStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableKindEnum { + MaterializedTable = 'MaterializedTable' +} + + +/** + * Check if a given object implements the SqlV1MaterializedTable interface. + */ +export function instanceOfSqlV1MaterializedTable(value: object): value is SqlV1MaterializedTable { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableFromJSON(json: any): SqlV1MaterializedTable { + return SqlV1MaterializedTableFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTable { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1MaterializedTableMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': SqlV1MaterializedTableSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json['status']), + }; +} + +export function SqlV1MaterializedTableToJSON(json: any): SqlV1MaterializedTable { + return SqlV1MaterializedTableToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1MaterializedTableMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': SqlV1MaterializedTableSpecToJSON(value['spec']), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts new file mode 100644 index 0000000000..1d1d7e5735 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { SqlV1ComputedColumn } from './SqlV1ComputedColumn'; +import { + instanceOfSqlV1ComputedColumn, + SqlV1ComputedColumnFromJSON, + SqlV1ComputedColumnFromJSONTyped, + SqlV1ComputedColumnToJSON, +} from './SqlV1ComputedColumn'; +import type { SqlV1MetadataColumn } from './SqlV1MetadataColumn'; +import { + instanceOfSqlV1MetadataColumn, + SqlV1MetadataColumnFromJSON, + SqlV1MetadataColumnFromJSONTyped, + SqlV1MetadataColumnToJSON, +} from './SqlV1MetadataColumn'; +import type { SqlV1PhysicalColumn } from './SqlV1PhysicalColumn'; +import { + instanceOfSqlV1PhysicalColumn, + SqlV1PhysicalColumnFromJSON, + SqlV1PhysicalColumnFromJSONTyped, + SqlV1PhysicalColumnToJSON, +} from './SqlV1PhysicalColumn'; + +/** + * @type SqlV1MaterializedTableColumnDetails + * Details of a column in the Materialized Table. + * @export + */ +export type SqlV1MaterializedTableColumnDetails = { kind: 'Computed' } & SqlV1ComputedColumn | { kind: 'Metadata' } & SqlV1MetadataColumn | { kind: 'Physical' } & SqlV1PhysicalColumn; + +export function SqlV1MaterializedTableColumnDetailsFromJSON(json: any): SqlV1MaterializedTableColumnDetails { + return SqlV1MaterializedTableColumnDetailsFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableColumnDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableColumnDetails { + if (json == null) { + return json; + } + switch (json['kind']) { + case 'Computed': + return Object.assign({}, SqlV1ComputedColumnFromJSONTyped(json, true), { kind: 'Computed' } as const); + case 'Metadata': + return Object.assign({}, SqlV1MetadataColumnFromJSONTyped(json, true), { kind: 'Metadata' } as const); + case 'Physical': + return Object.assign({}, SqlV1PhysicalColumnFromJSONTyped(json, true), { kind: 'Physical' } as const); + default: + throw new Error(`No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${json['kind']}'`); + } +} + +export function SqlV1MaterializedTableColumnDetailsToJSON(json: any): any { + return SqlV1MaterializedTableColumnDetailsToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableColumnDetailsToJSONTyped(value?: SqlV1MaterializedTableColumnDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + switch (value['kind']) { + case 'Computed': + return Object.assign({}, SqlV1ComputedColumnToJSON(value), { kind: 'Computed' } as const); + case 'Metadata': + return Object.assign({}, SqlV1MetadataColumnToJSON(value), { kind: 'Metadata' } as const); + case 'Physical': + return Object.assign({}, SqlV1PhysicalColumnToJSON(value), { kind: 'Physical' } as const); + default: + throw new Error(`No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${value['kind']}'`); + } + +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts new file mode 100644 index 0000000000..475d8fa689 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * A constraint on the materialized table. + * @export + * @interface SqlV1MaterializedTableConstraint + */ +export interface SqlV1MaterializedTableConstraint { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableConstraint + */ + name?: string; + /** + * The type of constraint. + * @type {string} + * @memberof SqlV1MaterializedTableConstraint + */ + kind?: string; + /** + * + * @type {Array} + * @memberof SqlV1MaterializedTableConstraint + */ + column_names?: Array; + /** + * Whether the constraint is enforced. + * @type {boolean} + * @memberof SqlV1MaterializedTableConstraint + */ + enforced?: boolean; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableConstraint interface. + */ +export function instanceOfSqlV1MaterializedTableConstraint(value: object): value is SqlV1MaterializedTableConstraint { + return true; +} + +export function SqlV1MaterializedTableConstraintFromJSON(json: any): SqlV1MaterializedTableConstraint { + return SqlV1MaterializedTableConstraintFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableConstraintFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableConstraint { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'column_names': json['column_names'] == null ? undefined : json['column_names'], + 'enforced': json['enforced'] == null ? undefined : json['enforced'], + }; +} + +export function SqlV1MaterializedTableConstraintToJSON(json: any): SqlV1MaterializedTableConstraint { + return SqlV1MaterializedTableConstraintToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableConstraintToJSONTyped(value?: SqlV1MaterializedTableConstraint | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'kind': value['kind'], + 'column_names': value['column_names'], + 'enforced': value['enforced'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts new file mode 100644 index 0000000000..ce9087365f --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Distribution (bucket by) strategy. + * @export + * @interface SqlV1MaterializedTableDistribution + */ +export interface SqlV1MaterializedTableDistribution { + /** + * + * @type {Array} + * @memberof SqlV1MaterializedTableDistribution + */ + column_names?: Array; + /** + * The number of buckets. + * @type {number} + * @memberof SqlV1MaterializedTableDistribution + */ + buckets?: number; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableDistribution interface. + */ +export function instanceOfSqlV1MaterializedTableDistribution(value: object): value is SqlV1MaterializedTableDistribution { + return true; +} + +export function SqlV1MaterializedTableDistributionFromJSON(json: any): SqlV1MaterializedTableDistribution { + return SqlV1MaterializedTableDistributionFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableDistributionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableDistribution { + if (json == null) { + return json; + } + return { + + 'column_names': json['column_names'] == null ? undefined : json['column_names'], + 'buckets': json['buckets'] == null ? undefined : json['buckets'], + }; +} + +export function SqlV1MaterializedTableDistributionToJSON(json: any): SqlV1MaterializedTableDistribution { + return SqlV1MaterializedTableDistributionToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableDistributionToJSONTyped(value?: SqlV1MaterializedTableDistribution | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'column_names': value['column_names'], + 'buckets': value['buckets'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts new file mode 100644 index 0000000000..b8a298fefb --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTable } from './SqlV1MaterializedTable'; +import { + SqlV1MaterializedTableFromJSON, + SqlV1MaterializedTableFromJSONTyped, + SqlV1MaterializedTableToJSON, + SqlV1MaterializedTableToJSONTyped, +} from './SqlV1MaterializedTable'; +import type { ListMeta } from './ListMeta'; +import { + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from './ListMeta'; + +/** + * A list of Materialized Table resources. + * @export + * @interface SqlV1MaterializedTableList + */ +export interface SqlV1MaterializedTableList { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableList + */ + readonly api_version: SqlV1MaterializedTableListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableList + */ + readonly kind: SqlV1MaterializedTableListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1MaterializedTableList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1MaterializedTableList + */ + data: Set; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableListApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableListKindEnum { + MaterializedTableList = 'MaterializedTableList' +} + + +/** + * Check if a given object implements the SqlV1MaterializedTableList interface. + */ +export function instanceOfSqlV1MaterializedTableList(value: object): value is SqlV1MaterializedTableList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableListFromJSON(json: any): SqlV1MaterializedTableList { + return SqlV1MaterializedTableListFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ListMetaFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(SqlV1MaterializedTableFromJSON))), + }; +} + +export function SqlV1MaterializedTableListToJSON(json: any): SqlV1MaterializedTableList { + return SqlV1MaterializedTableListToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': ListMetaToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(SqlV1MaterializedTableToJSON)), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts new file mode 100644 index 0000000000..e4ef072b93 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SqlV1MaterializedTableMetadata + */ +export interface SqlV1MaterializedTableMetadata { + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + resource_name?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableMetadata + */ + labels?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableMetadata interface. + */ +export function instanceOfSqlV1MaterializedTableMetadata(value: object): value is SqlV1MaterializedTableMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableMetadataFromJSON(json: any): SqlV1MaterializedTableMetadata { + return SqlV1MaterializedTableMetadataFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'labels': json['labels'] == null ? undefined : json['labels'], + }; +} + +export function SqlV1MaterializedTableMetadataToJSON(json: any): SqlV1MaterializedTableMetadata { + return SqlV1MaterializedTableMetadataToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableMetadataToJSONTyped(value?: SqlV1MaterializedTableMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + 'resource_name': value['resource_name'], + 'labels': value['labels'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts new file mode 100644 index 0000000000..24815e262d --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts @@ -0,0 +1,174 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableWatermark } from './SqlV1MaterializedTableWatermark'; +import { + SqlV1MaterializedTableWatermarkFromJSON, + SqlV1MaterializedTableWatermarkFromJSONTyped, + SqlV1MaterializedTableWatermarkToJSON, + SqlV1MaterializedTableWatermarkToJSONTyped, +} from './SqlV1MaterializedTableWatermark'; +import type { SqlV1MaterializedTableConstraint } from './SqlV1MaterializedTableConstraint'; +import { + SqlV1MaterializedTableConstraintFromJSON, + SqlV1MaterializedTableConstraintFromJSONTyped, + SqlV1MaterializedTableConstraintToJSON, + SqlV1MaterializedTableConstraintToJSONTyped, +} from './SqlV1MaterializedTableConstraint'; +import type { SqlV1MaterializedTableDistribution } from './SqlV1MaterializedTableDistribution'; +import { + SqlV1MaterializedTableDistributionFromJSON, + SqlV1MaterializedTableDistributionFromJSONTyped, + SqlV1MaterializedTableDistributionToJSON, + SqlV1MaterializedTableDistributionToJSONTyped, +} from './SqlV1MaterializedTableDistribution'; +import type { SqlV1MaterializedTableColumnDetails } from './SqlV1MaterializedTableColumnDetails'; +import { + SqlV1MaterializedTableColumnDetailsFromJSON, + SqlV1MaterializedTableColumnDetailsFromJSONTyped, + SqlV1MaterializedTableColumnDetailsToJSON, + SqlV1MaterializedTableColumnDetailsToJSONTyped, +} from './SqlV1MaterializedTableColumnDetails'; + +/** + * The specifications of the Materialized Table. + * @export + * @interface SqlV1MaterializedTableSpec + */ +export interface SqlV1MaterializedTableSpec { + /** + * The ID of Kafka cluster hosting the Materialized Table's topic. Populated from the `kafka_cluster_id` path parameter on creation. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + readonly kafka_cluster_id?: string; + /** + * The id associated with the compute pool in context. + * If not specified, the materialized table will use the default compute pool. The default pool is automatically determined by the system. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + compute_pool_id?: string; + /** + * The id of a principal this Materialized Table query runs as. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + principal?: string; + /** + * Indicates whether the Materialized Table query should be stopped. + * @type {boolean} + * @memberof SqlV1MaterializedTableSpec + */ + stopped?: boolean; + /** + * Defines configuration properties for the table, equivalent to the SQL 'WITH' clause + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableSpec + */ + table_options?: { [key: string]: string; }; + /** + * Session configurations equivalent to the SQL 'SET' statement. + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableSpec + */ + session_options?: { [key: string]: string; }; + /** + * Details of each column in Materialized Table resource. If columns are not specified, we infer from query. If it's specified it must be compatible with the types in the query. + * @type {Array} + * @memberof SqlV1MaterializedTableSpec + */ + columns?: Array; + /** + * + * @type {SqlV1MaterializedTableWatermark} + * @memberof SqlV1MaterializedTableSpec + */ + watermark?: SqlV1MaterializedTableWatermark; + /** + * Specify table constraints. + * @type {Array} + * @memberof SqlV1MaterializedTableSpec + */ + constraints?: Array; + /** + * + * @type {SqlV1MaterializedTableDistribution} + * @memberof SqlV1MaterializedTableSpec + */ + distributed_by?: SqlV1MaterializedTableDistribution; + /** + * Contains the query section (usually starting with a SELECT) of the latest Materialized Table. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + query?: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableSpec interface. + */ +export function instanceOfSqlV1MaterializedTableSpec(value: object): value is SqlV1MaterializedTableSpec { + return true; +} + +export function SqlV1MaterializedTableSpecFromJSON(json: any): SqlV1MaterializedTableSpec { + return SqlV1MaterializedTableSpecFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableSpec { + if (json == null) { + return json; + } + return { + + 'kafka_cluster_id': json['kafka_cluster_id'] == null ? undefined : json['kafka_cluster_id'], + 'compute_pool_id': json['compute_pool_id'] == null ? undefined : json['compute_pool_id'], + 'principal': json['principal'] == null ? undefined : json['principal'], + 'stopped': json['stopped'] == null ? undefined : json['stopped'], + 'table_options': json['table_options'] == null ? undefined : json['table_options'], + 'session_options': json['session_options'] == null ? undefined : json['session_options'], + 'columns': json['columns'] == null ? undefined : ((json['columns'] as Array).map(SqlV1MaterializedTableColumnDetailsFromJSON)), + 'watermark': json['watermark'] == null ? undefined : SqlV1MaterializedTableWatermarkFromJSON(json['watermark']), + 'constraints': json['constraints'] == null ? undefined : ((json['constraints'] as Array).map(SqlV1MaterializedTableConstraintFromJSON)), + 'distributed_by': json['distributed_by'] == null ? undefined : SqlV1MaterializedTableDistributionFromJSON(json['distributed_by']), + 'query': json['query'] == null ? undefined : json['query'], + }; +} + +export function SqlV1MaterializedTableSpecToJSON(json: any): SqlV1MaterializedTableSpec { + return SqlV1MaterializedTableSpecToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableSpecToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'compute_pool_id': value['compute_pool_id'], + 'principal': value['principal'], + 'stopped': value['stopped'], + 'table_options': value['table_options'], + 'session_options': value['session_options'], + 'columns': value['columns'] == null ? undefined : ((value['columns'] as Array).map(SqlV1MaterializedTableColumnDetailsToJSON)), + 'watermark': SqlV1MaterializedTableWatermarkToJSON(value['watermark']), + 'constraints': value['constraints'] == null ? undefined : ((value['constraints'] as Array).map(SqlV1MaterializedTableConstraintToJSON)), + 'distributed_by': SqlV1MaterializedTableDistributionToJSON(value['distributed_by']), + 'query': value['query'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts new file mode 100644 index 0000000000..8f87b115f6 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ScalingStatus } from './SqlV1ScalingStatus'; +import { + SqlV1ScalingStatusFromJSON, + SqlV1ScalingStatusFromJSONTyped, + SqlV1ScalingStatusToJSON, + SqlV1ScalingStatusToJSONTyped, +} from './SqlV1ScalingStatus'; +import type { SqlV1StatementWarning } from './SqlV1StatementWarning'; +import { + SqlV1StatementWarningFromJSON, + SqlV1StatementWarningFromJSONTyped, + SqlV1StatementWarningToJSON, + SqlV1StatementWarningToJSONTyped, +} from './SqlV1StatementWarning'; + +/** + * The status of the Materialized Table. + * @export + * @interface SqlV1MaterializedTableStatus + */ +export interface SqlV1MaterializedTableStatus { + /** + * The lifecycle phase of the materialized table. + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + phase?: string; + /** + * Optional. Human-readable description of phase. + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + detail?: string; + /** + * List of warnings encountered during materialized table execution. + * @type {Array} + * @memberof SqlV1MaterializedTableStatus + */ + warnings?: Array; + /** + * Entire Materialized Table statement as submitted by user e.g CREATE OR ALTER MATERIALIZED TABLE ... + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + creation_statement?: string; + /** + * + * @type {SqlV1ScalingStatus} + * @memberof SqlV1MaterializedTableStatus + */ + scaling_status?: SqlV1ScalingStatus; + /** + * Represents the evolution history of the Materialized Table. The current value indicates the latest version. + * @type {number} + * @memberof SqlV1MaterializedTableStatus + */ + version?: number; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableStatus interface. + */ +export function instanceOfSqlV1MaterializedTableStatus(value: object): value is SqlV1MaterializedTableStatus { + return true; +} + +export function SqlV1MaterializedTableStatusFromJSON(json: any): SqlV1MaterializedTableStatus { + return SqlV1MaterializedTableStatusFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableStatus { + if (json == null) { + return json; + } + return { + + 'phase': json['phase'] == null ? undefined : json['phase'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(SqlV1StatementWarningFromJSON)), + 'creation_statement': json['creation_statement'] == null ? undefined : json['creation_statement'], + 'scaling_status': json['scaling_status'] == null ? undefined : SqlV1ScalingStatusFromJSON(json['scaling_status']), + 'version': json['version'] == null ? undefined : json['version'], + }; +} + +export function SqlV1MaterializedTableStatusToJSON(json: any): SqlV1MaterializedTableStatus { + return SqlV1MaterializedTableStatusToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableStatusToJSONTyped(value?: SqlV1MaterializedTableStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'phase': value['phase'], + 'detail': value['detail'], + 'warnings': value['warnings'] == null ? undefined : ((value['warnings'] as Array).map(SqlV1StatementWarningToJSON)), + 'creation_statement': value['creation_statement'], + 'scaling_status': SqlV1ScalingStatusToJSON(value['scaling_status']), + 'version': value['version'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts new file mode 100644 index 0000000000..b29b870ae0 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts @@ -0,0 +1,148 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableVersionSpec } from './SqlV1MaterializedTableVersionSpec'; +import { + SqlV1MaterializedTableVersionSpecFromJSON, + SqlV1MaterializedTableVersionSpecFromJSONTyped, + SqlV1MaterializedTableVersionSpecToJSON, + SqlV1MaterializedTableVersionSpecToJSONTyped, +} from './SqlV1MaterializedTableVersionSpec'; +import type { SqlV1MaterializedTableVersionMetadata } from './SqlV1MaterializedTableVersionMetadata'; +import { + SqlV1MaterializedTableVersionMetadataFromJSON, + SqlV1MaterializedTableVersionMetadataFromJSONTyped, + SqlV1MaterializedTableVersionMetadataToJSON, + SqlV1MaterializedTableVersionMetadataToJSONTyped, +} from './SqlV1MaterializedTableVersionMetadata'; + +/** + * Represents a specific version of a Materialized Table resource. + * @export + * @interface SqlV1MaterializedTableVersion + */ +export interface SqlV1MaterializedTableVersion { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly api_version: SqlV1MaterializedTableVersionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly kind: SqlV1MaterializedTableVersionKindEnum; + /** + * + * @type {SqlV1MaterializedTableVersionMetadata} + * @memberof SqlV1MaterializedTableVersion + */ + metadata: SqlV1MaterializedTableVersionMetadata; + /** + * The resource version name, unique within the Kafka cluster. + * Name conforms to DNS Subdomain (RFC 1123). + * + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableVersionSpec} + * @memberof SqlV1MaterializedTableVersion + */ + spec: SqlV1MaterializedTableVersionSpec; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableVersionApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableVersionKindEnum { + MaterializedTableVersion = 'MaterializedTableVersion' +} + + +/** + * Check if a given object implements the SqlV1MaterializedTableVersion interface. + */ +export function instanceOfSqlV1MaterializedTableVersion(value: object): value is SqlV1MaterializedTableVersion { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionFromJSON(json: any): SqlV1MaterializedTableVersion { + return SqlV1MaterializedTableVersionFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersion { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1MaterializedTableVersionMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': SqlV1MaterializedTableVersionSpecFromJSON(json['spec']), + }; +} + +export function SqlV1MaterializedTableVersionToJSON(json: any): SqlV1MaterializedTableVersion { + return SqlV1MaterializedTableVersionToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1MaterializedTableVersionMetadataToJSON(value['metadata']), + 'spec': SqlV1MaterializedTableVersionSpecToJSON(value['spec']), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts new file mode 100644 index 0000000000..2b7ad39435 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableVersion } from './SqlV1MaterializedTableVersion'; +import { + SqlV1MaterializedTableVersionFromJSON, + SqlV1MaterializedTableVersionFromJSONTyped, + SqlV1MaterializedTableVersionToJSON, + SqlV1MaterializedTableVersionToJSONTyped, +} from './SqlV1MaterializedTableVersion'; +import type { ListMeta } from './ListMeta'; +import { + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from './ListMeta'; + +/** + * A list of Materialized Table Version resources. + * @export + * @interface SqlV1MaterializedTableVersionList + */ +export interface SqlV1MaterializedTableVersionList { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionList + */ + readonly api_version: SqlV1MaterializedTableVersionListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionList + */ + readonly kind: SqlV1MaterializedTableVersionListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1MaterializedTableVersionList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1MaterializedTableVersionList + */ + data: Set; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableVersionListApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1MaterializedTableVersionListKindEnum { + MaterializedTableVersionList = 'MaterializedTableVersionList' +} + + +/** + * Check if a given object implements the SqlV1MaterializedTableVersionList interface. + */ +export function instanceOfSqlV1MaterializedTableVersionList(value: object): value is SqlV1MaterializedTableVersionList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionListFromJSON(json: any): SqlV1MaterializedTableVersionList { + return SqlV1MaterializedTableVersionListFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersionList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ListMetaFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(SqlV1MaterializedTableVersionFromJSON))), + }; +} + +export function SqlV1MaterializedTableVersionListToJSON(json: any): SqlV1MaterializedTableVersionList { + return SqlV1MaterializedTableVersionListToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': ListMetaToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(SqlV1MaterializedTableVersionToJSON)), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts new file mode 100644 index 0000000000..46df9831e2 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SqlV1MaterializedTableVersionMetadata + */ +export interface SqlV1MaterializedTableVersionMetadata { + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + resource_version?: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableVersionMetadata interface. + */ +export function instanceOfSqlV1MaterializedTableVersionMetadata(value: object): value is SqlV1MaterializedTableVersionMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionMetadataFromJSON(json: any): SqlV1MaterializedTableVersionMetadata { + return SqlV1MaterializedTableVersionMetadataFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + }; +} + +export function SqlV1MaterializedTableVersionMetadataToJSON(json: any): SqlV1MaterializedTableVersionMetadata { + return SqlV1MaterializedTableVersionMetadataToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionMetadataToJSONTyped(value?: SqlV1MaterializedTableVersionMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts new file mode 100644 index 0000000000..a108bf7e34 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ResourceChange } from './SqlV1ResourceChange'; +import { + SqlV1ResourceChangeFromJSON, + SqlV1ResourceChangeFromJSONTyped, + SqlV1ResourceChangeToJSON, + SqlV1ResourceChangeToJSONTyped, +} from './SqlV1ResourceChange'; + +/** + * The specifications of the Materialized Table Version. + * @export + * @interface SqlV1MaterializedTableVersionSpec + */ +export interface SqlV1MaterializedTableVersionSpec { + /** + * The version number of the Materialized Table. + * @type {number} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly version: number; + /** + * The full SQL statement for the materialized table as generated by SHOW CREATE MATERIALIZED TABLE at the time of the evolution. + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly statement: string; + /** + * Changes affecting resources since the previous version. + * @type {Array} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly changes?: Array; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableVersionSpec interface. + */ +export function instanceOfSqlV1MaterializedTableVersionSpec(value: object): value is SqlV1MaterializedTableVersionSpec { + if (!('version' in value) || value['version'] === undefined) return false; + if (!('statement' in value) || value['statement'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionSpecFromJSON(json: any): SqlV1MaterializedTableVersionSpec { + return SqlV1MaterializedTableVersionSpecFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersionSpec { + if (json == null) { + return json; + } + return { + + 'version': json['version'], + 'statement': json['statement'], + 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(SqlV1ResourceChangeFromJSON)), + }; +} + +export function SqlV1MaterializedTableVersionSpecToJSON(json: any): SqlV1MaterializedTableVersionSpec { + return SqlV1MaterializedTableVersionSpecToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionSpecToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts new file mode 100644 index 0000000000..83e8c6b639 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Represents a non-fatal issue encountered during materialized table processing. + * @export + * @interface SqlV1MaterializedTableWarning + */ +export interface SqlV1MaterializedTableWarning { + /** + * Indicates the severity of the warning. + * + * LOW: Indicates a low severity warning and for informing the user. + * + * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + * + * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + * + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + severity: string; + /** + * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableWarning + */ + readonly created_at: Date; + /** + * A machine-readable short, upper case summary delimited by underscore. + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + reason: string; + /** + * A human-readable string containing the description of the warning. + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + message: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableWarning interface. + */ +export function instanceOfSqlV1MaterializedTableWarning(value: object): value is SqlV1MaterializedTableWarning { + if (!('severity' in value) || value['severity'] === undefined) return false; + if (!('created_at' in value) || value['created_at'] === undefined) return false; + if (!('reason' in value) || value['reason'] === undefined) return false; + if (!('message' in value) || value['message'] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableWarningFromJSON(json: any): SqlV1MaterializedTableWarning { + return SqlV1MaterializedTableWarningFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableWarning { + if (json == null) { + return json; + } + return { + + 'severity': json['severity'], + 'created_at': (new Date(json['created_at'])), + 'reason': json['reason'], + 'message': json['message'], + }; +} + +export function SqlV1MaterializedTableWarningToJSON(json: any): SqlV1MaterializedTableWarning { + return SqlV1MaterializedTableWarningToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWarningToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'severity': value['severity'], + 'reason': value['reason'], + 'message': value['message'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts new file mode 100644 index 0000000000..43fa9c97f6 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Watermark strategy for the Materialized Table resource. + * @export + * @interface SqlV1MaterializedTableWatermark + */ +export interface SqlV1MaterializedTableWatermark { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableWatermark + */ + column_name?: string; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableWatermark + */ + expression?: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableWatermark interface. + */ +export function instanceOfSqlV1MaterializedTableWatermark(value: object): value is SqlV1MaterializedTableWatermark { + return true; +} + +export function SqlV1MaterializedTableWatermarkFromJSON(json: any): SqlV1MaterializedTableWatermark { + return SqlV1MaterializedTableWatermarkFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWatermarkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableWatermark { + if (json == null) { + return json; + } + return { + + 'column_name': json['column_name'] == null ? undefined : json['column_name'], + 'expression': json['expression'] == null ? undefined : json['expression'], + }; +} + +export function SqlV1MaterializedTableWatermarkToJSON(json: any): SqlV1MaterializedTableWatermark { + return SqlV1MaterializedTableWatermarkToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWatermarkToJSONTyped(value?: SqlV1MaterializedTableWatermark | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'column_name': value['column_name'], + 'expression': value['expression'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1MetadataColumn.ts b/src/clients/flinkSql/models/SqlV1MetadataColumn.ts new file mode 100644 index 0000000000..646c138b42 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MetadataColumn.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Metadata columns reference system properties. + * @export + * @interface SqlV1MetadataColumn + */ +export interface SqlV1MetadataColumn { + /** + * + * @type {any} + * @memberof SqlV1MetadataColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1MetadataColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + kind: SqlV1MetadataColumnKindEnum; + /** + * The system metadata key to reference. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + metadata_key: string; + /** + * Indicates if the metadata column is virtual. + * @type {boolean} + * @memberof SqlV1MetadataColumn + */ + virtual?: boolean; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1MetadataColumnKindEnum { + Metadata = 'Metadata' +} + + +/** + * Check if a given object implements the SqlV1MetadataColumn interface. + */ +export function instanceOfSqlV1MetadataColumn(value: object): value is SqlV1MetadataColumn { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata_key' in value) || value['metadata_key'] === undefined) return false; + return true; +} + +export function SqlV1MetadataColumnFromJSON(json: any): SqlV1MetadataColumn { + return SqlV1MetadataColumnFromJSONTyped(json, false); +} + +export function SqlV1MetadataColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MetadataColumn { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': json['type'], + 'comment': json['comment'] == null ? undefined : json['comment'], + 'kind': json['kind'], + 'metadata_key': json['metadata_key'], + 'virtual': json['virtual'] == null ? undefined : json['virtual'], + }; +} + +export function SqlV1MetadataColumnToJSON(json: any): SqlV1MetadataColumn { + return SqlV1MetadataColumnToJSONTyped(json, false); +} + +export function SqlV1MetadataColumnToJSONTyped(value?: SqlV1MetadataColumn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': value['type'], + 'comment': value['comment'], + 'kind': value['kind'], + 'metadata_key': value['metadata_key'], + 'virtual': value['virtual'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts b/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts new file mode 100644 index 0000000000..659310de5f --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts @@ -0,0 +1,101 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Physical columns define the structure of the table and the data types of its fields. + * @export + * @interface SqlV1PhysicalColumn + */ +export interface SqlV1PhysicalColumn { + /** + * + * @type {any} + * @memberof SqlV1PhysicalColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1PhysicalColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1PhysicalColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1PhysicalColumn + */ + kind: SqlV1PhysicalColumnKindEnum; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1PhysicalColumnKindEnum { + Physical = 'Physical' +} + + +/** + * Check if a given object implements the SqlV1PhysicalColumn interface. + */ +export function instanceOfSqlV1PhysicalColumn(value: object): value is SqlV1PhysicalColumn { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + return true; +} + +export function SqlV1PhysicalColumnFromJSON(json: any): SqlV1PhysicalColumn { + return SqlV1PhysicalColumnFromJSONTyped(json, false); +} + +export function SqlV1PhysicalColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1PhysicalColumn { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': json['type'], + 'comment': json['comment'] == null ? undefined : json['comment'], + 'kind': json['kind'], + }; +} + +export function SqlV1PhysicalColumnToJSON(json: any): SqlV1PhysicalColumn { + return SqlV1PhysicalColumnToJSONTyped(json, false); +} + +export function SqlV1PhysicalColumnToJSONTyped(value?: SqlV1PhysicalColumn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'type': value['type'], + 'comment': value['comment'], + 'kind': value['kind'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts b/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts index 88c7463d64..5d3c0db954 100644 --- a/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts +++ b/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts @@ -5,91 +5,89 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Describes a sensitive piece of information passed in plaintext. - * + * * Confluent only accepts authentication tokens of supported model providers from OrgAdmins and EnvAdmins. * For now, only 'PlainText' provider is supported. It stores authentication token details as opaque bytes in an encrypted form. * This option offers limited security as it only provides a single level of encryption. - * + * * @export * @interface SqlV1PlaintextProvider */ export interface SqlV1PlaintextProvider { - /** - * Plaintext Provider Kind Type - * - * @type {string} - * @memberof SqlV1PlaintextProvider - */ - kind?: SqlV1PlaintextProviderKindEnum; - /** - * Authentication token in plaintext JSON string. - * For composite tokens, provide them as JSON. - * This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. - * - * Scoped to an endpoint of a `Connection` resource. - * - * @type {string} - * @memberof SqlV1PlaintextProvider - */ - data?: string; + /** + * Plaintext Provider Kind Type + * + * @type {string} + * @memberof SqlV1PlaintextProvider + */ + kind?: SqlV1PlaintextProviderKindEnum; + /** + * Authentication token in plaintext JSON string. + * For composite tokens, provide them as JSON. + * This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. + * + * Scoped to an endpoint of a `Connection` resource. + * + * @type {string} + * @memberof SqlV1PlaintextProvider + */ + data?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1PlaintextProviderKindEnum { - PlaintextProvider = "PlaintextProvider", + PlaintextProvider = 'PlaintextProvider' } + /** * Check if a given object implements the SqlV1PlaintextProvider interface. */ export function instanceOfSqlV1PlaintextProvider(value: object): value is SqlV1PlaintextProvider { - return true; + return true; } export function SqlV1PlaintextProviderFromJSON(json: any): SqlV1PlaintextProvider { - return SqlV1PlaintextProviderFromJSONTyped(json, false); + return SqlV1PlaintextProviderFromJSONTyped(json, false); } -export function SqlV1PlaintextProviderFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1PlaintextProvider { - if (json == null) { - return json; - } - return { - kind: json["kind"] == null ? undefined : json["kind"], - data: json["data"] == null ? undefined : json["data"], - }; +export function SqlV1PlaintextProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1PlaintextProvider { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'] == null ? undefined : json['kind'], + 'data': json['data'] == null ? undefined : json['data'], + }; } export function SqlV1PlaintextProviderToJSON(json: any): SqlV1PlaintextProvider { - return SqlV1PlaintextProviderToJSONTyped(json, false); + return SqlV1PlaintextProviderToJSONTyped(json, false); } -export function SqlV1PlaintextProviderToJSONTyped( - value?: SqlV1PlaintextProvider | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1PlaintextProviderToJSONTyped(value?: SqlV1PlaintextProvider | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - data: value["data"], - }; + return { + + 'kind': value['kind'], + 'data': value['data'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ResourceChange.ts b/src/clients/flinkSql/models/SqlV1ResourceChange.ts new file mode 100644 index 0000000000..113ed20ac5 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ResourceChange.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Details of a change to a specific resource. + * @export + * @interface SqlV1ResourceChange + */ +export interface SqlV1ResourceChange { + /** + * The type of resource that was changed. + * @type {string} + * @memberof SqlV1ResourceChange + */ + kind: string; + /** + * The environment containing the resource. Can be either the environment name or ID, depending on how it is referenced in the SQL statement text. + * @type {string} + * @memberof SqlV1ResourceChange + */ + environment_locator: string; + /** + * The database containing the resource. Can be either the database name or ID, depending on how it is referenced in the SQL statement text. + * @type {string} + * @memberof SqlV1ResourceChange + */ + database_locator: string; + /** + * The name of the resource, unique within its scope (environment and database). + * @type {string} + * @memberof SqlV1ResourceChange + */ + name: string; + /** + * Human-readable descriptions of the changes made to this resource. + * @type {Array} + * @memberof SqlV1ResourceChange + */ + details: Array; +} + +/** + * Check if a given object implements the SqlV1ResourceChange interface. + */ +export function instanceOfSqlV1ResourceChange(value: object): value is SqlV1ResourceChange { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('environment_locator' in value) || value['environment_locator'] === undefined) return false; + if (!('database_locator' in value) || value['database_locator'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('details' in value) || value['details'] === undefined) return false; + return true; +} + +export function SqlV1ResourceChangeFromJSON(json: any): SqlV1ResourceChange { + return SqlV1ResourceChangeFromJSONTyped(json, false); +} + +export function SqlV1ResourceChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ResourceChange { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'environment_locator': json['environment_locator'], + 'database_locator': json['database_locator'], + 'name': json['name'], + 'details': json['details'], + }; +} + +export function SqlV1ResourceChangeToJSON(json: any): SqlV1ResourceChange { + return SqlV1ResourceChangeToJSONTyped(json, false); +} + +export function SqlV1ResourceChangeToJSONTyped(value?: SqlV1ResourceChange | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'environment_locator': value['environment_locator'], + 'database_locator': value['database_locator'], + 'name': value['name'], + 'details': value['details'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ResultSchema.ts b/src/clients/flinkSql/models/SqlV1ResultSchema.ts index 01fee03f94..0dfe79ecf9 100644 --- a/src/clients/flinkSql/models/SqlV1ResultSchema.ts +++ b/src/clients/flinkSql/models/SqlV1ResultSchema.ts @@ -5,21 +5,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ColumnDetails } from "./ColumnDetails"; +import { mapValues } from '../runtime'; +import type { ColumnDetails } from './ColumnDetails'; import { - ColumnDetailsFromJSON, - ColumnDetailsFromJSONTyped, - ColumnDetailsToJSON, - ColumnDetailsToJSONTyped, -} from "./ColumnDetails"; + ColumnDetailsFromJSON, + ColumnDetailsFromJSONTyped, + ColumnDetailsToJSON, + ColumnDetailsToJSONTyped, +} from './ColumnDetails'; /** * The table columns of the results schema. @@ -27,56 +27,47 @@ import { * @interface SqlV1ResultSchema */ export interface SqlV1ResultSchema { - /** - * The properties of each SQL column in the schema. - * @type {Array} - * @memberof SqlV1ResultSchema - */ - columns?: Array; + /** + * The properties of each SQL column in the schema. + * @type {Array} + * @memberof SqlV1ResultSchema + */ + columns?: Array; } /** * Check if a given object implements the SqlV1ResultSchema interface. */ export function instanceOfSqlV1ResultSchema(value: object): value is SqlV1ResultSchema { - return true; + return true; } export function SqlV1ResultSchemaFromJSON(json: any): SqlV1ResultSchema { - return SqlV1ResultSchemaFromJSONTyped(json, false); + return SqlV1ResultSchemaFromJSONTyped(json, false); } -export function SqlV1ResultSchemaFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ResultSchema { - if (json == null) { - return json; - } - return { - columns: - json["columns"] == null - ? undefined - : (json["columns"] as Array).map(ColumnDetailsFromJSON), - }; +export function SqlV1ResultSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ResultSchema { + if (json == null) { + return json; + } + return { + + 'columns': json['columns'] == null ? undefined : ((json['columns'] as Array).map(ColumnDetailsFromJSON)), + }; } export function SqlV1ResultSchemaToJSON(json: any): SqlV1ResultSchema { - return SqlV1ResultSchemaToJSONTyped(json, false); + return SqlV1ResultSchemaToJSONTyped(json, false); } -export function SqlV1ResultSchemaToJSONTyped( - value?: SqlV1ResultSchema | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ResultSchemaToJSONTyped(value?: SqlV1ResultSchema | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - columns: - value["columns"] == null - ? undefined - : (value["columns"] as Array).map(ColumnDetailsToJSON), - }; + return { + + 'columns': value['columns'] == null ? undefined : ((value['columns'] as Array).map(ColumnDetailsToJSON)), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1ScalingStatus.ts b/src/clients/flinkSql/models/SqlV1ScalingStatus.ts index 4faf96527d..e2455c2610 100644 --- a/src/clients/flinkSql/models/SqlV1ScalingStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ScalingStatus.ts @@ -5,76 +5,74 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Scaling status for this statement. * @export * @interface SqlV1ScalingStatus */ export interface SqlV1ScalingStatus { - /** - * OK: The statement runs at the right scale. - * - * PENDING_SCALE_DOWN: The statement requires less resources, and will be scaled down in the near future. - * - * PENDING_SCALE_UP: The statement requires more resources, and will be scaled up in the near future. - * - * POOL_EXHAUSTED: The statement requires more resources, but not enough resources are available. - * - * @type {string} - * @memberof SqlV1ScalingStatus - */ - readonly scaling_state?: string; - /** - * The last time the scaling status was updated. - * @type {Date} - * @memberof SqlV1ScalingStatus - */ - readonly last_updated?: Date; + /** + * OK: The statement runs at the right scale. + * + * PENDING_SCALE_DOWN: The statement requires less resources, and will be scaled down in the near future. + * + * PENDING_SCALE_UP: The statement requires more resources, and will be scaled up in the near future. + * + * POOL_EXHAUSTED: The statement requires more resources, but not enough resources are available. + * + * @type {string} + * @memberof SqlV1ScalingStatus + */ + readonly scaling_state?: string; + /** + * The last time the scaling status was updated. + * @type {Date} + * @memberof SqlV1ScalingStatus + */ + readonly last_updated?: Date; } /** * Check if a given object implements the SqlV1ScalingStatus interface. */ export function instanceOfSqlV1ScalingStatus(value: object): value is SqlV1ScalingStatus { - return true; + return true; } export function SqlV1ScalingStatusFromJSON(json: any): SqlV1ScalingStatus { - return SqlV1ScalingStatusFromJSONTyped(json, false); + return SqlV1ScalingStatusFromJSONTyped(json, false); } -export function SqlV1ScalingStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1ScalingStatus { - if (json == null) { - return json; - } - return { - scaling_state: json["scaling_state"] == null ? undefined : json["scaling_state"], - last_updated: json["last_updated"] == null ? undefined : new Date(json["last_updated"]), - }; +export function SqlV1ScalingStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ScalingStatus { + if (json == null) { + return json; + } + return { + + 'scaling_state': json['scaling_state'] == null ? undefined : json['scaling_state'], + 'last_updated': json['last_updated'] == null ? undefined : (new Date(json['last_updated'])), + }; } export function SqlV1ScalingStatusToJSON(json: any): SqlV1ScalingStatus { - return SqlV1ScalingStatusToJSONTyped(json, false); + return SqlV1ScalingStatusToJSONTyped(json, false); } -export function SqlV1ScalingStatusToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1ScalingStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts b/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts new file mode 100644 index 0000000000..75f0ef83e6 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * State limit status for this statement. + * @export + * @interface SqlV1StateLimitStatus + */ +export interface SqlV1StateLimitStatus { + /** + * OK: The statement is within state limits. + * + * APPROACHING_SOFT_LIMIT: The statement is approaching soft state limits. + * + * EXCEEDING_SOFT_LIMIT: The statement is exceeding soft state limits. + * + * APPROACHING_HARD_LIMIT: The statement is approaching hard state limits. + * + * EXCEEDING_HARD_LIMIT: The statement is exceeding hard state limits. + * + * @type {string} + * @memberof SqlV1StateLimitStatus + */ + readonly state_limit_state?: string; + /** + * The last time the state limit status was updated. + * @type {Date} + * @memberof SqlV1StateLimitStatus + */ + readonly last_updated?: Date; + /** + * Details about why state limit status is in its current state. + * @type {string} + * @memberof SqlV1StateLimitStatus + */ + readonly detail?: string; +} + +/** + * Check if a given object implements the SqlV1StateLimitStatus interface. + */ +export function instanceOfSqlV1StateLimitStatus(value: object): value is SqlV1StateLimitStatus { + return true; +} + +export function SqlV1StateLimitStatusFromJSON(json: any): SqlV1StateLimitStatus { + return SqlV1StateLimitStatusFromJSONTyped(json, false); +} + +export function SqlV1StateLimitStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StateLimitStatus { + if (json == null) { + return json; + } + return { + + 'state_limit_state': json['state_limit_state'] == null ? undefined : json['state_limit_state'], + 'last_updated': json['last_updated'] == null ? undefined : (new Date(json['last_updated'])), + 'detail': json['detail'] == null ? undefined : json['detail'], + }; +} + +export function SqlV1StateLimitStatusToJSON(json: any): SqlV1StateLimitStatus { + return SqlV1StateLimitStatusToJSONTyped(json, false); +} + +export function SqlV1StateLimitStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1Statement.ts b/src/clients/flinkSql/models/SqlV1Statement.ts index 69be4e33cb..7631541176 100644 --- a/src/clients/flinkSql/models/SqlV1Statement.ts +++ b/src/clients/flinkSql/models/SqlV1Statement.ts @@ -5,42 +5,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from "./SqlV1StatementMetadata"; -import type { SqlV1StatementResult } from "./SqlV1StatementResult"; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from './SqlV1StatementMetadata'; +import type { SqlV1StatementResult } from './SqlV1StatementResult'; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from "./SqlV1StatementResult"; -import type { SqlV1StatementSpec } from "./SqlV1StatementSpec"; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from './SqlV1StatementResult'; +import type { SqlV1StatementSpec } from './SqlV1StatementSpec'; import { - SqlV1StatementSpecFromJSON, - SqlV1StatementSpecFromJSONTyped, - SqlV1StatementSpecToJSON, - SqlV1StatementSpecToJSONTyped, -} from "./SqlV1StatementSpec"; -import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; + SqlV1StatementSpecFromJSON, + SqlV1StatementSpecFromJSONTyped, + SqlV1StatementSpecToJSON, + SqlV1StatementSpecToJSONTyped, +} from './SqlV1StatementSpec'; +import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from "./SqlV1StatementStatus"; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from './SqlV1StatementStatus'; /** * `Statement` represents a core resource used to model SQL statements for execution. @@ -53,128 +53,125 @@ import { * @interface SqlV1Statement */ export interface SqlV1Statement { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1Statement - */ - readonly api_version?: SqlV1StatementApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1Statement - */ - readonly kind?: SqlV1StatementKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof SqlV1Statement - */ - metadata?: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1Statement - */ - name?: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1Statement - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1Statement - */ - environment_id?: string; - /** - * - * @type {SqlV1StatementSpec} - * @memberof SqlV1Statement - */ - spec?: SqlV1StatementSpec; - /** - * - * @type {SqlV1StatementStatus} - * @memberof SqlV1Statement - */ - status?: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof SqlV1Statement - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Statement + */ + readonly api_version?: SqlV1StatementApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Statement + */ + readonly kind?: SqlV1StatementKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof SqlV1Statement + */ + metadata?: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1Statement + */ + name?: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1Statement + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1Statement + */ + environment_id?: string; + /** + * + * @type {SqlV1StatementSpec} + * @memberof SqlV1Statement + */ + spec?: SqlV1StatementSpec; + /** + * + * @type {SqlV1StatementStatus} + * @memberof SqlV1Statement + */ + status?: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof SqlV1Statement + */ + result?: SqlV1StatementResult; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementKindEnum { - Statement = "Statement", + Statement = 'Statement' } + /** * Check if a given object implements the SqlV1Statement interface. */ export function instanceOfSqlV1Statement(value: object): value is SqlV1Statement { - return true; + return true; } export function SqlV1StatementFromJSON(json: any): SqlV1Statement { - return SqlV1StatementFromJSONTyped(json, false); + return SqlV1StatementFromJSONTyped(json, false); } -export function SqlV1StatementFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1Statement { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : SqlV1StatementMetadataFromJSON(json["metadata"]), - name: json["name"] == null ? undefined : json["name"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - spec: json["spec"] == null ? undefined : SqlV1StatementSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : SqlV1StatementStatusFromJSON(json["status"]), - result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), - }; +export function SqlV1StatementFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Statement { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1StatementMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'spec': json['spec'] == null ? undefined : SqlV1StatementSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1StatementStatusFromJSON(json['status']), + 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), + }; } export function SqlV1StatementToJSON(json: any): SqlV1Statement { - return SqlV1StatementToJSONTyped(json, false); + return SqlV1StatementToJSONTyped(json, false); } -export function SqlV1StatementToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1StatementMetadataToJSON(value["metadata"]), - name: value["name"], - organization_id: value["organization_id"], - environment_id: value["environment_id"], - spec: SqlV1StatementSpecToJSON(value["spec"]), - status: SqlV1StatementStatusToJSON(value["status"]), - result: SqlV1StatementResultToJSON(value["result"]), - }; + return { + + 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), + 'name': value['name'], + 'organization_id': value['organization_id'], + 'environment_id': value['environment_id'], + 'spec': SqlV1StatementSpecToJSON(value['spec']), + 'status': SqlV1StatementStatusToJSON(value['status']), + 'result': SqlV1StatementResultToJSON(value['result']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementException.ts b/src/clients/flinkSql/models/SqlV1StatementException.ts index b273b38c5b..913dff2334 100644 --- a/src/clients/flinkSql/models/SqlV1StatementException.ts +++ b/src/clients/flinkSql/models/SqlV1StatementException.ts @@ -5,93 +5,91 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SqlV1StatementException */ export interface SqlV1StatementException { - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementException - */ - kind?: SqlV1StatementExceptionKindEnum; - /** - * Name of the SQL statement exception. - * @type {string} - * @memberof SqlV1StatementException - */ - readonly name?: string; - /** - * Error message of the statement exception. - * @type {string} - * @memberof SqlV1StatementException - */ - readonly message?: string; - /** - * The date and time at which the exception occurred. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementException - */ - readonly timestamp?: Date; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementException + */ + kind?: SqlV1StatementExceptionKindEnum; + /** + * Name of the SQL statement exception. + * @type {string} + * @memberof SqlV1StatementException + */ + readonly name?: string; + /** + * Error message of the statement exception. + * @type {string} + * @memberof SqlV1StatementException + */ + readonly message?: string; + /** + * The date and time at which the exception occurred. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementException + */ + readonly timestamp?: Date; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementExceptionKindEnum { - StatementException = "StatementException", + StatementException = 'StatementException' } + /** * Check if a given object implements the SqlV1StatementException interface. */ export function instanceOfSqlV1StatementException(value: object): value is SqlV1StatementException { - return true; + return true; } export function SqlV1StatementExceptionFromJSON(json: any): SqlV1StatementException { - return SqlV1StatementExceptionFromJSONTyped(json, false); + return SqlV1StatementExceptionFromJSONTyped(json, false); } -export function SqlV1StatementExceptionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementException { - if (json == null) { - return json; - } - return { - kind: json["kind"] == null ? undefined : json["kind"], - name: json["name"] == null ? undefined : json["name"], - message: json["message"] == null ? undefined : json["message"], - timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), - }; +export function SqlV1StatementExceptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementException { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'] == null ? undefined : json['kind'], + 'name': json['name'] == null ? undefined : json['name'], + 'message': json['message'] == null ? undefined : json['message'], + 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), + }; } export function SqlV1StatementExceptionToJSON(json: any): SqlV1StatementException { - return SqlV1StatementExceptionToJSONTyped(json, false); + return SqlV1StatementExceptionToJSONTyped(json, false); } -export function SqlV1StatementExceptionToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementExceptionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - }; + return { + + 'kind': value['kind'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts b/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts index ca1b58dc27..f7a9d429b7 100644 --- a/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts +++ b/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts @@ -5,28 +5,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementException } from "./SqlV1StatementException"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementException } from './SqlV1StatementException'; import { - SqlV1StatementExceptionFromJSON, - SqlV1StatementExceptionFromJSONTyped, - SqlV1StatementExceptionToJSON, - SqlV1StatementExceptionToJSONTyped, -} from "./SqlV1StatementException"; -import type { ExceptionListMeta } from "./ExceptionListMeta"; + SqlV1StatementExceptionFromJSON, + SqlV1StatementExceptionFromJSONTyped, + SqlV1StatementExceptionToJSON, + SqlV1StatementExceptionToJSONTyped, +} from './SqlV1StatementException'; +import type { ExceptionListMeta } from './ExceptionListMeta'; import { - ExceptionListMetaFromJSON, - ExceptionListMetaFromJSONTyped, - ExceptionListMetaToJSON, - ExceptionListMetaToJSONTyped, -} from "./ExceptionListMeta"; + ExceptionListMetaFromJSON, + ExceptionListMetaFromJSONTyped, + ExceptionListMetaToJSON, + ExceptionListMetaToJSONTyped, +} from './ExceptionListMeta'; /** * StatementExceptionList is a list of exceptions coming from FAILED or FAILING Statements created by @@ -35,95 +35,91 @@ import { * @interface SqlV1StatementExceptionList */ export interface SqlV1StatementExceptionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementExceptionList - */ - api_version: SqlV1StatementExceptionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementExceptionList - */ - kind: SqlV1StatementExceptionListKindEnum; - /** - * - * @type {ExceptionListMeta} - * @memberof SqlV1StatementExceptionList - */ - metadata: ExceptionListMeta; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Array} - * @memberof SqlV1StatementExceptionList - */ - data: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementExceptionList + */ + api_version: SqlV1StatementExceptionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementExceptionList + */ + kind: SqlV1StatementExceptionListKindEnum; + /** + * + * @type {ExceptionListMeta} + * @memberof SqlV1StatementExceptionList + */ + metadata: ExceptionListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Array} + * @memberof SqlV1StatementExceptionList + */ + data: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementExceptionListApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementExceptionListKindEnum { - StatementExceptionList = "StatementExceptionList", + StatementExceptionList = 'StatementExceptionList' } + /** * Check if a given object implements the SqlV1StatementExceptionList interface. */ -export function instanceOfSqlV1StatementExceptionList( - value: object, -): value is SqlV1StatementExceptionList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfSqlV1StatementExceptionList(value: object): value is SqlV1StatementExceptionList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function SqlV1StatementExceptionListFromJSON(json: any): SqlV1StatementExceptionList { - return SqlV1StatementExceptionListFromJSONTyped(json, false); + return SqlV1StatementExceptionListFromJSONTyped(json, false); } -export function SqlV1StatementExceptionListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementExceptionList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ExceptionListMetaFromJSON(json["metadata"]), - data: (json["data"] as Array).map(SqlV1StatementExceptionFromJSON), - }; +export function SqlV1StatementExceptionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementExceptionList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ExceptionListMetaFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(SqlV1StatementExceptionFromJSON)), + }; } export function SqlV1StatementExceptionListToJSON(json: any): SqlV1StatementExceptionList { - return SqlV1StatementExceptionListToJSONTyped(json, false); + return SqlV1StatementExceptionListToJSONTyped(json, false); } -export function SqlV1StatementExceptionListToJSONTyped( - value?: SqlV1StatementExceptionList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementExceptionListToJSONTyped(value?: SqlV1StatementExceptionList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: ExceptionListMetaToJSON(value["metadata"]), - data: (value["data"] as Array).map(SqlV1StatementExceptionToJSON), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': ExceptionListMetaToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(SqlV1StatementExceptionToJSON)), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementList.ts b/src/clients/flinkSql/models/SqlV1StatementList.ts index e8c157aced..ac4536def9 100644 --- a/src/clients/flinkSql/models/SqlV1StatementList.ts +++ b/src/clients/flinkSql/models/SqlV1StatementList.ts @@ -5,28 +5,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementListDataInner } from "./SqlV1StatementListDataInner"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementListDataInner } from './SqlV1StatementListDataInner'; import { - SqlV1StatementListDataInnerFromJSON, - SqlV1StatementListDataInnerFromJSONTyped, - SqlV1StatementListDataInnerToJSON, - SqlV1StatementListDataInnerToJSONTyped, -} from "./SqlV1StatementListDataInner"; -import type { SqlV1StatementListMetadata } from "./SqlV1StatementListMetadata"; + SqlV1StatementListDataInnerFromJSON, + SqlV1StatementListDataInnerFromJSONTyped, + SqlV1StatementListDataInnerToJSON, + SqlV1StatementListDataInnerToJSONTyped, +} from './SqlV1StatementListDataInner'; +import type { SqlV1StatementListMetadata } from './SqlV1StatementListMetadata'; import { - SqlV1StatementListMetadataFromJSON, - SqlV1StatementListMetadataFromJSONTyped, - SqlV1StatementListMetadataToJSON, - SqlV1StatementListMetadataToJSONTyped, -} from "./SqlV1StatementListMetadata"; + SqlV1StatementListMetadataFromJSON, + SqlV1StatementListMetadataFromJSONTyped, + SqlV1StatementListMetadataToJSON, + SqlV1StatementListMetadataToJSONTyped, +} from './SqlV1StatementListMetadata'; /** * `Statement` represents a core resource used to model SQL statements for execution. @@ -39,93 +39,91 @@ import { * @interface SqlV1StatementList */ export interface SqlV1StatementList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementList - */ - api_version: SqlV1StatementListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementList - */ - kind: SqlV1StatementListKindEnum; - /** - * - * @type {SqlV1StatementListMetadata} - * @memberof SqlV1StatementList - */ - metadata: SqlV1StatementListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1StatementList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementList + */ + api_version: SqlV1StatementListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementList + */ + kind: SqlV1StatementListKindEnum; + /** + * + * @type {SqlV1StatementListMetadata} + * @memberof SqlV1StatementList + */ + metadata: SqlV1StatementListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1StatementList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementListApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementListKindEnum { - StatementList = "StatementList", + StatementList = 'StatementList' } + /** * Check if a given object implements the SqlV1StatementList interface. */ export function instanceOfSqlV1StatementList(value: object): value is SqlV1StatementList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function SqlV1StatementListFromJSON(json: any): SqlV1StatementList { - return SqlV1StatementListFromJSONTyped(json, false); + return SqlV1StatementListFromJSONTyped(json, false); } -export function SqlV1StatementListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: SqlV1StatementListMetadataFromJSON(json["metadata"]), - data: new Set((json["data"] as Array).map(SqlV1StatementListDataInnerFromJSON)), - }; +export function SqlV1StatementListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1StatementListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(SqlV1StatementListDataInnerFromJSON))), + }; } export function SqlV1StatementListToJSON(json: any): SqlV1StatementList { - return SqlV1StatementListToJSONTyped(json, false); + return SqlV1StatementListToJSONTyped(json, false); } -export function SqlV1StatementListToJSONTyped( - value?: SqlV1StatementList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementListToJSONTyped(value?: SqlV1StatementList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: SqlV1StatementListMetadataToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map(SqlV1StatementListDataInnerToJSON), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': SqlV1StatementListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(SqlV1StatementListDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts b/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts index f1de57aca1..29622c648d 100644 --- a/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts @@ -5,173 +5,169 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from "./SqlV1StatementMetadata"; -import type { SqlV1StatementResult } from "./SqlV1StatementResult"; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from './SqlV1StatementMetadata'; +import type { SqlV1StatementResult } from './SqlV1StatementResult'; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from "./SqlV1StatementResult"; -import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from './SqlV1StatementResult'; +import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from "./SqlV1StatementStatus"; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from './SqlV1StatementStatus'; /** - * + * * @export * @interface SqlV1StatementListDataInner */ export interface SqlV1StatementListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - readonly api_version: SqlV1StatementListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - readonly kind: SqlV1StatementListDataInnerKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof SqlV1StatementListDataInner - */ - metadata: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - environment_id: string; - /** - * - * @type {object} - * @memberof SqlV1StatementListDataInner - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof SqlV1StatementListDataInner - */ - status: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof SqlV1StatementListDataInner - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + readonly api_version: SqlV1StatementListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + readonly kind: SqlV1StatementListDataInnerKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof SqlV1StatementListDataInner + */ + metadata: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + environment_id: string; + /** + * + * @type {object} + * @memberof SqlV1StatementListDataInner + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof SqlV1StatementListDataInner + */ + status: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof SqlV1StatementListDataInner + */ + result?: SqlV1StatementResult; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementListDataInnerApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementListDataInnerKindEnum { - Statement = "Statement", + Statement = 'Statement' } + /** * Check if a given object implements the SqlV1StatementListDataInner interface. */ -export function instanceOfSqlV1StatementListDataInner( - value: object, -): value is SqlV1StatementListDataInner { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("organization_id" in value) || value["organization_id"] === undefined) return false; - if (!("environment_id" in value) || value["environment_id"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; +export function instanceOfSqlV1StatementListDataInner(value: object): value is SqlV1StatementListDataInner { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } export function SqlV1StatementListDataInnerFromJSON(json: any): SqlV1StatementListDataInner { - return SqlV1StatementListDataInnerFromJSONTyped(json, false); + return SqlV1StatementListDataInnerFromJSONTyped(json, false); } -export function SqlV1StatementListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: SqlV1StatementMetadataFromJSON(json["metadata"]), - name: json["name"], - organization_id: json["organization_id"], - environment_id: json["environment_id"], - spec: json["spec"], - status: SqlV1StatementStatusFromJSON(json["status"]), - result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), - }; +export function SqlV1StatementListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1StatementMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': json['spec'], + 'status': SqlV1StatementStatusFromJSON(json['status']), + 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), + }; } export function SqlV1StatementListDataInnerToJSON(json: any): SqlV1StatementListDataInner { - return SqlV1StatementListDataInnerToJSONTyped(json, false); + return SqlV1StatementListDataInnerToJSONTyped(json, false); } -export function SqlV1StatementListDataInnerToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: SqlV1StatementMetadataToJSON(value["metadata"]), - name: value["name"], - organization_id: value["organization_id"], - environment_id: value["environment_id"], - spec: value["spec"], - status: SqlV1StatementStatusToJSON(value["status"]), - result: SqlV1StatementResultToJSON(value["result"]), - }; + return { + + 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), + 'name': value['name'], + 'organization_id': value['organization_id'], + 'environment_id': value['environment_id'], + 'spec': value['spec'], + 'status': SqlV1StatementStatusToJSON(value['status']), + 'result': SqlV1StatementResultToJSON(value['result']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts b/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts index a0b3f24a72..40d597a4c6 100644 --- a/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts @@ -5,98 +5,93 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SqlV1StatementListMetadata */ export interface SqlV1StatementListMetadata { - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - self?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - next?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - prev?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + prev?: any | null; } /** * Check if a given object implements the SqlV1StatementListMetadata interface. */ -export function instanceOfSqlV1StatementListMetadata( - value: object, -): value is SqlV1StatementListMetadata { - return true; +export function instanceOfSqlV1StatementListMetadata(value: object): value is SqlV1StatementListMetadata { + return true; } export function SqlV1StatementListMetadataFromJSON(json: any): SqlV1StatementListMetadata { - return SqlV1StatementListMetadataFromJSONTyped(json, false); + return SqlV1StatementListMetadataFromJSONTyped(json, false); } -export function SqlV1StatementListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementListMetadata { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - next: json["next"] == null ? undefined : json["next"], - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - }; +export function SqlV1StatementListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementListMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + }; } export function SqlV1StatementListMetadataToJSON(json: any): SqlV1StatementListMetadata { - return SqlV1StatementListMetadataToJSONTyped(json, false); + return SqlV1StatementListMetadataToJSONTyped(json, false); } -export function SqlV1StatementListMetadataToJSONTyped( - value?: SqlV1StatementListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementListMetadataToJSONTyped(value?: SqlV1StatementListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - first: value["first"], - last: value["last"], - prev: value["prev"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementMetadata.ts b/src/clients/flinkSql/models/SqlV1StatementMetadata.ts index dd06889e8b..6dc2944c32 100644 --- a/src/clients/flinkSql/models/SqlV1StatementMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1StatementMetadata.ts @@ -5,113 +5,110 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SqlV1StatementMetadata */ export interface SqlV1StatementMetadata { - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - resource_version?: any | null; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SqlV1StatementMetadata - */ - labels?: { [key: string]: string }; - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - resource_name?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + resource_version?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1StatementMetadata + */ + labels?: { [key: string]: string; }; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + resource_name?: any | null; } /** * Check if a given object implements the SqlV1StatementMetadata interface. */ export function instanceOfSqlV1StatementMetadata(value: object): value is SqlV1StatementMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function SqlV1StatementMetadataFromJSON(json: any): SqlV1StatementMetadata { - return SqlV1StatementMetadataFromJSONTyped(json, false); + return SqlV1StatementMetadataFromJSONTyped(json, false); } -export function SqlV1StatementMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - uid: json["uid"] == null ? undefined : json["uid"], - resource_version: json["resource_version"] == null ? undefined : json["resource_version"], - labels: json["labels"] == null ? undefined : json["labels"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - }; +export function SqlV1StatementMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'labels': json['labels'] == null ? undefined : json['labels'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + }; } export function SqlV1StatementMetadataToJSON(json: any): SqlV1StatementMetadata { - return SqlV1StatementMetadataToJSONTyped(json, false); + return SqlV1StatementMetadataToJSONTyped(json, false); } -export function SqlV1StatementMetadataToJSONTyped( - value?: SqlV1StatementMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementMetadataToJSONTyped(value?: SqlV1StatementMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), - updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), - uid: value["uid"], - resource_version: value["resource_version"], - labels: value["labels"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + 'labels': value['labels'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementResult.ts b/src/clients/flinkSql/models/SqlV1StatementResult.ts index 4e79ae8747..6ee5658dbd 100644 --- a/src/clients/flinkSql/models/SqlV1StatementResult.ts +++ b/src/clients/flinkSql/models/SqlV1StatementResult.ts @@ -5,28 +5,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementResultResults } from "./SqlV1StatementResultResults"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementResultResults } from './SqlV1StatementResultResults'; import { - SqlV1StatementResultResultsFromJSON, - SqlV1StatementResultResultsFromJSONTyped, - SqlV1StatementResultResultsToJSON, - SqlV1StatementResultResultsToJSONTyped, -} from "./SqlV1StatementResultResults"; -import type { ResultListMeta } from "./ResultListMeta"; + SqlV1StatementResultResultsFromJSON, + SqlV1StatementResultResultsFromJSONTyped, + SqlV1StatementResultResultsToJSON, + SqlV1StatementResultResultsToJSONTyped, +} from './SqlV1StatementResultResults'; +import type { ResultListMeta } from './ResultListMeta'; import { - ResultListMetaFromJSON, - ResultListMetaFromJSONTyped, - ResultListMetaToJSON, - ResultListMetaToJSONTyped, -} from "./ResultListMeta"; + ResultListMetaFromJSON, + ResultListMetaFromJSONTyped, + ResultListMetaToJSON, + ResultListMetaToJSONTyped, +} from './ResultListMeta'; /** * `Statement Result` represents a resource used to model results of SQL statements. @@ -35,93 +35,90 @@ import { * @interface SqlV1StatementResult */ export interface SqlV1StatementResult { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementResult - */ - api_version: SqlV1StatementResultApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementResult - */ - kind: SqlV1StatementResultKindEnum; - /** - * - * @type {ResultListMeta} - * @memberof SqlV1StatementResult - */ - metadata: ResultListMeta; - /** - * - * @type {SqlV1StatementResultResults} - * @memberof SqlV1StatementResult - */ - results?: SqlV1StatementResultResults; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementResult + */ + api_version: SqlV1StatementResultApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementResult + */ + kind: SqlV1StatementResultKindEnum; + /** + * + * @type {ResultListMeta} + * @memberof SqlV1StatementResult + */ + metadata: ResultListMeta; + /** + * + * @type {SqlV1StatementResultResults} + * @memberof SqlV1StatementResult + */ + results?: SqlV1StatementResultResults; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementResultApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum SqlV1StatementResultKindEnum { - StatementResult = "StatementResult", + StatementResult = 'StatementResult' } + /** * Check if a given object implements the SqlV1StatementResult interface. */ export function instanceOfSqlV1StatementResult(value: object): value is SqlV1StatementResult { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + return true; } export function SqlV1StatementResultFromJSON(json: any): SqlV1StatementResult { - return SqlV1StatementResultFromJSONTyped(json, false); + return SqlV1StatementResultFromJSONTyped(json, false); } -export function SqlV1StatementResultFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementResult { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ResultListMetaFromJSON(json["metadata"]), - results: - json["results"] == null ? undefined : SqlV1StatementResultResultsFromJSON(json["results"]), - }; +export function SqlV1StatementResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementResult { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ResultListMetaFromJSON(json['metadata']), + 'results': json['results'] == null ? undefined : SqlV1StatementResultResultsFromJSON(json['results']), + }; } export function SqlV1StatementResultToJSON(json: any): SqlV1StatementResult { - return SqlV1StatementResultToJSONTyped(json, false); + return SqlV1StatementResultToJSONTyped(json, false); } -export function SqlV1StatementResultToJSONTyped( - value?: SqlV1StatementResult | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementResultToJSONTyped(value?: SqlV1StatementResult | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: ResultListMetaToJSON(value["metadata"]), - results: SqlV1StatementResultResultsToJSON(value["results"]), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': ResultListMetaToJSON(value['metadata']), + 'results': SqlV1StatementResultResultsToJSON(value['results']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementResultResults.ts b/src/clients/flinkSql/models/SqlV1StatementResultResults.ts index 8007949dc9..b518b1f421 100644 --- a/src/clients/flinkSql/models/SqlV1StatementResultResults.ts +++ b/src/clients/flinkSql/models/SqlV1StatementResultResults.ts @@ -5,85 +5,80 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * A results property that contains a data property that contains an array of results. * @export * @interface SqlV1StatementResultResults */ export interface SqlV1StatementResultResults { - /** - * A data property that contains an array of results. Each entry in the array is a separate result. - * - * The value of `op` attribute (if present) represents the kind of change that a row can describe in a changelog: - * - * `0`: represents `INSERT` (`+I`), i.e. insertion operation; - * - * `1`: represents `UPDATE_BEFORE` (`-U`), i.e. update operation with the previous content of the updated row. - * This kind should occur together with `UPDATE_AFTER` for modelling an update that needs to retract - * the previous row first. It is useful in cases of a non-idempotent update, i.e., an update of a row that is not - * uniquely identifiable by a key; - * - * `2`: represents `UPDATE_AFTER` (`+U`), i.e. update operation with new content of the updated row; - * This kind CAN occur together with `UPDATE_BEFORE` for modelling an update that - * needs to retract the previous row first or it describes an idempotent update, i.e., an - * update of a row that is uniquely identifiable by a key; - * - * `3`: represents `DELETE` (`-D`), i.e. deletion operation; - * - * Defaults to `0`. - * - * @type {Array} - * @memberof SqlV1StatementResultResults - */ - data?: Array; + /** + * A data property that contains an array of results. Each entry in the array is a separate result. + * + * The value of `op` attribute (if present) represents the kind of change that a row can describe in a changelog: + * + * `0`: represents `INSERT` (`+I`), i.e. insertion operation; + * + * `1`: represents `UPDATE_BEFORE` (`-U`), i.e. update operation with the previous content of the updated row. + * This kind should occur together with `UPDATE_AFTER` for modelling an update that needs to retract + * the previous row first. It is useful in cases of a non-idempotent update, i.e., an update of a row that is not + * uniquely identifiable by a key; + * + * `2`: represents `UPDATE_AFTER` (`+U`), i.e. update operation with new content of the updated row; + * This kind CAN occur together with `UPDATE_BEFORE` for modelling an update that + * needs to retract the previous row first or it describes an idempotent update, i.e., an + * update of a row that is uniquely identifiable by a key; + * + * `3`: represents `DELETE` (`-D`), i.e. deletion operation; + * + * Defaults to `0`. + * + * @type {Array} + * @memberof SqlV1StatementResultResults + */ + data?: Array; } /** * Check if a given object implements the SqlV1StatementResultResults interface. */ -export function instanceOfSqlV1StatementResultResults( - value: object, -): value is SqlV1StatementResultResults { - return true; +export function instanceOfSqlV1StatementResultResults(value: object): value is SqlV1StatementResultResults { + return true; } export function SqlV1StatementResultResultsFromJSON(json: any): SqlV1StatementResultResults { - return SqlV1StatementResultResultsFromJSONTyped(json, false); + return SqlV1StatementResultResultsFromJSONTyped(json, false); } -export function SqlV1StatementResultResultsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementResultResults { - if (json == null) { - return json; - } - return { - data: json["data"] == null ? undefined : json["data"], - }; +export function SqlV1StatementResultResultsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementResultResults { + if (json == null) { + return json; + } + return { + + 'data': json['data'] == null ? undefined : json['data'], + }; } export function SqlV1StatementResultResultsToJSON(json: any): SqlV1StatementResultResults { - return SqlV1StatementResultResultsToJSONTyped(json, false); + return SqlV1StatementResultResultsToJSONTyped(json, false); } -export function SqlV1StatementResultResultsToJSONTyped( - value?: SqlV1StatementResultResults | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementResultResultsToJSONTyped(value?: SqlV1StatementResultResults | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - data: value["data"], - }; + return { + + 'data': value['data'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementSpec.ts b/src/clients/flinkSql/models/SqlV1StatementSpec.ts index d03183c0c2..23470c8eae 100644 --- a/src/clients/flinkSql/models/SqlV1StatementSpec.ts +++ b/src/clients/flinkSql/models/SqlV1StatementSpec.ts @@ -5,105 +5,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The specs of the Statement * @export * @interface SqlV1StatementSpec */ export interface SqlV1StatementSpec { - /** - * The raw SQL text statement. - * @type {string} - * @memberof SqlV1StatementSpec - */ - statement?: string; - /** - * A map (key-value pairs) of statement properties. - * @type {{ [key: string]: string; }} - * @memberof SqlV1StatementSpec - */ - properties?: { [key: string]: string }; - /** - * The id associated with the compute pool in context. - * @type {string} - * @memberof SqlV1StatementSpec - */ - compute_pool_id?: string; - /** - * The id of a principal this statement runs as. - * @type {string} - * @memberof SqlV1StatementSpec - */ - principal?: string; - /** - * The list of ids of the principals granting permissions to run this statement. - * @type {Array} - * @memberof SqlV1StatementSpec - */ - authorized_principals?: Array; - /** - * Indicates whether the statement should be stopped. - * @type {boolean} - * @memberof SqlV1StatementSpec - */ - stopped?: boolean; + /** + * The raw SQL text statement. + * @type {string} + * @memberof SqlV1StatementSpec + */ + statement?: string; + /** + * A map (key-value pairs) of statement properties. + * @type {{ [key: string]: string; }} + * @memberof SqlV1StatementSpec + */ + properties?: { [key: string]: string; }; + /** + * The id associated with the compute pool in context. + * If not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. + * @type {string} + * @memberof SqlV1StatementSpec + */ + compute_pool_id?: string; + /** + * The id of a principal this statement runs as. + * @type {string} + * @memberof SqlV1StatementSpec + */ + principal?: string; + /** + * Indicates whether the statement should be stopped. + * @type {boolean} + * @memberof SqlV1StatementSpec + */ + stopped?: boolean; + /** + * The execution mode of the statement. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {string} + * @memberof SqlV1StatementSpec + */ + readonly execution_mode?: string; } /** * Check if a given object implements the SqlV1StatementSpec interface. */ export function instanceOfSqlV1StatementSpec(value: object): value is SqlV1StatementSpec { - return true; + return true; } export function SqlV1StatementSpecFromJSON(json: any): SqlV1StatementSpec { - return SqlV1StatementSpecFromJSONTyped(json, false); + return SqlV1StatementSpecFromJSONTyped(json, false); } -export function SqlV1StatementSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementSpec { - if (json == null) { - return json; - } - return { - statement: json["statement"] == null ? undefined : json["statement"], - properties: json["properties"] == null ? undefined : json["properties"], - compute_pool_id: json["compute_pool_id"] == null ? undefined : json["compute_pool_id"], - principal: json["principal"] == null ? undefined : json["principal"], - authorized_principals: - json["authorized_principals"] == null ? undefined : json["authorized_principals"], - stopped: json["stopped"] == null ? undefined : json["stopped"], - }; +export function SqlV1StatementSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementSpec { + if (json == null) { + return json; + } + return { + + 'statement': json['statement'] == null ? undefined : json['statement'], + 'properties': json['properties'] == null ? undefined : json['properties'], + 'compute_pool_id': json['compute_pool_id'] == null ? undefined : json['compute_pool_id'], + 'principal': json['principal'] == null ? undefined : json['principal'], + 'stopped': json['stopped'] == null ? undefined : json['stopped'], + 'execution_mode': json['execution_mode'] == null ? undefined : json['execution_mode'], + }; } export function SqlV1StatementSpecToJSON(json: any): SqlV1StatementSpec { - return SqlV1StatementSpecToJSONTyped(json, false); + return SqlV1StatementSpecToJSONTyped(json, false); } -export function SqlV1StatementSpecToJSONTyped( - value?: SqlV1StatementSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementSpecToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - statement: value["statement"], - properties: value["properties"], - compute_pool_id: value["compute_pool_id"], - principal: value["principal"], - authorized_principals: value["authorized_principals"], - stopped: value["stopped"], - }; + return { + + 'statement': value['statement'], + 'properties': value['properties'], + 'compute_pool_id': value['compute_pool_id'], + 'principal': value['principal'], + 'stopped': value['stopped'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementStatus.ts b/src/clients/flinkSql/models/SqlV1StatementStatus.ts index 3c3ba88ade..d050ff3a5c 100644 --- a/src/clients/flinkSql/models/SqlV1StatementStatus.ts +++ b/src/clients/flinkSql/models/SqlV1StatementStatus.ts @@ -5,28 +5,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementTraits } from "./SqlV1StatementTraits"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementTraits } from './SqlV1StatementTraits'; +import { + SqlV1StatementTraitsFromJSON, + SqlV1StatementTraitsFromJSONTyped, + SqlV1StatementTraitsToJSON, + SqlV1StatementTraitsToJSONTyped, +} from './SqlV1StatementTraits'; +import type { SqlV1ScalingStatus } from './SqlV1ScalingStatus'; +import { + SqlV1ScalingStatusFromJSON, + SqlV1ScalingStatusFromJSONTyped, + SqlV1ScalingStatusToJSON, + SqlV1ScalingStatusToJSONTyped, +} from './SqlV1ScalingStatus'; +import type { SqlV1StateLimitStatus } from './SqlV1StateLimitStatus'; import { - SqlV1StatementTraitsFromJSON, - SqlV1StatementTraitsFromJSONTyped, - SqlV1StatementTraitsToJSON, - SqlV1StatementTraitsToJSONTyped, -} from "./SqlV1StatementTraits"; -import type { SqlV1ScalingStatus } from "./SqlV1ScalingStatus"; + SqlV1StateLimitStatusFromJSON, + SqlV1StateLimitStatusFromJSONTyped, + SqlV1StateLimitStatusToJSON, + SqlV1StateLimitStatusToJSONTyped, +} from './SqlV1StateLimitStatus'; +import type { SqlV1StatementStatusAffectedResource } from './SqlV1StatementStatusAffectedResource'; import { - SqlV1ScalingStatusFromJSON, - SqlV1ScalingStatusFromJSONTyped, - SqlV1ScalingStatusToJSON, - SqlV1ScalingStatusToJSONTyped, -} from "./SqlV1ScalingStatus"; + SqlV1StatementStatusAffectedResourceFromJSON, + SqlV1StatementStatusAffectedResourceFromJSONTyped, + SqlV1StatementStatusAffectedResourceToJSON, + SqlV1StatementStatusAffectedResourceToJSONTyped, +} from './SqlV1StatementStatusAffectedResource'; +import type { SqlV1StatementWarning } from './SqlV1StatementWarning'; +import { + SqlV1StatementWarningFromJSON, + SqlV1StatementWarningFromJSONTyped, + SqlV1StatementWarningToJSON, + SqlV1StatementWarningToJSONTyped, +} from './SqlV1StatementWarning'; /** * The status of the Statement @@ -34,125 +55,161 @@ import { * @interface SqlV1StatementStatus */ export interface SqlV1StatementStatus { - /** - * The lifecycle phase of the submitted SQL statement: - * - * PENDING: SQL statement is pending execution; - * - * RUNNING: SQL statement execution is in progress; - * - * COMPLETED: SQL statement is completed; - * - * DELETING: SQL statement deletion is in progress; - * - * FAILING: SQL statement is failing; - * - * FAILED: SQL statement execution has failed; - * - * STOPPED: SQL statement execution has successfully been stopped; - * - * @type {string} - * @memberof SqlV1StatementStatus - */ - readonly phase: string; - /** - * - * @type {SqlV1ScalingStatus} - * @memberof SqlV1StatementStatus - */ - scaling_status?: SqlV1ScalingStatus; - /** - * Details about the execution status of this statement. - * @type {string} - * @memberof SqlV1StatementStatus - */ - readonly detail?: string; - /** - * - * @type {SqlV1StatementTraits} - * @memberof SqlV1StatementStatus - */ - traits?: SqlV1StatementTraits; - /** - * The networking type used by the submitted SQL statement: - * - * PUBLIC: SQL statement is using public networking; - * - * PRIVATE: SQL statement is using private networking; - * - * @type {string} - * @memberof SqlV1StatementStatus - */ - readonly network_kind?: string; - /** - * The last Kafka offsets that a statement has processed. Represented by a mapping from Kafka topic to a - * string representation of partitions mapped to offsets. - * - * @type {{ [key: string]: string; }} - * @memberof SqlV1StatementStatus - */ - readonly latest_offsets?: { [key: string]: string }; - /** - * The date and time at which the Kafka topic offsets were added to the statement status. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementStatus - */ - readonly latest_offsets_timestamp?: Date; + /** + * The lifecycle phase of the submitted SQL statement: + * + * PENDING: SQL statement is pending execution; + * + * RUNNING: SQL statement execution is in progress; + * + * COMPLETED: SQL statement is completed; + * + * DELETING: SQL statement deletion is in progress; + * + * FAILING: SQL statement is failing; + * + * FAILED: SQL statement execution has failed; + * + * STOPPED: SQL statement execution has successfully been stopped; + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + readonly phase: string; + /** + * + * @type {SqlV1ScalingStatus} + * @memberof SqlV1StatementStatus + */ + scaling_status?: SqlV1ScalingStatus; + /** + * + * @type {SqlV1StateLimitStatus} + * @memberof SqlV1StatementStatus + */ + state_limit_status?: SqlV1StateLimitStatus; + /** + * Details about the execution status of this statement. + * @type {string} + * @memberof SqlV1StatementStatus + */ + readonly detail?: string; + /** + * List of warnings encountered during statement execution. + * @type {Array} + * @memberof SqlV1StatementStatus + */ + readonly warnings?: Array; + /** + * + * @type {SqlV1StatementTraits} + * @memberof SqlV1StatementStatus + */ + traits?: SqlV1StatementTraits; + /** + * The networking type used by the submitted SQL statement: + * + * PUBLIC: SQL statement is using public networking; + * + * PRIVATE: SQL statement is using private networking; + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + readonly network_kind?: string; + /** + * The last Kafka offsets that a statement has processed. Represented by a mapping from Kafka topic to a + * string representation of partitions mapped to offsets. + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1StatementStatus + */ + readonly latest_offsets?: { [key: string]: string; }; + /** + * The date and time at which the Kafka topic offsets were added to the statement status. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementStatus + */ + readonly latest_offsets_timestamp?: Date; + /** + * The date and time in UTC (represented as RFC3339 format) at which the statement reached its final terminal state. + * This field is set when the Phase is COMPLETED, FAILED, or STOPPED. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {Date} + * @memberof SqlV1StatementStatus + */ + end_time?: Date; + /** + * The total elapsed time (represented as ISO 8601 format) from when the statement transitioned from + * PENDING to RUNNING until it reached a final terminal state. This field is calculated and set when + * the Phase is COMPLETED, FAILED, or STOPPED. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + duration?: string; + /** + * + * @type {SqlV1StatementStatusAffectedResource} + * @memberof SqlV1StatementStatus + */ + affected_resource?: SqlV1StatementStatusAffectedResource; } /** * Check if a given object implements the SqlV1StatementStatus interface. */ export function instanceOfSqlV1StatementStatus(value: object): value is SqlV1StatementStatus { - if (!("phase" in value) || value["phase"] === undefined) return false; - return true; + if (!('phase' in value) || value['phase'] === undefined) return false; + return true; } export function SqlV1StatementStatusFromJSON(json: any): SqlV1StatementStatus { - return SqlV1StatementStatusFromJSONTyped(json, false); + return SqlV1StatementStatusFromJSONTyped(json, false); } -export function SqlV1StatementStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementStatus { - if (json == null) { - return json; - } - return { - phase: json["phase"], - scaling_status: - json["scaling_status"] == null - ? undefined - : SqlV1ScalingStatusFromJSON(json["scaling_status"]), - detail: json["detail"] == null ? undefined : json["detail"], - traits: json["traits"] == null ? undefined : SqlV1StatementTraitsFromJSON(json["traits"]), - network_kind: json["network_kind"] == null ? undefined : json["network_kind"], - latest_offsets: json["latest_offsets"] == null ? undefined : json["latest_offsets"], - latest_offsets_timestamp: - json["latest_offsets_timestamp"] == null - ? undefined - : new Date(json["latest_offsets_timestamp"]), - }; +export function SqlV1StatementStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementStatus { + if (json == null) { + return json; + } + return { + + 'phase': json['phase'], + 'scaling_status': json['scaling_status'] == null ? undefined : SqlV1ScalingStatusFromJSON(json['scaling_status']), + 'state_limit_status': json['state_limit_status'] == null ? undefined : SqlV1StateLimitStatusFromJSON(json['state_limit_status']), + 'detail': json['detail'] == null ? undefined : json['detail'], + 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(SqlV1StatementWarningFromJSON)), + 'traits': json['traits'] == null ? undefined : SqlV1StatementTraitsFromJSON(json['traits']), + 'network_kind': json['network_kind'] == null ? undefined : json['network_kind'], + 'latest_offsets': json['latest_offsets'] == null ? undefined : json['latest_offsets'], + 'latest_offsets_timestamp': json['latest_offsets_timestamp'] == null ? undefined : (new Date(json['latest_offsets_timestamp'])), + 'end_time': json['end_time'] == null ? undefined : (new Date(json['end_time'])), + 'duration': json['duration'] == null ? undefined : json['duration'], + 'affected_resource': json['affected_resource'] == null ? undefined : SqlV1StatementStatusAffectedResourceFromJSON(json['affected_resource']), + }; } export function SqlV1StatementStatusToJSON(json: any): SqlV1StatementStatus { - return SqlV1StatementStatusToJSONTyped(json, false); + return SqlV1StatementStatusToJSONTyped(json, false); } -export function SqlV1StatementStatusToJSONTyped( - value?: Omit< - SqlV1StatementStatus, - "phase" | "detail" | "network_kind" | "latest_offsets" | "latest_offsets_timestamp" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - scaling_status: SqlV1ScalingStatusToJSON(value["scaling_status"]), - traits: SqlV1StatementTraitsToJSON(value["traits"]), - }; + return { + + 'scaling_status': SqlV1ScalingStatusToJSON(value['scaling_status']), + 'state_limit_status': SqlV1StateLimitStatusToJSON(value['state_limit_status']), + 'traits': SqlV1StatementTraitsToJSON(value['traits']), + 'end_time': value['end_time'] == null ? undefined : ((value['end_time']).toISOString()), + 'duration': value['duration'], + 'affected_resource': SqlV1StatementStatusAffectedResourceToJSON(value['affected_resource']), + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts b/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts new file mode 100644 index 0000000000..ae179cb284 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * A reference to the resource created by this statement, if any. This field is set when a statement + * (e.g., CREATE MATERIALIZED TABLE) results in a new user-facing resource. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @export + * @interface SqlV1StatementStatusAffectedResource + */ +export interface SqlV1StatementStatusAffectedResource { + /** + * The kind of resource that was created. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + kind: string; + /** + * The unique identifier for the environment containing the resource. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + environment_id: string; + /** + * The unique identifier for the database containing the resource. + * Only present for resource kinds that are scoped to a database. + * + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + database_id?: string; + /** + * The name of the created resource, unique within its scope. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + resource_name: string; +} + +/** + * Check if a given object implements the SqlV1StatementStatusAffectedResource interface. + */ +export function instanceOfSqlV1StatementStatusAffectedResource(value: object): value is SqlV1StatementStatusAffectedResource { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; +} + +export function SqlV1StatementStatusAffectedResourceFromJSON(json: any): SqlV1StatementStatusAffectedResource { + return SqlV1StatementStatusAffectedResourceFromJSONTyped(json, false); +} + +export function SqlV1StatementStatusAffectedResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementStatusAffectedResource { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'environment_id': json['environment_id'], + 'database_id': json['database_id'] == null ? undefined : json['database_id'], + 'resource_name': json['resource_name'], + }; +} + +export function SqlV1StatementStatusAffectedResourceToJSON(json: any): SqlV1StatementStatusAffectedResource { + return SqlV1StatementStatusAffectedResourceToJSONTyped(json, false); +} + +export function SqlV1StatementStatusAffectedResourceToJSONTyped(value?: SqlV1StatementStatusAffectedResource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'environment_id': value['environment_id'], + 'database_id': value['database_id'], + 'resource_name': value['resource_name'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1StatementTraits.ts b/src/clients/flinkSql/models/SqlV1StatementTraits.ts index d22aa74e2b..4e859d7b27 100644 --- a/src/clients/flinkSql/models/SqlV1StatementTraits.ts +++ b/src/clients/flinkSql/models/SqlV1StatementTraits.ts @@ -5,21 +5,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ResultSchema } from "./SqlV1ResultSchema"; +import { mapValues } from '../runtime'; +import type { SqlV1ResultSchema } from './SqlV1ResultSchema'; import { - SqlV1ResultSchemaFromJSON, - SqlV1ResultSchemaFromJSONTyped, - SqlV1ResultSchemaToJSON, - SqlV1ResultSchemaToJSONTyped, -} from "./SqlV1ResultSchema"; + SqlV1ResultSchemaFromJSON, + SqlV1ResultSchemaFromJSONTyped, + SqlV1ResultSchemaToJSON, + SqlV1ResultSchemaToJSONTyped, +} from './SqlV1ResultSchema'; /** * StatementTraits contains detailed information about the properties of a Statement @@ -27,82 +27,87 @@ import { * @interface SqlV1StatementTraits */ export interface SqlV1StatementTraits { - /** - * Categorizes the SQL statement. The result is Confluent-specific but inspired by SQL. It uses underscores for separating concepts e.g. "CREATE_TABLE". - * @type {string} - * @memberof SqlV1StatementTraits - */ - sql_kind?: string; - /** - * Indicates the special case where results of a statement are bounded. - * @type {boolean} - * @memberof SqlV1StatementTraits - */ - is_bounded?: boolean; - /** - * Indicates the special case where results of a statement are insert/append only. - * @type {boolean} - * @memberof SqlV1StatementTraits - */ - is_append_only?: boolean; - /** - * Defines the column indices clients can use as upsert keys. - * @type {Array} - * @memberof SqlV1StatementTraits - */ - upsert_columns?: Array; - /** - * - * @type {SqlV1ResultSchema} - * @memberof SqlV1StatementTraits - */ - schema?: SqlV1ResultSchema; + /** + * Categorizes the SQL statement. The result is Confluent-specific but inspired by SQL. It uses underscores for separating concepts e.g. "CREATE_TABLE". + * @type {string} + * @memberof SqlV1StatementTraits + */ + sql_kind?: string; + /** + * Indicates the special case where results of a statement are bounded. + * @type {boolean} + * @memberof SqlV1StatementTraits + */ + is_bounded?: boolean; + /** + * Indicates the special case where results of a statement are insert/append only. + * @type {boolean} + * @memberof SqlV1StatementTraits + */ + is_append_only?: boolean; + /** + * Defines the column indices clients can use as upsert keys. + * @type {Array} + * @memberof SqlV1StatementTraits + */ + upsert_columns?: Array; + /** + * + * @type {SqlV1ResultSchema} + * @memberof SqlV1StatementTraits + */ + schema?: SqlV1ResultSchema; + /** + * The names of connections that the SQL statement references (e.g., in FROM clauses). + * @type {Array} + * @memberof SqlV1StatementTraits + */ + connection_refs?: Array; } /** * Check if a given object implements the SqlV1StatementTraits interface. */ export function instanceOfSqlV1StatementTraits(value: object): value is SqlV1StatementTraits { - return true; + return true; } export function SqlV1StatementTraitsFromJSON(json: any): SqlV1StatementTraits { - return SqlV1StatementTraitsFromJSONTyped(json, false); + return SqlV1StatementTraitsFromJSONTyped(json, false); } -export function SqlV1StatementTraitsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SqlV1StatementTraits { - if (json == null) { - return json; - } - return { - sql_kind: json["sql_kind"] == null ? undefined : json["sql_kind"], - is_bounded: json["is_bounded"] == null ? undefined : json["is_bounded"], - is_append_only: json["is_append_only"] == null ? undefined : json["is_append_only"], - upsert_columns: json["upsert_columns"] == null ? undefined : json["upsert_columns"], - schema: json["schema"] == null ? undefined : SqlV1ResultSchemaFromJSON(json["schema"]), - }; +export function SqlV1StatementTraitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementTraits { + if (json == null) { + return json; + } + return { + + 'sql_kind': json['sql_kind'] == null ? undefined : json['sql_kind'], + 'is_bounded': json['is_bounded'] == null ? undefined : json['is_bounded'], + 'is_append_only': json['is_append_only'] == null ? undefined : json['is_append_only'], + 'upsert_columns': json['upsert_columns'] == null ? undefined : json['upsert_columns'], + 'schema': json['schema'] == null ? undefined : SqlV1ResultSchemaFromJSON(json['schema']), + 'connection_refs': json['connection_refs'] == null ? undefined : json['connection_refs'], + }; } export function SqlV1StatementTraitsToJSON(json: any): SqlV1StatementTraits { - return SqlV1StatementTraitsToJSONTyped(json, false); + return SqlV1StatementTraitsToJSONTyped(json, false); } -export function SqlV1StatementTraitsToJSONTyped( - value?: SqlV1StatementTraits | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SqlV1StatementTraitsToJSONTyped(value?: SqlV1StatementTraits | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - sql_kind: value["sql_kind"], - is_bounded: value["is_bounded"], - is_append_only: value["is_append_only"], - upsert_columns: value["upsert_columns"], - schema: SqlV1ResultSchemaToJSON(value["schema"]), - }; + return { + + 'sql_kind': value['sql_kind'], + 'is_bounded': value['is_bounded'], + 'is_append_only': value['is_append_only'], + 'upsert_columns': value['upsert_columns'], + 'schema': SqlV1ResultSchemaToJSON(value['schema']), + 'connection_refs': value['connection_refs'], + }; } + diff --git a/src/clients/flinkSql/models/SqlV1StatementWarning.ts b/src/clients/flinkSql/models/SqlV1StatementWarning.ts new file mode 100644 index 0000000000..30df986131 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1StatementWarning.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Represents a non-fatal issue encountered during statement processing. + * @export + * @interface SqlV1StatementWarning + */ +export interface SqlV1StatementWarning { + /** + * Indicates the severity of the warning. + * + * LOW: Indicates a low severity warning and for informing the user. + * + * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + * + * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + * + * @type {string} + * @memberof SqlV1StatementWarning + */ + severity: string; + /** + * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementWarning + */ + readonly created_at: Date; + /** + * A machine-readable short, upper case summary delimited by underscore. + * @type {string} + * @memberof SqlV1StatementWarning + */ + reason: string; + /** + * A human-readable string containing the description of the warning. + * @type {string} + * @memberof SqlV1StatementWarning + */ + message: string; +} + +/** + * Check if a given object implements the SqlV1StatementWarning interface. + */ +export function instanceOfSqlV1StatementWarning(value: object): value is SqlV1StatementWarning { + if (!('severity' in value) || value['severity'] === undefined) return false; + if (!('created_at' in value) || value['created_at'] === undefined) return false; + if (!('reason' in value) || value['reason'] === undefined) return false; + if (!('message' in value) || value['message'] === undefined) return false; + return true; +} + +export function SqlV1StatementWarningFromJSON(json: any): SqlV1StatementWarning { + return SqlV1StatementWarningFromJSONTyped(json, false); +} + +export function SqlV1StatementWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementWarning { + if (json == null) { + return json; + } + return { + + 'severity': json['severity'], + 'created_at': (new Date(json['created_at'])), + 'reason': json['reason'], + 'message': json['message'], + }; +} + +export function SqlV1StatementWarningToJSON(json: any): SqlV1StatementWarning { + return SqlV1StatementWarningToJSONTyped(json, false); +} + +export function SqlV1StatementWarningToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'severity': value['severity'], + 'reason': value['reason'], + 'message': value['message'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1Tool.ts b/src/clients/flinkSql/models/SqlV1Tool.ts new file mode 100644 index 0000000000..d86647b13d --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1Tool.ts @@ -0,0 +1,145 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ToolSpec } from './SqlV1ToolSpec'; +import { + SqlV1ToolSpecFromJSON, + SqlV1ToolSpecFromJSONTyped, + SqlV1ToolSpecToJSON, + SqlV1ToolSpecToJSONTyped, +} from './SqlV1ToolSpec'; +import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from './SqlV1ToolStatus'; +import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from './SqlV1ToolMetadata'; + +/** + * `Tool` models a reusable tool resource backed by a connection that can be referenced + * by agents to perform actions. + * The API allows you to create your tools. + * ## The Tools Model + * + * @export + * @interface SqlV1Tool + */ +export interface SqlV1Tool { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Tool + */ + readonly api_version?: SqlV1ToolApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Tool + */ + readonly kind?: SqlV1ToolKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof SqlV1Tool + */ + metadata?: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof SqlV1Tool + */ + name?: string; + /** + * + * @type {SqlV1ToolSpec} + * @memberof SqlV1Tool + */ + spec?: SqlV1ToolSpec; + /** + * + * @type {SqlV1ToolStatus} + * @memberof SqlV1Tool + */ + status?: SqlV1ToolStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1ToolApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1ToolKindEnum { + Tool = 'Tool' +} + + +/** + * Check if a given object implements the SqlV1Tool interface. + */ +export function instanceOfSqlV1Tool(value: object): value is SqlV1Tool { + return true; +} + +export function SqlV1ToolFromJSON(json: any): SqlV1Tool { + return SqlV1ToolFromJSONTyped(json, false); +} + +export function SqlV1ToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Tool { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : SqlV1ToolMetadataFromJSON(json['metadata']), + 'name': json['name'] == null ? undefined : json['name'], + 'spec': json['spec'] == null ? undefined : SqlV1ToolSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1ToolStatusFromJSON(json['status']), + }; +} + +export function SqlV1ToolToJSON(json: any): SqlV1Tool { + return SqlV1ToolToJSONTyped(json, false); +} + +export function SqlV1ToolToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': SqlV1ToolSpecToJSON(value['spec']), + 'status': SqlV1ToolStatusToJSON(value['status']), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ToolList.ts b/src/clients/flinkSql/models/SqlV1ToolList.ts new file mode 100644 index 0000000000..9167e1d3bb --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolList.ts @@ -0,0 +1,128 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ToolListDataInner } from './SqlV1ToolListDataInner'; +import { + SqlV1ToolListDataInnerFromJSON, + SqlV1ToolListDataInnerFromJSONTyped, + SqlV1ToolListDataInnerToJSON, + SqlV1ToolListDataInnerToJSONTyped, +} from './SqlV1ToolListDataInner'; +import type { SqlV1ToolListMetadata } from './SqlV1ToolListMetadata'; +import { + SqlV1ToolListMetadataFromJSON, + SqlV1ToolListMetadataFromJSONTyped, + SqlV1ToolListMetadataToJSON, + SqlV1ToolListMetadataToJSONTyped, +} from './SqlV1ToolListMetadata'; + +/** + * `Tool` models a reusable tool resource backed by a connection that can be referenced + * by agents to perform actions. + * The API allows you to create your tools. + * ## The Tool Model + * + * @export + * @interface SqlV1ToolList + */ +export interface SqlV1ToolList { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ToolList + */ + api_version: SqlV1ToolListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ToolList + */ + kind: SqlV1ToolListKindEnum; + /** + * + * @type {SqlV1ToolListMetadata} + * @memberof SqlV1ToolList + */ + metadata: SqlV1ToolListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1ToolList + */ + data: Set; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1ToolListApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1ToolListKindEnum { + ToolList = 'ToolList' +} + + +/** + * Check if a given object implements the SqlV1ToolList interface. + */ +export function instanceOfSqlV1ToolList(value: object): value is SqlV1ToolList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; +} + +export function SqlV1ToolListFromJSON(json: any): SqlV1ToolList { + return SqlV1ToolListFromJSONTyped(json, false); +} + +export function SqlV1ToolListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1ToolListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(SqlV1ToolListDataInnerFromJSON))), + }; +} + +export function SqlV1ToolListToJSON(json: any): SqlV1ToolList { + return SqlV1ToolListToJSONTyped(json, false); +} + +export function SqlV1ToolListToJSONTyped(value?: SqlV1ToolList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': SqlV1ToolListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(SqlV1ToolListDataInnerToJSON)), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts b/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts new file mode 100644 index 0000000000..f504c9c45e --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts @@ -0,0 +1,140 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from './SqlV1ToolStatus'; +import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from './SqlV1ToolMetadata'; + +/** + * + * @export + * @interface SqlV1ToolListDataInner + */ +export interface SqlV1ToolListDataInner { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + readonly api_version: SqlV1ToolListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + readonly kind: SqlV1ToolListDataInnerKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof SqlV1ToolListDataInner + */ + metadata: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof SqlV1ToolListDataInner + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof SqlV1ToolListDataInner + */ + status: SqlV1ToolStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum SqlV1ToolListDataInnerApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum SqlV1ToolListDataInnerKindEnum { + Tool = 'Tool' +} + + +/** + * Check if a given object implements the SqlV1ToolListDataInner interface. + */ +export function instanceOfSqlV1ToolListDataInner(value: object): value is SqlV1ToolListDataInner { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; +} + +export function SqlV1ToolListDataInnerFromJSON(json: any): SqlV1ToolListDataInner { + return SqlV1ToolListDataInnerFromJSONTyped(json, false); +} + +export function SqlV1ToolListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': SqlV1ToolMetadataFromJSON(json['metadata']), + 'name': json['name'], + 'spec': json['spec'], + 'status': SqlV1ToolStatusFromJSON(json['status']), + }; +} + +export function SqlV1ToolListDataInnerToJSON(json: any): SqlV1ToolListDataInner { + return SqlV1ToolListDataInnerToJSONTyped(json, false); +} + +export function SqlV1ToolListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ToolStatusToJSON(value['status']), + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts b/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts new file mode 100644 index 0000000000..22a1c589c3 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SqlV1ToolListMetadata + */ +export interface SqlV1ToolListMetadata { + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + prev?: any | null; +} + +/** + * Check if a given object implements the SqlV1ToolListMetadata interface. + */ +export function instanceOfSqlV1ToolListMetadata(value: object): value is SqlV1ToolListMetadata { + return true; +} + +export function SqlV1ToolListMetadataFromJSON(json: any): SqlV1ToolListMetadata { + return SqlV1ToolListMetadataFromJSONTyped(json, false); +} + +export function SqlV1ToolListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolListMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + }; +} + +export function SqlV1ToolListMetadataToJSON(json: any): SqlV1ToolListMetadata { + return SqlV1ToolListMetadataToJSONTyped(json, false); +} + +export function SqlV1ToolListMetadataToJSONTyped(value?: SqlV1ToolListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'self': value['self'], + 'next': value['next'], + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ToolMetadata.ts b/src/clients/flinkSql/models/SqlV1ToolMetadata.ts new file mode 100644 index 0000000000..927febd042 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolMetadata.ts @@ -0,0 +1,106 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SqlV1ToolMetadata + */ +export interface SqlV1ToolMetadata { + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ToolMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ToolMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + resource_name?: any | null; +} + +/** + * Check if a given object implements the SqlV1ToolMetadata interface. + */ +export function instanceOfSqlV1ToolMetadata(value: object): value is SqlV1ToolMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; +} + +export function SqlV1ToolMetadataFromJSON(json: any): SqlV1ToolMetadata { + return SqlV1ToolMetadataFromJSONTyped(json, false); +} + +export function SqlV1ToolMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + }; +} + +export function SqlV1ToolMetadataToJSON(json: any): SqlV1ToolMetadata { + return SqlV1ToolMetadataToJSONTyped(json, false); +} + +export function SqlV1ToolMetadataToJSONTyped(value?: SqlV1ToolMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + 'resource_name': value['resource_name'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ToolSpec.ts b/src/clients/flinkSql/models/SqlV1ToolSpec.ts new file mode 100644 index 0000000000..26327a4ba0 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolSpec.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The spec of the Tool + * @export + * @interface SqlV1ToolSpec + */ +export interface SqlV1ToolSpec { + /** + * The name of the connection this tool uses. + * @type {string} + * @memberof SqlV1ToolSpec + */ + connection?: string; + /** + * A set of key-value option pairs that configure the tool's behavior. + * @type {{ [key: string]: string; }} + * @memberof SqlV1ToolSpec + */ + options?: { [key: string]: string; }; +} + +/** + * Check if a given object implements the SqlV1ToolSpec interface. + */ +export function instanceOfSqlV1ToolSpec(value: object): value is SqlV1ToolSpec { + return true; +} + +export function SqlV1ToolSpecFromJSON(json: any): SqlV1ToolSpec { + return SqlV1ToolSpecFromJSONTyped(json, false); +} + +export function SqlV1ToolSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolSpec { + if (json == null) { + return json; + } + return { + + 'connection': json['connection'] == null ? undefined : json['connection'], + 'options': json['options'] == null ? undefined : json['options'], + }; +} + +export function SqlV1ToolSpecToJSON(json: any): SqlV1ToolSpec { + return SqlV1ToolSpecToJSONTyped(json, false); +} + +export function SqlV1ToolSpecToJSONTyped(value?: SqlV1ToolSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'connection': value['connection'], + 'options': value['options'], + }; +} + diff --git a/src/clients/flinkSql/models/SqlV1ToolStatus.ts b/src/clients/flinkSql/models/SqlV1ToolStatus.ts new file mode 100644 index 0000000000..7fcc8dbb99 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolStatus.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The status of the Tool + * @export + * @interface SqlV1ToolStatus + */ +export interface SqlV1ToolStatus { + /** + * Describes the status of the tool: + * + * ACTIVE: The Tool is usable; + * + * INACTIVE: The Tool is not currently active; + * + * ERROR: The Tool encountered an error; + * + * @type {string} + * @memberof SqlV1ToolStatus + */ + readonly phase: string; + /** + * Details about why the tool transitioned into a given status. + * @type {string} + * @memberof SqlV1ToolStatus + */ + readonly detail?: string; +} + +/** + * Check if a given object implements the SqlV1ToolStatus interface. + */ +export function instanceOfSqlV1ToolStatus(value: object): value is SqlV1ToolStatus { + if (!('phase' in value) || value['phase'] === undefined) return false; + return true; +} + +export function SqlV1ToolStatusFromJSON(json: any): SqlV1ToolStatus { + return SqlV1ToolStatusFromJSONTyped(json, false); +} + +export function SqlV1ToolStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolStatus { + if (json == null) { + return json; + } + return { + + 'phase': json['phase'], + 'detail': json['detail'] == null ? undefined : json['detail'], + }; +} + +export function SqlV1ToolStatusToJSON(json: any): SqlV1ToolStatus { + return SqlV1ToolStatusToJSONTyped(json, false); +} + +export function SqlV1ToolStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/src/clients/flinkSql/models/StatementObjectMeta.ts b/src/clients/flinkSql/models/StatementObjectMeta.ts index 71f3bc0034..1bed7aebcd 100644 --- a/src/clients/flinkSql/models/StatementObjectMeta.ts +++ b/src/clients/flinkSql/models/StatementObjectMeta.ts @@ -5,105 +5,102 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The metadata of the statement. * @export * @interface StatementObjectMeta */ export interface StatementObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof StatementObjectMeta - */ - self: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof StatementObjectMeta - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof StatementObjectMeta - */ - updated_at?: Date; - /** - * A system generated globally unique identifier for this resource. - * @type {string} - * @memberof StatementObjectMeta - */ - uid?: string; - /** - * A system generated string that uniquely identifies the version of this resource. - * @type {string} - * @memberof StatementObjectMeta - */ - resource_version?: string; - /** - * A map of key-value pairs that describe the resource. - * @type {{ [key: string]: string; }} - * @memberof StatementObjectMeta - */ - labels?: { [key: string]: string }; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof StatementObjectMeta + */ + self: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof StatementObjectMeta + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof StatementObjectMeta + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof StatementObjectMeta + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof StatementObjectMeta + */ + resource_version?: string; + /** + * A map of key-value pairs that describe the resource. + * @type {{ [key: string]: string; }} + * @memberof StatementObjectMeta + */ + labels?: { [key: string]: string; }; } /** * Check if a given object implements the StatementObjectMeta interface. */ export function instanceOfStatementObjectMeta(value: object): value is StatementObjectMeta { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function StatementObjectMetaFromJSON(json: any): StatementObjectMeta { - return StatementObjectMetaFromJSONTyped(json, false); + return StatementObjectMetaFromJSONTyped(json, false); } -export function StatementObjectMetaFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): StatementObjectMeta { - if (json == null) { - return json; - } - return { - self: json["self"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - uid: json["uid"] == null ? undefined : json["uid"], - resource_version: json["resource_version"] == null ? undefined : json["resource_version"], - labels: json["labels"] == null ? undefined : json["labels"], - }; +export function StatementObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatementObjectMeta { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'labels': json['labels'] == null ? undefined : json['labels'], + }; } export function StatementObjectMetaToJSON(json: any): StatementObjectMeta { - return StatementObjectMetaToJSONTyped(json, false); + return StatementObjectMetaToJSONTyped(json, false); } -export function StatementObjectMetaToJSONTyped( - value?: StatementObjectMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function StatementObjectMetaToJSONTyped(value?: StatementObjectMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), - updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), - uid: value["uid"], - resource_version: value["resource_version"], - labels: value["labels"], - }; + return { + + 'self': value['self'], + 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), + 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), + 'uid': value['uid'], + 'resource_version': value['resource_version'], + 'labels': value['labels'], + }; } + diff --git a/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts new file mode 100644 index 0000000000..8fe946e3c9 --- /dev/null +++ b/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1AgentStatus } from './SqlV1AgentStatus'; +import { + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from './SqlV1AgentStatus'; +import type { SqlV1AgentSpec } from './SqlV1AgentSpec'; +import { + SqlV1AgentSpecFromJSON, + SqlV1AgentSpecFromJSONTyped, + SqlV1AgentSpecToJSON, + SqlV1AgentSpecToJSONTyped, +} from './SqlV1AgentSpec'; + +/** + * + * @export + * @interface UpdateSqlv1AgentRequest + */ +export interface UpdateSqlv1AgentRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly api_version: UpdateSqlv1AgentRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly kind: UpdateSqlv1AgentRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1AgentRequest + */ + metadata: object; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly environment_id: string; + /** + * + * @type {SqlV1AgentSpec} + * @memberof UpdateSqlv1AgentRequest + */ + spec: SqlV1AgentSpec; + /** + * + * @type {SqlV1AgentStatus} + * @memberof UpdateSqlv1AgentRequest + */ + readonly status?: SqlV1AgentStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum UpdateSqlv1AgentRequestApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum UpdateSqlv1AgentRequestKindEnum { + Agent = 'Agent' +} + + +/** + * Check if a given object implements the UpdateSqlv1AgentRequest interface. + */ +export function instanceOfUpdateSqlv1AgentRequest(value: object): value is UpdateSqlv1AgentRequest { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function UpdateSqlv1AgentRequestFromJSON(json: any): UpdateSqlv1AgentRequest { + return UpdateSqlv1AgentRequestFromJSONTyped(json, false); +} + +export function UpdateSqlv1AgentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1AgentRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'], + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': SqlV1AgentSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1AgentStatusFromJSON(json['status']), + }; +} + +export function UpdateSqlv1AgentRequestToJSON(json: any): UpdateSqlv1AgentRequest { + return UpdateSqlv1AgentRequestToJSONTyped(json, false); +} + +export function UpdateSqlv1AgentRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'spec': SqlV1AgentSpecToJSON(value['spec']), + }; +} + diff --git a/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts index 9917681238..e543a0219a 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts @@ -5,130 +5,126 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; +import { mapValues } from '../runtime'; +import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from "./SqlV1ConnectionStatus"; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from './SqlV1ConnectionStatus'; /** - * + * * @export * @interface UpdateSqlv1ConnectionRequest */ export interface UpdateSqlv1ConnectionRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateSqlv1ConnectionRequest - */ - readonly api_version?: UpdateSqlv1ConnectionRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateSqlv1ConnectionRequest - */ - readonly kind?: UpdateSqlv1ConnectionRequestKindEnum; - /** - * - * @type {object} - * @memberof UpdateSqlv1ConnectionRequest - */ - metadata: object; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof UpdateSqlv1ConnectionRequest - */ - name: string; - /** - * - * @type {object} - * @memberof UpdateSqlv1ConnectionRequest - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof UpdateSqlv1ConnectionRequest - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1ConnectionRequest + */ + readonly api_version?: UpdateSqlv1ConnectionRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1ConnectionRequest + */ + readonly kind?: UpdateSqlv1ConnectionRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1ConnectionRequest + */ + metadata: object; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1ConnectionRequest + */ + name: string; + /** + * + * @type {object} + * @memberof UpdateSqlv1ConnectionRequest + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof UpdateSqlv1ConnectionRequest + */ + status?: SqlV1ConnectionStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum UpdateSqlv1ConnectionRequestApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum UpdateSqlv1ConnectionRequestKindEnum { - Connection = "Connection", + Connection = 'Connection' } + /** * Check if a given object implements the UpdateSqlv1ConnectionRequest interface. */ -export function instanceOfUpdateSqlv1ConnectionRequest( - value: object, -): value is UpdateSqlv1ConnectionRequest { - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfUpdateSqlv1ConnectionRequest(value: object): value is UpdateSqlv1ConnectionRequest { + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function UpdateSqlv1ConnectionRequestFromJSON(json: any): UpdateSqlv1ConnectionRequest { - return UpdateSqlv1ConnectionRequestFromJSONTyped(json, false); + return UpdateSqlv1ConnectionRequestFromJSONTyped(json, false); } -export function UpdateSqlv1ConnectionRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateSqlv1ConnectionRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: json["metadata"], - name: json["name"], - spec: json["spec"], - status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), - }; +export function UpdateSqlv1ConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1ConnectionRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'], + 'name': json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), + }; } export function UpdateSqlv1ConnectionRequestToJSON(json: any): UpdateSqlv1ConnectionRequest { - return UpdateSqlv1ConnectionRequestToJSONTyped(json, false); + return UpdateSqlv1ConnectionRequestToJSONTyped(json, false); } -export function UpdateSqlv1ConnectionRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateSqlv1ConnectionRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: value["metadata"], - name: value["name"], - spec: value["spec"], - status: SqlV1ConnectionStatusToJSON(value["status"]), - }; + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'spec': value['spec'], + 'status': SqlV1ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts new file mode 100644 index 0000000000..964879c275 --- /dev/null +++ b/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SqlV1MaterializedTableSpec } from './SqlV1MaterializedTableSpec'; +import { + SqlV1MaterializedTableSpecFromJSON, + SqlV1MaterializedTableSpecFromJSONTyped, + SqlV1MaterializedTableSpecToJSON, + SqlV1MaterializedTableSpecToJSONTyped, +} from './SqlV1MaterializedTableSpec'; +import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from './SqlV1MaterializedTableStatus'; + +/** + * + * @export + * @interface UpdateSqlv1MaterializedTableRequest + */ +export interface UpdateSqlv1MaterializedTableRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly api_version: UpdateSqlv1MaterializedTableRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly kind: UpdateSqlv1MaterializedTableRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + metadata: object; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableSpec} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + spec: SqlV1MaterializedTableSpec; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly status?: SqlV1MaterializedTableStatus; +} + +/** +* @export +* @enum {string} +*/ +export enum UpdateSqlv1MaterializedTableRequestApiVersionEnum { + SqlV1 = 'sql/v1' +} +/** +* @export +* @enum {string} +*/ +export enum UpdateSqlv1MaterializedTableRequestKindEnum { + MaterializedTable = 'MaterializedTable' +} + + +/** + * Check if a given object implements the UpdateSqlv1MaterializedTableRequest interface. + */ +export function instanceOfUpdateSqlv1MaterializedTableRequest(value: object): value is UpdateSqlv1MaterializedTableRequest { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('organization_id' in value) || value['organization_id'] === undefined) return false; + if (!('environment_id' in value) || value['environment_id'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; +} + +export function UpdateSqlv1MaterializedTableRequestFromJSON(json: any): UpdateSqlv1MaterializedTableRequest { + return UpdateSqlv1MaterializedTableRequestFromJSONTyped(json, false); +} + +export function UpdateSqlv1MaterializedTableRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1MaterializedTableRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'], + 'name': json['name'], + 'organization_id': json['organization_id'], + 'environment_id': json['environment_id'], + 'spec': SqlV1MaterializedTableSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json['status']), + }; +} + +export function UpdateSqlv1MaterializedTableRequestToJSON(json: any): UpdateSqlv1MaterializedTableRequest { + return UpdateSqlv1MaterializedTableRequestToJSONTyped(json, false); +} + +export function UpdateSqlv1MaterializedTableRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'spec': SqlV1MaterializedTableSpecToJSON(value['spec']), + }; +} + diff --git a/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts index f29f558515..f6ecce02a8 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts @@ -5,161 +5,157 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SqlV1StatementResult } from "./SqlV1StatementResult"; +import { mapValues } from '../runtime'; +import type { SqlV1StatementResult } from './SqlV1StatementResult'; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from "./SqlV1StatementResult"; -import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from './SqlV1StatementResult'; +import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from "./SqlV1StatementStatus"; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from './SqlV1StatementStatus'; /** - * + * * @export * @interface UpdateSqlv1StatementRequest */ export interface UpdateSqlv1StatementRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - readonly api_version?: UpdateSqlv1StatementRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - readonly kind?: UpdateSqlv1StatementRequestKindEnum; - /** - * - * @type {object} - * @memberof UpdateSqlv1StatementRequest - */ - metadata: object; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof UpdateSqlv1StatementRequest - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof UpdateSqlv1StatementRequest - */ - status?: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof UpdateSqlv1StatementRequest - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + readonly api_version?: UpdateSqlv1StatementRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + readonly kind?: UpdateSqlv1StatementRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1StatementRequest + */ + metadata: object; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof UpdateSqlv1StatementRequest + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof UpdateSqlv1StatementRequest + */ + status?: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof UpdateSqlv1StatementRequest + */ + result?: SqlV1StatementResult; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum UpdateSqlv1StatementRequestApiVersionEnum { - SqlV1 = "sql/v1", + SqlV1 = 'sql/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum UpdateSqlv1StatementRequestKindEnum { - Statement = "Statement", + Statement = 'Statement' } + /** * Check if a given object implements the UpdateSqlv1StatementRequest interface. */ -export function instanceOfUpdateSqlv1StatementRequest( - value: object, -): value is UpdateSqlv1StatementRequest { - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfUpdateSqlv1StatementRequest(value: object): value is UpdateSqlv1StatementRequest { + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function UpdateSqlv1StatementRequestFromJSON(json: any): UpdateSqlv1StatementRequest { - return UpdateSqlv1StatementRequestFromJSONTyped(json, false); + return UpdateSqlv1StatementRequestFromJSONTyped(json, false); } -export function UpdateSqlv1StatementRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateSqlv1StatementRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: json["metadata"], - name: json["name"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - spec: json["spec"], - status: json["status"] == null ? undefined : SqlV1StatementStatusFromJSON(json["status"]), - result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), - }; +export function UpdateSqlv1StatementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1StatementRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'], + 'name': json['name'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : SqlV1StatementStatusFromJSON(json['status']), + 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), + }; } export function UpdateSqlv1StatementRequestToJSON(json: any): UpdateSqlv1StatementRequest { - return UpdateSqlv1StatementRequestToJSONTyped(json, false); + return UpdateSqlv1StatementRequestToJSONTyped(json, false); } -export function UpdateSqlv1StatementRequestToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateSqlv1StatementRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: value["metadata"], - name: value["name"], - organization_id: value["organization_id"], - environment_id: value["environment_id"], - spec: value["spec"], - status: SqlV1StatementStatusToJSON(value["status"]), - result: SqlV1StatementResultToJSON(value["result"]), - }; + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'organization_id': value['organization_id'], + 'environment_id': value['environment_id'], + 'spec': value['spec'], + 'status': SqlV1StatementStatusToJSON(value['status']), + 'result': SqlV1StatementResultToJSON(value['result']), + }; } + diff --git a/src/clients/flinkSql/models/index.ts b/src/clients/flinkSql/models/index.ts index 88ca87e3c8..ca5b9067a8 100644 --- a/src/clients/flinkSql/models/index.ts +++ b/src/clients/flinkSql/models/index.ts @@ -1,49 +1,90 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ColumnDetails"; -export * from "./CreateSqlv1Connection201Response"; -export * from "./CreateSqlv1ConnectionRequest"; -export * from "./CreateSqlv1Statement201Response"; -export * from "./CreateSqlv1StatementRequest"; -export * from "./DataType"; -export * from "./ErrorSource"; -export * from "./ExceptionListMeta"; -export * from "./Failure"; -export * from "./GetSqlv1Connection200Response"; -export * from "./GetSqlv1Statement200Response"; -export * from "./GetSqlv1StatementResult200Response"; -export * from "./JsonPatchRequestAddReplace"; -export * from "./JsonPatchRequestMoveCopy"; -export * from "./JsonPatchRequestRemove"; -export * from "./ListMeta"; -export * from "./ModelError"; -export * from "./ObjectMeta"; -export * from "./PatchRequestInner"; -export * from "./ResultListMeta"; -export * from "./RowFieldType"; -export * from "./SqlV1Connection"; -export * from "./SqlV1ConnectionList"; -export * from "./SqlV1ConnectionListDataInner"; -export * from "./SqlV1ConnectionListMetadata"; -export * from "./SqlV1ConnectionMetadata"; -export * from "./SqlV1ConnectionSpec"; -export * from "./SqlV1ConnectionSpecAuthData"; -export * from "./SqlV1ConnectionStatus"; -export * from "./SqlV1PlaintextProvider"; -export * from "./SqlV1ResultSchema"; -export * from "./SqlV1ScalingStatus"; -export * from "./SqlV1Statement"; -export * from "./SqlV1StatementException"; -export * from "./SqlV1StatementExceptionList"; -export * from "./SqlV1StatementList"; -export * from "./SqlV1StatementListDataInner"; -export * from "./SqlV1StatementListMetadata"; -export * from "./SqlV1StatementMetadata"; -export * from "./SqlV1StatementResult"; -export * from "./SqlV1StatementResultResults"; -export * from "./SqlV1StatementSpec"; -export * from "./SqlV1StatementStatus"; -export * from "./SqlV1StatementTraits"; -export * from "./StatementObjectMeta"; -export * from "./UpdateSqlv1ConnectionRequest"; -export * from "./UpdateSqlv1StatementRequest"; +export * from './ColumnDetails'; +export * from './CreateSqlv1AgentRequest'; +export * from './CreateSqlv1Connection201Response'; +export * from './CreateSqlv1ConnectionRequest'; +export * from './CreateSqlv1MaterializedTable201Response'; +export * from './CreateSqlv1MaterializedTableRequest'; +export * from './CreateSqlv1Statement201Response'; +export * from './CreateSqlv1StatementRequest'; +export * from './CreateSqlv1ToolRequest'; +export * from './DataType'; +export * from './ErrorSource'; +export * from './ExceptionListMeta'; +export * from './Failure'; +export * from './GetSqlv1Connection200Response'; +export * from './GetSqlv1Statement200Response'; +export * from './GetSqlv1StatementResult200Response'; +export * from './GetSqlv1Tool200Response'; +export * from './JsonPatchRequestAddReplace'; +export * from './JsonPatchRequestMoveCopy'; +export * from './JsonPatchRequestRemove'; +export * from './ListMeta'; +export * from './ModelError'; +export * from './ObjectMeta'; +export * from './PatchRequestInner'; +export * from './ResultListMeta'; +export * from './RowFieldType'; +export * from './SqlV1Agent'; +export * from './SqlV1AgentList'; +export * from './SqlV1AgentMetadata'; +export * from './SqlV1AgentSpec'; +export * from './SqlV1AgentStatus'; +export * from './SqlV1ColumnCommon'; +export * from './SqlV1ComputedColumn'; +export * from './SqlV1Connection'; +export * from './SqlV1ConnectionList'; +export * from './SqlV1ConnectionListDataInner'; +export * from './SqlV1ConnectionListMetadata'; +export * from './SqlV1ConnectionMetadata'; +export * from './SqlV1ConnectionSpec'; +export * from './SqlV1ConnectionSpecAuthData'; +export * from './SqlV1ConnectionStatus'; +export * from './SqlV1MaterializedTable'; +export * from './SqlV1MaterializedTableColumnDetails'; +export * from './SqlV1MaterializedTableConstraint'; +export * from './SqlV1MaterializedTableDistribution'; +export * from './SqlV1MaterializedTableList'; +export * from './SqlV1MaterializedTableMetadata'; +export * from './SqlV1MaterializedTableSpec'; +export * from './SqlV1MaterializedTableStatus'; +export * from './SqlV1MaterializedTableVersion'; +export * from './SqlV1MaterializedTableVersionList'; +export * from './SqlV1MaterializedTableVersionMetadata'; +export * from './SqlV1MaterializedTableVersionSpec'; +export * from './SqlV1MaterializedTableWarning'; +export * from './SqlV1MaterializedTableWatermark'; +export * from './SqlV1MetadataColumn'; +export * from './SqlV1PhysicalColumn'; +export * from './SqlV1PlaintextProvider'; +export * from './SqlV1ResourceChange'; +export * from './SqlV1ResultSchema'; +export * from './SqlV1ScalingStatus'; +export * from './SqlV1StateLimitStatus'; +export * from './SqlV1Statement'; +export * from './SqlV1StatementException'; +export * from './SqlV1StatementExceptionList'; +export * from './SqlV1StatementList'; +export * from './SqlV1StatementListDataInner'; +export * from './SqlV1StatementListMetadata'; +export * from './SqlV1StatementMetadata'; +export * from './SqlV1StatementResult'; +export * from './SqlV1StatementResultResults'; +export * from './SqlV1StatementSpec'; +export * from './SqlV1StatementStatus'; +export * from './SqlV1StatementStatusAffectedResource'; +export * from './SqlV1StatementTraits'; +export * from './SqlV1StatementWarning'; +export * from './SqlV1Tool'; +export * from './SqlV1ToolList'; +export * from './SqlV1ToolListDataInner'; +export * from './SqlV1ToolListMetadata'; +export * from './SqlV1ToolMetadata'; +export * from './SqlV1ToolSpec'; +export * from './SqlV1ToolStatus'; +export * from './StatementObjectMeta'; +export * from './UpdateSqlv1AgentRequest'; +export * from './UpdateSqlv1ConnectionRequest'; +export * from './UpdateSqlv1MaterializedTableRequest'; +export * from './UpdateSqlv1StatementRequest'; diff --git a/src/clients/flinkSql/runtime.ts b/src/clients/flinkSql/runtime.ts index 81c0f00b14..bb1297e657 100644 --- a/src/clients/flinkSql/runtime.ts +++ b/src/clients/flinkSql/runtime.ts @@ -5,85 +5,83 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://flink.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts b/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts index e93bc29e19..36ac77420c 100644 --- a/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts +++ b/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts @@ -5,14 +5,15 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CreateWsV1Workspace201Response, CreateWsV1WorkspaceRequest, @@ -21,528 +22,390 @@ import type { PatchRequestInner, PutWsV1WorkspaceRequest, WsV1WorkspaceList, -} from "../models/index"; +} from '../models/index'; import { - CreateWsV1Workspace201ResponseFromJSON, - CreateWsV1Workspace201ResponseToJSON, - CreateWsV1WorkspaceRequestFromJSON, - CreateWsV1WorkspaceRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetWsV1Workspace200ResponseFromJSON, - GetWsV1Workspace200ResponseToJSON, - PatchRequestInnerFromJSON, - PatchRequestInnerToJSON, - PutWsV1WorkspaceRequestFromJSON, - PutWsV1WorkspaceRequestToJSON, - WsV1WorkspaceListFromJSON, - WsV1WorkspaceListToJSON, -} from "../models/index"; + CreateWsV1Workspace201ResponseFromJSON, + CreateWsV1Workspace201ResponseToJSON, + CreateWsV1WorkspaceRequestFromJSON, + CreateWsV1WorkspaceRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetWsV1Workspace200ResponseFromJSON, + GetWsV1Workspace200ResponseToJSON, + PatchRequestInnerFromJSON, + PatchRequestInnerToJSON, + PutWsV1WorkspaceRequestFromJSON, + PutWsV1WorkspaceRequestToJSON, + WsV1WorkspaceListFromJSON, + WsV1WorkspaceListToJSON, +} from '../models/index'; export interface CreateWsV1WorkspaceOperationRequest { - organization_id: string; - environment_id: string; - CreateWsV1WorkspaceRequest?: CreateWsV1WorkspaceRequest; + organization_id: string; + environment_id: string; + CreateWsV1WorkspaceRequest?: CreateWsV1WorkspaceRequest; } export interface DeleteWsV1WorkspaceRequest { - organization_id: string; - environment_id: string; - name: string; + organization_id: string; + environment_id: string; + name: string; } export interface GetWsV1WorkspaceRequest { - organization_id: string; - environment_id: string; - name: string; + organization_id: string; + environment_id: string; + name: string; } export interface ListWsV1WorkspacesRequest { - organization_id: string; - environment_id: string; - spec_compute_pool?: string; - all?: boolean; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + spec_compute_pool?: string; + all?: boolean; + page_size?: number; + page_token?: string; } export interface PatchWsV1WorkspaceRequest { - organization_id: string; - environment_id: string; - name: string; - PatchRequestInner?: Array; + organization_id: string; + environment_id: string; + name: string; + PatchRequestInner?: Array; } export interface PutWsV1WorkspaceOperationRequest { - organization_id: string; - environment_id: string; - name: string; - PutWsV1WorkspaceRequest?: PutWsV1WorkspaceRequest; + organization_id: string; + environment_id: string; + name: string; + PutWsV1WorkspaceRequest?: PutWsV1WorkspaceRequest; } /** - * + * */ export class WorkspacesWsV1Api extends runtime.BaseAPI { - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. - * Create a Workspace - */ - async createWsV1WorkspaceRaw( - requestParameters: CreateWsV1WorkspaceOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling createWsV1Workspace().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling createWsV1Workspace().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateWsV1WorkspaceRequestToJSON(requestParameters["CreateWsV1WorkspaceRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateWsV1Workspace201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. - * Create a Workspace - */ - async createWsV1Workspace( - requestParameters: CreateWsV1WorkspaceOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. - * Delete a Workspace - */ - async deleteWsV1WorkspaceRaw( - requestParameters: DeleteWsV1WorkspaceRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling deleteWsV1Workspace().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. + * Create a Workspace + */ + async createWsV1WorkspaceRaw(requestParameters: CreateWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling createWsV1Workspace().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling createWsV1Workspace().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateWsV1WorkspaceRequestToJSON(requestParameters['CreateWsV1WorkspaceRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateWsV1Workspace201ResponseFromJSON(jsonValue)); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling deleteWsV1Workspace().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. + * Create a Workspace + */ + async createWsV1Workspace(requestParameters: CreateWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteWsV1Workspace().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. + * Delete a Workspace + */ + async deleteWsV1WorkspaceRaw(requestParameters: DeleteWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling deleteWsV1Workspace().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling deleteWsV1Workspace().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteWsV1Workspace().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. - * Delete a Workspace - */ - async deleteWsV1Workspace( - requestParameters: DeleteWsV1WorkspaceRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteWsV1WorkspaceRaw(requestParameters, initOverrides); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. - * Read a Workspace - */ - async getWsV1WorkspaceRaw( - requestParameters: GetWsV1WorkspaceRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling getWsV1Workspace().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. + * Delete a Workspace + */ + async deleteWsV1Workspace(requestParameters: DeleteWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteWsV1WorkspaceRaw(requestParameters, initOverrides); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling getWsV1Workspace().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. + * Read a Workspace + */ + async getWsV1WorkspaceRaw(requestParameters: GetWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling getWsV1Workspace().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling getWsV1Workspace().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getWsV1Workspace().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetWsV1Workspace200ResponseFromJSON(jsonValue)); } - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getWsV1Workspace().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. + * Read a Workspace + */ + async getWsV1Workspace(requestParameters: GetWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetWsV1Workspace200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. - * Read a Workspace - */ - async getWsV1Workspace( - requestParameters: GetWsV1WorkspaceRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. - * List of Workspaces - */ - async listWsV1WorkspacesRaw( - requestParameters: ListWsV1WorkspacesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling listWsV1Workspaces().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. + * List of Workspaces + */ + async listWsV1WorkspacesRaw(requestParameters: ListWsV1WorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling listWsV1Workspaces().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling listWsV1Workspaces().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['spec_compute_pool'] != null) { + queryParameters['spec.compute_pool'] = requestParameters['spec_compute_pool']; + } + + if (requestParameters['all'] != null) { + queryParameters['all'] = requestParameters['all']; + } + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => WsV1WorkspaceListFromJSON(jsonValue)); } - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling listWsV1Workspaces().', - ); + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. + * List of Workspaces + */ + async listWsV1Workspaces(requestParameters: ListWsV1WorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listWsV1WorkspacesRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["spec_compute_pool"] != null) { - queryParameters["spec.compute_pool"] = requestParameters["spec_compute_pool"]; + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. + * Update a Workspace with patch request + */ + async patchWsV1WorkspaceRaw(requestParameters: PatchWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling patchWsV1Workspace().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling patchWsV1Workspace().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling patchWsV1Workspace().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json-patch+json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: requestParameters['PatchRequestInner']!.map(PatchRequestInnerToJSON), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateWsV1Workspace201ResponseFromJSON(jsonValue)); } - if (requestParameters["all"] != null) { - queryParameters["all"] = requestParameters["all"]; + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. + * Update a Workspace with patch request + */ + async patchWsV1Workspace(requestParameters: PatchWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.patchWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Workspace + */ + async putWsV1WorkspaceRaw(requestParameters: PutWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['organization_id'] == null) { + throw new runtime.RequiredError( + 'organization_id', + 'Required parameter "organization_id" was null or undefined when calling putWsV1Workspace().' + ); + } + + if (requestParameters['environment_id'] == null) { + throw new runtime.RequiredError( + 'environment_id', + 'Required parameter "environment_id" was null or undefined when calling putWsV1Workspace().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling putWsV1Workspace().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PutWsV1WorkspaceRequestToJSON(requestParameters['PutWsV1WorkspaceRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreateWsV1Workspace201ResponseFromJSON(jsonValue)); } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Workspace + */ + async putWsV1Workspace(requestParameters: PutWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.putWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - WsV1WorkspaceListFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. - * List of Workspaces - */ - async listWsV1Workspaces( - requestParameters: ListWsV1WorkspacesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listWsV1WorkspacesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. - * Update a Workspace with patch request - */ - async patchWsV1WorkspaceRaw( - requestParameters: PatchWsV1WorkspaceRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling patchWsV1Workspace().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling patchWsV1Workspace().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling patchWsV1Workspace().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json-patch+json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "PATCH", - headers: headerParameters, - query: queryParameters, - body: requestParameters["PatchRequestInner"]!.map(PatchRequestInnerToJSON), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateWsV1Workspace201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. - * Update a Workspace with patch request - */ - async patchWsV1Workspace( - requestParameters: PatchWsV1WorkspaceRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.patchWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Workspace - */ - async putWsV1WorkspaceRaw( - requestParameters: PutWsV1WorkspaceOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["organization_id"] == null) { - throw new runtime.RequiredError( - "organization_id", - 'Required parameter "organization_id" was null or undefined when calling putWsV1Workspace().', - ); - } - - if (requestParameters["environment_id"] == null) { - throw new runtime.RequiredError( - "environment_id", - 'Required parameter "environment_id" was null or undefined when calling putWsV1Workspace().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling putWsV1Workspace().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` - .replace( - `{${"organization_id"}}`, - encodeURIComponent(String(requestParameters["organization_id"])), - ) - .replace( - `{${"environment_id"}}`, - encodeURIComponent(String(requestParameters["environment_id"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: PutWsV1WorkspaceRequestToJSON(requestParameters["PutWsV1WorkspaceRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CreateWsV1Workspace201ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Workspace - */ - async putWsV1Workspace( - requestParameters: PutWsV1WorkspaceOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.putWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/flinkWorkspaces/apis/index.ts b/src/clients/flinkWorkspaces/apis/index.ts index 289f5148e8..6631128ae1 100644 --- a/src/clients/flinkWorkspaces/apis/index.ts +++ b/src/clients/flinkWorkspaces/apis/index.ts @@ -1,3 +1,3 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./WorkspacesWsV1Api"; +export * from './WorkspacesWsV1Api'; diff --git a/src/clients/flinkWorkspaces/index.ts b/src/clients/flinkWorkspaces/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/flinkWorkspaces/index.ts +++ b/src/clients/flinkWorkspaces/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts b/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts index 66b8369439..f498db0e1e 100644 --- a/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts +++ b/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts @@ -5,149 +5,142 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; +import { mapValues } from '../runtime'; +import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from "./WsV1WorkspaceStatus"; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from './WsV1WorkspaceStatus'; /** - * + * * @export * @interface CreateWsV1Workspace201Response */ export interface CreateWsV1Workspace201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly api_version: CreateWsV1Workspace201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly kind: CreateWsV1Workspace201ResponseKindEnum; - /** - * - * @type {object} - * @memberof CreateWsV1Workspace201Response - */ - metadata: object; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - name: string; - /** - * - * @type {object} - * @memberof CreateWsV1Workspace201Response - */ - spec: object; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof CreateWsV1Workspace201Response - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly api_version: CreateWsV1Workspace201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly kind: CreateWsV1Workspace201ResponseKindEnum; + /** + * + * @type {object} + * @memberof CreateWsV1Workspace201Response + */ + metadata: object; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + name: string; + /** + * + * @type {object} + * @memberof CreateWsV1Workspace201Response + */ + spec: object; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof CreateWsV1Workspace201Response + */ + status?: WsV1WorkspaceStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateWsV1Workspace201ResponseApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateWsV1Workspace201ResponseKindEnum { - Workspace = "Workspace", + Workspace = 'Workspace' } + /** * Check if a given object implements the CreateWsV1Workspace201Response interface. */ -export function instanceOfCreateWsV1Workspace201Response( - value: object, -): value is CreateWsV1Workspace201Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfCreateWsV1Workspace201Response(value: object): value is CreateWsV1Workspace201Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function CreateWsV1Workspace201ResponseFromJSON(json: any): CreateWsV1Workspace201Response { - return CreateWsV1Workspace201ResponseFromJSONTyped(json, false); + return CreateWsV1Workspace201ResponseFromJSONTyped(json, false); } -export function CreateWsV1Workspace201ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateWsV1Workspace201Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: json["metadata"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - name: json["name"], - spec: json["spec"], - status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), - }; +export function CreateWsV1Workspace201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWsV1Workspace201Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'name': json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), + }; } export function CreateWsV1Workspace201ResponseToJSON(json: any): CreateWsV1Workspace201Response { - return CreateWsV1Workspace201ResponseToJSONTyped(json, false); + return CreateWsV1Workspace201ResponseToJSONTyped(json, false); } -export function CreateWsV1Workspace201ResponseToJSONTyped( - value?: Omit< - CreateWsV1Workspace201Response, - "api_version" | "kind" | "organization_id" | "environment_id" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateWsV1Workspace201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: value["metadata"], - name: value["name"], - spec: value["spec"], - status: WsV1WorkspaceStatusToJSON(value["status"]), - }; + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'spec': value['spec'], + 'status': WsV1WorkspaceStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts index b2f1b2572a..21f68ad2d5 100644 --- a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts +++ b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts @@ -5,161 +5,152 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CreateWsV1WorkspaceRequestAllOfSpec } from "./CreateWsV1WorkspaceRequestAllOfSpec"; +import { mapValues } from '../runtime'; +import type { CreateWsV1WorkspaceRequestAllOfSpec } from './CreateWsV1WorkspaceRequestAllOfSpec'; import { - CreateWsV1WorkspaceRequestAllOfSpecFromJSON, - CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped, - CreateWsV1WorkspaceRequestAllOfSpecToJSON, - CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped, -} from "./CreateWsV1WorkspaceRequestAllOfSpec"; -import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; + CreateWsV1WorkspaceRequestAllOfSpecFromJSON, + CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped, + CreateWsV1WorkspaceRequestAllOfSpecToJSON, + CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped, +} from './CreateWsV1WorkspaceRequestAllOfSpec'; +import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from "./WsV1WorkspaceStatus"; -import type { WsV1WorkspaceMetadata } from "./WsV1WorkspaceMetadata"; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from './WsV1WorkspaceStatus'; +import type { WsV1WorkspaceMetadata } from './WsV1WorkspaceMetadata'; import { - WsV1WorkspaceMetadataFromJSON, - WsV1WorkspaceMetadataFromJSONTyped, - WsV1WorkspaceMetadataToJSON, - WsV1WorkspaceMetadataToJSONTyped, -} from "./WsV1WorkspaceMetadata"; + WsV1WorkspaceMetadataFromJSON, + WsV1WorkspaceMetadataFromJSONTyped, + WsV1WorkspaceMetadataToJSON, + WsV1WorkspaceMetadataToJSONTyped, +} from './WsV1WorkspaceMetadata'; /** - * + * * @export * @interface CreateWsV1WorkspaceRequest */ export interface CreateWsV1WorkspaceRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly api_version?: CreateWsV1WorkspaceRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly kind?: CreateWsV1WorkspaceRequestKindEnum; - /** - * - * @type {WsV1WorkspaceMetadata} - * @memberof CreateWsV1WorkspaceRequest - */ - metadata?: WsV1WorkspaceMetadata; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly environment_id?: string; - /** - * The user-supplied name for the workspace, which must be unique across the environment and region. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - name: string; - /** - * - * @type {CreateWsV1WorkspaceRequestAllOfSpec} - * @memberof CreateWsV1WorkspaceRequest - */ - spec?: CreateWsV1WorkspaceRequestAllOfSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof CreateWsV1WorkspaceRequest - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly api_version?: CreateWsV1WorkspaceRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly kind?: CreateWsV1WorkspaceRequestKindEnum; + /** + * + * @type {WsV1WorkspaceMetadata} + * @memberof CreateWsV1WorkspaceRequest + */ + metadata?: WsV1WorkspaceMetadata; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly environment_id?: string; + /** + * The user-supplied name for the workspace, which must be unique across the environment and region. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + name: string; + /** + * + * @type {CreateWsV1WorkspaceRequestAllOfSpec} + * @memberof CreateWsV1WorkspaceRequest + */ + spec?: CreateWsV1WorkspaceRequestAllOfSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof CreateWsV1WorkspaceRequest + */ + status?: WsV1WorkspaceStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateWsV1WorkspaceRequestApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateWsV1WorkspaceRequestKindEnum { - Workspace = "Workspace", + Workspace = 'Workspace' } + /** * Check if a given object implements the CreateWsV1WorkspaceRequest interface. */ -export function instanceOfCreateWsV1WorkspaceRequest( - value: object, -): value is CreateWsV1WorkspaceRequest { - if (!("name" in value) || value["name"] === undefined) return false; - return true; +export function instanceOfCreateWsV1WorkspaceRequest(value: object): value is CreateWsV1WorkspaceRequest { + if (!('name' in value) || value['name'] === undefined) return false; + return true; } export function CreateWsV1WorkspaceRequestFromJSON(json: any): CreateWsV1WorkspaceRequest { - return CreateWsV1WorkspaceRequestFromJSONTyped(json, false); + return CreateWsV1WorkspaceRequestFromJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateWsV1WorkspaceRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json["metadata"]), - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - name: json["name"], - spec: - json["spec"] == null ? undefined : CreateWsV1WorkspaceRequestAllOfSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), - }; +export function CreateWsV1WorkspaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWsV1WorkspaceRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json['metadata']), + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'name': json['name'], + 'spec': json['spec'] == null ? undefined : CreateWsV1WorkspaceRequestAllOfSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), + }; } export function CreateWsV1WorkspaceRequestToJSON(json: any): CreateWsV1WorkspaceRequest { - return CreateWsV1WorkspaceRequestToJSONTyped(json, false); + return CreateWsV1WorkspaceRequestToJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestToJSONTyped( - value?: Omit< - CreateWsV1WorkspaceRequest, - "api_version" | "kind" | "organization_id" | "environment_id" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateWsV1WorkspaceRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: WsV1WorkspaceMetadataToJSON(value["metadata"]), - name: value["name"], - spec: CreateWsV1WorkspaceRequestAllOfSpecToJSON(value["spec"]), - status: WsV1WorkspaceStatusToJSON(value["status"]), - }; + return { + + 'metadata': WsV1WorkspaceMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': CreateWsV1WorkspaceRequestAllOfSpecToJSON(value['spec']), + 'status': WsV1WorkspaceStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts index 9223b07193..0fcd12351d 100644 --- a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts +++ b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts @@ -5,102 +5,93 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CreateWsV1WorkspaceRequestAllOfSpec */ export interface CreateWsV1WorkspaceRequestAllOfSpec { - /** - * A human-readable display name for the workspace, or generated if absent. - * @type {string} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - display_name?: string; - /** - * The service account that clients can use to execute the workspace's code blocks. - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - service_account?: any | null; - /** - * The compute pool in the same environment that clients can use to execute the workspace's code blocks. - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - compute_pool?: any | null; - /** - * The ordered blocks for the new workspace - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - blocks?: any | null; - /** - * The key-value pair properties for the new workspace. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - properties?: any | null; + /** + * A human-readable display name for the workspace, or generated if absent. + * @type {string} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + display_name?: string; + /** + * The service account that clients can use to execute the workspace's code blocks. + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + service_account?: any | null; + /** + * The compute pool in the same environment that clients can use to execute the workspace's code blocks. + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + compute_pool?: any | null; + /** + * The ordered blocks for the new workspace + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + blocks?: any | null; + /** + * The key-value pair properties for the new workspace. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + properties?: any | null; } /** * Check if a given object implements the CreateWsV1WorkspaceRequestAllOfSpec interface. */ -export function instanceOfCreateWsV1WorkspaceRequestAllOfSpec( - value: object, -): value is CreateWsV1WorkspaceRequestAllOfSpec { - return true; +export function instanceOfCreateWsV1WorkspaceRequestAllOfSpec(value: object): value is CreateWsV1WorkspaceRequestAllOfSpec { + return true; } -export function CreateWsV1WorkspaceRequestAllOfSpecFromJSON( - json: any, -): CreateWsV1WorkspaceRequestAllOfSpec { - return CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); +export function CreateWsV1WorkspaceRequestAllOfSpecFromJSON(json: any): CreateWsV1WorkspaceRequestAllOfSpec { + return CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateWsV1WorkspaceRequestAllOfSpec { - if (json == null) { - return json; - } - return { - display_name: json["display_name"] == null ? undefined : json["display_name"], - service_account: json["service_account"] == null ? undefined : json["service_account"], - compute_pool: json["compute_pool"] == null ? undefined : json["compute_pool"], - blocks: json["blocks"] == null ? undefined : json["blocks"], - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWsV1WorkspaceRequestAllOfSpec { + if (json == null) { + return json; + } + return { + + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'service_account': json['service_account'] == null ? undefined : json['service_account'], + 'compute_pool': json['compute_pool'] == null ? undefined : json['compute_pool'], + 'blocks': json['blocks'] == null ? undefined : json['blocks'], + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } -export function CreateWsV1WorkspaceRequestAllOfSpecToJSON( - json: any, -): CreateWsV1WorkspaceRequestAllOfSpec { - return CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); +export function CreateWsV1WorkspaceRequestAllOfSpecToJSON(json: any): CreateWsV1WorkspaceRequestAllOfSpec { + return CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped( - value?: CreateWsV1WorkspaceRequestAllOfSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped(value?: CreateWsV1WorkspaceRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - display_name: value["display_name"], - service_account: value["service_account"], - compute_pool: value["compute_pool"], - blocks: value["blocks"], - properties: value["properties"], - }; + return { + + 'display_name': value['display_name'], + 'service_account': value['service_account'], + 'compute_pool': value['compute_pool'], + 'blocks': value['blocks'], + 'properties': value['properties'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts b/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts index a7b2b748d1..a84437888e 100644 --- a/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts +++ b/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts @@ -5,90 +5,85 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface EnvScopedObjectReference */ export interface EnvScopedObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - id: string; - /** - * Environment of the referred resource, which is the same environment as the workspace - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + id: string; + /** + * Environment of the referred resource, which is the same environment as the workspace + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the EnvScopedObjectReference interface. */ -export function instanceOfEnvScopedObjectReference( - value: object, -): value is EnvScopedObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; +export function instanceOfEnvScopedObjectReference(value: object): value is EnvScopedObjectReference { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function EnvScopedObjectReferenceFromJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceFromJSONTyped(json, false); + return EnvScopedObjectReferenceFromJSONTyped(json, false); } -export function EnvScopedObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EnvScopedObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - environment: json["environment"] == null ? undefined : json["environment"], - related: json["related"], - resource_name: json["resource_name"], - }; +export function EnvScopedObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvScopedObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'related': json['related'], + 'resource_name': json['resource_name'], + }; } export function EnvScopedObjectReferenceToJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceToJSONTyped(json, false); + return EnvScopedObjectReferenceToJSONTyped(json, false); } -export function EnvScopedObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EnvScopedObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - }; + return { + + 'id': value['id'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/ErrorSource.ts b/src/clients/flinkWorkspaces/models/ErrorSource.ts index 8bf8e1fa12..e7214f06ec 100644 --- a/src/clients/flinkWorkspaces/models/ErrorSource.ts +++ b/src/clients/flinkWorkspaces/models/ErrorSource.ts @@ -5,69 +5,69 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - pointer: json["pointer"] == null ? undefined : json["pointer"], - parameter: json["parameter"] == null ? undefined : json["parameter"], - }; + if (json == null) { + return json; + } + return { + + 'pointer': json['pointer'] == null ? undefined : json['pointer'], + 'parameter': json['parameter'] == null ? undefined : json['parameter'], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped( - value?: ErrorSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - pointer: value["pointer"], - parameter: value["parameter"], - }; + return { + + 'pointer': value['pointer'], + 'parameter': value['parameter'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/Failure.ts b/src/clients/flinkWorkspaces/models/Failure.ts index 4486f3caa0..128c9045f5 100644 --- a/src/clients/flinkWorkspaces/models/Failure.ts +++ b/src/clients/flinkWorkspaces/models/Failure.ts @@ -5,62 +5,62 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!("errors" in value) || value["errors"] === undefined) return false; - return true; + if (!('errors' in value) || value['errors'] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - errors: new Set(json["errors"]), - }; + if (json == null) { + return json; + } + return { + + 'errors': new Set(json['errors']), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped( - value?: Failure | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - errors: Array.from(value["errors"] as Set), - }; + return { + + 'errors': Array.from(value['errors'] as Set), + }; } + diff --git a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts index 47135367e0..8b0d5ea0dc 100644 --- a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts +++ b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts @@ -5,156 +5,149 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GetWsV1Workspace200ResponseAllOfSpec } from "./GetWsV1Workspace200ResponseAllOfSpec"; +import { mapValues } from '../runtime'; +import type { GetWsV1Workspace200ResponseAllOfSpec } from './GetWsV1Workspace200ResponseAllOfSpec'; import { - GetWsV1Workspace200ResponseAllOfSpecFromJSON, - GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped, - GetWsV1Workspace200ResponseAllOfSpecToJSON, - GetWsV1Workspace200ResponseAllOfSpecToJSONTyped, -} from "./GetWsV1Workspace200ResponseAllOfSpec"; -import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; + GetWsV1Workspace200ResponseAllOfSpecFromJSON, + GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped, + GetWsV1Workspace200ResponseAllOfSpecToJSON, + GetWsV1Workspace200ResponseAllOfSpecToJSONTyped, +} from './GetWsV1Workspace200ResponseAllOfSpec'; +import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from "./WsV1WorkspaceStatus"; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from './WsV1WorkspaceStatus'; /** - * + * * @export * @interface GetWsV1Workspace200Response */ export interface GetWsV1Workspace200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly api_version: GetWsV1Workspace200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly kind: GetWsV1Workspace200ResponseKindEnum; - /** - * - * @type {object} - * @memberof GetWsV1Workspace200Response - */ - metadata: object; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - name: string; - /** - * - * @type {GetWsV1Workspace200ResponseAllOfSpec} - * @memberof GetWsV1Workspace200Response - */ - spec: GetWsV1Workspace200ResponseAllOfSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof GetWsV1Workspace200Response - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly api_version: GetWsV1Workspace200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly kind: GetWsV1Workspace200ResponseKindEnum; + /** + * + * @type {object} + * @memberof GetWsV1Workspace200Response + */ + metadata: object; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + name: string; + /** + * + * @type {GetWsV1Workspace200ResponseAllOfSpec} + * @memberof GetWsV1Workspace200Response + */ + spec: GetWsV1Workspace200ResponseAllOfSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof GetWsV1Workspace200Response + */ + status?: WsV1WorkspaceStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetWsV1Workspace200ResponseApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetWsV1Workspace200ResponseKindEnum { - Workspace = "Workspace", + Workspace = 'Workspace' } + /** * Check if a given object implements the GetWsV1Workspace200Response interface. */ -export function instanceOfGetWsV1Workspace200Response( - value: object, -): value is GetWsV1Workspace200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfGetWsV1Workspace200Response(value: object): value is GetWsV1Workspace200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function GetWsV1Workspace200ResponseFromJSON(json: any): GetWsV1Workspace200Response { - return GetWsV1Workspace200ResponseFromJSONTyped(json, false); + return GetWsV1Workspace200ResponseFromJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetWsV1Workspace200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: json["metadata"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - name: json["name"], - spec: GetWsV1Workspace200ResponseAllOfSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), - }; +export function GetWsV1Workspace200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetWsV1Workspace200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'name': json['name'], + 'spec': GetWsV1Workspace200ResponseAllOfSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), + }; } export function GetWsV1Workspace200ResponseToJSON(json: any): GetWsV1Workspace200Response { - return GetWsV1Workspace200ResponseToJSONTyped(json, false); + return GetWsV1Workspace200ResponseToJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseToJSONTyped( - value?: Omit< - GetWsV1Workspace200Response, - "api_version" | "kind" | "organization_id" | "environment_id" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetWsV1Workspace200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: value["metadata"], - name: value["name"], - spec: GetWsV1Workspace200ResponseAllOfSpecToJSON(value["spec"]), - status: WsV1WorkspaceStatusToJSON(value["status"]), - }; + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'spec': GetWsV1Workspace200ResponseAllOfSpecToJSON(value['spec']), + 'status': WsV1WorkspaceStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts index e841274bfa..cbfd707d16 100644 --- a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts +++ b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts @@ -5,113 +5,102 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { WsV1Block } from "./WsV1Block"; +import { mapValues } from '../runtime'; +import type { WsV1Block } from './WsV1Block'; import { - WsV1BlockFromJSON, - WsV1BlockFromJSONTyped, - WsV1BlockToJSON, - WsV1BlockToJSONTyped, -} from "./WsV1Block"; + WsV1BlockFromJSON, + WsV1BlockFromJSONTyped, + WsV1BlockToJSON, + WsV1BlockToJSONTyped, +} from './WsV1Block'; /** - * + * * @export * @interface GetWsV1Workspace200ResponseAllOfSpec */ export interface GetWsV1Workspace200ResponseAllOfSpec { - /** - * A human-readable display name for the workspace. - * @type {string} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - display_name: string; - /** - * - * @type {any} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - compute_pool?: any | null; - /** - * - * @type {any} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - service_account?: any | null; - /** - * The ordered blocks for the workspace - * @type {Array} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - blocks?: Array; - /** - * A map (key-value pairs) of workspace-level properties. - * @type {{ [key: string]: string; }} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - properties?: { [key: string]: string }; + /** + * A human-readable display name for the workspace. + * @type {string} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + display_name: string; + /** + * + * @type {any} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + compute_pool?: any | null; + /** + * + * @type {any} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + service_account?: any | null; + /** + * The ordered blocks for the workspace + * @type {Array} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + blocks?: Array; + /** + * A map (key-value pairs) of workspace-level properties. + * @type {{ [key: string]: string; }} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + properties?: { [key: string]: string; }; } /** * Check if a given object implements the GetWsV1Workspace200ResponseAllOfSpec interface. */ -export function instanceOfGetWsV1Workspace200ResponseAllOfSpec( - value: object, -): value is GetWsV1Workspace200ResponseAllOfSpec { - if (!("display_name" in value) || value["display_name"] === undefined) return false; - return true; +export function instanceOfGetWsV1Workspace200ResponseAllOfSpec(value: object): value is GetWsV1Workspace200ResponseAllOfSpec { + if (!('display_name' in value) || value['display_name'] === undefined) return false; + return true; } -export function GetWsV1Workspace200ResponseAllOfSpecFromJSON( - json: any, -): GetWsV1Workspace200ResponseAllOfSpec { - return GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped(json, false); +export function GetWsV1Workspace200ResponseAllOfSpecFromJSON(json: any): GetWsV1Workspace200ResponseAllOfSpec { + return GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetWsV1Workspace200ResponseAllOfSpec { - if (json == null) { - return json; - } - return { - display_name: json["display_name"], - compute_pool: json["compute_pool"] == null ? undefined : json["compute_pool"], - service_account: json["service_account"] == null ? undefined : json["service_account"], - blocks: - json["blocks"] == null ? undefined : (json["blocks"] as Array).map(WsV1BlockFromJSON), - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetWsV1Workspace200ResponseAllOfSpec { + if (json == null) { + return json; + } + return { + + 'display_name': json['display_name'], + 'compute_pool': json['compute_pool'] == null ? undefined : json['compute_pool'], + 'service_account': json['service_account'] == null ? undefined : json['service_account'], + 'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array).map(WsV1BlockFromJSON)), + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } -export function GetWsV1Workspace200ResponseAllOfSpecToJSON( - json: any, -): GetWsV1Workspace200ResponseAllOfSpec { - return GetWsV1Workspace200ResponseAllOfSpecToJSONTyped(json, false); +export function GetWsV1Workspace200ResponseAllOfSpecToJSON(json: any): GetWsV1Workspace200ResponseAllOfSpec { + return GetWsV1Workspace200ResponseAllOfSpecToJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseAllOfSpecToJSONTyped( - value?: GetWsV1Workspace200ResponseAllOfSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetWsV1Workspace200ResponseAllOfSpecToJSONTyped(value?: GetWsV1Workspace200ResponseAllOfSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - display_name: value["display_name"], - compute_pool: value["compute_pool"], - service_account: value["service_account"], - blocks: - value["blocks"] == null ? undefined : (value["blocks"] as Array).map(WsV1BlockToJSON), - properties: value["properties"], - }; + return { + + 'display_name': value['display_name'], + 'compute_pool': value['compute_pool'], + 'service_account': value['service_account'], + 'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array).map(WsV1BlockToJSON)), + 'properties': value['properties'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts b/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts index 8c560369ad..2fd58ee04b 100644 --- a/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts +++ b/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts @@ -5,81 +5,78 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface GlobalObjectReference */ export interface GlobalObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - id: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof GlobalObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + id: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof GlobalObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the GlobalObjectReference interface. */ export function instanceOfGlobalObjectReference(value: object): value is GlobalObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function GlobalObjectReferenceFromJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceFromJSONTyped(json, false); + return GlobalObjectReferenceFromJSONTyped(json, false); } -export function GlobalObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GlobalObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - related: json["related"], - resource_name: json["resource_name"], - }; +export function GlobalObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'related': json['related'], + 'resource_name': json['resource_name'], + }; } export function GlobalObjectReferenceToJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceToJSONTyped(json, false); + return GlobalObjectReferenceToJSONTyped(json, false); } -export function GlobalObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GlobalObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - }; + return { + + 'id': value['id'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts b/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts index fa2442e700..748d485f17 100644 --- a/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts +++ b/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts @@ -5,95 +5,91 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * This option is used to add or replace a value for a field * @export * @interface JSONPatchRequestAddReplace */ export interface JSONPatchRequestAddReplace { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestAddReplace - */ - path: string; - /** - * The value to add, replace or test. - * @type {any} - * @memberof JSONPatchRequestAddReplace - */ - value: any | null; - /** - * The operation to perform. - * @type {string} - * @memberof JSONPatchRequestAddReplace - */ - op: JSONPatchRequestAddReplaceOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestAddReplace + */ + path: string; + /** + * The value to add, replace or test. + * @type {any} + * @memberof JSONPatchRequestAddReplace + */ + value: any | null; + /** + * The operation to perform. + * @type {string} + * @memberof JSONPatchRequestAddReplace + */ + op: JSONPatchRequestAddReplaceOpEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum JSONPatchRequestAddReplaceOpEnum { - Add = "add", - Replace = "replace", - Test = "test", + Add = 'add', + Replace = 'replace', + Test = 'test' } + /** * Check if a given object implements the JSONPatchRequestAddReplace interface. */ -export function instanceOfJSONPatchRequestAddReplace( - value: object, -): value is JSONPatchRequestAddReplace { - if (!("path" in value) || value["path"] === undefined) return false; - if (!("value" in value) || value["value"] === undefined) return false; - if (!("op" in value) || value["op"] === undefined) return false; - return true; +export function instanceOfJSONPatchRequestAddReplace(value: object): value is JSONPatchRequestAddReplace { + if (!('path' in value) || value['path'] === undefined) return false; + if (!('value' in value) || value['value'] === undefined) return false; + if (!('op' in value) || value['op'] === undefined) return false; + return true; } export function JSONPatchRequestAddReplaceFromJSON(json: any): JSONPatchRequestAddReplace { - return JSONPatchRequestAddReplaceFromJSONTyped(json, false); + return JSONPatchRequestAddReplaceFromJSONTyped(json, false); } -export function JSONPatchRequestAddReplaceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): JSONPatchRequestAddReplace { - if (json == null) { - return json; - } - return { - path: json["path"], - value: json["value"], - op: json["op"], - }; +export function JSONPatchRequestAddReplaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchRequestAddReplace { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'value': json['value'], + 'op': json['op'], + }; } export function JSONPatchRequestAddReplaceToJSON(json: any): JSONPatchRequestAddReplace { - return JSONPatchRequestAddReplaceToJSONTyped(json, false); + return JSONPatchRequestAddReplaceToJSONTyped(json, false); } -export function JSONPatchRequestAddReplaceToJSONTyped( - value?: JSONPatchRequestAddReplace | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JSONPatchRequestAddReplaceToJSONTyped(value?: JSONPatchRequestAddReplace | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - value: value["value"], - op: value["op"], - }; + return { + + 'path': value['path'], + 'value': value['value'], + 'op': value['op'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts b/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts index 233ccec7b9..e17cd23b1e 100644 --- a/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts +++ b/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts @@ -5,94 +5,90 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * This option is used to move or copy a field * @export * @interface JSONPatchRequestMoveCopy */ export interface JSONPatchRequestMoveCopy { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestMoveCopy - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JSONPatchRequestMoveCopy - */ - op: JSONPatchRequestMoveCopyOpEnum; - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestMoveCopy - */ - from: string; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestMoveCopy + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JSONPatchRequestMoveCopy + */ + op: JSONPatchRequestMoveCopyOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestMoveCopy + */ + from: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum JSONPatchRequestMoveCopyOpEnum { - Move = "move", - Copy = "copy", + Move = 'move', + Copy = 'copy' } + /** * Check if a given object implements the JSONPatchRequestMoveCopy interface. */ -export function instanceOfJSONPatchRequestMoveCopy( - value: object, -): value is JSONPatchRequestMoveCopy { - if (!("path" in value) || value["path"] === undefined) return false; - if (!("op" in value) || value["op"] === undefined) return false; - if (!("from" in value) || value["from"] === undefined) return false; - return true; +export function instanceOfJSONPatchRequestMoveCopy(value: object): value is JSONPatchRequestMoveCopy { + if (!('path' in value) || value['path'] === undefined) return false; + if (!('op' in value) || value['op'] === undefined) return false; + if (!('from' in value) || value['from'] === undefined) return false; + return true; } export function JSONPatchRequestMoveCopyFromJSON(json: any): JSONPatchRequestMoveCopy { - return JSONPatchRequestMoveCopyFromJSONTyped(json, false); + return JSONPatchRequestMoveCopyFromJSONTyped(json, false); } -export function JSONPatchRequestMoveCopyFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): JSONPatchRequestMoveCopy { - if (json == null) { - return json; - } - return { - path: json["path"], - op: json["op"], - from: json["from"], - }; +export function JSONPatchRequestMoveCopyFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchRequestMoveCopy { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'op': json['op'], + 'from': json['from'], + }; } export function JSONPatchRequestMoveCopyToJSON(json: any): JSONPatchRequestMoveCopy { - return JSONPatchRequestMoveCopyToJSONTyped(json, false); + return JSONPatchRequestMoveCopyToJSONTyped(json, false); } -export function JSONPatchRequestMoveCopyToJSONTyped( - value?: JSONPatchRequestMoveCopy | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JSONPatchRequestMoveCopyToJSONTyped(value?: JSONPatchRequestMoveCopy | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - op: value["op"], - from: value["from"], - }; + return { + + 'path': value['path'], + 'op': value['op'], + 'from': value['from'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts b/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts index 40d0815188..54dd8740cb 100644 --- a/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts +++ b/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts @@ -5,82 +5,80 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * This option is used to remove a field * @export * @interface JSONPatchRequestRemove */ export interface JSONPatchRequestRemove { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestRemove - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JSONPatchRequestRemove - */ - op: JSONPatchRequestRemoveOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestRemove + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JSONPatchRequestRemove + */ + op: JSONPatchRequestRemoveOpEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum JSONPatchRequestRemoveOpEnum { - Remove = "remove", + Remove = 'remove' } + /** * Check if a given object implements the JSONPatchRequestRemove interface. */ export function instanceOfJSONPatchRequestRemove(value: object): value is JSONPatchRequestRemove { - if (!("path" in value) || value["path"] === undefined) return false; - if (!("op" in value) || value["op"] === undefined) return false; - return true; + if (!('path' in value) || value['path'] === undefined) return false; + if (!('op' in value) || value['op'] === undefined) return false; + return true; } export function JSONPatchRequestRemoveFromJSON(json: any): JSONPatchRequestRemove { - return JSONPatchRequestRemoveFromJSONTyped(json, false); + return JSONPatchRequestRemoveFromJSONTyped(json, false); } -export function JSONPatchRequestRemoveFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): JSONPatchRequestRemove { - if (json == null) { - return json; - } - return { - path: json["path"], - op: json["op"], - }; +export function JSONPatchRequestRemoveFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchRequestRemove { + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'op': json['op'], + }; } export function JSONPatchRequestRemoveToJSON(json: any): JSONPatchRequestRemove { - return JSONPatchRequestRemoveToJSONTyped(json, false); + return JSONPatchRequestRemoveToJSONTyped(json, false); } -export function JSONPatchRequestRemoveToJSONTyped( - value?: JSONPatchRequestRemove | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JSONPatchRequestRemoveToJSONTyped(value?: JSONPatchRequestRemove | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - op: value["op"], - }; + return { + + 'path': value['path'], + 'op': value['op'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/ListMeta.ts b/src/clients/flinkWorkspaces/models/ListMeta.ts index e41cfc7e7b..8d544c67b8 100644 --- a/src/clients/flinkWorkspaces/models/ListMeta.ts +++ b/src/clients/flinkWorkspaces/models/ListMeta.ts @@ -5,69 +5,69 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ListMeta - */ - self?: string; - /** - * A URL that can be followed to get the next batch of results. - * @type {string} - * @memberof ListMeta - */ - next?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ListMeta + */ + self?: string; + /** + * A URL that can be followed to get the next batch of results. + * @type {string} + * @memberof ListMeta + */ + next?: string; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - next: json["next"] == null ? undefined : json["next"], - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped( - value?: ListMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/ModelError.ts b/src/clients/flinkWorkspaces/models/ModelError.ts index 19aa3eb91a..4ef58c78af 100644 --- a/src/clients/flinkWorkspaces/models/ModelError.ts +++ b/src/clients/flinkWorkspaces/models/ModelError.ts @@ -5,21 +5,21 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorSource } from "./ErrorSource"; +import { mapValues } from '../runtime'; +import type { ErrorSource } from './ErrorSource'; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from "./ErrorSource"; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from './ErrorSource'; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - status: json["status"] == null ? undefined : json["status"], - code: json["code"] == null ? undefined : json["code"], - title: json["title"] == null ? undefined : json["title"], - detail: json["detail"] == null ? undefined : json["detail"], - source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'code': json['code'] == null ? undefined : json['code'], + 'title': json['title'] == null ? undefined : json['title'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped( - value?: ModelError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - status: value["status"], - code: value["code"], - title: value["title"], - detail: value["detail"], - source: ErrorSourceToJSON(value["source"]), - }; + return { + + 'id': value['id'], + 'status': value['status'], + 'code': value['code'], + 'title': value['title'], + 'detail': value['detail'], + 'source': ErrorSourceToJSON(value['source']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/ObjectMeta.ts b/src/clients/flinkWorkspaces/models/ObjectMeta.ts index 39030c36aa..07cdf1df29 100644 --- a/src/clients/flinkWorkspaces/models/ObjectMeta.ts +++ b/src/clients/flinkWorkspaces/models/ObjectMeta.ts @@ -5,98 +5,96 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The metadata of the workspace. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * The system-generated identifier of the resource that is unique across space and time. - * @type {string} - * @memberof ObjectMeta - */ - readonly uid?: string; - /** - * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_version?: string; - /** - * The system-generated and managed principal ID of the user who created the workspace. - * @type {string} - * @memberof ObjectMeta - */ - readonly created_by?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * The system-generated identifier of the resource that is unique across space and time. + * @type {string} + * @memberof ObjectMeta + */ + readonly uid?: string; + /** + * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_version?: string; + /** + * The system-generated and managed principal ID of the user who created the workspace. + * @type {string} + * @memberof ObjectMeta + */ + readonly created_by?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - self: json["self"], - uid: json["uid"] == null ? undefined : json["uid"], - resource_version: json["resource_version"] == null ? undefined : json["resource_version"], - created_by: json["created_by"] == null ? undefined : json["created_by"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'created_by': json['created_by'] == null ? undefined : json['created_by'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped( - value?: Omit< - ObjectMeta, - "self" | "uid" | "resource_version" | "created_by" | "created_at" | "updated_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkWorkspaces/models/PatchRequestInner.ts b/src/clients/flinkWorkspaces/models/PatchRequestInner.ts index bf1739698d..731ce4b8f0 100644 --- a/src/clients/flinkWorkspaces/models/PatchRequestInner.ts +++ b/src/clients/flinkWorkspaces/models/PatchRequestInner.ts @@ -5,90 +5,82 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { JSONPatchRequestAddReplace } from "./JSONPatchRequestAddReplace"; +import type { JSONPatchRequestAddReplace } from './JSONPatchRequestAddReplace'; import { - instanceOfJSONPatchRequestAddReplace, - JSONPatchRequestAddReplaceFromJSON, - JSONPatchRequestAddReplaceFromJSONTyped, - JSONPatchRequestAddReplaceToJSON, -} from "./JSONPatchRequestAddReplace"; -import type { JSONPatchRequestMoveCopy } from "./JSONPatchRequestMoveCopy"; + instanceOfJSONPatchRequestAddReplace, + JSONPatchRequestAddReplaceFromJSON, + JSONPatchRequestAddReplaceFromJSONTyped, + JSONPatchRequestAddReplaceToJSON, +} from './JSONPatchRequestAddReplace'; +import type { JSONPatchRequestMoveCopy } from './JSONPatchRequestMoveCopy'; import { - instanceOfJSONPatchRequestMoveCopy, - JSONPatchRequestMoveCopyFromJSON, - JSONPatchRequestMoveCopyFromJSONTyped, - JSONPatchRequestMoveCopyToJSON, -} from "./JSONPatchRequestMoveCopy"; -import type { JSONPatchRequestRemove } from "./JSONPatchRequestRemove"; + instanceOfJSONPatchRequestMoveCopy, + JSONPatchRequestMoveCopyFromJSON, + JSONPatchRequestMoveCopyFromJSONTyped, + JSONPatchRequestMoveCopyToJSON, +} from './JSONPatchRequestMoveCopy'; +import type { JSONPatchRequestRemove } from './JSONPatchRequestRemove'; import { - instanceOfJSONPatchRequestRemove, - JSONPatchRequestRemoveFromJSON, - JSONPatchRequestRemoveFromJSONTyped, - JSONPatchRequestRemoveToJSON, -} from "./JSONPatchRequestRemove"; + instanceOfJSONPatchRequestRemove, + JSONPatchRequestRemoveFromJSON, + JSONPatchRequestRemoveFromJSONTyped, + JSONPatchRequestRemoveToJSON, +} from './JSONPatchRequestRemove'; /** * @type PatchRequestInner - * + * * @export */ -export type PatchRequestInner = - | JSONPatchRequestAddReplace - | JSONPatchRequestMoveCopy - | JSONPatchRequestRemove; +export type PatchRequestInner = JSONPatchRequestAddReplace | JSONPatchRequestMoveCopy | JSONPatchRequestRemove; export function PatchRequestInnerFromJSON(json: any): PatchRequestInner { - return PatchRequestInnerFromJSONTyped(json, false); + return PatchRequestInnerFromJSONTyped(json, false); } -export function PatchRequestInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PatchRequestInner { - if (json == null) { - return json; - } - if (instanceOfJSONPatchRequestAddReplace(json)) { - return JSONPatchRequestAddReplaceFromJSONTyped(json, true); - } - if (instanceOfJSONPatchRequestMoveCopy(json)) { - return JSONPatchRequestMoveCopyFromJSONTyped(json, true); - } - if (instanceOfJSONPatchRequestRemove(json)) { - return JSONPatchRequestRemoveFromJSONTyped(json, true); - } +export function PatchRequestInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchRequestInner { + if (json == null) { + return json; + } + if (instanceOfJSONPatchRequestAddReplace(json)) { + return JSONPatchRequestAddReplaceFromJSONTyped(json, true); + } + if (instanceOfJSONPatchRequestMoveCopy(json)) { + return JSONPatchRequestMoveCopyFromJSONTyped(json, true); + } + if (instanceOfJSONPatchRequestRemove(json)) { + return JSONPatchRequestRemoveFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function PatchRequestInnerToJSON(json: any): any { - return PatchRequestInnerToJSONTyped(json, false); + return PatchRequestInnerToJSONTyped(json, false); } -export function PatchRequestInnerToJSONTyped( - value?: PatchRequestInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PatchRequestInnerToJSONTyped(value?: PatchRequestInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - if (instanceOfJSONPatchRequestAddReplace(value)) { - return JSONPatchRequestAddReplaceToJSON(value as JSONPatchRequestAddReplace); - } - if (instanceOfJSONPatchRequestMoveCopy(value)) { - return JSONPatchRequestMoveCopyToJSON(value as JSONPatchRequestMoveCopy); - } - if (instanceOfJSONPatchRequestRemove(value)) { - return JSONPatchRequestRemoveToJSON(value as JSONPatchRequestRemove); - } + if (instanceOfJSONPatchRequestAddReplace(value)) { + return JSONPatchRequestAddReplaceToJSON(value as JSONPatchRequestAddReplace); + } + if (instanceOfJSONPatchRequestMoveCopy(value)) { + return JSONPatchRequestMoveCopyToJSON(value as JSONPatchRequestMoveCopy); + } + if (instanceOfJSONPatchRequestRemove(value)) { + return JSONPatchRequestRemoveToJSON(value as JSONPatchRequestRemove); + } - return {}; + return {}; } + diff --git a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts index 5f7ba7089a..88e2bd9221 100644 --- a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts +++ b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts @@ -5,157 +5,152 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PutWsV1WorkspaceRequestAllOfMetadata } from "./PutWsV1WorkspaceRequestAllOfMetadata"; +import { mapValues } from '../runtime'; +import type { PutWsV1WorkspaceRequestAllOfMetadata } from './PutWsV1WorkspaceRequestAllOfMetadata'; import { - PutWsV1WorkspaceRequestAllOfMetadataFromJSON, - PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped, - PutWsV1WorkspaceRequestAllOfMetadataToJSON, - PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped, -} from "./PutWsV1WorkspaceRequestAllOfMetadata"; -import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; + PutWsV1WorkspaceRequestAllOfMetadataFromJSON, + PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped, + PutWsV1WorkspaceRequestAllOfMetadataToJSON, + PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped, +} from './PutWsV1WorkspaceRequestAllOfMetadata'; +import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from "./WsV1WorkspaceStatus"; -import type { PutWsV1WorkspaceRequestAllOfSpec } from "./PutWsV1WorkspaceRequestAllOfSpec"; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from './WsV1WorkspaceStatus'; +import type { PutWsV1WorkspaceRequestAllOfSpec } from './PutWsV1WorkspaceRequestAllOfSpec'; import { - PutWsV1WorkspaceRequestAllOfSpecFromJSON, - PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped, - PutWsV1WorkspaceRequestAllOfSpecToJSON, - PutWsV1WorkspaceRequestAllOfSpecToJSONTyped, -} from "./PutWsV1WorkspaceRequestAllOfSpec"; + PutWsV1WorkspaceRequestAllOfSpecFromJSON, + PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped, + PutWsV1WorkspaceRequestAllOfSpecToJSON, + PutWsV1WorkspaceRequestAllOfSpecToJSONTyped, +} from './PutWsV1WorkspaceRequestAllOfSpec'; /** - * + * * @export * @interface PutWsV1WorkspaceRequest */ export interface PutWsV1WorkspaceRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly api_version?: PutWsV1WorkspaceRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly kind?: PutWsV1WorkspaceRequestKindEnum; - /** - * - * @type {PutWsV1WorkspaceRequestAllOfMetadata} - * @memberof PutWsV1WorkspaceRequest - */ - metadata: PutWsV1WorkspaceRequestAllOfMetadata; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly environment_id?: string; - /** - * The identifier for the workspace, which may not be changed and any provided value is ignored. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - name?: string; - /** - * - * @type {PutWsV1WorkspaceRequestAllOfSpec} - * @memberof PutWsV1WorkspaceRequest - */ - spec?: PutWsV1WorkspaceRequestAllOfSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof PutWsV1WorkspaceRequest - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly api_version?: PutWsV1WorkspaceRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly kind?: PutWsV1WorkspaceRequestKindEnum; + /** + * + * @type {PutWsV1WorkspaceRequestAllOfMetadata} + * @memberof PutWsV1WorkspaceRequest + */ + metadata: PutWsV1WorkspaceRequestAllOfMetadata; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly environment_id?: string; + /** + * The identifier for the workspace, which may not be changed and any provided value is ignored. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + name?: string; + /** + * + * @type {PutWsV1WorkspaceRequestAllOfSpec} + * @memberof PutWsV1WorkspaceRequest + */ + spec?: PutWsV1WorkspaceRequestAllOfSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof PutWsV1WorkspaceRequest + */ + status?: WsV1WorkspaceStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PutWsV1WorkspaceRequestApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum PutWsV1WorkspaceRequestKindEnum { - Workspace = "Workspace", + Workspace = 'Workspace' } + /** * Check if a given object implements the PutWsV1WorkspaceRequest interface. */ export function instanceOfPutWsV1WorkspaceRequest(value: object): value is PutWsV1WorkspaceRequest { - if (!("metadata" in value) || value["metadata"] === undefined) return false; - return true; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + return true; } export function PutWsV1WorkspaceRequestFromJSON(json: any): PutWsV1WorkspaceRequest { - return PutWsV1WorkspaceRequestFromJSONTyped(json, false); + return PutWsV1WorkspaceRequestFromJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PutWsV1WorkspaceRequest { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: PutWsV1WorkspaceRequestAllOfMetadataFromJSON(json["metadata"]), - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - name: json["name"] == null ? undefined : json["name"], - spec: json["spec"] == null ? undefined : PutWsV1WorkspaceRequestAllOfSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), - }; +export function PutWsV1WorkspaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutWsV1WorkspaceRequest { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': PutWsV1WorkspaceRequestAllOfMetadataFromJSON(json['metadata']), + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'name': json['name'] == null ? undefined : json['name'], + 'spec': json['spec'] == null ? undefined : PutWsV1WorkspaceRequestAllOfSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), + }; } export function PutWsV1WorkspaceRequestToJSON(json: any): PutWsV1WorkspaceRequest { - return PutWsV1WorkspaceRequestToJSONTyped(json, false); + return PutWsV1WorkspaceRequestToJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestToJSONTyped( - value?: Omit< - PutWsV1WorkspaceRequest, - "api_version" | "kind" | "organization_id" | "environment_id" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PutWsV1WorkspaceRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: PutWsV1WorkspaceRequestAllOfMetadataToJSON(value["metadata"]), - name: value["name"], - spec: PutWsV1WorkspaceRequestAllOfSpecToJSON(value["spec"]), - status: WsV1WorkspaceStatusToJSON(value["status"]), - }; + return { + + 'metadata': PutWsV1WorkspaceRequestAllOfMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': PutWsV1WorkspaceRequestAllOfSpecToJSON(value['spec']), + 'status': WsV1WorkspaceStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts index 645b7e2241..878163d244 100644 --- a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts +++ b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts @@ -5,71 +5,62 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PutWsV1WorkspaceRequestAllOfMetadata */ export interface PutWsV1WorkspaceRequestAllOfMetadata { - /** - * The system-generated opaque version from the workspace representation most recent read by the client before making the update request. It is used for optimistic locking and client-side detection of changes. A client includes this version to instruct the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). If the update fails, the client should re-read the workspace, apply the changes to the new representation while keeping the newer the resource version, and submit another update request. - * @type {any} - * @memberof PutWsV1WorkspaceRequestAllOfMetadata - */ - resource_version: any | null; + /** + * The system-generated opaque version from the workspace representation most recent read by the client before making the update request. It is used for optimistic locking and client-side detection of changes. A client includes this version to instruct the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). If the update fails, the client should re-read the workspace, apply the changes to the new representation while keeping the newer the resource version, and submit another update request. + * @type {any} + * @memberof PutWsV1WorkspaceRequestAllOfMetadata + */ + resource_version: any | null; } /** * Check if a given object implements the PutWsV1WorkspaceRequestAllOfMetadata interface. */ -export function instanceOfPutWsV1WorkspaceRequestAllOfMetadata( - value: object, -): value is PutWsV1WorkspaceRequestAllOfMetadata { - if (!("resource_version" in value) || value["resource_version"] === undefined) return false; - return true; +export function instanceOfPutWsV1WorkspaceRequestAllOfMetadata(value: object): value is PutWsV1WorkspaceRequestAllOfMetadata { + if (!('resource_version' in value) || value['resource_version'] === undefined) return false; + return true; } -export function PutWsV1WorkspaceRequestAllOfMetadataFromJSON( - json: any, -): PutWsV1WorkspaceRequestAllOfMetadata { - return PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfMetadataFromJSON(json: any): PutWsV1WorkspaceRequestAllOfMetadata { + return PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PutWsV1WorkspaceRequestAllOfMetadata { - if (json == null) { - return json; - } - return { - resource_version: json["resource_version"], - }; +export function PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutWsV1WorkspaceRequestAllOfMetadata { + if (json == null) { + return json; + } + return { + + 'resource_version': json['resource_version'], + }; } -export function PutWsV1WorkspaceRequestAllOfMetadataToJSON( - json: any, -): PutWsV1WorkspaceRequestAllOfMetadata { - return PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfMetadataToJSON(json: any): PutWsV1WorkspaceRequestAllOfMetadata { + return PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped( - value?: PutWsV1WorkspaceRequestAllOfMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped(value?: PutWsV1WorkspaceRequestAllOfMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - resource_version: value["resource_version"], - }; + return { + + 'resource_version': value['resource_version'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts index cdd7654787..760df3e445 100644 --- a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts +++ b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts @@ -5,78 +5,69 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PutWsV1WorkspaceRequestAllOfSpec */ export interface PutWsV1WorkspaceRequestAllOfSpec { - /** - * - * @type {any} - * @memberof PutWsV1WorkspaceRequestAllOfSpec - */ - compute_pool?: any | null; - /** - * - * @type {any} - * @memberof PutWsV1WorkspaceRequestAllOfSpec - */ - service_account?: any | null; + /** + * + * @type {any} + * @memberof PutWsV1WorkspaceRequestAllOfSpec + */ + compute_pool?: any | null; + /** + * + * @type {any} + * @memberof PutWsV1WorkspaceRequestAllOfSpec + */ + service_account?: any | null; } /** * Check if a given object implements the PutWsV1WorkspaceRequestAllOfSpec interface. */ -export function instanceOfPutWsV1WorkspaceRequestAllOfSpec( - value: object, -): value is PutWsV1WorkspaceRequestAllOfSpec { - return true; +export function instanceOfPutWsV1WorkspaceRequestAllOfSpec(value: object): value is PutWsV1WorkspaceRequestAllOfSpec { + return true; } -export function PutWsV1WorkspaceRequestAllOfSpecFromJSON( - json: any, -): PutWsV1WorkspaceRequestAllOfSpec { - return PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfSpecFromJSON(json: any): PutWsV1WorkspaceRequestAllOfSpec { + return PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PutWsV1WorkspaceRequestAllOfSpec { - if (json == null) { - return json; - } - return { - compute_pool: json["compute_pool"] == null ? undefined : json["compute_pool"], - service_account: json["service_account"] == null ? undefined : json["service_account"], - }; +export function PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutWsV1WorkspaceRequestAllOfSpec { + if (json == null) { + return json; + } + return { + + 'compute_pool': json['compute_pool'] == null ? undefined : json['compute_pool'], + 'service_account': json['service_account'] == null ? undefined : json['service_account'], + }; } -export function PutWsV1WorkspaceRequestAllOfSpecToJSON( - json: any, -): PutWsV1WorkspaceRequestAllOfSpec { - return PutWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfSpecToJSON(json: any): PutWsV1WorkspaceRequestAllOfSpec { + return PutWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfSpecToJSONTyped( - value?: PutWsV1WorkspaceRequestAllOfSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PutWsV1WorkspaceRequestAllOfSpecToJSONTyped(value?: PutWsV1WorkspaceRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - compute_pool: value["compute_pool"], - service_account: value["service_account"], - }; + return { + + 'compute_pool': value['compute_pool'], + 'service_account': value['service_account'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1Block.ts b/src/clients/flinkWorkspaces/models/WsV1Block.ts index 0e1af7f354..207903f5c9 100644 --- a/src/clients/flinkWorkspaces/models/WsV1Block.ts +++ b/src/clients/flinkWorkspaces/models/WsV1Block.ts @@ -5,21 +5,21 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { WsV1CodeOptions } from "./WsV1CodeOptions"; +import { mapValues } from '../runtime'; +import type { WsV1CodeOptions } from './WsV1CodeOptions'; import { - WsV1CodeOptionsFromJSON, - WsV1CodeOptionsFromJSONTyped, - WsV1CodeOptionsToJSON, - WsV1CodeOptionsToJSONTyped, -} from "./WsV1CodeOptions"; + WsV1CodeOptionsFromJSON, + WsV1CodeOptionsFromJSONTyped, + WsV1CodeOptionsToJSON, + WsV1CodeOptionsToJSONTyped, +} from './WsV1CodeOptions'; /** * A block within a workspace. @@ -27,72 +27,72 @@ import { * @interface WsV1Block */ export interface WsV1Block { - /** - * The type of block. - * @type {string} - * @memberof WsV1Block - */ - type?: WsV1BlockTypeEnum; - /** - * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {{ [key: string]: string; }} - * @memberof WsV1Block - */ - properties?: { [key: string]: string }; - /** - * - * @type {WsV1CodeOptions} - * @memberof WsV1Block - */ - code_options?: WsV1CodeOptions; + /** + * The type of block. + * @type {string} + * @memberof WsV1Block + */ + type?: WsV1BlockTypeEnum; + /** + * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {{ [key: string]: string; }} + * @memberof WsV1Block + */ + properties?: { [key: string]: string; }; + /** + * + * @type {WsV1CodeOptions} + * @memberof WsV1Block + */ + code_options?: WsV1CodeOptions; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1BlockTypeEnum { - Code = "CODE", + Code = 'CODE' } + /** * Check if a given object implements the WsV1Block interface. */ export function instanceOfWsV1Block(value: object): value is WsV1Block { - return true; + return true; } export function WsV1BlockFromJSON(json: any): WsV1Block { - return WsV1BlockFromJSONTyped(json, false); + return WsV1BlockFromJSONTyped(json, false); } export function WsV1BlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1Block { - if (json == null) { - return json; - } - return { - type: json["type"] == null ? undefined : json["type"], - properties: json["properties"] == null ? undefined : json["properties"], - code_options: - json["code_options"] == null ? undefined : WsV1CodeOptionsFromJSON(json["code_options"]), - }; + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'properties': json['properties'] == null ? undefined : json['properties'], + 'code_options': json['code_options'] == null ? undefined : WsV1CodeOptionsFromJSON(json['code_options']), + }; } export function WsV1BlockToJSON(json: any): WsV1Block { - return WsV1BlockToJSONTyped(json, false); + return WsV1BlockToJSONTyped(json, false); } -export function WsV1BlockToJSONTyped( - value?: WsV1Block | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1BlockToJSONTyped(value?: WsV1Block | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - type: value["type"], - properties: value["properties"], - code_options: WsV1CodeOptionsToJSON(value["code_options"]), - }; + return { + + 'type': value['type'], + 'properties': value['properties'], + 'code_options': WsV1CodeOptionsToJSON(value['code_options']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts b/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts index 2efd49d157..9e6c314647 100644 --- a/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts +++ b/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts @@ -5,65 +5,62 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The options for a code block * @export * @interface WsV1CodeOptions */ export interface WsV1CodeOptions { - /** - * The lines of source code for this code block. - * @type {Array} - * @memberof WsV1CodeOptions - */ - source: Array; + /** + * The lines of source code for this code block. + * @type {Array} + * @memberof WsV1CodeOptions + */ + source: Array; } /** * Check if a given object implements the WsV1CodeOptions interface. */ export function instanceOfWsV1CodeOptions(value: object): value is WsV1CodeOptions { - if (!("source" in value) || value["source"] === undefined) return false; - return true; + if (!('source' in value) || value['source'] === undefined) return false; + return true; } export function WsV1CodeOptionsFromJSON(json: any): WsV1CodeOptions { - return WsV1CodeOptionsFromJSONTyped(json, false); + return WsV1CodeOptionsFromJSONTyped(json, false); } -export function WsV1CodeOptionsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1CodeOptions { - if (json == null) { - return json; - } - return { - source: json["source"], - }; +export function WsV1CodeOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1CodeOptions { + if (json == null) { + return json; + } + return { + + 'source': json['source'], + }; } export function WsV1CodeOptionsToJSON(json: any): WsV1CodeOptions { - return WsV1CodeOptionsToJSONTyped(json, false); + return WsV1CodeOptionsToJSONTyped(json, false); } -export function WsV1CodeOptionsToJSONTyped( - value?: WsV1CodeOptions | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1CodeOptionsToJSONTyped(value?: WsV1CodeOptions | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - source: value["source"], - }; + return { + + 'source': value['source'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1Workspace.ts b/src/clients/flinkWorkspaces/models/WsV1Workspace.ts index 21e057b7a8..855e276294 100644 --- a/src/clients/flinkWorkspaces/models/WsV1Workspace.ts +++ b/src/clients/flinkWorkspaces/models/WsV1Workspace.ts @@ -5,49 +5,49 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; +import { mapValues } from '../runtime'; +import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from "./WsV1WorkspaceStatus"; -import type { WsV1WorkspaceMetadata } from "./WsV1WorkspaceMetadata"; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from './WsV1WorkspaceStatus'; +import type { WsV1WorkspaceMetadata } from './WsV1WorkspaceMetadata'; import { - WsV1WorkspaceMetadataFromJSON, - WsV1WorkspaceMetadataFromJSONTyped, - WsV1WorkspaceMetadataToJSON, - WsV1WorkspaceMetadataToJSONTyped, -} from "./WsV1WorkspaceMetadata"; -import type { WsV1WorkspaceSpec } from "./WsV1WorkspaceSpec"; + WsV1WorkspaceMetadataFromJSON, + WsV1WorkspaceMetadataFromJSONTyped, + WsV1WorkspaceMetadataToJSON, + WsV1WorkspaceMetadataToJSONTyped, +} from './WsV1WorkspaceMetadata'; +import type { WsV1WorkspaceSpec } from './WsV1WorkspaceSpec'; import { - WsV1WorkspaceSpecFromJSON, - WsV1WorkspaceSpecFromJSONTyped, - WsV1WorkspaceSpecToJSON, - WsV1WorkspaceSpecToJSONTyped, -} from "./WsV1WorkspaceSpec"; + WsV1WorkspaceSpecFromJSON, + WsV1WorkspaceSpecFromJSONTyped, + WsV1WorkspaceSpecToJSON, + WsV1WorkspaceSpecToJSONTyped, +} from './WsV1WorkspaceSpec'; /** * A Workspace represents a named and ordered collection of Flink SQL code blocks. * The API allows you to list, create, read, update and delete your workspaces. - * - * + * + * * Related guide: [Confluent Flink Workspace API](https://docs.confluent.io/cloud/current/flink/workspaces.html). - * + * * ## The Workspaces Model * - * + * * ## Quotas and Limits * This resource is subject to the following quotas: - * + * * | Quota | Description | * | --- | --- | * | `ws.max_workspaces.per_env` | Maximum number of workspaces in a region of a Confluent Cloud environment. | @@ -55,115 +55,115 @@ import { * @interface WsV1Workspace */ export interface WsV1Workspace { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof WsV1Workspace - */ - readonly api_version?: WsV1WorkspaceApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof WsV1Workspace - */ - readonly kind?: WsV1WorkspaceKindEnum; - /** - * - * @type {WsV1WorkspaceMetadata} - * @memberof WsV1Workspace - */ - metadata?: WsV1WorkspaceMetadata; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof WsV1Workspace - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof WsV1Workspace - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof WsV1Workspace - */ - name?: string; - /** - * - * @type {WsV1WorkspaceSpec} - * @memberof WsV1Workspace - */ - spec?: WsV1WorkspaceSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof WsV1Workspace - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof WsV1Workspace + */ + readonly api_version?: WsV1WorkspaceApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof WsV1Workspace + */ + readonly kind?: WsV1WorkspaceKindEnum; + /** + * + * @type {WsV1WorkspaceMetadata} + * @memberof WsV1Workspace + */ + metadata?: WsV1WorkspaceMetadata; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof WsV1Workspace + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof WsV1Workspace + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof WsV1Workspace + */ + name?: string; + /** + * + * @type {WsV1WorkspaceSpec} + * @memberof WsV1Workspace + */ + spec?: WsV1WorkspaceSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof WsV1Workspace + */ + status?: WsV1WorkspaceStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceKindEnum { - Workspace = "Workspace", + Workspace = 'Workspace' } + /** * Check if a given object implements the WsV1Workspace interface. */ export function instanceOfWsV1Workspace(value: object): value is WsV1Workspace { - return true; + return true; } export function WsV1WorkspaceFromJSON(json: any): WsV1Workspace { - return WsV1WorkspaceFromJSONTyped(json, false); + return WsV1WorkspaceFromJSONTyped(json, false); } export function WsV1WorkspaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1Workspace { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json["metadata"]), - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - name: json["name"] == null ? undefined : json["name"], - spec: json["spec"] == null ? undefined : WsV1WorkspaceSpecFromJSON(json["spec"]), - status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), - }; + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json['metadata']), + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'name': json['name'] == null ? undefined : json['name'], + 'spec': json['spec'] == null ? undefined : WsV1WorkspaceSpecFromJSON(json['spec']), + 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), + }; } export function WsV1WorkspaceToJSON(json: any): WsV1Workspace { - return WsV1WorkspaceToJSONTyped(json, false); + return WsV1WorkspaceToJSONTyped(json, false); } -export function WsV1WorkspaceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: WsV1WorkspaceMetadataToJSON(value["metadata"]), - name: value["name"], - spec: WsV1WorkspaceSpecToJSON(value["spec"]), - status: WsV1WorkspaceStatusToJSON(value["status"]), - }; + return { + + 'metadata': WsV1WorkspaceMetadataToJSON(value['metadata']), + 'name': value['name'], + 'spec': WsV1WorkspaceSpecToJSON(value['spec']), + 'status': WsV1WorkspaceStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts index bddd66581e..fbe5a45d3f 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts @@ -5,28 +5,28 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ListMeta } from "./ListMeta"; +import { mapValues } from '../runtime'; +import type { ListMeta } from './ListMeta'; import { - ListMetaFromJSON, - ListMetaFromJSONTyped, - ListMetaToJSON, - ListMetaToJSONTyped, -} from "./ListMeta"; -import type { WsV1WorkspaceListDataInner } from "./WsV1WorkspaceListDataInner"; + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from './ListMeta'; +import type { WsV1WorkspaceListDataInner } from './WsV1WorkspaceListDataInner'; import { - WsV1WorkspaceListDataInnerFromJSON, - WsV1WorkspaceListDataInnerFromJSONTyped, - WsV1WorkspaceListDataInnerToJSON, - WsV1WorkspaceListDataInnerToJSONTyped, -} from "./WsV1WorkspaceListDataInner"; + WsV1WorkspaceListDataInnerFromJSON, + WsV1WorkspaceListDataInnerFromJSONTyped, + WsV1WorkspaceListDataInnerToJSON, + WsV1WorkspaceListDataInnerToJSONTyped, +} from './WsV1WorkspaceListDataInner'; /** * `Workspace` represents a named resource with an ordered collection of SQL code blocks. @@ -37,93 +37,91 @@ import { * @interface WsV1WorkspaceList */ export interface WsV1WorkspaceList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof WsV1WorkspaceList - */ - api_version: WsV1WorkspaceListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof WsV1WorkspaceList - */ - kind: WsV1WorkspaceListKindEnum; - /** - * - * @type {ListMeta} - * @memberof WsV1WorkspaceList - */ - metadata: ListMeta; - /** - * The array of workspace resource. - * @type {Set} - * @memberof WsV1WorkspaceList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof WsV1WorkspaceList + */ + api_version: WsV1WorkspaceListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof WsV1WorkspaceList + */ + kind: WsV1WorkspaceListKindEnum; + /** + * + * @type {ListMeta} + * @memberof WsV1WorkspaceList + */ + metadata: ListMeta; + /** + * The array of workspace resource. + * @type {Set} + * @memberof WsV1WorkspaceList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceListApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceListKindEnum { - WorkspaceList = "WorkspaceList", + WorkspaceList = 'WorkspaceList' } + /** * Check if a given object implements the WsV1WorkspaceList interface. */ export function instanceOfWsV1WorkspaceList(value: object): value is WsV1WorkspaceList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function WsV1WorkspaceListFromJSON(json: any): WsV1WorkspaceList { - return WsV1WorkspaceListFromJSONTyped(json, false); + return WsV1WorkspaceListFromJSONTyped(json, false); } -export function WsV1WorkspaceListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1WorkspaceList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ListMetaFromJSON(json["metadata"]), - data: new Set((json["data"] as Array).map(WsV1WorkspaceListDataInnerFromJSON)), - }; +export function WsV1WorkspaceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ListMetaFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(WsV1WorkspaceListDataInnerFromJSON))), + }; } export function WsV1WorkspaceListToJSON(json: any): WsV1WorkspaceList { - return WsV1WorkspaceListToJSONTyped(json, false); + return WsV1WorkspaceListToJSONTyped(json, false); } -export function WsV1WorkspaceListToJSONTyped( - value?: WsV1WorkspaceList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceListToJSONTyped(value?: WsV1WorkspaceList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: ListMetaToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map(WsV1WorkspaceListDataInnerToJSON), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': ListMetaToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(WsV1WorkspaceListDataInnerToJSON)), + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts index 875d1e2337..ff5f2a298c 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts @@ -5,147 +5,140 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; +import { mapValues } from '../runtime'; +import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from "./WsV1WorkspaceStatus"; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from './WsV1WorkspaceStatus'; /** - * + * * @export * @interface WsV1WorkspaceListDataInner */ export interface WsV1WorkspaceListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly api_version?: WsV1WorkspaceListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly kind?: WsV1WorkspaceListDataInnerKindEnum; - /** - * - * @type {object} - * @memberof WsV1WorkspaceListDataInner - */ - metadata: object; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - name: string; - /** - * - * @type {object} - * @memberof WsV1WorkspaceListDataInner - */ - spec: object; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof WsV1WorkspaceListDataInner - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly api_version?: WsV1WorkspaceListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly kind?: WsV1WorkspaceListDataInnerKindEnum; + /** + * + * @type {object} + * @memberof WsV1WorkspaceListDataInner + */ + metadata: object; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof WsV1WorkspaceListDataInner + */ + spec: object; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof WsV1WorkspaceListDataInner + */ + status?: WsV1WorkspaceStatus; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceListDataInnerApiVersionEnum { - WsV1 = "ws/v1", + WsV1 = 'ws/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceListDataInnerKindEnum { - Workspace = "Workspace", + Workspace = 'Workspace' } + /** * Check if a given object implements the WsV1WorkspaceListDataInner interface. */ -export function instanceOfWsV1WorkspaceListDataInner( - value: object, -): value is WsV1WorkspaceListDataInner { - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfWsV1WorkspaceListDataInner(value: object): value is WsV1WorkspaceListDataInner { + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function WsV1WorkspaceListDataInnerFromJSON(json: any): WsV1WorkspaceListDataInner { - return WsV1WorkspaceListDataInnerFromJSONTyped(json, false); + return WsV1WorkspaceListDataInnerFromJSONTyped(json, false); } -export function WsV1WorkspaceListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1WorkspaceListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: json["metadata"], - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - environment_id: json["environment_id"] == null ? undefined : json["environment_id"], - name: json["name"], - spec: json["spec"], - status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), - }; +export function WsV1WorkspaceListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'], + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], + 'name': json['name'], + 'spec': json['spec'], + 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), + }; } export function WsV1WorkspaceListDataInnerToJSON(json: any): WsV1WorkspaceListDataInner { - return WsV1WorkspaceListDataInnerToJSONTyped(json, false); + return WsV1WorkspaceListDataInnerToJSONTyped(json, false); } -export function WsV1WorkspaceListDataInnerToJSONTyped( - value?: Omit< - WsV1WorkspaceListDataInner, - "api_version" | "kind" | "organization_id" | "environment_id" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: value["metadata"], - name: value["name"], - spec: value["spec"], - status: WsV1WorkspaceStatusToJSON(value["status"]), - }; + return { + + 'metadata': value['metadata'], + 'name': value['name'], + 'spec': value['spec'], + 'status': WsV1WorkspaceStatusToJSON(value['status']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts index 1a37ede1eb..5f793af5c6 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts @@ -5,103 +5,97 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface WsV1WorkspaceMetadata */ export interface WsV1WorkspaceMetadata { - /** - * - * @type {any} - * @memberof WsV1WorkspaceMetadata - */ - self: any | null; - /** - * The system-generated identifier of the resource that is unique across space and time. - * @type {string} - * @memberof WsV1WorkspaceMetadata - */ - readonly uid?: string; - /** - * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). - * @type {string} - * @memberof WsV1WorkspaceMetadata - */ - readonly resource_version?: string; - /** - * The system-generated and managed principal ID of the user who created the workspace. - * @type {string} - * @memberof WsV1WorkspaceMetadata - */ - readonly created_by?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof WsV1WorkspaceMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof WsV1WorkspaceMetadata - */ - readonly updated_at?: Date; + /** + * + * @type {any} + * @memberof WsV1WorkspaceMetadata + */ + self: any | null; + /** + * The system-generated identifier of the resource that is unique across space and time. + * @type {string} + * @memberof WsV1WorkspaceMetadata + */ + readonly uid?: string; + /** + * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). + * @type {string} + * @memberof WsV1WorkspaceMetadata + */ + readonly resource_version?: string; + /** + * The system-generated and managed principal ID of the user who created the workspace. + * @type {string} + * @memberof WsV1WorkspaceMetadata + */ + readonly created_by?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof WsV1WorkspaceMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof WsV1WorkspaceMetadata + */ + readonly updated_at?: Date; } /** * Check if a given object implements the WsV1WorkspaceMetadata interface. */ export function instanceOfWsV1WorkspaceMetadata(value: object): value is WsV1WorkspaceMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function WsV1WorkspaceMetadataFromJSON(json: any): WsV1WorkspaceMetadata { - return WsV1WorkspaceMetadataFromJSONTyped(json, false); + return WsV1WorkspaceMetadataFromJSONTyped(json, false); } -export function WsV1WorkspaceMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1WorkspaceMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - uid: json["uid"] == null ? undefined : json["uid"], - resource_version: json["resource_version"] == null ? undefined : json["resource_version"], - created_by: json["created_by"] == null ? undefined : json["created_by"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - }; +export function WsV1WorkspaceMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'uid': json['uid'] == null ? undefined : json['uid'], + 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], + 'created_by': json['created_by'] == null ? undefined : json['created_by'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + }; } export function WsV1WorkspaceMetadataToJSON(json: any): WsV1WorkspaceMetadata { - return WsV1WorkspaceMetadataToJSONTyped(json, false); + return WsV1WorkspaceMetadataToJSONTyped(json, false); } -export function WsV1WorkspaceMetadataToJSONTyped( - value?: Omit< - WsV1WorkspaceMetadata, - "uid" | "resource_version" | "created_by" | "created_at" | "updated_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - }; + return { + + 'self': value['self'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts index c6648f3187..7a667e7b1f 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts @@ -5,35 +5,35 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GlobalObjectReference } from "./GlobalObjectReference"; +import { mapValues } from '../runtime'; +import type { GlobalObjectReference } from './GlobalObjectReference'; import { - GlobalObjectReferenceFromJSON, - GlobalObjectReferenceFromJSONTyped, - GlobalObjectReferenceToJSON, - GlobalObjectReferenceToJSONTyped, -} from "./GlobalObjectReference"; -import type { EnvScopedObjectReference } from "./EnvScopedObjectReference"; + GlobalObjectReferenceFromJSON, + GlobalObjectReferenceFromJSONTyped, + GlobalObjectReferenceToJSON, + GlobalObjectReferenceToJSONTyped, +} from './GlobalObjectReference'; +import type { EnvScopedObjectReference } from './EnvScopedObjectReference'; import { - EnvScopedObjectReferenceFromJSON, - EnvScopedObjectReferenceFromJSONTyped, - EnvScopedObjectReferenceToJSON, - EnvScopedObjectReferenceToJSONTyped, -} from "./EnvScopedObjectReference"; -import type { WsV1WorkspaceSpecBlocksInner } from "./WsV1WorkspaceSpecBlocksInner"; + EnvScopedObjectReferenceFromJSON, + EnvScopedObjectReferenceFromJSONTyped, + EnvScopedObjectReferenceToJSON, + EnvScopedObjectReferenceToJSONTyped, +} from './EnvScopedObjectReference'; +import type { WsV1WorkspaceSpecBlocksInner } from './WsV1WorkspaceSpecBlocksInner'; import { - WsV1WorkspaceSpecBlocksInnerFromJSON, - WsV1WorkspaceSpecBlocksInnerFromJSONTyped, - WsV1WorkspaceSpecBlocksInnerToJSON, - WsV1WorkspaceSpecBlocksInnerToJSONTyped, -} from "./WsV1WorkspaceSpecBlocksInner"; + WsV1WorkspaceSpecBlocksInnerFromJSON, + WsV1WorkspaceSpecBlocksInnerFromJSONTyped, + WsV1WorkspaceSpecBlocksInnerToJSON, + WsV1WorkspaceSpecBlocksInnerToJSONTyped, +} from './WsV1WorkspaceSpecBlocksInner'; /** * The specification for the Workspace @@ -41,94 +41,79 @@ import { * @interface WsV1WorkspaceSpec */ export interface WsV1WorkspaceSpec { - /** - * A human-readable display name for the workspace. - * @type {string} - * @memberof WsV1WorkspaceSpec - */ - display_name?: string; - /** - * - * @type {EnvScopedObjectReference} - * @memberof WsV1WorkspaceSpec - */ - compute_pool?: EnvScopedObjectReference; - /** - * - * @type {GlobalObjectReference} - * @memberof WsV1WorkspaceSpec - */ - service_account?: GlobalObjectReference; - /** - * The ordered blocks for the new workspace - * @type {Array} - * @memberof WsV1WorkspaceSpec - */ - blocks?: Array; - /** - * A map (key-value pairs) of workspace-level properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {{ [key: string]: string; }} - * @memberof WsV1WorkspaceSpec - */ - properties?: { [key: string]: string }; + /** + * A human-readable display name for the workspace. + * @type {string} + * @memberof WsV1WorkspaceSpec + */ + display_name?: string; + /** + * + * @type {EnvScopedObjectReference} + * @memberof WsV1WorkspaceSpec + */ + compute_pool?: EnvScopedObjectReference; + /** + * + * @type {GlobalObjectReference} + * @memberof WsV1WorkspaceSpec + */ + service_account?: GlobalObjectReference; + /** + * The ordered blocks for the new workspace + * @type {Array} + * @memberof WsV1WorkspaceSpec + */ + blocks?: Array; + /** + * A map (key-value pairs) of workspace-level properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {{ [key: string]: string; }} + * @memberof WsV1WorkspaceSpec + */ + properties?: { [key: string]: string; }; } /** * Check if a given object implements the WsV1WorkspaceSpec interface. */ export function instanceOfWsV1WorkspaceSpec(value: object): value is WsV1WorkspaceSpec { - return true; + return true; } export function WsV1WorkspaceSpecFromJSON(json: any): WsV1WorkspaceSpec { - return WsV1WorkspaceSpecFromJSONTyped(json, false); + return WsV1WorkspaceSpecFromJSONTyped(json, false); } -export function WsV1WorkspaceSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1WorkspaceSpec { - if (json == null) { - return json; - } - return { - display_name: json["display_name"] == null ? undefined : json["display_name"], - compute_pool: - json["compute_pool"] == null - ? undefined - : EnvScopedObjectReferenceFromJSON(json["compute_pool"]), - service_account: - json["service_account"] == null - ? undefined - : GlobalObjectReferenceFromJSON(json["service_account"]), - blocks: - json["blocks"] == null - ? undefined - : (json["blocks"] as Array).map(WsV1WorkspaceSpecBlocksInnerFromJSON), - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function WsV1WorkspaceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceSpec { + if (json == null) { + return json; + } + return { + + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'compute_pool': json['compute_pool'] == null ? undefined : EnvScopedObjectReferenceFromJSON(json['compute_pool']), + 'service_account': json['service_account'] == null ? undefined : GlobalObjectReferenceFromJSON(json['service_account']), + 'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array).map(WsV1WorkspaceSpecBlocksInnerFromJSON)), + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } export function WsV1WorkspaceSpecToJSON(json: any): WsV1WorkspaceSpec { - return WsV1WorkspaceSpecToJSONTyped(json, false); + return WsV1WorkspaceSpecToJSONTyped(json, false); } -export function WsV1WorkspaceSpecToJSONTyped( - value?: WsV1WorkspaceSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceSpecToJSONTyped(value?: WsV1WorkspaceSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - display_name: value["display_name"], - compute_pool: EnvScopedObjectReferenceToJSON(value["compute_pool"]), - service_account: GlobalObjectReferenceToJSON(value["service_account"]), - blocks: - value["blocks"] == null - ? undefined - : (value["blocks"] as Array).map(WsV1WorkspaceSpecBlocksInnerToJSON), - properties: value["properties"], - }; + return { + + 'display_name': value['display_name'], + 'compute_pool': EnvScopedObjectReferenceToJSON(value['compute_pool']), + 'service_account': GlobalObjectReferenceToJSON(value['service_account']), + 'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array).map(WsV1WorkspaceSpecBlocksInnerToJSON)), + 'properties': value['properties'], + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts index 8f79c011fd..7510162fc0 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts @@ -5,100 +5,95 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { WsV1CodeOptions } from "./WsV1CodeOptions"; +import { mapValues } from '../runtime'; +import type { WsV1CodeOptions } from './WsV1CodeOptions'; import { - WsV1CodeOptionsFromJSON, - WsV1CodeOptionsFromJSONTyped, - WsV1CodeOptionsToJSON, - WsV1CodeOptionsToJSONTyped, -} from "./WsV1CodeOptions"; + WsV1CodeOptionsFromJSON, + WsV1CodeOptionsFromJSONTyped, + WsV1CodeOptionsToJSON, + WsV1CodeOptionsToJSONTyped, +} from './WsV1CodeOptions'; /** - * + * * @export * @interface WsV1WorkspaceSpecBlocksInner */ export interface WsV1WorkspaceSpecBlocksInner { - /** - * The type of block. - * @type {string} - * @memberof WsV1WorkspaceSpecBlocksInner - */ - type: WsV1WorkspaceSpecBlocksInnerTypeEnum; - /** - * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {{ [key: string]: string; }} - * @memberof WsV1WorkspaceSpecBlocksInner - */ - properties?: { [key: string]: string }; - /** - * - * @type {WsV1CodeOptions} - * @memberof WsV1WorkspaceSpecBlocksInner - */ - code_options?: WsV1CodeOptions; + /** + * The type of block. + * @type {string} + * @memberof WsV1WorkspaceSpecBlocksInner + */ + type: WsV1WorkspaceSpecBlocksInnerTypeEnum; + /** + * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {{ [key: string]: string; }} + * @memberof WsV1WorkspaceSpecBlocksInner + */ + properties?: { [key: string]: string; }; + /** + * + * @type {WsV1CodeOptions} + * @memberof WsV1WorkspaceSpecBlocksInner + */ + code_options?: WsV1CodeOptions; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum WsV1WorkspaceSpecBlocksInnerTypeEnum { - Code = "CODE", + Code = 'CODE' } + /** * Check if a given object implements the WsV1WorkspaceSpecBlocksInner interface. */ -export function instanceOfWsV1WorkspaceSpecBlocksInner( - value: object, -): value is WsV1WorkspaceSpecBlocksInner { - if (!("type" in value) || value["type"] === undefined) return false; - return true; +export function instanceOfWsV1WorkspaceSpecBlocksInner(value: object): value is WsV1WorkspaceSpecBlocksInner { + if (!('type' in value) || value['type'] === undefined) return false; + return true; } export function WsV1WorkspaceSpecBlocksInnerFromJSON(json: any): WsV1WorkspaceSpecBlocksInner { - return WsV1WorkspaceSpecBlocksInnerFromJSONTyped(json, false); + return WsV1WorkspaceSpecBlocksInnerFromJSONTyped(json, false); } -export function WsV1WorkspaceSpecBlocksInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1WorkspaceSpecBlocksInner { - if (json == null) { - return json; - } - return { - type: json["type"], - properties: json["properties"] == null ? undefined : json["properties"], - code_options: - json["code_options"] == null ? undefined : WsV1CodeOptionsFromJSON(json["code_options"]), - }; +export function WsV1WorkspaceSpecBlocksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceSpecBlocksInner { + if (json == null) { + return json; + } + return { + + 'type': json['type'], + 'properties': json['properties'] == null ? undefined : json['properties'], + 'code_options': json['code_options'] == null ? undefined : WsV1CodeOptionsFromJSON(json['code_options']), + }; } export function WsV1WorkspaceSpecBlocksInnerToJSON(json: any): WsV1WorkspaceSpecBlocksInner { - return WsV1WorkspaceSpecBlocksInnerToJSONTyped(json, false); + return WsV1WorkspaceSpecBlocksInnerToJSONTyped(json, false); } -export function WsV1WorkspaceSpecBlocksInnerToJSONTyped( - value?: WsV1WorkspaceSpecBlocksInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceSpecBlocksInnerToJSONTyped(value?: WsV1WorkspaceSpecBlocksInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - type: value["type"], - properties: value["properties"], - code_options: WsV1CodeOptionsToJSON(value["code_options"]), - }; + return { + + 'type': value['type'], + 'properties': value['properties'], + 'code_options': WsV1CodeOptionsToJSON(value['code_options']), + }; } + diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts index 26b0621b44..a45b852a86 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts @@ -5,67 +5,65 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The status of the Workspace * @export * @interface WsV1WorkspaceStatus */ export interface WsV1WorkspaceStatus { - /** - * The networking type used by the Workspace: - * - * PUBLIC: Workspace is using public networking; - * - * PRIVATE: Workspace is using private networking; - * - * @type {string} - * @memberof WsV1WorkspaceStatus - */ - readonly network_kind?: string; + /** + * The networking type used by the Workspace: + * + * PUBLIC: Workspace is using public networking; + * + * PRIVATE: Workspace is using private networking; + * + * @type {string} + * @memberof WsV1WorkspaceStatus + */ + readonly network_kind?: string; } /** * Check if a given object implements the WsV1WorkspaceStatus interface. */ export function instanceOfWsV1WorkspaceStatus(value: object): value is WsV1WorkspaceStatus { - return true; + return true; } export function WsV1WorkspaceStatusFromJSON(json: any): WsV1WorkspaceStatus { - return WsV1WorkspaceStatusFromJSONTyped(json, false); + return WsV1WorkspaceStatusFromJSONTyped(json, false); } -export function WsV1WorkspaceStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): WsV1WorkspaceStatus { - if (json == null) { - return json; - } - return { - network_kind: json["network_kind"] == null ? undefined : json["network_kind"], - }; +export function WsV1WorkspaceStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceStatus { + if (json == null) { + return json; + } + return { + + 'network_kind': json['network_kind'] == null ? undefined : json['network_kind'], + }; } export function WsV1WorkspaceStatusToJSON(json: any): WsV1WorkspaceStatus { - return WsV1WorkspaceStatusToJSONTyped(json, false); + return WsV1WorkspaceStatusToJSONTyped(json, false); } -export function WsV1WorkspaceStatusToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/flinkWorkspaces/models/index.ts b/src/clients/flinkWorkspaces/models/index.ts index 7e4fc4dd37..2b17e439f1 100644 --- a/src/clients/flinkWorkspaces/models/index.ts +++ b/src/clients/flinkWorkspaces/models/index.ts @@ -1,30 +1,30 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./CreateWsV1Workspace201Response"; -export * from "./CreateWsV1WorkspaceRequest"; -export * from "./CreateWsV1WorkspaceRequestAllOfSpec"; -export * from "./EnvScopedObjectReference"; -export * from "./ErrorSource"; -export * from "./Failure"; -export * from "./GetWsV1Workspace200Response"; -export * from "./GetWsV1Workspace200ResponseAllOfSpec"; -export * from "./GlobalObjectReference"; -export * from "./JSONPatchRequestAddReplace"; -export * from "./JSONPatchRequestMoveCopy"; -export * from "./JSONPatchRequestRemove"; -export * from "./ListMeta"; -export * from "./ModelError"; -export * from "./ObjectMeta"; -export * from "./PatchRequestInner"; -export * from "./PutWsV1WorkspaceRequest"; -export * from "./PutWsV1WorkspaceRequestAllOfMetadata"; -export * from "./PutWsV1WorkspaceRequestAllOfSpec"; -export * from "./WsV1Block"; -export * from "./WsV1CodeOptions"; -export * from "./WsV1Workspace"; -export * from "./WsV1WorkspaceList"; -export * from "./WsV1WorkspaceListDataInner"; -export * from "./WsV1WorkspaceMetadata"; -export * from "./WsV1WorkspaceSpec"; -export * from "./WsV1WorkspaceSpecBlocksInner"; -export * from "./WsV1WorkspaceStatus"; +export * from './CreateWsV1Workspace201Response'; +export * from './CreateWsV1WorkspaceRequest'; +export * from './CreateWsV1WorkspaceRequestAllOfSpec'; +export * from './EnvScopedObjectReference'; +export * from './ErrorSource'; +export * from './Failure'; +export * from './GetWsV1Workspace200Response'; +export * from './GetWsV1Workspace200ResponseAllOfSpec'; +export * from './GlobalObjectReference'; +export * from './JSONPatchRequestAddReplace'; +export * from './JSONPatchRequestMoveCopy'; +export * from './JSONPatchRequestRemove'; +export * from './ListMeta'; +export * from './ModelError'; +export * from './ObjectMeta'; +export * from './PatchRequestInner'; +export * from './PutWsV1WorkspaceRequest'; +export * from './PutWsV1WorkspaceRequestAllOfMetadata'; +export * from './PutWsV1WorkspaceRequestAllOfSpec'; +export * from './WsV1Block'; +export * from './WsV1CodeOptions'; +export * from './WsV1Workspace'; +export * from './WsV1WorkspaceList'; +export * from './WsV1WorkspaceListDataInner'; +export * from './WsV1WorkspaceMetadata'; +export * from './WsV1WorkspaceSpec'; +export * from './WsV1WorkspaceSpecBlocksInner'; +export * from './WsV1WorkspaceStatus'; diff --git a/src/clients/flinkWorkspaces/runtime.ts b/src/clients/flinkWorkspaces/runtime.ts index bdbf1b4880..047043ef18 100644 --- a/src/clients/flinkWorkspaces/runtime.ts +++ b/src/clients/flinkWorkspaces/runtime.ts @@ -5,85 +5,83 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://flink.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/kafkaRest/apis/ACLV3Api.ts b/src/clients/kafkaRest/apis/ACLV3Api.ts index 4799b870b2..ed4d471890 100644 --- a/src/clients/kafkaRest/apis/ACLV3Api.ts +++ b/src/clients/kafkaRest/apis/ACLV3Api.ts @@ -5,405 +5,330 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { AclDataList, AclResourceType, CreateAclRequestData, CreateAclRequestDataList, DeleteKafkaAcls200Response, -} from "../models/index"; +} from '../models/index'; import { - AclDataListFromJSON, - AclDataListToJSON, - AclResourceTypeFromJSON, - AclResourceTypeToJSON, - CreateAclRequestDataFromJSON, - CreateAclRequestDataToJSON, - CreateAclRequestDataListFromJSON, - CreateAclRequestDataListToJSON, - DeleteKafkaAcls200ResponseFromJSON, - DeleteKafkaAcls200ResponseToJSON, -} from "../models/index"; + AclDataListFromJSON, + AclDataListToJSON, + AclResourceTypeFromJSON, + AclResourceTypeToJSON, + CreateAclRequestDataFromJSON, + CreateAclRequestDataToJSON, + CreateAclRequestDataListFromJSON, + CreateAclRequestDataListToJSON, + DeleteKafkaAcls200ResponseFromJSON, + DeleteKafkaAcls200ResponseToJSON, +} from '../models/index'; export interface BatchCreateKafkaAclsRequest { - cluster_id: string; - CreateAclRequestDataList?: CreateAclRequestDataList; + cluster_id: string; + CreateAclRequestDataList?: CreateAclRequestDataList; } export interface CreateKafkaAclsRequest { - cluster_id: string; - CreateAclRequestData?: CreateAclRequestData; + cluster_id: string; + CreateAclRequestData?: CreateAclRequestData; } export interface DeleteKafkaAclsRequest { - cluster_id: string; - resource_type: AclResourceType; - pattern_type: string; - operation: string; - permission: string; - resource_name?: string; - principal?: string; - host?: string; + cluster_id: string; + resource_type: AclResourceType; + pattern_type: string; + operation: string; + permission: string; + resource_name?: string; + principal?: string; + host?: string; } export interface GetKafkaAclsRequest { - cluster_id: string; - resource_type?: AclResourceType; - resource_name?: string; - pattern_type?: string; - principal?: string; - host?: string; - operation?: string; - permission?: string; + cluster_id: string; + resource_type?: AclResourceType; + resource_name?: string; + pattern_type?: string; + principal?: string; + host?: string; + operation?: string; + permission?: string; } /** - * + * */ export class ACLV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. - * Batch Create ACLs - */ - async batchCreateKafkaAclsRaw( - requestParameters: BatchCreateKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling batchCreateKafkaAcls().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/acls:batch`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateAclRequestDataListToJSON(requestParameters["CreateAclRequestDataList"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. - * Batch Create ACLs - */ - async batchCreateKafkaAcls( - requestParameters: BatchCreateKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.batchCreateKafkaAclsRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. - * Create an ACL - */ - async createKafkaAclsRaw( - requestParameters: CreateKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling createKafkaAcls().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/acls`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateAclRequestDataToJSON(requestParameters["CreateAclRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. - * Create an ACL - */ - async createKafkaAcls( - requestParameters: CreateKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.createKafkaAclsRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. - * Delete ACLs - */ - async deleteKafkaAclsRaw( - requestParameters: DeleteKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaAcls().', - ); - } - - if (requestParameters["resource_type"] == null) { - throw new runtime.RequiredError( - "resource_type", - 'Required parameter "resource_type" was null or undefined when calling deleteKafkaAcls().', - ); - } - - if (requestParameters["pattern_type"] == null) { - throw new runtime.RequiredError( - "pattern_type", - 'Required parameter "pattern_type" was null or undefined when calling deleteKafkaAcls().', - ); - } - - if (requestParameters["operation"] == null) { - throw new runtime.RequiredError( - "operation", - 'Required parameter "operation" was null or undefined when calling deleteKafkaAcls().', - ); - } - if (requestParameters["permission"] == null) { - throw new runtime.RequiredError( - "permission", - 'Required parameter "permission" was null or undefined when calling deleteKafkaAcls().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. + * Batch Create ACLs + */ + async batchCreateKafkaAclsRaw(requestParameters: BatchCreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling batchCreateKafkaAcls().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/acls:batch`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateAclRequestDataListToJSON(requestParameters['CreateAclRequestDataList']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - if (requestParameters["resource_type"] != null) { - queryParameters["resource_type"] = requestParameters["resource_type"]; - } - - if (requestParameters["resource_name"] != null) { - queryParameters["resource_name"] = requestParameters["resource_name"]; - } - - if (requestParameters["pattern_type"] != null) { - queryParameters["pattern_type"] = requestParameters["pattern_type"]; - } - - if (requestParameters["principal"] != null) { - queryParameters["principal"] = requestParameters["principal"]; - } - - if (requestParameters["host"] != null) { - queryParameters["host"] = requestParameters["host"]; - } - - if (requestParameters["operation"] != null) { - queryParameters["operation"] = requestParameters["operation"]; - } - - if (requestParameters["permission"] != null) { - queryParameters["permission"] = requestParameters["permission"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. + * Batch Create ACLs + */ + async batchCreateKafkaAcls(requestParameters: BatchCreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.batchCreateKafkaAclsRaw(requestParameters, initOverrides); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/acls`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - DeleteKafkaAcls200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. - * Delete ACLs - */ - async deleteKafkaAcls( - requestParameters: DeleteKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.deleteKafkaAclsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. - * List ACLs - */ - async getKafkaAclsRaw( - requestParameters: GetKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaAcls().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["resource_type"] != null) { - queryParameters["resource_type"] = requestParameters["resource_type"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. + * Create an ACL + */ + async createKafkaAclsRaw(requestParameters: CreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling createKafkaAcls().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/acls`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateAclRequestDataToJSON(requestParameters['CreateAclRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - if (requestParameters["resource_name"] != null) { - queryParameters["resource_name"] = requestParameters["resource_name"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. + * Create an ACL + */ + async createKafkaAcls(requestParameters: CreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.createKafkaAclsRaw(requestParameters, initOverrides); } - if (requestParameters["pattern_type"] != null) { - queryParameters["pattern_type"] = requestParameters["pattern_type"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. + * Delete ACLs + */ + async deleteKafkaAclsRaw(requestParameters: DeleteKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaAcls().' + ); + } + + if (requestParameters['resource_type'] == null) { + throw new runtime.RequiredError( + 'resource_type', + 'Required parameter "resource_type" was null or undefined when calling deleteKafkaAcls().' + ); + } + + if (requestParameters['pattern_type'] == null) { + throw new runtime.RequiredError( + 'pattern_type', + 'Required parameter "pattern_type" was null or undefined when calling deleteKafkaAcls().' + ); + } + + if (requestParameters['operation'] == null) { + throw new runtime.RequiredError( + 'operation', + 'Required parameter "operation" was null or undefined when calling deleteKafkaAcls().' + ); + } + + if (requestParameters['permission'] == null) { + throw new runtime.RequiredError( + 'permission', + 'Required parameter "permission" was null or undefined when calling deleteKafkaAcls().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['resource_type'] != null) { + queryParameters['resource_type'] = requestParameters['resource_type']; + } + + if (requestParameters['resource_name'] != null) { + queryParameters['resource_name'] = requestParameters['resource_name']; + } + + if (requestParameters['pattern_type'] != null) { + queryParameters['pattern_type'] = requestParameters['pattern_type']; + } + + if (requestParameters['principal'] != null) { + queryParameters['principal'] = requestParameters['principal']; + } + + if (requestParameters['host'] != null) { + queryParameters['host'] = requestParameters['host']; + } + + if (requestParameters['operation'] != null) { + queryParameters['operation'] = requestParameters['operation']; + } + + if (requestParameters['permission'] != null) { + queryParameters['permission'] = requestParameters['permission']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/acls`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeleteKafkaAcls200ResponseFromJSON(jsonValue)); } - if (requestParameters["principal"] != null) { - queryParameters["principal"] = requestParameters["principal"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. + * Delete ACLs + */ + async deleteKafkaAcls(requestParameters: DeleteKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteKafkaAclsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["host"] != null) { - queryParameters["host"] = requestParameters["host"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. + * List ACLs + */ + async getKafkaAclsRaw(requestParameters: GetKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaAcls().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['resource_type'] != null) { + queryParameters['resource_type'] = requestParameters['resource_type']; + } + + if (requestParameters['resource_name'] != null) { + queryParameters['resource_name'] = requestParameters['resource_name']; + } + + if (requestParameters['pattern_type'] != null) { + queryParameters['pattern_type'] = requestParameters['pattern_type']; + } + + if (requestParameters['principal'] != null) { + queryParameters['principal'] = requestParameters['principal']; + } + + if (requestParameters['host'] != null) { + queryParameters['host'] = requestParameters['host']; + } + + if (requestParameters['operation'] != null) { + queryParameters['operation'] = requestParameters['operation']; + } + + if (requestParameters['permission'] != null) { + queryParameters['permission'] = requestParameters['permission']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/acls`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AclDataListFromJSON(jsonValue)); } - if (requestParameters["operation"] != null) { - queryParameters["operation"] = requestParameters["operation"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. + * List ACLs + */ + async getKafkaAcls(requestParameters: GetKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaAclsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["permission"] != null) { - queryParameters["permission"] = requestParameters["permission"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/acls`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => AclDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. - * List ACLs - */ - async getKafkaAcls( - requestParameters: GetKafkaAclsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaAclsRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts b/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts index ce4dacf380..4ebc34a745 100644 --- a/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts +++ b/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts @@ -5,14 +5,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { AlterConfigBatchRequestData, AlterMirrorStatusResponseDataList, @@ -27,1608 +28,1213 @@ import type { ListMirrorTopicsResponseDataList, MirrorTopicStatus, UpdateLinkConfigRequestData, -} from "../models/index"; +} from '../models/index'; import { - AlterConfigBatchRequestDataFromJSON, - AlterConfigBatchRequestDataToJSON, - AlterMirrorStatusResponseDataListFromJSON, - AlterMirrorStatusResponseDataListToJSON, - AlterMirrorsRequestDataFromJSON, - AlterMirrorsRequestDataToJSON, - CreateLinkRequestDataFromJSON, - CreateLinkRequestDataToJSON, - CreateMirrorTopicRequestDataFromJSON, - CreateMirrorTopicRequestDataToJSON, - ListLinkConfigsResponseDataFromJSON, - ListLinkConfigsResponseDataToJSON, - ListLinkConfigsResponseDataListFromJSON, - ListLinkConfigsResponseDataListToJSON, - ListLinksResponseDataFromJSON, - ListLinksResponseDataToJSON, - ListLinksResponseDataListFromJSON, - ListLinksResponseDataListToJSON, - ListMirrorTopicsResponseDataFromJSON, - ListMirrorTopicsResponseDataToJSON, - ListMirrorTopicsResponseDataListFromJSON, - ListMirrorTopicsResponseDataListToJSON, - MirrorTopicStatusFromJSON, - MirrorTopicStatusToJSON, - UpdateLinkConfigRequestDataFromJSON, - UpdateLinkConfigRequestDataToJSON, -} from "../models/index"; + AlterConfigBatchRequestDataFromJSON, + AlterConfigBatchRequestDataToJSON, + AlterMirrorStatusResponseDataListFromJSON, + AlterMirrorStatusResponseDataListToJSON, + AlterMirrorsRequestDataFromJSON, + AlterMirrorsRequestDataToJSON, + CreateLinkRequestDataFromJSON, + CreateLinkRequestDataToJSON, + CreateMirrorTopicRequestDataFromJSON, + CreateMirrorTopicRequestDataToJSON, + ListLinkConfigsResponseDataFromJSON, + ListLinkConfigsResponseDataToJSON, + ListLinkConfigsResponseDataListFromJSON, + ListLinkConfigsResponseDataListToJSON, + ListLinksResponseDataFromJSON, + ListLinksResponseDataToJSON, + ListLinksResponseDataListFromJSON, + ListLinksResponseDataListToJSON, + ListMirrorTopicsResponseDataFromJSON, + ListMirrorTopicsResponseDataToJSON, + ListMirrorTopicsResponseDataListFromJSON, + ListMirrorTopicsResponseDataListToJSON, + MirrorTopicStatusFromJSON, + MirrorTopicStatusToJSON, + UpdateLinkConfigRequestDataFromJSON, + UpdateLinkConfigRequestDataToJSON, +} from '../models/index'; export interface CreateKafkaLinkRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - validate_link?: boolean; - CreateLinkRequestData?: CreateLinkRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + validate_link?: boolean; + CreateLinkRequestData?: CreateLinkRequestData; } export interface CreateKafkaMirrorTopicRequest { - cluster_id: string; - link_name: string; - CreateMirrorTopicRequestData?: CreateMirrorTopicRequestData; + cluster_id: string; + link_name: string; + CreateMirrorTopicRequestData?: CreateMirrorTopicRequestData; } export interface DeleteKafkaLinkRequest { - cluster_id: string; - link_name: string; - force?: boolean; - validate_only?: boolean; + cluster_id: string; + link_name: string; + force?: boolean; + validate_only?: boolean; } export interface DeleteKafkaLinkConfigRequest { - cluster_id: string; - link_name: string; - config_name: string; + cluster_id: string; + link_name: string; + config_name: string; } export interface GetKafkaLinkRequest { - cluster_id: string; - link_name: string; - include_tasks?: boolean; + cluster_id: string; + link_name: string; + include_tasks?: boolean; } export interface GetKafkaLinkConfigsRequest { - cluster_id: string; - link_name: string; - config_name: string; + cluster_id: string; + link_name: string; + config_name: string; } export interface ListKafkaLinkConfigsRequest { - cluster_id: string; - link_name: string; + cluster_id: string; + link_name: string; } export interface ListKafkaLinksRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaMirrorTopicsRequest { - cluster_id: string; - mirror_status?: MirrorTopicStatus; + cluster_id: string; + mirror_status?: MirrorTopicStatus; } export interface ListKafkaMirrorTopicsUnderLinkRequest { - cluster_id: string; - link_name: string; - mirror_status?: MirrorTopicStatus; + cluster_id: string; + link_name: string; + mirror_status?: MirrorTopicStatus; } export interface ReadKafkaMirrorTopicRequest { - cluster_id: string; - link_name: string; - mirror_topic_name: string; - include_state_transition_errors?: boolean; + cluster_id: string; + link_name: string; + mirror_topic_name: string; + include_state_transition_errors?: boolean; } export interface UpdateKafkaLinkConfigRequest { - cluster_id: string; - link_name: string; - config_name: string; - UpdateLinkConfigRequestData?: UpdateLinkConfigRequestData; + cluster_id: string; + link_name: string; + config_name: string; + UpdateLinkConfigRequestData?: UpdateLinkConfigRequestData; } export interface UpdateKafkaLinkConfigBatchRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterConfigBatchRequestData?: AlterConfigBatchRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterConfigBatchRequestData?: AlterConfigBatchRequestData; } export interface UpdateKafkaMirrorTopicsFailoverRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsPauseRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsPromoteRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsResumeRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } /** - * + * */ export class ClusterLinkingV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. - * Create a cluster link - */ - async createKafkaLinkRaw( - requestParameters: CreateKafkaLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling createKafkaLink().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling createKafkaLink().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["link_name"] != null) { - queryParameters["link_name"] = requestParameters["link_name"]; - } - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - if (requestParameters["validate_link"] != null) { - queryParameters["validate_link"] = requestParameters["validate_link"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateLinkRequestDataToJSON(requestParameters["CreateLinkRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. - * Create a cluster link - */ - async createKafkaLink( - requestParameters: CreateKafkaLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.createKafkaLinkRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster - * Create a mirror topic - */ - async createKafkaMirrorTopicRaw( - requestParameters: CreateKafkaMirrorTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling createKafkaMirrorTopic().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling createKafkaMirrorTopic().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateMirrorTopicRequestDataToJSON(requestParameters["CreateMirrorTopicRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster - * Create a mirror topic - */ - async createKafkaMirrorTopic( - requestParameters: CreateKafkaMirrorTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.createKafkaMirrorTopicRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Delete the cluster link - */ - async deleteKafkaLinkRaw( - requestParameters: DeleteKafkaLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLink().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. + * Create a cluster link + */ + async createKafkaLinkRaw(requestParameters: CreateKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling createKafkaLink().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling createKafkaLink().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['link_name'] != null) { + queryParameters['link_name'] = requestParameters['link_name']; + } + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + if (requestParameters['validate_link'] != null) { + queryParameters['validate_link'] = requestParameters['validate_link']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateLinkRequestDataToJSON(requestParameters['CreateLinkRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. + * Create a cluster link + */ + async createKafkaLink(requestParameters: CreateKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.createKafkaLinkRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster + * Create a mirror topic + */ + async createKafkaMirrorTopicRaw(requestParameters: CreateKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling createKafkaMirrorTopic().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling createKafkaMirrorTopic().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateMirrorTopicRequestDataToJSON(requestParameters['CreateMirrorTopicRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster + * Create a mirror topic + */ + async createKafkaMirrorTopic(requestParameters: CreateKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.createKafkaMirrorTopicRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Delete the cluster link + */ + async deleteKafkaLinkRaw(requestParameters: DeleteKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLink().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling deleteKafkaLink().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Delete the cluster link + */ + async deleteKafkaLink(requestParameters: DeleteKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteKafkaLinkRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reset the given config to default value + */ + async deleteKafkaLinkConfigRaw(requestParameters: DeleteKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLinkConfig().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling deleteKafkaLinkConfig().' + ); + } + + if (requestParameters['config_name'] == null) { + throw new runtime.RequiredError( + 'config_name', + 'Required parameter "config_name" was null or undefined when calling deleteKafkaLinkConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"config_name"}}`, encodeURIComponent(String(requestParameters['config_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reset the given config to default value + */ + async deleteKafkaLinkConfig(requestParameters: DeleteKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteKafkaLinkConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * Describe the cluster link + */ + async getKafkaLinkRaw(requestParameters: GetKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaLink().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling getKafkaLink().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['include_tasks'] != null) { + queryParameters['include_tasks'] = requestParameters['include_tasks']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListLinksResponseDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * Describe the cluster link + */ + async getKafkaLink(requestParameters: GetKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaLinkRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the config under the cluster link + */ + async getKafkaLinkConfigsRaw(requestParameters: GetKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaLinkConfigs().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling getKafkaLinkConfigs().' + ); + } + + if (requestParameters['config_name'] == null) { + throw new runtime.RequiredError( + 'config_name', + 'Required parameter "config_name" was null or undefined when calling getKafkaLinkConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"config_name"}}`, encodeURIComponent(String(requestParameters['config_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListLinkConfigsResponseDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the config under the cluster link + */ + async getKafkaLinkConfigs(requestParameters: GetKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaLinkConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * List all configs of the cluster link + */ + async listKafkaLinkConfigsRaw(requestParameters: ListKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinkConfigs().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling listKafkaLinkConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListLinkConfigsResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * List all configs of the cluster link + */ + async listKafkaLinkConfigs(requestParameters: ListKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaLinkConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * List all cluster links in the dest cluster + */ + async listKafkaLinksRaw(requestParameters: ListKafkaLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinks().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListLinksResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * List all cluster links in the dest cluster + */ + async listKafkaLinks(requestParameters: ListKafkaLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaLinksRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster + * List mirror topics + */ + async listKafkaMirrorTopicsRaw(requestParameters: ListKafkaMirrorTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopics().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['mirror_status'] != null) { + queryParameters['mirror_status'] = requestParameters['mirror_status']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/-/mirrors`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListMirrorTopicsResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster + * List mirror topics + */ + async listKafkaMirrorTopics(requestParameters: ListKafkaMirrorTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaMirrorTopicsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link + * List mirror topics + */ + async listKafkaMirrorTopicsUnderLinkRaw(requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopicsUnderLink().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling listKafkaMirrorTopicsUnderLink().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['mirror_status'] != null) { + queryParameters['mirror_status'] = requestParameters['mirror_status']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListMirrorTopicsResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link + * List mirror topics + */ + async listKafkaMirrorTopicsUnderLink(requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaMirrorTopicsUnderLinkRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the mirror topic + */ + async readKafkaMirrorTopicRaw(requestParameters: ReadKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling readKafkaMirrorTopic().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling readKafkaMirrorTopic().' + ); + } + + if (requestParameters['mirror_topic_name'] == null) { + throw new runtime.RequiredError( + 'mirror_topic_name', + 'Required parameter "mirror_topic_name" was null or undefined when calling readKafkaMirrorTopic().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['include_state_transition_errors'] != null) { + queryParameters['include_state_transition_errors'] = requestParameters['include_state_transition_errors']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors/{mirror_topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"mirror_topic_name"}}`, encodeURIComponent(String(requestParameters['mirror_topic_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListMirrorTopicsResponseDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the mirror topic + */ + async readKafkaMirrorTopic(requestParameters: ReadKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.readKafkaMirrorTopicRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Alter the config under the cluster link + */ + async updateKafkaLinkConfigRaw(requestParameters: UpdateKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfig().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfig().' + ); + } + + if (requestParameters['config_name'] == null) { + throw new runtime.RequiredError( + 'config_name', + 'Required parameter "config_name" was null or undefined when calling updateKafkaLinkConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"config_name"}}`, encodeURIComponent(String(requestParameters['config_name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateLinkConfigRequestDataToJSON(requestParameters['UpdateLinkConfigRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Alter the config under the cluster link + */ + async updateKafkaLinkConfig(requestParameters: UpdateKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateKafkaLinkConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs + * Batch Alter Cluster Link Configs + */ + async updateKafkaLinkConfigBatchRaw(requestParameters: UpdateKafkaLinkConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfigBatch().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfigBatch().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs:alter`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: AlterConfigBatchRequestDataToJSON(requestParameters['AlterConfigBatchRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs + * Batch Alter Cluster Link Configs + */ + async updateKafkaLinkConfigBatch(requestParameters: UpdateKafkaLinkConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateKafkaLinkConfigBatchRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Failover the mirror topics + */ + async updateKafkaMirrorTopicsFailoverRaw(requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsFailover().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsFailover().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:failover`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Failover the mirror topics + */ + async updateKafkaMirrorTopicsFailover(requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateKafkaMirrorTopicsFailoverRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Pause the mirror topics + */ + async updateKafkaMirrorTopicsPauseRaw(requestParameters: UpdateKafkaMirrorTopicsPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPause().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPause().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:pause`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Pause the mirror topics + */ + async updateKafkaMirrorTopicsPause(requestParameters: UpdateKafkaMirrorTopicsPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateKafkaMirrorTopicsPauseRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Promote the mirror topics + */ + async updateKafkaMirrorTopicsPromoteRaw(requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPromote().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPromote().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:promote`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Promote the mirror topics + */ + async updateKafkaMirrorTopicsPromote(requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateKafkaMirrorTopicsPromoteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Resume the mirror topics + */ + async updateKafkaMirrorTopicsResumeRaw(requestParameters: UpdateKafkaMirrorTopicsResumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsResume().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsResume().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:resume`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Resume the mirror topics + */ + async updateKafkaMirrorTopicsResume(requestParameters: UpdateKafkaMirrorTopicsResumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateKafkaMirrorTopicsResumeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and Pause the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndPauseMirrorRaw(requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-pause-mirror`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and Pause the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndPauseMirror(requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateKafkaMirrorTopicsReverseAndPauseMirrorRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and start the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndStartMirrorRaw(requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().' + ); + } + + if (requestParameters['link_name'] == null) { + throw new runtime.RequiredError( + 'link_name', + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['validate_only'] != null) { + queryParameters['validate_only'] = requestParameters['validate_only']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-start-mirror`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and start the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndStartMirror(requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateKafkaMirrorTopicsReverseAndStartMirrorRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling deleteKafkaLink().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; - } - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Delete the cluster link - */ - async deleteKafkaLink( - requestParameters: DeleteKafkaLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteKafkaLinkRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reset the given config to default value - */ - async deleteKafkaLinkConfigRaw( - requestParameters: DeleteKafkaLinkConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLinkConfig().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling deleteKafkaLinkConfig().', - ); - } - - if (requestParameters["config_name"] == null) { - throw new runtime.RequiredError( - "config_name", - 'Required parameter "config_name" was null or undefined when calling deleteKafkaLinkConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) - .replace( - `{${"config_name"}}`, - encodeURIComponent(String(requestParameters["config_name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reset the given config to default value - */ - async deleteKafkaLinkConfig( - requestParameters: DeleteKafkaLinkConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteKafkaLinkConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * Describe the cluster link - */ - async getKafkaLinkRaw( - requestParameters: GetKafkaLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaLink().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling getKafkaLink().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["include_tasks"] != null) { - queryParameters["include_tasks"] = requestParameters["include_tasks"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListLinksResponseDataFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * Describe the cluster link - */ - async getKafkaLink( - requestParameters: GetKafkaLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaLinkRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the config under the cluster link - */ - async getKafkaLinkConfigsRaw( - requestParameters: GetKafkaLinkConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaLinkConfigs().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling getKafkaLinkConfigs().', - ); - } - - if (requestParameters["config_name"] == null) { - throw new runtime.RequiredError( - "config_name", - 'Required parameter "config_name" was null or undefined when calling getKafkaLinkConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) - .replace( - `{${"config_name"}}`, - encodeURIComponent(String(requestParameters["config_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListLinkConfigsResponseDataFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the config under the cluster link - */ - async getKafkaLinkConfigs( - requestParameters: GetKafkaLinkConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaLinkConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * List all configs of the cluster link - */ - async listKafkaLinkConfigsRaw( - requestParameters: ListKafkaLinkConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinkConfigs().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling listKafkaLinkConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListLinkConfigsResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * List all configs of the cluster link - */ - async listKafkaLinkConfigs( - requestParameters: ListKafkaLinkConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaLinkConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * List all cluster links in the dest cluster - */ - async listKafkaLinksRaw( - requestParameters: ListKafkaLinksRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinks().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListLinksResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * List all cluster links in the dest cluster - */ - async listKafkaLinks( - requestParameters: ListKafkaLinksRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaLinksRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster - * List mirror topics - */ - async listKafkaMirrorTopicsRaw( - requestParameters: ListKafkaMirrorTopicsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopics().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["mirror_status"] != null) { - queryParameters["mirror_status"] = requestParameters["mirror_status"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/-/mirrors`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListMirrorTopicsResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster - * List mirror topics - */ - async listKafkaMirrorTopics( - requestParameters: ListKafkaMirrorTopicsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaMirrorTopicsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link - * List mirror topics - */ - async listKafkaMirrorTopicsUnderLinkRaw( - requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopicsUnderLink().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling listKafkaMirrorTopicsUnderLink().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["mirror_status"] != null) { - queryParameters["mirror_status"] = requestParameters["mirror_status"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListMirrorTopicsResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link - * List mirror topics - */ - async listKafkaMirrorTopicsUnderLink( - requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaMirrorTopicsUnderLinkRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the mirror topic - */ - async readKafkaMirrorTopicRaw( - requestParameters: ReadKafkaMirrorTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling readKafkaMirrorTopic().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling readKafkaMirrorTopic().', - ); - } - - if (requestParameters["mirror_topic_name"] == null) { - throw new runtime.RequiredError( - "mirror_topic_name", - 'Required parameter "mirror_topic_name" was null or undefined when calling readKafkaMirrorTopic().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["include_state_transition_errors"] != null) { - queryParameters["include_state_transition_errors"] = - requestParameters["include_state_transition_errors"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors/{mirror_topic_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) - .replace( - `{${"mirror_topic_name"}}`, - encodeURIComponent(String(requestParameters["mirror_topic_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ListMirrorTopicsResponseDataFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the mirror topic - */ - async readKafkaMirrorTopic( - requestParameters: ReadKafkaMirrorTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.readKafkaMirrorTopicRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Alter the config under the cluster link - */ - async updateKafkaLinkConfigRaw( - requestParameters: UpdateKafkaLinkConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfig().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfig().', - ); - } - - if (requestParameters["config_name"] == null) { - throw new runtime.RequiredError( - "config_name", - 'Required parameter "config_name" was null or undefined when calling updateKafkaLinkConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) - .replace( - `{${"config_name"}}`, - encodeURIComponent(String(requestParameters["config_name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: UpdateLinkConfigRequestDataToJSON(requestParameters["UpdateLinkConfigRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Alter the config under the cluster link - */ - async updateKafkaLinkConfig( - requestParameters: UpdateKafkaLinkConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateKafkaLinkConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs - * Batch Alter Cluster Link Configs - */ - async updateKafkaLinkConfigBatchRaw( - requestParameters: UpdateKafkaLinkConfigBatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfigBatch().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfigBatch().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs:alter` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: AlterConfigBatchRequestDataToJSON(requestParameters["AlterConfigBatchRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs - * Batch Alter Cluster Link Configs - */ - async updateKafkaLinkConfigBatch( - requestParameters: UpdateKafkaLinkConfigBatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateKafkaLinkConfigBatchRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Failover the mirror topics - */ - async updateKafkaMirrorTopicsFailoverRaw( - requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsFailover().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsFailover().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:failover` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AlterMirrorStatusResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Failover the mirror topics - */ - async updateKafkaMirrorTopicsFailover( - requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateKafkaMirrorTopicsFailoverRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Pause the mirror topics - */ - async updateKafkaMirrorTopicsPauseRaw( - requestParameters: UpdateKafkaMirrorTopicsPauseRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPause().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPause().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:pause` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AlterMirrorStatusResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Pause the mirror topics - */ - async updateKafkaMirrorTopicsPause( - requestParameters: UpdateKafkaMirrorTopicsPauseRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateKafkaMirrorTopicsPauseRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Promote the mirror topics - */ - async updateKafkaMirrorTopicsPromoteRaw( - requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPromote().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPromote().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:promote` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AlterMirrorStatusResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Promote the mirror topics - */ - async updateKafkaMirrorTopicsPromote( - requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateKafkaMirrorTopicsPromoteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Resume the mirror topics - */ - async updateKafkaMirrorTopicsResumeRaw( - requestParameters: UpdateKafkaMirrorTopicsResumeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsResume().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsResume().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:resume` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AlterMirrorStatusResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Resume the mirror topics - */ - async updateKafkaMirrorTopicsResume( - requestParameters: UpdateKafkaMirrorTopicsResumeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateKafkaMirrorTopicsResumeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and Pause the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndPauseMirrorRaw( - requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-pause-mirror` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AlterMirrorStatusResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and Pause the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndPauseMirror( - requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateKafkaMirrorTopicsReverseAndPauseMirrorRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and start the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndStartMirrorRaw( - requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().', - ); - } - - if (requestParameters["link_name"] == null) { - throw new runtime.RequiredError( - "link_name", - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["validate_only"] != null) { - queryParameters["validate_only"] = requestParameters["validate_only"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-start-mirror` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AlterMirrorStatusResponseDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and start the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndStartMirror( - requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateKafkaMirrorTopicsReverseAndStartMirrorRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/ClusterV3Api.ts b/src/clients/kafkaRest/apis/ClusterV3Api.ts index 985bc0a689..b215ff04d0 100644 --- a/src/clients/kafkaRest/apis/ClusterV3Api.ts +++ b/src/clients/kafkaRest/apis/ClusterV3Api.ts @@ -5,84 +5,73 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ClusterData } from "../models/index"; -import { ClusterDataFromJSON, ClusterDataToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ClusterData, +} from '../models/index'; +import { + ClusterDataFromJSON, + ClusterDataToJSON, +} from '../models/index'; export interface GetKafkaClusterRequest { - cluster_id: string; + cluster_id: string; } /** - * + * */ export class ClusterV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. - * Get Cluster - */ - async getKafkaClusterRaw( - requestParameters: GetKafkaClusterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaCluster().', - ); - } - const queryParameters: any = {}; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. + * Get Cluster + */ + async getKafkaClusterRaw(requestParameters: GetKafkaClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaCluster().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClusterDataFromJSON(jsonValue)); } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - return new runtime.JSONApiResponse(response, (jsonValue) => ClusterDataFromJSON(jsonValue)); - } + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. + * Get Cluster + */ + async getKafkaCluster(requestParameters: GetKafkaClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaClusterRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. - * Get Cluster - */ - async getKafkaCluster( - requestParameters: GetKafkaClusterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaClusterRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/ConfigsV3Api.ts b/src/clients/kafkaRest/apis/ConfigsV3Api.ts index 5923a681ee..ed3714709f 100644 --- a/src/clients/kafkaRest/apis/ConfigsV3Api.ts +++ b/src/clients/kafkaRest/apis/ConfigsV3Api.ts @@ -5,14 +5,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { AlterConfigBatchRequestData, ClusterConfigData, @@ -20,934 +21,695 @@ import type { TopicConfigData, TopicConfigDataList, UpdateConfigRequestData, -} from "../models/index"; +} from '../models/index'; import { - AlterConfigBatchRequestDataFromJSON, - AlterConfigBatchRequestDataToJSON, - ClusterConfigDataFromJSON, - ClusterConfigDataToJSON, - ClusterConfigDataListFromJSON, - ClusterConfigDataListToJSON, - TopicConfigDataFromJSON, - TopicConfigDataToJSON, - TopicConfigDataListFromJSON, - TopicConfigDataListToJSON, - UpdateConfigRequestDataFromJSON, - UpdateConfigRequestDataToJSON, -} from "../models/index"; + AlterConfigBatchRequestDataFromJSON, + AlterConfigBatchRequestDataToJSON, + ClusterConfigDataFromJSON, + ClusterConfigDataToJSON, + ClusterConfigDataListFromJSON, + ClusterConfigDataListToJSON, + TopicConfigDataFromJSON, + TopicConfigDataToJSON, + TopicConfigDataListFromJSON, + TopicConfigDataListToJSON, + UpdateConfigRequestDataFromJSON, + UpdateConfigRequestDataToJSON, +} from '../models/index'; export interface DeleteKafkaClusterConfigRequest { - cluster_id: string; - name: string; + cluster_id: string; + name: string; } export interface DeleteKafkaTopicConfigRequest { - cluster_id: string; - topic_name: string; - name: string; + cluster_id: string; + topic_name: string; + name: string; } export interface GetKafkaClusterConfigRequest { - cluster_id: string; - name: string; + cluster_id: string; + name: string; } export interface GetKafkaTopicConfigRequest { - cluster_id: string; - topic_name: string; - name: string; + cluster_id: string; + topic_name: string; + name: string; } export interface ListKafkaAllTopicConfigsRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaClusterConfigsRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaDefaultTopicConfigsRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } export interface ListKafkaTopicConfigsRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } export interface UpdateKafkaClusterConfigRequest { - cluster_id: string; - name: string; - UpdateConfigRequestData?: UpdateConfigRequestData; + cluster_id: string; + name: string; + UpdateConfigRequestData?: UpdateConfigRequestData; } export interface UpdateKafkaClusterConfigsRequest { - cluster_id: string; - AlterConfigBatchRequestData?: AlterConfigBatchRequestData; + cluster_id: string; + AlterConfigBatchRequestData?: AlterConfigBatchRequestData; } export interface UpdateKafkaTopicConfigRequest { - cluster_id: string; - topic_name: string; - name: string; - UpdateConfigRequestData?: UpdateConfigRequestData; + cluster_id: string; + topic_name: string; + name: string; + UpdateConfigRequestData?: UpdateConfigRequestData; } export interface UpdateKafkaTopicConfigBatchRequest { - cluster_id: string; - topic_name: string; - AlterConfigBatchRequestData?: AlterConfigBatchRequestData; + cluster_id: string; + topic_name: string; + AlterConfigBatchRequestData?: AlterConfigBatchRequestData; } /** - * + * */ export class ConfigsV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. - * Reset Dynamic Broker Config - */ - async deleteKafkaClusterConfigRaw( - requestParameters: DeleteKafkaClusterConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaClusterConfig().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteKafkaClusterConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. - * Reset Dynamic Broker Config - */ - async deleteKafkaClusterConfig( - requestParameters: DeleteKafkaClusterConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteKafkaClusterConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. - * Reset Topic Config - */ - async deleteKafkaTopicConfigRaw( - requestParameters: DeleteKafkaTopicConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopicConfig().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopicConfig().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteKafkaTopicConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. - * Reset Topic Config - */ - async deleteKafkaTopicConfig( - requestParameters: DeleteKafkaTopicConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteKafkaTopicConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Get Dynamic Broker Config - */ - async getKafkaClusterConfigRaw( - requestParameters: GetKafkaClusterConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaClusterConfig().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getKafkaClusterConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ClusterConfigDataFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Get Dynamic Broker Config - */ - async getKafkaClusterConfig( - requestParameters: GetKafkaClusterConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaClusterConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. - * Get Topic Config - */ - async getKafkaTopicConfigRaw( - requestParameters: GetKafkaTopicConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopicConfig().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling getKafkaTopicConfig().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getKafkaTopicConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. - * Get Topic Config - */ - async getKafkaTopicConfig( - requestParameters: GetKafkaTopicConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaTopicConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. - * List All Topic Configs - */ - async listKafkaAllTopicConfigsRaw( - requestParameters: ListKafkaAllTopicConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaAllTopicConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/-/configs`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - TopicConfigDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. - * List All Topic Configs - */ - async listKafkaAllTopicConfigs( - requestParameters: ListKafkaAllTopicConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaAllTopicConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. - * List Dynamic Broker Configs - */ - async listKafkaClusterConfigsRaw( - requestParameters: ListKafkaClusterConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaClusterConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/broker-configs`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ClusterConfigDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. - * List Dynamic Broker Configs - */ - async listKafkaClusterConfigs( - requestParameters: ListKafkaClusterConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaClusterConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. - * List New Topic Default Configs - */ - async listKafkaDefaultTopicConfigsRaw( - requestParameters: ListKafkaDefaultTopicConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaDefaultTopicConfigs().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling listKafkaDefaultTopicConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/default-configs` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - TopicConfigDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. - * List New Topic Default Configs - */ - async listKafkaDefaultTopicConfigs( - requestParameters: ListKafkaDefaultTopicConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaDefaultTopicConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. - * List Topic Configs - */ - async listKafkaTopicConfigsRaw( - requestParameters: ListKafkaTopicConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopicConfigs().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling listKafkaTopicConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - TopicConfigDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. - * List Topic Configs - */ - async listKafkaTopicConfigs( - requestParameters: ListKafkaTopicConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaTopicConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Update Dynamic Broker Config - */ - async updateKafkaClusterConfigRaw( - requestParameters: UpdateKafkaClusterConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfig().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling updateKafkaClusterConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: UpdateConfigRequestDataToJSON(requestParameters["UpdateConfigRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Update Dynamic Broker Config - */ - async updateKafkaClusterConfig( - requestParameters: UpdateKafkaClusterConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateKafkaClusterConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. - * Batch Alter Dynamic Broker Configs - */ - async updateKafkaClusterConfigsRaw( - requestParameters: UpdateKafkaClusterConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfigs().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/broker-configs:alter`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterConfigBatchRequestDataToJSON(requestParameters["AlterConfigBatchRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. - * Batch Alter Dynamic Broker Configs - */ - async updateKafkaClusterConfigs( - requestParameters: UpdateKafkaClusterConfigsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateKafkaClusterConfigsRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. - * Update Topic Config - */ - async updateKafkaTopicConfigRaw( - requestParameters: UpdateKafkaTopicConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfig().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfig().', - ); - } - - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling updateKafkaTopicConfig().', - ); - } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: UpdateConfigRequestDataToJSON(requestParameters["UpdateConfigRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. - * Update Topic Config - */ - async updateKafkaTopicConfig( - requestParameters: UpdateKafkaTopicConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateKafkaTopicConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. - * Batch Alter Topic Configs - */ - async updateKafkaTopicConfigBatchRaw( - requestParameters: UpdateKafkaTopicConfigBatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfigBatch().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfigBatch().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. + * Reset Dynamic Broker Config + */ + async deleteKafkaClusterConfigRaw(requestParameters: DeleteKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaClusterConfig().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteKafkaClusterConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. + * Reset Dynamic Broker Config + */ + async deleteKafkaClusterConfig(requestParameters: DeleteKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteKafkaClusterConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. + * Reset Topic Config + */ + async deleteKafkaTopicConfigRaw(requestParameters: DeleteKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopicConfig().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopicConfig().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteKafkaTopicConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. + * Reset Topic Config + */ + async deleteKafkaTopicConfig(requestParameters: DeleteKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteKafkaTopicConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Get Dynamic Broker Config + */ + async getKafkaClusterConfigRaw(requestParameters: GetKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaClusterConfig().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getKafkaClusterConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Get Dynamic Broker Config + */ + async getKafkaClusterConfig(requestParameters: GetKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaClusterConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. + * Get Topic Config + */ + async getKafkaTopicConfigRaw(requestParameters: GetKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopicConfig().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling getKafkaTopicConfig().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getKafkaTopicConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. + * Get Topic Config + */ + async getKafkaTopicConfig(requestParameters: GetKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaTopicConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. + * List All Topic Configs + */ + async listKafkaAllTopicConfigsRaw(requestParameters: ListKafkaAllTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaAllTopicConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/-/configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. + * List All Topic Configs + */ + async listKafkaAllTopicConfigs(requestParameters: ListKafkaAllTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaAllTopicConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. + * List Dynamic Broker Configs + */ + async listKafkaClusterConfigsRaw(requestParameters: ListKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaClusterConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/broker-configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. + * List Dynamic Broker Configs + */ + async listKafkaClusterConfigs(requestParameters: ListKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaClusterConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. + * List New Topic Default Configs + */ + async listKafkaDefaultTopicConfigsRaw(requestParameters: ListKafkaDefaultTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaDefaultTopicConfigs().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling listKafkaDefaultTopicConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/default-configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. + * List New Topic Default Configs + */ + async listKafkaDefaultTopicConfigs(requestParameters: ListKafkaDefaultTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaDefaultTopicConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. + * List Topic Configs + */ + async listKafkaTopicConfigsRaw(requestParameters: ListKafkaTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopicConfigs().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling listKafkaTopicConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. + * List Topic Configs + */ + async listKafkaTopicConfigs(requestParameters: ListKafkaTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaTopicConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Update Dynamic Broker Config + */ + async updateKafkaClusterConfigRaw(requestParameters: UpdateKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfig().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling updateKafkaClusterConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateConfigRequestDataToJSON(requestParameters['UpdateConfigRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Update Dynamic Broker Config + */ + async updateKafkaClusterConfig(requestParameters: UpdateKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateKafkaClusterConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. + * Batch Alter Dynamic Broker Configs + */ + async updateKafkaClusterConfigsRaw(requestParameters: UpdateKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfigs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/broker-configs:alter`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterConfigBatchRequestDataToJSON(requestParameters['AlterConfigBatchRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. + * Batch Alter Dynamic Broker Configs + */ + async updateKafkaClusterConfigs(requestParameters: UpdateKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateKafkaClusterConfigsRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. + * Update Topic Config + */ + async updateKafkaTopicConfigRaw(requestParameters: UpdateKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfig().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfig().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling updateKafkaTopicConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateConfigRequestDataToJSON(requestParameters['UpdateConfigRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. + * Update Topic Config + */ + async updateKafkaTopicConfig(requestParameters: UpdateKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateKafkaTopicConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. + * Batch Alter Topic Configs + */ + async updateKafkaTopicConfigBatchRaw(requestParameters: UpdateKafkaTopicConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfigBatch().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfigBatch().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs:alter`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: AlterConfigBatchRequestDataToJSON(requestParameters['AlterConfigBatchRequestData']), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. + * Batch Alter Topic Configs + */ + async updateKafkaTopicConfigBatch(requestParameters: UpdateKafkaTopicConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateKafkaTopicConfigBatchRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs:alter` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: AlterConfigBatchRequestDataToJSON(requestParameters["AlterConfigBatchRequestData"]), - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. - * Batch Alter Topic Configs - */ - async updateKafkaTopicConfigBatch( - requestParameters: UpdateKafkaTopicConfigBatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.updateKafkaTopicConfigBatchRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts b/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts index b1f49cec9b..ca2624d675 100644 --- a/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts +++ b/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts @@ -5,14 +5,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ConsumerData, ConsumerDataList, @@ -21,593 +22,428 @@ import type { ConsumerGroupLagSummaryData, ConsumerLagData, ConsumerLagDataList, -} from "../models/index"; +} from '../models/index'; import { - ConsumerDataFromJSON, - ConsumerDataToJSON, - ConsumerDataListFromJSON, - ConsumerDataListToJSON, - ConsumerGroupDataFromJSON, - ConsumerGroupDataToJSON, - ConsumerGroupDataListFromJSON, - ConsumerGroupDataListToJSON, - ConsumerGroupLagSummaryDataFromJSON, - ConsumerGroupLagSummaryDataToJSON, - ConsumerLagDataFromJSON, - ConsumerLagDataToJSON, - ConsumerLagDataListFromJSON, - ConsumerLagDataListToJSON, -} from "../models/index"; + ConsumerDataFromJSON, + ConsumerDataToJSON, + ConsumerDataListFromJSON, + ConsumerDataListToJSON, + ConsumerGroupDataFromJSON, + ConsumerGroupDataToJSON, + ConsumerGroupDataListFromJSON, + ConsumerGroupDataListToJSON, + ConsumerGroupLagSummaryDataFromJSON, + ConsumerGroupLagSummaryDataToJSON, + ConsumerLagDataFromJSON, + ConsumerLagDataToJSON, + ConsumerLagDataListFromJSON, + ConsumerLagDataListToJSON, +} from '../models/index'; export interface GetKafkaConsumerRequest { - cluster_id: string; - consumer_group_id: string; - consumer_id: string; + cluster_id: string; + consumer_group_id: string; + consumer_id: string; } export interface GetKafkaConsumerGroupRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } export interface GetKafkaConsumerGroupLagSummaryRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } export interface GetKafkaConsumerLagRequest { - cluster_id: string; - consumer_group_id: string; - topic_name: string; - partition_id: number; + cluster_id: string; + consumer_group_id: string; + topic_name: string; + partition_id: number; } export interface ListKafkaConsumerGroupsRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaConsumerLagsRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } export interface ListKafkaConsumersRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } /** - * + * */ export class ConsumerGroupV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. - * Get Consumer - */ - async getKafkaConsumerRaw( - requestParameters: GetKafkaConsumerRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumer().', - ); - } - if (requestParameters["consumer_group_id"] == null) { - throw new runtime.RequiredError( - "consumer_group_id", - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumer().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. + * Get Consumer + */ + async getKafkaConsumerRaw(requestParameters: GetKafkaConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumer().' + ); + } + + if (requestParameters['consumer_group_id'] == null) { + throw new runtime.RequiredError( + 'consumer_group_id', + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumer().' + ); + } + + if (requestParameters['consumer_id'] == null) { + throw new runtime.RequiredError( + 'consumer_id', + 'Required parameter "consumer_id" was null or undefined when calling getKafkaConsumer().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))).replace(`{${"consumer_id"}}`, encodeURIComponent(String(requestParameters['consumer_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerDataFromJSON(jsonValue)); } - if (requestParameters["consumer_id"] == null) { - throw new runtime.RequiredError( - "consumer_id", - 'Required parameter "consumer_id" was null or undefined when calling getKafkaConsumer().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. + * Get Consumer + */ + async getKafkaConsumer(requestParameters: GetKafkaConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaConsumerRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. + * Get Consumer Group + */ + async getKafkaConsumerGroupRaw(requestParameters: GetKafkaConsumerGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroup().' + ); + } + + if (requestParameters['consumer_group_id'] == null) { + throw new runtime.RequiredError( + 'consumer_group_id', + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerGroupDataFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"consumer_group_id"}}`, - encodeURIComponent(String(requestParameters["consumer_group_id"])), - ) - .replace( - `{${"consumer_id"}}`, - encodeURIComponent(String(requestParameters["consumer_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. - * Get Consumer - */ - async getKafkaConsumer( - requestParameters: GetKafkaConsumerRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaConsumerRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. - * Get Consumer Group - */ - async getKafkaConsumerGroupRaw( - requestParameters: GetKafkaConsumerGroupRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroup().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. + * Get Consumer Group + */ + async getKafkaConsumerGroup(requestParameters: GetKafkaConsumerGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaConsumerGroupRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["consumer_group_id"] == null) { - throw new runtime.RequiredError( - "consumer_group_id", - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroup().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. + * Get Consumer Group Lag Summary + */ + async getKafkaConsumerGroupLagSummaryRaw(requestParameters: GetKafkaConsumerGroupLagSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().' + ); + } + + if (requestParameters['consumer_group_id'] == null) { + throw new runtime.RequiredError( + 'consumer_group_id', + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lag-summary`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerGroupLagSummaryDataFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. + * Get Consumer Group Lag Summary + */ + async getKafkaConsumerGroupLagSummary(requestParameters: GetKafkaConsumerGroupLagSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaConsumerGroupLagSummaryRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"consumer_group_id"}}`, - encodeURIComponent(String(requestParameters["consumer_group_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConsumerGroupDataFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. - * Get Consumer Group - */ - async getKafkaConsumerGroup( - requestParameters: GetKafkaConsumerGroupRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaConsumerGroupRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. - * Get Consumer Group Lag Summary - */ - async getKafkaConsumerGroupLagSummaryRaw( - requestParameters: GetKafkaConsumerGroupLagSummaryRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. + * Get Consumer Lag + */ + async getKafkaConsumerLagRaw(requestParameters: GetKafkaConsumerLagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerLag().' + ); + } + + if (requestParameters['consumer_group_id'] == null) { + throw new runtime.RequiredError( + 'consumer_group_id', + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerLag().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling getKafkaConsumerLag().' + ); + } + + if (requestParameters['partition_id'] == null) { + throw new runtime.RequiredError( + 'partition_id', + 'Required parameter "partition_id" was null or undefined when calling getKafkaConsumerLag().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags/{topic_name}/partitions/{partition_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"partition_id"}}`, encodeURIComponent(String(requestParameters['partition_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerLagDataFromJSON(jsonValue)); } - if (requestParameters["consumer_group_id"] == null) { - throw new runtime.RequiredError( - "consumer_group_id", - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. + * Get Consumer Lag + */ + async getKafkaConsumerLag(requestParameters: GetKafkaConsumerLagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaConsumerLagRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. + * List Consumer Groups + */ + async listKafkaConsumerGroupsRaw(requestParameters: ListKafkaConsumerGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerGroups().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerGroupDataListFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lag-summary` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"consumer_group_id"}}`, - encodeURIComponent(String(requestParameters["consumer_group_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConsumerGroupLagSummaryDataFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. - * Get Consumer Group Lag Summary - */ - async getKafkaConsumerGroupLagSummary( - requestParameters: GetKafkaConsumerGroupLagSummaryRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaConsumerGroupLagSummaryRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. - * Get Consumer Lag - */ - async getKafkaConsumerLagRaw( - requestParameters: GetKafkaConsumerLagRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerLag().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. + * List Consumer Groups + */ + async listKafkaConsumerGroups(requestParameters: ListKafkaConsumerGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaConsumerGroupsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["consumer_group_id"] == null) { - throw new runtime.RequiredError( - "consumer_group_id", - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerLag().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. + * List Consumer Lags + */ + async listKafkaConsumerLagsRaw(requestParameters: ListKafkaConsumerLagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerLags().' + ); + } + + if (requestParameters['consumer_group_id'] == null) { + throw new runtime.RequiredError( + 'consumer_group_id', + 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumerLags().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerLagDataListFromJSON(jsonValue)); } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling getKafkaConsumerLag().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. + * List Consumer Lags + */ + async listKafkaConsumerLags(requestParameters: ListKafkaConsumerLagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaConsumerLagsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["partition_id"] == null) { - throw new runtime.RequiredError( - "partition_id", - 'Required parameter "partition_id" was null or undefined when calling getKafkaConsumerLag().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. + * List Consumers + */ + async listKafkaConsumersRaw(requestParameters: ListKafkaConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumers().' + ); + } + + if (requestParameters['consumer_group_id'] == null) { + throw new runtime.RequiredError( + 'consumer_group_id', + 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumers().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerDataListFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags/{topic_name}/partitions/{partition_id}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"consumer_group_id"}}`, - encodeURIComponent(String(requestParameters["consumer_group_id"])), - ) - .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) - .replace( - `{${"partition_id"}}`, - encodeURIComponent(String(requestParameters["partition_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerLagDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. - * Get Consumer Lag - */ - async getKafkaConsumerLag( - requestParameters: GetKafkaConsumerLagRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaConsumerLagRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. - * List Consumer Groups - */ - async listKafkaConsumerGroupsRaw( - requestParameters: ListKafkaConsumerGroupsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerGroups().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. + * List Consumers + */ + async listKafkaConsumers(requestParameters: ListKafkaConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaConsumersRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConsumerGroupDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. - * List Consumer Groups - */ - async listKafkaConsumerGroups( - requestParameters: ListKafkaConsumerGroupsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaConsumerGroupsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. - * List Consumer Lags - */ - async listKafkaConsumerLagsRaw( - requestParameters: ListKafkaConsumerLagsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerLags().', - ); - } - - if (requestParameters["consumer_group_id"] == null) { - throw new runtime.RequiredError( - "consumer_group_id", - 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumerLags().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"consumer_group_id"}}`, - encodeURIComponent(String(requestParameters["consumer_group_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConsumerLagDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. - * List Consumer Lags - */ - async listKafkaConsumerLags( - requestParameters: ListKafkaConsumerLagsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaConsumerLagsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. - * List Consumers - */ - async listKafkaConsumersRaw( - requestParameters: ListKafkaConsumersRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumers().', - ); - } - - if (requestParameters["consumer_group_id"] == null) { - throw new runtime.RequiredError( - "consumer_group_id", - 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumers().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"consumer_group_id"}}`, - encodeURIComponent(String(requestParameters["consumer_group_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConsumerDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. - * List Consumers - */ - async listKafkaConsumers( - requestParameters: ListKafkaConsumersRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaConsumersRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/PartitionV3Api.ts b/src/clients/kafkaRest/apis/PartitionV3Api.ts index 12495c3f46..df4c616baf 100644 --- a/src/clients/kafkaRest/apis/PartitionV3Api.ts +++ b/src/clients/kafkaRest/apis/PartitionV3Api.ts @@ -5,186 +5,147 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { PartitionData, PartitionDataList } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + PartitionData, + PartitionDataList, +} from '../models/index'; import { - PartitionDataFromJSON, - PartitionDataToJSON, - PartitionDataListFromJSON, - PartitionDataListToJSON, -} from "../models/index"; + PartitionDataFromJSON, + PartitionDataToJSON, + PartitionDataListFromJSON, + PartitionDataListToJSON, +} from '../models/index'; export interface GetKafkaPartitionRequest { - cluster_id: string; - topic_name: string; - partition_id: number; + cluster_id: string; + topic_name: string; + partition_id: number; } export interface ListKafkaPartitionsRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } /** - * + * */ export class PartitionV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. - * Get Partition - */ - async getKafkaPartitionRaw( - requestParameters: GetKafkaPartitionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaPartition().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling getKafkaPartition().', - ); - } - - if (requestParameters["partition_id"] == null) { - throw new runtime.RequiredError( - "partition_id", - 'Required parameter "partition_id" was null or undefined when calling getKafkaPartition().', - ); - } - - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. + * Get Partition + */ + async getKafkaPartitionRaw(requestParameters: GetKafkaPartitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaPartition().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling getKafkaPartition().' + ); + } + + if (requestParameters['partition_id'] == null) { + throw new runtime.RequiredError( + 'partition_id', + 'Required parameter "partition_id" was null or undefined when calling getKafkaPartition().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions/{partition_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"partition_id"}}`, encodeURIComponent(String(requestParameters['partition_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PartitionDataFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions/{partition_id}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) - .replace( - `{${"partition_id"}}`, - encodeURIComponent(String(requestParameters["partition_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => PartitionDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. - * Get Partition - */ - async getKafkaPartition( - requestParameters: GetKafkaPartitionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaPartitionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. - * List Partitions - */ - async listKafkaPartitionsRaw( - requestParameters: ListKafkaPartitionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaPartitions().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. + * Get Partition + */ + async getKafkaPartition(requestParameters: GetKafkaPartitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaPartitionRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling listKafkaPartitions().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. + * List Partitions + */ + async listKafkaPartitionsRaw(requestParameters: ListKafkaPartitionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaPartitions().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling listKafkaPartitions().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PartitionDataListFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. + * List Partitions + */ + async listKafkaPartitions(requestParameters: ListKafkaPartitionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaPartitionsRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - PartitionDataListFromJSON(jsonValue), - ); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. - * List Partitions - */ - async listKafkaPartitions( - requestParameters: ListKafkaPartitionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaPartitionsRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/RecordsV3Api.ts b/src/clients/kafkaRest/apis/RecordsV3Api.ts index 5c46e361ad..cd09e50923 100644 --- a/src/clients/kafkaRest/apis/RecordsV3Api.ts +++ b/src/clients/kafkaRest/apis/RecordsV3Api.ts @@ -5,108 +5,93 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ProduceRequest, ProduceResponse } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ProduceRequest, + ProduceResponse, +} from '../models/index'; import { - ProduceRequestFromJSON, - ProduceRequestToJSON, - ProduceResponseFromJSON, - ProduceResponseToJSON, -} from "../models/index"; + ProduceRequestFromJSON, + ProduceRequestToJSON, + ProduceResponseFromJSON, + ProduceResponseToJSON, +} from '../models/index'; export interface ProduceRecordRequest { - cluster_id: string; - topic_name: string; - dry_run?: boolean; - ProduceRequest?: ProduceRequest; + cluster_id: string; + topic_name: string; + dry_run?: boolean; + ProduceRequest?: ProduceRequest; } /** - * + * */ export class RecordsV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. - * Produce Records - */ - async produceRecordRaw( - requestParameters: ProduceRecordRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling produceRecord().', - ); - } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling produceRecord().', - ); - } + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. + * Produce Records + */ + async produceRecordRaw(requestParameters: ProduceRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling produceRecord().' + ); + } - const queryParameters: any = {}; + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling produceRecord().' + ); + } - if (requestParameters["dry_run"] != null) { - queryParameters["dry_run"] = requestParameters["dry_run"]; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['dry_run'] != null) { + queryParameters['dry_run'] = requestParameters['dry_run']; + } - headerParameters["Content-Type"] = "application/json"; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/records`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProduceRequestToJSON(requestParameters['ProduceRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/records` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ProduceRequestToJSON(requestParameters["ProduceRequest"]), - }, - initOverrides, - ); - return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); - } + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. + * Produce Records + */ + async produceRecord(requestParameters: ProduceRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.produceRecordRaw(requestParameters, initOverrides); + return await response.value(); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. - * Produce Records - */ - async produceRecord( - requestParameters: ProduceRecordRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.produceRecordRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/TopicV3Api.ts b/src/clients/kafkaRest/apis/TopicV3Api.ts index 7e885a0f92..980c212a2c 100644 --- a/src/clients/kafkaRest/apis/TopicV3Api.ts +++ b/src/clients/kafkaRest/apis/TopicV3Api.ts @@ -5,413 +5,311 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CreateTopicRequestData, TopicData, TopicDataList, UpdatePartitionCountRequestData, -} from "../models/index"; +} from '../models/index'; import { - CreateTopicRequestDataFromJSON, - CreateTopicRequestDataToJSON, - TopicDataFromJSON, - TopicDataToJSON, - TopicDataListFromJSON, - TopicDataListToJSON, - UpdatePartitionCountRequestDataFromJSON, - UpdatePartitionCountRequestDataToJSON, -} from "../models/index"; + CreateTopicRequestDataFromJSON, + CreateTopicRequestDataToJSON, + TopicDataFromJSON, + TopicDataToJSON, + TopicDataListFromJSON, + TopicDataListToJSON, + UpdatePartitionCountRequestDataFromJSON, + UpdatePartitionCountRequestDataToJSON, +} from '../models/index'; export interface CreateKafkaTopicRequest { - cluster_id: string; - CreateTopicRequestData?: CreateTopicRequestData; + cluster_id: string; + CreateTopicRequestData?: CreateTopicRequestData; } export interface DeleteKafkaTopicRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } export interface GetKafkaTopicRequest { - cluster_id: string; - topic_name: string; - include_authorized_operations?: boolean; + cluster_id: string; + topic_name: string; + include_authorized_operations?: boolean; } export interface ListKafkaTopicsRequest { - cluster_id: string; - includeAuthorizedOperations?: boolean; + cluster_id: string; + includeAuthorizedOperations?: boolean; } export interface UpdatePartitionCountKafkaTopicRequest { - cluster_id: string; - topic_name: string; - UpdatePartitionCountRequestData?: UpdatePartitionCountRequestData; + cluster_id: string; + topic_name: string; + UpdatePartitionCountRequestData?: UpdatePartitionCountRequestData; } /** - * + * */ export class TopicV3Api extends runtime.BaseAPI { - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. - * Create Topic - */ - async createKafkaTopicRaw( - requestParameters: CreateKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling createKafkaTopic().', - ); - } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. + * Create Topic + */ + async createKafkaTopicRaw(requestParameters: CreateKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling createKafkaTopic().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateTopicRequestDataToJSON(requestParameters['CreateTopicRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateTopicRequestDataToJSON(requestParameters["CreateTopicRequestData"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. - * Create Topic - */ - async createKafkaTopic( - requestParameters: CreateKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createKafkaTopicRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. - * Delete Topic - */ - async deleteKafkaTopicRaw( - requestParameters: DeleteKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopic().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. + * Create Topic + */ + async createKafkaTopic(requestParameters: CreateKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createKafkaTopicRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopic().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. + * Delete Topic + */ + async deleteKafkaTopicRaw(requestParameters: DeleteKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopic().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopic().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. + * Delete Topic + */ + async deleteKafkaTopic(requestParameters: DeleteKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteKafkaTopicRaw(requestParameters, initOverrides); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. - * Delete Topic - */ - async deleteKafkaTopic( - requestParameters: DeleteKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteKafkaTopicRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. - * Get Topic - */ - async getKafkaTopicRaw( - requestParameters: GetKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopic().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. + * Get Topic + */ + async getKafkaTopicRaw(requestParameters: GetKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopic().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling getKafkaTopic().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['include_authorized_operations'] != null) { + queryParameters['include_authorized_operations'] = requestParameters['include_authorized_operations']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling getKafkaTopic().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. + * Get Topic + */ + async getKafkaTopic(requestParameters: GetKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKafkaTopicRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["include_authorized_operations"] != null) { - queryParameters["include_authorized_operations"] = - requestParameters["include_authorized_operations"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. + * List Topics + */ + async listKafkaTopicsRaw(requestParameters: ListKafkaTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopics().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['includeAuthorizedOperations'] != null) { + queryParameters['includeAuthorizedOperations'] = requestParameters['includeAuthorizedOperations']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataListFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. + * List Topics + */ + async listKafkaTopics(requestParameters: ListKafkaTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listKafkaTopicsRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. - * Get Topic - */ - async getKafkaTopic( - requestParameters: GetKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKafkaTopicRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. - * List Topics - */ - async listKafkaTopicsRaw( - requestParameters: ListKafkaTopicsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopics().', - ); + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. + * Update Partition Count + */ + async updatePartitionCountKafkaTopicRaw(requestParameters: UpdatePartitionCountKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling updatePartitionCountKafkaTopic().' + ); + } + + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling updatePartitionCountKafkaTopic().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: UpdatePartitionCountRequestDataToJSON(requestParameters['UpdatePartitionCountRequestData']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); } - const queryParameters: any = {}; - - if (requestParameters["includeAuthorizedOperations"] != null) { - queryParameters["includeAuthorizedOperations"] = - requestParameters["includeAuthorizedOperations"]; + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. + * Update Partition Count + */ + async updatePartitionCountKafkaTopic(requestParameters: UpdatePartitionCountKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updatePartitionCountKafkaTopicRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics`.replace( - `{${"cluster_id"}}`, - encodeURIComponent(String(requestParameters["cluster_id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. - * List Topics - */ - async listKafkaTopics( - requestParameters: ListKafkaTopicsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listKafkaTopicsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. - * Update Partition Count - */ - async updatePartitionCountKafkaTopicRaw( - requestParameters: UpdatePartitionCountKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling updatePartitionCountKafkaTopic().', - ); - } - - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling updatePartitionCountKafkaTopic().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "PATCH", - headers: headerParameters, - query: queryParameters, - body: UpdatePartitionCountRequestDataToJSON( - requestParameters["UpdatePartitionCountRequestData"], - ), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. - * Update Partition Count - */ - async updatePartitionCountKafkaTopic( - requestParameters: UpdatePartitionCountKafkaTopicRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updatePartitionCountKafkaTopicRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/kafkaRest/apis/index.ts b/src/clients/kafkaRest/apis/index.ts index c23df0172d..ef106ccd1f 100644 --- a/src/clients/kafkaRest/apis/index.ts +++ b/src/clients/kafkaRest/apis/index.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ACLV3Api"; -export * from "./ClusterLinkingV3Api"; -export * from "./ClusterV3Api"; -export * from "./ConfigsV3Api"; -export * from "./ConsumerGroupV3Api"; -export * from "./PartitionV3Api"; -export * from "./RecordsV3Api"; -export * from "./TopicV3Api"; +export * from './ACLV3Api'; +export * from './ClusterLinkingV3Api'; +export * from './ClusterV3Api'; +export * from './ConfigsV3Api'; +export * from './ConsumerGroupV3Api'; +export * from './PartitionV3Api'; +export * from './RecordsV3Api'; +export * from './TopicV3Api'; diff --git a/src/clients/kafkaRest/index.ts b/src/clients/kafkaRest/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/kafkaRest/index.ts +++ b/src/clients/kafkaRest/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/kafkaRest/models/AbstractConfigData.ts b/src/clients/kafkaRest/models/AbstractConfigData.ts index a76c9b946e..b03c697137 100644 --- a/src/clients/kafkaRest/models/AbstractConfigData.ts +++ b/src/clients/kafkaRest/models/AbstractConfigData.ts @@ -5,160 +5,157 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigSynonymData } from "./ConfigSynonymData"; +import { mapValues } from '../runtime'; +import type { ConfigSynonymData } from './ConfigSynonymData'; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from "./ConfigSynonymData"; -import type { ResourceMetadata } from "./ResourceMetadata"; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from './ConfigSynonymData'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface AbstractConfigData */ export interface AbstractConfigData { - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AbstractConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof AbstractConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof AbstractConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof AbstractConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof AbstractConfigData - */ - synonyms: Array; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AbstractConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof AbstractConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof AbstractConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof AbstractConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof AbstractConfigData + */ + synonyms: Array; } /** * Check if a given object implements the AbstractConfigData interface. */ export function instanceOfAbstractConfigData(value: object): value is AbstractConfigData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("is_default" in value) || value["is_default"] === undefined) return false; - if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; - if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; - if (!("source" in value) || value["source"] === undefined) return false; - if (!("synonyms" in value) || value["synonyms"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('is_default' in value) || value['is_default'] === undefined) return false; + if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; + if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('synonyms' in value) || value['synonyms'] === undefined) return false; + return true; } export function AbstractConfigDataFromJSON(json: any): AbstractConfigData { - return AbstractConfigDataFromJSONTyped(json, false); + return AbstractConfigDataFromJSONTyped(json, false); } -export function AbstractConfigDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AbstractConfigData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - is_default: json["is_default"], - is_read_only: json["is_read_only"], - is_sensitive: json["is_sensitive"], - source: json["source"], - synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), - }; +export function AbstractConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AbstractConfigData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + 'is_default': json['is_default'], + 'is_read_only': json['is_read_only'], + 'is_sensitive': json['is_sensitive'], + 'source': json['source'], + 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), + }; } export function AbstractConfigDataToJSON(json: any): AbstractConfigData { - return AbstractConfigDataToJSONTyped(json, false); + return AbstractConfigDataToJSONTyped(json, false); } -export function AbstractConfigDataToJSONTyped( - value?: AbstractConfigData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AbstractConfigDataToJSONTyped(value?: AbstractConfigData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - name: value["name"], - value: value["value"], - is_default: value["is_default"], - is_read_only: value["is_read_only"], - is_sensitive: value["is_sensitive"], - source: value["source"], - synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'name': value['name'], + 'value': value['value'], + 'is_default': value['is_default'], + 'is_read_only': value['is_read_only'], + 'is_sensitive': value['is_sensitive'], + 'source': value['source'], + 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/AclData.ts b/src/clients/kafkaRest/models/AclData.ts index 58c8138554..8792e82201 100644 --- a/src/clients/kafkaRest/models/AclData.ts +++ b/src/clients/kafkaRest/models/AclData.ts @@ -5,158 +5,160 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AclResourceType } from "./AclResourceType"; +import { mapValues } from '../runtime'; +import type { AclResourceType } from './AclResourceType'; import { - AclResourceTypeFromJSON, - AclResourceTypeFromJSONTyped, - AclResourceTypeToJSON, - AclResourceTypeToJSONTyped, -} from "./AclResourceType"; -import type { ResourceMetadata } from "./ResourceMetadata"; + AclResourceTypeFromJSON, + AclResourceTypeFromJSONTyped, + AclResourceTypeToJSON, + AclResourceTypeToJSONTyped, +} from './AclResourceType'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface AclData */ export interface AclData { - /** - * - * @type {string} - * @memberof AclData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AclData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AclData - */ - cluster_id: string; - /** - * - * @type {AclResourceType} - * @memberof AclData - */ - resource_type: AclResourceType; - /** - * - * @type {string} - * @memberof AclData - */ - resource_name: string; - /** - * - * @type {string} - * @memberof AclData - */ - pattern_type: string; - /** - * - * @type {string} - * @memberof AclData - */ - principal: string; - /** - * - * @type {string} - * @memberof AclData - */ - host: string; - /** - * - * @type {string} - * @memberof AclData - */ - operation: string; - /** - * - * @type {string} - * @memberof AclData - */ - permission: string; + /** + * + * @type {string} + * @memberof AclData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AclData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AclData + */ + cluster_id: string; + /** + * + * @type {AclResourceType} + * @memberof AclData + */ + resource_type: AclResourceType; + /** + * + * @type {string} + * @memberof AclData + */ + resource_name: string; + /** + * + * @type {string} + * @memberof AclData + */ + pattern_type: string; + /** + * + * @type {string} + * @memberof AclData + */ + principal: string; + /** + * + * @type {string} + * @memberof AclData + */ + host: string; + /** + * + * @type {string} + * @memberof AclData + */ + operation: string; + /** + * + * @type {string} + * @memberof AclData + */ + permission: string; } + + /** * Check if a given object implements the AclData interface. */ export function instanceOfAclData(value: object): value is AclData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("resource_type" in value) || value["resource_type"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - if (!("pattern_type" in value) || value["pattern_type"] === undefined) return false; - if (!("principal" in value) || value["principal"] === undefined) return false; - if (!("host" in value) || value["host"] === undefined) return false; - if (!("operation" in value) || value["operation"] === undefined) return false; - if (!("permission" in value) || value["permission"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('resource_type' in value) || value['resource_type'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + if (!('pattern_type' in value) || value['pattern_type'] === undefined) return false; + if (!('principal' in value) || value['principal'] === undefined) return false; + if (!('host' in value) || value['host'] === undefined) return false; + if (!('operation' in value) || value['operation'] === undefined) return false; + if (!('permission' in value) || value['permission'] === undefined) return false; + return true; } export function AclDataFromJSON(json: any): AclData { - return AclDataFromJSONTyped(json, false); + return AclDataFromJSONTyped(json, false); } export function AclDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AclData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - resource_type: AclResourceTypeFromJSON(json["resource_type"]), - resource_name: json["resource_name"], - pattern_type: json["pattern_type"], - principal: json["principal"], - host: json["host"], - operation: json["operation"], - permission: json["permission"], - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'resource_type': AclResourceTypeFromJSON(json['resource_type']), + 'resource_name': json['resource_name'], + 'pattern_type': json['pattern_type'], + 'principal': json['principal'], + 'host': json['host'], + 'operation': json['operation'], + 'permission': json['permission'], + }; } export function AclDataToJSON(json: any): AclData { - return AclDataToJSONTyped(json, false); + return AclDataToJSONTyped(json, false); } -export function AclDataToJSONTyped( - value?: AclData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AclDataToJSONTyped(value?: AclData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - resource_type: AclResourceTypeToJSON(value["resource_type"]), - resource_name: value["resource_name"], - pattern_type: value["pattern_type"], - principal: value["principal"], - host: value["host"], - operation: value["operation"], - permission: value["permission"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'resource_type': AclResourceTypeToJSON(value['resource_type']), + 'resource_name': value['resource_name'], + 'pattern_type': value['pattern_type'], + 'principal': value['principal'], + 'host': value['host'], + 'operation': value['operation'], + 'permission': value['permission'], + }; } + diff --git a/src/clients/kafkaRest/models/AclDataList.ts b/src/clients/kafkaRest/models/AclDataList.ts index 6d32a95c60..a7f0773bb9 100644 --- a/src/clients/kafkaRest/models/AclDataList.ts +++ b/src/clients/kafkaRest/models/AclDataList.ts @@ -5,95 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { AclData } from "./AclData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { AclData } from './AclData'; import { - AclDataFromJSON, - AclDataFromJSONTyped, - AclDataToJSON, - AclDataToJSONTyped, -} from "./AclData"; + AclDataFromJSON, + AclDataFromJSONTyped, + AclDataToJSON, + AclDataToJSONTyped, +} from './AclData'; /** - * + * * @export * @interface AclDataList */ export interface AclDataList { - /** - * - * @type {string} - * @memberof AclDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof AclDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof AclDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof AclDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof AclDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof AclDataList + */ + data: Array; } /** * Check if a given object implements the AclDataList interface. */ export function instanceOfAclDataList(value: object): value is AclDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function AclDataListFromJSON(json: any): AclDataList { - return AclDataListFromJSONTyped(json, false); + return AclDataListFromJSONTyped(json, false); } export function AclDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AclDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(AclDataFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(AclDataFromJSON)), + }; } export function AclDataListToJSON(json: any): AclDataList { - return AclDataListToJSONTyped(json, false); + return AclDataListToJSONTyped(json, false); } -export function AclDataListToJSONTyped( - value?: AclDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AclDataListToJSONTyped(value?: AclDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(AclDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(AclDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/AclResourceType.ts b/src/clients/kafkaRest/models/AclResourceType.ts index c76267451b..989c4748e8 100644 --- a/src/clients/kafkaRest/models/AclResourceType.ts +++ b/src/clients/kafkaRest/models/AclResourceType.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,49 +13,45 @@ */ /** - * + * * @export * @enum {string} */ export enum AclResourceType { - Unknown = "UNKNOWN", - Any = "ANY", - Topic = "TOPIC", - Group = "GROUP", - Cluster = "CLUSTER", - TransactionalId = "TRANSACTIONAL_ID", - DelegationToken = "DELEGATION_TOKEN", + Unknown = 'UNKNOWN', + Any = 'ANY', + Topic = 'TOPIC', + Group = 'GROUP', + Cluster = 'CLUSTER', + TransactionalId = 'TRANSACTIONAL_ID', + DelegationToken = 'DELEGATION_TOKEN' } + export function instanceOfAclResourceType(value: any): boolean { - for (const key in AclResourceType) { - if (Object.prototype.hasOwnProperty.call(AclResourceType, key)) { - if (AclResourceType[key as keyof typeof AclResourceType] === value) { - return true; - } + for (const key in AclResourceType) { + if (Object.prototype.hasOwnProperty.call(AclResourceType, key)) { + if (AclResourceType[key as keyof typeof AclResourceType] === value) { + return true; + } + } } - } - return false; + return false; } export function AclResourceTypeFromJSON(json: any): AclResourceType { - return AclResourceTypeFromJSONTyped(json, false); + return AclResourceTypeFromJSONTyped(json, false); } -export function AclResourceTypeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AclResourceType { - return json as AclResourceType; +export function AclResourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AclResourceType { + return json as AclResourceType; } export function AclResourceTypeToJSON(value?: AclResourceType | null): any { - return value as any; + return value as any; } -export function AclResourceTypeToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): AclResourceType { - return value as AclResourceType; +export function AclResourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): AclResourceType { + return value as AclResourceType; } + diff --git a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts index 63e6421c9c..4c831a97c9 100644 --- a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts +++ b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts @@ -5,154 +5,147 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface AlterBrokerReplicaExclusionData */ export interface AlterBrokerReplicaExclusionData { - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AlterBrokerReplicaExclusionData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof AlterBrokerReplicaExclusionData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - exclusion: string; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - reason: string; - /** - * - * @type {number} - * @memberof AlterBrokerReplicaExclusionData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof AlterBrokerReplicaExclusionData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AlterBrokerReplicaExclusionData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof AlterBrokerReplicaExclusionData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + exclusion: string; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + reason: string; + /** + * + * @type {number} + * @memberof AlterBrokerReplicaExclusionData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof AlterBrokerReplicaExclusionData + */ + broker: Relationship; } /** * Check if a given object implements the AlterBrokerReplicaExclusionData interface. */ -export function instanceOfAlterBrokerReplicaExclusionData( - value: object, -): value is AlterBrokerReplicaExclusionData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("exclusion" in value) || value["exclusion"] === undefined) return false; - if (!("reason" in value) || value["reason"] === undefined) return false; - if (!("broker" in value) || value["broker"] === undefined) return false; - return true; +export function instanceOfAlterBrokerReplicaExclusionData(value: object): value is AlterBrokerReplicaExclusionData { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('exclusion' in value) || value['exclusion'] === undefined) return false; + if (!('reason' in value) || value['reason'] === undefined) return false; + if (!('broker' in value) || value['broker'] === undefined) return false; + return true; } -export function AlterBrokerReplicaExclusionDataFromJSON( - json: any, -): AlterBrokerReplicaExclusionData { - return AlterBrokerReplicaExclusionDataFromJSONTyped(json, false); +export function AlterBrokerReplicaExclusionDataFromJSON(json: any): AlterBrokerReplicaExclusionData { + return AlterBrokerReplicaExclusionDataFromJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterBrokerReplicaExclusionData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - broker_id: json["broker_id"], - exclusion: json["exclusion"], - reason: json["reason"], - error_code: json["error_code"] == null ? undefined : json["error_code"], - error_message: json["error_message"] == null ? undefined : json["error_message"], - broker: RelationshipFromJSON(json["broker"]), - }; +export function AlterBrokerReplicaExclusionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterBrokerReplicaExclusionData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'broker_id': json['broker_id'], + 'exclusion': json['exclusion'], + 'reason': json['reason'], + 'error_code': json['error_code'] == null ? undefined : json['error_code'], + 'error_message': json['error_message'] == null ? undefined : json['error_message'], + 'broker': RelationshipFromJSON(json['broker']), + }; } export function AlterBrokerReplicaExclusionDataToJSON(json: any): AlterBrokerReplicaExclusionData { - return AlterBrokerReplicaExclusionDataToJSONTyped(json, false); + return AlterBrokerReplicaExclusionDataToJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataToJSONTyped( - value?: AlterBrokerReplicaExclusionData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterBrokerReplicaExclusionDataToJSONTyped(value?: AlterBrokerReplicaExclusionData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - broker_id: value["broker_id"], - exclusion: value["exclusion"], - reason: value["reason"], - error_code: value["error_code"], - error_message: value["error_message"], - broker: RelationshipToJSON(value["broker"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'broker_id': value['broker_id'], + 'exclusion': value['exclusion'], + 'reason': value['reason'], + 'error_code': value['error_code'], + 'error_message': value['error_message'], + 'broker': RelationshipToJSON(value['broker']), + }; } + diff --git a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts index 7d563448eb..21d20fdfd5 100644 --- a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts +++ b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts @@ -5,104 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { AlterBrokerReplicaExclusionData } from "./AlterBrokerReplicaExclusionData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { AlterBrokerReplicaExclusionData } from './AlterBrokerReplicaExclusionData'; import { - AlterBrokerReplicaExclusionDataFromJSON, - AlterBrokerReplicaExclusionDataFromJSONTyped, - AlterBrokerReplicaExclusionDataToJSON, - AlterBrokerReplicaExclusionDataToJSONTyped, -} from "./AlterBrokerReplicaExclusionData"; + AlterBrokerReplicaExclusionDataFromJSON, + AlterBrokerReplicaExclusionDataFromJSONTyped, + AlterBrokerReplicaExclusionDataToJSON, + AlterBrokerReplicaExclusionDataToJSONTyped, +} from './AlterBrokerReplicaExclusionData'; /** - * + * * @export * @interface AlterBrokerReplicaExclusionDataList */ export interface AlterBrokerReplicaExclusionDataList { - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof AlterBrokerReplicaExclusionDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof AlterBrokerReplicaExclusionDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof AlterBrokerReplicaExclusionDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof AlterBrokerReplicaExclusionDataList + */ + data: Array; } /** * Check if a given object implements the AlterBrokerReplicaExclusionDataList interface. */ -export function instanceOfAlterBrokerReplicaExclusionDataList( - value: object, -): value is AlterBrokerReplicaExclusionDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfAlterBrokerReplicaExclusionDataList(value: object): value is AlterBrokerReplicaExclusionDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function AlterBrokerReplicaExclusionDataListFromJSON( - json: any, -): AlterBrokerReplicaExclusionDataList { - return AlterBrokerReplicaExclusionDataListFromJSONTyped(json, false); +export function AlterBrokerReplicaExclusionDataListFromJSON(json: any): AlterBrokerReplicaExclusionDataList { + return AlterBrokerReplicaExclusionDataListFromJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterBrokerReplicaExclusionDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(AlterBrokerReplicaExclusionDataFromJSON), - }; +export function AlterBrokerReplicaExclusionDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterBrokerReplicaExclusionDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(AlterBrokerReplicaExclusionDataFromJSON)), + }; } -export function AlterBrokerReplicaExclusionDataListToJSON( - json: any, -): AlterBrokerReplicaExclusionDataList { - return AlterBrokerReplicaExclusionDataListToJSONTyped(json, false); +export function AlterBrokerReplicaExclusionDataListToJSON(json: any): AlterBrokerReplicaExclusionDataList { + return AlterBrokerReplicaExclusionDataListToJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataListToJSONTyped( - value?: AlterBrokerReplicaExclusionDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterBrokerReplicaExclusionDataListToJSONTyped(value?: AlterBrokerReplicaExclusionDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(AlterBrokerReplicaExclusionDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(AlterBrokerReplicaExclusionDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts b/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts index fc1a1db3ac..f90d4f64bb 100644 --- a/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts +++ b/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts @@ -5,83 +5,78 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AlterConfigBatchRequestDataDataInner } from "./AlterConfigBatchRequestDataDataInner"; +import { mapValues } from '../runtime'; +import type { AlterConfigBatchRequestDataDataInner } from './AlterConfigBatchRequestDataDataInner'; import { - AlterConfigBatchRequestDataDataInnerFromJSON, - AlterConfigBatchRequestDataDataInnerFromJSONTyped, - AlterConfigBatchRequestDataDataInnerToJSON, - AlterConfigBatchRequestDataDataInnerToJSONTyped, -} from "./AlterConfigBatchRequestDataDataInner"; + AlterConfigBatchRequestDataDataInnerFromJSON, + AlterConfigBatchRequestDataDataInnerFromJSONTyped, + AlterConfigBatchRequestDataDataInnerToJSON, + AlterConfigBatchRequestDataDataInnerToJSONTyped, +} from './AlterConfigBatchRequestDataDataInner'; /** - * + * * @export * @interface AlterConfigBatchRequestData */ export interface AlterConfigBatchRequestData { - /** - * - * @type {Array} - * @memberof AlterConfigBatchRequestData - */ - data: Array; - /** - * - * @type {boolean} - * @memberof AlterConfigBatchRequestData - */ - validate_only?: boolean; + /** + * + * @type {Array} + * @memberof AlterConfigBatchRequestData + */ + data: Array; + /** + * + * @type {boolean} + * @memberof AlterConfigBatchRequestData + */ + validate_only?: boolean; } /** * Check if a given object implements the AlterConfigBatchRequestData interface. */ -export function instanceOfAlterConfigBatchRequestData( - value: object, -): value is AlterConfigBatchRequestData { - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfAlterConfigBatchRequestData(value: object): value is AlterConfigBatchRequestData { + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function AlterConfigBatchRequestDataFromJSON(json: any): AlterConfigBatchRequestData { - return AlterConfigBatchRequestDataFromJSONTyped(json, false); + return AlterConfigBatchRequestDataFromJSONTyped(json, false); } -export function AlterConfigBatchRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterConfigBatchRequestData { - if (json == null) { - return json; - } - return { - data: (json["data"] as Array).map(AlterConfigBatchRequestDataDataInnerFromJSON), - validate_only: json["validate_only"] == null ? undefined : json["validate_only"], - }; +export function AlterConfigBatchRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterConfigBatchRequestData { + if (json == null) { + return json; + } + return { + + 'data': ((json['data'] as Array).map(AlterConfigBatchRequestDataDataInnerFromJSON)), + 'validate_only': json['validate_only'] == null ? undefined : json['validate_only'], + }; } export function AlterConfigBatchRequestDataToJSON(json: any): AlterConfigBatchRequestData { - return AlterConfigBatchRequestDataToJSONTyped(json, false); + return AlterConfigBatchRequestDataToJSONTyped(json, false); } -export function AlterConfigBatchRequestDataToJSONTyped( - value?: AlterConfigBatchRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterConfigBatchRequestDataToJSONTyped(value?: AlterConfigBatchRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - data: (value["data"] as Array).map(AlterConfigBatchRequestDataDataInnerToJSON), - validate_only: value["validate_only"], - }; + return { + + 'data': ((value['data'] as Array).map(AlterConfigBatchRequestDataDataInnerToJSON)), + 'validate_only': value['validate_only'], + }; } + diff --git a/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts b/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts index 7065d5c4ca..f366531af9 100644 --- a/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts +++ b/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts @@ -5,87 +5,78 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface AlterConfigBatchRequestDataDataInner */ export interface AlterConfigBatchRequestDataDataInner { - /** - * - * @type {string} - * @memberof AlterConfigBatchRequestDataDataInner - */ - name: string; - /** - * - * @type {string} - * @memberof AlterConfigBatchRequestDataDataInner - */ - value?: string | null; - /** - * - * @type {string} - * @memberof AlterConfigBatchRequestDataDataInner - */ - operation?: string | null; + /** + * + * @type {string} + * @memberof AlterConfigBatchRequestDataDataInner + */ + name: string; + /** + * + * @type {string} + * @memberof AlterConfigBatchRequestDataDataInner + */ + value?: string | null; + /** + * + * @type {string} + * @memberof AlterConfigBatchRequestDataDataInner + */ + operation?: string | null; } /** * Check if a given object implements the AlterConfigBatchRequestDataDataInner interface. */ -export function instanceOfAlterConfigBatchRequestDataDataInner( - value: object, -): value is AlterConfigBatchRequestDataDataInner { - if (!("name" in value) || value["name"] === undefined) return false; - return true; +export function instanceOfAlterConfigBatchRequestDataDataInner(value: object): value is AlterConfigBatchRequestDataDataInner { + if (!('name' in value) || value['name'] === undefined) return false; + return true; } -export function AlterConfigBatchRequestDataDataInnerFromJSON( - json: any, -): AlterConfigBatchRequestDataDataInner { - return AlterConfigBatchRequestDataDataInnerFromJSONTyped(json, false); +export function AlterConfigBatchRequestDataDataInnerFromJSON(json: any): AlterConfigBatchRequestDataDataInner { + return AlterConfigBatchRequestDataDataInnerFromJSONTyped(json, false); } -export function AlterConfigBatchRequestDataDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterConfigBatchRequestDataDataInner { - if (json == null) { - return json; - } - return { - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - operation: json["operation"] == null ? undefined : json["operation"], - }; +export function AlterConfigBatchRequestDataDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterConfigBatchRequestDataDataInner { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + 'operation': json['operation'] == null ? undefined : json['operation'], + }; } -export function AlterConfigBatchRequestDataDataInnerToJSON( - json: any, -): AlterConfigBatchRequestDataDataInner { - return AlterConfigBatchRequestDataDataInnerToJSONTyped(json, false); +export function AlterConfigBatchRequestDataDataInnerToJSON(json: any): AlterConfigBatchRequestDataDataInner { + return AlterConfigBatchRequestDataDataInnerToJSONTyped(json, false); } -export function AlterConfigBatchRequestDataDataInnerToJSONTyped( - value?: AlterConfigBatchRequestDataDataInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterConfigBatchRequestDataDataInnerToJSONTyped(value?: AlterConfigBatchRequestDataDataInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - value: value["value"], - operation: value["operation"], - }; + return { + + 'name': value['name'], + 'value': value['value'], + 'operation': value['operation'], + }; } + diff --git a/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts b/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts index d44d669a01..ccb52a8e08 100644 --- a/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts +++ b/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts @@ -5,127 +5,122 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { MirrorLag } from "./MirrorLag"; +import { mapValues } from '../runtime'; +import type { MirrorLag } from './MirrorLag'; import { - MirrorLagFromJSON, - MirrorLagFromJSONTyped, - MirrorLagToJSON, - MirrorLagToJSONTyped, -} from "./MirrorLag"; -import type { ResourceMetadata } from "./ResourceMetadata"; + MirrorLagFromJSON, + MirrorLagFromJSONTyped, + MirrorLagToJSON, + MirrorLagToJSONTyped, +} from './MirrorLag'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface AlterMirrorStatusResponseData */ export interface AlterMirrorStatusResponseData { - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AlterMirrorStatusResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseData - */ - mirror_topic_name: string; - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseData - */ - error_message: string | null; - /** - * - * @type {number} - * @memberof AlterMirrorStatusResponseData - */ - error_code: number | null; - /** - * - * @type {Array} - * @memberof AlterMirrorStatusResponseData - */ - mirror_lags: Array; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AlterMirrorStatusResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseData + */ + mirror_topic_name: string; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseData + */ + error_message: string | null; + /** + * + * @type {number} + * @memberof AlterMirrorStatusResponseData + */ + error_code: number | null; + /** + * + * @type {Array} + * @memberof AlterMirrorStatusResponseData + */ + mirror_lags: Array; } /** * Check if a given object implements the AlterMirrorStatusResponseData interface. */ -export function instanceOfAlterMirrorStatusResponseData( - value: object, -): value is AlterMirrorStatusResponseData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("mirror_topic_name" in value) || value["mirror_topic_name"] === undefined) return false; - if (!("error_message" in value) || value["error_message"] === undefined) return false; - if (!("error_code" in value) || value["error_code"] === undefined) return false; - if (!("mirror_lags" in value) || value["mirror_lags"] === undefined) return false; - return true; +export function instanceOfAlterMirrorStatusResponseData(value: object): value is AlterMirrorStatusResponseData { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('mirror_topic_name' in value) || value['mirror_topic_name'] === undefined) return false; + if (!('error_message' in value) || value['error_message'] === undefined) return false; + if (!('error_code' in value) || value['error_code'] === undefined) return false; + if (!('mirror_lags' in value) || value['mirror_lags'] === undefined) return false; + return true; } export function AlterMirrorStatusResponseDataFromJSON(json: any): AlterMirrorStatusResponseData { - return AlterMirrorStatusResponseDataFromJSONTyped(json, false); + return AlterMirrorStatusResponseDataFromJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterMirrorStatusResponseData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - mirror_topic_name: json["mirror_topic_name"], - error_message: json["error_message"], - error_code: json["error_code"], - mirror_lags: (json["mirror_lags"] as Array).map(MirrorLagFromJSON), - }; +export function AlterMirrorStatusResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterMirrorStatusResponseData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'mirror_topic_name': json['mirror_topic_name'], + 'error_message': json['error_message'], + 'error_code': json['error_code'], + 'mirror_lags': ((json['mirror_lags'] as Array).map(MirrorLagFromJSON)), + }; } export function AlterMirrorStatusResponseDataToJSON(json: any): AlterMirrorStatusResponseData { - return AlterMirrorStatusResponseDataToJSONTyped(json, false); + return AlterMirrorStatusResponseDataToJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataToJSONTyped( - value?: AlterMirrorStatusResponseData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterMirrorStatusResponseDataToJSONTyped(value?: AlterMirrorStatusResponseData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - mirror_topic_name: value["mirror_topic_name"], - error_message: value["error_message"], - error_code: value["error_code"], - mirror_lags: (value["mirror_lags"] as Array).map(MirrorLagToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'mirror_topic_name': value['mirror_topic_name'], + 'error_message': value['error_message'], + 'error_code': value['error_code'], + 'mirror_lags': ((value['mirror_lags'] as Array).map(MirrorLagToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts b/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts index 2b756f3c37..5316b07767 100644 --- a/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts +++ b/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts @@ -5,104 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { AlterMirrorStatusResponseData } from "./AlterMirrorStatusResponseData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { AlterMirrorStatusResponseData } from './AlterMirrorStatusResponseData'; import { - AlterMirrorStatusResponseDataFromJSON, - AlterMirrorStatusResponseDataFromJSONTyped, - AlterMirrorStatusResponseDataToJSON, - AlterMirrorStatusResponseDataToJSONTyped, -} from "./AlterMirrorStatusResponseData"; + AlterMirrorStatusResponseDataFromJSON, + AlterMirrorStatusResponseDataFromJSONTyped, + AlterMirrorStatusResponseDataToJSON, + AlterMirrorStatusResponseDataToJSONTyped, +} from './AlterMirrorStatusResponseData'; /** - * + * * @export * @interface AlterMirrorStatusResponseDataList */ export interface AlterMirrorStatusResponseDataList { - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof AlterMirrorStatusResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof AlterMirrorStatusResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof AlterMirrorStatusResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof AlterMirrorStatusResponseDataList + */ + data: Array; } /** * Check if a given object implements the AlterMirrorStatusResponseDataList interface. */ -export function instanceOfAlterMirrorStatusResponseDataList( - value: object, -): value is AlterMirrorStatusResponseDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfAlterMirrorStatusResponseDataList(value: object): value is AlterMirrorStatusResponseDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function AlterMirrorStatusResponseDataListFromJSON( - json: any, -): AlterMirrorStatusResponseDataList { - return AlterMirrorStatusResponseDataListFromJSONTyped(json, false); +export function AlterMirrorStatusResponseDataListFromJSON(json: any): AlterMirrorStatusResponseDataList { + return AlterMirrorStatusResponseDataListFromJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterMirrorStatusResponseDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(AlterMirrorStatusResponseDataFromJSON), - }; +export function AlterMirrorStatusResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterMirrorStatusResponseDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(AlterMirrorStatusResponseDataFromJSON)), + }; } -export function AlterMirrorStatusResponseDataListToJSON( - json: any, -): AlterMirrorStatusResponseDataList { - return AlterMirrorStatusResponseDataListToJSONTyped(json, false); +export function AlterMirrorStatusResponseDataListToJSON(json: any): AlterMirrorStatusResponseDataList { + return AlterMirrorStatusResponseDataListToJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataListToJSONTyped( - value?: AlterMirrorStatusResponseDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterMirrorStatusResponseDataListToJSONTyped(value?: AlterMirrorStatusResponseDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(AlterMirrorStatusResponseDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(AlterMirrorStatusResponseDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts b/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts index ad44270ab8..1518cd126e 100644 --- a/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts +++ b/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts @@ -5,73 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface AlterMirrorsRequestData */ export interface AlterMirrorsRequestData { - /** - * The mirror topics specified as a list of topic names. - * @type {Array} - * @memberof AlterMirrorsRequestData - */ - mirror_topic_names?: Array; - /** - * The mirror topics specified as a pattern. - * @type {string} - * @memberof AlterMirrorsRequestData - */ - mirror_topic_name_pattern?: string; + /** + * The mirror topics specified as a list of topic names. + * @type {Array} + * @memberof AlterMirrorsRequestData + */ + mirror_topic_names?: Array; + /** + * The mirror topics specified as a pattern. + * @type {string} + * @memberof AlterMirrorsRequestData + */ + mirror_topic_name_pattern?: string; } /** * Check if a given object implements the AlterMirrorsRequestData interface. */ export function instanceOfAlterMirrorsRequestData(value: object): value is AlterMirrorsRequestData { - return true; + return true; } export function AlterMirrorsRequestDataFromJSON(json: any): AlterMirrorsRequestData { - return AlterMirrorsRequestDataFromJSONTyped(json, false); + return AlterMirrorsRequestDataFromJSONTyped(json, false); } -export function AlterMirrorsRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AlterMirrorsRequestData { - if (json == null) { - return json; - } - return { - mirror_topic_names: json["mirror_topic_names"] == null ? undefined : json["mirror_topic_names"], - mirror_topic_name_pattern: - json["mirror_topic_name_pattern"] == null ? undefined : json["mirror_topic_name_pattern"], - }; +export function AlterMirrorsRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterMirrorsRequestData { + if (json == null) { + return json; + } + return { + + 'mirror_topic_names': json['mirror_topic_names'] == null ? undefined : json['mirror_topic_names'], + 'mirror_topic_name_pattern': json['mirror_topic_name_pattern'] == null ? undefined : json['mirror_topic_name_pattern'], + }; } export function AlterMirrorsRequestDataToJSON(json: any): AlterMirrorsRequestData { - return AlterMirrorsRequestDataToJSONTyped(json, false); + return AlterMirrorsRequestDataToJSONTyped(json, false); } -export function AlterMirrorsRequestDataToJSONTyped( - value?: AlterMirrorsRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AlterMirrorsRequestDataToJSONTyped(value?: AlterMirrorsRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - mirror_topic_names: value["mirror_topic_names"], - mirror_topic_name_pattern: value["mirror_topic_name_pattern"], - }; + return { + + 'mirror_topic_names': value['mirror_topic_names'], + 'mirror_topic_name_pattern': value['mirror_topic_name_pattern'], + }; } + diff --git a/src/clients/kafkaRest/models/AnyUnevenLoadData.ts b/src/clients/kafkaRest/models/AnyUnevenLoadData.ts index 872a842873..014a2d1fd9 100644 --- a/src/clients/kafkaRest/models/AnyUnevenLoadData.ts +++ b/src/clients/kafkaRest/models/AnyUnevenLoadData.ts @@ -5,158 +5,154 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface AnyUnevenLoadData */ export interface AnyUnevenLoadData { - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AnyUnevenLoadData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - status: string; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - previous_status: string; - /** - * The date and time at which this task was created. - * @type {Date} - * @memberof AnyUnevenLoadData - */ - readonly status_updated_at: Date; - /** - * The date and time at which this task was created. - * @type {Date} - * @memberof AnyUnevenLoadData - */ - readonly previous_status_updated_at: Date; - /** - * - * @type {number} - * @memberof AnyUnevenLoadData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof AnyUnevenLoadData - */ - broker_tasks: Relationship; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AnyUnevenLoadData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + status: string; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + previous_status: string; + /** + * The date and time at which this task was created. + * @type {Date} + * @memberof AnyUnevenLoadData + */ + readonly status_updated_at: Date; + /** + * The date and time at which this task was created. + * @type {Date} + * @memberof AnyUnevenLoadData + */ + readonly previous_status_updated_at: Date; + /** + * + * @type {number} + * @memberof AnyUnevenLoadData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof AnyUnevenLoadData + */ + broker_tasks: Relationship; } /** * Check if a given object implements the AnyUnevenLoadData interface. */ export function instanceOfAnyUnevenLoadData(value: object): value is AnyUnevenLoadData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - if (!("previous_status" in value) || value["previous_status"] === undefined) return false; - if (!("status_updated_at" in value) || value["status_updated_at"] === undefined) return false; - if (!("previous_status_updated_at" in value) || value["previous_status_updated_at"] === undefined) - return false; - if (!("broker_tasks" in value) || value["broker_tasks"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('previous_status' in value) || value['previous_status'] === undefined) return false; + if (!('status_updated_at' in value) || value['status_updated_at'] === undefined) return false; + if (!('previous_status_updated_at' in value) || value['previous_status_updated_at'] === undefined) return false; + if (!('broker_tasks' in value) || value['broker_tasks'] === undefined) return false; + return true; } export function AnyUnevenLoadDataFromJSON(json: any): AnyUnevenLoadData { - return AnyUnevenLoadDataFromJSONTyped(json, false); + return AnyUnevenLoadDataFromJSONTyped(json, false); } -export function AnyUnevenLoadDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AnyUnevenLoadData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - status: json["status"], - previous_status: json["previous_status"], - status_updated_at: new Date(json["status_updated_at"]), - previous_status_updated_at: new Date(json["previous_status_updated_at"]), - error_code: json["error_code"] == null ? undefined : json["error_code"], - error_message: json["error_message"] == null ? undefined : json["error_message"], - broker_tasks: RelationshipFromJSON(json["broker_tasks"]), - }; +export function AnyUnevenLoadDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnyUnevenLoadData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'status': json['status'], + 'previous_status': json['previous_status'], + 'status_updated_at': (new Date(json['status_updated_at'])), + 'previous_status_updated_at': (new Date(json['previous_status_updated_at'])), + 'error_code': json['error_code'] == null ? undefined : json['error_code'], + 'error_message': json['error_message'] == null ? undefined : json['error_message'], + 'broker_tasks': RelationshipFromJSON(json['broker_tasks']), + }; } export function AnyUnevenLoadDataToJSON(json: any): AnyUnevenLoadData { - return AnyUnevenLoadDataToJSONTyped(json, false); + return AnyUnevenLoadDataToJSONTyped(json, false); } -export function AnyUnevenLoadDataToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AnyUnevenLoadDataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - status: value["status"], - previous_status: value["previous_status"], - error_code: value["error_code"], - error_message: value["error_message"], - broker_tasks: RelationshipToJSON(value["broker_tasks"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'status': value['status'], + 'previous_status': value['previous_status'], + 'error_code': value['error_code'], + 'error_message': value['error_message'], + 'broker_tasks': RelationshipToJSON(value['broker_tasks']), + }; } + diff --git a/src/clients/kafkaRest/models/BalancerStatusData.ts b/src/clients/kafkaRest/models/BalancerStatusData.ts index de2efca8e3..9e5ea02158 100644 --- a/src/clients/kafkaRest/models/BalancerStatusData.ts +++ b/src/clients/kafkaRest/models/BalancerStatusData.ts @@ -5,141 +5,138 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface BalancerStatusData */ export interface BalancerStatusData { - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BalancerStatusData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - status: string; - /** - * - * @type {number} - * @memberof BalancerStatusData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof BalancerStatusData - */ - any_uneven_load: Relationship; - /** - * - * @type {Relationship} - * @memberof BalancerStatusData - */ - broker_tasks: Relationship; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BalancerStatusData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + status: string; + /** + * + * @type {number} + * @memberof BalancerStatusData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof BalancerStatusData + */ + any_uneven_load: Relationship; + /** + * + * @type {Relationship} + * @memberof BalancerStatusData + */ + broker_tasks: Relationship; } /** * Check if a given object implements the BalancerStatusData interface. */ export function instanceOfBalancerStatusData(value: object): value is BalancerStatusData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - if (!("any_uneven_load" in value) || value["any_uneven_load"] === undefined) return false; - if (!("broker_tasks" in value) || value["broker_tasks"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + if (!('any_uneven_load' in value) || value['any_uneven_load'] === undefined) return false; + if (!('broker_tasks' in value) || value['broker_tasks'] === undefined) return false; + return true; } export function BalancerStatusDataFromJSON(json: any): BalancerStatusData { - return BalancerStatusDataFromJSONTyped(json, false); + return BalancerStatusDataFromJSONTyped(json, false); } -export function BalancerStatusDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BalancerStatusData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - status: json["status"], - error_code: json["error_code"] == null ? undefined : json["error_code"], - error_message: json["error_message"] == null ? undefined : json["error_message"], - any_uneven_load: RelationshipFromJSON(json["any_uneven_load"]), - broker_tasks: RelationshipFromJSON(json["broker_tasks"]), - }; +export function BalancerStatusDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BalancerStatusData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'status': json['status'], + 'error_code': json['error_code'] == null ? undefined : json['error_code'], + 'error_message': json['error_message'] == null ? undefined : json['error_message'], + 'any_uneven_load': RelationshipFromJSON(json['any_uneven_load']), + 'broker_tasks': RelationshipFromJSON(json['broker_tasks']), + }; } export function BalancerStatusDataToJSON(json: any): BalancerStatusData { - return BalancerStatusDataToJSONTyped(json, false); + return BalancerStatusDataToJSONTyped(json, false); } -export function BalancerStatusDataToJSONTyped( - value?: BalancerStatusData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BalancerStatusDataToJSONTyped(value?: BalancerStatusData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - status: value["status"], - error_code: value["error_code"], - error_message: value["error_message"], - any_uneven_load: RelationshipToJSON(value["any_uneven_load"]), - broker_tasks: RelationshipToJSON(value["broker_tasks"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'status': value['status'], + 'error_code': value['error_code'], + 'error_message': value['error_message'], + 'any_uneven_load': RelationshipToJSON(value['any_uneven_load']), + 'broker_tasks': RelationshipToJSON(value['broker_tasks']), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerConfigData.ts b/src/clients/kafkaRest/models/BrokerConfigData.ts index 5a5343464e..6b38686498 100644 --- a/src/clients/kafkaRest/models/BrokerConfigData.ts +++ b/src/clients/kafkaRest/models/BrokerConfigData.ts @@ -5,169 +5,166 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigSynonymData } from "./ConfigSynonymData"; +import { mapValues } from '../runtime'; +import type { ConfigSynonymData } from './ConfigSynonymData'; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from "./ConfigSynonymData"; -import type { ResourceMetadata } from "./ResourceMetadata"; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from './ConfigSynonymData'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface BrokerConfigData */ export interface BrokerConfigData { - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof BrokerConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof BrokerConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof BrokerConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof BrokerConfigData - */ - synonyms: Array; - /** - * - * @type {number} - * @memberof BrokerConfigData - */ - broker_id: number; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof BrokerConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof BrokerConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof BrokerConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof BrokerConfigData + */ + synonyms: Array; + /** + * + * @type {number} + * @memberof BrokerConfigData + */ + broker_id: number; } /** * Check if a given object implements the BrokerConfigData interface. */ export function instanceOfBrokerConfigData(value: object): value is BrokerConfigData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("is_default" in value) || value["is_default"] === undefined) return false; - if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; - if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; - if (!("source" in value) || value["source"] === undefined) return false; - if (!("synonyms" in value) || value["synonyms"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('is_default' in value) || value['is_default'] === undefined) return false; + if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; + if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('synonyms' in value) || value['synonyms'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + return true; } export function BrokerConfigDataFromJSON(json: any): BrokerConfigData { - return BrokerConfigDataFromJSONTyped(json, false); + return BrokerConfigDataFromJSONTyped(json, false); } -export function BrokerConfigDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerConfigData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - is_default: json["is_default"], - is_read_only: json["is_read_only"], - is_sensitive: json["is_sensitive"], - source: json["source"], - synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), - broker_id: json["broker_id"], - }; +export function BrokerConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerConfigData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + 'is_default': json['is_default'], + 'is_read_only': json['is_read_only'], + 'is_sensitive': json['is_sensitive'], + 'source': json['source'], + 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), + 'broker_id': json['broker_id'], + }; } export function BrokerConfigDataToJSON(json: any): BrokerConfigData { - return BrokerConfigDataToJSONTyped(json, false); + return BrokerConfigDataToJSONTyped(json, false); } -export function BrokerConfigDataToJSONTyped( - value?: BrokerConfigData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerConfigDataToJSONTyped(value?: BrokerConfigData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - name: value["name"], - value: value["value"], - is_default: value["is_default"], - is_read_only: value["is_read_only"], - is_sensitive: value["is_sensitive"], - source: value["source"], - synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), - broker_id: value["broker_id"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'name': value['name'], + 'value': value['value'], + 'is_default': value['is_default'], + 'is_read_only': value['is_read_only'], + 'is_sensitive': value['is_sensitive'], + 'source': value['source'], + 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), + 'broker_id': value['broker_id'], + }; } + diff --git a/src/clients/kafkaRest/models/BrokerConfigDataList.ts b/src/clients/kafkaRest/models/BrokerConfigDataList.ts index a8f8062fcc..51070eade9 100644 --- a/src/clients/kafkaRest/models/BrokerConfigDataList.ts +++ b/src/clients/kafkaRest/models/BrokerConfigDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { BrokerConfigData } from "./BrokerConfigData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { BrokerConfigData } from './BrokerConfigData'; import { - BrokerConfigDataFromJSON, - BrokerConfigDataFromJSONTyped, - BrokerConfigDataToJSON, - BrokerConfigDataToJSONTyped, -} from "./BrokerConfigData"; + BrokerConfigDataFromJSON, + BrokerConfigDataFromJSONTyped, + BrokerConfigDataToJSON, + BrokerConfigDataToJSONTyped, +} from './BrokerConfigData'; /** - * + * * @export * @interface BrokerConfigDataList */ export interface BrokerConfigDataList { - /** - * - * @type {string} - * @memberof BrokerConfigDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerConfigDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerConfigDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerConfigDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerConfigDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerConfigDataList + */ + data: Array; } /** * Check if a given object implements the BrokerConfigDataList interface. */ export function instanceOfBrokerConfigDataList(value: object): value is BrokerConfigDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function BrokerConfigDataListFromJSON(json: any): BrokerConfigDataList { - return BrokerConfigDataListFromJSONTyped(json, false); + return BrokerConfigDataListFromJSONTyped(json, false); } -export function BrokerConfigDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerConfigDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(BrokerConfigDataFromJSON), - }; +export function BrokerConfigDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerConfigDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(BrokerConfigDataFromJSON)), + }; } export function BrokerConfigDataListToJSON(json: any): BrokerConfigDataList { - return BrokerConfigDataListToJSONTyped(json, false); + return BrokerConfigDataListToJSONTyped(json, false); } -export function BrokerConfigDataListToJSONTyped( - value?: BrokerConfigDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerConfigDataListToJSONTyped(value?: BrokerConfigDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(BrokerConfigDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(BrokerConfigDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerData.ts b/src/clients/kafkaRest/models/BrokerData.ts index 4af532a72b..70a8763a13 100644 --- a/src/clients/kafkaRest/models/BrokerData.ts +++ b/src/clients/kafkaRest/models/BrokerData.ts @@ -5,146 +5,146 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface BrokerData */ export interface BrokerData { - /** - * - * @type {string} - * @memberof BrokerData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof BrokerData - */ - host?: string | null; - /** - * - * @type {number} - * @memberof BrokerData - */ - port?: number | null; - /** - * - * @type {string} - * @memberof BrokerData - */ - rack?: string | null; - /** - * - * @type {Relationship} - * @memberof BrokerData - */ - configs: Relationship; - /** - * - * @type {Relationship} - * @memberof BrokerData - */ - partition_replicas: Relationship; + /** + * + * @type {string} + * @memberof BrokerData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof BrokerData + */ + host?: string | null; + /** + * + * @type {number} + * @memberof BrokerData + */ + port?: number | null; + /** + * + * @type {string} + * @memberof BrokerData + */ + rack?: string | null; + /** + * + * @type {Relationship} + * @memberof BrokerData + */ + configs: Relationship; + /** + * + * @type {Relationship} + * @memberof BrokerData + */ + partition_replicas: Relationship; } /** * Check if a given object implements the BrokerData interface. */ export function instanceOfBrokerData(value: object): value is BrokerData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("configs" in value) || value["configs"] === undefined) return false; - if (!("partition_replicas" in value) || value["partition_replicas"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('configs' in value) || value['configs'] === undefined) return false; + if (!('partition_replicas' in value) || value['partition_replicas'] === undefined) return false; + return true; } export function BrokerDataFromJSON(json: any): BrokerData { - return BrokerDataFromJSONTyped(json, false); + return BrokerDataFromJSONTyped(json, false); } export function BrokerDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - broker_id: json["broker_id"], - host: json["host"] == null ? undefined : json["host"], - port: json["port"] == null ? undefined : json["port"], - rack: json["rack"] == null ? undefined : json["rack"], - configs: RelationshipFromJSON(json["configs"]), - partition_replicas: RelationshipFromJSON(json["partition_replicas"]), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'broker_id': json['broker_id'], + 'host': json['host'] == null ? undefined : json['host'], + 'port': json['port'] == null ? undefined : json['port'], + 'rack': json['rack'] == null ? undefined : json['rack'], + 'configs': RelationshipFromJSON(json['configs']), + 'partition_replicas': RelationshipFromJSON(json['partition_replicas']), + }; } export function BrokerDataToJSON(json: any): BrokerData { - return BrokerDataToJSONTyped(json, false); + return BrokerDataToJSONTyped(json, false); } -export function BrokerDataToJSONTyped( - value?: BrokerData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerDataToJSONTyped(value?: BrokerData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - broker_id: value["broker_id"], - host: value["host"], - port: value["port"], - rack: value["rack"], - configs: RelationshipToJSON(value["configs"]), - partition_replicas: RelationshipToJSON(value["partition_replicas"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'broker_id': value['broker_id'], + 'host': value['host'], + 'port': value['port'], + 'rack': value['rack'], + 'configs': RelationshipToJSON(value['configs']), + 'partition_replicas': RelationshipToJSON(value['partition_replicas']), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerDataList.ts b/src/clients/kafkaRest/models/BrokerDataList.ts index 9d266acc66..1f7096d78f 100644 --- a/src/clients/kafkaRest/models/BrokerDataList.ts +++ b/src/clients/kafkaRest/models/BrokerDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { BrokerData } from "./BrokerData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { BrokerData } from './BrokerData'; import { - BrokerDataFromJSON, - BrokerDataFromJSONTyped, - BrokerDataToJSON, - BrokerDataToJSONTyped, -} from "./BrokerData"; + BrokerDataFromJSON, + BrokerDataFromJSONTyped, + BrokerDataToJSON, + BrokerDataToJSONTyped, +} from './BrokerData'; /** - * + * * @export * @interface BrokerDataList */ export interface BrokerDataList { - /** - * - * @type {string} - * @memberof BrokerDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerDataList + */ + data: Array; } /** * Check if a given object implements the BrokerDataList interface. */ export function instanceOfBrokerDataList(value: object): value is BrokerDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function BrokerDataListFromJSON(json: any): BrokerDataList { - return BrokerDataListFromJSONTyped(json, false); + return BrokerDataListFromJSONTyped(json, false); } -export function BrokerDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(BrokerDataFromJSON), - }; +export function BrokerDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(BrokerDataFromJSON)), + }; } export function BrokerDataListToJSON(json: any): BrokerDataList { - return BrokerDataListToJSONTyped(json, false); + return BrokerDataListToJSONTyped(json, false); } -export function BrokerDataListToJSONTyped( - value?: BrokerDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerDataListToJSONTyped(value?: BrokerDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(BrokerDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(BrokerDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerRemovalData.ts b/src/clients/kafkaRest/models/BrokerRemovalData.ts index 349d39b306..fe99d1910b 100644 --- a/src/clients/kafkaRest/models/BrokerRemovalData.ts +++ b/src/clients/kafkaRest/models/BrokerRemovalData.ts @@ -5,125 +5,122 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface BrokerRemovalData */ export interface BrokerRemovalData { - /** - * - * @type {string} - * @memberof BrokerRemovalData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerRemovalData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerRemovalData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerRemovalData - */ - broker_id: number; - /** - * - * @type {Relationship} - * @memberof BrokerRemovalData - */ - broker_task: Relationship; - /** - * - * @type {Relationship} - * @memberof BrokerRemovalData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof BrokerRemovalData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerRemovalData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerRemovalData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerRemovalData + */ + broker_id: number; + /** + * + * @type {Relationship} + * @memberof BrokerRemovalData + */ + broker_task: Relationship; + /** + * + * @type {Relationship} + * @memberof BrokerRemovalData + */ + broker: Relationship; } /** * Check if a given object implements the BrokerRemovalData interface. */ export function instanceOfBrokerRemovalData(value: object): value is BrokerRemovalData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("broker_task" in value) || value["broker_task"] === undefined) return false; - if (!("broker" in value) || value["broker"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('broker_task' in value) || value['broker_task'] === undefined) return false; + if (!('broker' in value) || value['broker'] === undefined) return false; + return true; } export function BrokerRemovalDataFromJSON(json: any): BrokerRemovalData { - return BrokerRemovalDataFromJSONTyped(json, false); + return BrokerRemovalDataFromJSONTyped(json, false); } -export function BrokerRemovalDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerRemovalData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - broker_id: json["broker_id"], - broker_task: RelationshipFromJSON(json["broker_task"]), - broker: RelationshipFromJSON(json["broker"]), - }; +export function BrokerRemovalDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerRemovalData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'broker_id': json['broker_id'], + 'broker_task': RelationshipFromJSON(json['broker_task']), + 'broker': RelationshipFromJSON(json['broker']), + }; } export function BrokerRemovalDataToJSON(json: any): BrokerRemovalData { - return BrokerRemovalDataToJSONTyped(json, false); + return BrokerRemovalDataToJSONTyped(json, false); } -export function BrokerRemovalDataToJSONTyped( - value?: BrokerRemovalData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerRemovalDataToJSONTyped(value?: BrokerRemovalData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - broker_id: value["broker_id"], - broker_task: RelationshipToJSON(value["broker_task"]), - broker: RelationshipToJSON(value["broker"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'broker_id': value['broker_id'], + 'broker_task': RelationshipToJSON(value['broker_task']), + 'broker': RelationshipToJSON(value['broker']), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerRemovalDataList.ts b/src/clients/kafkaRest/models/BrokerRemovalDataList.ts index 311ca9d0b0..4f6f197a50 100644 --- a/src/clients/kafkaRest/models/BrokerRemovalDataList.ts +++ b/src/clients/kafkaRest/models/BrokerRemovalDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { BrokerRemovalData } from "./BrokerRemovalData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { BrokerRemovalData } from './BrokerRemovalData'; import { - BrokerRemovalDataFromJSON, - BrokerRemovalDataFromJSONTyped, - BrokerRemovalDataToJSON, - BrokerRemovalDataToJSONTyped, -} from "./BrokerRemovalData"; + BrokerRemovalDataFromJSON, + BrokerRemovalDataFromJSONTyped, + BrokerRemovalDataToJSON, + BrokerRemovalDataToJSONTyped, +} from './BrokerRemovalData'; /** - * + * * @export * @interface BrokerRemovalDataList */ export interface BrokerRemovalDataList { - /** - * - * @type {string} - * @memberof BrokerRemovalDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerRemovalDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerRemovalDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerRemovalDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerRemovalDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerRemovalDataList + */ + data: Array; } /** * Check if a given object implements the BrokerRemovalDataList interface. */ export function instanceOfBrokerRemovalDataList(value: object): value is BrokerRemovalDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function BrokerRemovalDataListFromJSON(json: any): BrokerRemovalDataList { - return BrokerRemovalDataListFromJSONTyped(json, false); + return BrokerRemovalDataListFromJSONTyped(json, false); } -export function BrokerRemovalDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerRemovalDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(BrokerRemovalDataFromJSON), - }; +export function BrokerRemovalDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerRemovalDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(BrokerRemovalDataFromJSON)), + }; } export function BrokerRemovalDataListToJSON(json: any): BrokerRemovalDataList { - return BrokerRemovalDataListToJSONTyped(json, false); + return BrokerRemovalDataListToJSONTyped(json, false); } -export function BrokerRemovalDataListToJSONTyped( - value?: BrokerRemovalDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerRemovalDataListToJSONTyped(value?: BrokerRemovalDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(BrokerRemovalDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(BrokerRemovalDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts index 8fdbc6bc3e..24c9af9ecf 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts @@ -5,79 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { BrokerReplicaExclusionRequestData } from "./BrokerReplicaExclusionRequestData"; +import { mapValues } from '../runtime'; +import type { BrokerReplicaExclusionRequestData } from './BrokerReplicaExclusionRequestData'; import { - BrokerReplicaExclusionRequestDataFromJSON, - BrokerReplicaExclusionRequestDataFromJSONTyped, - BrokerReplicaExclusionRequestDataToJSON, - BrokerReplicaExclusionRequestDataToJSONTyped, -} from "./BrokerReplicaExclusionRequestData"; + BrokerReplicaExclusionRequestDataFromJSON, + BrokerReplicaExclusionRequestDataFromJSONTyped, + BrokerReplicaExclusionRequestDataToJSON, + BrokerReplicaExclusionRequestDataToJSONTyped, +} from './BrokerReplicaExclusionRequestData'; /** - * + * * @export * @interface BrokerReplicaExclusionBatchRequestData */ export interface BrokerReplicaExclusionBatchRequestData { - /** - * - * @type {Array} - * @memberof BrokerReplicaExclusionBatchRequestData - */ - data: Array; + /** + * + * @type {Array} + * @memberof BrokerReplicaExclusionBatchRequestData + */ + data: Array; } /** * Check if a given object implements the BrokerReplicaExclusionBatchRequestData interface. */ -export function instanceOfBrokerReplicaExclusionBatchRequestData( - value: object, -): value is BrokerReplicaExclusionBatchRequestData { - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionBatchRequestData(value: object): value is BrokerReplicaExclusionBatchRequestData { + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function BrokerReplicaExclusionBatchRequestDataFromJSON( - json: any, -): BrokerReplicaExclusionBatchRequestData { - return BrokerReplicaExclusionBatchRequestDataFromJSONTyped(json, false); +export function BrokerReplicaExclusionBatchRequestDataFromJSON(json: any): BrokerReplicaExclusionBatchRequestData { + return BrokerReplicaExclusionBatchRequestDataFromJSONTyped(json, false); } -export function BrokerReplicaExclusionBatchRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerReplicaExclusionBatchRequestData { - if (json == null) { - return json; - } - return { - data: (json["data"] as Array).map(BrokerReplicaExclusionRequestDataFromJSON), - }; +export function BrokerReplicaExclusionBatchRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionBatchRequestData { + if (json == null) { + return json; + } + return { + + 'data': ((json['data'] as Array).map(BrokerReplicaExclusionRequestDataFromJSON)), + }; } -export function BrokerReplicaExclusionBatchRequestDataToJSON( - json: any, -): BrokerReplicaExclusionBatchRequestData { - return BrokerReplicaExclusionBatchRequestDataToJSONTyped(json, false); +export function BrokerReplicaExclusionBatchRequestDataToJSON(json: any): BrokerReplicaExclusionBatchRequestData { + return BrokerReplicaExclusionBatchRequestDataToJSONTyped(json, false); } -export function BrokerReplicaExclusionBatchRequestDataToJSONTyped( - value?: BrokerReplicaExclusionBatchRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionBatchRequestDataToJSONTyped(value?: BrokerReplicaExclusionBatchRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - data: (value["data"] as Array).map(BrokerReplicaExclusionRequestDataToJSON), - }; + return { + + 'data': ((value['data'] as Array).map(BrokerReplicaExclusionRequestDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts index 302c4af20e..b00b753267 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts @@ -5,127 +5,122 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface BrokerReplicaExclusionData */ export interface BrokerReplicaExclusionData { - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerReplicaExclusionData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerReplicaExclusionData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionData - */ - reason: string; - /** - * - * @type {Relationship} - * @memberof BrokerReplicaExclusionData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerReplicaExclusionData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerReplicaExclusionData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionData + */ + reason: string; + /** + * + * @type {Relationship} + * @memberof BrokerReplicaExclusionData + */ + broker: Relationship; } /** * Check if a given object implements the BrokerReplicaExclusionData interface. */ -export function instanceOfBrokerReplicaExclusionData( - value: object, -): value is BrokerReplicaExclusionData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("reason" in value) || value["reason"] === undefined) return false; - if (!("broker" in value) || value["broker"] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionData(value: object): value is BrokerReplicaExclusionData { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('reason' in value) || value['reason'] === undefined) return false; + if (!('broker' in value) || value['broker'] === undefined) return false; + return true; } export function BrokerReplicaExclusionDataFromJSON(json: any): BrokerReplicaExclusionData { - return BrokerReplicaExclusionDataFromJSONTyped(json, false); + return BrokerReplicaExclusionDataFromJSONTyped(json, false); } -export function BrokerReplicaExclusionDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerReplicaExclusionData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - broker_id: json["broker_id"], - reason: json["reason"], - broker: RelationshipFromJSON(json["broker"]), - }; +export function BrokerReplicaExclusionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'broker_id': json['broker_id'], + 'reason': json['reason'], + 'broker': RelationshipFromJSON(json['broker']), + }; } export function BrokerReplicaExclusionDataToJSON(json: any): BrokerReplicaExclusionData { - return BrokerReplicaExclusionDataToJSONTyped(json, false); + return BrokerReplicaExclusionDataToJSONTyped(json, false); } -export function BrokerReplicaExclusionDataToJSONTyped( - value?: BrokerReplicaExclusionData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionDataToJSONTyped(value?: BrokerReplicaExclusionData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - broker_id: value["broker_id"], - reason: value["reason"], - broker: RelationshipToJSON(value["broker"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'broker_id': value['broker_id'], + 'reason': value['reason'], + 'broker': RelationshipToJSON(value['broker']), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts index bc052d43a2..caa21a8140 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts @@ -5,100 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { BrokerReplicaExclusionData } from "./BrokerReplicaExclusionData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { BrokerReplicaExclusionData } from './BrokerReplicaExclusionData'; import { - BrokerReplicaExclusionDataFromJSON, - BrokerReplicaExclusionDataFromJSONTyped, - BrokerReplicaExclusionDataToJSON, - BrokerReplicaExclusionDataToJSONTyped, -} from "./BrokerReplicaExclusionData"; + BrokerReplicaExclusionDataFromJSON, + BrokerReplicaExclusionDataFromJSONTyped, + BrokerReplicaExclusionDataToJSON, + BrokerReplicaExclusionDataToJSONTyped, +} from './BrokerReplicaExclusionData'; /** - * + * * @export * @interface BrokerReplicaExclusionDataList */ export interface BrokerReplicaExclusionDataList { - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerReplicaExclusionDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerReplicaExclusionDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerReplicaExclusionDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerReplicaExclusionDataList + */ + data: Array; } /** * Check if a given object implements the BrokerReplicaExclusionDataList interface. */ -export function instanceOfBrokerReplicaExclusionDataList( - value: object, -): value is BrokerReplicaExclusionDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionDataList(value: object): value is BrokerReplicaExclusionDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function BrokerReplicaExclusionDataListFromJSON(json: any): BrokerReplicaExclusionDataList { - return BrokerReplicaExclusionDataListFromJSONTyped(json, false); + return BrokerReplicaExclusionDataListFromJSONTyped(json, false); } -export function BrokerReplicaExclusionDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerReplicaExclusionDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(BrokerReplicaExclusionDataFromJSON), - }; +export function BrokerReplicaExclusionDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(BrokerReplicaExclusionDataFromJSON)), + }; } export function BrokerReplicaExclusionDataListToJSON(json: any): BrokerReplicaExclusionDataList { - return BrokerReplicaExclusionDataListToJSONTyped(json, false); + return BrokerReplicaExclusionDataListToJSONTyped(json, false); } -export function BrokerReplicaExclusionDataListToJSONTyped( - value?: BrokerReplicaExclusionDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionDataListToJSONTyped(value?: BrokerReplicaExclusionDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(BrokerReplicaExclusionDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(BrokerReplicaExclusionDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts index 6047d1ff6e..b7bdfae077 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts @@ -5,80 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface BrokerReplicaExclusionRequestData */ export interface BrokerReplicaExclusionRequestData { - /** - * - * @type {number} - * @memberof BrokerReplicaExclusionRequestData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionRequestData - */ - reason: string; + /** + * + * @type {number} + * @memberof BrokerReplicaExclusionRequestData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionRequestData + */ + reason: string; } /** * Check if a given object implements the BrokerReplicaExclusionRequestData interface. */ -export function instanceOfBrokerReplicaExclusionRequestData( - value: object, -): value is BrokerReplicaExclusionRequestData { - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("reason" in value) || value["reason"] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionRequestData(value: object): value is BrokerReplicaExclusionRequestData { + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('reason' in value) || value['reason'] === undefined) return false; + return true; } -export function BrokerReplicaExclusionRequestDataFromJSON( - json: any, -): BrokerReplicaExclusionRequestData { - return BrokerReplicaExclusionRequestDataFromJSONTyped(json, false); +export function BrokerReplicaExclusionRequestDataFromJSON(json: any): BrokerReplicaExclusionRequestData { + return BrokerReplicaExclusionRequestDataFromJSONTyped(json, false); } -export function BrokerReplicaExclusionRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerReplicaExclusionRequestData { - if (json == null) { - return json; - } - return { - broker_id: json["broker_id"], - reason: json["reason"], - }; +export function BrokerReplicaExclusionRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionRequestData { + if (json == null) { + return json; + } + return { + + 'broker_id': json['broker_id'], + 'reason': json['reason'], + }; } -export function BrokerReplicaExclusionRequestDataToJSON( - json: any, -): BrokerReplicaExclusionRequestData { - return BrokerReplicaExclusionRequestDataToJSONTyped(json, false); +export function BrokerReplicaExclusionRequestDataToJSON(json: any): BrokerReplicaExclusionRequestData { + return BrokerReplicaExclusionRequestDataToJSONTyped(json, false); } -export function BrokerReplicaExclusionRequestDataToJSONTyped( - value?: BrokerReplicaExclusionRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionRequestDataToJSONTyped(value?: BrokerReplicaExclusionRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - broker_id: value["broker_id"], - reason: value["reason"], - }; + return { + + 'broker_id': value['broker_id'], + 'reason': value['reason'], + }; } + diff --git a/src/clients/kafkaRest/models/BrokerTaskData.ts b/src/clients/kafkaRest/models/BrokerTaskData.ts index 857356db3f..b62de63864 100644 --- a/src/clients/kafkaRest/models/BrokerTaskData.ts +++ b/src/clients/kafkaRest/models/BrokerTaskData.ts @@ -5,190 +5,189 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { BrokerTaskType } from "./BrokerTaskType"; +import { mapValues } from '../runtime'; +import type { BrokerTaskType } from './BrokerTaskType'; import { - BrokerTaskTypeFromJSON, - BrokerTaskTypeFromJSONTyped, - BrokerTaskTypeToJSON, - BrokerTaskTypeToJSONTyped, -} from "./BrokerTaskType"; -import type { Relationship } from "./Relationship"; + BrokerTaskTypeFromJSON, + BrokerTaskTypeFromJSONTyped, + BrokerTaskTypeToJSON, + BrokerTaskTypeToJSONTyped, +} from './BrokerTaskType'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface BrokerTaskData */ export interface BrokerTaskData { - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerTaskData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerTaskData - */ - broker_id: number; - /** - * - * @type {BrokerTaskType} - * @memberof BrokerTaskData - */ - task_type: BrokerTaskType; - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - task_status: string; - /** - * - * @type {boolean} - * @memberof BrokerTaskData - */ - shutdown_scheduled?: boolean | null; - /** - * - * @type {{ [key: string]: string; }} - * @memberof BrokerTaskData - */ - sub_task_statuses: { [key: string]: string }; - /** - * The date and time at which this task was created. - * @type {Date} - * @memberof BrokerTaskData - */ - readonly created_at: Date; - /** - * The date and time at which this task was last updated. - * @type {Date} - * @memberof BrokerTaskData - */ - readonly updated_at: Date; - /** - * - * @type {number} - * @memberof BrokerTaskData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof BrokerTaskData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerTaskData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerTaskData + */ + broker_id: number; + /** + * + * @type {BrokerTaskType} + * @memberof BrokerTaskData + */ + task_type: BrokerTaskType; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + task_status: string; + /** + * + * @type {boolean} + * @memberof BrokerTaskData + */ + shutdown_scheduled?: boolean | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof BrokerTaskData + */ + sub_task_statuses: { [key: string]: string; }; + /** + * The date and time at which this task was created. + * @type {Date} + * @memberof BrokerTaskData + */ + readonly created_at: Date; + /** + * The date and time at which this task was last updated. + * @type {Date} + * @memberof BrokerTaskData + */ + readonly updated_at: Date; + /** + * + * @type {number} + * @memberof BrokerTaskData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof BrokerTaskData + */ + broker: Relationship; } + + /** * Check if a given object implements the BrokerTaskData interface. */ export function instanceOfBrokerTaskData(value: object): value is BrokerTaskData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("task_type" in value) || value["task_type"] === undefined) return false; - if (!("task_status" in value) || value["task_status"] === undefined) return false; - if (!("sub_task_statuses" in value) || value["sub_task_statuses"] === undefined) return false; - if (!("created_at" in value) || value["created_at"] === undefined) return false; - if (!("updated_at" in value) || value["updated_at"] === undefined) return false; - if (!("broker" in value) || value["broker"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('task_type' in value) || value['task_type'] === undefined) return false; + if (!('task_status' in value) || value['task_status'] === undefined) return false; + if (!('sub_task_statuses' in value) || value['sub_task_statuses'] === undefined) return false; + if (!('created_at' in value) || value['created_at'] === undefined) return false; + if (!('updated_at' in value) || value['updated_at'] === undefined) return false; + if (!('broker' in value) || value['broker'] === undefined) return false; + return true; } export function BrokerTaskDataFromJSON(json: any): BrokerTaskData { - return BrokerTaskDataFromJSONTyped(json, false); + return BrokerTaskDataFromJSONTyped(json, false); } -export function BrokerTaskDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerTaskData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - broker_id: json["broker_id"], - task_type: BrokerTaskTypeFromJSON(json["task_type"]), - task_status: json["task_status"], - shutdown_scheduled: json["shutdown_scheduled"] == null ? undefined : json["shutdown_scheduled"], - sub_task_statuses: json["sub_task_statuses"], - created_at: new Date(json["created_at"]), - updated_at: new Date(json["updated_at"]), - error_code: json["error_code"] == null ? undefined : json["error_code"], - error_message: json["error_message"] == null ? undefined : json["error_message"], - broker: RelationshipFromJSON(json["broker"]), - }; +export function BrokerTaskDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerTaskData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'broker_id': json['broker_id'], + 'task_type': BrokerTaskTypeFromJSON(json['task_type']), + 'task_status': json['task_status'], + 'shutdown_scheduled': json['shutdown_scheduled'] == null ? undefined : json['shutdown_scheduled'], + 'sub_task_statuses': json['sub_task_statuses'], + 'created_at': (new Date(json['created_at'])), + 'updated_at': (new Date(json['updated_at'])), + 'error_code': json['error_code'] == null ? undefined : json['error_code'], + 'error_message': json['error_message'] == null ? undefined : json['error_message'], + 'broker': RelationshipFromJSON(json['broker']), + }; } export function BrokerTaskDataToJSON(json: any): BrokerTaskData { - return BrokerTaskDataToJSONTyped(json, false); + return BrokerTaskDataToJSONTyped(json, false); } -export function BrokerTaskDataToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerTaskDataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - broker_id: value["broker_id"], - task_type: BrokerTaskTypeToJSON(value["task_type"]), - task_status: value["task_status"], - shutdown_scheduled: value["shutdown_scheduled"], - sub_task_statuses: value["sub_task_statuses"], - error_code: value["error_code"], - error_message: value["error_message"], - broker: RelationshipToJSON(value["broker"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'broker_id': value['broker_id'], + 'task_type': BrokerTaskTypeToJSON(value['task_type']), + 'task_status': value['task_status'], + 'shutdown_scheduled': value['shutdown_scheduled'], + 'sub_task_statuses': value['sub_task_statuses'], + 'error_code': value['error_code'], + 'error_message': value['error_message'], + 'broker': RelationshipToJSON(value['broker']), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerTaskDataList.ts b/src/clients/kafkaRest/models/BrokerTaskDataList.ts index a3bf582a0a..aaf2217a42 100644 --- a/src/clients/kafkaRest/models/BrokerTaskDataList.ts +++ b/src/clients/kafkaRest/models/BrokerTaskDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { BrokerTaskData } from "./BrokerTaskData"; +import { mapValues } from '../runtime'; +import type { BrokerTaskData } from './BrokerTaskData'; import { - BrokerTaskDataFromJSON, - BrokerTaskDataFromJSONTyped, - BrokerTaskDataToJSON, - BrokerTaskDataToJSONTyped, -} from "./BrokerTaskData"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; + BrokerTaskDataFromJSON, + BrokerTaskDataFromJSONTyped, + BrokerTaskDataToJSON, + BrokerTaskDataToJSONTyped, +} from './BrokerTaskData'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; /** - * + * * @export * @interface BrokerTaskDataList */ export interface BrokerTaskDataList { - /** - * - * @type {string} - * @memberof BrokerTaskDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerTaskDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerTaskDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerTaskDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerTaskDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerTaskDataList + */ + data: Array; } /** * Check if a given object implements the BrokerTaskDataList interface. */ export function instanceOfBrokerTaskDataList(value: object): value is BrokerTaskDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function BrokerTaskDataListFromJSON(json: any): BrokerTaskDataList { - return BrokerTaskDataListFromJSONTyped(json, false); + return BrokerTaskDataListFromJSONTyped(json, false); } -export function BrokerTaskDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerTaskDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(BrokerTaskDataFromJSON), - }; +export function BrokerTaskDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerTaskDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(BrokerTaskDataFromJSON)), + }; } export function BrokerTaskDataListToJSON(json: any): BrokerTaskDataList { - return BrokerTaskDataListToJSONTyped(json, false); + return BrokerTaskDataListToJSONTyped(json, false); } -export function BrokerTaskDataListToJSONTyped( - value?: BrokerTaskDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BrokerTaskDataListToJSONTyped(value?: BrokerTaskDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(BrokerTaskDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(BrokerTaskDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/BrokerTaskType.ts b/src/clients/kafkaRest/models/BrokerTaskType.ts index 88b347081c..2d76cc0bc7 100644 --- a/src/clients/kafkaRest/models/BrokerTaskType.ts +++ b/src/clients/kafkaRest/models/BrokerTaskType.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,44 +13,40 @@ */ /** - * + * * @export * @enum {string} */ export enum BrokerTaskType { - AddBroker = "add-broker", - RemoveBroker = "remove-broker", + AddBroker = 'add-broker', + RemoveBroker = 'remove-broker' } + export function instanceOfBrokerTaskType(value: any): boolean { - for (const key in BrokerTaskType) { - if (Object.prototype.hasOwnProperty.call(BrokerTaskType, key)) { - if (BrokerTaskType[key as keyof typeof BrokerTaskType] === value) { - return true; - } + for (const key in BrokerTaskType) { + if (Object.prototype.hasOwnProperty.call(BrokerTaskType, key)) { + if (BrokerTaskType[key as keyof typeof BrokerTaskType] === value) { + return true; + } + } } - } - return false; + return false; } export function BrokerTaskTypeFromJSON(json: any): BrokerTaskType { - return BrokerTaskTypeFromJSONTyped(json, false); + return BrokerTaskTypeFromJSONTyped(json, false); } -export function BrokerTaskTypeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BrokerTaskType { - return json as BrokerTaskType; +export function BrokerTaskTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerTaskType { + return json as BrokerTaskType; } export function BrokerTaskTypeToJSON(value?: BrokerTaskType | null): any { - return value as any; + return value as any; } -export function BrokerTaskTypeToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): BrokerTaskType { - return value as BrokerTaskType; +export function BrokerTaskTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BrokerTaskType { + return value as BrokerTaskType; } + diff --git a/src/clients/kafkaRest/models/ClusterConfigData.ts b/src/clients/kafkaRest/models/ClusterConfigData.ts index 875b702db2..5b6d1b0bcd 100644 --- a/src/clients/kafkaRest/models/ClusterConfigData.ts +++ b/src/clients/kafkaRest/models/ClusterConfigData.ts @@ -5,169 +5,166 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigSynonymData } from "./ConfigSynonymData"; +import { mapValues } from '../runtime'; +import type { ConfigSynonymData } from './ConfigSynonymData'; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from "./ConfigSynonymData"; -import type { ResourceMetadata } from "./ResourceMetadata"; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from './ConfigSynonymData'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ClusterConfigData */ export interface ClusterConfigData { - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ClusterConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof ClusterConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof ClusterConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof ClusterConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof ClusterConfigData - */ - synonyms: Array; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - config_type: string; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ClusterConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof ClusterConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof ClusterConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof ClusterConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof ClusterConfigData + */ + synonyms: Array; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + config_type: string; } /** * Check if a given object implements the ClusterConfigData interface. */ export function instanceOfClusterConfigData(value: object): value is ClusterConfigData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("is_default" in value) || value["is_default"] === undefined) return false; - if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; - if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; - if (!("source" in value) || value["source"] === undefined) return false; - if (!("synonyms" in value) || value["synonyms"] === undefined) return false; - if (!("config_type" in value) || value["config_type"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('is_default' in value) || value['is_default'] === undefined) return false; + if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; + if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('synonyms' in value) || value['synonyms'] === undefined) return false; + if (!('config_type' in value) || value['config_type'] === undefined) return false; + return true; } export function ClusterConfigDataFromJSON(json: any): ClusterConfigData { - return ClusterConfigDataFromJSONTyped(json, false); + return ClusterConfigDataFromJSONTyped(json, false); } -export function ClusterConfigDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterConfigData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - is_default: json["is_default"], - is_read_only: json["is_read_only"], - is_sensitive: json["is_sensitive"], - source: json["source"], - synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), - config_type: json["config_type"], - }; +export function ClusterConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterConfigData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + 'is_default': json['is_default'], + 'is_read_only': json['is_read_only'], + 'is_sensitive': json['is_sensitive'], + 'source': json['source'], + 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), + 'config_type': json['config_type'], + }; } export function ClusterConfigDataToJSON(json: any): ClusterConfigData { - return ClusterConfigDataToJSONTyped(json, false); + return ClusterConfigDataToJSONTyped(json, false); } -export function ClusterConfigDataToJSONTyped( - value?: ClusterConfigData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterConfigDataToJSONTyped(value?: ClusterConfigData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - name: value["name"], - value: value["value"], - is_default: value["is_default"], - is_read_only: value["is_read_only"], - is_sensitive: value["is_sensitive"], - source: value["source"], - synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), - config_type: value["config_type"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'name': value['name'], + 'value': value['value'], + 'is_default': value['is_default'], + 'is_read_only': value['is_read_only'], + 'is_sensitive': value['is_sensitive'], + 'source': value['source'], + 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), + 'config_type': value['config_type'], + }; } + diff --git a/src/clients/kafkaRest/models/ClusterConfigDataList.ts b/src/clients/kafkaRest/models/ClusterConfigDataList.ts index c4bdac0625..a72aeea1b4 100644 --- a/src/clients/kafkaRest/models/ClusterConfigDataList.ts +++ b/src/clients/kafkaRest/models/ClusterConfigDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ClusterConfigData } from "./ClusterConfigData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ClusterConfigData } from './ClusterConfigData'; import { - ClusterConfigDataFromJSON, - ClusterConfigDataFromJSONTyped, - ClusterConfigDataToJSON, - ClusterConfigDataToJSONTyped, -} from "./ClusterConfigData"; + ClusterConfigDataFromJSON, + ClusterConfigDataFromJSONTyped, + ClusterConfigDataToJSON, + ClusterConfigDataToJSONTyped, +} from './ClusterConfigData'; /** - * + * * @export * @interface ClusterConfigDataList */ export interface ClusterConfigDataList { - /** - * - * @type {string} - * @memberof ClusterConfigDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ClusterConfigDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ClusterConfigDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ClusterConfigDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ClusterConfigDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ClusterConfigDataList + */ + data: Array; } /** * Check if a given object implements the ClusterConfigDataList interface. */ export function instanceOfClusterConfigDataList(value: object): value is ClusterConfigDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ClusterConfigDataListFromJSON(json: any): ClusterConfigDataList { - return ClusterConfigDataListFromJSONTyped(json, false); + return ClusterConfigDataListFromJSONTyped(json, false); } -export function ClusterConfigDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterConfigDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ClusterConfigDataFromJSON), - }; +export function ClusterConfigDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterConfigDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ClusterConfigDataFromJSON)), + }; } export function ClusterConfigDataListToJSON(json: any): ClusterConfigDataList { - return ClusterConfigDataListToJSONTyped(json, false); + return ClusterConfigDataListToJSONTyped(json, false); } -export function ClusterConfigDataListToJSONTyped( - value?: ClusterConfigDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterConfigDataListToJSONTyped(value?: ClusterConfigDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ClusterConfigDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ClusterConfigDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ClusterData.ts b/src/clients/kafkaRest/models/ClusterData.ts index b747075d56..06ccbaa338 100644 --- a/src/clients/kafkaRest/models/ClusterData.ts +++ b/src/clients/kafkaRest/models/ClusterData.ts @@ -5,158 +5,157 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ClusterData */ export interface ClusterData { - /** - * - * @type {string} - * @memberof ClusterData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ClusterData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ClusterData - */ - cluster_id: string; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - controller?: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - acls: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - brokers: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - broker_configs: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - consumer_groups: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - topics: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - partition_reassignments: Relationship; + /** + * + * @type {string} + * @memberof ClusterData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ClusterData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ClusterData + */ + cluster_id: string; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + controller?: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + acls: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + brokers: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + broker_configs: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + consumer_groups: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + topics: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + partition_reassignments: Relationship; } /** * Check if a given object implements the ClusterData interface. */ export function instanceOfClusterData(value: object): value is ClusterData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("acls" in value) || value["acls"] === undefined) return false; - if (!("brokers" in value) || value["brokers"] === undefined) return false; - if (!("broker_configs" in value) || value["broker_configs"] === undefined) return false; - if (!("consumer_groups" in value) || value["consumer_groups"] === undefined) return false; - if (!("topics" in value) || value["topics"] === undefined) return false; - if (!("partition_reassignments" in value) || value["partition_reassignments"] === undefined) - return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('acls' in value) || value['acls'] === undefined) return false; + if (!('brokers' in value) || value['brokers'] === undefined) return false; + if (!('broker_configs' in value) || value['broker_configs'] === undefined) return false; + if (!('consumer_groups' in value) || value['consumer_groups'] === undefined) return false; + if (!('topics' in value) || value['topics'] === undefined) return false; + if (!('partition_reassignments' in value) || value['partition_reassignments'] === undefined) return false; + return true; } export function ClusterDataFromJSON(json: any): ClusterData { - return ClusterDataFromJSONTyped(json, false); + return ClusterDataFromJSONTyped(json, false); } export function ClusterDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - controller: json["controller"] == null ? undefined : RelationshipFromJSON(json["controller"]), - acls: RelationshipFromJSON(json["acls"]), - brokers: RelationshipFromJSON(json["brokers"]), - broker_configs: RelationshipFromJSON(json["broker_configs"]), - consumer_groups: RelationshipFromJSON(json["consumer_groups"]), - topics: RelationshipFromJSON(json["topics"]), - partition_reassignments: RelationshipFromJSON(json["partition_reassignments"]), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'controller': json['controller'] == null ? undefined : RelationshipFromJSON(json['controller']), + 'acls': RelationshipFromJSON(json['acls']), + 'brokers': RelationshipFromJSON(json['brokers']), + 'broker_configs': RelationshipFromJSON(json['broker_configs']), + 'consumer_groups': RelationshipFromJSON(json['consumer_groups']), + 'topics': RelationshipFromJSON(json['topics']), + 'partition_reassignments': RelationshipFromJSON(json['partition_reassignments']), + }; } export function ClusterDataToJSON(json: any): ClusterData { - return ClusterDataToJSONTyped(json, false); + return ClusterDataToJSONTyped(json, false); } -export function ClusterDataToJSONTyped( - value?: ClusterData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterDataToJSONTyped(value?: ClusterData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - controller: RelationshipToJSON(value["controller"]), - acls: RelationshipToJSON(value["acls"]), - brokers: RelationshipToJSON(value["brokers"]), - broker_configs: RelationshipToJSON(value["broker_configs"]), - consumer_groups: RelationshipToJSON(value["consumer_groups"]), - topics: RelationshipToJSON(value["topics"]), - partition_reassignments: RelationshipToJSON(value["partition_reassignments"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'controller': RelationshipToJSON(value['controller']), + 'acls': RelationshipToJSON(value['acls']), + 'brokers': RelationshipToJSON(value['brokers']), + 'broker_configs': RelationshipToJSON(value['broker_configs']), + 'consumer_groups': RelationshipToJSON(value['consumer_groups']), + 'topics': RelationshipToJSON(value['topics']), + 'partition_reassignments': RelationshipToJSON(value['partition_reassignments']), + }; } + diff --git a/src/clients/kafkaRest/models/ClusterDataList.ts b/src/clients/kafkaRest/models/ClusterDataList.ts index 6036c4d521..52914c29a9 100644 --- a/src/clients/kafkaRest/models/ClusterDataList.ts +++ b/src/clients/kafkaRest/models/ClusterDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ClusterData } from "./ClusterData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ClusterData } from './ClusterData'; import { - ClusterDataFromJSON, - ClusterDataFromJSONTyped, - ClusterDataToJSON, - ClusterDataToJSONTyped, -} from "./ClusterData"; + ClusterDataFromJSON, + ClusterDataFromJSONTyped, + ClusterDataToJSON, + ClusterDataToJSONTyped, +} from './ClusterData'; /** - * + * * @export * @interface ClusterDataList */ export interface ClusterDataList { - /** - * - * @type {string} - * @memberof ClusterDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ClusterDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ClusterDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ClusterDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ClusterDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ClusterDataList + */ + data: Array; } /** * Check if a given object implements the ClusterDataList interface. */ export function instanceOfClusterDataList(value: object): value is ClusterDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ClusterDataListFromJSON(json: any): ClusterDataList { - return ClusterDataListFromJSONTyped(json, false); + return ClusterDataListFromJSONTyped(json, false); } -export function ClusterDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ClusterDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ClusterDataFromJSON), - }; +export function ClusterDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ClusterDataFromJSON)), + }; } export function ClusterDataListToJSON(json: any): ClusterDataList { - return ClusterDataListToJSONTyped(json, false); + return ClusterDataListToJSONTyped(json, false); } -export function ClusterDataListToJSONTyped( - value?: ClusterDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterDataListToJSONTyped(value?: ClusterDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ClusterDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ClusterDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ConfigData.ts b/src/clients/kafkaRest/models/ConfigData.ts index 2b3d679c2f..aa00883afe 100644 --- a/src/clients/kafkaRest/models/ConfigData.ts +++ b/src/clients/kafkaRest/models/ConfigData.ts @@ -5,71 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ConfigData */ export interface ConfigData { - /** - * - * @type {string} - * @memberof ConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof ConfigData - */ - value: string | null; + /** + * + * @type {string} + * @memberof ConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof ConfigData + */ + value: string | null; } /** * Check if a given object implements the ConfigData interface. */ export function instanceOfConfigData(value: object): value is ConfigData { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("value" in value) || value["value"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('value' in value) || value['value'] === undefined) return false; + return true; } export function ConfigDataFromJSON(json: any): ConfigData { - return ConfigDataFromJSONTyped(json, false); + return ConfigDataFromJSONTyped(json, false); } export function ConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigData { - if (json == null) { - return json; - } - return { - name: json["name"], - value: json["value"], - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'value': json['value'], + }; } export function ConfigDataToJSON(json: any): ConfigData { - return ConfigDataToJSONTyped(json, false); + return ConfigDataToJSONTyped(json, false); } -export function ConfigDataToJSONTyped( - value?: ConfigData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigDataToJSONTyped(value?: ConfigData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - value: value["value"], - }; + return { + + 'name': value['name'], + 'value': value['value'], + }; } + diff --git a/src/clients/kafkaRest/models/ConfigSynonymData.ts b/src/clients/kafkaRest/models/ConfigSynonymData.ts index defeaced5a..5031bc5987 100644 --- a/src/clients/kafkaRest/models/ConfigSynonymData.ts +++ b/src/clients/kafkaRest/models/ConfigSynonymData.ts @@ -5,82 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ConfigSynonymData */ export interface ConfigSynonymData { - /** - * - * @type {string} - * @memberof ConfigSynonymData - */ - name: string; - /** - * - * @type {string} - * @memberof ConfigSynonymData - */ - value?: string | null; - /** - * - * @type {string} - * @memberof ConfigSynonymData - */ - source: string; + /** + * + * @type {string} + * @memberof ConfigSynonymData + */ + name: string; + /** + * + * @type {string} + * @memberof ConfigSynonymData + */ + value?: string | null; + /** + * + * @type {string} + * @memberof ConfigSynonymData + */ + source: string; } /** * Check if a given object implements the ConfigSynonymData interface. */ export function instanceOfConfigSynonymData(value: object): value is ConfigSynonymData { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("source" in value) || value["source"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + return true; } export function ConfigSynonymDataFromJSON(json: any): ConfigSynonymData { - return ConfigSynonymDataFromJSONTyped(json, false); + return ConfigSynonymDataFromJSONTyped(json, false); } -export function ConfigSynonymDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigSynonymData { - if (json == null) { - return json; - } - return { - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - source: json["source"], - }; +export function ConfigSynonymDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigSynonymData { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + 'source': json['source'], + }; } export function ConfigSynonymDataToJSON(json: any): ConfigSynonymData { - return ConfigSynonymDataToJSONTyped(json, false); + return ConfigSynonymDataToJSONTyped(json, false); } -export function ConfigSynonymDataToJSONTyped( - value?: ConfigSynonymData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigSynonymDataToJSONTyped(value?: ConfigSynonymData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - value: value["value"], - source: value["source"], - }; + return { + + 'name': value['name'], + 'value': value['value'], + 'source': value['source'], + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerAssignmentData.ts b/src/clients/kafkaRest/models/ConsumerAssignmentData.ts index f46fc9d06a..95266ed5b7 100644 --- a/src/clients/kafkaRest/models/ConsumerAssignmentData.ts +++ b/src/clients/kafkaRest/models/ConsumerAssignmentData.ts @@ -5,152 +5,149 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ConsumerAssignmentData */ export interface ConsumerAssignmentData { - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerAssignmentData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ConsumerAssignmentData - */ - partition_id: number; - /** - * - * @type {Relationship} - * @memberof ConsumerAssignmentData - */ - partition: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerAssignmentData - */ - lag: Relationship; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerAssignmentData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ConsumerAssignmentData + */ + partition_id: number; + /** + * + * @type {Relationship} + * @memberof ConsumerAssignmentData + */ + partition: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerAssignmentData + */ + lag: Relationship; } /** * Check if a given object implements the ConsumerAssignmentData interface. */ export function instanceOfConsumerAssignmentData(value: object): value is ConsumerAssignmentData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; - if (!("consumer_id" in value) || value["consumer_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("partition_id" in value) || value["partition_id"] === undefined) return false; - if (!("partition" in value) || value["partition"] === undefined) return false; - if (!("lag" in value) || value["lag"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; + if (!('consumer_id' in value) || value['consumer_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('partition_id' in value) || value['partition_id'] === undefined) return false; + if (!('partition' in value) || value['partition'] === undefined) return false; + if (!('lag' in value) || value['lag'] === undefined) return false; + return true; } export function ConsumerAssignmentDataFromJSON(json: any): ConsumerAssignmentData { - return ConsumerAssignmentDataFromJSONTyped(json, false); + return ConsumerAssignmentDataFromJSONTyped(json, false); } -export function ConsumerAssignmentDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerAssignmentData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - consumer_group_id: json["consumer_group_id"], - consumer_id: json["consumer_id"], - topic_name: json["topic_name"], - partition_id: json["partition_id"], - partition: RelationshipFromJSON(json["partition"]), - lag: RelationshipFromJSON(json["lag"]), - }; +export function ConsumerAssignmentDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAssignmentData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'consumer_group_id': json['consumer_group_id'], + 'consumer_id': json['consumer_id'], + 'topic_name': json['topic_name'], + 'partition_id': json['partition_id'], + 'partition': RelationshipFromJSON(json['partition']), + 'lag': RelationshipFromJSON(json['lag']), + }; } export function ConsumerAssignmentDataToJSON(json: any): ConsumerAssignmentData { - return ConsumerAssignmentDataToJSONTyped(json, false); + return ConsumerAssignmentDataToJSONTyped(json, false); } -export function ConsumerAssignmentDataToJSONTyped( - value?: ConsumerAssignmentData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerAssignmentDataToJSONTyped(value?: ConsumerAssignmentData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - consumer_group_id: value["consumer_group_id"], - consumer_id: value["consumer_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - partition: RelationshipToJSON(value["partition"]), - lag: RelationshipToJSON(value["lag"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'consumer_group_id': value['consumer_group_id'], + 'consumer_id': value['consumer_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'partition': RelationshipToJSON(value['partition']), + 'lag': RelationshipToJSON(value['lag']), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts b/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts index 12323992c6..69be74e9ad 100644 --- a/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts @@ -5,100 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ConsumerAssignmentData } from "./ConsumerAssignmentData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ConsumerAssignmentData } from './ConsumerAssignmentData'; import { - ConsumerAssignmentDataFromJSON, - ConsumerAssignmentDataFromJSONTyped, - ConsumerAssignmentDataToJSON, - ConsumerAssignmentDataToJSONTyped, -} from "./ConsumerAssignmentData"; + ConsumerAssignmentDataFromJSON, + ConsumerAssignmentDataFromJSONTyped, + ConsumerAssignmentDataToJSON, + ConsumerAssignmentDataToJSONTyped, +} from './ConsumerAssignmentData'; /** - * + * * @export * @interface ConsumerAssignmentDataList */ export interface ConsumerAssignmentDataList { - /** - * - * @type {string} - * @memberof ConsumerAssignmentDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerAssignmentDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerAssignmentDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerAssignmentDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerAssignmentDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerAssignmentDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerAssignmentDataList interface. */ -export function instanceOfConsumerAssignmentDataList( - value: object, -): value is ConsumerAssignmentDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfConsumerAssignmentDataList(value: object): value is ConsumerAssignmentDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ConsumerAssignmentDataListFromJSON(json: any): ConsumerAssignmentDataList { - return ConsumerAssignmentDataListFromJSONTyped(json, false); + return ConsumerAssignmentDataListFromJSONTyped(json, false); } -export function ConsumerAssignmentDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerAssignmentDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ConsumerAssignmentDataFromJSON), - }; +export function ConsumerAssignmentDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAssignmentDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ConsumerAssignmentDataFromJSON)), + }; } export function ConsumerAssignmentDataListToJSON(json: any): ConsumerAssignmentDataList { - return ConsumerAssignmentDataListToJSONTyped(json, false); + return ConsumerAssignmentDataListToJSONTyped(json, false); } -export function ConsumerAssignmentDataListToJSONTyped( - value?: ConsumerAssignmentDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerAssignmentDataListToJSONTyped(value?: ConsumerAssignmentDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ConsumerAssignmentDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ConsumerAssignmentDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerData.ts b/src/clients/kafkaRest/models/ConsumerData.ts index f76096c4d8..4f9489518d 100644 --- a/src/clients/kafkaRest/models/ConsumerData.ts +++ b/src/clients/kafkaRest/models/ConsumerData.ts @@ -5,139 +5,139 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ConsumerData */ export interface ConsumerData { - /** - * - * @type {string} - * @memberof ConsumerData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerData - */ - consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerData - */ - instance_id?: string | null; - /** - * - * @type {string} - * @memberof ConsumerData - */ - client_id: string; - /** - * - * @type {Relationship} - * @memberof ConsumerData - */ - assignments: Relationship; + /** + * + * @type {string} + * @memberof ConsumerData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerData + */ + consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerData + */ + instance_id?: string | null; + /** + * + * @type {string} + * @memberof ConsumerData + */ + client_id: string; + /** + * + * @type {Relationship} + * @memberof ConsumerData + */ + assignments: Relationship; } /** * Check if a given object implements the ConsumerData interface. */ export function instanceOfConsumerData(value: object): value is ConsumerData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; - if (!("consumer_id" in value) || value["consumer_id"] === undefined) return false; - if (!("client_id" in value) || value["client_id"] === undefined) return false; - if (!("assignments" in value) || value["assignments"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; + if (!('consumer_id' in value) || value['consumer_id'] === undefined) return false; + if (!('client_id' in value) || value['client_id'] === undefined) return false; + if (!('assignments' in value) || value['assignments'] === undefined) return false; + return true; } export function ConsumerDataFromJSON(json: any): ConsumerData { - return ConsumerDataFromJSONTyped(json, false); + return ConsumerDataFromJSONTyped(json, false); } export function ConsumerDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - consumer_group_id: json["consumer_group_id"], - consumer_id: json["consumer_id"], - instance_id: json["instance_id"] == null ? undefined : json["instance_id"], - client_id: json["client_id"], - assignments: RelationshipFromJSON(json["assignments"]), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'consumer_group_id': json['consumer_group_id'], + 'consumer_id': json['consumer_id'], + 'instance_id': json['instance_id'] == null ? undefined : json['instance_id'], + 'client_id': json['client_id'], + 'assignments': RelationshipFromJSON(json['assignments']), + }; } export function ConsumerDataToJSON(json: any): ConsumerData { - return ConsumerDataToJSONTyped(json, false); + return ConsumerDataToJSONTyped(json, false); } -export function ConsumerDataToJSONTyped( - value?: ConsumerData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerDataToJSONTyped(value?: ConsumerData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - consumer_group_id: value["consumer_group_id"], - consumer_id: value["consumer_id"], - instance_id: value["instance_id"], - client_id: value["client_id"], - assignments: RelationshipToJSON(value["assignments"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'consumer_group_id': value['consumer_group_id'], + 'consumer_id': value['consumer_id'], + 'instance_id': value['instance_id'], + 'client_id': value['client_id'], + 'assignments': RelationshipToJSON(value['assignments']), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerDataList.ts b/src/clients/kafkaRest/models/ConsumerDataList.ts index 3024a916d7..7c95dea31e 100644 --- a/src/clients/kafkaRest/models/ConsumerDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ConsumerData } from "./ConsumerData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ConsumerData } from './ConsumerData'; import { - ConsumerDataFromJSON, - ConsumerDataFromJSONTyped, - ConsumerDataToJSON, - ConsumerDataToJSONTyped, -} from "./ConsumerData"; + ConsumerDataFromJSON, + ConsumerDataFromJSONTyped, + ConsumerDataToJSON, + ConsumerDataToJSONTyped, +} from './ConsumerData'; /** - * + * * @export * @interface ConsumerDataList */ export interface ConsumerDataList { - /** - * - * @type {string} - * @memberof ConsumerDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerDataList interface. */ export function instanceOfConsumerDataList(value: object): value is ConsumerDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ConsumerDataListFromJSON(json: any): ConsumerDataList { - return ConsumerDataListFromJSONTyped(json, false); + return ConsumerDataListFromJSONTyped(json, false); } -export function ConsumerDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ConsumerDataFromJSON), - }; +export function ConsumerDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ConsumerDataFromJSON)), + }; } export function ConsumerDataListToJSON(json: any): ConsumerDataList { - return ConsumerDataListToJSONTyped(json, false); + return ConsumerDataListToJSONTyped(json, false); } -export function ConsumerDataListToJSONTyped( - value?: ConsumerDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerDataListToJSONTyped(value?: ConsumerDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ConsumerDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ConsumerDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerGroupData.ts b/src/clients/kafkaRest/models/ConsumerGroupData.ts index 688fa17c27..8cef088640 100644 --- a/src/clients/kafkaRest/models/ConsumerGroupData.ts +++ b/src/clients/kafkaRest/models/ConsumerGroupData.ts @@ -5,160 +5,157 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ConsumerGroupData */ export interface ConsumerGroupData { - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerGroupData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - consumer_group_id: string; - /** - * - * @type {boolean} - * @memberof ConsumerGroupData - */ - is_simple: boolean; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - partition_assignor: string; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - state: string; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupData - */ - coordinator: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupData - */ - consumer?: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupData - */ - lag_summary: Relationship; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerGroupData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + consumer_group_id: string; + /** + * + * @type {boolean} + * @memberof ConsumerGroupData + */ + is_simple: boolean; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + partition_assignor: string; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + state: string; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupData + */ + coordinator: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupData + */ + consumer?: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupData + */ + lag_summary: Relationship; } /** * Check if a given object implements the ConsumerGroupData interface. */ export function instanceOfConsumerGroupData(value: object): value is ConsumerGroupData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; - if (!("is_simple" in value) || value["is_simple"] === undefined) return false; - if (!("partition_assignor" in value) || value["partition_assignor"] === undefined) return false; - if (!("state" in value) || value["state"] === undefined) return false; - if (!("coordinator" in value) || value["coordinator"] === undefined) return false; - if (!("lag_summary" in value) || value["lag_summary"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; + if (!('is_simple' in value) || value['is_simple'] === undefined) return false; + if (!('partition_assignor' in value) || value['partition_assignor'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; + if (!('coordinator' in value) || value['coordinator'] === undefined) return false; + if (!('lag_summary' in value) || value['lag_summary'] === undefined) return false; + return true; } export function ConsumerGroupDataFromJSON(json: any): ConsumerGroupData { - return ConsumerGroupDataFromJSONTyped(json, false); + return ConsumerGroupDataFromJSONTyped(json, false); } -export function ConsumerGroupDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerGroupData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - consumer_group_id: json["consumer_group_id"], - is_simple: json["is_simple"], - partition_assignor: json["partition_assignor"], - state: json["state"], - coordinator: RelationshipFromJSON(json["coordinator"]), - consumer: json["consumer"] == null ? undefined : RelationshipFromJSON(json["consumer"]), - lag_summary: RelationshipFromJSON(json["lag_summary"]), - }; +export function ConsumerGroupDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerGroupData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'consumer_group_id': json['consumer_group_id'], + 'is_simple': json['is_simple'], + 'partition_assignor': json['partition_assignor'], + 'state': json['state'], + 'coordinator': RelationshipFromJSON(json['coordinator']), + 'consumer': json['consumer'] == null ? undefined : RelationshipFromJSON(json['consumer']), + 'lag_summary': RelationshipFromJSON(json['lag_summary']), + }; } export function ConsumerGroupDataToJSON(json: any): ConsumerGroupData { - return ConsumerGroupDataToJSONTyped(json, false); + return ConsumerGroupDataToJSONTyped(json, false); } -export function ConsumerGroupDataToJSONTyped( - value?: ConsumerGroupData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerGroupDataToJSONTyped(value?: ConsumerGroupData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - consumer_group_id: value["consumer_group_id"], - is_simple: value["is_simple"], - partition_assignor: value["partition_assignor"], - state: value["state"], - coordinator: RelationshipToJSON(value["coordinator"]), - consumer: RelationshipToJSON(value["consumer"]), - lag_summary: RelationshipToJSON(value["lag_summary"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'consumer_group_id': value['consumer_group_id'], + 'is_simple': value['is_simple'], + 'partition_assignor': value['partition_assignor'], + 'state': value['state'], + 'coordinator': RelationshipToJSON(value['coordinator']), + 'consumer': RelationshipToJSON(value['consumer']), + 'lag_summary': RelationshipToJSON(value['lag_summary']), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerGroupDataList.ts b/src/clients/kafkaRest/models/ConsumerGroupDataList.ts index bdd274293c..5430310eb0 100644 --- a/src/clients/kafkaRest/models/ConsumerGroupDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerGroupDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ConsumerGroupData } from "./ConsumerGroupData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ConsumerGroupData } from './ConsumerGroupData'; import { - ConsumerGroupDataFromJSON, - ConsumerGroupDataFromJSONTyped, - ConsumerGroupDataToJSON, - ConsumerGroupDataToJSONTyped, -} from "./ConsumerGroupData"; + ConsumerGroupDataFromJSON, + ConsumerGroupDataFromJSONTyped, + ConsumerGroupDataToJSON, + ConsumerGroupDataToJSONTyped, +} from './ConsumerGroupData'; /** - * + * * @export * @interface ConsumerGroupDataList */ export interface ConsumerGroupDataList { - /** - * - * @type {string} - * @memberof ConsumerGroupDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerGroupDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerGroupDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerGroupDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerGroupDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerGroupDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerGroupDataList interface. */ export function instanceOfConsumerGroupDataList(value: object): value is ConsumerGroupDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ConsumerGroupDataListFromJSON(json: any): ConsumerGroupDataList { - return ConsumerGroupDataListFromJSONTyped(json, false); + return ConsumerGroupDataListFromJSONTyped(json, false); } -export function ConsumerGroupDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerGroupDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ConsumerGroupDataFromJSON), - }; +export function ConsumerGroupDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerGroupDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ConsumerGroupDataFromJSON)), + }; } export function ConsumerGroupDataListToJSON(json: any): ConsumerGroupDataList { - return ConsumerGroupDataListToJSONTyped(json, false); + return ConsumerGroupDataListToJSONTyped(json, false); } -export function ConsumerGroupDataListToJSONTyped( - value?: ConsumerGroupDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerGroupDataListToJSONTyped(value?: ConsumerGroupDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ConsumerGroupDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ConsumerGroupDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts b/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts index 6952123f2c..e8e3909d72 100644 --- a/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts +++ b/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts @@ -5,191 +5,184 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ConsumerGroupLagSummaryData */ export interface ConsumerGroupLagSummaryData { - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerGroupLagSummaryData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_instance_id?: string | null; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_client_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_topic_name: string; - /** - * - * @type {number} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_partition_id: number; - /** - * - * @type {number} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag: number; - /** - * - * @type {number} - * @memberof ConsumerGroupLagSummaryData - */ - total_lag: number; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_consumer: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_partition: Relationship; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerGroupLagSummaryData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_instance_id?: string | null; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_client_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_topic_name: string; + /** + * + * @type {number} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_partition_id: number; + /** + * + * @type {number} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag: number; + /** + * + * @type {number} + * @memberof ConsumerGroupLagSummaryData + */ + total_lag: number; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_consumer: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_partition: Relationship; } /** * Check if a given object implements the ConsumerGroupLagSummaryData interface. */ -export function instanceOfConsumerGroupLagSummaryData( - value: object, -): value is ConsumerGroupLagSummaryData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; - if (!("max_lag_consumer_id" in value) || value["max_lag_consumer_id"] === undefined) return false; - if (!("max_lag_client_id" in value) || value["max_lag_client_id"] === undefined) return false; - if (!("max_lag_topic_name" in value) || value["max_lag_topic_name"] === undefined) return false; - if (!("max_lag_partition_id" in value) || value["max_lag_partition_id"] === undefined) - return false; - if (!("max_lag" in value) || value["max_lag"] === undefined) return false; - if (!("total_lag" in value) || value["total_lag"] === undefined) return false; - if (!("max_lag_consumer" in value) || value["max_lag_consumer"] === undefined) return false; - if (!("max_lag_partition" in value) || value["max_lag_partition"] === undefined) return false; - return true; +export function instanceOfConsumerGroupLagSummaryData(value: object): value is ConsumerGroupLagSummaryData { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; + if (!('max_lag_consumer_id' in value) || value['max_lag_consumer_id'] === undefined) return false; + if (!('max_lag_client_id' in value) || value['max_lag_client_id'] === undefined) return false; + if (!('max_lag_topic_name' in value) || value['max_lag_topic_name'] === undefined) return false; + if (!('max_lag_partition_id' in value) || value['max_lag_partition_id'] === undefined) return false; + if (!('max_lag' in value) || value['max_lag'] === undefined) return false; + if (!('total_lag' in value) || value['total_lag'] === undefined) return false; + if (!('max_lag_consumer' in value) || value['max_lag_consumer'] === undefined) return false; + if (!('max_lag_partition' in value) || value['max_lag_partition'] === undefined) return false; + return true; } export function ConsumerGroupLagSummaryDataFromJSON(json: any): ConsumerGroupLagSummaryData { - return ConsumerGroupLagSummaryDataFromJSONTyped(json, false); + return ConsumerGroupLagSummaryDataFromJSONTyped(json, false); } -export function ConsumerGroupLagSummaryDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerGroupLagSummaryData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - consumer_group_id: json["consumer_group_id"], - max_lag_consumer_id: json["max_lag_consumer_id"], - max_lag_instance_id: - json["max_lag_instance_id"] == null ? undefined : json["max_lag_instance_id"], - max_lag_client_id: json["max_lag_client_id"], - max_lag_topic_name: json["max_lag_topic_name"], - max_lag_partition_id: json["max_lag_partition_id"], - max_lag: json["max_lag"], - total_lag: json["total_lag"], - max_lag_consumer: RelationshipFromJSON(json["max_lag_consumer"]), - max_lag_partition: RelationshipFromJSON(json["max_lag_partition"]), - }; +export function ConsumerGroupLagSummaryDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerGroupLagSummaryData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'consumer_group_id': json['consumer_group_id'], + 'max_lag_consumer_id': json['max_lag_consumer_id'], + 'max_lag_instance_id': json['max_lag_instance_id'] == null ? undefined : json['max_lag_instance_id'], + 'max_lag_client_id': json['max_lag_client_id'], + 'max_lag_topic_name': json['max_lag_topic_name'], + 'max_lag_partition_id': json['max_lag_partition_id'], + 'max_lag': json['max_lag'], + 'total_lag': json['total_lag'], + 'max_lag_consumer': RelationshipFromJSON(json['max_lag_consumer']), + 'max_lag_partition': RelationshipFromJSON(json['max_lag_partition']), + }; } export function ConsumerGroupLagSummaryDataToJSON(json: any): ConsumerGroupLagSummaryData { - return ConsumerGroupLagSummaryDataToJSONTyped(json, false); + return ConsumerGroupLagSummaryDataToJSONTyped(json, false); } -export function ConsumerGroupLagSummaryDataToJSONTyped( - value?: ConsumerGroupLagSummaryData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerGroupLagSummaryDataToJSONTyped(value?: ConsumerGroupLagSummaryData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - consumer_group_id: value["consumer_group_id"], - max_lag_consumer_id: value["max_lag_consumer_id"], - max_lag_instance_id: value["max_lag_instance_id"], - max_lag_client_id: value["max_lag_client_id"], - max_lag_topic_name: value["max_lag_topic_name"], - max_lag_partition_id: value["max_lag_partition_id"], - max_lag: value["max_lag"], - total_lag: value["total_lag"], - max_lag_consumer: RelationshipToJSON(value["max_lag_consumer"]), - max_lag_partition: RelationshipToJSON(value["max_lag_partition"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'consumer_group_id': value['consumer_group_id'], + 'max_lag_consumer_id': value['max_lag_consumer_id'], + 'max_lag_instance_id': value['max_lag_instance_id'], + 'max_lag_client_id': value['max_lag_client_id'], + 'max_lag_topic_name': value['max_lag_topic_name'], + 'max_lag_partition_id': value['max_lag_partition_id'], + 'max_lag': value['max_lag'], + 'total_lag': value['total_lag'], + 'max_lag_consumer': RelationshipToJSON(value['max_lag_consumer']), + 'max_lag_partition': RelationshipToJSON(value['max_lag_partition']), + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerLagData.ts b/src/clients/kafkaRest/models/ConsumerLagData.ts index d409a30a3e..01de1b1bd1 100644 --- a/src/clients/kafkaRest/models/ConsumerLagData.ts +++ b/src/clients/kafkaRest/models/ConsumerLagData.ts @@ -5,171 +5,168 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceMetadata } from "./ResourceMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ConsumerLagData */ export interface ConsumerLagData { - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerLagData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - partition_id: number; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - current_offset: number; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - log_end_offset: number; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - lag: number; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - instance_id?: string | null; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - client_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerLagData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + partition_id: number; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + current_offset: number; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + log_end_offset: number; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + lag: number; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + instance_id?: string | null; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + client_id: string; } /** * Check if a given object implements the ConsumerLagData interface. */ export function instanceOfConsumerLagData(value: object): value is ConsumerLagData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("partition_id" in value) || value["partition_id"] === undefined) return false; - if (!("current_offset" in value) || value["current_offset"] === undefined) return false; - if (!("log_end_offset" in value) || value["log_end_offset"] === undefined) return false; - if (!("lag" in value) || value["lag"] === undefined) return false; - if (!("consumer_id" in value) || value["consumer_id"] === undefined) return false; - if (!("client_id" in value) || value["client_id"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('partition_id' in value) || value['partition_id'] === undefined) return false; + if (!('current_offset' in value) || value['current_offset'] === undefined) return false; + if (!('log_end_offset' in value) || value['log_end_offset'] === undefined) return false; + if (!('lag' in value) || value['lag'] === undefined) return false; + if (!('consumer_id' in value) || value['consumer_id'] === undefined) return false; + if (!('client_id' in value) || value['client_id'] === undefined) return false; + return true; } export function ConsumerLagDataFromJSON(json: any): ConsumerLagData { - return ConsumerLagDataFromJSONTyped(json, false); + return ConsumerLagDataFromJSONTyped(json, false); } -export function ConsumerLagDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerLagData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - consumer_group_id: json["consumer_group_id"], - topic_name: json["topic_name"], - partition_id: json["partition_id"], - current_offset: json["current_offset"], - log_end_offset: json["log_end_offset"], - lag: json["lag"], - consumer_id: json["consumer_id"], - instance_id: json["instance_id"] == null ? undefined : json["instance_id"], - client_id: json["client_id"], - }; +export function ConsumerLagDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerLagData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'consumer_group_id': json['consumer_group_id'], + 'topic_name': json['topic_name'], + 'partition_id': json['partition_id'], + 'current_offset': json['current_offset'], + 'log_end_offset': json['log_end_offset'], + 'lag': json['lag'], + 'consumer_id': json['consumer_id'], + 'instance_id': json['instance_id'] == null ? undefined : json['instance_id'], + 'client_id': json['client_id'], + }; } export function ConsumerLagDataToJSON(json: any): ConsumerLagData { - return ConsumerLagDataToJSONTyped(json, false); + return ConsumerLagDataToJSONTyped(json, false); } -export function ConsumerLagDataToJSONTyped( - value?: ConsumerLagData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerLagDataToJSONTyped(value?: ConsumerLagData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - consumer_group_id: value["consumer_group_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - current_offset: value["current_offset"], - log_end_offset: value["log_end_offset"], - lag: value["lag"], - consumer_id: value["consumer_id"], - instance_id: value["instance_id"], - client_id: value["client_id"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'consumer_group_id': value['consumer_group_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'current_offset': value['current_offset'], + 'log_end_offset': value['log_end_offset'], + 'lag': value['lag'], + 'consumer_id': value['consumer_id'], + 'instance_id': value['instance_id'], + 'client_id': value['client_id'], + }; } + diff --git a/src/clients/kafkaRest/models/ConsumerLagDataList.ts b/src/clients/kafkaRest/models/ConsumerLagDataList.ts index 4f4efd7e4e..38f1bffd30 100644 --- a/src/clients/kafkaRest/models/ConsumerLagDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerLagDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ConsumerLagData } from "./ConsumerLagData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ConsumerLagData } from './ConsumerLagData'; import { - ConsumerLagDataFromJSON, - ConsumerLagDataFromJSONTyped, - ConsumerLagDataToJSON, - ConsumerLagDataToJSONTyped, -} from "./ConsumerLagData"; + ConsumerLagDataFromJSON, + ConsumerLagDataFromJSONTyped, + ConsumerLagDataToJSON, + ConsumerLagDataToJSONTyped, +} from './ConsumerLagData'; /** - * + * * @export * @interface ConsumerLagDataList */ export interface ConsumerLagDataList { - /** - * - * @type {string} - * @memberof ConsumerLagDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerLagDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerLagDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerLagDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerLagDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerLagDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerLagDataList interface. */ export function instanceOfConsumerLagDataList(value: object): value is ConsumerLagDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ConsumerLagDataListFromJSON(json: any): ConsumerLagDataList { - return ConsumerLagDataListFromJSONTyped(json, false); + return ConsumerLagDataListFromJSONTyped(json, false); } -export function ConsumerLagDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConsumerLagDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ConsumerLagDataFromJSON), - }; +export function ConsumerLagDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerLagDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ConsumerLagDataFromJSON)), + }; } export function ConsumerLagDataListToJSON(json: any): ConsumerLagDataList { - return ConsumerLagDataListToJSONTyped(json, false); + return ConsumerLagDataListToJSONTyped(json, false); } -export function ConsumerLagDataListToJSONTyped( - value?: ConsumerLagDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConsumerLagDataListToJSONTyped(value?: ConsumerLagDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ConsumerLagDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ConsumerLagDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/CreateAclRequestData.ts b/src/clients/kafkaRest/models/CreateAclRequestData.ts index 53abb1c9a3..c99ec856f5 100644 --- a/src/clients/kafkaRest/models/CreateAclRequestData.ts +++ b/src/clients/kafkaRest/models/CreateAclRequestData.ts @@ -5,127 +5,126 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AclResourceType } from "./AclResourceType"; +import { mapValues } from '../runtime'; +import type { AclResourceType } from './AclResourceType'; import { - AclResourceTypeFromJSON, - AclResourceTypeFromJSONTyped, - AclResourceTypeToJSON, - AclResourceTypeToJSONTyped, -} from "./AclResourceType"; + AclResourceTypeFromJSON, + AclResourceTypeFromJSONTyped, + AclResourceTypeToJSON, + AclResourceTypeToJSONTyped, +} from './AclResourceType'; /** - * + * * @export * @interface CreateAclRequestData */ export interface CreateAclRequestData { - /** - * - * @type {AclResourceType} - * @memberof CreateAclRequestData - */ - resource_type: AclResourceType; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - resource_name: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - pattern_type: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - principal: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - host: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - operation: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - permission: string; + /** + * + * @type {AclResourceType} + * @memberof CreateAclRequestData + */ + resource_type: AclResourceType; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + resource_name: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + pattern_type: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + principal: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + host: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + operation: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + permission: string; } + + /** * Check if a given object implements the CreateAclRequestData interface. */ export function instanceOfCreateAclRequestData(value: object): value is CreateAclRequestData { - if (!("resource_type" in value) || value["resource_type"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - if (!("pattern_type" in value) || value["pattern_type"] === undefined) return false; - if (!("principal" in value) || value["principal"] === undefined) return false; - if (!("host" in value) || value["host"] === undefined) return false; - if (!("operation" in value) || value["operation"] === undefined) return false; - if (!("permission" in value) || value["permission"] === undefined) return false; - return true; + if (!('resource_type' in value) || value['resource_type'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + if (!('pattern_type' in value) || value['pattern_type'] === undefined) return false; + if (!('principal' in value) || value['principal'] === undefined) return false; + if (!('host' in value) || value['host'] === undefined) return false; + if (!('operation' in value) || value['operation'] === undefined) return false; + if (!('permission' in value) || value['permission'] === undefined) return false; + return true; } export function CreateAclRequestDataFromJSON(json: any): CreateAclRequestData { - return CreateAclRequestDataFromJSONTyped(json, false); + return CreateAclRequestDataFromJSONTyped(json, false); } -export function CreateAclRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateAclRequestData { - if (json == null) { - return json; - } - return { - resource_type: AclResourceTypeFromJSON(json["resource_type"]), - resource_name: json["resource_name"], - pattern_type: json["pattern_type"], - principal: json["principal"], - host: json["host"], - operation: json["operation"], - permission: json["permission"], - }; +export function CreateAclRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAclRequestData { + if (json == null) { + return json; + } + return { + + 'resource_type': AclResourceTypeFromJSON(json['resource_type']), + 'resource_name': json['resource_name'], + 'pattern_type': json['pattern_type'], + 'principal': json['principal'], + 'host': json['host'], + 'operation': json['operation'], + 'permission': json['permission'], + }; } export function CreateAclRequestDataToJSON(json: any): CreateAclRequestData { - return CreateAclRequestDataToJSONTyped(json, false); + return CreateAclRequestDataToJSONTyped(json, false); } -export function CreateAclRequestDataToJSONTyped( - value?: CreateAclRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateAclRequestDataToJSONTyped(value?: CreateAclRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - resource_type: AclResourceTypeToJSON(value["resource_type"]), - resource_name: value["resource_name"], - pattern_type: value["pattern_type"], - principal: value["principal"], - host: value["host"], - operation: value["operation"], - permission: value["permission"], - }; + return { + + 'resource_type': AclResourceTypeToJSON(value['resource_type']), + 'resource_name': value['resource_name'], + 'pattern_type': value['pattern_type'], + 'principal': value['principal'], + 'host': value['host'], + 'operation': value['operation'], + 'permission': value['permission'], + }; } + diff --git a/src/clients/kafkaRest/models/CreateAclRequestDataList.ts b/src/clients/kafkaRest/models/CreateAclRequestDataList.ts index 30966580c2..35495824f4 100644 --- a/src/clients/kafkaRest/models/CreateAclRequestDataList.ts +++ b/src/clients/kafkaRest/models/CreateAclRequestDataList.ts @@ -5,75 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CreateAclRequestData } from "./CreateAclRequestData"; +import { mapValues } from '../runtime'; +import type { CreateAclRequestData } from './CreateAclRequestData'; import { - CreateAclRequestDataFromJSON, - CreateAclRequestDataFromJSONTyped, - CreateAclRequestDataToJSON, - CreateAclRequestDataToJSONTyped, -} from "./CreateAclRequestData"; + CreateAclRequestDataFromJSON, + CreateAclRequestDataFromJSONTyped, + CreateAclRequestDataToJSON, + CreateAclRequestDataToJSONTyped, +} from './CreateAclRequestData'; /** - * + * * @export * @interface CreateAclRequestDataList */ export interface CreateAclRequestDataList { - /** - * - * @type {Array} - * @memberof CreateAclRequestDataList - */ - data: Array; + /** + * + * @type {Array} + * @memberof CreateAclRequestDataList + */ + data: Array; } /** * Check if a given object implements the CreateAclRequestDataList interface. */ -export function instanceOfCreateAclRequestDataList( - value: object, -): value is CreateAclRequestDataList { - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfCreateAclRequestDataList(value: object): value is CreateAclRequestDataList { + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function CreateAclRequestDataListFromJSON(json: any): CreateAclRequestDataList { - return CreateAclRequestDataListFromJSONTyped(json, false); + return CreateAclRequestDataListFromJSONTyped(json, false); } -export function CreateAclRequestDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateAclRequestDataList { - if (json == null) { - return json; - } - return { - data: (json["data"] as Array).map(CreateAclRequestDataFromJSON), - }; +export function CreateAclRequestDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAclRequestDataList { + if (json == null) { + return json; + } + return { + + 'data': ((json['data'] as Array).map(CreateAclRequestDataFromJSON)), + }; } export function CreateAclRequestDataListToJSON(json: any): CreateAclRequestDataList { - return CreateAclRequestDataListToJSONTyped(json, false); + return CreateAclRequestDataListToJSONTyped(json, false); } -export function CreateAclRequestDataListToJSONTyped( - value?: CreateAclRequestDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateAclRequestDataListToJSONTyped(value?: CreateAclRequestDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - data: (value["data"] as Array).map(CreateAclRequestDataToJSON), - }; + return { + + 'data': ((value['data'] as Array).map(CreateAclRequestDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/CreateLinkRequestData.ts b/src/clients/kafkaRest/models/CreateLinkRequestData.ts index 3bb0e45a39..6d4e43c7ce 100644 --- a/src/clients/kafkaRest/models/CreateLinkRequestData.ts +++ b/src/clients/kafkaRest/models/CreateLinkRequestData.ts @@ -5,107 +5,101 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigData } from "./ConfigData"; +import { mapValues } from '../runtime'; +import type { ConfigData } from './ConfigData'; import { - ConfigDataFromJSON, - ConfigDataFromJSONTyped, - ConfigDataToJSON, - ConfigDataToJSONTyped, -} from "./ConfigData"; + ConfigDataFromJSON, + ConfigDataFromJSONTyped, + ConfigDataToJSON, + ConfigDataToJSONTyped, +} from './ConfigData'; /** - * + * * @export * @interface CreateLinkRequestData */ export interface CreateLinkRequestData { - /** - * - * @type {string} - * @memberof CreateLinkRequestData - */ - source_cluster_id?: string; - /** - * - * @type {string} - * @memberof CreateLinkRequestData - */ - destination_cluster_id?: string; - /** - * The expected remote cluster ID. - * @type {string} - * @memberof CreateLinkRequestData - */ - remote_cluster_id?: string; - /** - * The expected cluster link ID. Can be provided when creating the second side of a bidirectional link for validating the link ID is as expected. If it's not provided, it's inferred from the remote cluster. - * @type {string} - * @memberof CreateLinkRequestData - */ - cluster_link_id?: string; - /** - * - * @type {Array} - * @memberof CreateLinkRequestData - */ - configs?: Array; + /** + * + * @type {string} + * @memberof CreateLinkRequestData + */ + source_cluster_id?: string; + /** + * + * @type {string} + * @memberof CreateLinkRequestData + */ + destination_cluster_id?: string; + /** + * The expected remote cluster ID. + * @type {string} + * @memberof CreateLinkRequestData + */ + remote_cluster_id?: string; + /** + * The expected cluster link ID. Can be provided when creating the second side of a bidirectional link for validating the link ID is as expected. If it's not provided, it's inferred from the remote cluster. + * @type {string} + * @memberof CreateLinkRequestData + */ + cluster_link_id?: string; + /** + * + * @type {Array} + * @memberof CreateLinkRequestData + */ + configs?: Array; } /** * Check if a given object implements the CreateLinkRequestData interface. */ export function instanceOfCreateLinkRequestData(value: object): value is CreateLinkRequestData { - return true; + return true; } export function CreateLinkRequestDataFromJSON(json: any): CreateLinkRequestData { - return CreateLinkRequestDataFromJSONTyped(json, false); + return CreateLinkRequestDataFromJSONTyped(json, false); } -export function CreateLinkRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateLinkRequestData { - if (json == null) { - return json; - } - return { - source_cluster_id: json["source_cluster_id"] == null ? undefined : json["source_cluster_id"], - destination_cluster_id: - json["destination_cluster_id"] == null ? undefined : json["destination_cluster_id"], - remote_cluster_id: json["remote_cluster_id"] == null ? undefined : json["remote_cluster_id"], - cluster_link_id: json["cluster_link_id"] == null ? undefined : json["cluster_link_id"], - configs: - json["configs"] == null ? undefined : (json["configs"] as Array).map(ConfigDataFromJSON), - }; +export function CreateLinkRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateLinkRequestData { + if (json == null) { + return json; + } + return { + + 'source_cluster_id': json['source_cluster_id'] == null ? undefined : json['source_cluster_id'], + 'destination_cluster_id': json['destination_cluster_id'] == null ? undefined : json['destination_cluster_id'], + 'remote_cluster_id': json['remote_cluster_id'] == null ? undefined : json['remote_cluster_id'], + 'cluster_link_id': json['cluster_link_id'] == null ? undefined : json['cluster_link_id'], + 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(ConfigDataFromJSON)), + }; } export function CreateLinkRequestDataToJSON(json: any): CreateLinkRequestData { - return CreateLinkRequestDataToJSONTyped(json, false); + return CreateLinkRequestDataToJSONTyped(json, false); } -export function CreateLinkRequestDataToJSONTyped( - value?: CreateLinkRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateLinkRequestDataToJSONTyped(value?: CreateLinkRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - source_cluster_id: value["source_cluster_id"], - destination_cluster_id: value["destination_cluster_id"], - remote_cluster_id: value["remote_cluster_id"], - cluster_link_id: value["cluster_link_id"], - configs: - value["configs"] == null ? undefined : (value["configs"] as Array).map(ConfigDataToJSON), - }; + return { + + 'source_cluster_id': value['source_cluster_id'], + 'destination_cluster_id': value['destination_cluster_id'], + 'remote_cluster_id': value['remote_cluster_id'], + 'cluster_link_id': value['cluster_link_id'], + 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(ConfigDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts b/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts index 325032c74b..4880f51bec 100644 --- a/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts +++ b/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts @@ -5,101 +5,94 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigData } from "./ConfigData"; +import { mapValues } from '../runtime'; +import type { ConfigData } from './ConfigData'; import { - ConfigDataFromJSON, - ConfigDataFromJSONTyped, - ConfigDataToJSON, - ConfigDataToJSONTyped, -} from "./ConfigData"; + ConfigDataFromJSON, + ConfigDataFromJSONTyped, + ConfigDataToJSON, + ConfigDataToJSONTyped, +} from './ConfigData'; /** - * + * * @export * @interface CreateMirrorTopicRequestData */ export interface CreateMirrorTopicRequestData { - /** - * - * @type {string} - * @memberof CreateMirrorTopicRequestData - */ - source_topic_name: string; - /** - * - * @type {string} - * @memberof CreateMirrorTopicRequestData - */ - mirror_topic_name?: string; - /** - * - * @type {number} - * @memberof CreateMirrorTopicRequestData - */ - replication_factor?: number; - /** - * - * @type {Array} - * @memberof CreateMirrorTopicRequestData - */ - configs?: Array; + /** + * + * @type {string} + * @memberof CreateMirrorTopicRequestData + */ + source_topic_name: string; + /** + * + * @type {string} + * @memberof CreateMirrorTopicRequestData + */ + mirror_topic_name?: string; + /** + * + * @type {number} + * @memberof CreateMirrorTopicRequestData + */ + replication_factor?: number; + /** + * + * @type {Array} + * @memberof CreateMirrorTopicRequestData + */ + configs?: Array; } /** * Check if a given object implements the CreateMirrorTopicRequestData interface. */ -export function instanceOfCreateMirrorTopicRequestData( - value: object, -): value is CreateMirrorTopicRequestData { - if (!("source_topic_name" in value) || value["source_topic_name"] === undefined) return false; - return true; +export function instanceOfCreateMirrorTopicRequestData(value: object): value is CreateMirrorTopicRequestData { + if (!('source_topic_name' in value) || value['source_topic_name'] === undefined) return false; + return true; } export function CreateMirrorTopicRequestDataFromJSON(json: any): CreateMirrorTopicRequestData { - return CreateMirrorTopicRequestDataFromJSONTyped(json, false); + return CreateMirrorTopicRequestDataFromJSONTyped(json, false); } -export function CreateMirrorTopicRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateMirrorTopicRequestData { - if (json == null) { - return json; - } - return { - source_topic_name: json["source_topic_name"], - mirror_topic_name: json["mirror_topic_name"] == null ? undefined : json["mirror_topic_name"], - replication_factor: json["replication_factor"] == null ? undefined : json["replication_factor"], - configs: - json["configs"] == null ? undefined : (json["configs"] as Array).map(ConfigDataFromJSON), - }; +export function CreateMirrorTopicRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateMirrorTopicRequestData { + if (json == null) { + return json; + } + return { + + 'source_topic_name': json['source_topic_name'], + 'mirror_topic_name': json['mirror_topic_name'] == null ? undefined : json['mirror_topic_name'], + 'replication_factor': json['replication_factor'] == null ? undefined : json['replication_factor'], + 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(ConfigDataFromJSON)), + }; } export function CreateMirrorTopicRequestDataToJSON(json: any): CreateMirrorTopicRequestData { - return CreateMirrorTopicRequestDataToJSONTyped(json, false); + return CreateMirrorTopicRequestDataToJSONTyped(json, false); } -export function CreateMirrorTopicRequestDataToJSONTyped( - value?: CreateMirrorTopicRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateMirrorTopicRequestDataToJSONTyped(value?: CreateMirrorTopicRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - source_topic_name: value["source_topic_name"], - mirror_topic_name: value["mirror_topic_name"], - replication_factor: value["replication_factor"], - configs: - value["configs"] == null ? undefined : (value["configs"] as Array).map(ConfigDataToJSON), - }; + return { + + 'source_topic_name': value['source_topic_name'], + 'mirror_topic_name': value['mirror_topic_name'], + 'replication_factor': value['replication_factor'], + 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(ConfigDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/CreateTopicRequestData.ts b/src/clients/kafkaRest/models/CreateTopicRequestData.ts index 9c222e2509..70d2d28e98 100644 --- a/src/clients/kafkaRest/models/CreateTopicRequestData.ts +++ b/src/clients/kafkaRest/models/CreateTopicRequestData.ts @@ -5,111 +5,102 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CreateTopicRequestDataConfigsInner } from "./CreateTopicRequestDataConfigsInner"; +import { mapValues } from '../runtime'; +import type { CreateTopicRequestDataConfigsInner } from './CreateTopicRequestDataConfigsInner'; import { - CreateTopicRequestDataConfigsInnerFromJSON, - CreateTopicRequestDataConfigsInnerFromJSONTyped, - CreateTopicRequestDataConfigsInnerToJSON, - CreateTopicRequestDataConfigsInnerToJSONTyped, -} from "./CreateTopicRequestDataConfigsInner"; + CreateTopicRequestDataConfigsInnerFromJSON, + CreateTopicRequestDataConfigsInnerFromJSONTyped, + CreateTopicRequestDataConfigsInnerToJSON, + CreateTopicRequestDataConfigsInnerToJSONTyped, +} from './CreateTopicRequestDataConfigsInner'; /** - * + * * @export * @interface CreateTopicRequestData */ export interface CreateTopicRequestData { - /** - * - * @type {string} - * @memberof CreateTopicRequestData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof CreateTopicRequestData - */ - partitions_count?: number; - /** - * - * @type {number} - * @memberof CreateTopicRequestData - */ - replication_factor?: number; - /** - * - * @type {Array} - * @memberof CreateTopicRequestData - */ - configs?: Array; - /** - * - * @type {boolean} - * @memberof CreateTopicRequestData - */ - validate_only?: boolean; + /** + * + * @type {string} + * @memberof CreateTopicRequestData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof CreateTopicRequestData + */ + partitions_count?: number; + /** + * + * @type {number} + * @memberof CreateTopicRequestData + */ + replication_factor?: number; + /** + * + * @type {Array} + * @memberof CreateTopicRequestData + */ + configs?: Array; + /** + * + * @type {boolean} + * @memberof CreateTopicRequestData + */ + validate_only?: boolean; } /** * Check if a given object implements the CreateTopicRequestData interface. */ export function instanceOfCreateTopicRequestData(value: object): value is CreateTopicRequestData { - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - return true; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + return true; } export function CreateTopicRequestDataFromJSON(json: any): CreateTopicRequestData { - return CreateTopicRequestDataFromJSONTyped(json, false); + return CreateTopicRequestDataFromJSONTyped(json, false); } -export function CreateTopicRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateTopicRequestData { - if (json == null) { - return json; - } - return { - topic_name: json["topic_name"], - partitions_count: json["partitions_count"] == null ? undefined : json["partitions_count"], - replication_factor: json["replication_factor"] == null ? undefined : json["replication_factor"], - configs: - json["configs"] == null - ? undefined - : (json["configs"] as Array).map(CreateTopicRequestDataConfigsInnerFromJSON), - validate_only: json["validate_only"] == null ? undefined : json["validate_only"], - }; +export function CreateTopicRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTopicRequestData { + if (json == null) { + return json; + } + return { + + 'topic_name': json['topic_name'], + 'partitions_count': json['partitions_count'] == null ? undefined : json['partitions_count'], + 'replication_factor': json['replication_factor'] == null ? undefined : json['replication_factor'], + 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(CreateTopicRequestDataConfigsInnerFromJSON)), + 'validate_only': json['validate_only'] == null ? undefined : json['validate_only'], + }; } export function CreateTopicRequestDataToJSON(json: any): CreateTopicRequestData { - return CreateTopicRequestDataToJSONTyped(json, false); + return CreateTopicRequestDataToJSONTyped(json, false); } -export function CreateTopicRequestDataToJSONTyped( - value?: CreateTopicRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateTopicRequestDataToJSONTyped(value?: CreateTopicRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - topic_name: value["topic_name"], - partitions_count: value["partitions_count"], - replication_factor: value["replication_factor"], - configs: - value["configs"] == null - ? undefined - : (value["configs"] as Array).map(CreateTopicRequestDataConfigsInnerToJSON), - validate_only: value["validate_only"], - }; + return { + + 'topic_name': value['topic_name'], + 'partitions_count': value['partitions_count'], + 'replication_factor': value['replication_factor'], + 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(CreateTopicRequestDataConfigsInnerToJSON)), + 'validate_only': value['validate_only'], + }; } + diff --git a/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts b/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts index 52b3d961a9..9feb3cbe59 100644 --- a/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts +++ b/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts @@ -5,79 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CreateTopicRequestDataConfigsInner */ export interface CreateTopicRequestDataConfigsInner { - /** - * - * @type {string} - * @memberof CreateTopicRequestDataConfigsInner - */ - name: string; - /** - * - * @type {string} - * @memberof CreateTopicRequestDataConfigsInner - */ - value?: string | null; + /** + * + * @type {string} + * @memberof CreateTopicRequestDataConfigsInner + */ + name: string; + /** + * + * @type {string} + * @memberof CreateTopicRequestDataConfigsInner + */ + value?: string | null; } /** * Check if a given object implements the CreateTopicRequestDataConfigsInner interface. */ -export function instanceOfCreateTopicRequestDataConfigsInner( - value: object, -): value is CreateTopicRequestDataConfigsInner { - if (!("name" in value) || value["name"] === undefined) return false; - return true; +export function instanceOfCreateTopicRequestDataConfigsInner(value: object): value is CreateTopicRequestDataConfigsInner { + if (!('name' in value) || value['name'] === undefined) return false; + return true; } -export function CreateTopicRequestDataConfigsInnerFromJSON( - json: any, -): CreateTopicRequestDataConfigsInner { - return CreateTopicRequestDataConfigsInnerFromJSONTyped(json, false); +export function CreateTopicRequestDataConfigsInnerFromJSON(json: any): CreateTopicRequestDataConfigsInner { + return CreateTopicRequestDataConfigsInnerFromJSONTyped(json, false); } -export function CreateTopicRequestDataConfigsInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateTopicRequestDataConfigsInner { - if (json == null) { - return json; - } - return { - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - }; +export function CreateTopicRequestDataConfigsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTopicRequestDataConfigsInner { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + }; } -export function CreateTopicRequestDataConfigsInnerToJSON( - json: any, -): CreateTopicRequestDataConfigsInner { - return CreateTopicRequestDataConfigsInnerToJSONTyped(json, false); +export function CreateTopicRequestDataConfigsInnerToJSON(json: any): CreateTopicRequestDataConfigsInner { + return CreateTopicRequestDataConfigsInnerToJSONTyped(json, false); } -export function CreateTopicRequestDataConfigsInnerToJSONTyped( - value?: CreateTopicRequestDataConfigsInner | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateTopicRequestDataConfigsInnerToJSONTyped(value?: CreateTopicRequestDataConfigsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - value: value["value"], - }; + return { + + 'name': value['name'], + 'value': value['value'], + }; } + diff --git a/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts b/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts index 35bb9f89b2..6a1ee93010 100644 --- a/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts +++ b/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts @@ -5,75 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AclData } from "./AclData"; +import { mapValues } from '../runtime'; +import type { AclData } from './AclData'; import { - AclDataFromJSON, - AclDataFromJSONTyped, - AclDataToJSON, - AclDataToJSONTyped, -} from "./AclData"; + AclDataFromJSON, + AclDataFromJSONTyped, + AclDataToJSON, + AclDataToJSONTyped, +} from './AclData'; /** - * + * * @export * @interface DeleteKafkaAcls200Response */ export interface DeleteKafkaAcls200Response { - /** - * - * @type {Array} - * @memberof DeleteKafkaAcls200Response - */ - data: Array; + /** + * + * @type {Array} + * @memberof DeleteKafkaAcls200Response + */ + data: Array; } /** * Check if a given object implements the DeleteKafkaAcls200Response interface. */ -export function instanceOfDeleteKafkaAcls200Response( - value: object, -): value is DeleteKafkaAcls200Response { - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfDeleteKafkaAcls200Response(value: object): value is DeleteKafkaAcls200Response { + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function DeleteKafkaAcls200ResponseFromJSON(json: any): DeleteKafkaAcls200Response { - return DeleteKafkaAcls200ResponseFromJSONTyped(json, false); + return DeleteKafkaAcls200ResponseFromJSONTyped(json, false); } -export function DeleteKafkaAcls200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): DeleteKafkaAcls200Response { - if (json == null) { - return json; - } - return { - data: (json["data"] as Array).map(AclDataFromJSON), - }; +export function DeleteKafkaAcls200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteKafkaAcls200Response { + if (json == null) { + return json; + } + return { + + 'data': ((json['data'] as Array).map(AclDataFromJSON)), + }; } export function DeleteKafkaAcls200ResponseToJSON(json: any): DeleteKafkaAcls200Response { - return DeleteKafkaAcls200ResponseToJSONTyped(json, false); + return DeleteKafkaAcls200ResponseToJSONTyped(json, false); } -export function DeleteKafkaAcls200ResponseToJSONTyped( - value?: DeleteKafkaAcls200Response | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DeleteKafkaAcls200ResponseToJSONTyped(value?: DeleteKafkaAcls200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - data: (value["data"] as Array).map(AclDataToJSON), - }; + return { + + 'data': ((value['data'] as Array).map(AclDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/LinkTask.ts b/src/clients/kafkaRest/models/LinkTask.ts index 7a07dd2cac..2879c0e553 100644 --- a/src/clients/kafkaRest/models/LinkTask.ts +++ b/src/clients/kafkaRest/models/LinkTask.ts @@ -5,88 +5,88 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { LinkTaskError } from "./LinkTaskError"; +import { mapValues } from '../runtime'; +import type { LinkTaskError } from './LinkTaskError'; import { - LinkTaskErrorFromJSON, - LinkTaskErrorFromJSONTyped, - LinkTaskErrorToJSON, - LinkTaskErrorToJSONTyped, -} from "./LinkTaskError"; + LinkTaskErrorFromJSON, + LinkTaskErrorFromJSONTyped, + LinkTaskErrorToJSON, + LinkTaskErrorToJSONTyped, +} from './LinkTaskError'; /** - * + * * @export * @interface LinkTask */ export interface LinkTask { - /** - * - * @type {string} - * @memberof LinkTask - */ - task_name: string; - /** - * - * @type {string} - * @memberof LinkTask - */ - state: string; - /** - * - * @type {Array} - * @memberof LinkTask - */ - errors: Array; + /** + * + * @type {string} + * @memberof LinkTask + */ + task_name: string; + /** + * + * @type {string} + * @memberof LinkTask + */ + state: string; + /** + * + * @type {Array} + * @memberof LinkTask + */ + errors: Array; } /** * Check if a given object implements the LinkTask interface. */ export function instanceOfLinkTask(value: object): value is LinkTask { - if (!("task_name" in value) || value["task_name"] === undefined) return false; - if (!("state" in value) || value["state"] === undefined) return false; - if (!("errors" in value) || value["errors"] === undefined) return false; - return true; + if (!('task_name' in value) || value['task_name'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; + if (!('errors' in value) || value['errors'] === undefined) return false; + return true; } export function LinkTaskFromJSON(json: any): LinkTask { - return LinkTaskFromJSONTyped(json, false); + return LinkTaskFromJSONTyped(json, false); } export function LinkTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkTask { - if (json == null) { - return json; - } - return { - task_name: json["task_name"], - state: json["state"], - errors: (json["errors"] as Array).map(LinkTaskErrorFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'task_name': json['task_name'], + 'state': json['state'], + 'errors': ((json['errors'] as Array).map(LinkTaskErrorFromJSON)), + }; } export function LinkTaskToJSON(json: any): LinkTask { - return LinkTaskToJSONTyped(json, false); + return LinkTaskToJSONTyped(json, false); } -export function LinkTaskToJSONTyped( - value?: LinkTask | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function LinkTaskToJSONTyped(value?: LinkTask | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - task_name: value["task_name"], - state: value["state"], - errors: (value["errors"] as Array).map(LinkTaskErrorToJSON), - }; + return { + + 'task_name': value['task_name'], + 'state': value['state'], + 'errors': ((value['errors'] as Array).map(LinkTaskErrorToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/LinkTaskError.ts b/src/clients/kafkaRest/models/LinkTaskError.ts index b45ddce6f3..64756b2c15 100644 --- a/src/clients/kafkaRest/models/LinkTaskError.ts +++ b/src/clients/kafkaRest/models/LinkTaskError.ts @@ -5,71 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface LinkTaskError */ export interface LinkTaskError { - /** - * - * @type {string} - * @memberof LinkTaskError - */ - error_code: string; - /** - * - * @type {string} - * @memberof LinkTaskError - */ - error_message: string; + /** + * + * @type {string} + * @memberof LinkTaskError + */ + error_code: string; + /** + * + * @type {string} + * @memberof LinkTaskError + */ + error_message: string; } /** * Check if a given object implements the LinkTaskError interface. */ export function instanceOfLinkTaskError(value: object): value is LinkTaskError { - if (!("error_code" in value) || value["error_code"] === undefined) return false; - if (!("error_message" in value) || value["error_message"] === undefined) return false; - return true; + if (!('error_code' in value) || value['error_code'] === undefined) return false; + if (!('error_message' in value) || value['error_message'] === undefined) return false; + return true; } export function LinkTaskErrorFromJSON(json: any): LinkTaskError { - return LinkTaskErrorFromJSONTyped(json, false); + return LinkTaskErrorFromJSONTyped(json, false); } export function LinkTaskErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkTaskError { - if (json == null) { - return json; - } - return { - error_code: json["error_code"], - error_message: json["error_message"], - }; + if (json == null) { + return json; + } + return { + + 'error_code': json['error_code'], + 'error_message': json['error_message'], + }; } export function LinkTaskErrorToJSON(json: any): LinkTaskError { - return LinkTaskErrorToJSONTyped(json, false); + return LinkTaskErrorToJSONTyped(json, false); } -export function LinkTaskErrorToJSONTyped( - value?: LinkTaskError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function LinkTaskErrorToJSONTyped(value?: LinkTaskError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - error_code: value["error_code"], - error_message: value["error_message"], - }; + return { + + 'error_code': value['error_code'], + 'error_message': value['error_message'], + }; } + diff --git a/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts b/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts index f58d7b920d..4652834df2 100644 --- a/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts +++ b/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts @@ -5,156 +5,151 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceMetadata } from "./ResourceMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ListLinkConfigsResponseData */ export interface ListLinkConfigsResponseData { - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ListLinkConfigsResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - name: string; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - value: string; - /** - * - * @type {boolean} - * @memberof ListLinkConfigsResponseData - */ - read_only: boolean; - /** - * - * @type {boolean} - * @memberof ListLinkConfigsResponseData - */ - sensitive: boolean; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - source: string; - /** - * - * @type {Array} - * @memberof ListLinkConfigsResponseData - */ - synonyms: Array; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - link_name: string; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ListLinkConfigsResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + name: string; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + value: string; + /** + * + * @type {boolean} + * @memberof ListLinkConfigsResponseData + */ + read_only: boolean; + /** + * + * @type {boolean} + * @memberof ListLinkConfigsResponseData + */ + sensitive: boolean; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + source: string; + /** + * + * @type {Array} + * @memberof ListLinkConfigsResponseData + */ + synonyms: Array; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + link_name: string; } /** * Check if a given object implements the ListLinkConfigsResponseData interface. */ -export function instanceOfListLinkConfigsResponseData( - value: object, -): value is ListLinkConfigsResponseData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("value" in value) || value["value"] === undefined) return false; - if (!("read_only" in value) || value["read_only"] === undefined) return false; - if (!("sensitive" in value) || value["sensitive"] === undefined) return false; - if (!("source" in value) || value["source"] === undefined) return false; - if (!("synonyms" in value) || value["synonyms"] === undefined) return false; - if (!("link_name" in value) || value["link_name"] === undefined) return false; - return true; +export function instanceOfListLinkConfigsResponseData(value: object): value is ListLinkConfigsResponseData { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('value' in value) || value['value'] === undefined) return false; + if (!('read_only' in value) || value['read_only'] === undefined) return false; + if (!('sensitive' in value) || value['sensitive'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('synonyms' in value) || value['synonyms'] === undefined) return false; + if (!('link_name' in value) || value['link_name'] === undefined) return false; + return true; } export function ListLinkConfigsResponseDataFromJSON(json: any): ListLinkConfigsResponseData { - return ListLinkConfigsResponseDataFromJSONTyped(json, false); + return ListLinkConfigsResponseDataFromJSONTyped(json, false); } -export function ListLinkConfigsResponseDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListLinkConfigsResponseData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - name: json["name"], - value: json["value"], - read_only: json["read_only"], - sensitive: json["sensitive"], - source: json["source"], - synonyms: json["synonyms"], - link_name: json["link_name"], - }; +export function ListLinkConfigsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinkConfigsResponseData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'name': json['name'], + 'value': json['value'], + 'read_only': json['read_only'], + 'sensitive': json['sensitive'], + 'source': json['source'], + 'synonyms': json['synonyms'], + 'link_name': json['link_name'], + }; } export function ListLinkConfigsResponseDataToJSON(json: any): ListLinkConfigsResponseData { - return ListLinkConfigsResponseDataToJSONTyped(json, false); + return ListLinkConfigsResponseDataToJSONTyped(json, false); } -export function ListLinkConfigsResponseDataToJSONTyped( - value?: ListLinkConfigsResponseData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListLinkConfigsResponseDataToJSONTyped(value?: ListLinkConfigsResponseData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - name: value["name"], - value: value["value"], - read_only: value["read_only"], - sensitive: value["sensitive"], - source: value["source"], - synonyms: value["synonyms"], - link_name: value["link_name"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'name': value['name'], + 'value': value['value'], + 'read_only': value['read_only'], + 'sensitive': value['sensitive'], + 'source': value['source'], + 'synonyms': value['synonyms'], + 'link_name': value['link_name'], + }; } + diff --git a/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts b/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts index 589ecce8ec..1d85b925f0 100644 --- a/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts +++ b/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts @@ -5,102 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ListLinkConfigsResponseData } from "./ListLinkConfigsResponseData"; +import { mapValues } from '../runtime'; +import type { ListLinkConfigsResponseData } from './ListLinkConfigsResponseData'; import { - ListLinkConfigsResponseDataFromJSON, - ListLinkConfigsResponseDataFromJSONTyped, - ListLinkConfigsResponseDataToJSON, - ListLinkConfigsResponseDataToJSONTyped, -} from "./ListLinkConfigsResponseData"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; + ListLinkConfigsResponseDataFromJSON, + ListLinkConfigsResponseDataFromJSONTyped, + ListLinkConfigsResponseDataToJSON, + ListLinkConfigsResponseDataToJSONTyped, +} from './ListLinkConfigsResponseData'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; /** - * + * * @export * @interface ListLinkConfigsResponseDataList */ export interface ListLinkConfigsResponseDataList { - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ListLinkConfigsResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ListLinkConfigsResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ListLinkConfigsResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ListLinkConfigsResponseDataList + */ + data: Array; } /** * Check if a given object implements the ListLinkConfigsResponseDataList interface. */ -export function instanceOfListLinkConfigsResponseDataList( - value: object, -): value is ListLinkConfigsResponseDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfListLinkConfigsResponseDataList(value: object): value is ListLinkConfigsResponseDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function ListLinkConfigsResponseDataListFromJSON( - json: any, -): ListLinkConfigsResponseDataList { - return ListLinkConfigsResponseDataListFromJSONTyped(json, false); +export function ListLinkConfigsResponseDataListFromJSON(json: any): ListLinkConfigsResponseDataList { + return ListLinkConfigsResponseDataListFromJSONTyped(json, false); } -export function ListLinkConfigsResponseDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListLinkConfigsResponseDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ListLinkConfigsResponseDataFromJSON), - }; +export function ListLinkConfigsResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinkConfigsResponseDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ListLinkConfigsResponseDataFromJSON)), + }; } export function ListLinkConfigsResponseDataListToJSON(json: any): ListLinkConfigsResponseDataList { - return ListLinkConfigsResponseDataListToJSONTyped(json, false); + return ListLinkConfigsResponseDataListToJSONTyped(json, false); } -export function ListLinkConfigsResponseDataListToJSONTyped( - value?: ListLinkConfigsResponseDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListLinkConfigsResponseDataListToJSONTyped(value?: ListLinkConfigsResponseDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ListLinkConfigsResponseDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ListLinkConfigsResponseDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ListLinksResponseData.ts b/src/clients/kafkaRest/models/ListLinksResponseData.ts index 48d4a91b68..51197b5aaf 100644 --- a/src/clients/kafkaRest/models/ListLinksResponseData.ts +++ b/src/clients/kafkaRest/models/ListLinksResponseData.ts @@ -5,182 +5,178 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { LinkTask } from "./LinkTask"; +import { mapValues } from '../runtime'; +import type { LinkTask } from './LinkTask'; import { - LinkTaskFromJSON, - LinkTaskFromJSONTyped, - LinkTaskToJSON, - LinkTaskToJSONTyped, -} from "./LinkTask"; -import type { ResourceMetadata } from "./ResourceMetadata"; + LinkTaskFromJSON, + LinkTaskFromJSONTyped, + LinkTaskToJSON, + LinkTaskToJSONTyped, +} from './LinkTask'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ListLinksResponseData */ export interface ListLinksResponseData { - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ListLinksResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - source_cluster_id?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - destination_cluster_id?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - remote_cluster_id?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_name: string; - /** - * - * @type {string} - * @memberof ListLinksResponseData - * @deprecated - */ - link_id?: string; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - cluster_link_id: string; - /** - * - * @type {Array} - * @memberof ListLinksResponseData - */ - topic_names: Array; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_error?: string; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_error_message?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_state?: string; - /** - * - * @type {Array} - * @memberof ListLinksResponseData - */ - tasks?: Array | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ListLinksResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + source_cluster_id?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + destination_cluster_id?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + remote_cluster_id?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_name: string; + /** + * + * @type {string} + * @memberof ListLinksResponseData + * @deprecated + */ + link_id?: string; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + cluster_link_id: string; + /** + * + * @type {Array} + * @memberof ListLinksResponseData + */ + topic_names: Array; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_error?: string; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_error_message?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_state?: string; + /** + * + * @type {Array} + * @memberof ListLinksResponseData + */ + tasks?: Array | null; } /** * Check if a given object implements the ListLinksResponseData interface. */ export function instanceOfListLinksResponseData(value: object): value is ListLinksResponseData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("link_name" in value) || value["link_name"] === undefined) return false; - if (!("cluster_link_id" in value) || value["cluster_link_id"] === undefined) return false; - if (!("topic_names" in value) || value["topic_names"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('link_name' in value) || value['link_name'] === undefined) return false; + if (!('cluster_link_id' in value) || value['cluster_link_id'] === undefined) return false; + if (!('topic_names' in value) || value['topic_names'] === undefined) return false; + return true; } export function ListLinksResponseDataFromJSON(json: any): ListLinksResponseData { - return ListLinksResponseDataFromJSONTyped(json, false); + return ListLinksResponseDataFromJSONTyped(json, false); } -export function ListLinksResponseDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListLinksResponseData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - source_cluster_id: json["source_cluster_id"] == null ? undefined : json["source_cluster_id"], - destination_cluster_id: - json["destination_cluster_id"] == null ? undefined : json["destination_cluster_id"], - remote_cluster_id: json["remote_cluster_id"] == null ? undefined : json["remote_cluster_id"], - link_name: json["link_name"], - link_id: json["link_id"] == null ? undefined : json["link_id"], - cluster_link_id: json["cluster_link_id"], - topic_names: json["topic_names"], - link_error: json["link_error"] == null ? undefined : json["link_error"], - link_error_message: json["link_error_message"] == null ? undefined : json["link_error_message"], - link_state: json["link_state"] == null ? undefined : json["link_state"], - tasks: json["tasks"] == null ? undefined : (json["tasks"] as Array).map(LinkTaskFromJSON), - }; +export function ListLinksResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinksResponseData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'source_cluster_id': json['source_cluster_id'] == null ? undefined : json['source_cluster_id'], + 'destination_cluster_id': json['destination_cluster_id'] == null ? undefined : json['destination_cluster_id'], + 'remote_cluster_id': json['remote_cluster_id'] == null ? undefined : json['remote_cluster_id'], + 'link_name': json['link_name'], + 'link_id': json['link_id'] == null ? undefined : json['link_id'], + 'cluster_link_id': json['cluster_link_id'], + 'topic_names': json['topic_names'], + 'link_error': json['link_error'] == null ? undefined : json['link_error'], + 'link_error_message': json['link_error_message'] == null ? undefined : json['link_error_message'], + 'link_state': json['link_state'] == null ? undefined : json['link_state'], + 'tasks': json['tasks'] == null ? undefined : ((json['tasks'] as Array).map(LinkTaskFromJSON)), + }; } export function ListLinksResponseDataToJSON(json: any): ListLinksResponseData { - return ListLinksResponseDataToJSONTyped(json, false); + return ListLinksResponseDataToJSONTyped(json, false); } -export function ListLinksResponseDataToJSONTyped( - value?: ListLinksResponseData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListLinksResponseDataToJSONTyped(value?: ListLinksResponseData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - source_cluster_id: value["source_cluster_id"], - destination_cluster_id: value["destination_cluster_id"], - remote_cluster_id: value["remote_cluster_id"], - link_name: value["link_name"], - link_id: value["link_id"], - cluster_link_id: value["cluster_link_id"], - topic_names: value["topic_names"], - link_error: value["link_error"], - link_error_message: value["link_error_message"], - link_state: value["link_state"], - tasks: value["tasks"] == null ? undefined : (value["tasks"] as Array).map(LinkTaskToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'source_cluster_id': value['source_cluster_id'], + 'destination_cluster_id': value['destination_cluster_id'], + 'remote_cluster_id': value['remote_cluster_id'], + 'link_name': value['link_name'], + 'link_id': value['link_id'], + 'cluster_link_id': value['cluster_link_id'], + 'topic_names': value['topic_names'], + 'link_error': value['link_error'], + 'link_error_message': value['link_error_message'], + 'link_state': value['link_state'], + 'tasks': value['tasks'] == null ? undefined : ((value['tasks'] as Array).map(LinkTaskToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ListLinksResponseDataList.ts b/src/clients/kafkaRest/models/ListLinksResponseDataList.ts index d03539e021..4157e6a3c7 100644 --- a/src/clients/kafkaRest/models/ListLinksResponseDataList.ts +++ b/src/clients/kafkaRest/models/ListLinksResponseDataList.ts @@ -5,100 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ListLinksResponseData } from "./ListLinksResponseData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ListLinksResponseData } from './ListLinksResponseData'; import { - ListLinksResponseDataFromJSON, - ListLinksResponseDataFromJSONTyped, - ListLinksResponseDataToJSON, - ListLinksResponseDataToJSONTyped, -} from "./ListLinksResponseData"; + ListLinksResponseDataFromJSON, + ListLinksResponseDataFromJSONTyped, + ListLinksResponseDataToJSON, + ListLinksResponseDataToJSONTyped, +} from './ListLinksResponseData'; /** - * + * * @export * @interface ListLinksResponseDataList */ export interface ListLinksResponseDataList { - /** - * - * @type {string} - * @memberof ListLinksResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ListLinksResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ListLinksResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ListLinksResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ListLinksResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ListLinksResponseDataList + */ + data: Array; } /** * Check if a given object implements the ListLinksResponseDataList interface. */ -export function instanceOfListLinksResponseDataList( - value: object, -): value is ListLinksResponseDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfListLinksResponseDataList(value: object): value is ListLinksResponseDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ListLinksResponseDataListFromJSON(json: any): ListLinksResponseDataList { - return ListLinksResponseDataListFromJSONTyped(json, false); + return ListLinksResponseDataListFromJSONTyped(json, false); } -export function ListLinksResponseDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListLinksResponseDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ListLinksResponseDataFromJSON), - }; +export function ListLinksResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinksResponseDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ListLinksResponseDataFromJSON)), + }; } export function ListLinksResponseDataListToJSON(json: any): ListLinksResponseDataList { - return ListLinksResponseDataListToJSONTyped(json, false); + return ListLinksResponseDataListToJSONTyped(json, false); } -export function ListLinksResponseDataListToJSONTyped( - value?: ListLinksResponseDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListLinksResponseDataListToJSONTyped(value?: ListLinksResponseDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ListLinksResponseDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ListLinksResponseDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts b/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts index 1e0d9cc3fa..636aa69db2 100644 --- a/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts +++ b/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts @@ -5,182 +5,173 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { MirrorLag } from "./MirrorLag"; +import { mapValues } from '../runtime'; +import type { MirrorLag } from './MirrorLag'; import { - MirrorLagFromJSON, - MirrorLagFromJSONTyped, - MirrorLagToJSON, - MirrorLagToJSONTyped, -} from "./MirrorLag"; -import type { MirrorTopicStatus } from "./MirrorTopicStatus"; + MirrorLagFromJSON, + MirrorLagFromJSONTyped, + MirrorLagToJSON, + MirrorLagToJSONTyped, +} from './MirrorLag'; +import type { MirrorTopicStatus } from './MirrorTopicStatus'; import { - MirrorTopicStatusFromJSON, - MirrorTopicStatusFromJSONTyped, - MirrorTopicStatusToJSON, - MirrorTopicStatusToJSONTyped, -} from "./MirrorTopicStatus"; -import type { LinkTaskError } from "./LinkTaskError"; + MirrorTopicStatusFromJSON, + MirrorTopicStatusFromJSONTyped, + MirrorTopicStatusToJSON, + MirrorTopicStatusToJSONTyped, +} from './MirrorTopicStatus'; +import type { LinkTaskError } from './LinkTaskError'; import { - LinkTaskErrorFromJSON, - LinkTaskErrorFromJSONTyped, - LinkTaskErrorToJSON, - LinkTaskErrorToJSONTyped, -} from "./LinkTaskError"; -import type { ResourceMetadata } from "./ResourceMetadata"; + LinkTaskErrorFromJSON, + LinkTaskErrorFromJSONTyped, + LinkTaskErrorToJSON, + LinkTaskErrorToJSONTyped, +} from './LinkTaskError'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ListMirrorTopicsResponseData */ export interface ListMirrorTopicsResponseData { - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ListMirrorTopicsResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - link_name: string; - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - mirror_topic_name: string; - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - source_topic_name: string; - /** - * - * @type {number} - * @memberof ListMirrorTopicsResponseData - */ - num_partitions: number; - /** - * - * @type {Array} - * @memberof ListMirrorTopicsResponseData - */ - mirror_lags: Array; - /** - * - * @type {MirrorTopicStatus} - * @memberof ListMirrorTopicsResponseData - */ - mirror_status: MirrorTopicStatus; - /** - * - * @type {number} - * @memberof ListMirrorTopicsResponseData - */ - state_time_ms: number; - /** - * - * @type {Array} - * @memberof ListMirrorTopicsResponseData - */ - mirror_state_transition_errors?: Array; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ListMirrorTopicsResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + link_name: string; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + mirror_topic_name: string; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + source_topic_name: string; + /** + * + * @type {number} + * @memberof ListMirrorTopicsResponseData + */ + num_partitions: number; + /** + * + * @type {Array} + * @memberof ListMirrorTopicsResponseData + */ + mirror_lags: Array; + /** + * + * @type {MirrorTopicStatus} + * @memberof ListMirrorTopicsResponseData + */ + mirror_status: MirrorTopicStatus; + /** + * + * @type {number} + * @memberof ListMirrorTopicsResponseData + */ + state_time_ms: number; + /** + * + * @type {Array} + * @memberof ListMirrorTopicsResponseData + */ + mirror_state_transition_errors?: Array; } + + /** * Check if a given object implements the ListMirrorTopicsResponseData interface. */ -export function instanceOfListMirrorTopicsResponseData( - value: object, -): value is ListMirrorTopicsResponseData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("link_name" in value) || value["link_name"] === undefined) return false; - if (!("mirror_topic_name" in value) || value["mirror_topic_name"] === undefined) return false; - if (!("source_topic_name" in value) || value["source_topic_name"] === undefined) return false; - if (!("num_partitions" in value) || value["num_partitions"] === undefined) return false; - if (!("mirror_lags" in value) || value["mirror_lags"] === undefined) return false; - if (!("mirror_status" in value) || value["mirror_status"] === undefined) return false; - if (!("state_time_ms" in value) || value["state_time_ms"] === undefined) return false; - return true; +export function instanceOfListMirrorTopicsResponseData(value: object): value is ListMirrorTopicsResponseData { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('link_name' in value) || value['link_name'] === undefined) return false; + if (!('mirror_topic_name' in value) || value['mirror_topic_name'] === undefined) return false; + if (!('source_topic_name' in value) || value['source_topic_name'] === undefined) return false; + if (!('num_partitions' in value) || value['num_partitions'] === undefined) return false; + if (!('mirror_lags' in value) || value['mirror_lags'] === undefined) return false; + if (!('mirror_status' in value) || value['mirror_status'] === undefined) return false; + if (!('state_time_ms' in value) || value['state_time_ms'] === undefined) return false; + return true; } export function ListMirrorTopicsResponseDataFromJSON(json: any): ListMirrorTopicsResponseData { - return ListMirrorTopicsResponseDataFromJSONTyped(json, false); + return ListMirrorTopicsResponseDataFromJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListMirrorTopicsResponseData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - link_name: json["link_name"], - mirror_topic_name: json["mirror_topic_name"], - source_topic_name: json["source_topic_name"], - num_partitions: json["num_partitions"], - mirror_lags: (json["mirror_lags"] as Array).map(MirrorLagFromJSON), - mirror_status: MirrorTopicStatusFromJSON(json["mirror_status"]), - state_time_ms: json["state_time_ms"], - mirror_state_transition_errors: - json["mirror_state_transition_errors"] == null - ? undefined - : (json["mirror_state_transition_errors"] as Array).map(LinkTaskErrorFromJSON), - }; +export function ListMirrorTopicsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMirrorTopicsResponseData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'link_name': json['link_name'], + 'mirror_topic_name': json['mirror_topic_name'], + 'source_topic_name': json['source_topic_name'], + 'num_partitions': json['num_partitions'], + 'mirror_lags': ((json['mirror_lags'] as Array).map(MirrorLagFromJSON)), + 'mirror_status': MirrorTopicStatusFromJSON(json['mirror_status']), + 'state_time_ms': json['state_time_ms'], + 'mirror_state_transition_errors': json['mirror_state_transition_errors'] == null ? undefined : ((json['mirror_state_transition_errors'] as Array).map(LinkTaskErrorFromJSON)), + }; } export function ListMirrorTopicsResponseDataToJSON(json: any): ListMirrorTopicsResponseData { - return ListMirrorTopicsResponseDataToJSONTyped(json, false); + return ListMirrorTopicsResponseDataToJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataToJSONTyped( - value?: ListMirrorTopicsResponseData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMirrorTopicsResponseDataToJSONTyped(value?: ListMirrorTopicsResponseData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - link_name: value["link_name"], - mirror_topic_name: value["mirror_topic_name"], - source_topic_name: value["source_topic_name"], - num_partitions: value["num_partitions"], - mirror_lags: (value["mirror_lags"] as Array).map(MirrorLagToJSON), - mirror_status: MirrorTopicStatusToJSON(value["mirror_status"]), - state_time_ms: value["state_time_ms"], - mirror_state_transition_errors: - value["mirror_state_transition_errors"] == null - ? undefined - : (value["mirror_state_transition_errors"] as Array).map(LinkTaskErrorToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'link_name': value['link_name'], + 'mirror_topic_name': value['mirror_topic_name'], + 'source_topic_name': value['source_topic_name'], + 'num_partitions': value['num_partitions'], + 'mirror_lags': ((value['mirror_lags'] as Array).map(MirrorLagToJSON)), + 'mirror_status': MirrorTopicStatusToJSON(value['mirror_status']), + 'state_time_ms': value['state_time_ms'], + 'mirror_state_transition_errors': value['mirror_state_transition_errors'] == null ? undefined : ((value['mirror_state_transition_errors'] as Array).map(LinkTaskErrorToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts b/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts index a11d8cfa5a..315ea8f6ee 100644 --- a/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts +++ b/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts @@ -5,104 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ListMirrorTopicsResponseData } from "./ListMirrorTopicsResponseData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ListMirrorTopicsResponseData } from './ListMirrorTopicsResponseData'; import { - ListMirrorTopicsResponseDataFromJSON, - ListMirrorTopicsResponseDataFromJSONTyped, - ListMirrorTopicsResponseDataToJSON, - ListMirrorTopicsResponseDataToJSONTyped, -} from "./ListMirrorTopicsResponseData"; + ListMirrorTopicsResponseDataFromJSON, + ListMirrorTopicsResponseDataFromJSONTyped, + ListMirrorTopicsResponseDataToJSON, + ListMirrorTopicsResponseDataToJSONTyped, +} from './ListMirrorTopicsResponseData'; /** - * + * * @export * @interface ListMirrorTopicsResponseDataList */ export interface ListMirrorTopicsResponseDataList { - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ListMirrorTopicsResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ListMirrorTopicsResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ListMirrorTopicsResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ListMirrorTopicsResponseDataList + */ + data: Array; } /** * Check if a given object implements the ListMirrorTopicsResponseDataList interface. */ -export function instanceOfListMirrorTopicsResponseDataList( - value: object, -): value is ListMirrorTopicsResponseDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfListMirrorTopicsResponseDataList(value: object): value is ListMirrorTopicsResponseDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function ListMirrorTopicsResponseDataListFromJSON( - json: any, -): ListMirrorTopicsResponseDataList { - return ListMirrorTopicsResponseDataListFromJSONTyped(json, false); +export function ListMirrorTopicsResponseDataListFromJSON(json: any): ListMirrorTopicsResponseDataList { + return ListMirrorTopicsResponseDataListFromJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ListMirrorTopicsResponseDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ListMirrorTopicsResponseDataFromJSON), - }; +export function ListMirrorTopicsResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMirrorTopicsResponseDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ListMirrorTopicsResponseDataFromJSON)), + }; } -export function ListMirrorTopicsResponseDataListToJSON( - json: any, -): ListMirrorTopicsResponseDataList { - return ListMirrorTopicsResponseDataListToJSONTyped(json, false); +export function ListMirrorTopicsResponseDataListToJSON(json: any): ListMirrorTopicsResponseDataList { + return ListMirrorTopicsResponseDataListToJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataListToJSONTyped( - value?: ListMirrorTopicsResponseDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMirrorTopicsResponseDataListToJSONTyped(value?: ListMirrorTopicsResponseDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ListMirrorTopicsResponseDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ListMirrorTopicsResponseDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/MirrorLag.ts b/src/clients/kafkaRest/models/MirrorLag.ts index 9f5b9574c7..36db0cf649 100644 --- a/src/clients/kafkaRest/models/MirrorLag.ts +++ b/src/clients/kafkaRest/models/MirrorLag.ts @@ -5,81 +5,80 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface MirrorLag */ export interface MirrorLag { - /** - * - * @type {number} - * @memberof MirrorLag - */ - partition: number; - /** - * - * @type {number} - * @memberof MirrorLag - */ - lag: number; - /** - * - * @type {number} - * @memberof MirrorLag - */ - last_source_fetch_offset: number; + /** + * + * @type {number} + * @memberof MirrorLag + */ + partition: number; + /** + * + * @type {number} + * @memberof MirrorLag + */ + lag: number; + /** + * + * @type {number} + * @memberof MirrorLag + */ + last_source_fetch_offset: number; } /** * Check if a given object implements the MirrorLag interface. */ export function instanceOfMirrorLag(value: object): value is MirrorLag { - if (!("partition" in value) || value["partition"] === undefined) return false; - if (!("lag" in value) || value["lag"] === undefined) return false; - if (!("last_source_fetch_offset" in value) || value["last_source_fetch_offset"] === undefined) - return false; - return true; + if (!('partition' in value) || value['partition'] === undefined) return false; + if (!('lag' in value) || value['lag'] === undefined) return false; + if (!('last_source_fetch_offset' in value) || value['last_source_fetch_offset'] === undefined) return false; + return true; } export function MirrorLagFromJSON(json: any): MirrorLag { - return MirrorLagFromJSONTyped(json, false); + return MirrorLagFromJSONTyped(json, false); } export function MirrorLagFromJSONTyped(json: any, ignoreDiscriminator: boolean): MirrorLag { - if (json == null) { - return json; - } - return { - partition: json["partition"], - lag: json["lag"], - last_source_fetch_offset: json["last_source_fetch_offset"], - }; + if (json == null) { + return json; + } + return { + + 'partition': json['partition'], + 'lag': json['lag'], + 'last_source_fetch_offset': json['last_source_fetch_offset'], + }; } export function MirrorLagToJSON(json: any): MirrorLag { - return MirrorLagToJSONTyped(json, false); + return MirrorLagToJSONTyped(json, false); } -export function MirrorLagToJSONTyped( - value?: MirrorLag | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MirrorLagToJSONTyped(value?: MirrorLag | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partition: value["partition"], - lag: value["lag"], - last_source_fetch_offset: value["last_source_fetch_offset"], - }; + return { + + 'partition': value['partition'], + 'lag': value['lag'], + 'last_source_fetch_offset': value['last_source_fetch_offset'], + }; } + diff --git a/src/clients/kafkaRest/models/MirrorTopicStatus.ts b/src/clients/kafkaRest/models/MirrorTopicStatus.ts index 05d3be4f2e..208818ce59 100644 --- a/src/clients/kafkaRest/models/MirrorTopicStatus.ts +++ b/src/clients/kafkaRest/models/MirrorTopicStatus.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,52 +13,48 @@ */ /** - * + * * @export * @enum {string} */ export enum MirrorTopicStatus { - Active = "ACTIVE", - Failed = "FAILED", - LinkFailed = "LINK_FAILED", - LinkPaused = "LINK_PAUSED", - Paused = "PAUSED", - PendingStopped = "PENDING_STOPPED", - SourceUnavailable = "SOURCE_UNAVAILABLE", - Stopped = "STOPPED", - PendingMirror = "PENDING_MIRROR", - PendingSynchronize = "PENDING_SYNCHRONIZE", + Active = 'ACTIVE', + Failed = 'FAILED', + LinkFailed = 'LINK_FAILED', + LinkPaused = 'LINK_PAUSED', + Paused = 'PAUSED', + PendingStopped = 'PENDING_STOPPED', + SourceUnavailable = 'SOURCE_UNAVAILABLE', + Stopped = 'STOPPED', + PendingMirror = 'PENDING_MIRROR', + PendingSynchronize = 'PENDING_SYNCHRONIZE' } + export function instanceOfMirrorTopicStatus(value: any): boolean { - for (const key in MirrorTopicStatus) { - if (Object.prototype.hasOwnProperty.call(MirrorTopicStatus, key)) { - if (MirrorTopicStatus[key as keyof typeof MirrorTopicStatus] === value) { - return true; - } + for (const key in MirrorTopicStatus) { + if (Object.prototype.hasOwnProperty.call(MirrorTopicStatus, key)) { + if (MirrorTopicStatus[key as keyof typeof MirrorTopicStatus] === value) { + return true; + } + } } - } - return false; + return false; } export function MirrorTopicStatusFromJSON(json: any): MirrorTopicStatus { - return MirrorTopicStatusFromJSONTyped(json, false); + return MirrorTopicStatusFromJSONTyped(json, false); } -export function MirrorTopicStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): MirrorTopicStatus { - return json as MirrorTopicStatus; +export function MirrorTopicStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): MirrorTopicStatus { + return json as MirrorTopicStatus; } export function MirrorTopicStatusToJSON(value?: MirrorTopicStatus | null): any { - return value as any; + return value as any; } -export function MirrorTopicStatusToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): MirrorTopicStatus { - return value as MirrorTopicStatus; +export function MirrorTopicStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): MirrorTopicStatus { + return value as MirrorTopicStatus; } + diff --git a/src/clients/kafkaRest/models/ModelError.ts b/src/clients/kafkaRest/models/ModelError.ts index cd81269b36..896a62946b 100644 --- a/src/clients/kafkaRest/models/ModelError.ts +++ b/src/clients/kafkaRest/models/ModelError.ts @@ -5,71 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ModelError */ export interface ModelError { - /** - * - * @type {number} - * @memberof ModelError - */ - error_code: number; - /** - * - * @type {string} - * @memberof ModelError - */ - message: string | null; + /** + * + * @type {number} + * @memberof ModelError + */ + error_code: number; + /** + * + * @type {string} + * @memberof ModelError + */ + message: string | null; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - if (!("error_code" in value) || value["error_code"] === undefined) return false; - if (!("message" in value) || value["message"] === undefined) return false; - return true; + if (!('error_code' in value) || value['error_code'] === undefined) return false; + if (!('message' in value) || value['message'] === undefined) return false; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - error_code: json["error_code"], - message: json["message"], - }; + if (json == null) { + return json; + } + return { + + 'error_code': json['error_code'], + 'message': json['message'], + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped( - value?: ModelError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - error_code: value["error_code"], - message: value["message"], - }; + return { + + 'error_code': value['error_code'], + 'message': value['message'], + }; } + diff --git a/src/clients/kafkaRest/models/PartitionData.ts b/src/clients/kafkaRest/models/PartitionData.ts index 27ec738a7a..144869b501 100644 --- a/src/clients/kafkaRest/models/PartitionData.ts +++ b/src/clients/kafkaRest/models/PartitionData.ts @@ -5,139 +5,139 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface PartitionData */ export interface PartitionData { - /** - * - * @type {string} - * @memberof PartitionData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof PartitionData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof PartitionData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof PartitionData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof PartitionData - */ - partition_id: number; - /** - * - * @type {Relationship} - * @memberof PartitionData - */ - leader?: Relationship; - /** - * - * @type {Relationship} - * @memberof PartitionData - */ - replicas: Relationship; - /** - * - * @type {Relationship} - * @memberof PartitionData - */ - reassignment: Relationship; + /** + * + * @type {string} + * @memberof PartitionData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof PartitionData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof PartitionData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof PartitionData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof PartitionData + */ + partition_id: number; + /** + * + * @type {Relationship} + * @memberof PartitionData + */ + leader?: Relationship; + /** + * + * @type {Relationship} + * @memberof PartitionData + */ + replicas: Relationship; + /** + * + * @type {Relationship} + * @memberof PartitionData + */ + reassignment: Relationship; } /** * Check if a given object implements the PartitionData interface. */ export function instanceOfPartitionData(value: object): value is PartitionData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("partition_id" in value) || value["partition_id"] === undefined) return false; - if (!("replicas" in value) || value["replicas"] === undefined) return false; - if (!("reassignment" in value) || value["reassignment"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('partition_id' in value) || value['partition_id'] === undefined) return false; + if (!('replicas' in value) || value['replicas'] === undefined) return false; + if (!('reassignment' in value) || value['reassignment'] === undefined) return false; + return true; } export function PartitionDataFromJSON(json: any): PartitionData { - return PartitionDataFromJSONTyped(json, false); + return PartitionDataFromJSONTyped(json, false); } export function PartitionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - topic_name: json["topic_name"], - partition_id: json["partition_id"], - leader: json["leader"] == null ? undefined : RelationshipFromJSON(json["leader"]), - replicas: RelationshipFromJSON(json["replicas"]), - reassignment: RelationshipFromJSON(json["reassignment"]), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'topic_name': json['topic_name'], + 'partition_id': json['partition_id'], + 'leader': json['leader'] == null ? undefined : RelationshipFromJSON(json['leader']), + 'replicas': RelationshipFromJSON(json['replicas']), + 'reassignment': RelationshipFromJSON(json['reassignment']), + }; } export function PartitionDataToJSON(json: any): PartitionData { - return PartitionDataToJSONTyped(json, false); + return PartitionDataToJSONTyped(json, false); } -export function PartitionDataToJSONTyped( - value?: PartitionData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PartitionDataToJSONTyped(value?: PartitionData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - leader: RelationshipToJSON(value["leader"]), - replicas: RelationshipToJSON(value["replicas"]), - reassignment: RelationshipToJSON(value["reassignment"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'leader': RelationshipToJSON(value['leader']), + 'replicas': RelationshipToJSON(value['replicas']), + 'reassignment': RelationshipToJSON(value['reassignment']), + }; } + diff --git a/src/clients/kafkaRest/models/PartitionDataList.ts b/src/clients/kafkaRest/models/PartitionDataList.ts index 3100b1deb2..cab6a045c1 100644 --- a/src/clients/kafkaRest/models/PartitionDataList.ts +++ b/src/clients/kafkaRest/models/PartitionDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { PartitionData } from "./PartitionData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { PartitionData } from './PartitionData'; import { - PartitionDataFromJSON, - PartitionDataFromJSONTyped, - PartitionDataToJSON, - PartitionDataToJSONTyped, -} from "./PartitionData"; + PartitionDataFromJSON, + PartitionDataFromJSONTyped, + PartitionDataToJSON, + PartitionDataToJSONTyped, +} from './PartitionData'; /** - * + * * @export * @interface PartitionDataList */ export interface PartitionDataList { - /** - * - * @type {string} - * @memberof PartitionDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof PartitionDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof PartitionDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof PartitionDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof PartitionDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof PartitionDataList + */ + data: Array; } /** * Check if a given object implements the PartitionDataList interface. */ export function instanceOfPartitionDataList(value: object): value is PartitionDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function PartitionDataListFromJSON(json: any): PartitionDataList { - return PartitionDataListFromJSONTyped(json, false); + return PartitionDataListFromJSONTyped(json, false); } -export function PartitionDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PartitionDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(PartitionDataFromJSON), - }; +export function PartitionDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(PartitionDataFromJSON)), + }; } export function PartitionDataListToJSON(json: any): PartitionDataList { - return PartitionDataListToJSONTyped(json, false); + return PartitionDataListToJSONTyped(json, false); } -export function PartitionDataListToJSONTyped( - value?: PartitionDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PartitionDataListToJSONTyped(value?: PartitionDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(PartitionDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(PartitionDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ProduceRequest.ts b/src/clients/kafkaRest/models/ProduceRequest.ts index 0d0d3095ec..e6624f5537 100644 --- a/src/clients/kafkaRest/models/ProduceRequest.ts +++ b/src/clients/kafkaRest/models/ProduceRequest.ts @@ -5,117 +5,108 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ProduceRequestHeader } from "./ProduceRequestHeader"; +import { mapValues } from '../runtime'; +import type { ProduceRequestHeader } from './ProduceRequestHeader'; import { - ProduceRequestHeaderFromJSON, - ProduceRequestHeaderFromJSONTyped, - ProduceRequestHeaderToJSON, - ProduceRequestHeaderToJSONTyped, -} from "./ProduceRequestHeader"; -import type { ProduceRequestData } from "./ProduceRequestData"; + ProduceRequestHeaderFromJSON, + ProduceRequestHeaderFromJSONTyped, + ProduceRequestHeaderToJSON, + ProduceRequestHeaderToJSONTyped, +} from './ProduceRequestHeader'; +import type { ProduceRequestData } from './ProduceRequestData'; import { - ProduceRequestDataFromJSON, - ProduceRequestDataFromJSONTyped, - ProduceRequestDataToJSON, - ProduceRequestDataToJSONTyped, -} from "./ProduceRequestData"; + ProduceRequestDataFromJSON, + ProduceRequestDataFromJSONTyped, + ProduceRequestDataToJSON, + ProduceRequestDataToJSONTyped, +} from './ProduceRequestData'; /** - * + * * @export * @interface ProduceRequest */ export interface ProduceRequest { - /** - * - * @type {number} - * @memberof ProduceRequest - */ - partition_id?: number | null; - /** - * - * @type {Array} - * @memberof ProduceRequest - */ - headers?: Array; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - key?: ProduceRequestData | null; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - value?: ProduceRequestData | null; - /** - * - * @type {Date} - * @memberof ProduceRequest - */ - timestamp?: Date | null; + /** + * + * @type {number} + * @memberof ProduceRequest + */ + partition_id?: number | null; + /** + * + * @type {Array} + * @memberof ProduceRequest + */ + headers?: Array; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + key?: ProduceRequestData | null; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + value?: ProduceRequestData | null; + /** + * + * @type {Date} + * @memberof ProduceRequest + */ + timestamp?: Date | null; } /** * Check if a given object implements the ProduceRequest interface. */ export function instanceOfProduceRequest(value: object): value is ProduceRequest { - return true; + return true; } export function ProduceRequestFromJSON(json: any): ProduceRequest { - return ProduceRequestFromJSONTyped(json, false); + return ProduceRequestFromJSONTyped(json, false); } -export function ProduceRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceRequest { - if (json == null) { - return json; - } - return { - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - headers: - json["headers"] == null - ? undefined - : (json["headers"] as Array).map(ProduceRequestHeaderFromJSON), - key: json["key"] == null ? undefined : ProduceRequestDataFromJSON(json["key"]), - value: json["value"] == null ? undefined : ProduceRequestDataFromJSON(json["value"]), - timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), - }; +export function ProduceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequest { + if (json == null) { + return json; + } + return { + + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'headers': json['headers'] == null ? undefined : ((json['headers'] as Array).map(ProduceRequestHeaderFromJSON)), + 'key': json['key'] == null ? undefined : ProduceRequestDataFromJSON(json['key']), + 'value': json['value'] == null ? undefined : ProduceRequestDataFromJSON(json['value']), + 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), + }; } export function ProduceRequestToJSON(json: any): ProduceRequest { - return ProduceRequestToJSONTyped(json, false); + return ProduceRequestToJSONTyped(json, false); } -export function ProduceRequestToJSONTyped( - value?: ProduceRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceRequestToJSONTyped(value?: ProduceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partition_id: value["partition_id"], - headers: - value["headers"] == null - ? undefined - : (value["headers"] as Array).map(ProduceRequestHeaderToJSON), - key: ProduceRequestDataToJSON(value["key"]), - value: ProduceRequestDataToJSON(value["value"]), - timestamp: value["timestamp"] == null ? undefined : (value["timestamp"] as any).toISOString(), - }; + return { + + 'partition_id': value['partition_id'], + 'headers': value['headers'] == null ? undefined : ((value['headers'] as Array).map(ProduceRequestHeaderToJSON)), + 'key': ProduceRequestDataToJSON(value['key']), + 'value': ProduceRequestDataToJSON(value['value']), + 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp'] as any).toISOString()), + }; } + diff --git a/src/clients/kafkaRest/models/ProduceRequestData.ts b/src/clients/kafkaRest/models/ProduceRequestData.ts index 66d674c39c..1a71365054 100644 --- a/src/clients/kafkaRest/models/ProduceRequestData.ts +++ b/src/clients/kafkaRest/models/ProduceRequestData.ts @@ -5,97 +5,93 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProduceRequestData */ export interface ProduceRequestData { - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - type?: string; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject?: string | null; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject_name_strategy?: string | null; - /** - * - * @type {number} - * @memberof ProduceRequestData - */ - schema_version?: number | null; - /** - * - * @type {any} - * @memberof ProduceRequestData - */ - data?: any | null; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + type?: string; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject?: string | null; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject_name_strategy?: string | null; + /** + * + * @type {number} + * @memberof ProduceRequestData + */ + schema_version?: number | null; + /** + * + * @type {any} + * @memberof ProduceRequestData + */ + data?: any | null; } /** * Check if a given object implements the ProduceRequestData interface. */ export function instanceOfProduceRequestData(value: object): value is ProduceRequestData { - return true; + return true; } export function ProduceRequestDataFromJSON(json: any): ProduceRequestData { - return ProduceRequestDataFromJSONTyped(json, false); + return ProduceRequestDataFromJSONTyped(json, false); } -export function ProduceRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceRequestData { - if (json == null) { - return json; - } - return { - type: json["type"] == null ? undefined : json["type"], - subject: json["subject"] == null ? undefined : json["subject"], - subject_name_strategy: - json["subject_name_strategy"] == null ? undefined : json["subject_name_strategy"], - schema_version: json["schema_version"] == null ? undefined : json["schema_version"], - data: json["data"] == null ? undefined : json["data"], - }; +export function ProduceRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestData { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'subject_name_strategy': json['subject_name_strategy'] == null ? undefined : json['subject_name_strategy'], + 'schema_version': json['schema_version'] == null ? undefined : json['schema_version'], + 'data': json['data'] == null ? undefined : json['data'], + }; } export function ProduceRequestDataToJSON(json: any): ProduceRequestData { - return ProduceRequestDataToJSONTyped(json, false); + return ProduceRequestDataToJSONTyped(json, false); } -export function ProduceRequestDataToJSONTyped( - value?: ProduceRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceRequestDataToJSONTyped(value?: ProduceRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - type: value["type"], - subject: value["subject"], - subject_name_strategy: value["subject_name_strategy"], - schema_version: value["schema_version"], - data: value["data"], - }; + return { + + 'type': value['type'], + 'subject': value['subject'], + 'subject_name_strategy': value['subject_name_strategy'], + 'schema_version': value['schema_version'], + 'data': value['data'], + }; } + diff --git a/src/clients/kafkaRest/models/ProduceRequestHeader.ts b/src/clients/kafkaRest/models/ProduceRequestHeader.ts index 6fe917915b..af27b1353d 100644 --- a/src/clients/kafkaRest/models/ProduceRequestHeader.ts +++ b/src/clients/kafkaRest/models/ProduceRequestHeader.ts @@ -5,73 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProduceRequestHeader */ export interface ProduceRequestHeader { - /** - * - * @type {string} - * @memberof ProduceRequestHeader - */ - name: string; - /** - * - * @type {string} - * @memberof ProduceRequestHeader - */ - value?: string | null; + /** + * + * @type {string} + * @memberof ProduceRequestHeader + */ + name: string; + /** + * + * @type {string} + * @memberof ProduceRequestHeader + */ + value?: string | null; } /** * Check if a given object implements the ProduceRequestHeader interface. */ export function instanceOfProduceRequestHeader(value: object): value is ProduceRequestHeader { - if (!("name" in value) || value["name"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + return true; } export function ProduceRequestHeaderFromJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderFromJSONTyped(json, false); + return ProduceRequestHeaderFromJSONTyped(json, false); } -export function ProduceRequestHeaderFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceRequestHeader { - if (json == null) { - return json; - } - return { - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - }; +export function ProduceRequestHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestHeader { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + }; } export function ProduceRequestHeaderToJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderToJSONTyped(json, false); + return ProduceRequestHeaderToJSONTyped(json, false); } -export function ProduceRequestHeaderToJSONTyped( - value?: ProduceRequestHeader | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceRequestHeaderToJSONTyped(value?: ProduceRequestHeader | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - value: value["value"], - }; + return { + + 'name': value['name'], + 'value': value['value'], + }; } + diff --git a/src/clients/kafkaRest/models/ProduceResponse.ts b/src/clients/kafkaRest/models/ProduceResponse.ts index f19b561258..e2bb21cd78 100644 --- a/src/clients/kafkaRest/models/ProduceResponse.ts +++ b/src/clients/kafkaRest/models/ProduceResponse.ts @@ -5,137 +5,134 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ProduceResponseData } from "./ProduceResponseData"; +import { mapValues } from '../runtime'; +import type { ProduceResponseData } from './ProduceResponseData'; import { - ProduceResponseDataFromJSON, - ProduceResponseDataFromJSONTyped, - ProduceResponseDataToJSON, - ProduceResponseDataToJSONTyped, -} from "./ProduceResponseData"; + ProduceResponseDataFromJSON, + ProduceResponseDataFromJSONTyped, + ProduceResponseDataToJSON, + ProduceResponseDataToJSONTyped, +} from './ProduceResponseData'; /** - * + * * @export * @interface ProduceResponse */ export interface ProduceResponse { - /** - * - * @type {number} - * @memberof ProduceResponse - */ - error_code: number; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - message?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - cluster_id?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - topic_name?: string; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - offset?: number; - /** - * - * @type {Date} - * @memberof ProduceResponse - */ - timestamp?: Date | null; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - key?: ProduceResponseData | null; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - value?: ProduceResponseData | null; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + error_code: number; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + cluster_id?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + topic_name?: string; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + offset?: number; + /** + * + * @type {Date} + * @memberof ProduceResponse + */ + timestamp?: Date | null; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + key?: ProduceResponseData | null; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + value?: ProduceResponseData | null; } /** * Check if a given object implements the ProduceResponse interface. */ export function instanceOfProduceResponse(value: object): value is ProduceResponse { - if (!("error_code" in value) || value["error_code"] === undefined) return false; - return true; + if (!('error_code' in value) || value['error_code'] === undefined) return false; + return true; } export function ProduceResponseFromJSON(json: any): ProduceResponse { - return ProduceResponseFromJSONTyped(json, false); + return ProduceResponseFromJSONTyped(json, false); } -export function ProduceResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceResponse { - if (json == null) { - return json; - } - return { - error_code: json["error_code"], - message: json["message"] == null ? undefined : json["message"], - cluster_id: json["cluster_id"] == null ? undefined : json["cluster_id"], - topic_name: json["topic_name"] == null ? undefined : json["topic_name"], - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - offset: json["offset"] == null ? undefined : json["offset"], - timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), - key: json["key"] == null ? undefined : ProduceResponseDataFromJSON(json["key"]), - value: json["value"] == null ? undefined : ProduceResponseDataFromJSON(json["value"]), - }; +export function ProduceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponse { + if (json == null) { + return json; + } + return { + + 'error_code': json['error_code'], + 'message': json['message'] == null ? undefined : json['message'], + 'cluster_id': json['cluster_id'] == null ? undefined : json['cluster_id'], + 'topic_name': json['topic_name'] == null ? undefined : json['topic_name'], + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'offset': json['offset'] == null ? undefined : json['offset'], + 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), + 'key': json['key'] == null ? undefined : ProduceResponseDataFromJSON(json['key']), + 'value': json['value'] == null ? undefined : ProduceResponseDataFromJSON(json['value']), + }; } export function ProduceResponseToJSON(json: any): ProduceResponse { - return ProduceResponseToJSONTyped(json, false); + return ProduceResponseToJSONTyped(json, false); } -export function ProduceResponseToJSONTyped( - value?: ProduceResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceResponseToJSONTyped(value?: ProduceResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - error_code: value["error_code"], - message: value["message"], - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - offset: value["offset"], - timestamp: value["timestamp"] == null ? undefined : (value["timestamp"] as any).toISOString(), - key: ProduceResponseDataToJSON(value["key"]), - value: ProduceResponseDataToJSON(value["value"]), - }; + return { + + 'error_code': value['error_code'], + 'message': value['message'], + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'offset': value['offset'], + 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp'] as any).toISOString()), + 'key': ProduceResponseDataToJSON(value['key']), + 'value': ProduceResponseDataToJSON(value['value']), + }; } + diff --git a/src/clients/kafkaRest/models/ProduceResponseData.ts b/src/clients/kafkaRest/models/ProduceResponseData.ts index 2a961c9e15..6e130d2c62 100644 --- a/src/clients/kafkaRest/models/ProduceResponseData.ts +++ b/src/clients/kafkaRest/models/ProduceResponseData.ts @@ -5,74 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProduceResponseData */ export interface ProduceResponseData { - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - size: number; - /** - * - * @type {string} - * @memberof ProduceResponseData - */ - type: string; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + size: number; + /** + * + * @type {string} + * @memberof ProduceResponseData + */ + type: string; } /** * Check if a given object implements the ProduceResponseData interface. */ export function instanceOfProduceResponseData(value: object): value is ProduceResponseData { - if (!("size" in value) || value["size"] === undefined) return false; - if (!("type" in value) || value["type"] === undefined) return false; - return true; + if (!('size' in value) || value['size'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; } export function ProduceResponseDataFromJSON(json: any): ProduceResponseData { - return ProduceResponseDataFromJSONTyped(json, false); + return ProduceResponseDataFromJSONTyped(json, false); } -export function ProduceResponseDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceResponseData { - if (json == null) { - return json; - } - return { - size: json["size"], - type: json["type"], - }; +export function ProduceResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponseData { + if (json == null) { + return json; + } + return { + + 'size': json['size'], + 'type': json['type'], + }; } export function ProduceResponseDataToJSON(json: any): ProduceResponseData { - return ProduceResponseDataToJSONTyped(json, false); + return ProduceResponseDataToJSONTyped(json, false); } -export function ProduceResponseDataToJSONTyped( - value?: ProduceResponseData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceResponseDataToJSONTyped(value?: ProduceResponseData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - size: value["size"], - type: value["type"], - }; + return { + + 'size': value['size'], + 'type': value['type'], + }; } + diff --git a/src/clients/kafkaRest/models/ReassignmentData.ts b/src/clients/kafkaRest/models/ReassignmentData.ts index f1ca2abe0e..c9d28f20fc 100644 --- a/src/clients/kafkaRest/models/ReassignmentData.ts +++ b/src/clients/kafkaRest/models/ReassignmentData.ts @@ -5,143 +5,140 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ReassignmentData */ export interface ReassignmentData { - /** - * - * @type {string} - * @memberof ReassignmentData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ReassignmentData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ReassignmentData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ReassignmentData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ReassignmentData - */ - partition_id: number; - /** - * - * @type {Array} - * @memberof ReassignmentData - */ - adding_replicas: Array; - /** - * - * @type {Array} - * @memberof ReassignmentData - */ - removing_replicas: Array; - /** - * - * @type {Relationship} - * @memberof ReassignmentData - */ - replicas: Relationship; + /** + * + * @type {string} + * @memberof ReassignmentData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ReassignmentData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ReassignmentData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ReassignmentData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ReassignmentData + */ + partition_id: number; + /** + * + * @type {Array} + * @memberof ReassignmentData + */ + adding_replicas: Array; + /** + * + * @type {Array} + * @memberof ReassignmentData + */ + removing_replicas: Array; + /** + * + * @type {Relationship} + * @memberof ReassignmentData + */ + replicas: Relationship; } /** * Check if a given object implements the ReassignmentData interface. */ export function instanceOfReassignmentData(value: object): value is ReassignmentData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("partition_id" in value) || value["partition_id"] === undefined) return false; - if (!("adding_replicas" in value) || value["adding_replicas"] === undefined) return false; - if (!("removing_replicas" in value) || value["removing_replicas"] === undefined) return false; - if (!("replicas" in value) || value["replicas"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('partition_id' in value) || value['partition_id'] === undefined) return false; + if (!('adding_replicas' in value) || value['adding_replicas'] === undefined) return false; + if (!('removing_replicas' in value) || value['removing_replicas'] === undefined) return false; + if (!('replicas' in value) || value['replicas'] === undefined) return false; + return true; } export function ReassignmentDataFromJSON(json: any): ReassignmentData { - return ReassignmentDataFromJSONTyped(json, false); + return ReassignmentDataFromJSONTyped(json, false); } -export function ReassignmentDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ReassignmentData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - topic_name: json["topic_name"], - partition_id: json["partition_id"], - adding_replicas: json["adding_replicas"], - removing_replicas: json["removing_replicas"], - replicas: RelationshipFromJSON(json["replicas"]), - }; +export function ReassignmentDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReassignmentData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'topic_name': json['topic_name'], + 'partition_id': json['partition_id'], + 'adding_replicas': json['adding_replicas'], + 'removing_replicas': json['removing_replicas'], + 'replicas': RelationshipFromJSON(json['replicas']), + }; } export function ReassignmentDataToJSON(json: any): ReassignmentData { - return ReassignmentDataToJSONTyped(json, false); + return ReassignmentDataToJSONTyped(json, false); } -export function ReassignmentDataToJSONTyped( - value?: ReassignmentData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ReassignmentDataToJSONTyped(value?: ReassignmentData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - adding_replicas: value["adding_replicas"], - removing_replicas: value["removing_replicas"], - replicas: RelationshipToJSON(value["replicas"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'adding_replicas': value['adding_replicas'], + 'removing_replicas': value['removing_replicas'], + 'replicas': RelationshipToJSON(value['replicas']), + }; } + diff --git a/src/clients/kafkaRest/models/ReassignmentDataList.ts b/src/clients/kafkaRest/models/ReassignmentDataList.ts index 99d60cddec..7efbc0ad14 100644 --- a/src/clients/kafkaRest/models/ReassignmentDataList.ts +++ b/src/clients/kafkaRest/models/ReassignmentDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ReassignmentData } from "./ReassignmentData"; +import { mapValues } from '../runtime'; +import type { ReassignmentData } from './ReassignmentData'; import { - ReassignmentDataFromJSON, - ReassignmentDataFromJSONTyped, - ReassignmentDataToJSON, - ReassignmentDataToJSONTyped, -} from "./ReassignmentData"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; + ReassignmentDataFromJSON, + ReassignmentDataFromJSONTyped, + ReassignmentDataToJSON, + ReassignmentDataToJSONTyped, +} from './ReassignmentData'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; /** - * + * * @export * @interface ReassignmentDataList */ export interface ReassignmentDataList { - /** - * - * @type {string} - * @memberof ReassignmentDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ReassignmentDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ReassignmentDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ReassignmentDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ReassignmentDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ReassignmentDataList + */ + data: Array; } /** * Check if a given object implements the ReassignmentDataList interface. */ export function instanceOfReassignmentDataList(value: object): value is ReassignmentDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ReassignmentDataListFromJSON(json: any): ReassignmentDataList { - return ReassignmentDataListFromJSONTyped(json, false); + return ReassignmentDataListFromJSONTyped(json, false); } -export function ReassignmentDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ReassignmentDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ReassignmentDataFromJSON), - }; +export function ReassignmentDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReassignmentDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ReassignmentDataFromJSON)), + }; } export function ReassignmentDataListToJSON(json: any): ReassignmentDataList { - return ReassignmentDataListToJSONTyped(json, false); + return ReassignmentDataListToJSONTyped(json, false); } -export function ReassignmentDataListToJSONTyped( - value?: ReassignmentDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ReassignmentDataListToJSONTyped(value?: ReassignmentDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ReassignmentDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ReassignmentDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/Relationship.ts b/src/clients/kafkaRest/models/Relationship.ts index 247e57b8f5..3ba58e415b 100644 --- a/src/clients/kafkaRest/models/Relationship.ts +++ b/src/clients/kafkaRest/models/Relationship.ts @@ -5,62 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface Relationship */ export interface Relationship { - /** - * - * @type {string} - * @memberof Relationship - */ - related: string; + /** + * + * @type {string} + * @memberof Relationship + */ + related: string; } /** * Check if a given object implements the Relationship interface. */ export function instanceOfRelationship(value: object): value is Relationship { - if (!("related" in value) || value["related"] === undefined) return false; - return true; + if (!('related' in value) || value['related'] === undefined) return false; + return true; } export function RelationshipFromJSON(json: any): Relationship { - return RelationshipFromJSONTyped(json, false); + return RelationshipFromJSONTyped(json, false); } export function RelationshipFromJSONTyped(json: any, ignoreDiscriminator: boolean): Relationship { - if (json == null) { - return json; - } - return { - related: json["related"], - }; + if (json == null) { + return json; + } + return { + + 'related': json['related'], + }; } export function RelationshipToJSON(json: any): Relationship { - return RelationshipToJSONTyped(json, false); + return RelationshipToJSONTyped(json, false); } -export function RelationshipToJSONTyped( - value?: Relationship | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RelationshipToJSONTyped(value?: Relationship | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - related: value["related"], - }; + return { + + 'related': value['related'], + }; } + diff --git a/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts b/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts index c25b8dff04..a43db07234 100644 --- a/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts +++ b/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts @@ -5,177 +5,165 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface RemoveBrokerTaskData */ export interface RemoveBrokerTaskData { - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof RemoveBrokerTaskData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof RemoveBrokerTaskData - */ - broker_id: number; - /** - * - * @type {boolean} - * @memberof RemoveBrokerTaskData - */ - shutdown_scheduled: boolean; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - broker_replica_exclusion_status: string; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - partition_reassignment_status: string; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - broker_shutdown_status: string; - /** - * - * @type {number} - * @memberof RemoveBrokerTaskData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof RemoveBrokerTaskData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof RemoveBrokerTaskData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof RemoveBrokerTaskData + */ + broker_id: number; + /** + * + * @type {boolean} + * @memberof RemoveBrokerTaskData + */ + shutdown_scheduled: boolean; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + broker_replica_exclusion_status: string; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + partition_reassignment_status: string; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + broker_shutdown_status: string; + /** + * + * @type {number} + * @memberof RemoveBrokerTaskData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof RemoveBrokerTaskData + */ + broker: Relationship; } /** * Check if a given object implements the RemoveBrokerTaskData interface. */ export function instanceOfRemoveBrokerTaskData(value: object): value is RemoveBrokerTaskData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("shutdown_scheduled" in value) || value["shutdown_scheduled"] === undefined) return false; - if ( - !("broker_replica_exclusion_status" in value) || - value["broker_replica_exclusion_status"] === undefined - ) - return false; - if ( - !("partition_reassignment_status" in value) || - value["partition_reassignment_status"] === undefined - ) - return false; - if (!("broker_shutdown_status" in value) || value["broker_shutdown_status"] === undefined) - return false; - if (!("broker" in value) || value["broker"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('shutdown_scheduled' in value) || value['shutdown_scheduled'] === undefined) return false; + if (!('broker_replica_exclusion_status' in value) || value['broker_replica_exclusion_status'] === undefined) return false; + if (!('partition_reassignment_status' in value) || value['partition_reassignment_status'] === undefined) return false; + if (!('broker_shutdown_status' in value) || value['broker_shutdown_status'] === undefined) return false; + if (!('broker' in value) || value['broker'] === undefined) return false; + return true; } export function RemoveBrokerTaskDataFromJSON(json: any): RemoveBrokerTaskData { - return RemoveBrokerTaskDataFromJSONTyped(json, false); + return RemoveBrokerTaskDataFromJSONTyped(json, false); } -export function RemoveBrokerTaskDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RemoveBrokerTaskData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - broker_id: json["broker_id"], - shutdown_scheduled: json["shutdown_scheduled"], - broker_replica_exclusion_status: json["broker_replica_exclusion_status"], - partition_reassignment_status: json["partition_reassignment_status"], - broker_shutdown_status: json["broker_shutdown_status"], - error_code: json["error_code"] == null ? undefined : json["error_code"], - error_message: json["error_message"] == null ? undefined : json["error_message"], - broker: RelationshipFromJSON(json["broker"]), - }; +export function RemoveBrokerTaskDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveBrokerTaskData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'broker_id': json['broker_id'], + 'shutdown_scheduled': json['shutdown_scheduled'], + 'broker_replica_exclusion_status': json['broker_replica_exclusion_status'], + 'partition_reassignment_status': json['partition_reassignment_status'], + 'broker_shutdown_status': json['broker_shutdown_status'], + 'error_code': json['error_code'] == null ? undefined : json['error_code'], + 'error_message': json['error_message'] == null ? undefined : json['error_message'], + 'broker': RelationshipFromJSON(json['broker']), + }; } export function RemoveBrokerTaskDataToJSON(json: any): RemoveBrokerTaskData { - return RemoveBrokerTaskDataToJSONTyped(json, false); + return RemoveBrokerTaskDataToJSONTyped(json, false); } -export function RemoveBrokerTaskDataToJSONTyped( - value?: RemoveBrokerTaskData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RemoveBrokerTaskDataToJSONTyped(value?: RemoveBrokerTaskData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - broker_id: value["broker_id"], - shutdown_scheduled: value["shutdown_scheduled"], - broker_replica_exclusion_status: value["broker_replica_exclusion_status"], - partition_reassignment_status: value["partition_reassignment_status"], - broker_shutdown_status: value["broker_shutdown_status"], - error_code: value["error_code"], - error_message: value["error_message"], - broker: RelationshipToJSON(value["broker"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'broker_id': value['broker_id'], + 'shutdown_scheduled': value['shutdown_scheduled'], + 'broker_replica_exclusion_status': value['broker_replica_exclusion_status'], + 'partition_reassignment_status': value['partition_reassignment_status'], + 'broker_shutdown_status': value['broker_shutdown_status'], + 'error_code': value['error_code'], + 'error_message': value['error_message'], + 'broker': RelationshipToJSON(value['broker']), + }; } + diff --git a/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts b/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts index dbe76500f7..312290e6da 100644 --- a/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts +++ b/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts @@ -5,100 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { RemoveBrokerTaskData } from "./RemoveBrokerTaskData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { RemoveBrokerTaskData } from './RemoveBrokerTaskData'; import { - RemoveBrokerTaskDataFromJSON, - RemoveBrokerTaskDataFromJSONTyped, - RemoveBrokerTaskDataToJSON, - RemoveBrokerTaskDataToJSONTyped, -} from "./RemoveBrokerTaskData"; + RemoveBrokerTaskDataFromJSON, + RemoveBrokerTaskDataFromJSONTyped, + RemoveBrokerTaskDataToJSON, + RemoveBrokerTaskDataToJSONTyped, +} from './RemoveBrokerTaskData'; /** - * + * * @export * @interface RemoveBrokerTaskDataList */ export interface RemoveBrokerTaskDataList { - /** - * - * @type {string} - * @memberof RemoveBrokerTaskDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof RemoveBrokerTaskDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof RemoveBrokerTaskDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof RemoveBrokerTaskDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof RemoveBrokerTaskDataList + */ + data: Array; } /** * Check if a given object implements the RemoveBrokerTaskDataList interface. */ -export function instanceOfRemoveBrokerTaskDataList( - value: object, -): value is RemoveBrokerTaskDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfRemoveBrokerTaskDataList(value: object): value is RemoveBrokerTaskDataList { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function RemoveBrokerTaskDataListFromJSON(json: any): RemoveBrokerTaskDataList { - return RemoveBrokerTaskDataListFromJSONTyped(json, false); + return RemoveBrokerTaskDataListFromJSONTyped(json, false); } -export function RemoveBrokerTaskDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RemoveBrokerTaskDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(RemoveBrokerTaskDataFromJSON), - }; +export function RemoveBrokerTaskDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveBrokerTaskDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(RemoveBrokerTaskDataFromJSON)), + }; } export function RemoveBrokerTaskDataListToJSON(json: any): RemoveBrokerTaskDataList { - return RemoveBrokerTaskDataListToJSONTyped(json, false); + return RemoveBrokerTaskDataListToJSONTyped(json, false); } -export function RemoveBrokerTaskDataListToJSONTyped( - value?: RemoveBrokerTaskDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RemoveBrokerTaskDataListToJSONTyped(value?: RemoveBrokerTaskDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(RemoveBrokerTaskDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(RemoveBrokerTaskDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts b/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts index 0496d66ec1..bbbdc57b99 100644 --- a/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts +++ b/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts @@ -5,67 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface RemoveBrokersRequestData */ export interface RemoveBrokersRequestData { - /** - * - * @type {Array} - * @memberof RemoveBrokersRequestData - */ - broker_ids: Array; + /** + * + * @type {Array} + * @memberof RemoveBrokersRequestData + */ + broker_ids: Array; } /** * Check if a given object implements the RemoveBrokersRequestData interface. */ -export function instanceOfRemoveBrokersRequestData( - value: object, -): value is RemoveBrokersRequestData { - if (!("broker_ids" in value) || value["broker_ids"] === undefined) return false; - return true; +export function instanceOfRemoveBrokersRequestData(value: object): value is RemoveBrokersRequestData { + if (!('broker_ids' in value) || value['broker_ids'] === undefined) return false; + return true; } export function RemoveBrokersRequestDataFromJSON(json: any): RemoveBrokersRequestData { - return RemoveBrokersRequestDataFromJSONTyped(json, false); + return RemoveBrokersRequestDataFromJSONTyped(json, false); } -export function RemoveBrokersRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RemoveBrokersRequestData { - if (json == null) { - return json; - } - return { - broker_ids: json["broker_ids"], - }; +export function RemoveBrokersRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveBrokersRequestData { + if (json == null) { + return json; + } + return { + + 'broker_ids': json['broker_ids'], + }; } export function RemoveBrokersRequestDataToJSON(json: any): RemoveBrokersRequestData { - return RemoveBrokersRequestDataToJSONTyped(json, false); + return RemoveBrokersRequestDataToJSONTyped(json, false); } -export function RemoveBrokersRequestDataToJSONTyped( - value?: RemoveBrokersRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RemoveBrokersRequestDataToJSONTyped(value?: RemoveBrokersRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - broker_ids: value["broker_ids"], - }; + return { + + 'broker_ids': value['broker_ids'], + }; } + diff --git a/src/clients/kafkaRest/models/ReplicaData.ts b/src/clients/kafkaRest/models/ReplicaData.ts index ab8db7c9ac..3ef5b073ed 100644 --- a/src/clients/kafkaRest/models/ReplicaData.ts +++ b/src/clients/kafkaRest/models/ReplicaData.ts @@ -5,149 +5,149 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ReplicaData */ export interface ReplicaData { - /** - * - * @type {string} - * @memberof ReplicaData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ReplicaData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ReplicaData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ReplicaData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ReplicaData - */ - partition_id: number; - /** - * - * @type {number} - * @memberof ReplicaData - */ - broker_id: number; - /** - * - * @type {boolean} - * @memberof ReplicaData - */ - is_leader: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaData - */ - is_in_sync: boolean; - /** - * - * @type {Relationship} - * @memberof ReplicaData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof ReplicaData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ReplicaData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ReplicaData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ReplicaData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ReplicaData + */ + partition_id: number; + /** + * + * @type {number} + * @memberof ReplicaData + */ + broker_id: number; + /** + * + * @type {boolean} + * @memberof ReplicaData + */ + is_leader: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaData + */ + is_in_sync: boolean; + /** + * + * @type {Relationship} + * @memberof ReplicaData + */ + broker: Relationship; } /** * Check if a given object implements the ReplicaData interface. */ export function instanceOfReplicaData(value: object): value is ReplicaData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("partition_id" in value) || value["partition_id"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("is_leader" in value) || value["is_leader"] === undefined) return false; - if (!("is_in_sync" in value) || value["is_in_sync"] === undefined) return false; - if (!("broker" in value) || value["broker"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('partition_id' in value) || value['partition_id'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('is_leader' in value) || value['is_leader'] === undefined) return false; + if (!('is_in_sync' in value) || value['is_in_sync'] === undefined) return false; + if (!('broker' in value) || value['broker'] === undefined) return false; + return true; } export function ReplicaDataFromJSON(json: any): ReplicaData { - return ReplicaDataFromJSONTyped(json, false); + return ReplicaDataFromJSONTyped(json, false); } export function ReplicaDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - topic_name: json["topic_name"], - partition_id: json["partition_id"], - broker_id: json["broker_id"], - is_leader: json["is_leader"], - is_in_sync: json["is_in_sync"], - broker: RelationshipFromJSON(json["broker"]), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'topic_name': json['topic_name'], + 'partition_id': json['partition_id'], + 'broker_id': json['broker_id'], + 'is_leader': json['is_leader'], + 'is_in_sync': json['is_in_sync'], + 'broker': RelationshipFromJSON(json['broker']), + }; } export function ReplicaDataToJSON(json: any): ReplicaData { - return ReplicaDataToJSONTyped(json, false); + return ReplicaDataToJSONTyped(json, false); } -export function ReplicaDataToJSONTyped( - value?: ReplicaData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ReplicaDataToJSONTyped(value?: ReplicaData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - broker_id: value["broker_id"], - is_leader: value["is_leader"], - is_in_sync: value["is_in_sync"], - broker: RelationshipToJSON(value["broker"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'broker_id': value['broker_id'], + 'is_leader': value['is_leader'], + 'is_in_sync': value['is_in_sync'], + 'broker': RelationshipToJSON(value['broker']), + }; } + diff --git a/src/clients/kafkaRest/models/ReplicaDataList.ts b/src/clients/kafkaRest/models/ReplicaDataList.ts index 52f44c562f..76af28903a 100644 --- a/src/clients/kafkaRest/models/ReplicaDataList.ts +++ b/src/clients/kafkaRest/models/ReplicaDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ReplicaData } from "./ReplicaData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ReplicaData } from './ReplicaData'; import { - ReplicaDataFromJSON, - ReplicaDataFromJSONTyped, - ReplicaDataToJSON, - ReplicaDataToJSONTyped, -} from "./ReplicaData"; + ReplicaDataFromJSON, + ReplicaDataFromJSONTyped, + ReplicaDataToJSON, + ReplicaDataToJSONTyped, +} from './ReplicaData'; /** - * + * * @export * @interface ReplicaDataList */ export interface ReplicaDataList { - /** - * - * @type {string} - * @memberof ReplicaDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ReplicaDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ReplicaDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ReplicaDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ReplicaDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ReplicaDataList + */ + data: Array; } /** * Check if a given object implements the ReplicaDataList interface. */ export function instanceOfReplicaDataList(value: object): value is ReplicaDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ReplicaDataListFromJSON(json: any): ReplicaDataList { - return ReplicaDataListFromJSONTyped(json, false); + return ReplicaDataListFromJSONTyped(json, false); } -export function ReplicaDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ReplicaDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ReplicaDataFromJSON), - }; +export function ReplicaDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ReplicaDataFromJSON)), + }; } export function ReplicaDataListToJSON(json: any): ReplicaDataList { - return ReplicaDataListToJSONTyped(json, false); + return ReplicaDataListToJSONTyped(json, false); } -export function ReplicaDataListToJSONTyped( - value?: ReplicaDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ReplicaDataListToJSONTyped(value?: ReplicaDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ReplicaDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ReplicaDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/ReplicaStatusData.ts b/src/clients/kafkaRest/models/ReplicaStatusData.ts index 2536b85543..ac06cea07e 100644 --- a/src/clients/kafkaRest/models/ReplicaStatusData.ts +++ b/src/clients/kafkaRest/models/ReplicaStatusData.ts @@ -5,208 +5,204 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceMetadata } from "./ResourceMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface ReplicaStatusData */ export interface ReplicaStatusData { - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ReplicaStatusData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - broker_id: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - partition_id: number; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_leader: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_observer: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_isr_eligible: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_in_isr: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_caught_up: boolean; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - log_start_offset: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - log_end_offset: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - last_caught_up_time_ms: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - last_fetch_time_ms: number; - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - link_name?: string; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ReplicaStatusData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + broker_id: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + partition_id: number; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_leader: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_observer: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_isr_eligible: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_in_isr: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_caught_up: boolean; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + log_start_offset: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + log_end_offset: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + last_caught_up_time_ms: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + last_fetch_time_ms: number; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + link_name?: string; } /** * Check if a given object implements the ReplicaStatusData interface. */ export function instanceOfReplicaStatusData(value: object): value is ReplicaStatusData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("broker_id" in value) || value["broker_id"] === undefined) return false; - if (!("partition_id" in value) || value["partition_id"] === undefined) return false; - if (!("is_leader" in value) || value["is_leader"] === undefined) return false; - if (!("is_observer" in value) || value["is_observer"] === undefined) return false; - if (!("is_isr_eligible" in value) || value["is_isr_eligible"] === undefined) return false; - if (!("is_in_isr" in value) || value["is_in_isr"] === undefined) return false; - if (!("is_caught_up" in value) || value["is_caught_up"] === undefined) return false; - if (!("log_start_offset" in value) || value["log_start_offset"] === undefined) return false; - if (!("log_end_offset" in value) || value["log_end_offset"] === undefined) return false; - if (!("last_caught_up_time_ms" in value) || value["last_caught_up_time_ms"] === undefined) - return false; - if (!("last_fetch_time_ms" in value) || value["last_fetch_time_ms"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('broker_id' in value) || value['broker_id'] === undefined) return false; + if (!('partition_id' in value) || value['partition_id'] === undefined) return false; + if (!('is_leader' in value) || value['is_leader'] === undefined) return false; + if (!('is_observer' in value) || value['is_observer'] === undefined) return false; + if (!('is_isr_eligible' in value) || value['is_isr_eligible'] === undefined) return false; + if (!('is_in_isr' in value) || value['is_in_isr'] === undefined) return false; + if (!('is_caught_up' in value) || value['is_caught_up'] === undefined) return false; + if (!('log_start_offset' in value) || value['log_start_offset'] === undefined) return false; + if (!('log_end_offset' in value) || value['log_end_offset'] === undefined) return false; + if (!('last_caught_up_time_ms' in value) || value['last_caught_up_time_ms'] === undefined) return false; + if (!('last_fetch_time_ms' in value) || value['last_fetch_time_ms'] === undefined) return false; + return true; } export function ReplicaStatusDataFromJSON(json: any): ReplicaStatusData { - return ReplicaStatusDataFromJSONTyped(json, false); + return ReplicaStatusDataFromJSONTyped(json, false); } -export function ReplicaStatusDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ReplicaStatusData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - topic_name: json["topic_name"], - broker_id: json["broker_id"], - partition_id: json["partition_id"], - is_leader: json["is_leader"], - is_observer: json["is_observer"], - is_isr_eligible: json["is_isr_eligible"], - is_in_isr: json["is_in_isr"], - is_caught_up: json["is_caught_up"], - log_start_offset: json["log_start_offset"], - log_end_offset: json["log_end_offset"], - last_caught_up_time_ms: json["last_caught_up_time_ms"], - last_fetch_time_ms: json["last_fetch_time_ms"], - link_name: json["link_name"] == null ? undefined : json["link_name"], - }; +export function ReplicaStatusDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaStatusData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'topic_name': json['topic_name'], + 'broker_id': json['broker_id'], + 'partition_id': json['partition_id'], + 'is_leader': json['is_leader'], + 'is_observer': json['is_observer'], + 'is_isr_eligible': json['is_isr_eligible'], + 'is_in_isr': json['is_in_isr'], + 'is_caught_up': json['is_caught_up'], + 'log_start_offset': json['log_start_offset'], + 'log_end_offset': json['log_end_offset'], + 'last_caught_up_time_ms': json['last_caught_up_time_ms'], + 'last_fetch_time_ms': json['last_fetch_time_ms'], + 'link_name': json['link_name'] == null ? undefined : json['link_name'], + }; } export function ReplicaStatusDataToJSON(json: any): ReplicaStatusData { - return ReplicaStatusDataToJSONTyped(json, false); + return ReplicaStatusDataToJSONTyped(json, false); } -export function ReplicaStatusDataToJSONTyped( - value?: ReplicaStatusData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ReplicaStatusDataToJSONTyped(value?: ReplicaStatusData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - broker_id: value["broker_id"], - partition_id: value["partition_id"], - is_leader: value["is_leader"], - is_observer: value["is_observer"], - is_isr_eligible: value["is_isr_eligible"], - is_in_isr: value["is_in_isr"], - is_caught_up: value["is_caught_up"], - log_start_offset: value["log_start_offset"], - log_end_offset: value["log_end_offset"], - last_caught_up_time_ms: value["last_caught_up_time_ms"], - last_fetch_time_ms: value["last_fetch_time_ms"], - link_name: value["link_name"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'broker_id': value['broker_id'], + 'partition_id': value['partition_id'], + 'is_leader': value['is_leader'], + 'is_observer': value['is_observer'], + 'is_isr_eligible': value['is_isr_eligible'], + 'is_in_isr': value['is_in_isr'], + 'is_caught_up': value['is_caught_up'], + 'log_start_offset': value['log_start_offset'], + 'log_end_offset': value['log_end_offset'], + 'last_caught_up_time_ms': value['last_caught_up_time_ms'], + 'last_fetch_time_ms': value['last_fetch_time_ms'], + 'link_name': value['link_name'], + }; } + diff --git a/src/clients/kafkaRest/models/ReplicaStatusDataList.ts b/src/clients/kafkaRest/models/ReplicaStatusDataList.ts index 04ba94a6e9..40195fc5b6 100644 --- a/src/clients/kafkaRest/models/ReplicaStatusDataList.ts +++ b/src/clients/kafkaRest/models/ReplicaStatusDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { ReplicaStatusData } from "./ReplicaStatusData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { ReplicaStatusData } from './ReplicaStatusData'; import { - ReplicaStatusDataFromJSON, - ReplicaStatusDataFromJSONTyped, - ReplicaStatusDataToJSON, - ReplicaStatusDataToJSONTyped, -} from "./ReplicaStatusData"; + ReplicaStatusDataFromJSON, + ReplicaStatusDataFromJSONTyped, + ReplicaStatusDataToJSON, + ReplicaStatusDataToJSONTyped, +} from './ReplicaStatusData'; /** - * + * * @export * @interface ReplicaStatusDataList */ export interface ReplicaStatusDataList { - /** - * - * @type {string} - * @memberof ReplicaStatusDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ReplicaStatusDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ReplicaStatusDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ReplicaStatusDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ReplicaStatusDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ReplicaStatusDataList + */ + data: Array; } /** * Check if a given object implements the ReplicaStatusDataList interface. */ export function instanceOfReplicaStatusDataList(value: object): value is ReplicaStatusDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ReplicaStatusDataListFromJSON(json: any): ReplicaStatusDataList { - return ReplicaStatusDataListFromJSONTyped(json, false); + return ReplicaStatusDataListFromJSONTyped(json, false); } -export function ReplicaStatusDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ReplicaStatusDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ReplicaStatusDataFromJSON), - }; +export function ReplicaStatusDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaStatusDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ReplicaStatusDataFromJSON)), + }; } export function ReplicaStatusDataListToJSON(json: any): ReplicaStatusDataList { - return ReplicaStatusDataListToJSONTyped(json, false); + return ReplicaStatusDataListToJSONTyped(json, false); } -export function ReplicaStatusDataListToJSONTyped( - value?: ReplicaStatusDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ReplicaStatusDataListToJSONTyped(value?: ReplicaStatusDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ReplicaStatusDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ReplicaStatusDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/Resource.ts b/src/clients/kafkaRest/models/Resource.ts index 60f351435b..0431f5b0ab 100644 --- a/src/clients/kafkaRest/models/Resource.ts +++ b/src/clients/kafkaRest/models/Resource.ts @@ -5,79 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceMetadata } from "./ResourceMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface Resource */ export interface Resource { - /** - * - * @type {string} - * @memberof Resource - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof Resource - */ - metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof Resource + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof Resource + */ + metadata: ResourceMetadata; } /** * Check if a given object implements the Resource interface. */ export function instanceOfResource(value: object): value is Resource { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + return true; } export function ResourceFromJSON(json: any): Resource { - return ResourceFromJSONTyped(json, false); + return ResourceFromJSONTyped(json, false); } export function ResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Resource { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + }; } export function ResourceToJSON(json: any): Resource { - return ResourceToJSONTyped(json, false); + return ResourceToJSONTyped(json, false); } -export function ResourceToJSONTyped( - value?: Resource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourceToJSONTyped(value?: Resource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + }; } + diff --git a/src/clients/kafkaRest/models/ResourceCollection.ts b/src/clients/kafkaRest/models/ResourceCollection.ts index 64a415fdbf..14378fd2e6 100644 --- a/src/clients/kafkaRest/models/ResourceCollection.ts +++ b/src/clients/kafkaRest/models/ResourceCollection.ts @@ -5,82 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; /** - * + * * @export * @interface ResourceCollection */ export interface ResourceCollection { - /** - * - * @type {string} - * @memberof ResourceCollection - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ResourceCollection - */ - metadata: ResourceCollectionMetadata; + /** + * + * @type {string} + * @memberof ResourceCollection + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ResourceCollection + */ + metadata: ResourceCollectionMetadata; } /** * Check if a given object implements the ResourceCollection interface. */ export function instanceOfResourceCollection(value: object): value is ResourceCollection { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + return true; } export function ResourceCollectionFromJSON(json: any): ResourceCollection { - return ResourceCollectionFromJSONTyped(json, false); + return ResourceCollectionFromJSONTyped(json, false); } -export function ResourceCollectionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResourceCollection { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - }; +export function ResourceCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceCollection { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + }; } export function ResourceCollectionToJSON(json: any): ResourceCollection { - return ResourceCollectionToJSONTyped(json, false); + return ResourceCollectionToJSONTyped(json, false); } -export function ResourceCollectionToJSONTyped( - value?: ResourceCollection | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourceCollectionToJSONTyped(value?: ResourceCollection | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + }; } + diff --git a/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts b/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts index cb7a7f06fb..c5bf137aef 100644 --- a/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts +++ b/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts @@ -5,75 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ResourceCollectionMetadata */ export interface ResourceCollectionMetadata { - /** - * - * @type {string} - * @memberof ResourceCollectionMetadata - */ - self: string; - /** - * - * @type {string} - * @memberof ResourceCollectionMetadata - */ - next?: string | null; + /** + * + * @type {string} + * @memberof ResourceCollectionMetadata + */ + self: string; + /** + * + * @type {string} + * @memberof ResourceCollectionMetadata + */ + next?: string | null; } /** * Check if a given object implements the ResourceCollectionMetadata interface. */ -export function instanceOfResourceCollectionMetadata( - value: object, -): value is ResourceCollectionMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfResourceCollectionMetadata(value: object): value is ResourceCollectionMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ResourceCollectionMetadataFromJSON(json: any): ResourceCollectionMetadata { - return ResourceCollectionMetadataFromJSONTyped(json, false); + return ResourceCollectionMetadataFromJSONTyped(json, false); } -export function ResourceCollectionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResourceCollectionMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - next: json["next"] == null ? undefined : json["next"], - }; +export function ResourceCollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceCollectionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'next': json['next'] == null ? undefined : json['next'], + }; } export function ResourceCollectionMetadataToJSON(json: any): ResourceCollectionMetadata { - return ResourceCollectionMetadataToJSONTyped(json, false); + return ResourceCollectionMetadataToJSONTyped(json, false); } -export function ResourceCollectionMetadataToJSONTyped( - value?: ResourceCollectionMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourceCollectionMetadataToJSONTyped(value?: ResourceCollectionMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + }; } + diff --git a/src/clients/kafkaRest/models/ResourceMetadata.ts b/src/clients/kafkaRest/models/ResourceMetadata.ts index 8929d03a36..ecb8a8601f 100644 --- a/src/clients/kafkaRest/models/ResourceMetadata.ts +++ b/src/clients/kafkaRest/models/ResourceMetadata.ts @@ -5,73 +5,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ResourceMetadata */ export interface ResourceMetadata { - /** - * - * @type {string} - * @memberof ResourceMetadata - */ - self: string; - /** - * - * @type {string} - * @memberof ResourceMetadata - */ - resource_name?: string | null; + /** + * + * @type {string} + * @memberof ResourceMetadata + */ + self: string; + /** + * + * @type {string} + * @memberof ResourceMetadata + */ + resource_name?: string | null; } /** * Check if a given object implements the ResourceMetadata interface. */ export function instanceOfResourceMetadata(value: object): value is ResourceMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ResourceMetadataFromJSON(json: any): ResourceMetadata { - return ResourceMetadataFromJSONTyped(json, false); + return ResourceMetadataFromJSONTyped(json, false); } -export function ResourceMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ResourceMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - }; +export function ResourceMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + }; } export function ResourceMetadataToJSON(json: any): ResourceMetadata { - return ResourceMetadataToJSONTyped(json, false); + return ResourceMetadataToJSONTyped(json, false); } -export function ResourceMetadataToJSONTyped( - value?: ResourceMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ResourceMetadataToJSONTyped(value?: ResourceMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/kafkaRest/models/TopicConfigData.ts b/src/clients/kafkaRest/models/TopicConfigData.ts index 5c2b7ee908..50bd54ec7b 100644 --- a/src/clients/kafkaRest/models/TopicConfigData.ts +++ b/src/clients/kafkaRest/models/TopicConfigData.ts @@ -5,169 +5,166 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigSynonymData } from "./ConfigSynonymData"; +import { mapValues } from '../runtime'; +import type { ConfigSynonymData } from './ConfigSynonymData'; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from "./ConfigSynonymData"; -import type { ResourceMetadata } from "./ResourceMetadata"; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from './ConfigSynonymData'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface TopicConfigData */ export interface TopicConfigData { - /** - * - * @type {string} - * @memberof TopicConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof TopicConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof TopicConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof TopicConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof TopicConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof TopicConfigData - */ - synonyms: Array; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - topic_name: string; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof TopicConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof TopicConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof TopicConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof TopicConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof TopicConfigData + */ + synonyms: Array; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + topic_name: string; } /** * Check if a given object implements the TopicConfigData interface. */ export function instanceOfTopicConfigData(value: object): value is TopicConfigData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("name" in value) || value["name"] === undefined) return false; - if (!("is_default" in value) || value["is_default"] === undefined) return false; - if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; - if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; - if (!("source" in value) || value["source"] === undefined) return false; - if (!("synonyms" in value) || value["synonyms"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('is_default' in value) || value['is_default'] === undefined) return false; + if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; + if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; + if (!('source' in value) || value['source'] === undefined) return false; + if (!('synonyms' in value) || value['synonyms'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + return true; } export function TopicConfigDataFromJSON(json: any): TopicConfigData { - return TopicConfigDataFromJSONTyped(json, false); + return TopicConfigDataFromJSONTyped(json, false); } -export function TopicConfigDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TopicConfigData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - is_default: json["is_default"], - is_read_only: json["is_read_only"], - is_sensitive: json["is_sensitive"], - source: json["source"], - synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), - topic_name: json["topic_name"], - }; +export function TopicConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicConfigData { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + 'is_default': json['is_default'], + 'is_read_only': json['is_read_only'], + 'is_sensitive': json['is_sensitive'], + 'source': json['source'], + 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), + 'topic_name': json['topic_name'], + }; } export function TopicConfigDataToJSON(json: any): TopicConfigData { - return TopicConfigDataToJSONTyped(json, false); + return TopicConfigDataToJSONTyped(json, false); } -export function TopicConfigDataToJSONTyped( - value?: TopicConfigData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TopicConfigDataToJSONTyped(value?: TopicConfigData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - name: value["name"], - value: value["value"], - is_default: value["is_default"], - is_read_only: value["is_read_only"], - is_sensitive: value["is_sensitive"], - source: value["source"], - synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), - topic_name: value["topic_name"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'name': value['name'], + 'value': value['value'], + 'is_default': value['is_default'], + 'is_read_only': value['is_read_only'], + 'is_sensitive': value['is_sensitive'], + 'source': value['source'], + 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), + 'topic_name': value['topic_name'], + }; } + diff --git a/src/clients/kafkaRest/models/TopicConfigDataList.ts b/src/clients/kafkaRest/models/TopicConfigDataList.ts index e6ab5763a1..301d1b810f 100644 --- a/src/clients/kafkaRest/models/TopicConfigDataList.ts +++ b/src/clients/kafkaRest/models/TopicConfigDataList.ts @@ -5,98 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { TopicConfigData } from "./TopicConfigData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { TopicConfigData } from './TopicConfigData'; import { - TopicConfigDataFromJSON, - TopicConfigDataFromJSONTyped, - TopicConfigDataToJSON, - TopicConfigDataToJSONTyped, -} from "./TopicConfigData"; + TopicConfigDataFromJSON, + TopicConfigDataFromJSONTyped, + TopicConfigDataToJSON, + TopicConfigDataToJSONTyped, +} from './TopicConfigData'; /** - * + * * @export * @interface TopicConfigDataList */ export interface TopicConfigDataList { - /** - * - * @type {string} - * @memberof TopicConfigDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof TopicConfigDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof TopicConfigDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof TopicConfigDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof TopicConfigDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof TopicConfigDataList + */ + data: Array; } /** * Check if a given object implements the TopicConfigDataList interface. */ export function instanceOfTopicConfigDataList(value: object): value is TopicConfigDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function TopicConfigDataListFromJSON(json: any): TopicConfigDataList { - return TopicConfigDataListFromJSONTyped(json, false); + return TopicConfigDataListFromJSONTyped(json, false); } -export function TopicConfigDataListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): TopicConfigDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(TopicConfigDataFromJSON), - }; +export function TopicConfigDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicConfigDataList { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(TopicConfigDataFromJSON)), + }; } export function TopicConfigDataListToJSON(json: any): TopicConfigDataList { - return TopicConfigDataListToJSONTyped(json, false); + return TopicConfigDataListToJSONTyped(json, false); } -export function TopicConfigDataListToJSONTyped( - value?: TopicConfigDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TopicConfigDataListToJSONTyped(value?: TopicConfigDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(TopicConfigDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(TopicConfigDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/TopicData.ts b/src/clients/kafkaRest/models/TopicData.ts index e95c76eb29..bbc4fb8282 100644 --- a/src/clients/kafkaRest/models/TopicData.ts +++ b/src/clients/kafkaRest/models/TopicData.ts @@ -5,168 +5,166 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Relationship } from "./Relationship"; +import { mapValues } from '../runtime'; +import type { Relationship } from './Relationship'; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from "./Relationship"; -import type { ResourceMetadata } from "./ResourceMetadata"; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from './Relationship'; +import type { ResourceMetadata } from './ResourceMetadata'; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from "./ResourceMetadata"; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from './ResourceMetadata'; /** - * + * * @export * @interface TopicData */ export interface TopicData { - /** - * - * @type {string} - * @memberof TopicData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof TopicData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof TopicData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof TopicData - */ - topic_name: string; - /** - * - * @type {boolean} - * @memberof TopicData - */ - is_internal: boolean; - /** - * - * @type {number} - * @memberof TopicData - */ - replication_factor: number; - /** - * - * @type {number} - * @memberof TopicData - */ - partitions_count: number; - /** - * - * @type {Relationship} - * @memberof TopicData - */ - partitions: Relationship; - /** - * - * @type {Relationship} - * @memberof TopicData - */ - configs: Relationship; - /** - * - * @type {Relationship} - * @memberof TopicData - */ - partition_reassignments: Relationship; - /** - * - * @type {Array} - * @memberof TopicData - */ - authorized_operations?: Array; + /** + * + * @type {string} + * @memberof TopicData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof TopicData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof TopicData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof TopicData + */ + topic_name: string; + /** + * + * @type {boolean} + * @memberof TopicData + */ + is_internal: boolean; + /** + * + * @type {number} + * @memberof TopicData + */ + replication_factor: number; + /** + * + * @type {number} + * @memberof TopicData + */ + partitions_count: number; + /** + * + * @type {Relationship} + * @memberof TopicData + */ + partitions: Relationship; + /** + * + * @type {Relationship} + * @memberof TopicData + */ + configs: Relationship; + /** + * + * @type {Relationship} + * @memberof TopicData + */ + partition_reassignments: Relationship; + /** + * + * @type {Array} + * @memberof TopicData + */ + authorized_operations?: Array; } /** * Check if a given object implements the TopicData interface. */ export function instanceOfTopicData(value: object): value is TopicData { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; - if (!("topic_name" in value) || value["topic_name"] === undefined) return false; - if (!("is_internal" in value) || value["is_internal"] === undefined) return false; - if (!("replication_factor" in value) || value["replication_factor"] === undefined) return false; - if (!("partitions_count" in value) || value["partitions_count"] === undefined) return false; - if (!("partitions" in value) || value["partitions"] === undefined) return false; - if (!("configs" in value) || value["configs"] === undefined) return false; - if (!("partition_reassignments" in value) || value["partition_reassignments"] === undefined) - return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; + if (!('topic_name' in value) || value['topic_name'] === undefined) return false; + if (!('is_internal' in value) || value['is_internal'] === undefined) return false; + if (!('replication_factor' in value) || value['replication_factor'] === undefined) return false; + if (!('partitions_count' in value) || value['partitions_count'] === undefined) return false; + if (!('partitions' in value) || value['partitions'] === undefined) return false; + if (!('configs' in value) || value['configs'] === undefined) return false; + if (!('partition_reassignments' in value) || value['partition_reassignments'] === undefined) return false; + return true; } export function TopicDataFromJSON(json: any): TopicData { - return TopicDataFromJSONTyped(json, false); + return TopicDataFromJSONTyped(json, false); } export function TopicDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicData { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceMetadataFromJSON(json["metadata"]), - cluster_id: json["cluster_id"], - topic_name: json["topic_name"], - is_internal: json["is_internal"], - replication_factor: json["replication_factor"], - partitions_count: json["partitions_count"], - partitions: RelationshipFromJSON(json["partitions"]), - configs: RelationshipFromJSON(json["configs"]), - partition_reassignments: RelationshipFromJSON(json["partition_reassignments"]), - authorized_operations: - json["authorized_operations"] == null ? undefined : json["authorized_operations"], - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceMetadataFromJSON(json['metadata']), + 'cluster_id': json['cluster_id'], + 'topic_name': json['topic_name'], + 'is_internal': json['is_internal'], + 'replication_factor': json['replication_factor'], + 'partitions_count': json['partitions_count'], + 'partitions': RelationshipFromJSON(json['partitions']), + 'configs': RelationshipFromJSON(json['configs']), + 'partition_reassignments': RelationshipFromJSON(json['partition_reassignments']), + 'authorized_operations': json['authorized_operations'] == null ? undefined : json['authorized_operations'], + }; } export function TopicDataToJSON(json: any): TopicData { - return TopicDataToJSONTyped(json, false); + return TopicDataToJSONTyped(json, false); } -export function TopicDataToJSONTyped( - value?: TopicData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TopicDataToJSONTyped(value?: TopicData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceMetadataToJSON(value["metadata"]), - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - is_internal: value["is_internal"], - replication_factor: value["replication_factor"], - partitions_count: value["partitions_count"], - partitions: RelationshipToJSON(value["partitions"]), - configs: RelationshipToJSON(value["configs"]), - partition_reassignments: RelationshipToJSON(value["partition_reassignments"]), - authorized_operations: value["authorized_operations"], - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceMetadataToJSON(value['metadata']), + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'is_internal': value['is_internal'], + 'replication_factor': value['replication_factor'], + 'partitions_count': value['partitions_count'], + 'partitions': RelationshipToJSON(value['partitions']), + 'configs': RelationshipToJSON(value['configs']), + 'partition_reassignments': RelationshipToJSON(value['partition_reassignments']), + 'authorized_operations': value['authorized_operations'], + }; } + diff --git a/src/clients/kafkaRest/models/TopicDataList.ts b/src/clients/kafkaRest/models/TopicDataList.ts index 56262f1743..b4af2e7b25 100644 --- a/src/clients/kafkaRest/models/TopicDataList.ts +++ b/src/clients/kafkaRest/models/TopicDataList.ts @@ -5,95 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from "./ResourceCollectionMetadata"; -import type { TopicData } from "./TopicData"; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from './ResourceCollectionMetadata'; +import type { TopicData } from './TopicData'; import { - TopicDataFromJSON, - TopicDataFromJSONTyped, - TopicDataToJSON, - TopicDataToJSONTyped, -} from "./TopicData"; + TopicDataFromJSON, + TopicDataFromJSONTyped, + TopicDataToJSON, + TopicDataToJSONTyped, +} from './TopicData'; /** - * + * * @export * @interface TopicDataList */ export interface TopicDataList { - /** - * - * @type {string} - * @memberof TopicDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof TopicDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof TopicDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof TopicDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof TopicDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof TopicDataList + */ + data: Array; } /** * Check if a given object implements the TopicDataList interface. */ export function instanceOfTopicDataList(value: object): value is TopicDataList { - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function TopicDataListFromJSON(json: any): TopicDataList { - return TopicDataListFromJSONTyped(json, false); + return TopicDataListFromJSONTyped(json, false); } export function TopicDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicDataList { - if (json == null) { - return json; - } - return { - kind: json["kind"], - metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(TopicDataFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(TopicDataFromJSON)), + }; } export function TopicDataListToJSON(json: any): TopicDataList { - return TopicDataListToJSONTyped(json, false); + return TopicDataListToJSONTyped(json, false); } -export function TopicDataListToJSONTyped( - value?: TopicDataList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TopicDataListToJSONTyped(value?: TopicDataList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kind: value["kind"], - metadata: ResourceCollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(TopicDataToJSON), - }; + return { + + 'kind': value['kind'], + 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(TopicDataToJSON)), + }; } + diff --git a/src/clients/kafkaRest/models/UpdateConfigRequestData.ts b/src/clients/kafkaRest/models/UpdateConfigRequestData.ts index be0eb508de..1a7b32ff7e 100644 --- a/src/clients/kafkaRest/models/UpdateConfigRequestData.ts +++ b/src/clients/kafkaRest/models/UpdateConfigRequestData.ts @@ -5,64 +5,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UpdateConfigRequestData */ export interface UpdateConfigRequestData { - /** - * - * @type {string} - * @memberof UpdateConfigRequestData - */ - value?: string | null; + /** + * + * @type {string} + * @memberof UpdateConfigRequestData + */ + value?: string | null; } /** * Check if a given object implements the UpdateConfigRequestData interface. */ export function instanceOfUpdateConfigRequestData(value: object): value is UpdateConfigRequestData { - return true; + return true; } export function UpdateConfigRequestDataFromJSON(json: any): UpdateConfigRequestData { - return UpdateConfigRequestDataFromJSONTyped(json, false); + return UpdateConfigRequestDataFromJSONTyped(json, false); } -export function UpdateConfigRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateConfigRequestData { - if (json == null) { - return json; - } - return { - value: json["value"] == null ? undefined : json["value"], - }; +export function UpdateConfigRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateConfigRequestData { + if (json == null) { + return json; + } + return { + + 'value': json['value'] == null ? undefined : json['value'], + }; } export function UpdateConfigRequestDataToJSON(json: any): UpdateConfigRequestData { - return UpdateConfigRequestDataToJSONTyped(json, false); + return UpdateConfigRequestDataToJSONTyped(json, false); } -export function UpdateConfigRequestDataToJSONTyped( - value?: UpdateConfigRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateConfigRequestDataToJSONTyped(value?: UpdateConfigRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - value: value["value"], - }; + return { + + 'value': value['value'], + }; } + diff --git a/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts b/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts index 50fe7e8a05..4cc1762c73 100644 --- a/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts +++ b/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts @@ -5,67 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UpdateLinkConfigRequestData */ export interface UpdateLinkConfigRequestData { - /** - * - * @type {string} - * @memberof UpdateLinkConfigRequestData - */ - value: string; + /** + * + * @type {string} + * @memberof UpdateLinkConfigRequestData + */ + value: string; } /** * Check if a given object implements the UpdateLinkConfigRequestData interface. */ -export function instanceOfUpdateLinkConfigRequestData( - value: object, -): value is UpdateLinkConfigRequestData { - if (!("value" in value) || value["value"] === undefined) return false; - return true; +export function instanceOfUpdateLinkConfigRequestData(value: object): value is UpdateLinkConfigRequestData { + if (!('value' in value) || value['value'] === undefined) return false; + return true; } export function UpdateLinkConfigRequestDataFromJSON(json: any): UpdateLinkConfigRequestData { - return UpdateLinkConfigRequestDataFromJSONTyped(json, false); + return UpdateLinkConfigRequestDataFromJSONTyped(json, false); } -export function UpdateLinkConfigRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateLinkConfigRequestData { - if (json == null) { - return json; - } - return { - value: json["value"], - }; +export function UpdateLinkConfigRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLinkConfigRequestData { + if (json == null) { + return json; + } + return { + + 'value': json['value'], + }; } export function UpdateLinkConfigRequestDataToJSON(json: any): UpdateLinkConfigRequestData { - return UpdateLinkConfigRequestDataToJSONTyped(json, false); + return UpdateLinkConfigRequestDataToJSONTyped(json, false); } -export function UpdateLinkConfigRequestDataToJSONTyped( - value?: UpdateLinkConfigRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateLinkConfigRequestDataToJSONTyped(value?: UpdateLinkConfigRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - value: value["value"], - }; + return { + + 'value': value['value'], + }; } + diff --git a/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts b/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts index 018f8a2975..452a57d9e6 100644 --- a/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts +++ b/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts @@ -5,69 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UpdatePartitionCountRequestData */ export interface UpdatePartitionCountRequestData { - /** - * - * @type {number} - * @memberof UpdatePartitionCountRequestData - */ - partitions_count: number; + /** + * + * @type {number} + * @memberof UpdatePartitionCountRequestData + */ + partitions_count: number; } /** * Check if a given object implements the UpdatePartitionCountRequestData interface. */ -export function instanceOfUpdatePartitionCountRequestData( - value: object, -): value is UpdatePartitionCountRequestData { - if (!("partitions_count" in value) || value["partitions_count"] === undefined) return false; - return true; +export function instanceOfUpdatePartitionCountRequestData(value: object): value is UpdatePartitionCountRequestData { + if (!('partitions_count' in value) || value['partitions_count'] === undefined) return false; + return true; } -export function UpdatePartitionCountRequestDataFromJSON( - json: any, -): UpdatePartitionCountRequestData { - return UpdatePartitionCountRequestDataFromJSONTyped(json, false); +export function UpdatePartitionCountRequestDataFromJSON(json: any): UpdatePartitionCountRequestData { + return UpdatePartitionCountRequestDataFromJSONTyped(json, false); } -export function UpdatePartitionCountRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdatePartitionCountRequestData { - if (json == null) { - return json; - } - return { - partitions_count: json["partitions_count"], - }; +export function UpdatePartitionCountRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePartitionCountRequestData { + if (json == null) { + return json; + } + return { + + 'partitions_count': json['partitions_count'], + }; } export function UpdatePartitionCountRequestDataToJSON(json: any): UpdatePartitionCountRequestData { - return UpdatePartitionCountRequestDataToJSONTyped(json, false); + return UpdatePartitionCountRequestDataToJSONTyped(json, false); } -export function UpdatePartitionCountRequestDataToJSONTyped( - value?: UpdatePartitionCountRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdatePartitionCountRequestDataToJSONTyped(value?: UpdatePartitionCountRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partitions_count: value["partitions_count"], - }; + return { + + 'partitions_count': value['partitions_count'], + }; } + diff --git a/src/clients/kafkaRest/models/index.ts b/src/clients/kafkaRest/models/index.ts index 6081a0bec1..0d4af59ad8 100644 --- a/src/clients/kafkaRest/models/index.ts +++ b/src/clients/kafkaRest/models/index.ts @@ -1,89 +1,89 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./AbstractConfigData"; -export * from "./AclData"; -export * from "./AclDataList"; -export * from "./AclResourceType"; -export * from "./AlterBrokerReplicaExclusionData"; -export * from "./AlterBrokerReplicaExclusionDataList"; -export * from "./AlterConfigBatchRequestData"; -export * from "./AlterConfigBatchRequestDataDataInner"; -export * from "./AlterMirrorStatusResponseData"; -export * from "./AlterMirrorStatusResponseDataList"; -export * from "./AlterMirrorsRequestData"; -export * from "./AnyUnevenLoadData"; -export * from "./BalancerStatusData"; -export * from "./BrokerConfigData"; -export * from "./BrokerConfigDataList"; -export * from "./BrokerData"; -export * from "./BrokerDataList"; -export * from "./BrokerRemovalData"; -export * from "./BrokerRemovalDataList"; -export * from "./BrokerReplicaExclusionBatchRequestData"; -export * from "./BrokerReplicaExclusionData"; -export * from "./BrokerReplicaExclusionDataList"; -export * from "./BrokerReplicaExclusionRequestData"; -export * from "./BrokerTaskData"; -export * from "./BrokerTaskDataList"; -export * from "./BrokerTaskType"; -export * from "./ClusterConfigData"; -export * from "./ClusterConfigDataList"; -export * from "./ClusterData"; -export * from "./ClusterDataList"; -export * from "./ConfigData"; -export * from "./ConfigSynonymData"; -export * from "./ConsumerAssignmentData"; -export * from "./ConsumerAssignmentDataList"; -export * from "./ConsumerData"; -export * from "./ConsumerDataList"; -export * from "./ConsumerGroupData"; -export * from "./ConsumerGroupDataList"; -export * from "./ConsumerGroupLagSummaryData"; -export * from "./ConsumerLagData"; -export * from "./ConsumerLagDataList"; -export * from "./CreateAclRequestData"; -export * from "./CreateAclRequestDataList"; -export * from "./CreateLinkRequestData"; -export * from "./CreateMirrorTopicRequestData"; -export * from "./CreateTopicRequestData"; -export * from "./CreateTopicRequestDataConfigsInner"; -export * from "./DeleteKafkaAcls200Response"; -export * from "./LinkTask"; -export * from "./LinkTaskError"; -export * from "./ListLinkConfigsResponseData"; -export * from "./ListLinkConfigsResponseDataList"; -export * from "./ListLinksResponseData"; -export * from "./ListLinksResponseDataList"; -export * from "./ListMirrorTopicsResponseData"; -export * from "./ListMirrorTopicsResponseDataList"; -export * from "./MirrorLag"; -export * from "./MirrorTopicStatus"; -export * from "./ModelError"; -export * from "./PartitionData"; -export * from "./PartitionDataList"; -export * from "./ProduceRequest"; -export * from "./ProduceRequestData"; -export * from "./ProduceRequestHeader"; -export * from "./ProduceResponse"; -export * from "./ProduceResponseData"; -export * from "./ReassignmentData"; -export * from "./ReassignmentDataList"; -export * from "./Relationship"; -export * from "./RemoveBrokerTaskData"; -export * from "./RemoveBrokerTaskDataList"; -export * from "./RemoveBrokersRequestData"; -export * from "./ReplicaData"; -export * from "./ReplicaDataList"; -export * from "./ReplicaStatusData"; -export * from "./ReplicaStatusDataList"; -export * from "./Resource"; -export * from "./ResourceCollection"; -export * from "./ResourceCollectionMetadata"; -export * from "./ResourceMetadata"; -export * from "./TopicConfigData"; -export * from "./TopicConfigDataList"; -export * from "./TopicData"; -export * from "./TopicDataList"; -export * from "./UpdateConfigRequestData"; -export * from "./UpdateLinkConfigRequestData"; -export * from "./UpdatePartitionCountRequestData"; +export * from './AbstractConfigData'; +export * from './AclData'; +export * from './AclDataList'; +export * from './AclResourceType'; +export * from './AlterBrokerReplicaExclusionData'; +export * from './AlterBrokerReplicaExclusionDataList'; +export * from './AlterConfigBatchRequestData'; +export * from './AlterConfigBatchRequestDataDataInner'; +export * from './AlterMirrorStatusResponseData'; +export * from './AlterMirrorStatusResponseDataList'; +export * from './AlterMirrorsRequestData'; +export * from './AnyUnevenLoadData'; +export * from './BalancerStatusData'; +export * from './BrokerConfigData'; +export * from './BrokerConfigDataList'; +export * from './BrokerData'; +export * from './BrokerDataList'; +export * from './BrokerRemovalData'; +export * from './BrokerRemovalDataList'; +export * from './BrokerReplicaExclusionBatchRequestData'; +export * from './BrokerReplicaExclusionData'; +export * from './BrokerReplicaExclusionDataList'; +export * from './BrokerReplicaExclusionRequestData'; +export * from './BrokerTaskData'; +export * from './BrokerTaskDataList'; +export * from './BrokerTaskType'; +export * from './ClusterConfigData'; +export * from './ClusterConfigDataList'; +export * from './ClusterData'; +export * from './ClusterDataList'; +export * from './ConfigData'; +export * from './ConfigSynonymData'; +export * from './ConsumerAssignmentData'; +export * from './ConsumerAssignmentDataList'; +export * from './ConsumerData'; +export * from './ConsumerDataList'; +export * from './ConsumerGroupData'; +export * from './ConsumerGroupDataList'; +export * from './ConsumerGroupLagSummaryData'; +export * from './ConsumerLagData'; +export * from './ConsumerLagDataList'; +export * from './CreateAclRequestData'; +export * from './CreateAclRequestDataList'; +export * from './CreateLinkRequestData'; +export * from './CreateMirrorTopicRequestData'; +export * from './CreateTopicRequestData'; +export * from './CreateTopicRequestDataConfigsInner'; +export * from './DeleteKafkaAcls200Response'; +export * from './LinkTask'; +export * from './LinkTaskError'; +export * from './ListLinkConfigsResponseData'; +export * from './ListLinkConfigsResponseDataList'; +export * from './ListLinksResponseData'; +export * from './ListLinksResponseDataList'; +export * from './ListMirrorTopicsResponseData'; +export * from './ListMirrorTopicsResponseDataList'; +export * from './MirrorLag'; +export * from './MirrorTopicStatus'; +export * from './ModelError'; +export * from './PartitionData'; +export * from './PartitionDataList'; +export * from './ProduceRequest'; +export * from './ProduceRequestData'; +export * from './ProduceRequestHeader'; +export * from './ProduceResponse'; +export * from './ProduceResponseData'; +export * from './ReassignmentData'; +export * from './ReassignmentDataList'; +export * from './Relationship'; +export * from './RemoveBrokerTaskData'; +export * from './RemoveBrokerTaskDataList'; +export * from './RemoveBrokersRequestData'; +export * from './ReplicaData'; +export * from './ReplicaDataList'; +export * from './ReplicaStatusData'; +export * from './ReplicaStatusDataList'; +export * from './Resource'; +export * from './ResourceCollection'; +export * from './ResourceCollectionMetadata'; +export * from './ResourceMetadata'; +export * from './TopicConfigData'; +export * from './TopicConfigDataList'; +export * from './TopicData'; +export * from './TopicDataList'; +export * from './UpdateConfigRequestData'; +export * from './UpdateLinkConfigRequestData'; +export * from './UpdatePartitionCountRequestData'; diff --git a/src/clients/kafkaRest/runtime.ts b/src/clients/kafkaRest/runtime.ts index 068388de1a..e8b3d25d7a 100644 --- a/src/clients/kafkaRest/runtime.ts +++ b/src/clients/kafkaRest/runtime.ts @@ -5,85 +5,83 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://pkc-00000.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/medusa/apis/BatchManagementApi.ts b/src/clients/medusa/apis/BatchManagementApi.ts index 5031c4eb78..392ba17015 100644 --- a/src/clients/medusa/apis/BatchManagementApi.ts +++ b/src/clients/medusa/apis/BatchManagementApi.ts @@ -5,151 +5,136 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { DatasetDTO, EventMessageList, EventStreamSimulationList } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + DatasetDTO, + EventMessageList, + EventStreamSimulationList, +} from '../models/index'; import { - DatasetDTOFromJSON, - DatasetDTOToJSON, - EventMessageListFromJSON, - EventMessageListToJSON, - EventStreamSimulationListFromJSON, - EventStreamSimulationListToJSON, -} from "../models/index"; + DatasetDTOFromJSON, + DatasetDTOToJSON, + EventMessageListFromJSON, + EventMessageListToJSON, + EventStreamSimulationListFromJSON, + EventStreamSimulationListToJSON, +} from '../models/index'; export interface GenerateEventMessageBatchRequest { - DatasetDTO: DatasetDTO; - event_name?: string; - count?: number; + DatasetDTO: DatasetDTO; + event_name?: string; + count?: number; } export interface StreamSimulationRequest { - DatasetDTO: DatasetDTO; - event_name?: string; - simulation_length_minutes?: number; + DatasetDTO: DatasetDTO; + event_name?: string; + simulation_length_minutes?: number; } /** - * + * */ export class BatchManagementApi extends runtime.BaseAPI { - /** - * Generates a batch of event messages based on the provided configuration - * Generate batch events - */ - async generateEventMessageBatchRaw( - requestParameters: GenerateEventMessageBatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["DatasetDTO"] == null) { - throw new runtime.RequiredError( - "DatasetDTO", - 'Required parameter "DatasetDTO" was null or undefined when calling generateEventMessageBatch().', - ); - } - const queryParameters: any = {}; - - if (requestParameters["event_name"] != null) { - queryParameters["event_name"] = requestParameters["event_name"]; - } - - if (requestParameters["count"] != null) { - queryParameters["count"] = requestParameters["count"]; + /** + * Generates a batch of event messages based on the provided configuration + * Generate batch events + */ + async generateEventMessageBatchRaw(requestParameters: GenerateEventMessageBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['DatasetDTO'] == null) { + throw new runtime.RequiredError( + 'DatasetDTO', + 'Required parameter "DatasetDTO" was null or undefined when calling generateEventMessageBatch().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['event_name'] != null) { + queryParameters['event_name'] = requestParameters['event_name']; + } + + if (requestParameters['count'] != null) { + queryParameters['count'] = requestParameters['count']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/v1/batch`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters['DatasetDTO']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMessageListFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/v1/batch`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - EventMessageListFromJSON(jsonValue), - ); - } - - /** - * Generates a batch of event messages based on the provided configuration - * Generate batch events - */ - async generateEventMessageBatch( - requestParameters: GenerateEventMessageBatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.generateEventMessageBatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Simulates stream behavior over a specified time period - * Simulate stream - */ - async streamSimulationRaw( - requestParameters: StreamSimulationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["DatasetDTO"] == null) { - throw new runtime.RequiredError( - "DatasetDTO", - 'Required parameter "DatasetDTO" was null or undefined when calling streamSimulation().', - ); + /** + * Generates a batch of event messages based on the provided configuration + * Generate batch events + */ + async generateEventMessageBatch(requestParameters: GenerateEventMessageBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.generateEventMessageBatchRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["event_name"] != null) { - queryParameters["event_name"] = requestParameters["event_name"]; + /** + * Simulates stream behavior over a specified time period + * Simulate stream + */ + async streamSimulationRaw(requestParameters: StreamSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['DatasetDTO'] == null) { + throw new runtime.RequiredError( + 'DatasetDTO', + 'Required parameter "DatasetDTO" was null or undefined when calling streamSimulation().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['event_name'] != null) { + queryParameters['event_name'] = requestParameters['event_name']; + } + + if (requestParameters['simulation_length_minutes'] != null) { + queryParameters['simulation_length_minutes'] = requestParameters['simulation_length_minutes']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/v1/batch/stream-simulation`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters['DatasetDTO']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventStreamSimulationListFromJSON(jsonValue)); } - if (requestParameters["simulation_length_minutes"] != null) { - queryParameters["simulation_length_minutes"] = requestParameters["simulation_length_minutes"]; + /** + * Simulates stream behavior over a specified time period + * Simulate stream + */ + async streamSimulation(requestParameters: StreamSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.streamSimulationRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/v1/batch/stream-simulation`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - EventStreamSimulationListFromJSON(jsonValue), - ); - } - - /** - * Simulates stream behavior over a specified time period - * Simulate stream - */ - async streamSimulation( - requestParameters: StreamSimulationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.streamSimulationRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/medusa/apis/ConfluentProducerControllerApi.ts b/src/clients/medusa/apis/ConfluentProducerControllerApi.ts index b1505d15d6..e3d4b13006 100644 --- a/src/clients/medusa/apis/ConfluentProducerControllerApi.ts +++ b/src/clients/medusa/apis/ConfluentProducerControllerApi.ts @@ -5,49 +5,50 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ProducerHealth } from "../models/index"; -import { ProducerHealthFromJSON, ProducerHealthToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ProducerHealth, +} from '../models/index'; +import { + ProducerHealthFromJSON, + ProducerHealthToJSON, +} from '../models/index'; /** - * + * */ export class ConfluentProducerControllerApi extends runtime.BaseAPI { - /** - */ - async producersStartedRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/confluent-producer/health`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProducerHealthFromJSON(jsonValue)); - } - - /** - */ - async producersStarted( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.producersStartedRaw(initOverrides); - return await response.value(); - } + + /** + */ + async producersStartedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/confluent-producer/health`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProducerHealthFromJSON(jsonValue)); + } + + /** + */ + async producersStarted(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.producersStartedRaw(initOverrides); + return await response.value(); + } + } diff --git a/src/clients/medusa/apis/EventThrottlersApi.ts b/src/clients/medusa/apis/EventThrottlersApi.ts index 09550ba1ec..454a6a70b5 100644 --- a/src/clients/medusa/apis/EventThrottlersApi.ts +++ b/src/clients/medusa/apis/EventThrottlersApi.ts @@ -5,58 +5,54 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { EventThrottlerDetailsList } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + EventThrottlerDetailsList, +} from '../models/index'; import { - EventThrottlerDetailsListFromJSON, - EventThrottlerDetailsListToJSON, -} from "../models/index"; + EventThrottlerDetailsListFromJSON, + EventThrottlerDetailsListToJSON, +} from '../models/index'; /** - * + * */ export class EventThrottlersApi extends runtime.BaseAPI { - /** - * Returns a list of all available event throttlers and their details - * Get all event throttlers - */ - async getAllEventThrottlerDetailsRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/event-throttlers`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - EventThrottlerDetailsListFromJSON(jsonValue), - ); - } - - /** - * Returns a list of all available event throttlers and their details - * Get all event throttlers - */ - async getAllEventThrottlerDetails( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getAllEventThrottlerDetailsRaw(initOverrides); - return await response.value(); - } + + /** + * Returns a list of all available event throttlers and their details + * Get all event throttlers + */ + async getAllEventThrottlerDetailsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/event-throttlers`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventThrottlerDetailsListFromJSON(jsonValue)); + } + + /** + * Returns a list of all available event throttlers and their details + * Get all event throttlers + */ + async getAllEventThrottlerDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAllEventThrottlerDetailsRaw(initOverrides); + return await response.value(); + } + } diff --git a/src/clients/medusa/apis/ExampleDatasetsApi.ts b/src/clients/medusa/apis/ExampleDatasetsApi.ts index 5ffdcdf414..bfedaab82e 100644 --- a/src/clients/medusa/apis/ExampleDatasetsApi.ts +++ b/src/clients/medusa/apis/ExampleDatasetsApi.ts @@ -5,55 +5,54 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ExampleDatasetList } from "../models/index"; -import { ExampleDatasetListFromJSON, ExampleDatasetListToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ExampleDatasetList, +} from '../models/index'; +import { + ExampleDatasetListFromJSON, + ExampleDatasetListToJSON, +} from '../models/index'; /** - * + * */ export class ExampleDatasetsApi extends runtime.BaseAPI { - /** - * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios - * Get all example datasets - */ - async getAllExampleDatasetsRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/examples/datasets`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExampleDatasetListFromJSON(jsonValue), - ); - } - - /** - * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios - * Get all example datasets - */ - async getAllExampleDatasets( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getAllExampleDatasetsRaw(initOverrides); - return await response.value(); - } + + /** + * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios + * Get all example datasets + */ + async getAllExampleDatasetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/examples/datasets`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExampleDatasetListFromJSON(jsonValue)); + } + + /** + * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios + * Get all example datasets + */ + async getAllExampleDatasets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAllExampleDatasetsRaw(initOverrides); + return await response.value(); + } + } diff --git a/src/clients/medusa/apis/SchemaManagementApi.ts b/src/clients/medusa/apis/SchemaManagementApi.ts index 37d6b59972..8b213b6035 100644 --- a/src/clients/medusa/apis/SchemaManagementApi.ts +++ b/src/clients/medusa/apis/SchemaManagementApi.ts @@ -5,190 +5,162 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { AvroSchemaResponseList, DatasetDTO } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + AvroSchemaResponseList, + DatasetDTO, +} from '../models/index'; import { - AvroSchemaResponseListFromJSON, - AvroSchemaResponseListToJSON, - DatasetDTOFromJSON, - DatasetDTOToJSON, -} from "../models/index"; + AvroSchemaResponseListFromJSON, + AvroSchemaResponseListToJSON, + DatasetDTOFromJSON, + DatasetDTOToJSON, +} from '../models/index'; export interface ConvertAvroSchemaToDatasetRequest { - body: string; + body: string; } export interface GetAvroSchemaRequest { - DatasetDTO: DatasetDTO; - event_name?: string; + DatasetDTO: DatasetDTO; + event_name?: string; } export interface GetAvroSchemasForStreamRequest { - streamId: string; - event_name?: string; + streamId: string; + event_name?: string; } /** - * + * */ export class SchemaManagementApi extends runtime.BaseAPI { - /** - * Converts an Avro schema into a streaming dataset configuration - * Convert Avro schema to dataset - */ - async convertAvroSchemaToDatasetRaw( - requestParameters: ConvertAvroSchemaToDatasetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling convertAvroSchemaToDataset().', - ); - } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/v1/schemas/avro/convert`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: requestParameters["body"] as any, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => DatasetDTOFromJSON(jsonValue)); - } - - /** - * Converts an Avro schema into a streaming dataset configuration - * Convert Avro schema to dataset - */ - async convertAvroSchemaToDataset( - requestParameters: ConvertAvroSchemaToDatasetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.convertAvroSchemaToDatasetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns Avro schemas for a Dataset - * Get Avro schemas for a Dataset - */ - async getAvroSchemaRaw( - requestParameters: GetAvroSchemaRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["DatasetDTO"] == null) { - throw new runtime.RequiredError( - "DatasetDTO", - 'Required parameter "DatasetDTO" was null or undefined when calling getAvroSchema().', - ); + /** + * Converts an Avro schema into a streaming dataset configuration + * Convert Avro schema to dataset + */ + async convertAvroSchemaToDatasetRaw(requestParameters: ConvertAvroSchemaToDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling convertAvroSchemaToDataset().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/v1/schemas/avro/convert`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body'] as any, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DatasetDTOFromJSON(jsonValue)); } - const queryParameters: any = {}; + /** + * Converts an Avro schema into a streaming dataset configuration + * Convert Avro schema to dataset + */ + async convertAvroSchemaToDataset(requestParameters: ConvertAvroSchemaToDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.convertAvroSchemaToDatasetRaw(requestParameters, initOverrides); + return await response.value(); + } - if (requestParameters["event_name"] != null) { - queryParameters["event_name"] = requestParameters["event_name"]; + /** + * Returns Avro schemas for a Dataset + * Get Avro schemas for a Dataset + */ + async getAvroSchemaRaw(requestParameters: GetAvroSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['DatasetDTO'] == null) { + throw new runtime.RequiredError( + 'DatasetDTO', + 'Required parameter "DatasetDTO" was null or undefined when calling getAvroSchema().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['event_name'] != null) { + queryParameters['event_name'] = requestParameters['event_name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/v1/schemas/avro`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters['DatasetDTO']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AvroSchemaResponseListFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/v1/schemas/avro`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AvroSchemaResponseListFromJSON(jsonValue), - ); - } - - /** - * Returns Avro schemas for a Dataset - * Get Avro schemas for a Dataset - */ - async getAvroSchema( - requestParameters: GetAvroSchemaRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getAvroSchemaRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns Avro schemas for an existing stream - * Get Avro schemas for existing stream - */ - async getAvroSchemasForStreamRaw( - requestParameters: GetAvroSchemasForStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["streamId"] == null) { - throw new runtime.RequiredError( - "streamId", - 'Required parameter "streamId" was null or undefined when calling getAvroSchemasForStream().', - ); + /** + * Returns Avro schemas for a Dataset + * Get Avro schemas for a Dataset + */ + async getAvroSchema(requestParameters: GetAvroSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAvroSchemaRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Returns Avro schemas for an existing stream + * Get Avro schemas for existing stream + */ + async getAvroSchemasForStreamRaw(requestParameters: GetAvroSchemasForStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['streamId'] == null) { + throw new runtime.RequiredError( + 'streamId', + 'Required parameter "streamId" was null or undefined when calling getAvroSchemasForStream().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['event_name'] != null) { + queryParameters['event_name'] = requestParameters['event_name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/schemas/avro/stream/{streamId}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => AvroSchemaResponseListFromJSON(jsonValue)); + } - if (requestParameters["event_name"] != null) { - queryParameters["event_name"] = requestParameters["event_name"]; + /** + * Returns Avro schemas for an existing stream + * Get Avro schemas for existing stream + */ + async getAvroSchemasForStream(requestParameters: GetAvroSchemasForStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAvroSchemasForStreamRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/schemas/avro/stream/{streamId}`.replace( - `{${"streamId"}}`, - encodeURIComponent(String(requestParameters["streamId"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - AvroSchemaResponseListFromJSON(jsonValue), - ); - } - - /** - * Returns Avro schemas for an existing stream - * Get Avro schemas for existing stream - */ - async getAvroSchemasForStream( - requestParameters: GetAvroSchemasForStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getAvroSchemasForStreamRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/medusa/apis/StreamManagementApi.ts b/src/clients/medusa/apis/StreamManagementApi.ts index 5ec9e9ff82..9b3d0f60a1 100644 --- a/src/clients/medusa/apis/StreamManagementApi.ts +++ b/src/clients/medusa/apis/StreamManagementApi.ts @@ -5,240 +5,201 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { DatasetDTO, StreamDetails } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + DatasetDTO, + StreamDetails, +} from '../models/index'; import { - DatasetDTOFromJSON, - DatasetDTOToJSON, - StreamDetailsFromJSON, - StreamDetailsToJSON, -} from "../models/index"; + DatasetDTOFromJSON, + DatasetDTOToJSON, + StreamDetailsFromJSON, + StreamDetailsToJSON, +} from '../models/index'; export interface BuildStreamRequest { - DatasetDTO: DatasetDTO; + DatasetDTO: DatasetDTO; } export interface BuildStreamWithIdRequest { - streamId: string; - DatasetDTO: DatasetDTO; + streamId: string; + DatasetDTO: DatasetDTO; } export interface GetDatasetStreamRequest { - streamId: string; - event_name?: string; + streamId: string; + event_name?: string; } export interface StartDatasetStreamRequest { - streamId: string; + streamId: string; } /** - * + * */ export class StreamManagementApi extends runtime.BaseAPI { - /** - * Build a new stream - */ - async buildStreamRaw( - requestParameters: BuildStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["DatasetDTO"] == null) { - throw new runtime.RequiredError( - "DatasetDTO", - 'Required parameter "DatasetDTO" was null or undefined when calling buildStream().', - ); + + /** + * Build a new stream + */ + async buildStreamRaw(requestParameters: BuildStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['DatasetDTO'] == null) { + throw new runtime.RequiredError( + 'DatasetDTO', + 'Required parameter "DatasetDTO" was null or undefined when calling buildStream().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/v1/streams`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters['DatasetDTO']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/v1/streams`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); - } - - /** - * Build a new stream - */ - async buildStream( - requestParameters: BuildStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.buildStreamRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates a new stream with a provided ID - * Build a stream with specific ID - */ - async buildStreamWithIdRaw( - requestParameters: BuildStreamWithIdRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["streamId"] == null) { - throw new runtime.RequiredError( - "streamId", - 'Required parameter "streamId" was null or undefined when calling buildStreamWithId().', - ); + /** + * Build a new stream + */ + async buildStream(requestParameters: BuildStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.buildStreamRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["DatasetDTO"] == null) { - throw new runtime.RequiredError( - "DatasetDTO", - 'Required parameter "DatasetDTO" was null or undefined when calling buildStreamWithId().', - ); + /** + * Creates a new stream with a provided ID + * Build a stream with specific ID + */ + async buildStreamWithIdRaw(requestParameters: BuildStreamWithIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['streamId'] == null) { + throw new runtime.RequiredError( + 'streamId', + 'Required parameter "streamId" was null or undefined when calling buildStreamWithId().' + ); + } + + if (requestParameters['DatasetDTO'] == null) { + throw new runtime.RequiredError( + 'DatasetDTO', + 'Required parameter "DatasetDTO" was null or undefined when calling buildStreamWithId().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/v1/streams/{streamId}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters['DatasetDTO']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/v1/streams/{streamId}`.replace( - `{${"streamId"}}`, - encodeURIComponent(String(requestParameters["streamId"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); - } - - /** - * Creates a new stream with a provided ID - * Build a stream with specific ID - */ - async buildStreamWithId( - requestParameters: BuildStreamWithIdRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.buildStreamWithIdRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` - * Subscribe to stream events - */ - async getDatasetStreamRaw( - requestParameters: GetDatasetStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["streamId"] == null) { - throw new runtime.RequiredError( - "streamId", - 'Required parameter "streamId" was null or undefined when calling getDatasetStream().', - ); + /** + * Creates a new stream with a provided ID + * Build a stream with specific ID + */ + async buildStreamWithId(requestParameters: BuildStreamWithIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.buildStreamWithIdRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; + /** + * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` + * Subscribe to stream events + */ + async getDatasetStreamRaw(requestParameters: GetDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['streamId'] == null) { + throw new runtime.RequiredError( + 'streamId', + 'Required parameter "streamId" was null or undefined when calling getDatasetStream().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['event_name'] != null) { + queryParameters['event_name'] = requestParameters['event_name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/streams/{streamId}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` + * Subscribe to stream events + */ + async getDatasetStream(requestParameters: GetDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.getDatasetStreamRaw(requestParameters, initOverrides); + } - if (requestParameters["event_name"] != null) { - queryParameters["event_name"] = requestParameters["event_name"]; + /** + * Initiates data streaming for the specified stream + * Start a stream + */ + async startDatasetStreamRaw(requestParameters: StartDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['streamId'] == null) { + throw new runtime.RequiredError( + 'streamId', + 'Required parameter "streamId" was null or undefined when calling startDatasetStream().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/streams/{streamId}/start`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/streams/{streamId}`.replace( - `{${"streamId"}}`, - encodeURIComponent(String(requestParameters["streamId"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` - * Subscribe to stream events - */ - async getDatasetStream( - requestParameters: GetDatasetStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.getDatasetStreamRaw(requestParameters, initOverrides); - } - - /** - * Initiates data streaming for the specified stream - * Start a stream - */ - async startDatasetStreamRaw( - requestParameters: StartDatasetStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["streamId"] == null) { - throw new runtime.RequiredError( - "streamId", - 'Required parameter "streamId" was null or undefined when calling startDatasetStream().', - ); + /** + * Initiates data streaming for the specified stream + * Start a stream + */ + async startDatasetStream(requestParameters: StartDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.startDatasetStreamRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/streams/{streamId}/start`.replace( - `{${"streamId"}}`, - encodeURIComponent(String(requestParameters["streamId"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); - } - - /** - * Initiates data streaming for the specified stream - * Start a stream - */ - async startDatasetStream( - requestParameters: StartDatasetStreamRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.startDatasetStreamRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/medusa/apis/ValueGeneratorsApi.ts b/src/clients/medusa/apis/ValueGeneratorsApi.ts index 04e1f8f512..9ffb9cf61f 100644 --- a/src/clients/medusa/apis/ValueGeneratorsApi.ts +++ b/src/clients/medusa/apis/ValueGeneratorsApi.ts @@ -5,207 +5,166 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CategoryList, ValueGeneratorDetails, ValueGeneratorDetailsList, -} from "../models/index"; +} from '../models/index'; import { - CategoryListFromJSON, - CategoryListToJSON, - ValueGeneratorDetailsFromJSON, - ValueGeneratorDetailsToJSON, - ValueGeneratorDetailsListFromJSON, - ValueGeneratorDetailsListToJSON, -} from "../models/index"; + CategoryListFromJSON, + CategoryListToJSON, + ValueGeneratorDetailsFromJSON, + ValueGeneratorDetailsToJSON, + ValueGeneratorDetailsListFromJSON, + ValueGeneratorDetailsListToJSON, +} from '../models/index'; export interface GetValueGeneratorDetailsRequest { - valueGeneratorName: string; + valueGeneratorName: string; } export interface GetValueGeneratorsByCategoryRequest { - category: string; + category: string; } /** - * + * */ export class ValueGeneratorsApi extends runtime.BaseAPI { - /** - * Returns a list of all available value generators and their details - * Get all value generators - */ - async getAllValueGeneratorDetailsRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/generators`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ValueGeneratorDetailsListFromJSON(jsonValue), - ); - } - - /** - * Returns a list of all available value generators and their details - * Get all value generators - */ - async getAllValueGeneratorDetails( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getAllValueGeneratorDetailsRaw(initOverrides); - return await response.value(); - } - - /** - * Returns a list of all available value generator categories - * Get all generator categories - */ - async getValueGeneratorCategoriesRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/generators/categories`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => CategoryListFromJSON(jsonValue)); - } - - /** - * Returns a list of all available value generator categories - * Get all generator categories - */ - async getValueGeneratorCategories( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getValueGeneratorCategoriesRaw(initOverrides); - return await response.value(); - } - - /** - * Returns details for a specific value generator - * Get value generator by name - */ - async getValueGeneratorDetailsRaw( - requestParameters: GetValueGeneratorDetailsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["valueGeneratorName"] == null) { - throw new runtime.RequiredError( - "valueGeneratorName", - 'Required parameter "valueGeneratorName" was null or undefined when calling getValueGeneratorDetails().', - ); + + /** + * Returns a list of all available value generators and their details + * Get all value generators + */ + async getAllValueGeneratorDetailsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/generators`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ValueGeneratorDetailsListFromJSON(jsonValue)); + } + + /** + * Returns a list of all available value generators and their details + * Get all value generators + */ + async getAllValueGeneratorDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAllValueGeneratorDetailsRaw(initOverrides); + return await response.value(); + } + + /** + * Returns a list of all available value generator categories + * Get all generator categories + */ + async getValueGeneratorCategoriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/generators/categories`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CategoryListFromJSON(jsonValue)); + } + + /** + * Returns a list of all available value generator categories + * Get all generator categories + */ + async getValueGeneratorCategories(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getValueGeneratorCategoriesRaw(initOverrides); + return await response.value(); + } + + /** + * Returns details for a specific value generator + * Get value generator by name + */ + async getValueGeneratorDetailsRaw(requestParameters: GetValueGeneratorDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['valueGeneratorName'] == null) { + throw new runtime.RequiredError( + 'valueGeneratorName', + 'Required parameter "valueGeneratorName" was null or undefined when calling getValueGeneratorDetails().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/generators/{valueGeneratorName}`.replace(`{${"valueGeneratorName"}}`, encodeURIComponent(String(requestParameters['valueGeneratorName']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ValueGeneratorDetailsFromJSON(jsonValue)); + } + + /** + * Returns details for a specific value generator + * Get value generator by name + */ + async getValueGeneratorDetails(requestParameters: GetValueGeneratorDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getValueGeneratorDetailsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns all value generators for a specific category + * Get generators by category + */ + async getValueGeneratorsByCategoryRaw(requestParameters: GetValueGeneratorsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['category'] == null) { + throw new runtime.RequiredError( + 'category', + 'Required parameter "category" was null or undefined when calling getValueGeneratorsByCategory().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/v1/generators/categories/{category}`.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters['category']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ValueGeneratorDetailsListFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/generators/{valueGeneratorName}`.replace( - `{${"valueGeneratorName"}}`, - encodeURIComponent(String(requestParameters["valueGeneratorName"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ValueGeneratorDetailsFromJSON(jsonValue), - ); - } - - /** - * Returns details for a specific value generator - * Get value generator by name - */ - async getValueGeneratorDetails( - requestParameters: GetValueGeneratorDetailsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getValueGeneratorDetailsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns all value generators for a specific category - * Get generators by category - */ - async getValueGeneratorsByCategoryRaw( - requestParameters: GetValueGeneratorsByCategoryRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["category"] == null) { - throw new runtime.RequiredError( - "category", - 'Required parameter "category" was null or undefined when calling getValueGeneratorsByCategory().', - ); + /** + * Returns all value generators for a specific category + * Get generators by category + */ + async getValueGeneratorsByCategory(requestParameters: GetValueGeneratorsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getValueGeneratorsByCategoryRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/v1/generators/categories/{category}`.replace( - `{${"category"}}`, - encodeURIComponent(String(requestParameters["category"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ValueGeneratorDetailsListFromJSON(jsonValue), - ); - } - - /** - * Returns all value generators for a specific category - * Get generators by category - */ - async getValueGeneratorsByCategory( - requestParameters: GetValueGeneratorsByCategoryRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getValueGeneratorsByCategoryRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/medusa/apis/index.ts b/src/clients/medusa/apis/index.ts index fea6561302..bda2603bec 100644 --- a/src/clients/medusa/apis/index.ts +++ b/src/clients/medusa/apis/index.ts @@ -1,9 +1,9 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./BatchManagementApi"; -export * from "./ConfluentProducerControllerApi"; -export * from "./EventThrottlersApi"; -export * from "./ExampleDatasetsApi"; -export * from "./SchemaManagementApi"; -export * from "./StreamManagementApi"; -export * from "./ValueGeneratorsApi"; +export * from './BatchManagementApi'; +export * from './ConfluentProducerControllerApi'; +export * from './EventThrottlersApi'; +export * from './ExampleDatasetsApi'; +export * from './SchemaManagementApi'; +export * from './StreamManagementApi'; +export * from './ValueGeneratorsApi'; diff --git a/src/clients/medusa/index.ts b/src/clients/medusa/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/medusa/index.ts +++ b/src/clients/medusa/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/medusa/models/AvroSchemaResponse.ts b/src/clients/medusa/models/AvroSchemaResponse.ts index 45dbf4821b..dc4fa29e2a 100644 --- a/src/clients/medusa/models/AvroSchemaResponse.ts +++ b/src/clients/medusa/models/AvroSchemaResponse.ts @@ -5,64 +5,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface AvroSchemaResponse */ export interface AvroSchemaResponse { - /** - * - * @type {object} - * @memberof AvroSchemaResponse - */ - schema?: object; + /** + * + * @type {object} + * @memberof AvroSchemaResponse + */ + schema?: object; } /** * Check if a given object implements the AvroSchemaResponse interface. */ export function instanceOfAvroSchemaResponse(value: object): value is AvroSchemaResponse { - return true; + return true; } export function AvroSchemaResponseFromJSON(json: any): AvroSchemaResponse { - return AvroSchemaResponseFromJSONTyped(json, false); + return AvroSchemaResponseFromJSONTyped(json, false); } -export function AvroSchemaResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AvroSchemaResponse { - if (json == null) { - return json; - } - return { - schema: json["schema"] == null ? undefined : json["schema"], - }; +export function AvroSchemaResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AvroSchemaResponse { + if (json == null) { + return json; + } + return { + + 'schema': json['schema'] == null ? undefined : json['schema'], + }; } export function AvroSchemaResponseToJSON(json: any): AvroSchemaResponse { - return AvroSchemaResponseToJSONTyped(json, false); + return AvroSchemaResponseToJSONTyped(json, false); } -export function AvroSchemaResponseToJSONTyped( - value?: AvroSchemaResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AvroSchemaResponseToJSONTyped(value?: AvroSchemaResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - schema: value["schema"], - }; + return { + + 'schema': value['schema'], + }; } + diff --git a/src/clients/medusa/models/AvroSchemaResponseList.ts b/src/clients/medusa/models/AvroSchemaResponseList.ts index 6db0f747ba..39d529eb4f 100644 --- a/src/clients/medusa/models/AvroSchemaResponseList.ts +++ b/src/clients/medusa/models/AvroSchemaResponseList.ts @@ -5,109 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { AvroSchemaResponse } from "./AvroSchemaResponse"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { AvroSchemaResponse } from './AvroSchemaResponse'; import { - AvroSchemaResponseFromJSON, - AvroSchemaResponseFromJSONTyped, - AvroSchemaResponseToJSON, - AvroSchemaResponseToJSONTyped, -} from "./AvroSchemaResponse"; + AvroSchemaResponseFromJSON, + AvroSchemaResponseFromJSONTyped, + AvroSchemaResponseToJSON, + AvroSchemaResponseToJSONTyped, +} from './AvroSchemaResponse'; /** - * + * * @export * @interface AvroSchemaResponseList */ export interface AvroSchemaResponseList { - /** - * - * @type {CollectionMetadata} - * @memberof AvroSchemaResponseList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof AvroSchemaResponseList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof AvroSchemaResponseList - */ - data?: Array; - /** - * - * @type {string} - * @memberof AvroSchemaResponseList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof AvroSchemaResponseList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof AvroSchemaResponseList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof AvroSchemaResponseList + */ + data?: Array; + /** + * + * @type {string} + * @memberof AvroSchemaResponseList + */ + kind?: string; } /** * Check if a given object implements the AvroSchemaResponseList interface. */ export function instanceOfAvroSchemaResponseList(value: object): value is AvroSchemaResponseList { - return true; + return true; } export function AvroSchemaResponseListFromJSON(json: any): AvroSchemaResponseList { - return AvroSchemaResponseListFromJSONTyped(json, false); + return AvroSchemaResponseListFromJSONTyped(json, false); } -export function AvroSchemaResponseListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): AvroSchemaResponseList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: - json["data"] == null - ? undefined - : (json["data"] as Array).map(AvroSchemaResponseFromJSON), - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function AvroSchemaResponseListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AvroSchemaResponseList { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(AvroSchemaResponseFromJSON)), + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function AvroSchemaResponseListToJSON(json: any): AvroSchemaResponseList { - return AvroSchemaResponseListToJSONTyped(json, false); + return AvroSchemaResponseListToJSONTyped(json, false); } -export function AvroSchemaResponseListToJSONTyped( - value?: AvroSchemaResponseList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AvroSchemaResponseListToJSONTyped(value?: AvroSchemaResponseList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: - value["data"] == null - ? undefined - : (value["data"] as Array).map(AvroSchemaResponseToJSON), - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(AvroSchemaResponseToJSON)), + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/CategoryList.ts b/src/clients/medusa/models/CategoryList.ts index faff1c7c8f..383b5dae60 100644 --- a/src/clients/medusa/models/CategoryList.ts +++ b/src/clients/medusa/models/CategoryList.ts @@ -5,119 +5,120 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; /** - * + * * @export * @interface CategoryList */ export interface CategoryList { - /** - * - * @type {CollectionMetadata} - * @memberof CategoryList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof CategoryList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof CategoryList - */ - data?: Array; - /** - * - * @type {string} - * @memberof CategoryList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof CategoryList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof CategoryList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof CategoryList + */ + data?: Array; + /** + * + * @type {string} + * @memberof CategoryList + */ + kind?: string; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CategoryListDataEnum { - Location = "Location", - Boolean = "Boolean", - Commerce = "Commerce", - Company = "Company", - Conditional = "Conditional", - Date = "Date", - Device = "Device", - Finance = "Finance", - Healthcare = "Healthcare", - Internet = "Internet", - Number = "Number", - Person = "Person", - Phone = "Phone", - String = "String", - Struct = "Struct", - Reference = "Reference", - Util = "Util", - Table = "Table", - Vehicle = "Vehicle", + Location = 'Location', + Boolean = 'Boolean', + Commerce = 'Commerce', + Company = 'Company', + Conditional = 'Conditional', + Date = 'Date', + Device = 'Device', + Finance = 'Finance', + Healthcare = 'Healthcare', + Internet = 'Internet', + Number = 'Number', + Person = 'Person', + Phone = 'Phone', + String = 'String', + Struct = 'Struct', + Reference = 'Reference', + Util = 'Util', + Table = 'Table', + Vehicle = 'Vehicle' } + /** * Check if a given object implements the CategoryList interface. */ export function instanceOfCategoryList(value: object): value is CategoryList { - return true; + return true; } export function CategoryListFromJSON(json: any): CategoryList { - return CategoryListFromJSONTyped(json, false); + return CategoryListFromJSONTyped(json, false); } export function CategoryListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: json["data"] == null ? undefined : json["data"], - kind: json["kind"] == null ? undefined : json["kind"], - }; + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : json['data'], + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function CategoryListToJSON(json: any): CategoryList { - return CategoryListToJSONTyped(json, false); + return CategoryListToJSONTyped(json, false); } -export function CategoryListToJSONTyped( - value?: CategoryList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CategoryListToJSONTyped(value?: CategoryList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: value["data"], - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'], + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/CollectionMetadata.ts b/src/clients/medusa/models/CollectionMetadata.ts index a4f6c9ab5c..8cf21120a4 100644 --- a/src/clients/medusa/models/CollectionMetadata.ts +++ b/src/clients/medusa/models/CollectionMetadata.ts @@ -5,72 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CollectionMetadata */ export interface CollectionMetadata { - /** - * - * @type {number} - * @memberof CollectionMetadata - */ - total_size?: number; - /** - * - * @type {string} - * @memberof CollectionMetadata - */ - self?: string; + /** + * + * @type {number} + * @memberof CollectionMetadata + */ + total_size?: number; + /** + * + * @type {string} + * @memberof CollectionMetadata + */ + self?: string; } /** * Check if a given object implements the CollectionMetadata interface. */ export function instanceOfCollectionMetadata(value: object): value is CollectionMetadata { - return true; + return true; } export function CollectionMetadataFromJSON(json: any): CollectionMetadata { - return CollectionMetadataFromJSONTyped(json, false); + return CollectionMetadataFromJSONTyped(json, false); } -export function CollectionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CollectionMetadata { - if (json == null) { - return json; - } - return { - total_size: json["total_size"] == null ? undefined : json["total_size"], - self: json["self"] == null ? undefined : json["self"], - }; +export function CollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionMetadata { + if (json == null) { + return json; + } + return { + + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + 'self': json['self'] == null ? undefined : json['self'], + }; } export function CollectionMetadataToJSON(json: any): CollectionMetadata { - return CollectionMetadataToJSONTyped(json, false); + return CollectionMetadataToJSONTyped(json, false); } -export function CollectionMetadataToJSONTyped( - value?: CollectionMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CollectionMetadataToJSONTyped(value?: CollectionMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - total_size: value["total_size"], - self: value["self"], - }; + return { + + 'total_size': value['total_size'], + 'self': value['self'], + }; } + diff --git a/src/clients/medusa/models/ColumnDTO.ts b/src/clients/medusa/models/ColumnDTO.ts index 2ed9ee7151..0a3ab590af 100644 --- a/src/clients/medusa/models/ColumnDTO.ts +++ b/src/clients/medusa/models/ColumnDTO.ts @@ -5,84 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ColumnDTO */ export interface ColumnDTO { - /** - * - * @type {string} - * @memberof ColumnDTO - */ - name: string; - /** - * - * @type {string} - * @memberof ColumnDTO - */ - type: ColumnDTOTypeEnum; + /** + * + * @type {string} + * @memberof ColumnDTO + */ + name: string; + /** + * + * @type {string} + * @memberof ColumnDTO + */ + type: ColumnDTOTypeEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ColumnDTOTypeEnum { - String = "STRING", - Integer = "INTEGER", - Long = "LONG", - Double = "DOUBLE", - Float = "FLOAT", - Boolean = "BOOLEAN", + String = 'STRING', + Integer = 'INTEGER', + Long = 'LONG', + Double = 'DOUBLE', + Float = 'FLOAT', + Boolean = 'BOOLEAN' } + /** * Check if a given object implements the ColumnDTO interface. */ export function instanceOfColumnDTO(value: object): value is ColumnDTO { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("type" in value) || value["type"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; } export function ColumnDTOFromJSON(json: any): ColumnDTO { - return ColumnDTOFromJSONTyped(json, false); + return ColumnDTOFromJSONTyped(json, false); } export function ColumnDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ColumnDTO { - if (json == null) { - return json; - } - return { - name: json["name"], - type: json["type"], - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'type': json['type'], + }; } export function ColumnDTOToJSON(json: any): ColumnDTO { - return ColumnDTOToJSONTyped(json, false); + return ColumnDTOToJSONTyped(json, false); } -export function ColumnDTOToJSONTyped( - value?: ColumnDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ColumnDTOToJSONTyped(value?: ColumnDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - type: value["type"], - }; + return { + + 'name': value['name'], + 'type': value['type'], + }; } + diff --git a/src/clients/medusa/models/DatasetDTO.ts b/src/clients/medusa/models/DatasetDTO.ts index 9d4bf81c9d..644306416a 100644 --- a/src/clients/medusa/models/DatasetDTO.ts +++ b/src/clients/medusa/models/DatasetDTO.ts @@ -5,87 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { EventDTO } from "./EventDTO"; +import { mapValues } from '../runtime'; +import type { EventDTO } from './EventDTO'; import { - EventDTOFromJSON, - EventDTOFromJSONTyped, - EventDTOToJSON, - EventDTOToJSONTyped, -} from "./EventDTO"; -import type { TableDTO } from "./TableDTO"; + EventDTOFromJSON, + EventDTOFromJSONTyped, + EventDTOToJSON, + EventDTOToJSONTyped, +} from './EventDTO'; +import type { TableDTO } from './TableDTO'; import { - TableDTOFromJSON, - TableDTOFromJSONTyped, - TableDTOToJSON, - TableDTOToJSONTyped, -} from "./TableDTO"; + TableDTOFromJSON, + TableDTOFromJSONTyped, + TableDTOToJSON, + TableDTOToJSONTyped, +} from './TableDTO'; /** - * + * * @export * @interface DatasetDTO */ export interface DatasetDTO { - /** - * - * @type {Array} - * @memberof DatasetDTO - */ - events: Array; - /** - * - * @type {Array} - * @memberof DatasetDTO - */ - tables?: Array; + /** + * + * @type {Array} + * @memberof DatasetDTO + */ + events: Array; + /** + * + * @type {Array} + * @memberof DatasetDTO + */ + tables?: Array; } /** * Check if a given object implements the DatasetDTO interface. */ export function instanceOfDatasetDTO(value: object): value is DatasetDTO { - if (!("events" in value) || value["events"] === undefined) return false; - return true; + if (!('events' in value) || value['events'] === undefined) return false; + return true; } export function DatasetDTOFromJSON(json: any): DatasetDTO { - return DatasetDTOFromJSONTyped(json, false); + return DatasetDTOFromJSONTyped(json, false); } export function DatasetDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatasetDTO { - if (json == null) { - return json; - } - return { - events: (json["events"] as Array).map(EventDTOFromJSON), - tables: - json["tables"] == null ? undefined : (json["tables"] as Array).map(TableDTOFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'events': ((json['events'] as Array).map(EventDTOFromJSON)), + 'tables': json['tables'] == null ? undefined : ((json['tables'] as Array).map(TableDTOFromJSON)), + }; } export function DatasetDTOToJSON(json: any): DatasetDTO { - return DatasetDTOToJSONTyped(json, false); + return DatasetDTOToJSONTyped(json, false); } -export function DatasetDTOToJSONTyped( - value?: DatasetDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function DatasetDTOToJSONTyped(value?: DatasetDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - events: (value["events"] as Array).map(EventDTOToJSON), - tables: - value["tables"] == null ? undefined : (value["tables"] as Array).map(TableDTOToJSON), - }; + return { + + 'events': ((value['events'] as Array).map(EventDTOToJSON)), + 'tables': value['tables'] == null ? undefined : ((value['tables'] as Array).map(TableDTOToJSON)), + }; } + diff --git a/src/clients/medusa/models/EventDTO.ts b/src/clients/medusa/models/EventDTO.ts index 35e1b0e3fe..20af904bb5 100644 --- a/src/clients/medusa/models/EventDTO.ts +++ b/src/clients/medusa/models/EventDTO.ts @@ -5,121 +5,118 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TableLinkDTO } from "./TableLinkDTO"; +import { mapValues } from '../runtime'; +import type { TableLinkDTO } from './TableLinkDTO'; import { - TableLinkDTOFromJSON, - TableLinkDTOFromJSONTyped, - TableLinkDTOToJSON, - TableLinkDTOToJSONTyped, -} from "./TableLinkDTO"; -import type { EventThrottlerDTO } from "./EventThrottlerDTO"; + TableLinkDTOFromJSON, + TableLinkDTOFromJSONTyped, + TableLinkDTOToJSON, + TableLinkDTOToJSONTyped, +} from './TableLinkDTO'; +import type { EventThrottlerDTO } from './EventThrottlerDTO'; import { - EventThrottlerDTOFromJSON, - EventThrottlerDTOFromJSONTyped, - EventThrottlerDTOToJSON, - EventThrottlerDTOToJSONTyped, -} from "./EventThrottlerDTO"; -import type { FieldDTO } from "./FieldDTO"; + EventThrottlerDTOFromJSON, + EventThrottlerDTOFromJSONTyped, + EventThrottlerDTOToJSON, + EventThrottlerDTOToJSONTyped, +} from './EventThrottlerDTO'; +import type { FieldDTO } from './FieldDTO'; import { - FieldDTOFromJSON, - FieldDTOFromJSONTyped, - FieldDTOToJSON, - FieldDTOToJSONTyped, -} from "./FieldDTO"; + FieldDTOFromJSON, + FieldDTOFromJSONTyped, + FieldDTOToJSON, + FieldDTOToJSONTyped, +} from './FieldDTO'; /** - * + * * @export * @interface EventDTO */ export interface EventDTO { - /** - * - * @type {EventThrottlerDTO} - * @memberof EventDTO - */ - event_throttler?: EventThrottlerDTO; - /** - * - * @type {TableLinkDTO} - * @memberof EventDTO - */ - table_link?: TableLinkDTO; - /** - * - * @type {string} - * @memberof EventDTO - */ - key_field_name: string; - /** - * - * @type {string} - * @memberof EventDTO - */ - event_name: string; - /** - * - * @type {Array} - * @memberof EventDTO - */ - fields: Array; + /** + * + * @type {EventThrottlerDTO} + * @memberof EventDTO + */ + event_throttler?: EventThrottlerDTO; + /** + * + * @type {TableLinkDTO} + * @memberof EventDTO + */ + table_link?: TableLinkDTO; + /** + * + * @type {string} + * @memberof EventDTO + */ + key_field_name: string; + /** + * + * @type {string} + * @memberof EventDTO + */ + event_name: string; + /** + * + * @type {Array} + * @memberof EventDTO + */ + fields: Array; } /** * Check if a given object implements the EventDTO interface. */ export function instanceOfEventDTO(value: object): value is EventDTO { - if (!("key_field_name" in value) || value["key_field_name"] === undefined) return false; - if (!("event_name" in value) || value["event_name"] === undefined) return false; - if (!("fields" in value) || value["fields"] === undefined) return false; - return true; + if (!('key_field_name' in value) || value['key_field_name'] === undefined) return false; + if (!('event_name' in value) || value['event_name'] === undefined) return false; + if (!('fields' in value) || value['fields'] === undefined) return false; + return true; } export function EventDTOFromJSON(json: any): EventDTO { - return EventDTOFromJSONTyped(json, false); + return EventDTOFromJSONTyped(json, false); } export function EventDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventDTO { - if (json == null) { - return json; - } - return { - event_throttler: - json["event_throttler"] == null - ? undefined - : EventThrottlerDTOFromJSON(json["event_throttler"]), - table_link: json["table_link"] == null ? undefined : TableLinkDTOFromJSON(json["table_link"]), - key_field_name: json["key_field_name"], - event_name: json["event_name"], - fields: (json["fields"] as Array).map(FieldDTOFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'event_throttler': json['event_throttler'] == null ? undefined : EventThrottlerDTOFromJSON(json['event_throttler']), + 'table_link': json['table_link'] == null ? undefined : TableLinkDTOFromJSON(json['table_link']), + 'key_field_name': json['key_field_name'], + 'event_name': json['event_name'], + 'fields': ((json['fields'] as Array).map(FieldDTOFromJSON)), + }; } export function EventDTOToJSON(json: any): EventDTO { - return EventDTOToJSONTyped(json, false); + return EventDTOToJSONTyped(json, false); } -export function EventDTOToJSONTyped( - value?: EventDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventDTOToJSONTyped(value?: EventDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - event_throttler: EventThrottlerDTOToJSON(value["event_throttler"]), - table_link: TableLinkDTOToJSON(value["table_link"]), - key_field_name: value["key_field_name"], - event_name: value["event_name"], - fields: (value["fields"] as Array).map(FieldDTOToJSON), - }; + return { + + 'event_throttler': EventThrottlerDTOToJSON(value['event_throttler']), + 'table_link': TableLinkDTOToJSON(value['table_link']), + 'key_field_name': value['key_field_name'], + 'event_name': value['event_name'], + 'fields': ((value['fields'] as Array).map(FieldDTOToJSON)), + }; } + diff --git a/src/clients/medusa/models/EventMessage.ts b/src/clients/medusa/models/EventMessage.ts index 88421e0173..ad8f453db6 100644 --- a/src/clients/medusa/models/EventMessage.ts +++ b/src/clients/medusa/models/EventMessage.ts @@ -5,69 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface EventMessage */ export interface EventMessage { - /** - * - * @type {string} - * @memberof EventMessage - */ - event_name?: string; - /** - * - * @type {{ [key: string]: object; }} - * @memberof EventMessage - */ - data?: { [key: string]: object }; + /** + * + * @type {string} + * @memberof EventMessage + */ + event_name?: string; + /** + * + * @type {{ [key: string]: object; }} + * @memberof EventMessage + */ + data?: { [key: string]: object; }; } /** * Check if a given object implements the EventMessage interface. */ export function instanceOfEventMessage(value: object): value is EventMessage { - return true; + return true; } export function EventMessageFromJSON(json: any): EventMessage { - return EventMessageFromJSONTyped(json, false); + return EventMessageFromJSONTyped(json, false); } export function EventMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMessage { - if (json == null) { - return json; - } - return { - event_name: json["event_name"] == null ? undefined : json["event_name"], - data: json["data"] == null ? undefined : json["data"], - }; + if (json == null) { + return json; + } + return { + + 'event_name': json['event_name'] == null ? undefined : json['event_name'], + 'data': json['data'] == null ? undefined : json['data'], + }; } export function EventMessageToJSON(json: any): EventMessage { - return EventMessageToJSONTyped(json, false); + return EventMessageToJSONTyped(json, false); } -export function EventMessageToJSONTyped( - value?: EventMessage | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventMessageToJSONTyped(value?: EventMessage | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - event_name: value["event_name"], - data: value["data"], - }; + return { + + 'event_name': value['event_name'], + 'data': value['data'], + }; } + diff --git a/src/clients/medusa/models/EventMessageList.ts b/src/clients/medusa/models/EventMessageList.ts index e1158aa82f..61877af072 100644 --- a/src/clients/medusa/models/EventMessageList.ts +++ b/src/clients/medusa/models/EventMessageList.ts @@ -5,103 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { EventMessage } from "./EventMessage"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { EventMessage } from './EventMessage'; import { - EventMessageFromJSON, - EventMessageFromJSONTyped, - EventMessageToJSON, - EventMessageToJSONTyped, -} from "./EventMessage"; + EventMessageFromJSON, + EventMessageFromJSONTyped, + EventMessageToJSON, + EventMessageToJSONTyped, +} from './EventMessage'; /** - * + * * @export * @interface EventMessageList */ export interface EventMessageList { - /** - * - * @type {CollectionMetadata} - * @memberof EventMessageList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof EventMessageList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof EventMessageList - */ - data?: Array; - /** - * - * @type {string} - * @memberof EventMessageList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof EventMessageList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof EventMessageList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof EventMessageList + */ + data?: Array; + /** + * + * @type {string} + * @memberof EventMessageList + */ + kind?: string; } /** * Check if a given object implements the EventMessageList interface. */ export function instanceOfEventMessageList(value: object): value is EventMessageList { - return true; + return true; } export function EventMessageListFromJSON(json: any): EventMessageList { - return EventMessageListFromJSONTyped(json, false); + return EventMessageListFromJSONTyped(json, false); } -export function EventMessageListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EventMessageList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: json["data"] == null ? undefined : (json["data"] as Array).map(EventMessageFromJSON), - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function EventMessageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMessageList { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(EventMessageFromJSON)), + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function EventMessageListToJSON(json: any): EventMessageList { - return EventMessageListToJSONTyped(json, false); + return EventMessageListToJSONTyped(json, false); } -export function EventMessageListToJSONTyped( - value?: EventMessageList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventMessageListToJSONTyped(value?: EventMessageList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: value["data"] == null ? undefined : (value["data"] as Array).map(EventMessageToJSON), - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(EventMessageToJSON)), + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/EventStreamSimulation.ts b/src/clients/medusa/models/EventStreamSimulation.ts index 417c9e4f76..2ba298e1db 100644 --- a/src/clients/medusa/models/EventStreamSimulation.ts +++ b/src/clients/medusa/models/EventStreamSimulation.ts @@ -5,81 +5,77 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface EventStreamSimulation */ export interface EventStreamSimulation { - /** - * - * @type {string} - * @memberof EventStreamSimulation - */ - event_name?: string; - /** - * - * @type {number} - * @memberof EventStreamSimulation - */ - simulation_minutes_length?: number; - /** - * - * @type {Array} - * @memberof EventStreamSimulation - */ - sleep_intervals?: Array; + /** + * + * @type {string} + * @memberof EventStreamSimulation + */ + event_name?: string; + /** + * + * @type {number} + * @memberof EventStreamSimulation + */ + simulation_minutes_length?: number; + /** + * + * @type {Array} + * @memberof EventStreamSimulation + */ + sleep_intervals?: Array; } /** * Check if a given object implements the EventStreamSimulation interface. */ export function instanceOfEventStreamSimulation(value: object): value is EventStreamSimulation { - return true; + return true; } export function EventStreamSimulationFromJSON(json: any): EventStreamSimulation { - return EventStreamSimulationFromJSONTyped(json, false); + return EventStreamSimulationFromJSONTyped(json, false); } -export function EventStreamSimulationFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EventStreamSimulation { - if (json == null) { - return json; - } - return { - event_name: json["event_name"] == null ? undefined : json["event_name"], - simulation_minutes_length: - json["simulation_minutes_length"] == null ? undefined : json["simulation_minutes_length"], - sleep_intervals: json["sleep_intervals"] == null ? undefined : json["sleep_intervals"], - }; +export function EventStreamSimulationFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventStreamSimulation { + if (json == null) { + return json; + } + return { + + 'event_name': json['event_name'] == null ? undefined : json['event_name'], + 'simulation_minutes_length': json['simulation_minutes_length'] == null ? undefined : json['simulation_minutes_length'], + 'sleep_intervals': json['sleep_intervals'] == null ? undefined : json['sleep_intervals'], + }; } export function EventStreamSimulationToJSON(json: any): EventStreamSimulation { - return EventStreamSimulationToJSONTyped(json, false); + return EventStreamSimulationToJSONTyped(json, false); } -export function EventStreamSimulationToJSONTyped( - value?: EventStreamSimulation | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventStreamSimulationToJSONTyped(value?: EventStreamSimulation | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - event_name: value["event_name"], - simulation_minutes_length: value["simulation_minutes_length"], - sleep_intervals: value["sleep_intervals"], - }; + return { + + 'event_name': value['event_name'], + 'simulation_minutes_length': value['simulation_minutes_length'], + 'sleep_intervals': value['sleep_intervals'], + }; } + diff --git a/src/clients/medusa/models/EventStreamSimulationList.ts b/src/clients/medusa/models/EventStreamSimulationList.ts index e05397e860..28029774ae 100644 --- a/src/clients/medusa/models/EventStreamSimulationList.ts +++ b/src/clients/medusa/models/EventStreamSimulationList.ts @@ -5,111 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { EventStreamSimulation } from "./EventStreamSimulation"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { EventStreamSimulation } from './EventStreamSimulation'; import { - EventStreamSimulationFromJSON, - EventStreamSimulationFromJSONTyped, - EventStreamSimulationToJSON, - EventStreamSimulationToJSONTyped, -} from "./EventStreamSimulation"; + EventStreamSimulationFromJSON, + EventStreamSimulationFromJSONTyped, + EventStreamSimulationToJSON, + EventStreamSimulationToJSONTyped, +} from './EventStreamSimulation'; /** - * + * * @export * @interface EventStreamSimulationList */ export interface EventStreamSimulationList { - /** - * - * @type {CollectionMetadata} - * @memberof EventStreamSimulationList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof EventStreamSimulationList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof EventStreamSimulationList - */ - data?: Array; - /** - * - * @type {string} - * @memberof EventStreamSimulationList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof EventStreamSimulationList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof EventStreamSimulationList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof EventStreamSimulationList + */ + data?: Array; + /** + * + * @type {string} + * @memberof EventStreamSimulationList + */ + kind?: string; } /** * Check if a given object implements the EventStreamSimulationList interface. */ -export function instanceOfEventStreamSimulationList( - value: object, -): value is EventStreamSimulationList { - return true; +export function instanceOfEventStreamSimulationList(value: object): value is EventStreamSimulationList { + return true; } export function EventStreamSimulationListFromJSON(json: any): EventStreamSimulationList { - return EventStreamSimulationListFromJSONTyped(json, false); + return EventStreamSimulationListFromJSONTyped(json, false); } -export function EventStreamSimulationListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EventStreamSimulationList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: - json["data"] == null - ? undefined - : (json["data"] as Array).map(EventStreamSimulationFromJSON), - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function EventStreamSimulationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventStreamSimulationList { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(EventStreamSimulationFromJSON)), + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function EventStreamSimulationListToJSON(json: any): EventStreamSimulationList { - return EventStreamSimulationListToJSONTyped(json, false); + return EventStreamSimulationListToJSONTyped(json, false); } -export function EventStreamSimulationListToJSONTyped( - value?: EventStreamSimulationList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventStreamSimulationListToJSONTyped(value?: EventStreamSimulationList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: - value["data"] == null - ? undefined - : (value["data"] as Array).map(EventStreamSimulationToJSON), - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(EventStreamSimulationToJSON)), + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/EventThrottlerDTO.ts b/src/clients/medusa/models/EventThrottlerDTO.ts index 07ea56711b..9db7e6eaa6 100644 --- a/src/clients/medusa/models/EventThrottlerDTO.ts +++ b/src/clients/medusa/models/EventThrottlerDTO.ts @@ -5,81 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface EventThrottlerDTO */ export interface EventThrottlerDTO { - /** - * - * @type {Array} - * @memberof EventThrottlerDTO - */ - arguments?: Array; - /** - * - * @type {string} - * @memberof EventThrottlerDTO - */ - throttle_type: EventThrottlerDTOThrottleTypeEnum; + /** + * + * @type {Array} + * @memberof EventThrottlerDTO + */ + arguments?: Array; + /** + * + * @type {string} + * @memberof EventThrottlerDTO + */ + throttle_type: EventThrottlerDTOThrottleTypeEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum EventThrottlerDTOThrottleTypeEnum { - Graph = "graph", + Graph = 'graph' } + /** * Check if a given object implements the EventThrottlerDTO interface. */ export function instanceOfEventThrottlerDTO(value: object): value is EventThrottlerDTO { - if (!("throttle_type" in value) || value["throttle_type"] === undefined) return false; - return true; + if (!('throttle_type' in value) || value['throttle_type'] === undefined) return false; + return true; } export function EventThrottlerDTOFromJSON(json: any): EventThrottlerDTO { - return EventThrottlerDTOFromJSONTyped(json, false); + return EventThrottlerDTOFromJSONTyped(json, false); } -export function EventThrottlerDTOFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EventThrottlerDTO { - if (json == null) { - return json; - } - return { - arguments: json["arguments"] == null ? undefined : json["arguments"], - throttle_type: json["throttle_type"], - }; +export function EventThrottlerDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventThrottlerDTO { + if (json == null) { + return json; + } + return { + + 'arguments': json['arguments'] == null ? undefined : json['arguments'], + 'throttle_type': json['throttle_type'], + }; } export function EventThrottlerDTOToJSON(json: any): EventThrottlerDTO { - return EventThrottlerDTOToJSONTyped(json, false); + return EventThrottlerDTOToJSONTyped(json, false); } -export function EventThrottlerDTOToJSONTyped( - value?: EventThrottlerDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventThrottlerDTOToJSONTyped(value?: EventThrottlerDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - arguments: value["arguments"], - throttle_type: value["throttle_type"], - }; + return { + + 'arguments': value['arguments'], + 'throttle_type': value['throttle_type'], + }; } + diff --git a/src/clients/medusa/models/EventThrottlerDetails.ts b/src/clients/medusa/models/EventThrottlerDetails.ts index 37ba7d3b31..1d205e4bd2 100644 --- a/src/clients/medusa/models/EventThrottlerDetails.ts +++ b/src/clients/medusa/models/EventThrottlerDetails.ts @@ -5,94 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ExpectedArgumentDetails } from "./ExpectedArgumentDetails"; +import { mapValues } from '../runtime'; +import type { ExpectedArgumentDetails } from './ExpectedArgumentDetails'; import { - ExpectedArgumentDetailsFromJSON, - ExpectedArgumentDetailsFromJSONTyped, - ExpectedArgumentDetailsToJSON, - ExpectedArgumentDetailsToJSONTyped, -} from "./ExpectedArgumentDetails"; + ExpectedArgumentDetailsFromJSON, + ExpectedArgumentDetailsFromJSONTyped, + ExpectedArgumentDetailsToJSON, + ExpectedArgumentDetailsToJSONTyped, +} from './ExpectedArgumentDetails'; /** - * + * * @export * @interface EventThrottlerDetails */ export interface EventThrottlerDetails { - /** - * - * @type {string} - * @memberof EventThrottlerDetails - */ - name?: string; - /** - * - * @type {string} - * @memberof EventThrottlerDetails - */ - description?: string; - /** - * - * @type {Array} - * @memberof EventThrottlerDetails - */ - arguments?: Array; + /** + * + * @type {string} + * @memberof EventThrottlerDetails + */ + name?: string; + /** + * + * @type {string} + * @memberof EventThrottlerDetails + */ + description?: string; + /** + * + * @type {Array} + * @memberof EventThrottlerDetails + */ + arguments?: Array; } /** * Check if a given object implements the EventThrottlerDetails interface. */ export function instanceOfEventThrottlerDetails(value: object): value is EventThrottlerDetails { - return true; + return true; } export function EventThrottlerDetailsFromJSON(json: any): EventThrottlerDetails { - return EventThrottlerDetailsFromJSONTyped(json, false); + return EventThrottlerDetailsFromJSONTyped(json, false); } -export function EventThrottlerDetailsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EventThrottlerDetails { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - description: json["description"] == null ? undefined : json["description"], - arguments: - json["arguments"] == null - ? undefined - : (json["arguments"] as Array).map(ExpectedArgumentDetailsFromJSON), - }; +export function EventThrottlerDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventThrottlerDetails { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'arguments': json['arguments'] == null ? undefined : ((json['arguments'] as Array).map(ExpectedArgumentDetailsFromJSON)), + }; } export function EventThrottlerDetailsToJSON(json: any): EventThrottlerDetails { - return EventThrottlerDetailsToJSONTyped(json, false); + return EventThrottlerDetailsToJSONTyped(json, false); } -export function EventThrottlerDetailsToJSONTyped( - value?: EventThrottlerDetails | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventThrottlerDetailsToJSONTyped(value?: EventThrottlerDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - description: value["description"], - arguments: - value["arguments"] == null - ? undefined - : (value["arguments"] as Array).map(ExpectedArgumentDetailsToJSON), - }; + return { + + 'name': value['name'], + 'description': value['description'], + 'arguments': value['arguments'] == null ? undefined : ((value['arguments'] as Array).map(ExpectedArgumentDetailsToJSON)), + }; } + diff --git a/src/clients/medusa/models/EventThrottlerDetailsList.ts b/src/clients/medusa/models/EventThrottlerDetailsList.ts index dc8bea1b35..7ccbe65be5 100644 --- a/src/clients/medusa/models/EventThrottlerDetailsList.ts +++ b/src/clients/medusa/models/EventThrottlerDetailsList.ts @@ -5,111 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { EventThrottlerDetails } from "./EventThrottlerDetails"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { EventThrottlerDetails } from './EventThrottlerDetails'; import { - EventThrottlerDetailsFromJSON, - EventThrottlerDetailsFromJSONTyped, - EventThrottlerDetailsToJSON, - EventThrottlerDetailsToJSONTyped, -} from "./EventThrottlerDetails"; + EventThrottlerDetailsFromJSON, + EventThrottlerDetailsFromJSONTyped, + EventThrottlerDetailsToJSON, + EventThrottlerDetailsToJSONTyped, +} from './EventThrottlerDetails'; /** - * + * * @export * @interface EventThrottlerDetailsList */ export interface EventThrottlerDetailsList { - /** - * - * @type {CollectionMetadata} - * @memberof EventThrottlerDetailsList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof EventThrottlerDetailsList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof EventThrottlerDetailsList - */ - data?: Array; - /** - * - * @type {string} - * @memberof EventThrottlerDetailsList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof EventThrottlerDetailsList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof EventThrottlerDetailsList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof EventThrottlerDetailsList + */ + data?: Array; + /** + * + * @type {string} + * @memberof EventThrottlerDetailsList + */ + kind?: string; } /** * Check if a given object implements the EventThrottlerDetailsList interface. */ -export function instanceOfEventThrottlerDetailsList( - value: object, -): value is EventThrottlerDetailsList { - return true; +export function instanceOfEventThrottlerDetailsList(value: object): value is EventThrottlerDetailsList { + return true; } export function EventThrottlerDetailsListFromJSON(json: any): EventThrottlerDetailsList { - return EventThrottlerDetailsListFromJSONTyped(json, false); + return EventThrottlerDetailsListFromJSONTyped(json, false); } -export function EventThrottlerDetailsListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): EventThrottlerDetailsList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: - json["data"] == null - ? undefined - : (json["data"] as Array).map(EventThrottlerDetailsFromJSON), - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function EventThrottlerDetailsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventThrottlerDetailsList { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(EventThrottlerDetailsFromJSON)), + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function EventThrottlerDetailsListToJSON(json: any): EventThrottlerDetailsList { - return EventThrottlerDetailsListToJSONTyped(json, false); + return EventThrottlerDetailsListToJSONTyped(json, false); } -export function EventThrottlerDetailsListToJSONTyped( - value?: EventThrottlerDetailsList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function EventThrottlerDetailsListToJSONTyped(value?: EventThrottlerDetailsList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: - value["data"] == null - ? undefined - : (value["data"] as Array).map(EventThrottlerDetailsToJSON), - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(EventThrottlerDetailsToJSON)), + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/ExampleDataset.ts b/src/clients/medusa/models/ExampleDataset.ts index f47a41387c..d5229b727f 100644 --- a/src/clients/medusa/models/ExampleDataset.ts +++ b/src/clients/medusa/models/ExampleDataset.ts @@ -5,88 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { DatasetDTO } from "./DatasetDTO"; +import { mapValues } from '../runtime'; +import type { DatasetDTO } from './DatasetDTO'; import { - DatasetDTOFromJSON, - DatasetDTOFromJSONTyped, - DatasetDTOToJSON, - DatasetDTOToJSONTyped, -} from "./DatasetDTO"; + DatasetDTOFromJSON, + DatasetDTOFromJSONTyped, + DatasetDTOToJSON, + DatasetDTOToJSONTyped, +} from './DatasetDTO'; /** - * + * * @export * @interface ExampleDataset */ export interface ExampleDataset { - /** - * - * @type {string} - * @memberof ExampleDataset - */ - name?: string; - /** - * - * @type {string} - * @memberof ExampleDataset - */ - description?: string; - /** - * - * @type {DatasetDTO} - * @memberof ExampleDataset - */ - dataset?: DatasetDTO; + /** + * + * @type {string} + * @memberof ExampleDataset + */ + name?: string; + /** + * + * @type {string} + * @memberof ExampleDataset + */ + description?: string; + /** + * + * @type {DatasetDTO} + * @memberof ExampleDataset + */ + dataset?: DatasetDTO; } /** * Check if a given object implements the ExampleDataset interface. */ export function instanceOfExampleDataset(value: object): value is ExampleDataset { - return true; + return true; } export function ExampleDatasetFromJSON(json: any): ExampleDataset { - return ExampleDatasetFromJSONTyped(json, false); + return ExampleDatasetFromJSONTyped(json, false); } -export function ExampleDatasetFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExampleDataset { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - description: json["description"] == null ? undefined : json["description"], - dataset: json["dataset"] == null ? undefined : DatasetDTOFromJSON(json["dataset"]), - }; +export function ExampleDatasetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExampleDataset { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'dataset': json['dataset'] == null ? undefined : DatasetDTOFromJSON(json['dataset']), + }; } export function ExampleDatasetToJSON(json: any): ExampleDataset { - return ExampleDatasetToJSONTyped(json, false); + return ExampleDatasetToJSONTyped(json, false); } -export function ExampleDatasetToJSONTyped( - value?: ExampleDataset | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExampleDatasetToJSONTyped(value?: ExampleDataset | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - description: value["description"], - dataset: DatasetDTOToJSON(value["dataset"]), - }; + return { + + 'name': value['name'], + 'description': value['description'], + 'dataset': DatasetDTOToJSON(value['dataset']), + }; } + diff --git a/src/clients/medusa/models/ExampleDatasetList.ts b/src/clients/medusa/models/ExampleDatasetList.ts index d62f86526d..8d2ed97157 100644 --- a/src/clients/medusa/models/ExampleDatasetList.ts +++ b/src/clients/medusa/models/ExampleDatasetList.ts @@ -5,105 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { ExampleDataset } from "./ExampleDataset"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { ExampleDataset } from './ExampleDataset'; import { - ExampleDatasetFromJSON, - ExampleDatasetFromJSONTyped, - ExampleDatasetToJSON, - ExampleDatasetToJSONTyped, -} from "./ExampleDataset"; + ExampleDatasetFromJSON, + ExampleDatasetFromJSONTyped, + ExampleDatasetToJSON, + ExampleDatasetToJSONTyped, +} from './ExampleDataset'; /** - * + * * @export * @interface ExampleDatasetList */ export interface ExampleDatasetList { - /** - * - * @type {CollectionMetadata} - * @memberof ExampleDatasetList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof ExampleDatasetList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof ExampleDatasetList - */ - data?: Array; - /** - * - * @type {string} - * @memberof ExampleDatasetList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof ExampleDatasetList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof ExampleDatasetList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof ExampleDatasetList + */ + data?: Array; + /** + * + * @type {string} + * @memberof ExampleDatasetList + */ + kind?: string; } /** * Check if a given object implements the ExampleDatasetList interface. */ export function instanceOfExampleDatasetList(value: object): value is ExampleDatasetList { - return true; + return true; } export function ExampleDatasetListFromJSON(json: any): ExampleDatasetList { - return ExampleDatasetListFromJSONTyped(json, false); + return ExampleDatasetListFromJSONTyped(json, false); } -export function ExampleDatasetListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExampleDatasetList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: - json["data"] == null ? undefined : (json["data"] as Array).map(ExampleDatasetFromJSON), - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function ExampleDatasetListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExampleDatasetList { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(ExampleDatasetFromJSON)), + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function ExampleDatasetListToJSON(json: any): ExampleDatasetList { - return ExampleDatasetListToJSONTyped(json, false); + return ExampleDatasetListToJSONTyped(json, false); } -export function ExampleDatasetListToJSONTyped( - value?: ExampleDatasetList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExampleDatasetListToJSONTyped(value?: ExampleDatasetList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: - value["data"] == null ? undefined : (value["data"] as Array).map(ExampleDatasetToJSON), - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(ExampleDatasetToJSON)), + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/ExpectedArgumentDetails.ts b/src/clients/medusa/models/ExpectedArgumentDetails.ts index 73a0bbd7ba..974b885d10 100644 --- a/src/clients/medusa/models/ExpectedArgumentDetails.ts +++ b/src/clients/medusa/models/ExpectedArgumentDetails.ts @@ -5,88 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ExpectedArgumentDetails */ export interface ExpectedArgumentDetails { - /** - * - * @type {string} - * @memberof ExpectedArgumentDetails - */ - name?: string; - /** - * - * @type {string} - * @memberof ExpectedArgumentDetails - */ - description?: string; - /** - * - * @type {string} - * @memberof ExpectedArgumentDetails - */ - type?: string; - /** - * - * @type {Array} - * @memberof ExpectedArgumentDetails - */ - options?: Array; + /** + * + * @type {string} + * @memberof ExpectedArgumentDetails + */ + name?: string; + /** + * + * @type {string} + * @memberof ExpectedArgumentDetails + */ + description?: string; + /** + * + * @type {string} + * @memberof ExpectedArgumentDetails + */ + type?: string; + /** + * + * @type {Array} + * @memberof ExpectedArgumentDetails + */ + options?: Array; } /** * Check if a given object implements the ExpectedArgumentDetails interface. */ export function instanceOfExpectedArgumentDetails(value: object): value is ExpectedArgumentDetails { - return true; + return true; } export function ExpectedArgumentDetailsFromJSON(json: any): ExpectedArgumentDetails { - return ExpectedArgumentDetailsFromJSONTyped(json, false); + return ExpectedArgumentDetailsFromJSONTyped(json, false); } -export function ExpectedArgumentDetailsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExpectedArgumentDetails { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - description: json["description"] == null ? undefined : json["description"], - type: json["type"] == null ? undefined : json["type"], - options: json["options"] == null ? undefined : json["options"], - }; +export function ExpectedArgumentDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpectedArgumentDetails { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'type': json['type'] == null ? undefined : json['type'], + 'options': json['options'] == null ? undefined : json['options'], + }; } export function ExpectedArgumentDetailsToJSON(json: any): ExpectedArgumentDetails { - return ExpectedArgumentDetailsToJSONTyped(json, false); + return ExpectedArgumentDetailsToJSONTyped(json, false); } -export function ExpectedArgumentDetailsToJSONTyped( - value?: ExpectedArgumentDetails | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExpectedArgumentDetailsToJSONTyped(value?: ExpectedArgumentDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - description: value["description"], - type: value["type"], - options: value["options"], - }; + return { + + 'name': value['name'], + 'description': value['description'], + 'type': value['type'], + 'options': value['options'], + }; } + diff --git a/src/clients/medusa/models/FieldDTO.ts b/src/clients/medusa/models/FieldDTO.ts index 1c5388ca2f..384e17c2f7 100644 --- a/src/clients/medusa/models/FieldDTO.ts +++ b/src/clients/medusa/models/FieldDTO.ts @@ -5,87 +5,87 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GenerationDTO } from "./GenerationDTO"; +import { mapValues } from '../runtime'; +import type { GenerationDTO } from './GenerationDTO'; import { - GenerationDTOFromJSON, - GenerationDTOFromJSONTyped, - GenerationDTOToJSON, - GenerationDTOToJSONTyped, -} from "./GenerationDTO"; + GenerationDTOFromJSON, + GenerationDTOFromJSONTyped, + GenerationDTOToJSON, + GenerationDTOToJSONTyped, +} from './GenerationDTO'; /** - * + * * @export * @interface FieldDTO */ export interface FieldDTO { - /** - * - * @type {string} - * @memberof FieldDTO - */ - name: string; - /** - * - * @type {GenerationDTO} - * @memberof FieldDTO - */ - generation: GenerationDTO; - /** - * - * @type {boolean} - * @memberof FieldDTO - */ - ignored?: boolean; + /** + * + * @type {string} + * @memberof FieldDTO + */ + name: string; + /** + * + * @type {GenerationDTO} + * @memberof FieldDTO + */ + generation: GenerationDTO; + /** + * + * @type {boolean} + * @memberof FieldDTO + */ + ignored?: boolean; } /** * Check if a given object implements the FieldDTO interface. */ export function instanceOfFieldDTO(value: object): value is FieldDTO { - if (!("name" in value) || value["name"] === undefined) return false; - if (!("generation" in value) || value["generation"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('generation' in value) || value['generation'] === undefined) return false; + return true; } export function FieldDTOFromJSON(json: any): FieldDTO { - return FieldDTOFromJSONTyped(json, false); + return FieldDTOFromJSONTyped(json, false); } export function FieldDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldDTO { - if (json == null) { - return json; - } - return { - name: json["name"], - generation: GenerationDTOFromJSON(json["generation"]), - ignored: json["ignored"] == null ? undefined : json["ignored"], - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'generation': GenerationDTOFromJSON(json['generation']), + 'ignored': json['ignored'] == null ? undefined : json['ignored'], + }; } export function FieldDTOToJSON(json: any): FieldDTO { - return FieldDTOToJSONTyped(json, false); + return FieldDTOToJSONTyped(json, false); } -export function FieldDTOToJSONTyped( - value?: FieldDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FieldDTOToJSONTyped(value?: FieldDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - generation: GenerationDTOToJSON(value["generation"]), - ignored: value["ignored"], - }; + return { + + 'name': value['name'], + 'generation': GenerationDTOToJSON(value['generation']), + 'ignored': value['ignored'], + }; } + diff --git a/src/clients/medusa/models/GenerationDTO.ts b/src/clients/medusa/models/GenerationDTO.ts index 505ded1ea4..f5a39c2a0d 100644 --- a/src/clients/medusa/models/GenerationDTO.ts +++ b/src/clients/medusa/models/GenerationDTO.ts @@ -5,153 +5,154 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface GenerationDTO */ export interface GenerationDTO { - /** - * - * @type {string} - * @memberof GenerationDTO - */ - generator: GenerationDTOGeneratorEnum; - /** - * - * @type {Array} - * @memberof GenerationDTO - */ - arguments?: Array; + /** + * + * @type {string} + * @memberof GenerationDTO + */ + generator: GenerationDTOGeneratorEnum; + /** + * + * @type {Array} + * @memberof GenerationDTO + */ + arguments?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GenerationDTOGeneratorEnum { - LocationState = "Location.state", - LocationCountry = "Location.country", - LocationPostcode = "Location.postcode", - LocationCity = "Location.city", - LocationStreetAddress = "Location.street-address", - LocationFullAddress = "Location.full-address", - LocationLongitude = "Location.longitude", - LocationLatitude = "Location.latitude", - DatePast = "Date.past", - DateTimestampUtc = "Date.timestamp-utc", - DateNow = "Date.now", - DateFuture = "Date.future", - NumberDigits = "Number.digits", - NumberIteratingInteger = "Number.iterating-integer", - NumberIteratingLong = "Number.iterating-long", - NumberNumberSelect = "Number.number-select", - NumberNumberBetween = "Number.number-between", - NumberCastNumber = "Number.cast-number", - PersonFirstName = "Person.first-name", - PersonLastName = "Person.last-name", - PersonFullName = "Person.full-name", - PersonSsn = "Person.ssn", - InternetEmailAddress = "Internet.email-address", - InternetCustomEmailAddress = "Internet.custom-email-address", - InternetIpv4Address = "Internet.ipv4-address", - InternetMacAddress = "Internet.mac-address", - InternetPassword = "Internet.password", - InternetWebDomain = "Internet.web-domain", - InternetUserAgent = "Internet.user-agent", - InternetUsername = "Internet.username", - VehicleVin = "Vehicle.vin", - VehicleManufacturer = "Vehicle.manufacturer", - VehicleLicensePlate = "Vehicle.license-plate", - DeviceManufacturer = "Device.manufacturer", - DeviceModelName = "Device.model-name", - DevicePlatform = "Device.platform", - CommerceBarcodeEan8 = "Commerce.barcode-ean8", - CommerceProductName = "Commerce.product-name", - CommerceBrand = "Commerce.brand", - CommerceVendor = "Commerce.vendor", - CommerceMaterial = "Commerce.material", - CompanyName = "Company.name", - CompanyIndustry = "Company.industry", - CompanyProfession = "Company.profession", - PhoneExtension = "Phone.extension", - PhoneNumber = "Phone.number", - FinanceCreditCard = "Finance.credit-card", - FinanceIban = "Finance.iban", - FinanceStockTicker = "Finance.stock-ticker", - FinanceCurrencyCode = "Finance.currency-code", - FinanceCurrencyName = "Finance.currency-name", - FinanceBic = "Finance.bic", - HealthcareMedication = "Healthcare.medication", - HealthcareDisease = "Healthcare.disease", - HealthcareDiagnosisCode = "Healthcare.diagnosis-code", - HealthcareSymptom = "Healthcare.symptom", - HealthcareHospital = "Healthcare.hospital", - HealthcareProfession = "Healthcare.profession", - StructArray = "Struct.array", - StructNestedRecord = "Struct.nested-record", - ReferenceExpression = "Reference.expression", - ReferenceCache = "Reference.cache", - ReferenceCacheByKey = "Reference.cache-by-key", - ReferencePreviousStateByKey = "Reference.previous-state-by-key", - ReferenceLinkedTableColumn = "Reference.linked-table-column", - ReferenceTableCell = "Reference.table-cell", - StringSelect = "String.select", - StringUuid = "String.uuid", - StringToString = "String.to-string", - StringSelectText = "String.select-text", - StringSelectWeightedText = "String.select-weighted-text", - BooleanPercentTrue = "Boolean.percent-true", - BooleanRegex = "Boolean.regex", - ConditionalExpressionIfElse = "Conditional.expression-if-else", - ConditionalGeneratorIfElse = "Conditional.generator-if-else", - UtilCustomVariable = "Util.custom-variable", + LocationState = 'Location.state', + LocationCountry = 'Location.country', + LocationPostcode = 'Location.postcode', + LocationCity = 'Location.city', + LocationStreetAddress = 'Location.street-address', + LocationFullAddress = 'Location.full-address', + LocationLongitude = 'Location.longitude', + LocationLatitude = 'Location.latitude', + DatePast = 'Date.past', + DateTimestampUtc = 'Date.timestamp-utc', + DateNow = 'Date.now', + DateFuture = 'Date.future', + NumberDigits = 'Number.digits', + NumberIteratingInteger = 'Number.iterating-integer', + NumberIteratingLong = 'Number.iterating-long', + NumberNumberSelect = 'Number.number-select', + NumberNumberBetween = 'Number.number-between', + NumberCastNumber = 'Number.cast-number', + PersonFirstName = 'Person.first-name', + PersonLastName = 'Person.last-name', + PersonFullName = 'Person.full-name', + PersonSsn = 'Person.ssn', + InternetEmailAddress = 'Internet.email-address', + InternetCustomEmailAddress = 'Internet.custom-email-address', + InternetIpv4Address = 'Internet.ipv4-address', + InternetMacAddress = 'Internet.mac-address', + InternetPassword = 'Internet.password', + InternetWebDomain = 'Internet.web-domain', + InternetUserAgent = 'Internet.user-agent', + InternetUsername = 'Internet.username', + VehicleVin = 'Vehicle.vin', + VehicleManufacturer = 'Vehicle.manufacturer', + VehicleLicensePlate = 'Vehicle.license-plate', + DeviceManufacturer = 'Device.manufacturer', + DeviceModelName = 'Device.model-name', + DevicePlatform = 'Device.platform', + CommerceBarcodeEan8 = 'Commerce.barcode-ean8', + CommerceProductName = 'Commerce.product-name', + CommerceBrand = 'Commerce.brand', + CommerceVendor = 'Commerce.vendor', + CommerceMaterial = 'Commerce.material', + CompanyName = 'Company.name', + CompanyIndustry = 'Company.industry', + CompanyProfession = 'Company.profession', + PhoneExtension = 'Phone.extension', + PhoneNumber = 'Phone.number', + FinanceCreditCard = 'Finance.credit-card', + FinanceIban = 'Finance.iban', + FinanceStockTicker = 'Finance.stock-ticker', + FinanceCurrencyCode = 'Finance.currency-code', + FinanceCurrencyName = 'Finance.currency-name', + FinanceBic = 'Finance.bic', + HealthcareMedication = 'Healthcare.medication', + HealthcareDisease = 'Healthcare.disease', + HealthcareDiagnosisCode = 'Healthcare.diagnosis-code', + HealthcareSymptom = 'Healthcare.symptom', + HealthcareHospital = 'Healthcare.hospital', + HealthcareProfession = 'Healthcare.profession', + StructArray = 'Struct.array', + StructNestedRecord = 'Struct.nested-record', + ReferenceExpression = 'Reference.expression', + ReferenceCache = 'Reference.cache', + ReferenceCacheByKey = 'Reference.cache-by-key', + ReferencePreviousStateByKey = 'Reference.previous-state-by-key', + ReferenceLinkedTableColumn = 'Reference.linked-table-column', + ReferenceTableCell = 'Reference.table-cell', + StringSelect = 'String.select', + StringUuid = 'String.uuid', + StringToString = 'String.to-string', + StringSelectText = 'String.select-text', + StringSelectWeightedText = 'String.select-weighted-text', + BooleanPercentTrue = 'Boolean.percent-true', + BooleanRegex = 'Boolean.regex', + ConditionalExpressionIfElse = 'Conditional.expression-if-else', + ConditionalGeneratorIfElse = 'Conditional.generator-if-else', + UtilCustomVariable = 'Util.custom-variable' } + /** * Check if a given object implements the GenerationDTO interface. */ export function instanceOfGenerationDTO(value: object): value is GenerationDTO { - if (!("generator" in value) || value["generator"] === undefined) return false; - return true; + if (!('generator' in value) || value['generator'] === undefined) return false; + return true; } export function GenerationDTOFromJSON(json: any): GenerationDTO { - return GenerationDTOFromJSONTyped(json, false); + return GenerationDTOFromJSONTyped(json, false); } export function GenerationDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerationDTO { - if (json == null) { - return json; - } - return { - generator: json["generator"], - arguments: json["arguments"] == null ? undefined : json["arguments"], - }; + if (json == null) { + return json; + } + return { + + 'generator': json['generator'], + 'arguments': json['arguments'] == null ? undefined : json['arguments'], + }; } export function GenerationDTOToJSON(json: any): GenerationDTO { - return GenerationDTOToJSONTyped(json, false); + return GenerationDTOToJSONTyped(json, false); } -export function GenerationDTOToJSONTyped( - value?: GenerationDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GenerationDTOToJSONTyped(value?: GenerationDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - generator: value["generator"], - arguments: value["arguments"], - }; + return { + + 'generator': value['generator'], + 'arguments': value['arguments'], + }; } + diff --git a/src/clients/medusa/models/ProducerHealth.ts b/src/clients/medusa/models/ProducerHealth.ts index 681e104ab4..20c8b495f6 100644 --- a/src/clients/medusa/models/ProducerHealth.ts +++ b/src/clients/medusa/models/ProducerHealth.ts @@ -5,64 +5,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProducerHealth */ export interface ProducerHealth { - /** - * - * @type {boolean} - * @memberof ProducerHealth - */ - started?: boolean; + /** + * + * @type {boolean} + * @memberof ProducerHealth + */ + started?: boolean; } /** * Check if a given object implements the ProducerHealth interface. */ export function instanceOfProducerHealth(value: object): value is ProducerHealth { - return true; + return true; } export function ProducerHealthFromJSON(json: any): ProducerHealth { - return ProducerHealthFromJSONTyped(json, false); + return ProducerHealthFromJSONTyped(json, false); } -export function ProducerHealthFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProducerHealth { - if (json == null) { - return json; - } - return { - started: json["started"] == null ? undefined : json["started"], - }; +export function ProducerHealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProducerHealth { + if (json == null) { + return json; + } + return { + + 'started': json['started'] == null ? undefined : json['started'], + }; } export function ProducerHealthToJSON(json: any): ProducerHealth { - return ProducerHealthToJSONTyped(json, false); + return ProducerHealthToJSONTyped(json, false); } -export function ProducerHealthToJSONTyped( - value?: ProducerHealth | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProducerHealthToJSONTyped(value?: ProducerHealth | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - started: value["started"], - }; + return { + + 'started': value['started'], + }; } + diff --git a/src/clients/medusa/models/RowDTO.ts b/src/clients/medusa/models/RowDTO.ts index aef20c3ca4..71256d2e7f 100644 --- a/src/clients/medusa/models/RowDTO.ts +++ b/src/clients/medusa/models/RowDTO.ts @@ -5,62 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface RowDTO */ export interface RowDTO { - /** - * - * @type {{ [key: string]: object; }} - * @memberof RowDTO - */ - values: { [key: string]: object }; + /** + * + * @type {{ [key: string]: object; }} + * @memberof RowDTO + */ + values: { [key: string]: object; }; } /** * Check if a given object implements the RowDTO interface. */ export function instanceOfRowDTO(value: object): value is RowDTO { - if (!("values" in value) || value["values"] === undefined) return false; - return true; + if (!('values' in value) || value['values'] === undefined) return false; + return true; } export function RowDTOFromJSON(json: any): RowDTO { - return RowDTOFromJSONTyped(json, false); + return RowDTOFromJSONTyped(json, false); } export function RowDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): RowDTO { - if (json == null) { - return json; - } - return { - values: json["values"], - }; + if (json == null) { + return json; + } + return { + + 'values': json['values'], + }; } export function RowDTOToJSON(json: any): RowDTO { - return RowDTOToJSONTyped(json, false); + return RowDTOToJSONTyped(json, false); } -export function RowDTOToJSONTyped( - value?: RowDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RowDTOToJSONTyped(value?: RowDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - values: value["values"], - }; + return { + + 'values': value['values'], + }; } + diff --git a/src/clients/medusa/models/StreamDetails.ts b/src/clients/medusa/models/StreamDetails.ts index 7348e9c994..24619159d2 100644 --- a/src/clients/medusa/models/StreamDetails.ts +++ b/src/clients/medusa/models/StreamDetails.ts @@ -5,61 +5,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface StreamDetails */ export interface StreamDetails { - /** - * - * @type {string} - * @memberof StreamDetails - */ - stream_id?: string; + /** + * + * @type {string} + * @memberof StreamDetails + */ + stream_id?: string; } /** * Check if a given object implements the StreamDetails interface. */ export function instanceOfStreamDetails(value: object): value is StreamDetails { - return true; + return true; } export function StreamDetailsFromJSON(json: any): StreamDetails { - return StreamDetailsFromJSONTyped(json, false); + return StreamDetailsFromJSONTyped(json, false); } export function StreamDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamDetails { - if (json == null) { - return json; - } - return { - stream_id: json["stream_id"] == null ? undefined : json["stream_id"], - }; + if (json == null) { + return json; + } + return { + + 'stream_id': json['stream_id'] == null ? undefined : json['stream_id'], + }; } export function StreamDetailsToJSON(json: any): StreamDetails { - return StreamDetailsToJSONTyped(json, false); + return StreamDetailsToJSONTyped(json, false); } -export function StreamDetailsToJSONTyped( - value?: StreamDetails | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function StreamDetailsToJSONTyped(value?: StreamDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - stream_id: value["stream_id"], - }; + return { + + 'stream_id': value['stream_id'], + }; } + diff --git a/src/clients/medusa/models/TableDTO.ts b/src/clients/medusa/models/TableDTO.ts index bca30509bd..9fe54bd171 100644 --- a/src/clients/medusa/models/TableDTO.ts +++ b/src/clients/medusa/models/TableDTO.ts @@ -5,99 +5,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { RowDTO } from "./RowDTO"; -import { RowDTOFromJSON, RowDTOFromJSONTyped, RowDTOToJSON, RowDTOToJSONTyped } from "./RowDTO"; -import type { ColumnDTO } from "./ColumnDTO"; +import { mapValues } from '../runtime'; +import type { RowDTO } from './RowDTO'; +import { + RowDTOFromJSON, + RowDTOFromJSONTyped, + RowDTOToJSON, + RowDTOToJSONTyped, +} from './RowDTO'; +import type { ColumnDTO } from './ColumnDTO'; import { - ColumnDTOFromJSON, - ColumnDTOFromJSONTyped, - ColumnDTOToJSON, - ColumnDTOToJSONTyped, -} from "./ColumnDTO"; + ColumnDTOFromJSON, + ColumnDTOFromJSONTyped, + ColumnDTOToJSON, + ColumnDTOToJSONTyped, +} from './ColumnDTO'; /** - * + * * @export * @interface TableDTO */ export interface TableDTO { - /** - * - * @type {string} - * @memberof TableDTO - */ - table_name: string; - /** - * - * @type {Array} - * @memberof TableDTO - */ - columns: Array; - /** - * - * @type {Array} - * @memberof TableDTO - */ - rows: Array; - /** - * - * @type {string} - * @memberof TableDTO - */ - key_column_name: string; + /** + * + * @type {string} + * @memberof TableDTO + */ + table_name: string; + /** + * + * @type {Array} + * @memberof TableDTO + */ + columns: Array; + /** + * + * @type {Array} + * @memberof TableDTO + */ + rows: Array; + /** + * + * @type {string} + * @memberof TableDTO + */ + key_column_name: string; } /** * Check if a given object implements the TableDTO interface. */ export function instanceOfTableDTO(value: object): value is TableDTO { - if (!("table_name" in value) || value["table_name"] === undefined) return false; - if (!("columns" in value) || value["columns"] === undefined) return false; - if (!("rows" in value) || value["rows"] === undefined) return false; - if (!("key_column_name" in value) || value["key_column_name"] === undefined) return false; - return true; + if (!('table_name' in value) || value['table_name'] === undefined) return false; + if (!('columns' in value) || value['columns'] === undefined) return false; + if (!('rows' in value) || value['rows'] === undefined) return false; + if (!('key_column_name' in value) || value['key_column_name'] === undefined) return false; + return true; } export function TableDTOFromJSON(json: any): TableDTO { - return TableDTOFromJSONTyped(json, false); + return TableDTOFromJSONTyped(json, false); } export function TableDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): TableDTO { - if (json == null) { - return json; - } - return { - table_name: json["table_name"], - columns: (json["columns"] as Array).map(ColumnDTOFromJSON), - rows: (json["rows"] as Array).map(RowDTOFromJSON), - key_column_name: json["key_column_name"], - }; + if (json == null) { + return json; + } + return { + + 'table_name': json['table_name'], + 'columns': ((json['columns'] as Array).map(ColumnDTOFromJSON)), + 'rows': ((json['rows'] as Array).map(RowDTOFromJSON)), + 'key_column_name': json['key_column_name'], + }; } export function TableDTOToJSON(json: any): TableDTO { - return TableDTOToJSONTyped(json, false); + return TableDTOToJSONTyped(json, false); } -export function TableDTOToJSONTyped( - value?: TableDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TableDTOToJSONTyped(value?: TableDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - table_name: value["table_name"], - columns: (value["columns"] as Array).map(ColumnDTOToJSON), - rows: (value["rows"] as Array).map(RowDTOToJSON), - key_column_name: value["key_column_name"], - }; + return { + + 'table_name': value['table_name'], + 'columns': ((value['columns'] as Array).map(ColumnDTOToJSON)), + 'rows': ((value['rows'] as Array).map(RowDTOToJSON)), + 'key_column_name': value['key_column_name'], + }; } + diff --git a/src/clients/medusa/models/TableLinkDTO.ts b/src/clients/medusa/models/TableLinkDTO.ts index 7fa24c3370..2901d1c2ed 100644 --- a/src/clients/medusa/models/TableLinkDTO.ts +++ b/src/clients/medusa/models/TableLinkDTO.ts @@ -5,81 +5,82 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface TableLinkDTO */ export interface TableLinkDTO { - /** - * - * @type {string} - * @memberof TableLinkDTO - */ - table_name: string; - /** - * - * @type {string} - * @memberof TableLinkDTO - */ - link_type: TableLinkDTOLinkTypeEnum; + /** + * + * @type {string} + * @memberof TableLinkDTO + */ + table_name: string; + /** + * + * @type {string} + * @memberof TableLinkDTO + */ + link_type: TableLinkDTOLinkTypeEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum TableLinkDTOLinkTypeEnum { - Random = "random", - Sequential = "sequential", - Custom = "custom", + Random = 'random', + Sequential = 'sequential', + Custom = 'custom' } + /** * Check if a given object implements the TableLinkDTO interface. */ export function instanceOfTableLinkDTO(value: object): value is TableLinkDTO { - if (!("table_name" in value) || value["table_name"] === undefined) return false; - if (!("link_type" in value) || value["link_type"] === undefined) return false; - return true; + if (!('table_name' in value) || value['table_name'] === undefined) return false; + if (!('link_type' in value) || value['link_type'] === undefined) return false; + return true; } export function TableLinkDTOFromJSON(json: any): TableLinkDTO { - return TableLinkDTOFromJSONTyped(json, false); + return TableLinkDTOFromJSONTyped(json, false); } export function TableLinkDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): TableLinkDTO { - if (json == null) { - return json; - } - return { - table_name: json["table_name"], - link_type: json["link_type"], - }; + if (json == null) { + return json; + } + return { + + 'table_name': json['table_name'], + 'link_type': json['link_type'], + }; } export function TableLinkDTOToJSON(json: any): TableLinkDTO { - return TableLinkDTOToJSONTyped(json, false); + return TableLinkDTOToJSONTyped(json, false); } -export function TableLinkDTOToJSONTyped( - value?: TableLinkDTO | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TableLinkDTOToJSONTyped(value?: TableLinkDTO | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - table_name: value["table_name"], - link_type: value["link_type"], - }; + return { + + 'table_name': value['table_name'], + 'link_type': value['link_type'], + }; } + diff --git a/src/clients/medusa/models/ValueGeneratorDetails.ts b/src/clients/medusa/models/ValueGeneratorDetails.ts index 23233fcc84..5ec4a47750 100644 --- a/src/clients/medusa/models/ValueGeneratorDetails.ts +++ b/src/clients/medusa/models/ValueGeneratorDetails.ts @@ -5,136 +5,128 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ExpectedArgumentDetails } from "./ExpectedArgumentDetails"; +import { mapValues } from '../runtime'; +import type { ExpectedArgumentDetails } from './ExpectedArgumentDetails'; import { - ExpectedArgumentDetailsFromJSON, - ExpectedArgumentDetailsFromJSONTyped, - ExpectedArgumentDetailsToJSON, - ExpectedArgumentDetailsToJSONTyped, -} from "./ExpectedArgumentDetails"; + ExpectedArgumentDetailsFromJSON, + ExpectedArgumentDetailsFromJSONTyped, + ExpectedArgumentDetailsToJSON, + ExpectedArgumentDetailsToJSONTyped, +} from './ExpectedArgumentDetails'; /** - * + * * @export * @interface ValueGeneratorDetails */ export interface ValueGeneratorDetails { - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - name?: string; - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - category?: ValueGeneratorDetailsCategoryEnum; - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - description?: string; - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - return_type?: string; - /** - * - * @type {Array} - * @memberof ValueGeneratorDetails - */ - arguments?: Array; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + name?: string; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + category?: ValueGeneratorDetailsCategoryEnum; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + description?: string; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + return_type?: string; + /** + * + * @type {Array} + * @memberof ValueGeneratorDetails + */ + arguments?: Array; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ValueGeneratorDetailsCategoryEnum { - Location = "Location", - Boolean = "Boolean", - Commerce = "Commerce", - Company = "Company", - Conditional = "Conditional", - Date = "Date", - Device = "Device", - Finance = "Finance", - Healthcare = "Healthcare", - Internet = "Internet", - Number = "Number", - Person = "Person", - Phone = "Phone", - String = "String", - Struct = "Struct", - Reference = "Reference", - Util = "Util", - Table = "Table", - Vehicle = "Vehicle", + Location = 'Location', + Boolean = 'Boolean', + Commerce = 'Commerce', + Company = 'Company', + Conditional = 'Conditional', + Date = 'Date', + Device = 'Device', + Finance = 'Finance', + Healthcare = 'Healthcare', + Internet = 'Internet', + Number = 'Number', + Person = 'Person', + Phone = 'Phone', + String = 'String', + Struct = 'Struct', + Reference = 'Reference', + Util = 'Util', + Table = 'Table', + Vehicle = 'Vehicle' } + /** * Check if a given object implements the ValueGeneratorDetails interface. */ export function instanceOfValueGeneratorDetails(value: object): value is ValueGeneratorDetails { - return true; + return true; } export function ValueGeneratorDetailsFromJSON(json: any): ValueGeneratorDetails { - return ValueGeneratorDetailsFromJSONTyped(json, false); + return ValueGeneratorDetailsFromJSONTyped(json, false); } -export function ValueGeneratorDetailsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ValueGeneratorDetails { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - category: json["category"] == null ? undefined : json["category"], - description: json["description"] == null ? undefined : json["description"], - return_type: json["return_type"] == null ? undefined : json["return_type"], - arguments: - json["arguments"] == null - ? undefined - : (json["arguments"] as Array).map(ExpectedArgumentDetailsFromJSON), - }; +export function ValueGeneratorDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValueGeneratorDetails { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'category': json['category'] == null ? undefined : json['category'], + 'description': json['description'] == null ? undefined : json['description'], + 'return_type': json['return_type'] == null ? undefined : json['return_type'], + 'arguments': json['arguments'] == null ? undefined : ((json['arguments'] as Array).map(ExpectedArgumentDetailsFromJSON)), + }; } export function ValueGeneratorDetailsToJSON(json: any): ValueGeneratorDetails { - return ValueGeneratorDetailsToJSONTyped(json, false); + return ValueGeneratorDetailsToJSONTyped(json, false); } -export function ValueGeneratorDetailsToJSONTyped( - value?: ValueGeneratorDetails | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ValueGeneratorDetailsToJSONTyped(value?: ValueGeneratorDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - category: value["category"], - description: value["description"], - return_type: value["return_type"], - arguments: - value["arguments"] == null - ? undefined - : (value["arguments"] as Array).map(ExpectedArgumentDetailsToJSON), - }; + return { + + 'name': value['name'], + 'category': value['category'], + 'description': value['description'], + 'return_type': value['return_type'], + 'arguments': value['arguments'] == null ? undefined : ((value['arguments'] as Array).map(ExpectedArgumentDetailsToJSON)), + }; } + diff --git a/src/clients/medusa/models/ValueGeneratorDetailsList.ts b/src/clients/medusa/models/ValueGeneratorDetailsList.ts index 0b4ed0984f..b7710ca6fe 100644 --- a/src/clients/medusa/models/ValueGeneratorDetailsList.ts +++ b/src/clients/medusa/models/ValueGeneratorDetailsList.ts @@ -5,111 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { ValueGeneratorDetails } from "./ValueGeneratorDetails"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { ValueGeneratorDetails } from './ValueGeneratorDetails'; import { - ValueGeneratorDetailsFromJSON, - ValueGeneratorDetailsFromJSONTyped, - ValueGeneratorDetailsToJSON, - ValueGeneratorDetailsToJSONTyped, -} from "./ValueGeneratorDetails"; + ValueGeneratorDetailsFromJSON, + ValueGeneratorDetailsFromJSONTyped, + ValueGeneratorDetailsToJSON, + ValueGeneratorDetailsToJSONTyped, +} from './ValueGeneratorDetails'; /** - * + * * @export * @interface ValueGeneratorDetailsList */ export interface ValueGeneratorDetailsList { - /** - * - * @type {CollectionMetadata} - * @memberof ValueGeneratorDetailsList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof ValueGeneratorDetailsList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof ValueGeneratorDetailsList - */ - data?: Array; - /** - * - * @type {string} - * @memberof ValueGeneratorDetailsList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof ValueGeneratorDetailsList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof ValueGeneratorDetailsList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof ValueGeneratorDetailsList + */ + data?: Array; + /** + * + * @type {string} + * @memberof ValueGeneratorDetailsList + */ + kind?: string; } /** * Check if a given object implements the ValueGeneratorDetailsList interface. */ -export function instanceOfValueGeneratorDetailsList( - value: object, -): value is ValueGeneratorDetailsList { - return true; +export function instanceOfValueGeneratorDetailsList(value: object): value is ValueGeneratorDetailsList { + return true; } export function ValueGeneratorDetailsListFromJSON(json: any): ValueGeneratorDetailsList { - return ValueGeneratorDetailsListFromJSONTyped(json, false); + return ValueGeneratorDetailsListFromJSONTyped(json, false); } -export function ValueGeneratorDetailsListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ValueGeneratorDetailsList { - if (json == null) { - return json; - } - return { - metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), - api_version: json["api_version"] == null ? undefined : json["api_version"], - data: - json["data"] == null - ? undefined - : (json["data"] as Array).map(ValueGeneratorDetailsFromJSON), - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function ValueGeneratorDetailsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValueGeneratorDetailsList { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(ValueGeneratorDetailsFromJSON)), + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function ValueGeneratorDetailsListToJSON(json: any): ValueGeneratorDetailsList { - return ValueGeneratorDetailsListToJSONTyped(json, false); + return ValueGeneratorDetailsListToJSONTyped(json, false); } -export function ValueGeneratorDetailsListToJSONTyped( - value?: ValueGeneratorDetailsList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ValueGeneratorDetailsListToJSONTyped(value?: ValueGeneratorDetailsList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: CollectionMetadataToJSON(value["metadata"]), - api_version: value["api_version"], - data: - value["data"] == null - ? undefined - : (value["data"] as Array).map(ValueGeneratorDetailsToJSON), - kind: value["kind"], - }; + return { + + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'api_version': value['api_version'], + 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(ValueGeneratorDetailsToJSON)), + 'kind': value['kind'], + }; } + diff --git a/src/clients/medusa/models/index.ts b/src/clients/medusa/models/index.ts index 7f70f5fa97..753dfc29a3 100644 --- a/src/clients/medusa/models/index.ts +++ b/src/clients/medusa/models/index.ts @@ -1,28 +1,28 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./AvroSchemaResponse"; -export * from "./AvroSchemaResponseList"; -export * from "./CategoryList"; -export * from "./CollectionMetadata"; -export * from "./ColumnDTO"; -export * from "./DatasetDTO"; -export * from "./EventDTO"; -export * from "./EventMessage"; -export * from "./EventMessageList"; -export * from "./EventStreamSimulation"; -export * from "./EventStreamSimulationList"; -export * from "./EventThrottlerDTO"; -export * from "./EventThrottlerDetails"; -export * from "./EventThrottlerDetailsList"; -export * from "./ExampleDataset"; -export * from "./ExampleDatasetList"; -export * from "./ExpectedArgumentDetails"; -export * from "./FieldDTO"; -export * from "./GenerationDTO"; -export * from "./ProducerHealth"; -export * from "./RowDTO"; -export * from "./StreamDetails"; -export * from "./TableDTO"; -export * from "./TableLinkDTO"; -export * from "./ValueGeneratorDetails"; -export * from "./ValueGeneratorDetailsList"; +export * from './AvroSchemaResponse'; +export * from './AvroSchemaResponseList'; +export * from './CategoryList'; +export * from './CollectionMetadata'; +export * from './ColumnDTO'; +export * from './DatasetDTO'; +export * from './EventDTO'; +export * from './EventMessage'; +export * from './EventMessageList'; +export * from './EventStreamSimulation'; +export * from './EventStreamSimulationList'; +export * from './EventThrottlerDTO'; +export * from './EventThrottlerDetails'; +export * from './EventThrottlerDetailsList'; +export * from './ExampleDataset'; +export * from './ExampleDatasetList'; +export * from './ExpectedArgumentDetails'; +export * from './FieldDTO'; +export * from './GenerationDTO'; +export * from './ProducerHealth'; +export * from './RowDTO'; +export * from './StreamDetails'; +export * from './TableDTO'; +export * from './TableLinkDTO'; +export * from './ValueGeneratorDetails'; +export * from './ValueGeneratorDetailsList'; diff --git a/src/clients/medusa/runtime.ts b/src/clients/medusa/runtime.ts index 171ae8c04e..fb8bed9ee0 100644 --- a/src/clients/medusa/runtime.ts +++ b/src/clients/medusa/runtime.ts @@ -5,85 +5,83 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "http://localhost:8082".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts b/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts index b06403b7d8..b7bded3732 100644 --- a/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts +++ b/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts @@ -2,143 +2,115 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { Failure, GetScaffoldV1TemplateCollection200Response, ScaffoldV1TemplateCollectionList, -} from "../models/index"; +} from '../models/index'; import { - FailureFromJSON, - FailureToJSON, - GetScaffoldV1TemplateCollection200ResponseFromJSON, - GetScaffoldV1TemplateCollection200ResponseToJSON, - ScaffoldV1TemplateCollectionListFromJSON, - ScaffoldV1TemplateCollectionListToJSON, -} from "../models/index"; + FailureFromJSON, + FailureToJSON, + GetScaffoldV1TemplateCollection200ResponseFromJSON, + GetScaffoldV1TemplateCollection200ResponseToJSON, + ScaffoldV1TemplateCollectionListFromJSON, + ScaffoldV1TemplateCollectionListToJSON, +} from '../models/index'; export interface GetScaffoldV1TemplateCollectionRequest { - name: string; + name: string; } export interface ListScaffoldV1TemplateCollectionsRequest { - page_size?: number; - page_token?: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class TemplateCollectionsScaffoldV1Api extends runtime.BaseAPI { - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. - * Read a Template Collection - */ - async getScaffoldV1TemplateCollectionRaw( - requestParameters: GetScaffoldV1TemplateCollectionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getScaffoldV1TemplateCollection().', - ); + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. + * Read a Template Collection + */ + async getScaffoldV1TemplateCollectionRaw(requestParameters: GetScaffoldV1TemplateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getScaffoldV1TemplateCollection().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/scaffold/v1/template-collections/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetScaffoldV1TemplateCollection200ResponseFromJSON(jsonValue)); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. + * Read a Template Collection + */ + async getScaffoldV1TemplateCollection(requestParameters: GetScaffoldV1TemplateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getScaffoldV1TemplateCollectionRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/scaffold/v1/template-collections/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetScaffoldV1TemplateCollection200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. - * Read a Template Collection - */ - async getScaffoldV1TemplateCollection( - requestParameters: GetScaffoldV1TemplateCollectionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getScaffoldV1TemplateCollectionRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. - * List of Template Collections - */ - async listScaffoldV1TemplateCollectionsRaw( - requestParameters: ListScaffoldV1TemplateCollectionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. + * List of Template Collections + */ + async listScaffoldV1TemplateCollectionsRaw(requestParameters: ListScaffoldV1TemplateCollectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/scaffold/v1/template-collections`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScaffoldV1TemplateCollectionListFromJSON(jsonValue)); } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. + * List of Template Collections + */ + async listScaffoldV1TemplateCollections(requestParameters: ListScaffoldV1TemplateCollectionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listScaffoldV1TemplateCollectionsRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/scaffold/v1/template-collections`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ScaffoldV1TemplateCollectionListFromJSON(jsonValue), - ); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. - * List of Template Collections - */ - async listScaffoldV1TemplateCollections( - requestParameters: ListScaffoldV1TemplateCollectionsRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listScaffoldV1TemplateCollectionsRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } } diff --git a/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts b/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts index 86bfcea8fd..71b680be83 100644 --- a/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts +++ b/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts @@ -2,228 +2,185 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ApplyScaffoldV1TemplateRequest, Failure, GetScaffoldV1Template200Response, ScaffoldV1TemplateList, -} from "../models/index"; +} from '../models/index'; import { - ApplyScaffoldV1TemplateRequestFromJSON, - ApplyScaffoldV1TemplateRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetScaffoldV1Template200ResponseFromJSON, - GetScaffoldV1Template200ResponseToJSON, - ScaffoldV1TemplateListFromJSON, - ScaffoldV1TemplateListToJSON, -} from "../models/index"; + ApplyScaffoldV1TemplateRequestFromJSON, + ApplyScaffoldV1TemplateRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetScaffoldV1Template200ResponseFromJSON, + GetScaffoldV1Template200ResponseToJSON, + ScaffoldV1TemplateListFromJSON, + ScaffoldV1TemplateListToJSON, +} from '../models/index'; export interface ApplyScaffoldV1TemplateOperationRequest { - template_collection_name: string; - name: string; - ApplyScaffoldV1TemplateRequest?: ApplyScaffoldV1TemplateRequest; + template_collection_name: string; + name: string; + ApplyScaffoldV1TemplateRequest?: ApplyScaffoldV1TemplateRequest; } export interface GetScaffoldV1TemplateRequest { - template_collection_name: string; - name: string; + template_collection_name: string; + name: string; } export interface ListScaffoldV1TemplatesRequest { - template_collection_name: string; - page_size?: number; - page_token?: string; + template_collection_name: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class TemplatesScaffoldV1Api extends runtime.BaseAPI { - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. - * Apply a Template - */ - async applyScaffoldV1TemplateRaw( - requestParameters: ApplyScaffoldV1TemplateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["template_collection_name"] == null) { - throw new runtime.RequiredError( - "template_collection_name", - 'Required parameter "template_collection_name" was null or undefined when calling applyScaffoldV1Template().', - ); - } - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling applyScaffoldV1Template().', - ); + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. + * Apply a Template + */ + async applyScaffoldV1TemplateRaw(requestParameters: ApplyScaffoldV1TemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['template_collection_name'] == null) { + throw new runtime.RequiredError( + 'template_collection_name', + 'Required parameter "template_collection_name" was null or undefined when calling applyScaffoldV1Template().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling applyScaffoldV1Template().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}/apply`.replace(`{${"template-collection-name"}}`, encodeURIComponent(String(requestParameters['template_collection_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ApplyScaffoldV1TemplateRequestToJSON(requestParameters['ApplyScaffoldV1TemplateRequest']), + }, initOverrides); + + return new runtime.BlobApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}/apply` - .replace( - `{${"template-collection-name"}}`, - encodeURIComponent(String(requestParameters["template_collection_name"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ApplyScaffoldV1TemplateRequestToJSON( - requestParameters["ApplyScaffoldV1TemplateRequest"], - ), - }, - initOverrides, - ); - - return new runtime.BlobApiResponse(response); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. - * Apply a Template - */ - async applyScaffoldV1Template( - requestParameters: ApplyScaffoldV1TemplateOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.applyScaffoldV1TemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. - * Read a Template - */ - async getScaffoldV1TemplateRaw( - requestParameters: GetScaffoldV1TemplateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["template_collection_name"] == null) { - throw new runtime.RequiredError( - "template_collection_name", - 'Required parameter "template_collection_name" was null or undefined when calling getScaffoldV1Template().', - ); + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. + * Apply a Template + */ + async applyScaffoldV1Template(requestParameters: ApplyScaffoldV1TemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.applyScaffoldV1TemplateRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getScaffoldV1Template().', - ); + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. + * Read a Template + */ + async getScaffoldV1TemplateRaw(requestParameters: GetScaffoldV1TemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['template_collection_name'] == null) { + throw new runtime.RequiredError( + 'template_collection_name', + 'Required parameter "template_collection_name" was null or undefined when calling getScaffoldV1Template().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getScaffoldV1Template().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}`.replace(`{${"template-collection-name"}}`, encodeURIComponent(String(requestParameters['template_collection_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GetScaffoldV1Template200ResponseFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}` - .replace( - `{${"template-collection-name"}}`, - encodeURIComponent(String(requestParameters["template_collection_name"])), - ) - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - GetScaffoldV1Template200ResponseFromJSON(jsonValue), - ); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. - * Read a Template - */ - async getScaffoldV1Template( - requestParameters: GetScaffoldV1TemplateRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getScaffoldV1TemplateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. - * List of Templates - */ - async listScaffoldV1TemplatesRaw( - requestParameters: ListScaffoldV1TemplatesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["template_collection_name"] == null) { - throw new runtime.RequiredError( - "template_collection_name", - 'Required parameter "template_collection_name" was null or undefined when calling listScaffoldV1Templates().', - ); + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. + * Read a Template + */ + async getScaffoldV1Template(requestParameters: GetScaffoldV1TemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getScaffoldV1TemplateRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["page_size"] != null) { - queryParameters["page_size"] = requestParameters["page_size"]; + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. + * List of Templates + */ + async listScaffoldV1TemplatesRaw(requestParameters: ListScaffoldV1TemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['template_collection_name'] == null) { + throw new runtime.RequiredError( + 'template_collection_name', + 'Required parameter "template_collection_name" was null or undefined when calling listScaffoldV1Templates().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['page_size'] != null) { + queryParameters['page_size'] = requestParameters['page_size']; + } + + if (requestParameters['page_token'] != null) { + queryParameters['page_token'] = requestParameters['page_token']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/scaffold/v1/template-collections/{template-collection-name}/templates`.replace(`{${"template-collection-name"}}`, encodeURIComponent(String(requestParameters['template_collection_name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ScaffoldV1TemplateListFromJSON(jsonValue)); } - if (requestParameters["page_token"] != null) { - queryParameters["page_token"] = requestParameters["page_token"]; + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. + * List of Templates + */ + async listScaffoldV1Templates(requestParameters: ListScaffoldV1TemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listScaffoldV1TemplatesRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/scaffold/v1/template-collections/{template-collection-name}/templates`.replace( - `{${"template-collection-name"}}`, - encodeURIComponent(String(requestParameters["template_collection_name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ScaffoldV1TemplateListFromJSON(jsonValue), - ); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. - * List of Templates - */ - async listScaffoldV1Templates( - requestParameters: ListScaffoldV1TemplatesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.listScaffoldV1TemplatesRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/scaffoldingService/apis/index.ts b/src/clients/scaffoldingService/apis/index.ts index c12cefab03..a91888af83 100644 --- a/src/clients/scaffoldingService/apis/index.ts +++ b/src/clients/scaffoldingService/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./TemplateCollectionsScaffoldV1Api"; -export * from "./TemplatesScaffoldV1Api"; +export * from './TemplateCollectionsScaffoldV1Api'; +export * from './TemplatesScaffoldV1Api'; diff --git a/src/clients/scaffoldingService/index.ts b/src/clients/scaffoldingService/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/scaffoldingService/index.ts +++ b/src/clients/scaffoldingService/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts b/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts index 032f0ec45c..82af6a5dad 100644 --- a/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts +++ b/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts @@ -2,70 +2,65 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Request payload for the endpoint that applies a template. * @export * @interface ApplyScaffoldV1TemplateRequest */ export interface ApplyScaffoldV1TemplateRequest { - /** - * Values for the options of the template. - * @type {{ [key: string]: string; }} - * @memberof ApplyScaffoldV1TemplateRequest - */ - options: { [key: string]: string }; + /** + * Values for the options of the template. + * @type {{ [key: string]: string; }} + * @memberof ApplyScaffoldV1TemplateRequest + */ + options: { [key: string]: string; }; } /** * Check if a given object implements the ApplyScaffoldV1TemplateRequest interface. */ -export function instanceOfApplyScaffoldV1TemplateRequest( - value: object, -): value is ApplyScaffoldV1TemplateRequest { - if (!("options" in value) || value["options"] === undefined) return false; - return true; +export function instanceOfApplyScaffoldV1TemplateRequest(value: object): value is ApplyScaffoldV1TemplateRequest { + if (!('options' in value) || value['options'] === undefined) return false; + return true; } export function ApplyScaffoldV1TemplateRequestFromJSON(json: any): ApplyScaffoldV1TemplateRequest { - return ApplyScaffoldV1TemplateRequestFromJSONTyped(json, false); + return ApplyScaffoldV1TemplateRequestFromJSONTyped(json, false); } -export function ApplyScaffoldV1TemplateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ApplyScaffoldV1TemplateRequest { - if (json == null) { - return json; - } - return { - options: json["options"], - }; +export function ApplyScaffoldV1TemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplyScaffoldV1TemplateRequest { + if (json == null) { + return json; + } + return { + + 'options': json['options'], + }; } export function ApplyScaffoldV1TemplateRequestToJSON(json: any): ApplyScaffoldV1TemplateRequest { - return ApplyScaffoldV1TemplateRequestToJSONTyped(json, false); + return ApplyScaffoldV1TemplateRequestToJSONTyped(json, false); } -export function ApplyScaffoldV1TemplateRequestToJSONTyped( - value?: ApplyScaffoldV1TemplateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ApplyScaffoldV1TemplateRequestToJSONTyped(value?: ApplyScaffoldV1TemplateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - options: value["options"], - }; + return { + + 'options': value['options'], + }; } + diff --git a/src/clients/scaffoldingService/models/ErrorSource.ts b/src/clients/scaffoldingService/models/ErrorSource.ts index 695826529d..524c31562f 100644 --- a/src/clients/scaffoldingService/models/ErrorSource.ts +++ b/src/clients/scaffoldingService/models/ErrorSource.ts @@ -2,72 +2,72 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - pointer: json["pointer"] == null ? undefined : json["pointer"], - parameter: json["parameter"] == null ? undefined : json["parameter"], - }; + if (json == null) { + return json; + } + return { + + 'pointer': json['pointer'] == null ? undefined : json['pointer'], + 'parameter': json['parameter'] == null ? undefined : json['parameter'], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped( - value?: ErrorSource | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - pointer: value["pointer"], - parameter: value["parameter"], - }; + return { + + 'pointer': value['pointer'], + 'parameter': value['parameter'], + }; } + diff --git a/src/clients/scaffoldingService/models/Failure.ts b/src/clients/scaffoldingService/models/Failure.ts index ff1c43fcee..abc12b67fd 100644 --- a/src/clients/scaffoldingService/models/Failure.ts +++ b/src/clients/scaffoldingService/models/Failure.ts @@ -2,65 +2,65 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!("errors" in value) || value["errors"] === undefined) return false; - return true; + if (!('errors' in value) || value['errors'] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - errors: new Set(json["errors"]), - }; + if (json == null) { + return json; + } + return { + + 'errors': new Set(json['errors']), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped( - value?: Failure | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - errors: Array.from(value["errors"] as Set), - }; + return { + + 'errors': Array.from(value['errors'] as Set), + }; } + diff --git a/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts b/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts index 5d99498c76..ca5921fc6d 100644 --- a/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts +++ b/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts @@ -2,122 +2,113 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateMetadata } from "./ScaffoldV1TemplateMetadata"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateMetadata } from './ScaffoldV1TemplateMetadata'; import { - ScaffoldV1TemplateMetadataFromJSON, - ScaffoldV1TemplateMetadataFromJSONTyped, - ScaffoldV1TemplateMetadataToJSON, - ScaffoldV1TemplateMetadataToJSONTyped, -} from "./ScaffoldV1TemplateMetadata"; + ScaffoldV1TemplateMetadataFromJSON, + ScaffoldV1TemplateMetadataFromJSONTyped, + ScaffoldV1TemplateMetadataToJSON, + ScaffoldV1TemplateMetadataToJSONTyped, +} from './ScaffoldV1TemplateMetadata'; /** - * + * * @export * @interface GetScaffoldV1Template200Response */ export interface GetScaffoldV1Template200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetScaffoldV1Template200Response - */ - readonly api_version: GetScaffoldV1Template200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetScaffoldV1Template200Response - */ - readonly kind: GetScaffoldV1Template200ResponseKindEnum; - /** - * - * @type {ScaffoldV1TemplateMetadata} - * @memberof GetScaffoldV1Template200Response - */ - metadata?: ScaffoldV1TemplateMetadata; - /** - * - * @type {object} - * @memberof GetScaffoldV1Template200Response - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetScaffoldV1Template200Response + */ + readonly api_version: GetScaffoldV1Template200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetScaffoldV1Template200Response + */ + readonly kind: GetScaffoldV1Template200ResponseKindEnum; + /** + * + * @type {ScaffoldV1TemplateMetadata} + * @memberof GetScaffoldV1Template200Response + */ + metadata?: ScaffoldV1TemplateMetadata; + /** + * + * @type {object} + * @memberof GetScaffoldV1Template200Response + */ + spec: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetScaffoldV1Template200ResponseApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetScaffoldV1Template200ResponseKindEnum { - Template = "Template", + Template = 'Template' } + /** * Check if a given object implements the GetScaffoldV1Template200Response interface. */ -export function instanceOfGetScaffoldV1Template200Response( - value: object, -): value is GetScaffoldV1Template200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfGetScaffoldV1Template200Response(value: object): value is GetScaffoldV1Template200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } -export function GetScaffoldV1Template200ResponseFromJSON( - json: any, -): GetScaffoldV1Template200Response { - return GetScaffoldV1Template200ResponseFromJSONTyped(json, false); +export function GetScaffoldV1Template200ResponseFromJSON(json: any): GetScaffoldV1Template200Response { + return GetScaffoldV1Template200ResponseFromJSONTyped(json, false); } -export function GetScaffoldV1Template200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetScaffoldV1Template200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: - json["metadata"] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json["metadata"]), - spec: json["spec"], - }; +export function GetScaffoldV1Template200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetScaffoldV1Template200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json['metadata']), + 'spec': json['spec'], + }; } -export function GetScaffoldV1Template200ResponseToJSON( - json: any, -): GetScaffoldV1Template200Response { - return GetScaffoldV1Template200ResponseToJSONTyped(json, false); +export function GetScaffoldV1Template200ResponseToJSON(json: any): GetScaffoldV1Template200Response { + return GetScaffoldV1Template200ResponseToJSONTyped(json, false); } -export function GetScaffoldV1Template200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetScaffoldV1Template200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateMetadataToJSON(value["metadata"]), - spec: value["spec"], - }; + return { + + 'metadata': ScaffoldV1TemplateMetadataToJSON(value['metadata']), + 'spec': value['spec'], + }; } + diff --git a/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts b/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts index 73ac40fdcc..62f6741c07 100644 --- a/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts +++ b/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts @@ -2,124 +2,113 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateCollectionMetadata } from "./ScaffoldV1TemplateCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateCollectionMetadata } from './ScaffoldV1TemplateCollectionMetadata'; import { - ScaffoldV1TemplateCollectionMetadataFromJSON, - ScaffoldV1TemplateCollectionMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionMetadataToJSON, - ScaffoldV1TemplateCollectionMetadataToJSONTyped, -} from "./ScaffoldV1TemplateCollectionMetadata"; + ScaffoldV1TemplateCollectionMetadataFromJSON, + ScaffoldV1TemplateCollectionMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionMetadataToJSON, + ScaffoldV1TemplateCollectionMetadataToJSONTyped, +} from './ScaffoldV1TemplateCollectionMetadata'; /** - * + * * @export * @interface GetScaffoldV1TemplateCollection200Response */ export interface GetScaffoldV1TemplateCollection200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - readonly api_version: GetScaffoldV1TemplateCollection200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - readonly kind: GetScaffoldV1TemplateCollection200ResponseKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionMetadata} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - metadata?: ScaffoldV1TemplateCollectionMetadata; - /** - * - * @type {object} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + readonly api_version: GetScaffoldV1TemplateCollection200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + readonly kind: GetScaffoldV1TemplateCollection200ResponseKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionMetadata} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + metadata?: ScaffoldV1TemplateCollectionMetadata; + /** + * + * @type {object} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + spec: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetScaffoldV1TemplateCollection200ResponseApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum GetScaffoldV1TemplateCollection200ResponseKindEnum { - TemplateCollection = "TemplateCollection", + TemplateCollection = 'TemplateCollection' } + /** * Check if a given object implements the GetScaffoldV1TemplateCollection200Response interface. */ -export function instanceOfGetScaffoldV1TemplateCollection200Response( - value: object, -): value is GetScaffoldV1TemplateCollection200Response { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfGetScaffoldV1TemplateCollection200Response(value: object): value is GetScaffoldV1TemplateCollection200Response { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } -export function GetScaffoldV1TemplateCollection200ResponseFromJSON( - json: any, -): GetScaffoldV1TemplateCollection200Response { - return GetScaffoldV1TemplateCollection200ResponseFromJSONTyped(json, false); +export function GetScaffoldV1TemplateCollection200ResponseFromJSON(json: any): GetScaffoldV1TemplateCollection200Response { + return GetScaffoldV1TemplateCollection200ResponseFromJSONTyped(json, false); } -export function GetScaffoldV1TemplateCollection200ResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GetScaffoldV1TemplateCollection200Response { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: - json["metadata"] == null - ? undefined - : ScaffoldV1TemplateCollectionMetadataFromJSON(json["metadata"]), - spec: json["spec"], - }; +export function GetScaffoldV1TemplateCollection200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetScaffoldV1TemplateCollection200Response { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateCollectionMetadataFromJSON(json['metadata']), + 'spec': json['spec'], + }; } -export function GetScaffoldV1TemplateCollection200ResponseToJSON( - json: any, -): GetScaffoldV1TemplateCollection200Response { - return GetScaffoldV1TemplateCollection200ResponseToJSONTyped(json, false); +export function GetScaffoldV1TemplateCollection200ResponseToJSON(json: any): GetScaffoldV1TemplateCollection200Response { + return GetScaffoldV1TemplateCollection200ResponseToJSONTyped(json, false); } -export function GetScaffoldV1TemplateCollection200ResponseToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GetScaffoldV1TemplateCollection200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateCollectionMetadataToJSON(value["metadata"]), - spec: value["spec"], - }; + return { + + 'metadata': ScaffoldV1TemplateCollectionMetadataToJSON(value['metadata']), + 'spec': value['spec'], + }; } + diff --git a/src/clients/scaffoldingService/models/GlobalObjectReference.ts b/src/clients/scaffoldingService/models/GlobalObjectReference.ts index 9b7eafe73e..55dc04abd5 100644 --- a/src/clients/scaffoldingService/models/GlobalObjectReference.ts +++ b/src/clients/scaffoldingService/models/GlobalObjectReference.ts @@ -2,84 +2,81 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface GlobalObjectReference */ export interface GlobalObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - id: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof GlobalObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + id: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof GlobalObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the GlobalObjectReference interface. */ export function instanceOfGlobalObjectReference(value: object): value is GlobalObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function GlobalObjectReferenceFromJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceFromJSONTyped(json, false); + return GlobalObjectReferenceFromJSONTyped(json, false); } -export function GlobalObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): GlobalObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - related: json["related"], - resource_name: json["resource_name"], - }; +export function GlobalObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'related': json['related'], + 'resource_name': json['resource_name'], + }; } export function GlobalObjectReferenceToJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceToJSONTyped(json, false); + return GlobalObjectReferenceToJSONTyped(json, false); } -export function GlobalObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function GlobalObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - }; + return { + + 'id': value['id'], + }; } + diff --git a/src/clients/scaffoldingService/models/ListMeta.ts b/src/clients/scaffoldingService/models/ListMeta.ts index f180cb3f67..8665d768bf 100644 --- a/src/clients/scaffoldingService/models/ListMeta.ts +++ b/src/clients/scaffoldingService/models/ListMeta.ts @@ -2,96 +2,96 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. - * @type {string} - * @memberof ListMeta - */ - first?: string | null; - /** - * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. - * @type {string} - * @memberof ListMeta - */ - last?: string | null; - /** - * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. - * @type {string} - * @memberof ListMeta - */ - prev?: string | null; - /** - * A link to the next page of results. If a response does not contain a next link, then there is no more data available. - * @type {string} - * @memberof ListMeta - */ - next?: string | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ListMeta - */ - total_size?: number; + /** + * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. + * @type {string} + * @memberof ListMeta + */ + first?: string | null; + /** + * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. + * @type {string} + * @memberof ListMeta + */ + last?: string | null; + /** + * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. + * @type {string} + * @memberof ListMeta + */ + prev?: string | null; + /** + * A link to the next page of results. If a response does not contain a next link, then there is no more data available. + * @type {string} + * @memberof ListMeta + */ + next?: string | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ListMeta + */ + total_size?: number; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped( - value?: ListMeta | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/scaffoldingService/models/ModelError.ts b/src/clients/scaffoldingService/models/ModelError.ts index 491e79c615..dfcb5416d2 100644 --- a/src/clients/scaffoldingService/models/ModelError.ts +++ b/src/clients/scaffoldingService/models/ModelError.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ErrorSource } from "./ErrorSource"; +import { mapValues } from '../runtime'; +import type { ErrorSource } from './ErrorSource'; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from "./ErrorSource"; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from './ErrorSource'; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - status: json["status"] == null ? undefined : json["status"], - code: json["code"] == null ? undefined : json["code"], - title: json["title"] == null ? undefined : json["title"], - detail: json["detail"] == null ? undefined : json["detail"], - source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'status': json['status'] == null ? undefined : json['status'], + 'code': json['code'] == null ? undefined : json['code'], + 'title': json['title'] == null ? undefined : json['title'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped( - value?: ModelError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - status: value["status"], - code: value["code"], - title: value["title"], - detail: value["detail"], - source: ErrorSourceToJSON(value["source"]), - }; + return { + + 'id': value['id'], + 'status': value['status'], + 'code': value['code'], + 'title': value['title'], + 'detail': value['detail'], + 'source': ErrorSourceToJSON(value['source']), + }; } + diff --git a/src/clients/scaffoldingService/models/ObjectMeta.ts b/src/clients/scaffoldingService/models/ObjectMeta.ts index 738cb766eb..699980b452 100644 --- a/src/clients/scaffoldingService/models/ObjectMeta.ts +++ b/src/clients/scaffoldingService/models/ObjectMeta.ts @@ -2,94 +2,92 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_name?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly deleted_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_name?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped( - value?: Omit< - ObjectMeta, - "self" | "resource_name" | "created_at" | "updated_at" | "deleted_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return {}; + return { + + }; } + diff --git a/src/clients/scaffoldingService/models/ObjectReference.ts b/src/clients/scaffoldingService/models/ObjectReference.ts index 3d60cead87..728a5e54b6 100644 --- a/src/clients/scaffoldingService/models/ObjectReference.ts +++ b/src/clients/scaffoldingService/models/ObjectReference.ts @@ -2,106 +2,103 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * ObjectReference provides information for you to locate the referred object * @export * @interface ObjectReference */ export interface ObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof ObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof ObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof ObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly resource_name: string; - /** - * API group and version of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly api_version?: string; - /** - * Kind of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly kind?: string; + /** + * ID of the referred resource + * @type {string} + * @memberof ObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof ObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof ObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly resource_name: string; + /** + * API group and version of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly api_version?: string; + /** + * Kind of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly kind?: string; } /** * Check if a given object implements the ObjectReference interface. */ export function instanceOfObjectReference(value: object): value is ObjectReference { - if (!("id" in value) || value["id"] === undefined) return false; - if (!("related" in value) || value["related"] === undefined) return false; - if (!("resource_name" in value) || value["resource_name"] === undefined) return false; - return true; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('related' in value) || value['related'] === undefined) return false; + if (!('resource_name' in value) || value['resource_name'] === undefined) return false; + return true; } export function ObjectReferenceFromJSON(json: any): ObjectReference { - return ObjectReferenceFromJSONTyped(json, false); + return ObjectReferenceFromJSONTyped(json, false); } -export function ObjectReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ObjectReference { - if (json == null) { - return json; - } - return { - id: json["id"], - environment: json["environment"] == null ? undefined : json["environment"], - related: json["related"], - resource_name: json["resource_name"], - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - }; +export function ObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectReference { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'environment': json['environment'] == null ? undefined : json['environment'], + 'related': json['related'], + 'resource_name': json['resource_name'], + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + }; } export function ObjectReferenceToJSON(json: any): ObjectReference { - return ObjectReferenceToJSONTyped(json, false); + return ObjectReferenceToJSONTyped(json, false); } -export function ObjectReferenceToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - environment: value["environment"], - }; + return { + + 'id': value['id'], + 'environment': value['environment'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1Template.ts b/src/clients/scaffoldingService/models/ScaffoldV1Template.ts index 561f775fe9..dc8977c9a8 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1Template.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1Template.ts @@ -2,123 +2,120 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateMetadata } from "./ScaffoldV1TemplateMetadata"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateMetadata } from './ScaffoldV1TemplateMetadata'; import { - ScaffoldV1TemplateMetadataFromJSON, - ScaffoldV1TemplateMetadataFromJSONTyped, - ScaffoldV1TemplateMetadataToJSON, - ScaffoldV1TemplateMetadataToJSONTyped, -} from "./ScaffoldV1TemplateMetadata"; -import type { ScaffoldV1TemplateSpec } from "./ScaffoldV1TemplateSpec"; + ScaffoldV1TemplateMetadataFromJSON, + ScaffoldV1TemplateMetadataFromJSONTyped, + ScaffoldV1TemplateMetadataToJSON, + ScaffoldV1TemplateMetadataToJSONTyped, +} from './ScaffoldV1TemplateMetadata'; +import type { ScaffoldV1TemplateSpec } from './ScaffoldV1TemplateSpec'; import { - ScaffoldV1TemplateSpecFromJSON, - ScaffoldV1TemplateSpecFromJSONTyped, - ScaffoldV1TemplateSpecToJSON, - ScaffoldV1TemplateSpecToJSONTyped, -} from "./ScaffoldV1TemplateSpec"; + ScaffoldV1TemplateSpecFromJSON, + ScaffoldV1TemplateSpecFromJSONTyped, + ScaffoldV1TemplateSpecToJSON, + ScaffoldV1TemplateSpecToJSONTyped, +} from './ScaffoldV1TemplateSpec'; /** * Templates can be used to generate application projects. - * + * * ## The Templates Model * * @export * @interface ScaffoldV1Template */ export interface ScaffoldV1Template { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1Template - */ - readonly api_version?: ScaffoldV1TemplateApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1Template - */ - readonly kind?: ScaffoldV1TemplateKindEnum; - /** - * - * @type {ScaffoldV1TemplateMetadata} - * @memberof ScaffoldV1Template - */ - metadata?: ScaffoldV1TemplateMetadata; - /** - * - * @type {ScaffoldV1TemplateSpec} - * @memberof ScaffoldV1Template - */ - spec?: ScaffoldV1TemplateSpec; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1Template + */ + readonly api_version?: ScaffoldV1TemplateApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1Template + */ + readonly kind?: ScaffoldV1TemplateKindEnum; + /** + * + * @type {ScaffoldV1TemplateMetadata} + * @memberof ScaffoldV1Template + */ + metadata?: ScaffoldV1TemplateMetadata; + /** + * + * @type {ScaffoldV1TemplateSpec} + * @memberof ScaffoldV1Template + */ + spec?: ScaffoldV1TemplateSpec; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateKindEnum { - Template = "Template", + Template = 'Template' } + /** * Check if a given object implements the ScaffoldV1Template interface. */ export function instanceOfScaffoldV1Template(value: object): value is ScaffoldV1Template { - return true; + return true; } export function ScaffoldV1TemplateFromJSON(json: any): ScaffoldV1Template { - return ScaffoldV1TemplateFromJSONTyped(json, false); + return ScaffoldV1TemplateFromJSONTyped(json, false); } -export function ScaffoldV1TemplateFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1Template { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json["metadata"]), - spec: json["spec"] == null ? undefined : ScaffoldV1TemplateSpecFromJSON(json["spec"]), - }; +export function ScaffoldV1TemplateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1Template { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json['metadata']), + 'spec': json['spec'] == null ? undefined : ScaffoldV1TemplateSpecFromJSON(json['spec']), + }; } export function ScaffoldV1TemplateToJSON(json: any): ScaffoldV1Template { - return ScaffoldV1TemplateToJSONTyped(json, false); + return ScaffoldV1TemplateToJSONTyped(json, false); } -export function ScaffoldV1TemplateToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateMetadataToJSON(value["metadata"]), - spec: ScaffoldV1TemplateSpecToJSON(value["spec"]), - }; + return { + + 'metadata': ScaffoldV1TemplateMetadataToJSON(value['metadata']), + 'spec': ScaffoldV1TemplateSpecToJSON(value['spec']), + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts index 934f049d11..15ccfd6324 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts @@ -2,127 +2,120 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateCollectionMetadata } from "./ScaffoldV1TemplateCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateCollectionMetadata } from './ScaffoldV1TemplateCollectionMetadata'; import { - ScaffoldV1TemplateCollectionMetadataFromJSON, - ScaffoldV1TemplateCollectionMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionMetadataToJSON, - ScaffoldV1TemplateCollectionMetadataToJSONTyped, -} from "./ScaffoldV1TemplateCollectionMetadata"; -import type { ScaffoldV1TemplateCollectionSpec } from "./ScaffoldV1TemplateCollectionSpec"; + ScaffoldV1TemplateCollectionMetadataFromJSON, + ScaffoldV1TemplateCollectionMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionMetadataToJSON, + ScaffoldV1TemplateCollectionMetadataToJSONTyped, +} from './ScaffoldV1TemplateCollectionMetadata'; +import type { ScaffoldV1TemplateCollectionSpec } from './ScaffoldV1TemplateCollectionSpec'; import { - ScaffoldV1TemplateCollectionSpecFromJSON, - ScaffoldV1TemplateCollectionSpecFromJSONTyped, - ScaffoldV1TemplateCollectionSpecToJSON, - ScaffoldV1TemplateCollectionSpecToJSONTyped, -} from "./ScaffoldV1TemplateCollectionSpec"; + ScaffoldV1TemplateCollectionSpecFromJSON, + ScaffoldV1TemplateCollectionSpecFromJSONTyped, + ScaffoldV1TemplateCollectionSpecToJSON, + ScaffoldV1TemplateCollectionSpecToJSONTyped, +} from './ScaffoldV1TemplateCollectionSpec'; /** * Template collections curate sets of templates. - * + * * ## The Template Collections Model * * @export * @interface ScaffoldV1TemplateCollection */ export interface ScaffoldV1TemplateCollection { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateCollection - */ - readonly api_version?: ScaffoldV1TemplateCollectionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateCollection - */ - readonly kind?: ScaffoldV1TemplateCollectionKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionMetadata} - * @memberof ScaffoldV1TemplateCollection - */ - metadata?: ScaffoldV1TemplateCollectionMetadata; - /** - * - * @type {ScaffoldV1TemplateCollectionSpec} - * @memberof ScaffoldV1TemplateCollection - */ - spec?: ScaffoldV1TemplateCollectionSpec; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateCollection + */ + readonly api_version?: ScaffoldV1TemplateCollectionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateCollection + */ + readonly kind?: ScaffoldV1TemplateCollectionKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionMetadata} + * @memberof ScaffoldV1TemplateCollection + */ + metadata?: ScaffoldV1TemplateCollectionMetadata; + /** + * + * @type {ScaffoldV1TemplateCollectionSpec} + * @memberof ScaffoldV1TemplateCollection + */ + spec?: ScaffoldV1TemplateCollectionSpec; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateCollectionApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateCollectionKindEnum { - TemplateCollection = "TemplateCollection", + TemplateCollection = 'TemplateCollection' } + /** * Check if a given object implements the ScaffoldV1TemplateCollection interface. */ -export function instanceOfScaffoldV1TemplateCollection( - value: object, -): value is ScaffoldV1TemplateCollection { - return true; +export function instanceOfScaffoldV1TemplateCollection(value: object): value is ScaffoldV1TemplateCollection { + return true; } export function ScaffoldV1TemplateCollectionFromJSON(json: any): ScaffoldV1TemplateCollection { - return ScaffoldV1TemplateCollectionFromJSONTyped(json, false); + return ScaffoldV1TemplateCollectionFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateCollection { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: - json["metadata"] == null - ? undefined - : ScaffoldV1TemplateCollectionMetadataFromJSON(json["metadata"]), - spec: json["spec"] == null ? undefined : ScaffoldV1TemplateCollectionSpecFromJSON(json["spec"]), - }; +export function ScaffoldV1TemplateCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollection { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateCollectionMetadataFromJSON(json['metadata']), + 'spec': json['spec'] == null ? undefined : ScaffoldV1TemplateCollectionSpecFromJSON(json['spec']), + }; } export function ScaffoldV1TemplateCollectionToJSON(json: any): ScaffoldV1TemplateCollection { - return ScaffoldV1TemplateCollectionToJSONTyped(json, false); + return ScaffoldV1TemplateCollectionToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateCollectionMetadataToJSON(value["metadata"]), - spec: ScaffoldV1TemplateCollectionSpecToJSON(value["spec"]), - }; + return { + + 'metadata': ScaffoldV1TemplateCollectionMetadataToJSON(value['metadata']), + 'spec': ScaffoldV1TemplateCollectionSpecToJSON(value['spec']), + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts index ba6ededc20..578188b29a 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts @@ -2,136 +2,124 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateCollectionListDataInner } from "./ScaffoldV1TemplateCollectionListDataInner"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateCollectionListDataInner } from './ScaffoldV1TemplateCollectionListDataInner'; import { - ScaffoldV1TemplateCollectionListDataInnerFromJSON, - ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped, - ScaffoldV1TemplateCollectionListDataInnerToJSON, - ScaffoldV1TemplateCollectionListDataInnerToJSONTyped, -} from "./ScaffoldV1TemplateCollectionListDataInner"; -import type { ScaffoldV1TemplateCollectionListMetadata } from "./ScaffoldV1TemplateCollectionListMetadata"; + ScaffoldV1TemplateCollectionListDataInnerFromJSON, + ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped, + ScaffoldV1TemplateCollectionListDataInnerToJSON, + ScaffoldV1TemplateCollectionListDataInnerToJSONTyped, +} from './ScaffoldV1TemplateCollectionListDataInner'; +import type { ScaffoldV1TemplateCollectionListMetadata } from './ScaffoldV1TemplateCollectionListMetadata'; import { - ScaffoldV1TemplateCollectionListMetadataFromJSON, - ScaffoldV1TemplateCollectionListMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionListMetadataToJSON, - ScaffoldV1TemplateCollectionListMetadataToJSONTyped, -} from "./ScaffoldV1TemplateCollectionListMetadata"; + ScaffoldV1TemplateCollectionListMetadataFromJSON, + ScaffoldV1TemplateCollectionListMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionListMetadataToJSON, + ScaffoldV1TemplateCollectionListMetadataToJSONTyped, +} from './ScaffoldV1TemplateCollectionListMetadata'; /** * Template collections curate sets of templates. - * + * * ## The Template Collections Model * * @export * @interface ScaffoldV1TemplateCollectionList */ export interface ScaffoldV1TemplateCollectionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionList - */ - readonly api_version: ScaffoldV1TemplateCollectionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionList - */ - readonly kind: ScaffoldV1TemplateCollectionListKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionListMetadata} - * @memberof ScaffoldV1TemplateCollectionList - */ - metadata: ScaffoldV1TemplateCollectionListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof ScaffoldV1TemplateCollectionList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionList + */ + readonly api_version: ScaffoldV1TemplateCollectionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionList + */ + readonly kind: ScaffoldV1TemplateCollectionListKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionListMetadata} + * @memberof ScaffoldV1TemplateCollectionList + */ + metadata: ScaffoldV1TemplateCollectionListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof ScaffoldV1TemplateCollectionList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateCollectionListApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateCollectionListKindEnum { - TemplateCollectionList = "TemplateCollectionList", + TemplateCollectionList = 'TemplateCollectionList' } + /** * Check if a given object implements the ScaffoldV1TemplateCollectionList interface. */ -export function instanceOfScaffoldV1TemplateCollectionList( - value: object, -): value is ScaffoldV1TemplateCollectionList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateCollectionList(value: object): value is ScaffoldV1TemplateCollectionList { + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } -export function ScaffoldV1TemplateCollectionListFromJSON( - json: any, -): ScaffoldV1TemplateCollectionList { - return ScaffoldV1TemplateCollectionListFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListFromJSON(json: any): ScaffoldV1TemplateCollectionList { + return ScaffoldV1TemplateCollectionListFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateCollectionList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ScaffoldV1TemplateCollectionListMetadataFromJSON(json["metadata"]), - data: new Set( - (json["data"] as Array).map(ScaffoldV1TemplateCollectionListDataInnerFromJSON), - ), - }; +export function ScaffoldV1TemplateCollectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ScaffoldV1TemplateCollectionListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(ScaffoldV1TemplateCollectionListDataInnerFromJSON))), + }; } -export function ScaffoldV1TemplateCollectionListToJSON( - json: any, -): ScaffoldV1TemplateCollectionList { - return ScaffoldV1TemplateCollectionListToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListToJSON(json: any): ScaffoldV1TemplateCollectionList { + return ScaffoldV1TemplateCollectionListToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateCollectionListMetadataToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map( - ScaffoldV1TemplateCollectionListDataInnerToJSON, - ), - }; + return { + + 'metadata': ScaffoldV1TemplateCollectionListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(ScaffoldV1TemplateCollectionListDataInnerToJSON)), + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts index 5df61112a5..f004cf46e6 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts @@ -2,120 +2,112 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateCollectionMetadata } from "./ScaffoldV1TemplateCollectionMetadata"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateCollectionMetadata } from './ScaffoldV1TemplateCollectionMetadata'; import { - ScaffoldV1TemplateCollectionMetadataFromJSON, - ScaffoldV1TemplateCollectionMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionMetadataToJSON, - ScaffoldV1TemplateCollectionMetadataToJSONTyped, -} from "./ScaffoldV1TemplateCollectionMetadata"; + ScaffoldV1TemplateCollectionMetadataFromJSON, + ScaffoldV1TemplateCollectionMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionMetadataToJSON, + ScaffoldV1TemplateCollectionMetadataToJSONTyped, +} from './ScaffoldV1TemplateCollectionMetadata'; /** - * + * * @export * @interface ScaffoldV1TemplateCollectionListDataInner */ export interface ScaffoldV1TemplateCollectionListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - readonly api_version?: ScaffoldV1TemplateCollectionListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - readonly kind?: ScaffoldV1TemplateCollectionListDataInnerKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionMetadata} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - metadata: ScaffoldV1TemplateCollectionMetadata; - /** - * - * @type {object} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + readonly api_version?: ScaffoldV1TemplateCollectionListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + readonly kind?: ScaffoldV1TemplateCollectionListDataInnerKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionMetadata} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + metadata: ScaffoldV1TemplateCollectionMetadata; + /** + * + * @type {object} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + spec: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateCollectionListDataInnerApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateCollectionListDataInnerKindEnum { - TemplateCollection = "TemplateCollection", + TemplateCollection = 'TemplateCollection' } + /** * Check if a given object implements the ScaffoldV1TemplateCollectionListDataInner interface. */ -export function instanceOfScaffoldV1TemplateCollectionListDataInner( - value: object, -): value is ScaffoldV1TemplateCollectionListDataInner { - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateCollectionListDataInner(value: object): value is ScaffoldV1TemplateCollectionListDataInner { + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } -export function ScaffoldV1TemplateCollectionListDataInnerFromJSON( - json: any, -): ScaffoldV1TemplateCollectionListDataInner { - return ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListDataInnerFromJSON(json: any): ScaffoldV1TemplateCollectionListDataInner { + return ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateCollectionListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: ScaffoldV1TemplateCollectionMetadataFromJSON(json["metadata"]), - spec: json["spec"], - }; +export function ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': ScaffoldV1TemplateCollectionMetadataFromJSON(json['metadata']), + 'spec': json['spec'], + }; } -export function ScaffoldV1TemplateCollectionListDataInnerToJSON( - json: any, -): ScaffoldV1TemplateCollectionListDataInner { - return ScaffoldV1TemplateCollectionListDataInnerToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListDataInnerToJSON(json: any): ScaffoldV1TemplateCollectionListDataInner { + return ScaffoldV1TemplateCollectionListDataInnerToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListDataInnerToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateCollectionMetadataToJSON(value["metadata"]), - spec: value["spec"], - }; + return { + + 'metadata': ScaffoldV1TemplateCollectionMetadataToJSON(value['metadata']), + 'spec': value['spec'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts index 96e007006c..354bf5a5ce 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts @@ -2,105 +2,96 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ScaffoldV1TemplateCollectionListMetadata */ export interface ScaffoldV1TemplateCollectionListMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + total_size?: number; } /** * Check if a given object implements the ScaffoldV1TemplateCollectionListMetadata interface. */ -export function instanceOfScaffoldV1TemplateCollectionListMetadata( - value: object, -): value is ScaffoldV1TemplateCollectionListMetadata { - return true; +export function instanceOfScaffoldV1TemplateCollectionListMetadata(value: object): value is ScaffoldV1TemplateCollectionListMetadata { + return true; } -export function ScaffoldV1TemplateCollectionListMetadataFromJSON( - json: any, -): ScaffoldV1TemplateCollectionListMetadata { - return ScaffoldV1TemplateCollectionListMetadataFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListMetadataFromJSON(json: any): ScaffoldV1TemplateCollectionListMetadata { + return ScaffoldV1TemplateCollectionListMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateCollectionListMetadata { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; +export function ScaffoldV1TemplateCollectionListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionListMetadata { + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } -export function ScaffoldV1TemplateCollectionListMetadataToJSON( - json: any, -): ScaffoldV1TemplateCollectionListMetadata { - return ScaffoldV1TemplateCollectionListMetadataToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListMetadataToJSON(json: any): ScaffoldV1TemplateCollectionListMetadata { + return ScaffoldV1TemplateCollectionListMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListMetadataToJSONTyped( - value?: ScaffoldV1TemplateCollectionListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionListMetadataToJSONTyped(value?: ScaffoldV1TemplateCollectionListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts index 0ef144d378..2095a901dc 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts @@ -2,106 +2,94 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ScaffoldV1TemplateCollectionMetadata */ export interface ScaffoldV1TemplateCollectionMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ScaffoldV1TemplateCollectionMetadata interface. */ -export function instanceOfScaffoldV1TemplateCollectionMetadata( - value: object, -): value is ScaffoldV1TemplateCollectionMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateCollectionMetadata(value: object): value is ScaffoldV1TemplateCollectionMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } -export function ScaffoldV1TemplateCollectionMetadataFromJSON( - json: any, -): ScaffoldV1TemplateCollectionMetadata { - return ScaffoldV1TemplateCollectionMetadataFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionMetadataFromJSON(json: any): ScaffoldV1TemplateCollectionMetadata { + return ScaffoldV1TemplateCollectionMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateCollectionMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function ScaffoldV1TemplateCollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } -export function ScaffoldV1TemplateCollectionMetadataToJSON( - json: any, -): ScaffoldV1TemplateCollectionMetadata { - return ScaffoldV1TemplateCollectionMetadataToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionMetadataToJSON(json: any): ScaffoldV1TemplateCollectionMetadata { + return ScaffoldV1TemplateCollectionMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionMetadataToJSONTyped( - value?: Omit< - ScaffoldV1TemplateCollectionMetadata, - "created_at" | "updated_at" | "deleted_at" - > | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts index 6eaf449e1f..eef7d2d352 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts @@ -2,89 +2,80 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The desired state of the Template Collection * @export * @interface ScaffoldV1TemplateCollectionSpec */ export interface ScaffoldV1TemplateCollectionSpec { - /** - * The name of the template collection. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionSpec - */ - name?: string; - /** - * The display name of the template collection. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionSpec - */ - display_name?: string; - /** - * The description of the template collection. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionSpec - */ - description?: string; + /** + * The name of the template collection. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionSpec + */ + name?: string; + /** + * The display name of the template collection. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionSpec + */ + display_name?: string; + /** + * The description of the template collection. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionSpec + */ + description?: string; } /** * Check if a given object implements the ScaffoldV1TemplateCollectionSpec interface. */ -export function instanceOfScaffoldV1TemplateCollectionSpec( - value: object, -): value is ScaffoldV1TemplateCollectionSpec { - return true; +export function instanceOfScaffoldV1TemplateCollectionSpec(value: object): value is ScaffoldV1TemplateCollectionSpec { + return true; } -export function ScaffoldV1TemplateCollectionSpecFromJSON( - json: any, -): ScaffoldV1TemplateCollectionSpec { - return ScaffoldV1TemplateCollectionSpecFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionSpecFromJSON(json: any): ScaffoldV1TemplateCollectionSpec { + return ScaffoldV1TemplateCollectionSpecFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateCollectionSpec { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - display_name: json["display_name"] == null ? undefined : json["display_name"], - description: json["description"] == null ? undefined : json["description"], - }; +export function ScaffoldV1TemplateCollectionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionSpec { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'description': json['description'] == null ? undefined : json['description'], + }; } -export function ScaffoldV1TemplateCollectionSpecToJSON( - json: any, -): ScaffoldV1TemplateCollectionSpec { - return ScaffoldV1TemplateCollectionSpecToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionSpecToJSON(json: any): ScaffoldV1TemplateCollectionSpec { + return ScaffoldV1TemplateCollectionSpecToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionSpecToJSONTyped( - value?: ScaffoldV1TemplateCollectionSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionSpecToJSONTyped(value?: ScaffoldV1TemplateCollectionSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - display_name: value["display_name"], - description: value["description"], - }; + return { + + 'name': value['name'], + 'display_name': value['display_name'], + 'description': value['description'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts index ab70c7cd56..3f739b36ff 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts @@ -2,126 +2,124 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateListDataInner } from "./ScaffoldV1TemplateListDataInner"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateListDataInner } from './ScaffoldV1TemplateListDataInner'; import { - ScaffoldV1TemplateListDataInnerFromJSON, - ScaffoldV1TemplateListDataInnerFromJSONTyped, - ScaffoldV1TemplateListDataInnerToJSON, - ScaffoldV1TemplateListDataInnerToJSONTyped, -} from "./ScaffoldV1TemplateListDataInner"; -import type { ScaffoldV1TemplateListMetadata } from "./ScaffoldV1TemplateListMetadata"; + ScaffoldV1TemplateListDataInnerFromJSON, + ScaffoldV1TemplateListDataInnerFromJSONTyped, + ScaffoldV1TemplateListDataInnerToJSON, + ScaffoldV1TemplateListDataInnerToJSONTyped, +} from './ScaffoldV1TemplateListDataInner'; +import type { ScaffoldV1TemplateListMetadata } from './ScaffoldV1TemplateListMetadata'; import { - ScaffoldV1TemplateListMetadataFromJSON, - ScaffoldV1TemplateListMetadataFromJSONTyped, - ScaffoldV1TemplateListMetadataToJSON, - ScaffoldV1TemplateListMetadataToJSONTyped, -} from "./ScaffoldV1TemplateListMetadata"; + ScaffoldV1TemplateListMetadataFromJSON, + ScaffoldV1TemplateListMetadataFromJSONTyped, + ScaffoldV1TemplateListMetadataToJSON, + ScaffoldV1TemplateListMetadataToJSONTyped, +} from './ScaffoldV1TemplateListMetadata'; /** * Templates can be used to generate application projects. - * + * * ## The Templates Model * * @export * @interface ScaffoldV1TemplateList */ export interface ScaffoldV1TemplateList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateList - */ - readonly api_version: ScaffoldV1TemplateListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateList - */ - readonly kind: ScaffoldV1TemplateListKindEnum; - /** - * - * @type {ScaffoldV1TemplateListMetadata} - * @memberof ScaffoldV1TemplateList - */ - metadata: ScaffoldV1TemplateListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof ScaffoldV1TemplateList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateList + */ + readonly api_version: ScaffoldV1TemplateListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateList + */ + readonly kind: ScaffoldV1TemplateListKindEnum; + /** + * + * @type {ScaffoldV1TemplateListMetadata} + * @memberof ScaffoldV1TemplateList + */ + metadata: ScaffoldV1TemplateListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof ScaffoldV1TemplateList + */ + data: Set; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateListApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateListKindEnum { - TemplateList = "TemplateList", + TemplateList = 'TemplateList' } + /** * Check if a given object implements the ScaffoldV1TemplateList interface. */ export function instanceOfScaffoldV1TemplateList(value: object): value is ScaffoldV1TemplateList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ScaffoldV1TemplateListFromJSON(json: any): ScaffoldV1TemplateList { - return ScaffoldV1TemplateListFromJSONTyped(json, false); + return ScaffoldV1TemplateListFromJSONTyped(json, false); } -export function ScaffoldV1TemplateListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: ScaffoldV1TemplateListMetadataFromJSON(json["metadata"]), - data: new Set((json["data"] as Array).map(ScaffoldV1TemplateListDataInnerFromJSON)), - }; +export function ScaffoldV1TemplateListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': ScaffoldV1TemplateListMetadataFromJSON(json['metadata']), + 'data': (new Set((json['data'] as Array).map(ScaffoldV1TemplateListDataInnerFromJSON))), + }; } export function ScaffoldV1TemplateListToJSON(json: any): ScaffoldV1TemplateList { - return ScaffoldV1TemplateListToJSONTyped(json, false); + return ScaffoldV1TemplateListToJSONTyped(json, false); } -export function ScaffoldV1TemplateListToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateListMetadataToJSON(value["metadata"]), - data: Array.from(value["data"] as Set).map(ScaffoldV1TemplateListDataInnerToJSON), - }; + return { + + 'metadata': ScaffoldV1TemplateListMetadataToJSON(value['metadata']), + 'data': (Array.from(value['data'] as Set).map(ScaffoldV1TemplateListDataInnerToJSON)), + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts index 8d311cc286..9c457c40ef 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts @@ -2,118 +2,112 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ScaffoldV1TemplateMetadata } from "./ScaffoldV1TemplateMetadata"; +import { mapValues } from '../runtime'; +import type { ScaffoldV1TemplateMetadata } from './ScaffoldV1TemplateMetadata'; import { - ScaffoldV1TemplateMetadataFromJSON, - ScaffoldV1TemplateMetadataFromJSONTyped, - ScaffoldV1TemplateMetadataToJSON, - ScaffoldV1TemplateMetadataToJSONTyped, -} from "./ScaffoldV1TemplateMetadata"; + ScaffoldV1TemplateMetadataFromJSON, + ScaffoldV1TemplateMetadataFromJSONTyped, + ScaffoldV1TemplateMetadataToJSON, + ScaffoldV1TemplateMetadataToJSONTyped, +} from './ScaffoldV1TemplateMetadata'; /** - * + * * @export * @interface ScaffoldV1TemplateListDataInner */ export interface ScaffoldV1TemplateListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateListDataInner - */ - readonly api_version?: ScaffoldV1TemplateListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateListDataInner - */ - readonly kind?: ScaffoldV1TemplateListDataInnerKindEnum; - /** - * - * @type {ScaffoldV1TemplateMetadata} - * @memberof ScaffoldV1TemplateListDataInner - */ - metadata: ScaffoldV1TemplateMetadata; - /** - * - * @type {object} - * @memberof ScaffoldV1TemplateListDataInner - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateListDataInner + */ + readonly api_version?: ScaffoldV1TemplateListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateListDataInner + */ + readonly kind?: ScaffoldV1TemplateListDataInnerKindEnum; + /** + * + * @type {ScaffoldV1TemplateMetadata} + * @memberof ScaffoldV1TemplateListDataInner + */ + metadata: ScaffoldV1TemplateMetadata; + /** + * + * @type {object} + * @memberof ScaffoldV1TemplateListDataInner + */ + spec: object; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateListDataInnerApiVersionEnum { - ScaffoldV1 = "scaffold/v1", + ScaffoldV1 = 'scaffold/v1' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum ScaffoldV1TemplateListDataInnerKindEnum { - Template = "Template", + Template = 'Template' } + /** * Check if a given object implements the ScaffoldV1TemplateListDataInner interface. */ -export function instanceOfScaffoldV1TemplateListDataInner( - value: object, -): value is ScaffoldV1TemplateListDataInner { - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateListDataInner(value: object): value is ScaffoldV1TemplateListDataInner { + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } -export function ScaffoldV1TemplateListDataInnerFromJSON( - json: any, -): ScaffoldV1TemplateListDataInner { - return ScaffoldV1TemplateListDataInnerFromJSONTyped(json, false); +export function ScaffoldV1TemplateListDataInnerFromJSON(json: any): ScaffoldV1TemplateListDataInner { + return ScaffoldV1TemplateListDataInnerFromJSONTyped(json, false); } -export function ScaffoldV1TemplateListDataInnerFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateListDataInner { - if (json == null) { - return json; - } - return { - api_version: json["api_version"] == null ? undefined : json["api_version"], - kind: json["kind"] == null ? undefined : json["kind"], - metadata: ScaffoldV1TemplateMetadataFromJSON(json["metadata"]), - spec: json["spec"], - }; +export function ScaffoldV1TemplateListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateListDataInner { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'] == null ? undefined : json['api_version'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'metadata': ScaffoldV1TemplateMetadataFromJSON(json['metadata']), + 'spec': json['spec'], + }; } export function ScaffoldV1TemplateListDataInnerToJSON(json: any): ScaffoldV1TemplateListDataInner { - return ScaffoldV1TemplateListDataInnerToJSONTyped(json, false); + return ScaffoldV1TemplateListDataInnerToJSONTyped(json, false); } -export function ScaffoldV1TemplateListDataInnerToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - metadata: ScaffoldV1TemplateMetadataToJSON(value["metadata"]), - spec: value["spec"], - }; + return { + + 'metadata': ScaffoldV1TemplateMetadataToJSON(value['metadata']), + 'spec': value['spec'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts index 3614b44b91..210d2d608f 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts @@ -2,101 +2,96 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ScaffoldV1TemplateListMetadata */ export interface ScaffoldV1TemplateListMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ScaffoldV1TemplateListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ScaffoldV1TemplateListMetadata + */ + total_size?: number; } /** * Check if a given object implements the ScaffoldV1TemplateListMetadata interface. */ -export function instanceOfScaffoldV1TemplateListMetadata( - value: object, -): value is ScaffoldV1TemplateListMetadata { - return true; +export function instanceOfScaffoldV1TemplateListMetadata(value: object): value is ScaffoldV1TemplateListMetadata { + return true; } export function ScaffoldV1TemplateListMetadataFromJSON(json: any): ScaffoldV1TemplateListMetadata { - return ScaffoldV1TemplateListMetadataFromJSONTyped(json, false); + return ScaffoldV1TemplateListMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateListMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateListMetadata { - if (json == null) { - return json; - } - return { - first: json["first"] == null ? undefined : json["first"], - last: json["last"] == null ? undefined : json["last"], - prev: json["prev"] == null ? undefined : json["prev"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; +export function ScaffoldV1TemplateListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateListMetadata { + if (json == null) { + return json; + } + return { + + 'first': json['first'] == null ? undefined : json['first'], + 'last': json['last'] == null ? undefined : json['last'], + 'prev': json['prev'] == null ? undefined : json['prev'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function ScaffoldV1TemplateListMetadataToJSON(json: any): ScaffoldV1TemplateListMetadata { - return ScaffoldV1TemplateListMetadataToJSONTyped(json, false); + return ScaffoldV1TemplateListMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateListMetadataToJSONTyped( - value?: ScaffoldV1TemplateListMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateListMetadataToJSONTyped(value?: ScaffoldV1TemplateListMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - first: value["first"], - last: value["last"], - prev: value["prev"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'first': value['first'], + 'last': value['last'], + 'prev': value['prev'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts index 3d889667dd..b5a7783362 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts @@ -2,99 +2,94 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ScaffoldV1TemplateMetadata */ export interface ScaffoldV1TemplateMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ScaffoldV1TemplateMetadata interface. */ -export function instanceOfScaffoldV1TemplateMetadata( - value: object, -): value is ScaffoldV1TemplateMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateMetadata(value: object): value is ScaffoldV1TemplateMetadata { + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function ScaffoldV1TemplateMetadataFromJSON(json: any): ScaffoldV1TemplateMetadata { - return ScaffoldV1TemplateMetadataFromJSONTyped(json, false); + return ScaffoldV1TemplateMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), - updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), - deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), - }; +export function ScaffoldV1TemplateMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), + 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), + 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), + }; } export function ScaffoldV1TemplateMetadataToJSON(json: any): ScaffoldV1TemplateMetadata { - return ScaffoldV1TemplateMetadataToJSONTyped(json, false); + return ScaffoldV1TemplateMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateMetadataToJSONTyped( - value?: Omit | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts index d63c31f603..fa77efbcf3 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts @@ -2,152 +2,146 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * An option of a template. * @export * @interface ScaffoldV1TemplateOption */ export interface ScaffoldV1TemplateOption { - /** - * A few words that accurately and concisely represent the human readable form of the option's key. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - display_name: string; - /** - * 1-2 sentences that describe the option. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - description: string; - /** - * An optional description or example of the information required for a form field, typically rendered within the entry field of a form. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - hint?: string; - /** - * An optional format modifer that serves as a hint for UI presentation. If specified, the only allowed value at this time is `password` to hint the UI to mask the input. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - format?: string; - /** - * An optional regular expression pattern such that only values matched by this pattern will be accepted. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - pattern?: string; - /** - * An optional human-readable description of the pattern property; should be provided only if the pattern is provided. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - pattern_description?: string; - /** - * An optional attribute that specifies possible values for this option. - * @type {Array} - * @memberof ScaffoldV1TemplateOption - */ - _enum?: Array; - /** - * Initial value of the form field for this option. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - initial_value?: string; - /** - * The minimum number of characters that must be provided for an option. - * @type {number} - * @memberof ScaffoldV1TemplateOption - */ - min_length?: number; - /** - * Examples of valid values for this option. - * @type {Array} - * @memberof ScaffoldV1TemplateOption - */ - examples?: Array; - /** - * An optional field that specifies the order of the template option in the UI. Template options with a lower order value should be displayed before template options with a higher order value. Template options with the same order value should be displayed in alphanumerical order. - * @type {number} - * @memberof ScaffoldV1TemplateOption - */ - order?: number; + /** + * A few words that accurately and concisely represent the human readable form of the option's key. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + display_name: string; + /** + * 1-2 sentences that describe the option. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + description: string; + /** + * An optional description or example of the information required for a form field, typically rendered within the entry field of a form. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + hint?: string; + /** + * An optional format modifer that serves as a hint for UI presentation. If specified, the only allowed value at this time is `password` to hint the UI to mask the input. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + format?: string; + /** + * An optional regular expression pattern such that only values matched by this pattern will be accepted. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + pattern?: string; + /** + * An optional human-readable description of the pattern property; should be provided only if the pattern is provided. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + pattern_description?: string; + /** + * An optional attribute that specifies possible values for this option. + * @type {Array} + * @memberof ScaffoldV1TemplateOption + */ + _enum?: Array; + /** + * Initial value of the form field for this option. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + initial_value?: string; + /** + * The minimum number of characters that must be provided for an option. + * @type {number} + * @memberof ScaffoldV1TemplateOption + */ + min_length?: number; + /** + * Examples of valid values for this option. + * @type {Array} + * @memberof ScaffoldV1TemplateOption + */ + examples?: Array; + /** + * An optional field that specifies the order of the template option in the UI. Template options with a lower order value should be displayed before template options with a higher order value. Template options with the same order value should be displayed in alphanumerical order. + * @type {number} + * @memberof ScaffoldV1TemplateOption + */ + order?: number; } /** * Check if a given object implements the ScaffoldV1TemplateOption interface. */ -export function instanceOfScaffoldV1TemplateOption( - value: object, -): value is ScaffoldV1TemplateOption { - if (!("display_name" in value) || value["display_name"] === undefined) return false; - if (!("description" in value) || value["description"] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateOption(value: object): value is ScaffoldV1TemplateOption { + if (!('display_name' in value) || value['display_name'] === undefined) return false; + if (!('description' in value) || value['description'] === undefined) return false; + return true; } export function ScaffoldV1TemplateOptionFromJSON(json: any): ScaffoldV1TemplateOption { - return ScaffoldV1TemplateOptionFromJSONTyped(json, false); + return ScaffoldV1TemplateOptionFromJSONTyped(json, false); } -export function ScaffoldV1TemplateOptionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateOption { - if (json == null) { - return json; - } - return { - display_name: json["display_name"], - description: json["description"], - hint: json["hint"] == null ? undefined : json["hint"], - format: json["format"] == null ? undefined : json["format"], - pattern: json["pattern"] == null ? undefined : json["pattern"], - pattern_description: - json["pattern_description"] == null ? undefined : json["pattern_description"], - _enum: json["enum"] == null ? undefined : json["enum"], - initial_value: json["initial_value"] == null ? undefined : json["initial_value"], - min_length: json["min_length"] == null ? undefined : json["min_length"], - examples: json["examples"] == null ? undefined : json["examples"], - order: json["order"] == null ? undefined : json["order"], - }; +export function ScaffoldV1TemplateOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateOption { + if (json == null) { + return json; + } + return { + + 'display_name': json['display_name'], + 'description': json['description'], + 'hint': json['hint'] == null ? undefined : json['hint'], + 'format': json['format'] == null ? undefined : json['format'], + 'pattern': json['pattern'] == null ? undefined : json['pattern'], + 'pattern_description': json['pattern_description'] == null ? undefined : json['pattern_description'], + '_enum': json['enum'] == null ? undefined : json['enum'], + 'initial_value': json['initial_value'] == null ? undefined : json['initial_value'], + 'min_length': json['min_length'] == null ? undefined : json['min_length'], + 'examples': json['examples'] == null ? undefined : json['examples'], + 'order': json['order'] == null ? undefined : json['order'], + }; } export function ScaffoldV1TemplateOptionToJSON(json: any): ScaffoldV1TemplateOption { - return ScaffoldV1TemplateOptionToJSONTyped(json, false); + return ScaffoldV1TemplateOptionToJSONTyped(json, false); } -export function ScaffoldV1TemplateOptionToJSONTyped( - value?: ScaffoldV1TemplateOption | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateOptionToJSONTyped(value?: ScaffoldV1TemplateOption | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - display_name: value["display_name"], - description: value["description"], - hint: value["hint"], - format: value["format"], - pattern: value["pattern"], - pattern_description: value["pattern_description"], - enum: value["_enum"], - initial_value: value["initial_value"], - min_length: value["min_length"], - examples: value["examples"], - order: value["order"], - }; + return { + + 'display_name': value['display_name'], + 'description': value['description'], + 'hint': value['hint'], + 'format': value['format'], + 'pattern': value['pattern'], + 'pattern_description': value['pattern_description'], + 'enum': value['_enum'], + 'initial_value': value['initial_value'], + 'min_length': value['min_length'], + 'examples': value['examples'], + 'order': value['order'], + }; } + diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts index 7cea1e7233..8732398bf5 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { GlobalObjectReference } from "./GlobalObjectReference"; +import { mapValues } from '../runtime'; +import type { GlobalObjectReference } from './GlobalObjectReference'; import { - GlobalObjectReferenceFromJSON, - GlobalObjectReferenceFromJSONTyped, - GlobalObjectReferenceToJSON, - GlobalObjectReferenceToJSONTyped, -} from "./GlobalObjectReference"; -import type { ScaffoldV1TemplateOption } from "./ScaffoldV1TemplateOption"; + GlobalObjectReferenceFromJSON, + GlobalObjectReferenceFromJSONTyped, + GlobalObjectReferenceToJSON, + GlobalObjectReferenceToJSONTyped, +} from './GlobalObjectReference'; +import type { ScaffoldV1TemplateOption } from './ScaffoldV1TemplateOption'; import { - ScaffoldV1TemplateOptionFromJSON, - ScaffoldV1TemplateOptionFromJSONTyped, - ScaffoldV1TemplateOptionToJSON, - ScaffoldV1TemplateOptionToJSONTyped, -} from "./ScaffoldV1TemplateOption"; + ScaffoldV1TemplateOptionFromJSON, + ScaffoldV1TemplateOptionFromJSONTyped, + ScaffoldV1TemplateOptionToJSON, + ScaffoldV1TemplateOptionToJSONTyped, +} from './ScaffoldV1TemplateOption'; /** * The desired state of the Template @@ -34,115 +34,103 @@ import { * @interface ScaffoldV1TemplateSpec */ export interface ScaffoldV1TemplateSpec { - /** - * The name of the template. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - name?: string; - /** - * The display name of the template. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - display_name?: string; - /** - * The description of the template. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - description?: string; - /** - * The semantic version of the template, of the form ... Bump the version with each non-trivial change. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - version?: string; - /** - * The primary programming language that projects generated from the template will use. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - language?: string; - /** - * Tags are keywords or very short phrases (1-3 words) that apply to the template and that help with search and organization. Use lowercase characters and numbers in each word, and separate words with a space. - * @type {Array} - * @memberof ScaffoldV1TemplateSpec - */ - tags?: Array; - /** - * Options of the template. - * @type {{ [key: string]: ScaffoldV1TemplateOption; }} - * @memberof ScaffoldV1TemplateSpec - */ - options?: { [key: string]: ScaffoldV1TemplateOption }; - /** - * The template_collection to which this belongs. - * @type {GlobalObjectReference} - * @memberof ScaffoldV1TemplateSpec - */ - template_collection?: GlobalObjectReference; + /** + * The name of the template. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + name?: string; + /** + * The display name of the template. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + display_name?: string; + /** + * The description of the template. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + description?: string; + /** + * The semantic version of the template, of the form ... Bump the version with each non-trivial change. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + version?: string; + /** + * The primary programming language that projects generated from the template will use. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + language?: string; + /** + * Tags are keywords or very short phrases (1-3 words) that apply to the template and that help with search and organization. Use lowercase characters and numbers in each word, and separate words with a space. + * @type {Array} + * @memberof ScaffoldV1TemplateSpec + */ + tags?: Array; + /** + * Options of the template. + * @type {{ [key: string]: ScaffoldV1TemplateOption; }} + * @memberof ScaffoldV1TemplateSpec + */ + options?: { [key: string]: ScaffoldV1TemplateOption; }; + /** + * The template_collection to which this belongs. + * @type {GlobalObjectReference} + * @memberof ScaffoldV1TemplateSpec + */ + template_collection?: GlobalObjectReference; } /** * Check if a given object implements the ScaffoldV1TemplateSpec interface. */ export function instanceOfScaffoldV1TemplateSpec(value: object): value is ScaffoldV1TemplateSpec { - return true; + return true; } export function ScaffoldV1TemplateSpecFromJSON(json: any): ScaffoldV1TemplateSpec { - return ScaffoldV1TemplateSpecFromJSONTyped(json, false); + return ScaffoldV1TemplateSpecFromJSONTyped(json, false); } -export function ScaffoldV1TemplateSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScaffoldV1TemplateSpec { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - display_name: json["display_name"] == null ? undefined : json["display_name"], - description: json["description"] == null ? undefined : json["description"], - version: json["version"] == null ? undefined : json["version"], - language: json["language"] == null ? undefined : json["language"], - tags: json["tags"] == null ? undefined : json["tags"], - options: - json["options"] == null - ? undefined - : mapValues(json["options"], ScaffoldV1TemplateOptionFromJSON), - template_collection: - json["template_collection"] == null - ? undefined - : GlobalObjectReferenceFromJSON(json["template_collection"]), - }; +export function ScaffoldV1TemplateSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateSpec { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'display_name': json['display_name'] == null ? undefined : json['display_name'], + 'description': json['description'] == null ? undefined : json['description'], + 'version': json['version'] == null ? undefined : json['version'], + 'language': json['language'] == null ? undefined : json['language'], + 'tags': json['tags'] == null ? undefined : json['tags'], + 'options': json['options'] == null ? undefined : (mapValues(json['options'], ScaffoldV1TemplateOptionFromJSON)), + 'template_collection': json['template_collection'] == null ? undefined : GlobalObjectReferenceFromJSON(json['template_collection']), + }; } export function ScaffoldV1TemplateSpecToJSON(json: any): ScaffoldV1TemplateSpec { - return ScaffoldV1TemplateSpecToJSONTyped(json, false); + return ScaffoldV1TemplateSpecToJSONTyped(json, false); } -export function ScaffoldV1TemplateSpecToJSONTyped( - value?: ScaffoldV1TemplateSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateSpecToJSONTyped(value?: ScaffoldV1TemplateSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - display_name: value["display_name"], - description: value["description"], - version: value["version"], - language: value["language"], - tags: value["tags"], - options: - value["options"] == null - ? undefined - : mapValues(value["options"], ScaffoldV1TemplateOptionToJSON), - template_collection: GlobalObjectReferenceToJSON(value["template_collection"]), - }; + return { + + 'name': value['name'], + 'display_name': value['display_name'], + 'description': value['description'], + 'version': value['version'], + 'language': value['language'], + 'tags': value['tags'], + 'options': value['options'] == null ? undefined : (mapValues(value['options'], ScaffoldV1TemplateOptionToJSON)), + 'template_collection': GlobalObjectReferenceToJSON(value['template_collection']), + }; } + diff --git a/src/clients/scaffoldingService/models/index.ts b/src/clients/scaffoldingService/models/index.ts index 0ee2076375..8dcde81a76 100644 --- a/src/clients/scaffoldingService/models/index.ts +++ b/src/clients/scaffoldingService/models/index.ts @@ -1,25 +1,25 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ApplyScaffoldV1TemplateRequest"; -export * from "./ErrorSource"; -export * from "./Failure"; -export * from "./GetScaffoldV1Template200Response"; -export * from "./GetScaffoldV1TemplateCollection200Response"; -export * from "./GlobalObjectReference"; -export * from "./ListMeta"; -export * from "./ModelError"; -export * from "./ObjectMeta"; -export * from "./ObjectReference"; -export * from "./ScaffoldV1Template"; -export * from "./ScaffoldV1TemplateCollection"; -export * from "./ScaffoldV1TemplateCollectionList"; -export * from "./ScaffoldV1TemplateCollectionListDataInner"; -export * from "./ScaffoldV1TemplateCollectionListMetadata"; -export * from "./ScaffoldV1TemplateCollectionMetadata"; -export * from "./ScaffoldV1TemplateCollectionSpec"; -export * from "./ScaffoldV1TemplateList"; -export * from "./ScaffoldV1TemplateListDataInner"; -export * from "./ScaffoldV1TemplateListMetadata"; -export * from "./ScaffoldV1TemplateMetadata"; -export * from "./ScaffoldV1TemplateOption"; -export * from "./ScaffoldV1TemplateSpec"; +export * from './ApplyScaffoldV1TemplateRequest'; +export * from './ErrorSource'; +export * from './Failure'; +export * from './GetScaffoldV1Template200Response'; +export * from './GetScaffoldV1TemplateCollection200Response'; +export * from './GlobalObjectReference'; +export * from './ListMeta'; +export * from './ModelError'; +export * from './ObjectMeta'; +export * from './ObjectReference'; +export * from './ScaffoldV1Template'; +export * from './ScaffoldV1TemplateCollection'; +export * from './ScaffoldV1TemplateCollectionList'; +export * from './ScaffoldV1TemplateCollectionListDataInner'; +export * from './ScaffoldV1TemplateCollectionListMetadata'; +export * from './ScaffoldV1TemplateCollectionMetadata'; +export * from './ScaffoldV1TemplateCollectionSpec'; +export * from './ScaffoldV1TemplateList'; +export * from './ScaffoldV1TemplateListDataInner'; +export * from './ScaffoldV1TemplateListMetadata'; +export * from './ScaffoldV1TemplateMetadata'; +export * from './ScaffoldV1TemplateOption'; +export * from './ScaffoldV1TemplateSpec'; diff --git a/src/clients/scaffoldingService/runtime.ts b/src/clients/scaffoldingService/runtime.ts index aa992e30d8..23f76aec2c 100644 --- a/src/clients/scaffoldingService/runtime.ts +++ b/src/clients/scaffoldingService/runtime.ts @@ -2,88 +2,86 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://api.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts b/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts index c84a81f8b3..27274cfbec 100644 --- a/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts @@ -5,204 +5,166 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { CompatibilityCheckResponse, ErrorMessage, RegisterSchemaRequest, -} from "../models/index"; +} from '../models/index'; import { - CompatibilityCheckResponseFromJSON, - CompatibilityCheckResponseToJSON, - ErrorMessageFromJSON, - ErrorMessageToJSON, - RegisterSchemaRequestFromJSON, - RegisterSchemaRequestToJSON, -} from "../models/index"; + CompatibilityCheckResponseFromJSON, + CompatibilityCheckResponseToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + RegisterSchemaRequestFromJSON, + RegisterSchemaRequestToJSON, +} from '../models/index'; export interface TestCompatibilityBySubjectNameRequest { - subject: string; - version: string; - RegisterSchemaRequest: RegisterSchemaRequest; - verbose?: boolean; + subject: string; + version: string; + RegisterSchemaRequest: RegisterSchemaRequest; + verbose?: boolean; } export interface TestCompatibilityForSubjectRequest { - subject: string; - RegisterSchemaRequest: RegisterSchemaRequest; - verbose?: boolean; + subject: string; + RegisterSchemaRequest: RegisterSchemaRequest; + verbose?: boolean; } /** - * + * */ export class CompatibilityV1Api extends runtime.BaseAPI { - /** - * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against a particular schema subject-version - */ - async testCompatibilityBySubjectNameRaw( - requestParameters: TestCompatibilityBySubjectNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling testCompatibilityBySubjectName().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling testCompatibilityBySubjectName().', - ); - } - - if (requestParameters["RegisterSchemaRequest"] == null) { - throw new runtime.RequiredError( - "RegisterSchemaRequest", - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityBySubjectName().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["verbose"] != null) { - queryParameters["verbose"] = requestParameters["verbose"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/compatibility/subjects/{subject}/versions/{version}` - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CompatibilityCheckResponseFromJSON(jsonValue), - ); - } - - /** - * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against a particular schema subject-version - */ - async testCompatibilityBySubjectName( - requestParameters: TestCompatibilityBySubjectNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.testCompatibilityBySubjectNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against all schemas under a subject - */ - async testCompatibilityForSubjectRaw( - requestParameters: TestCompatibilityForSubjectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling testCompatibilityForSubject().', - ); + /** + * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against a particular schema subject-version + */ + async testCompatibilityBySubjectNameRaw(requestParameters: TestCompatibilityBySubjectNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling testCompatibilityBySubjectName().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling testCompatibilityBySubjectName().' + ); + } + + if (requestParameters['RegisterSchemaRequest'] == null) { + throw new runtime.RequiredError( + 'RegisterSchemaRequest', + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityBySubjectName().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['verbose'] != null) { + queryParameters['verbose'] = requestParameters['verbose']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/compatibility/subjects/{subject}/versions/{version}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompatibilityCheckResponseFromJSON(jsonValue)); } - if (requestParameters["RegisterSchemaRequest"] == null) { - throw new runtime.RequiredError( - "RegisterSchemaRequest", - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityForSubject().', - ); + /** + * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against a particular schema subject-version + */ + async testCompatibilityBySubjectName(requestParameters: TestCompatibilityBySubjectNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.testCompatibilityBySubjectNameRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["verbose"] != null) { - queryParameters["verbose"] = requestParameters["verbose"]; + /** + * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against all schemas under a subject + */ + async testCompatibilityForSubjectRaw(requestParameters: TestCompatibilityForSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling testCompatibilityForSubject().' + ); + } + + if (requestParameters['RegisterSchemaRequest'] == null) { + throw new runtime.RequiredError( + 'RegisterSchemaRequest', + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityForSubject().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['verbose'] != null) { + queryParameters['verbose'] = requestParameters['verbose']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/compatibility/subjects/{subject}/versions`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CompatibilityCheckResponseFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against all schemas under a subject + */ + async testCompatibilityForSubject(requestParameters: TestCompatibilityForSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.testCompatibilityForSubjectRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/compatibility/subjects/{subject}/versions`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - CompatibilityCheckResponseFromJSON(jsonValue), - ); - } - - /** - * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against all schemas under a subject - */ - async testCompatibilityForSubject( - requestParameters: TestCompatibilityForSubjectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.testCompatibilityForSubjectRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts b/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts index 312cbe271c..bbb51ecf75 100644 --- a/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts @@ -5,469 +5,358 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ClusterConfig, Config, ConfigUpdateRequest, ErrorMessage } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ClusterConfig, + Config, + ConfigUpdateRequest, + ErrorMessage, +} from '../models/index'; import { - ClusterConfigFromJSON, - ClusterConfigToJSON, - ConfigFromJSON, - ConfigToJSON, - ConfigUpdateRequestFromJSON, - ConfigUpdateRequestToJSON, - ErrorMessageFromJSON, - ErrorMessageToJSON, -} from "../models/index"; + ClusterConfigFromJSON, + ClusterConfigToJSON, + ConfigFromJSON, + ConfigToJSON, + ConfigUpdateRequestFromJSON, + ConfigUpdateRequestToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../models/index'; export interface DeleteSubjectConfigRequest { - subject: string; + subject: string; } export interface GetSubjectLevelConfigRequest { - subject: string; - defaultToGlobal?: boolean; + subject: string; + defaultToGlobal?: boolean; } export interface UpdateSubjectLevelConfigRequest { - subject: string; - ConfigUpdateRequest: ConfigUpdateRequest; + subject: string; + ConfigUpdateRequest: ConfigUpdateRequest; } export interface UpdateTopLevelConfigRequest { - ConfigUpdateRequest: ConfigUpdateRequest; + ConfigUpdateRequest: ConfigUpdateRequest; } /** - * + * */ export class ConfigV1Api extends runtime.BaseAPI { - /** - * Deletes the specified subject-level compatibility level config and reverts to the global default. - * Delete subject compatibility level - */ - async deleteSubjectConfigRaw( - requestParameters: DeleteSubjectConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling deleteSubjectConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Deletes the specified subject-level compatibility level config and reverts to the global default. + * Delete subject compatibility level + */ + async deleteSubjectConfigRaw(requestParameters: DeleteSubjectConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling deleteSubjectConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/config/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/config/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Deletes the specified subject-level compatibility level config and reverts to the global default. - * Delete subject compatibility level - */ - async deleteSubjectConfig( - requestParameters: DeleteSubjectConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.deleteSubjectConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Deletes the global compatibility level config and reverts to the default. - * Delete global compatibility level - */ - async deleteTopLevelConfigRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Deletes the specified subject-level compatibility level config and reverts to the global default. + * Delete subject compatibility level + */ + async deleteSubjectConfig(requestParameters: DeleteSubjectConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteSubjectConfigRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/config`, - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Deletes the global compatibility level config and reverts to the default. - * Delete global compatibility level - */ - async deleteTopLevelConfig( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.deleteTopLevelConfigRaw(initOverrides); - return await response.value(); - } - - /** - * Retrieves cluster config information. - * Get cluster config - */ - async getClusterConfigRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Deletes the global compatibility level config and reverts to the default. + * Delete global compatibility level + */ + async deleteTopLevelConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/config`, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/clusterconfig`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigFromJSON(jsonValue)); - } - - /** - * Retrieves cluster config information. - * Get cluster config - */ - async getClusterConfig( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getClusterConfigRaw(initOverrides); - return await response.value(); - } - - /** - * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. - * Get subject compatibility level - */ - async getSubjectLevelConfigRaw( - requestParameters: GetSubjectLevelConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getSubjectLevelConfig().', - ); + /** + * Deletes the global compatibility level config and reverts to the default. + * Delete global compatibility level + */ + async deleteTopLevelConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteTopLevelConfigRaw(initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - if (requestParameters["defaultToGlobal"] != null) { - queryParameters["defaultToGlobal"] = requestParameters["defaultToGlobal"]; + /** + * Retrieves cluster config information. + * Get cluster config + */ + async getClusterConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/clusterconfig`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves cluster config information. + * Get cluster config + */ + async getClusterConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getClusterConfigRaw(initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/config/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); - } - - /** - * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. - * Get subject compatibility level - */ - async getSubjectLevelConfig( - requestParameters: GetSubjectLevelConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSubjectLevelConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. - * Get global compatibility level - */ - async getTopLevelConfigRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. + * Get subject compatibility level + */ + async getSubjectLevelConfigRaw(requestParameters: GetSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getSubjectLevelConfig().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['defaultToGlobal'] != null) { + queryParameters['defaultToGlobal'] = requestParameters['defaultToGlobal']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/config/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/config`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); - } - - /** - * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. - * Get global compatibility level - */ - async getTopLevelConfig( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getTopLevelConfigRaw(initOverrides); - return await response.value(); - } - - /** - * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. - * Update subject compatibility level - */ - async updateSubjectLevelConfigRaw( - requestParameters: UpdateSubjectLevelConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling updateSubjectLevelConfig().', - ); + /** + * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. + * Get subject compatibility level + */ + async getSubjectLevelConfig(requestParameters: GetSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSubjectLevelConfigRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["ConfigUpdateRequest"] == null) { - throw new runtime.RequiredError( - "ConfigUpdateRequest", - 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateSubjectLevelConfig().', - ); + /** + * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. + * Get global compatibility level + */ + async getTopLevelConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/config`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. + * Get global compatibility level + */ + async getTopLevelConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopLevelConfigRaw(initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + /** + * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. + * Update subject compatibility level + */ + async updateSubjectLevelConfigRaw(requestParameters: UpdateSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling updateSubjectLevelConfig().' + ); + } + + if (requestParameters['ConfigUpdateRequest'] == null) { + throw new runtime.RequiredError( + 'ConfigUpdateRequest', + 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateSubjectLevelConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/config/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ConfigUpdateRequestToJSON(requestParameters['ConfigUpdateRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigUpdateRequestFromJSON(jsonValue)); } - const response = await this.request( - { - path: `/config/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ConfigUpdateRequestToJSON(requestParameters["ConfigUpdateRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConfigUpdateRequestFromJSON(jsonValue), - ); - } - - /** - * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. - * Update subject compatibility level - */ - async updateSubjectLevelConfig( - requestParameters: UpdateSubjectLevelConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateSubjectLevelConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. - * Update global compatibility level - */ - async updateTopLevelConfigRaw( - requestParameters: UpdateTopLevelConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["ConfigUpdateRequest"] == null) { - throw new runtime.RequiredError( - "ConfigUpdateRequest", - 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateTopLevelConfig().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + /** + * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. + * Update subject compatibility level + */ + async updateSubjectLevelConfig(requestParameters: UpdateSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateSubjectLevelConfigRaw(requestParameters, initOverrides); + return await response.value(); + } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. + * Update global compatibility level + */ + async updateTopLevelConfigRaw(requestParameters: UpdateTopLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['ConfigUpdateRequest'] == null) { + throw new runtime.RequiredError( + 'ConfigUpdateRequest', + 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateTopLevelConfig().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/config`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ConfigUpdateRequestToJSON(requestParameters['ConfigUpdateRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigUpdateRequestFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + /** + * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. + * Update global compatibility level + */ + async updateTopLevelConfig(requestParameters: UpdateTopLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateTopLevelConfigRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/config`, - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ConfigUpdateRequestToJSON(requestParameters["ConfigUpdateRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ConfigUpdateRequestFromJSON(jsonValue), - ); - } - - /** - * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. - * Update global compatibility level - */ - async updateTopLevelConfig( - requestParameters: UpdateTopLevelConfigRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateTopLevelConfigRaw(requestParameters, initOverrides); - return await response.value(); - } + } diff --git a/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts b/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts index 0a76fc45ee..cb91caa794 100644 --- a/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts @@ -5,68 +5,62 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorMessage } from "../models/index"; -import { ErrorMessageFromJSON, ErrorMessageToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorMessage, +} from '../models/index'; +import { + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from '../models/index'; /** - * + * */ export class ContextsV1Api extends runtime.BaseAPI { - /** - * Retrieves a list of contexts. - * List contexts - */ - async listContextsRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + /** + * Retrieves a list of contexts. + * List contexts + */ + async listContextsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } + const headerParameters: runtime.HTTPHeaders = {}; - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/contexts`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); } - const response = await this.request( - { - path: `/contexts`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - return new runtime.JSONApiResponse(response); - } + /** + * Retrieves a list of contexts. + * List contexts + */ + async listContexts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listContextsRaw(initOverrides); + return await response.value(); + } - /** - * Retrieves a list of contexts. - * List contexts - */ - async listContexts( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.listContextsRaw(initOverrides); - return await response.value(); - } } diff --git a/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts b/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts index 2dca6b2d11..82ad950a9b 100644 --- a/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts @@ -5,811 +5,650 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { CreateDekRequest, Dek } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + CreateDekRequest, + Dek, +} from '../models/index'; import { - CreateDekRequestFromJSON, - CreateDekRequestToJSON, - DekFromJSON, - DekToJSON, -} from "../models/index"; + CreateDekRequestFromJSON, + CreateDekRequestToJSON, + DekFromJSON, + DekToJSON, +} from '../models/index'; export interface CreateDekOperationRequest { - name: string; - CreateDekRequest: CreateDekRequest; + name: string; + CreateDekRequest: CreateDekRequest; } export interface DeleteDekVersionRequest { - name: string; - subject: string; - version: string; - algorithm?: DeleteDekVersionAlgorithmEnum; - permanent?: boolean; + name: string; + subject: string; + version: string; + algorithm?: DeleteDekVersionAlgorithmEnum; + permanent?: boolean; } export interface DeleteDekVersionsRequest { - name: string; - subject: string; - algorithm?: DeleteDekVersionsAlgorithmEnum; - permanent?: boolean; + name: string; + subject: string; + algorithm?: DeleteDekVersionsAlgorithmEnum; + permanent?: boolean; } export interface GetDekRequest { - name: string; - subject: string; - algorithm?: GetDekAlgorithmEnum; - deleted?: boolean; + name: string; + subject: string; + algorithm?: GetDekAlgorithmEnum; + deleted?: boolean; } export interface GetDekByVersionRequest { - name: string; - subject: string; - version: string; - algorithm?: GetDekByVersionAlgorithmEnum; - deleted?: boolean; + name: string; + subject: string; + version: string; + algorithm?: GetDekByVersionAlgorithmEnum; + deleted?: boolean; } export interface GetDekSubjectsRequest { - name: string; - deleted?: boolean; + name: string; + deleted?: boolean; } export interface GetDekVersionsRequest { - name: string; - subject: string; - algorithm?: GetDekVersionsAlgorithmEnum; - deleted?: boolean; + name: string; + subject: string; + algorithm?: GetDekVersionsAlgorithmEnum; + deleted?: boolean; } export interface UndeleteDekVersionRequest { - name: string; - subject: string; - version: string; - algorithm?: UndeleteDekVersionAlgorithmEnum; + name: string; + subject: string; + version: string; + algorithm?: UndeleteDekVersionAlgorithmEnum; } export interface UndeleteDekVersionsRequest { - name: string; - subject: string; - algorithm?: UndeleteDekVersionsAlgorithmEnum; + name: string; + subject: string; + algorithm?: UndeleteDekVersionsAlgorithmEnum; } /** - * + * */ export class DataEncryptionKeysV1Api extends runtime.BaseAPI { - /** - * Create a dek - */ - async createDekRaw( - requestParameters: CreateDekOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling createDek().', - ); - } - - if (requestParameters["CreateDekRequest"] == null) { - throw new runtime.RequiredError( - "CreateDekRequest", - 'Required parameter "CreateDekRequest" was null or undefined when calling createDek().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateDekRequestToJSON(requestParameters["CreateDekRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); - } - - /** - * Create a dek - */ - async createDek( - requestParameters: CreateDekOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createDekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete a dek version - */ - async deleteDekVersionRaw( - requestParameters: DeleteDekVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteDekVersion().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling deleteDekVersion().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling deleteDekVersion().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; - } - - if (requestParameters["permanent"] != null) { - queryParameters["permanent"] = requestParameters["permanent"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a dek version - */ - async deleteDekVersion( - requestParameters: DeleteDekVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteDekVersionRaw(requestParameters, initOverrides); - } - - /** - * Delete all versions of a dek - */ - async deleteDekVersionsRaw( - requestParameters: DeleteDekVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteDekVersions().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling deleteDekVersions().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; - } - - if (requestParameters["permanent"] != null) { - queryParameters["permanent"] = requestParameters["permanent"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete all versions of a dek - */ - async deleteDekVersions( - requestParameters: DeleteDekVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteDekVersionsRaw(requestParameters, initOverrides); - } - - /** - * Get a dek by subject - */ - async getDekRaw( - requestParameters: GetDekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getDek().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getDek().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; - } - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); - } - - /** - * Get a dek by subject - */ - async getDek( - requestParameters: GetDekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getDekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get a dek by subject and version - */ - async getDekByVersionRaw( - requestParameters: GetDekByVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getDekByVersion().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getDekByVersion().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling getDekByVersion().', - ); - } - - const queryParameters: any = {}; - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; + /** + * Create a dek + */ + async createDekRaw(requestParameters: CreateDekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling createDek().' + ); + } + + if (requestParameters['CreateDekRequest'] == null) { + throw new runtime.RequiredError( + 'CreateDekRequest', + 'Required parameter "CreateDekRequest" was null or undefined when calling createDek().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateDekRequestToJSON(requestParameters['CreateDekRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); + } + + /** + * Create a dek + */ + async createDek(requestParameters: CreateDekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createDekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a dek version + */ + async deleteDekVersionRaw(requestParameters: DeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteDekVersion().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling deleteDekVersion().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling deleteDekVersion().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + if (requestParameters['permanent'] != null) { + queryParameters['permanent'] = requestParameters['permanent']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a dek version + */ + async deleteDekVersion(requestParameters: DeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteDekVersionRaw(requestParameters, initOverrides); + } + + /** + * Delete all versions of a dek + */ + async deleteDekVersionsRaw(requestParameters: DeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteDekVersions().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling deleteDekVersions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + if (requestParameters['permanent'] != null) { + queryParameters['permanent'] = requestParameters['permanent']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete all versions of a dek + */ + async deleteDekVersions(requestParameters: DeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteDekVersionsRaw(requestParameters, initOverrides); + } + + /** + * Get a dek by subject + */ + async getDekRaw(requestParameters: GetDekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getDek().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getDek().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); + } + + /** + * Get a dek by subject + */ + async getDek(requestParameters: GetDekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a dek by subject and version + */ + async getDekByVersionRaw(requestParameters: GetDekByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getDekByVersion().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getDekByVersion().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling getDekByVersion().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); + } + + /** + * Get a dek by subject and version + */ + async getDekByVersion(requestParameters: GetDekByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDekByVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of dek subjects + */ + async getDekSubjectsRaw(requestParameters: GetDekSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getDekSubjects().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get a list of dek subjects + */ + async getDekSubjects(requestParameters: GetDekSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getDekSubjectsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List versions of dek + */ + async getDekVersionsRaw(requestParameters: GetDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getDekVersions().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getDekVersions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * List versions of dek + */ + async getDekVersions(requestParameters: GetDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getDekVersionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Undelete a dek version + */ + async undeleteDekVersionRaw(requestParameters: UndeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling undeleteDekVersion().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling undeleteDekVersion().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling undeleteDekVersion().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}/undelete`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Undelete a dek version + */ + async undeleteDekVersion(requestParameters: UndeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.undeleteDekVersionRaw(requestParameters, initOverrides); + } + + /** + * Undelete all versions of a dek + */ + async undeleteDekVersionsRaw(requestParameters: UndeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling undeleteDekVersions().' + ); + } + + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling undeleteDekVersions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['algorithm'] != null) { + queryParameters['algorithm'] = requestParameters['algorithm']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/deks/{subject}/undelete`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Undelete all versions of a dek + */ + async undeleteDekVersions(requestParameters: UndeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.undeleteDekVersionsRaw(requestParameters, initOverrides); } - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); - } - - /** - * Get a dek by subject and version - */ - async getDekByVersion( - requestParameters: GetDekByVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getDekByVersionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get a list of dek subjects - */ - async getDekSubjectsRaw( - requestParameters: GetDekSubjectsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getDekSubjects().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Get a list of dek subjects - */ - async getDekSubjects( - requestParameters: GetDekSubjectsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getDekSubjectsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List versions of dek - */ - async getDekVersionsRaw( - requestParameters: GetDekVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getDekVersions().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getDekVersions().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; - } - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * List versions of dek - */ - async getDekVersions( - requestParameters: GetDekVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getDekVersionsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Undelete a dek version - */ - async undeleteDekVersionRaw( - requestParameters: UndeleteDekVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling undeleteDekVersion().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling undeleteDekVersion().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling undeleteDekVersion().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}/undelete` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Undelete a dek version - */ - async undeleteDekVersion( - requestParameters: UndeleteDekVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.undeleteDekVersionRaw(requestParameters, initOverrides); - } - - /** - * Undelete all versions of a dek - */ - async undeleteDekVersionsRaw( - requestParameters: UndeleteDekVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling undeleteDekVersions().', - ); - } - - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling undeleteDekVersions().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["algorithm"] != null) { - queryParameters["algorithm"] = requestParameters["algorithm"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/deks/{subject}/undelete` - .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Undelete all versions of a dek - */ - async undeleteDekVersions( - requestParameters: UndeleteDekVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.undeleteDekVersionsRaw(requestParameters, initOverrides); - } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum DeleteDekVersionAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum DeleteDekVersionsAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum GetDekAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum GetDekByVersionAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum GetDekVersionsAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum UndeleteDekVersionAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum UndeleteDekVersionsAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } diff --git a/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts b/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts index 22dd24fa25..28857fd734 100644 --- a/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts @@ -5,14 +5,15 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorMessage, ExporterConfigResponse, @@ -20,772 +21,555 @@ import type { ExporterResponse, ExporterStatusResponse, ExporterUpdateRequest, -} from "../models/index"; +} from '../models/index'; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - ExporterConfigResponseFromJSON, - ExporterConfigResponseToJSON, - ExporterReferenceFromJSON, - ExporterReferenceToJSON, - ExporterResponseFromJSON, - ExporterResponseToJSON, - ExporterStatusResponseFromJSON, - ExporterStatusResponseToJSON, - ExporterUpdateRequestFromJSON, - ExporterUpdateRequestToJSON, -} from "../models/index"; + ErrorMessageFromJSON, + ErrorMessageToJSON, + ExporterConfigResponseFromJSON, + ExporterConfigResponseToJSON, + ExporterReferenceFromJSON, + ExporterReferenceToJSON, + ExporterResponseFromJSON, + ExporterResponseToJSON, + ExporterStatusResponseFromJSON, + ExporterStatusResponseToJSON, + ExporterUpdateRequestFromJSON, + ExporterUpdateRequestToJSON, +} from '../models/index'; export interface DeleteExporterRequest { - name: string; + name: string; } export interface GetExporterConfigByNameRequest { - name: string; + name: string; } export interface GetExporterInfoByNameRequest { - name: string; + name: string; } export interface GetExporterStatusByNameRequest { - name: string; + name: string; } export interface PauseExporterByNameRequest { - name: string; + name: string; } export interface RegisterExporterRequest { - ExporterReference: ExporterReference; + ExporterReference: ExporterReference; } export interface ResetExporterByNameRequest { - name: string; + name: string; } export interface ResumeExporterByNameRequest { - name: string; + name: string; } export interface UpdateExporterConfigByNameRequest { - name: string; - ExporterConfigResponse: ExporterConfigResponse; + name: string; + ExporterConfigResponse: ExporterConfigResponse; } export interface UpdateExporterInfoRequest { - name: string; - ExporterUpdateRequest: ExporterUpdateRequest; + name: string; + ExporterUpdateRequest: ExporterUpdateRequest; } /** - * + * */ export class ExportersV1Api extends runtime.BaseAPI { - /** - * Deletes the schema exporter. - * Delete schema exporter by name - */ - async deleteExporterRaw( - requestParameters: DeleteExporterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteExporter().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Deletes the schema exporter. - * Delete schema exporter by name - */ - async deleteExporter( - requestParameters: DeleteExporterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteExporterRaw(requestParameters, initOverrides); - } - - /** - * Retrieves the config of the schema exporter. - * Gets schema exporter config by name - */ - async getExporterConfigByNameRaw( - requestParameters: GetExporterConfigByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getExporterConfigByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}/config`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterConfigResponseFromJSON(jsonValue), - ); - } - - /** - * Retrieves the config of the schema exporter. - * Gets schema exporter config by name - */ - async getExporterConfigByName( - requestParameters: GetExporterConfigByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getExporterConfigByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the information of the schema exporter. - * Gets schema exporter by name - */ - async getExporterInfoByNameRaw( - requestParameters: GetExporterInfoByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getExporterInfoByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterReferenceFromJSON(jsonValue), - ); - } - - /** - * Retrieves the information of the schema exporter. - * Gets schema exporter by name - */ - async getExporterInfoByName( - requestParameters: GetExporterInfoByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getExporterInfoByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the status of the schema exporter. - * Gets schema exporter status by name - */ - async getExporterStatusByNameRaw( - requestParameters: GetExporterStatusByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getExporterStatusByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}/status`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterStatusResponseFromJSON(jsonValue), - ); - } - - /** - * Retrieves the status of the schema exporter. - * Gets schema exporter status by name - */ - async getExporterStatusByName( - requestParameters: GetExporterStatusByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getExporterStatusByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a list of schema exporters that have been created. - * Gets all schema exporters - */ - async listExportersRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves a list of schema exporters that have been created. - * Gets all schema exporters - */ - async listExporters( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.listExportersRaw(initOverrides); - return await response.value(); - } - - /** - * Pauses the state of the schema exporter. - * Pause schema exporter by name - */ - async pauseExporterByNameRaw( - requestParameters: PauseExporterByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling pauseExporterByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}/pause`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterResponseFromJSON(jsonValue), - ); - } - - /** - * Pauses the state of the schema exporter. - * Pause schema exporter by name - */ - async pauseExporterByName( - requestParameters: PauseExporterByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.pauseExporterByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates a new schema exporter. All attributes in request body are optional except config. - * Creates a new schema exporter - */ - async registerExporterRaw( - requestParameters: RegisterExporterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["ExporterReference"] == null) { - throw new runtime.RequiredError( - "ExporterReference", - 'Required parameter "ExporterReference" was null or undefined when calling registerExporter().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ExporterReferenceToJSON(requestParameters["ExporterReference"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterResponseFromJSON(jsonValue), - ); - } - - /** - * Creates a new schema exporter. All attributes in request body are optional except config. - * Creates a new schema exporter - */ - async registerExporter( - requestParameters: RegisterExporterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.registerExporterRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Reset the state of the schema exporter. - * Reset schema exporter by name - */ - async resetExporterByNameRaw( - requestParameters: ResetExporterByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling resetExporterByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}/reset`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterResponseFromJSON(jsonValue), - ); - } - - /** - * Reset the state of the schema exporter. - * Reset schema exporter by name - */ - async resetExporterByName( - requestParameters: ResetExporterByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.resetExporterByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Resume running of the schema exporter. - * Resume schema exporter by name - */ - async resumeExporterByNameRaw( - requestParameters: ResumeExporterByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling resumeExporterByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}/resume`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterResponseFromJSON(jsonValue), - ); - } - - /** - * Resume running of the schema exporter. - * Resume schema exporter by name - */ - async resumeExporterByName( - requestParameters: ResumeExporterByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.resumeExporterByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the config of the schema exporter. - * Update schema exporter config by name - */ - async updateExporterConfigByNameRaw( - requestParameters: UpdateExporterConfigByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling updateExporterConfigByName().', - ); - } - - if (requestParameters["ExporterConfigResponse"] == null) { - throw new runtime.RequiredError( - "ExporterConfigResponse", - 'Required parameter "ExporterConfigResponse" was null or undefined when calling updateExporterConfigByName().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}/config`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ExporterConfigResponseToJSON(requestParameters["ExporterConfigResponse"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterResponseFromJSON(jsonValue), - ); - } - - /** - * Retrieves the config of the schema exporter. - * Update schema exporter config by name - */ - async updateExporterConfigByName( - requestParameters: UpdateExporterConfigByNameRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateExporterConfigByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Updates the information or configurations of the schema exporter. All attributes in request body are optional. - * Update schema exporter by name - */ - async updateExporterInfoRaw( - requestParameters: UpdateExporterInfoRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling updateExporterInfo().', - ); - } - - if (requestParameters["ExporterUpdateRequest"] == null) { - throw new runtime.RequiredError( - "ExporterUpdateRequest", - 'Required parameter "ExporterUpdateRequest" was null or undefined when calling updateExporterInfo().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Deletes the schema exporter. + * Delete schema exporter by name + */ + async deleteExporterRaw(requestParameters: DeleteExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteExporter().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Deletes the schema exporter. + * Delete schema exporter by name + */ + async deleteExporter(requestParameters: DeleteExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteExporterRaw(requestParameters, initOverrides); + } + + /** + * Retrieves the config of the schema exporter. + * Gets schema exporter config by name + */ + async getExporterConfigByNameRaw(requestParameters: GetExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getExporterConfigByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}/config`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterConfigResponseFromJSON(jsonValue)); + } + + /** + * Retrieves the config of the schema exporter. + * Gets schema exporter config by name + */ + async getExporterConfigByName(requestParameters: GetExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getExporterConfigByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the information of the schema exporter. + * Gets schema exporter by name + */ + async getExporterInfoByNameRaw(requestParameters: GetExporterInfoByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getExporterInfoByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterReferenceFromJSON(jsonValue)); + } + + /** + * Retrieves the information of the schema exporter. + * Gets schema exporter by name + */ + async getExporterInfoByName(requestParameters: GetExporterInfoByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getExporterInfoByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the status of the schema exporter. + * Gets schema exporter status by name + */ + async getExporterStatusByNameRaw(requestParameters: GetExporterStatusByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getExporterStatusByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}/status`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterStatusResponseFromJSON(jsonValue)); + } + + /** + * Retrieves the status of the schema exporter. + * Gets schema exporter status by name + */ + async getExporterStatusByName(requestParameters: GetExporterStatusByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getExporterStatusByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of schema exporters that have been created. + * Gets all schema exporters + */ + async listExportersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves a list of schema exporters that have been created. + * Gets all schema exporters + */ + async listExporters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listExportersRaw(initOverrides); + return await response.value(); + } + + /** + * Pauses the state of the schema exporter. + * Pause schema exporter by name + */ + async pauseExporterByNameRaw(requestParameters: PauseExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling pauseExporterByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}/pause`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); + } + + /** + * Pauses the state of the schema exporter. + * Pause schema exporter by name + */ + async pauseExporterByName(requestParameters: PauseExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.pauseExporterByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a new schema exporter. All attributes in request body are optional except config. + * Creates a new schema exporter + */ + async registerExporterRaw(requestParameters: RegisterExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['ExporterReference'] == null) { + throw new runtime.RequiredError( + 'ExporterReference', + 'Required parameter "ExporterReference" was null or undefined when calling registerExporter().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ExporterReferenceToJSON(requestParameters['ExporterReference']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); + } + + /** + * Creates a new schema exporter. All attributes in request body are optional except config. + * Creates a new schema exporter + */ + async registerExporter(requestParameters: RegisterExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.registerExporterRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Reset the state of the schema exporter. + * Reset schema exporter by name + */ + async resetExporterByNameRaw(requestParameters: ResetExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling resetExporterByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}/reset`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); + } + + /** + * Reset the state of the schema exporter. + * Reset schema exporter by name + */ + async resetExporterByName(requestParameters: ResetExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.resetExporterByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Resume running of the schema exporter. + * Resume schema exporter by name + */ + async resumeExporterByNameRaw(requestParameters: ResumeExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling resumeExporterByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}/resume`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); + } + + /** + * Resume running of the schema exporter. + * Resume schema exporter by name + */ + async resumeExporterByName(requestParameters: ResumeExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.resumeExporterByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the config of the schema exporter. + * Update schema exporter config by name + */ + async updateExporterConfigByNameRaw(requestParameters: UpdateExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling updateExporterConfigByName().' + ); + } + + if (requestParameters['ExporterConfigResponse'] == null) { + throw new runtime.RequiredError( + 'ExporterConfigResponse', + 'Required parameter "ExporterConfigResponse" was null or undefined when calling updateExporterConfigByName().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}/config`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ExporterConfigResponseToJSON(requestParameters['ExporterConfigResponse']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); + } + + /** + * Retrieves the config of the schema exporter. + * Update schema exporter config by name + */ + async updateExporterConfigByName(requestParameters: UpdateExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateExporterConfigByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates the information or configurations of the schema exporter. All attributes in request body are optional. + * Update schema exporter by name + */ + async updateExporterInfoRaw(requestParameters: UpdateExporterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling updateExporterInfo().' + ); + } + + if (requestParameters['ExporterUpdateRequest'] == null) { + throw new runtime.RequiredError( + 'ExporterUpdateRequest', + 'Required parameter "ExporterUpdateRequest" was null or undefined when calling updateExporterInfo().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/exporters/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ExporterUpdateRequestToJSON(requestParameters['ExporterUpdateRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); + } + + /** + * Updates the information or configurations of the schema exporter. All attributes in request body are optional. + * Update schema exporter by name + */ + async updateExporterInfo(requestParameters: UpdateExporterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateExporterInfoRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/exporters/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ExporterUpdateRequestToJSON(requestParameters["ExporterUpdateRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ExporterResponseFromJSON(jsonValue), - ); - } - - /** - * Updates the information or configurations of the schema exporter. All attributes in request body are optional. - * Update schema exporter by name - */ - async updateExporterInfo( - requestParameters: UpdateExporterInfoRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateExporterInfoRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts b/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts index af92d112c9..d477e7577a 100644 --- a/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts @@ -5,422 +5,321 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { CreateKekRequest, Kek, UpdateKekRequest } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + CreateKekRequest, + Kek, + UpdateKekRequest, +} from '../models/index'; import { - CreateKekRequestFromJSON, - CreateKekRequestToJSON, - KekFromJSON, - KekToJSON, - UpdateKekRequestFromJSON, - UpdateKekRequestToJSON, -} from "../models/index"; + CreateKekRequestFromJSON, + CreateKekRequestToJSON, + KekFromJSON, + KekToJSON, + UpdateKekRequestFromJSON, + UpdateKekRequestToJSON, +} from '../models/index'; export interface CreateKekOperationRequest { - CreateKekRequest: CreateKekRequest; + CreateKekRequest: CreateKekRequest; } export interface DeleteKekRequest { - name: string; - permanent?: boolean; + name: string; + permanent?: boolean; } export interface GetKekRequest { - name: string; - deleted?: boolean; + name: string; + deleted?: boolean; } export interface GetKekNamesRequest { - deleted?: boolean; + deleted?: boolean; } export interface PutKekRequest { - name: string; - UpdateKekRequest: UpdateKekRequest; + name: string; + UpdateKekRequest: UpdateKekRequest; } export interface UndeleteKekRequest { - name: string; + name: string; } /** - * + * */ export class KeyEncryptionKeysV1Api extends runtime.BaseAPI { - /** - * Create a kek - */ - async createKekRaw( - requestParameters: CreateKekOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["CreateKekRequest"] == null) { - throw new runtime.RequiredError( - "CreateKekRequest", - 'Required parameter "CreateKekRequest" was null or undefined when calling createKek().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Create a kek + */ + async createKekRaw(requestParameters: CreateKekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['CreateKekRequest'] == null) { + throw new runtime.RequiredError( + 'CreateKekRequest', + 'Required parameter "CreateKekRequest" was null or undefined when calling createKek().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateKekRequestToJSON(requestParameters['CreateKekRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + /** + * Create a kek + */ + async createKek(requestParameters: CreateKekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createKekRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/dek-registry/v1/keks`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: CreateKekRequestToJSON(requestParameters["CreateKekRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); - } - - /** - * Create a kek - */ - async createKek( - requestParameters: CreateKekOperationRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.createKekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete a kek - */ - async deleteKekRaw( - requestParameters: DeleteKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling deleteKek().', - ); - } - - const queryParameters: any = {}; - if (requestParameters["permanent"] != null) { - queryParameters["permanent"] = requestParameters["permanent"]; + /** + * Delete a kek + */ + async deleteKekRaw(requestParameters: DeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling deleteKek().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['permanent'] != null) { + queryParameters['permanent'] = requestParameters['permanent']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Delete a kek + */ + async deleteKek(requestParameters: DeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteKekRaw(requestParameters, initOverrides); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a kek - */ - async deleteKek( - requestParameters: DeleteKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.deleteKekRaw(requestParameters, initOverrides); - } - - /** - * Get a kek by name - */ - async getKekRaw( - requestParameters: GetKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling getKek().', - ); + /** + * Get a kek by name + */ + async getKekRaw(requestParameters: GetKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling getKek().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); } - const queryParameters: any = {}; - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; + /** + * Get a kek by name + */ + async getKek(requestParameters: GetKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getKekRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Get a list of kek names + */ + async getKekNamesRaw(requestParameters: GetKekNamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); - } - - /** - * Get a kek by name - */ - async getKek( - requestParameters: GetKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getKekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get a list of kek names - */ - async getKekNamesRaw( - requestParameters: GetKekNamesRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; + /** + * Get a list of kek names + */ + async getKekNames(requestParameters: GetKekNamesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getKekNamesRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Alters a kek + */ + async putKekRaw(requestParameters: PutKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling putKek().' + ); + } + + if (requestParameters['UpdateKekRequest'] == null) { + throw new runtime.RequiredError( + 'UpdateKekRequest', + 'Required parameter "UpdateKekRequest" was null or undefined when calling putKek().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: UpdateKekRequestToJSON(requestParameters['UpdateKekRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Get a list of kek names - */ - async getKekNames( - requestParameters: GetKekNamesRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getKekNamesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Alters a kek - */ - async putKekRaw( - requestParameters: PutKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling putKek().', - ); + /** + * Alters a kek + */ + async putKek(requestParameters: PutKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.putKekRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["UpdateKekRequest"] == null) { - throw new runtime.RequiredError( - "UpdateKekRequest", - 'Required parameter "UpdateKekRequest" was null or undefined when calling putKek().', - ); + /** + * Undelete a kek + */ + async undeleteKekRaw(requestParameters: UndeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling undeleteKek().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/dek-registry/v1/keks/{name}/undelete`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Undelete a kek + */ + async undeleteKek(requestParameters: UndeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.undeleteKekRaw(requestParameters, initOverrides); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: UpdateKekRequestToJSON(requestParameters["UpdateKekRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); - } - - /** - * Alters a kek - */ - async putKek( - requestParameters: PutKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.putKekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Undelete a kek - */ - async undeleteKekRaw( - requestParameters: UndeleteKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["name"] == null) { - throw new runtime.RequiredError( - "name", - 'Required parameter "name" was null or undefined when calling undeleteKek().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/dek-registry/v1/keks/{name}/undelete`.replace( - `{${"name"}}`, - encodeURIComponent(String(requestParameters["name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Undelete a kek - */ - async undeleteKek( - requestParameters: UndeleteKekRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.undeleteKekRaw(requestParameters, initOverrides); - } } diff --git a/src/clients/schemaRegistryRest/apis/ModesV1Api.ts b/src/clients/schemaRegistryRest/apis/ModesV1Api.ts index a4853d61f9..75f6520491 100644 --- a/src/clients/schemaRegistryRest/apis/ModesV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ModesV1Api.ts @@ -5,367 +5,285 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorMessage, Mode, ModeUpdateRequest } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorMessage, + Mode, + ModeUpdateRequest, +} from '../models/index'; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - ModeFromJSON, - ModeToJSON, - ModeUpdateRequestFromJSON, - ModeUpdateRequestToJSON, -} from "../models/index"; + ErrorMessageFromJSON, + ErrorMessageToJSON, + ModeFromJSON, + ModeToJSON, + ModeUpdateRequestFromJSON, + ModeUpdateRequestToJSON, +} from '../models/index'; export interface DeleteSubjectModeRequest { - subject: string; + subject: string; } export interface GetModeRequest { - subject: string; - defaultToGlobal?: boolean; + subject: string; + defaultToGlobal?: boolean; } export interface UpdateModeRequest { - subject: string; - ModeUpdateRequest: ModeUpdateRequest; - force?: boolean; + subject: string; + ModeUpdateRequest: ModeUpdateRequest; + force?: boolean; } export interface UpdateTopLevelModeRequest { - ModeUpdateRequest: ModeUpdateRequest; - force?: boolean; + ModeUpdateRequest: ModeUpdateRequest; + force?: boolean; } /** - * + * */ export class ModesV1Api extends runtime.BaseAPI { - /** - * Deletes the specified subject-level mode and reverts to the global default. - * Delete subject mode - */ - async deleteSubjectModeRaw( - requestParameters: DeleteSubjectModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling deleteSubjectMode().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Deletes the specified subject-level mode and reverts to the global default. + * Delete subject mode + */ + async deleteSubjectModeRaw(requestParameters: DeleteSubjectModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling deleteSubjectMode().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/mode/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + /** + * Deletes the specified subject-level mode and reverts to the global default. + * Delete subject mode + */ + async deleteSubjectMode(requestParameters: DeleteSubjectModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteSubjectModeRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/mode/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); - } - - /** - * Deletes the specified subject-level mode and reverts to the global default. - * Delete subject mode - */ - async deleteSubjectMode( - requestParameters: DeleteSubjectModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.deleteSubjectModeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the subject mode. - * Get subject mode - */ - async getModeRaw( - requestParameters: GetModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getMode().', - ); - } - - const queryParameters: any = {}; - if (requestParameters["defaultToGlobal"] != null) { - queryParameters["defaultToGlobal"] = requestParameters["defaultToGlobal"]; + /** + * Retrieves the subject mode. + * Get subject mode + */ + async getModeRaw(requestParameters: GetModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getMode().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['defaultToGlobal'] != null) { + queryParameters['defaultToGlobal'] = requestParameters['defaultToGlobal']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/mode/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves the subject mode. + * Get subject mode + */ + async getMode(requestParameters: GetModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getModeRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/mode/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); - } - - /** - * Retrieves the subject mode. - * Get subject mode - */ - async getMode( - requestParameters: GetModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getModeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves global mode. - * Get global mode - */ - async getTopLevelModeRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves global mode. + * Get global mode + */ + async getTopLevelModeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/mode`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/mode`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); - } - - /** - * Retrieves global mode. - * Get global mode - */ - async getTopLevelMode(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTopLevelModeRaw(initOverrides); - return await response.value(); - } - - /** - * Update mode for the specified subject. On success, echoes the original request back to the client. - * Update subject mode - */ - async updateModeRaw( - requestParameters: UpdateModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling updateMode().', - ); + /** + * Retrieves global mode. + * Get global mode + */ + async getTopLevelMode(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopLevelModeRaw(initOverrides); + return await response.value(); } - if (requestParameters["ModeUpdateRequest"] == null) { - throw new runtime.RequiredError( - "ModeUpdateRequest", - 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateMode().', - ); + /** + * Update mode for the specified subject. On success, echoes the original request back to the client. + * Update subject mode + */ + async updateModeRaw(requestParameters: UpdateModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling updateMode().' + ); + } + + if (requestParameters['ModeUpdateRequest'] == null) { + throw new runtime.RequiredError( + 'ModeUpdateRequest', + 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateMode().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/mode/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ModeUpdateRequestToJSON(requestParameters['ModeUpdateRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeUpdateRequestFromJSON(jsonValue)); } - const queryParameters: any = {}; - - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + /** + * Update mode for the specified subject. On success, echoes the original request back to the client. + * Update subject mode + */ + async updateMode(requestParameters: UpdateModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateModeRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/mode/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ModeUpdateRequestToJSON(requestParameters["ModeUpdateRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ModeUpdateRequestFromJSON(jsonValue), - ); - } - - /** - * Update mode for the specified subject. On success, echoes the original request back to the client. - * Update subject mode - */ - async updateMode( - requestParameters: UpdateModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateModeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update global mode. On success, echoes the original request back to the client. - * Update global mode - */ - async updateTopLevelModeRaw( - requestParameters: UpdateTopLevelModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["ModeUpdateRequest"] == null) { - throw new runtime.RequiredError( - "ModeUpdateRequest", - 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateTopLevelMode().', - ); + /** + * Update global mode. On success, echoes the original request back to the client. + * Update global mode + */ + async updateTopLevelModeRaw(requestParameters: UpdateTopLevelModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['ModeUpdateRequest'] == null) { + throw new runtime.RequiredError( + 'ModeUpdateRequest', + 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateTopLevelMode().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['force'] != null) { + queryParameters['force'] = requestParameters['force']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/mode`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ModeUpdateRequestToJSON(requestParameters['ModeUpdateRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeUpdateRequestFromJSON(jsonValue)); } - const queryParameters: any = {}; - - if (requestParameters["force"] != null) { - queryParameters["force"] = requestParameters["force"]; + /** + * Update global mode. On success, echoes the original request back to the client. + * Update global mode + */ + async updateTopLevelMode(requestParameters: UpdateTopLevelModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateTopLevelModeRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/mode`, - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ModeUpdateRequestToJSON(requestParameters["ModeUpdateRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - ModeUpdateRequestFromJSON(jsonValue), - ); - } - - /** - * Update global mode. On success, echoes the original request back to the client. - * Update global mode - */ - async updateTopLevelMode( - requestParameters: UpdateTopLevelModeRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.updateTopLevelModeRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts b/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts index 1e66413dc9..fa0d7eb963 100644 --- a/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts @@ -5,472 +5,372 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ErrorMessage, Schema, SchemaString, SubjectVersion } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ErrorMessage, + Schema, + SchemaString, + SubjectVersion, +} from '../models/index'; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - SchemaFromJSON, - SchemaToJSON, - SchemaStringFromJSON, - SchemaStringToJSON, - SubjectVersionFromJSON, - SubjectVersionToJSON, -} from "../models/index"; + ErrorMessageFromJSON, + ErrorMessageToJSON, + SchemaFromJSON, + SchemaToJSON, + SchemaStringFromJSON, + SchemaStringToJSON, + SubjectVersionFromJSON, + SubjectVersionToJSON, +} from '../models/index'; export interface GetSchemaRequest { - id: number; - subject?: string; - format?: string; - fetchMaxId?: boolean; + id: number; + subject?: string; + format?: string; + fetchMaxId?: boolean; } export interface GetSchemaOnlyRequest { - id: number; - subject?: string; - format?: string; + id: number; + subject?: string; + format?: string; } export interface GetSchemasRequest { - subjectPrefix?: string; - deleted?: boolean; - latestOnly?: boolean; - offset?: number; - limit?: number; + subjectPrefix?: string; + deleted?: boolean; + latestOnly?: boolean; + offset?: number; + limit?: number; } export interface GetSubjectsRequest { - id: number; - subject?: string; - deleted?: boolean; + id: number; + subject?: string; + deleted?: boolean; } export interface GetVersionsRequest { - id: number; - subject?: string; - deleted?: boolean; + id: number; + subject?: string; + deleted?: boolean; } /** - * + * */ export class SchemasV1Api extends runtime.BaseAPI { - /** - * Retrieves the schema string identified by the input ID. - * Get schema string by ID - */ - async getSchemaRaw( - requestParameters: GetSchemaRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling getSchema().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["subject"] != null) { - queryParameters["subject"] = requestParameters["subject"]; - } - - if (requestParameters["format"] != null) { - queryParameters["format"] = requestParameters["format"]; - } - - if (requestParameters["fetchMaxId"] != null) { - queryParameters["fetchMaxId"] = requestParameters["fetchMaxId"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/schemas/ids/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SchemaStringFromJSON(jsonValue)); - } - - /** - * Retrieves the schema string identified by the input ID. - * Get schema string by ID - */ - async getSchema( - requestParameters: GetSchemaRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSchemaRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the schema identified by the input ID. - * Get schema by ID - */ - async getSchemaOnlyRaw( - requestParameters: GetSchemaOnlyRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling getSchemaOnly().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["subject"] != null) { - queryParameters["subject"] = requestParameters["subject"]; - } - - if (requestParameters["format"] != null) { - queryParameters["format"] = requestParameters["format"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves the schema string identified by the input ID. + * Get schema string by ID + */ + async getSchemaRaw(requestParameters: GetSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getSchema().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['format'] != null) { + queryParameters['format'] = requestParameters['format']; + } + + if (requestParameters['fetchMaxId'] != null) { + queryParameters['fetchMaxId'] = requestParameters['fetchMaxId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/schemas/ids/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SchemaStringFromJSON(jsonValue)); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/schemas/ids/{id}/schema`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Retrieves the schema identified by the input ID. - * Get schema by ID - */ - async getSchemaOnly( - requestParameters: GetSchemaOnlyRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSchemaOnlyRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieve the schema types supported by this registry. - * List supported schema types - */ - async getSchemaTypesRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Retrieves the schema string identified by the input ID. + * Get schema string by ID + */ + async getSchema(requestParameters: GetSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSchemaRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/schemas/types`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieve the schema types supported by this registry. - * List supported schema types - */ - async getSchemaTypes( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getSchemaTypesRaw(initOverrides); - return await response.value(); - } - - /** - * Get the schemas matching the specified parameters. - * List schemas - */ - async getSchemasRaw( - requestParameters: GetSchemasRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["subjectPrefix"] != null) { - queryParameters["subjectPrefix"] = requestParameters["subjectPrefix"]; + /** + * Retrieves the schema identified by the input ID. + * Get schema by ID + */ + async getSchemaOnlyRaw(requestParameters: GetSchemaOnlyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getSchemaOnly().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['format'] != null) { + queryParameters['format'] = requestParameters['format']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/schemas/ids/{id}/schema`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } } - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; + /** + * Retrieves the schema identified by the input ID. + * Get schema by ID + */ + async getSchemaOnly(requestParameters: GetSchemaOnlyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSchemaOnlyRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["latestOnly"] != null) { - queryParameters["latestOnly"] = requestParameters["latestOnly"]; + /** + * Retrieve the schema types supported by this registry. + * List supported schema types + */ + async getSchemaTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/schemas/types`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); } - if (requestParameters["offset"] != null) { - queryParameters["offset"] = requestParameters["offset"]; + /** + * Retrieve the schema types supported by this registry. + * List supported schema types + */ + async getSchemaTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getSchemaTypesRaw(initOverrides); + return await response.value(); } - if (requestParameters["limit"] != null) { - queryParameters["limit"] = requestParameters["limit"]; + /** + * Get the schemas matching the specified parameters. + * List schemas + */ + async getSchemasRaw(requestParameters: GetSchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['subjectPrefix'] != null) { + queryParameters['subjectPrefix'] = requestParameters['subjectPrefix']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + if (requestParameters['latestOnly'] != null) { + queryParameters['latestOnly'] = requestParameters['latestOnly']; + } + + if (requestParameters['offset'] != null) { + queryParameters['offset'] = requestParameters['offset']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/schemas`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SchemaFromJSON)); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Get the schemas matching the specified parameters. + * List schemas + */ + async getSchemas(requestParameters: GetSchemasRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getSchemasRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + /** + * Retrieves all the subjects associated with a particular schema ID. + * List subjects associated to schema ID + */ + async getSubjectsRaw(requestParameters: GetSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getSubjects().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/schemas/ids/{id}/subjects`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); } - const response = await this.request( - { - path: `/schemas`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SchemaFromJSON)); - } - - /** - * Get the schemas matching the specified parameters. - * List schemas - */ - async getSchemas( - requestParameters: GetSchemasRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getSchemasRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves all the subjects associated with a particular schema ID. - * List subjects associated to schema ID - */ - async getSubjectsRaw( - requestParameters: GetSubjectsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling getSubjects().', - ); - } - - const queryParameters: any = {}; - if (requestParameters["subject"] != null) { - queryParameters["subject"] = requestParameters["subject"]; + /** + * Retrieves all the subjects associated with a particular schema ID. + * List subjects associated to schema ID + */ + async getSubjects(requestParameters: GetSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getSubjectsRaw(requestParameters, initOverrides); + return await response.value(); } - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; + /** + * Get all the subject-version pairs associated with the input ID. + * List subject-versions associated to schema ID + */ + async getVersionsRaw(requestParameters: GetVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling getVersions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['subject'] != null) { + queryParameters['subject'] = requestParameters['subject']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/schemas/ids/{id}/versions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubjectVersionFromJSON)); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); + /** + * Get all the subject-version pairs associated with the input ID. + * List subject-versions associated to schema ID + */ + async getVersions(requestParameters: GetVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getVersionsRaw(requestParameters, initOverrides); + return await response.value(); } - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/schemas/ids/{id}/subjects`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves all the subjects associated with a particular schema ID. - * List subjects associated to schema ID - */ - async getSubjects( - requestParameters: GetSubjectsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getSubjectsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get all the subject-version pairs associated with the input ID. - * List subject-versions associated to schema ID - */ - async getVersionsRaw( - requestParameters: GetVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling getVersions().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["subject"] != null) { - queryParameters["subject"] = requestParameters["subject"]; - } - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/schemas/ids/{id}/versions`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - jsonValue.map(SubjectVersionFromJSON), - ); - } - - /** - * Get all the subject-version pairs associated with the input ID. - * List subject-versions associated to schema ID - */ - async getVersions( - requestParameters: GetVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getVersionsRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts b/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts index 1876479154..f492520e81 100644 --- a/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts @@ -5,725 +5,562 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { ErrorMessage, RegisterSchemaRequest, RegisterSchemaResponse, Schema, -} from "../models/index"; +} from '../models/index'; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - RegisterSchemaRequestFromJSON, - RegisterSchemaRequestToJSON, - RegisterSchemaResponseFromJSON, - RegisterSchemaResponseToJSON, - SchemaFromJSON, - SchemaToJSON, -} from "../models/index"; + ErrorMessageFromJSON, + ErrorMessageToJSON, + RegisterSchemaRequestFromJSON, + RegisterSchemaRequestToJSON, + RegisterSchemaResponseFromJSON, + RegisterSchemaResponseToJSON, + SchemaFromJSON, + SchemaToJSON, +} from '../models/index'; export interface DeleteSchemaVersionRequest { - subject: string; - version: string; - permanent?: boolean; + subject: string; + version: string; + permanent?: boolean; } export interface DeleteSubjectRequest { - subject: string; - permanent?: boolean; + subject: string; + permanent?: boolean; } export interface GetReferencedByRequest { - subject: string; - version: string; + subject: string; + version: string; } export interface GetSchemaByVersionRequest { - subject: string; - version: string; - deleted?: boolean; + subject: string; + version: string; + deleted?: boolean; } export interface GetSchemaOnly1Request { - subject: string; - version: string; - deleted?: boolean; + subject: string; + version: string; + deleted?: boolean; } export interface ListRequest { - subjectPrefix?: string; - deleted?: boolean; + subjectPrefix?: string; + deleted?: boolean; } export interface ListVersionsRequest { - subject: string; - deleted?: boolean; + subject: string; + deleted?: boolean; } export interface LookUpSchemaUnderSubjectRequest { - subject: string; - RegisterSchemaRequest: RegisterSchemaRequest; - normalize?: boolean; - deleted?: boolean; + subject: string; + RegisterSchemaRequest: RegisterSchemaRequest; + normalize?: boolean; + deleted?: boolean; } export interface RegisterRequest { - subject: string; - RegisterSchemaRequest: RegisterSchemaRequest; - normalize?: boolean; + subject: string; + RegisterSchemaRequest: RegisterSchemaRequest; + normalize?: boolean; } /** - * + * */ export class SubjectsV1Api extends runtime.BaseAPI { - /** - * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. - * Delete schema version - */ - async deleteSchemaVersionRaw( - requestParameters: DeleteSchemaVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling deleteSchemaVersion().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling deleteSchemaVersion().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["permanent"] != null) { - queryParameters["permanent"] = requestParameters["permanent"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}/versions/{version}` - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. - * Delete schema version - */ - async deleteSchemaVersion( - requestParameters: DeleteSchemaVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.deleteSchemaVersionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. - * Delete subject - */ - async deleteSubjectRaw( - requestParameters: DeleteSubjectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling deleteSubject().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["permanent"] != null) { - queryParameters["permanent"] = requestParameters["permanent"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. - * Delete subject - */ - async deleteSubject( - requestParameters: DeleteSubjectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.deleteSubjectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the IDs of schemas that reference the specified schema. - * List schemas referencing a schema - */ - async getReferencedByRaw( - requestParameters: GetReferencedByRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getReferencedBy().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling getReferencedBy().', - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}/versions/{version}/referencedby` - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves the IDs of schemas that reference the specified schema. - * List schemas referencing a schema - */ - async getReferencedBy( - requestParameters: GetReferencedByRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.getReferencedByRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a specific version of the schema registered under this subject. - * Get schema by version - */ - async getSchemaByVersionRaw( - requestParameters: GetSchemaByVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getSchemaByVersion().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling getSchemaByVersion().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}/versions/{version}` - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); - } - - /** - * Retrieves a specific version of the schema registered under this subject. - * Get schema by version - */ - async getSchemaByVersion( - requestParameters: GetSchemaByVersionRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSchemaByVersionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. - * Get schema string by version - */ - async getSchemaOnly1Raw( - requestParameters: GetSchemaOnly1Request, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling getSchemaOnly1().', - ); - } - - if (requestParameters["version"] == null) { - throw new runtime.RequiredError( - "version", - 'Required parameter "version" was null or undefined when calling getSchemaOnly1().', - ); - } - - const queryParameters: any = {}; - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; + /** + * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. + * Delete schema version + */ + async deleteSchemaVersionRaw(requestParameters: DeleteSchemaVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling deleteSchemaVersion().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling deleteSchemaVersion().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['permanent'] != null) { + queryParameters['permanent'] = requestParameters['permanent']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}/versions/{version}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. + * Delete schema version + */ + async deleteSchemaVersion(requestParameters: DeleteSchemaVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteSchemaVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. + * Delete subject + */ + async deleteSubjectRaw(requestParameters: DeleteSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling deleteSubject().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['permanent'] != null) { + queryParameters['permanent'] = requestParameters['permanent']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. + * Delete subject + */ + async deleteSubject(requestParameters: DeleteSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.deleteSubjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the IDs of schemas that reference the specified schema. + * List schemas referencing a schema + */ + async getReferencedByRaw(requestParameters: GetReferencedByRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getReferencedBy().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling getReferencedBy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}/versions/{version}/referencedby`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves the IDs of schemas that reference the specified schema. + * List schemas referencing a schema + */ + async getReferencedBy(requestParameters: GetReferencedByRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getReferencedByRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a specific version of the schema registered under this subject. + * Get schema by version + */ + async getSchemaByVersionRaw(requestParameters: GetSchemaByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getSchemaByVersion().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling getSchemaByVersion().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}/versions/{version}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); + } + + /** + * Retrieves a specific version of the schema registered under this subject. + * Get schema by version + */ + async getSchemaByVersion(requestParameters: GetSchemaByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSchemaByVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. + * Get schema string by version + */ + async getSchemaOnly1Raw(requestParameters: GetSchemaOnly1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling getSchemaOnly1().' + ); + } + + if (requestParameters['version'] == null) { + throw new runtime.RequiredError( + 'version', + 'Required parameter "version" was null or undefined when calling getSchemaOnly1().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}/versions/{version}/schema`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. + * Get schema string by version + */ + async getSchemaOnly1(requestParameters: GetSchemaOnly1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getSchemaOnly1Raw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of registered subjects matching specified parameters. + * List subjects + */ + async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + if (requestParameters['subjectPrefix'] != null) { + queryParameters['subjectPrefix'] = requestParameters['subjectPrefix']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves a list of registered subjects matching specified parameters. + * List subjects + */ + async list(requestParameters: ListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of versions registered under the specified subject. + * List versions under subject + */ + async listVersionsRaw(requestParameters: ListVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling listVersions().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}/versions`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves a list of versions registered under the specified subject. + * List versions under subject + */ + async listVersions(requestParameters: ListVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.listVersionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. + * Lookup schema under subject + */ + async lookUpSchemaUnderSubjectRaw(requestParameters: LookUpSchemaUnderSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling lookUpSchemaUnderSubject().' + ); + } + + if (requestParameters['RegisterSchemaRequest'] == null) { + throw new runtime.RequiredError( + 'RegisterSchemaRequest', + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling lookUpSchemaUnderSubject().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['normalize'] != null) { + queryParameters['normalize'] = requestParameters['normalize']; + } + + if (requestParameters['deleted'] != null) { + queryParameters['deleted'] = requestParameters['deleted']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); + } + + /** + * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. + * Lookup schema under subject + */ + async lookUpSchemaUnderSubject(requestParameters: LookUpSchemaUnderSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.lookUpSchemaUnderSubjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. + * Register schema under a subject + */ + async registerRaw(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['subject'] == null) { + throw new runtime.RequiredError( + 'subject', + 'Required parameter "subject" was null or undefined when calling register().' + ); + } + + if (requestParameters['RegisterSchemaRequest'] == null) { + throw new runtime.RequiredError( + 'RegisterSchemaRequest', + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling register().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['normalize'] != null) { + queryParameters['normalize'] = requestParameters['normalize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); + } + + if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { + headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request({ + path: `/subjects/{subject}/versions`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => RegisterSchemaResponseFromJSON(jsonValue)); + } + + /** + * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. + * Register schema under a subject + */ + async register(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.registerRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}/versions/{version}/schema` - .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) - .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. - * Get schema string by version - */ - async getSchemaOnly1( - requestParameters: GetSchemaOnly1Request, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.getSchemaOnly1Raw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a list of registered subjects matching specified parameters. - * List subjects - */ - async listRaw( - requestParameters: ListRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - const queryParameters: any = {}; - - if (requestParameters["subjectPrefix"] != null) { - queryParameters["subjectPrefix"] = requestParameters["subjectPrefix"]; - } - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves a list of registered subjects matching specified parameters. - * List subjects - */ - async list( - requestParameters: ListRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.listRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a list of versions registered under the specified subject. - * List versions under subject - */ - async listVersionsRaw( - requestParameters: ListVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise>> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling listVersions().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}/versions`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves a list of versions registered under the specified subject. - * List versions under subject - */ - async listVersions( - requestParameters: ListVersionsRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const response = await this.listVersionsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. - * Lookup schema under subject - */ - async lookUpSchemaUnderSubjectRaw( - requestParameters: LookUpSchemaUnderSubjectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling lookUpSchemaUnderSubject().', - ); - } - - if (requestParameters["RegisterSchemaRequest"] == null) { - throw new runtime.RequiredError( - "RegisterSchemaRequest", - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling lookUpSchemaUnderSubject().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["normalize"] != null) { - queryParameters["normalize"] = requestParameters["normalize"]; - } - - if (requestParameters["deleted"] != null) { - queryParameters["deleted"] = requestParameters["deleted"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); - } - - /** - * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. - * Lookup schema under subject - */ - async lookUpSchemaUnderSubject( - requestParameters: LookUpSchemaUnderSubjectRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.lookUpSchemaUnderSubjectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. - * Register schema under a subject - */ - async registerRaw( - requestParameters: RegisterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["subject"] == null) { - throw new runtime.RequiredError( - "subject", - 'Required parameter "subject" was null or undefined when calling register().', - ); - } - - if (requestParameters["RegisterSchemaRequest"] == null) { - throw new runtime.RequiredError( - "RegisterSchemaRequest", - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling register().', - ); - } - - const queryParameters: any = {}; - - if (requestParameters["normalize"] != null) { - queryParameters["normalize"] = requestParameters["normalize"]; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken( - "external-access-token", - [], - ); - } - - if ( - this.configuration && - (this.configuration.username !== undefined || this.configuration.password !== undefined) - ) { - headerParameters["Authorization"] = - "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request( - { - path: `/subjects/{subject}/versions`.replace( - `{${"subject"}}`, - encodeURIComponent(String(requestParameters["subject"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - RegisterSchemaResponseFromJSON(jsonValue), - ); - } - - /** - * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. - * Register schema under a subject - */ - async register( - requestParameters: RegisterRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.registerRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/schemaRegistryRest/apis/index.ts b/src/clients/schemaRegistryRest/apis/index.ts index 177817e069..4b8313e148 100644 --- a/src/clients/schemaRegistryRest/apis/index.ts +++ b/src/clients/schemaRegistryRest/apis/index.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./CompatibilityV1Api"; -export * from "./ConfigV1Api"; -export * from "./ContextsV1Api"; -export * from "./DataEncryptionKeysV1Api"; -export * from "./ExportersV1Api"; -export * from "./KeyEncryptionKeysV1Api"; -export * from "./ModesV1Api"; -export * from "./SchemasV1Api"; -export * from "./SubjectsV1Api"; +export * from './CompatibilityV1Api'; +export * from './ConfigV1Api'; +export * from './ContextsV1Api'; +export * from './DataEncryptionKeysV1Api'; +export * from './ExportersV1Api'; +export * from './KeyEncryptionKeysV1Api'; +export * from './ModesV1Api'; +export * from './SchemasV1Api'; +export * from './SubjectsV1Api'; diff --git a/src/clients/schemaRegistryRest/index.ts b/src/clients/schemaRegistryRest/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/schemaRegistryRest/index.ts +++ b/src/clients/schemaRegistryRest/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/schemaRegistryRest/models/ClusterConfig.ts b/src/clients/schemaRegistryRest/models/ClusterConfig.ts index 901f277071..4d477f79af 100644 --- a/src/clients/schemaRegistryRest/models/ClusterConfig.ts +++ b/src/clients/schemaRegistryRest/models/ClusterConfig.ts @@ -5,69 +5,69 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Cluster Config * @export * @interface ClusterConfig */ export interface ClusterConfig { - /** - * Maximum number of registered schemas allowed - * @type {number} - * @memberof ClusterConfig - */ - maxSchemas?: number; - /** - * Maximum number of allowed requests per second - * @type {number} - * @memberof ClusterConfig - */ - maxRequestsPerSec?: number; + /** + * Maximum number of registered schemas allowed + * @type {number} + * @memberof ClusterConfig + */ + maxSchemas?: number; + /** + * Maximum number of allowed requests per second + * @type {number} + * @memberof ClusterConfig + */ + maxRequestsPerSec?: number; } /** * Check if a given object implements the ClusterConfig interface. */ export function instanceOfClusterConfig(value: object): value is ClusterConfig { - return true; + return true; } export function ClusterConfigFromJSON(json: any): ClusterConfig { - return ClusterConfigFromJSONTyped(json, false); + return ClusterConfigFromJSONTyped(json, false); } export function ClusterConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterConfig { - if (json == null) { - return json; - } - return { - maxSchemas: json["maxSchemas"] == null ? undefined : json["maxSchemas"], - maxRequestsPerSec: json["maxRequestsPerSec"] == null ? undefined : json["maxRequestsPerSec"], - }; + if (json == null) { + return json; + } + return { + + 'maxSchemas': json['maxSchemas'] == null ? undefined : json['maxSchemas'], + 'maxRequestsPerSec': json['maxRequestsPerSec'] == null ? undefined : json['maxRequestsPerSec'], + }; } export function ClusterConfigToJSON(json: any): ClusterConfig { - return ClusterConfigToJSONTyped(json, false); + return ClusterConfigToJSONTyped(json, false); } -export function ClusterConfigToJSONTyped( - value?: ClusterConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ClusterConfigToJSONTyped(value?: ClusterConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - maxSchemas: value["maxSchemas"], - maxRequestsPerSec: value["maxRequestsPerSec"], - }; + return { + + 'maxSchemas': value['maxSchemas'], + 'maxRequestsPerSec': value['maxRequestsPerSec'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts b/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts index f53eb5417a..78736df246 100644 --- a/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts +++ b/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts @@ -5,74 +5,69 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Compatibility check response * @export * @interface CompatibilityCheckResponse */ export interface CompatibilityCheckResponse { - /** - * Whether the compared schemas are compatible - * @type {boolean} - * @memberof CompatibilityCheckResponse - */ - is_compatible?: boolean; - /** - * Error messages - * @type {Array} - * @memberof CompatibilityCheckResponse - */ - messages?: Array; + /** + * Whether the compared schemas are compatible + * @type {boolean} + * @memberof CompatibilityCheckResponse + */ + is_compatible?: boolean; + /** + * Error messages + * @type {Array} + * @memberof CompatibilityCheckResponse + */ + messages?: Array; } /** * Check if a given object implements the CompatibilityCheckResponse interface. */ -export function instanceOfCompatibilityCheckResponse( - value: object, -): value is CompatibilityCheckResponse { - return true; +export function instanceOfCompatibilityCheckResponse(value: object): value is CompatibilityCheckResponse { + return true; } export function CompatibilityCheckResponseFromJSON(json: any): CompatibilityCheckResponse { - return CompatibilityCheckResponseFromJSONTyped(json, false); + return CompatibilityCheckResponseFromJSONTyped(json, false); } -export function CompatibilityCheckResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CompatibilityCheckResponse { - if (json == null) { - return json; - } - return { - is_compatible: json["is_compatible"] == null ? undefined : json["is_compatible"], - messages: json["messages"] == null ? undefined : json["messages"], - }; +export function CompatibilityCheckResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompatibilityCheckResponse { + if (json == null) { + return json; + } + return { + + 'is_compatible': json['is_compatible'] == null ? undefined : json['is_compatible'], + 'messages': json['messages'] == null ? undefined : json['messages'], + }; } export function CompatibilityCheckResponseToJSON(json: any): CompatibilityCheckResponse { - return CompatibilityCheckResponseToJSONTyped(json, false); + return CompatibilityCheckResponseToJSONTyped(json, false); } -export function CompatibilityCheckResponseToJSONTyped( - value?: CompatibilityCheckResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CompatibilityCheckResponseToJSONTyped(value?: CompatibilityCheckResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - is_compatible: value["is_compatible"], - messages: value["messages"], - }; + return { + + 'is_compatible': value['is_compatible'], + 'messages': value['messages'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/Config.ts b/src/clients/schemaRegistryRest/models/Config.ts index c1633c1af4..5f96c707c6 100644 --- a/src/clients/schemaRegistryRest/models/Config.ts +++ b/src/clients/schemaRegistryRest/models/Config.ts @@ -5,42 +5,42 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigDefaultMetadata } from "./ConfigDefaultMetadata"; +import { mapValues } from '../runtime'; +import type { ConfigDefaultMetadata } from './ConfigDefaultMetadata'; import { - ConfigDefaultMetadataFromJSON, - ConfigDefaultMetadataFromJSONTyped, - ConfigDefaultMetadataToJSON, - ConfigDefaultMetadataToJSONTyped, -} from "./ConfigDefaultMetadata"; -import type { ConfigOverrideMetadata } from "./ConfigOverrideMetadata"; + ConfigDefaultMetadataFromJSON, + ConfigDefaultMetadataFromJSONTyped, + ConfigDefaultMetadataToJSON, + ConfigDefaultMetadataToJSONTyped, +} from './ConfigDefaultMetadata'; +import type { ConfigOverrideMetadata } from './ConfigOverrideMetadata'; import { - ConfigOverrideMetadataFromJSON, - ConfigOverrideMetadataFromJSONTyped, - ConfigOverrideMetadataToJSON, - ConfigOverrideMetadataToJSONTyped, -} from "./ConfigOverrideMetadata"; -import type { ConfigDefaultRuleSet } from "./ConfigDefaultRuleSet"; + ConfigOverrideMetadataFromJSON, + ConfigOverrideMetadataFromJSONTyped, + ConfigOverrideMetadataToJSON, + ConfigOverrideMetadataToJSONTyped, +} from './ConfigOverrideMetadata'; +import type { ConfigDefaultRuleSet } from './ConfigDefaultRuleSet'; import { - ConfigDefaultRuleSetFromJSON, - ConfigDefaultRuleSetFromJSONTyped, - ConfigDefaultRuleSetToJSON, - ConfigDefaultRuleSetToJSONTyped, -} from "./ConfigDefaultRuleSet"; -import type { ConfigOverrideRuleSet } from "./ConfigOverrideRuleSet"; + ConfigDefaultRuleSetFromJSON, + ConfigDefaultRuleSetFromJSONTyped, + ConfigDefaultRuleSetToJSON, + ConfigDefaultRuleSetToJSONTyped, +} from './ConfigDefaultRuleSet'; +import type { ConfigOverrideRuleSet } from './ConfigOverrideRuleSet'; import { - ConfigOverrideRuleSetFromJSON, - ConfigOverrideRuleSetFromJSONTyped, - ConfigOverrideRuleSetToJSON, - ConfigOverrideRuleSetToJSONTyped, -} from "./ConfigOverrideRuleSet"; + ConfigOverrideRuleSetFromJSON, + ConfigOverrideRuleSetFromJSONTyped, + ConfigOverrideRuleSetToJSON, + ConfigOverrideRuleSetToJSONTyped, +} from './ConfigOverrideRuleSet'; /** * Config @@ -48,120 +48,108 @@ import { * @interface Config */ export interface Config { - /** - * If alias is specified, then this subject is an alias for the subject - * named by the alias. That means that any reference to this subject - * will be replaced by the alias. - * @type {string} - * @memberof Config - */ - alias?: string; - /** - * If true, then schemas are automatically normalized when registered or - * when passed during lookups. This means that clients do not have to - * pass the "normalize" query parameter to have normalization occur. - * @type {boolean} - * @memberof Config - */ - normalize?: boolean; - /** - * Compatibility Level - * @type {string} - * @memberof Config - */ - compatibilityLevel?: string; - /** - * Only schemas that belong to the same compatibility group will be - * checked for compatibility. - * @type {string} - * @memberof Config - */ - compatibilityGroup?: string; - /** - * - * @type {ConfigDefaultMetadata} - * @memberof Config - */ - defaultMetadata?: ConfigDefaultMetadata; - /** - * - * @type {ConfigOverrideMetadata} - * @memberof Config - */ - overrideMetadata?: ConfigOverrideMetadata; - /** - * - * @type {ConfigDefaultRuleSet} - * @memberof Config - */ - defaultRuleSet?: ConfigDefaultRuleSet; - /** - * - * @type {ConfigOverrideRuleSet} - * @memberof Config - */ - overrideRuleSet?: ConfigOverrideRuleSet; + /** + * If alias is specified, then this subject is an alias for the subject + * named by the alias. That means that any reference to this subject + * will be replaced by the alias. + * @type {string} + * @memberof Config + */ + alias?: string; + /** + * If true, then schemas are automatically normalized when registered or + * when passed during lookups. This means that clients do not have to + * pass the "normalize" query parameter to have normalization occur. + * @type {boolean} + * @memberof Config + */ + normalize?: boolean; + /** + * Compatibility Level + * @type {string} + * @memberof Config + */ + compatibilityLevel?: string; + /** + * Only schemas that belong to the same compatibility group will be + * checked for compatibility. + * @type {string} + * @memberof Config + */ + compatibilityGroup?: string; + /** + * + * @type {ConfigDefaultMetadata} + * @memberof Config + */ + defaultMetadata?: ConfigDefaultMetadata; + /** + * + * @type {ConfigOverrideMetadata} + * @memberof Config + */ + overrideMetadata?: ConfigOverrideMetadata; + /** + * + * @type {ConfigDefaultRuleSet} + * @memberof Config + */ + defaultRuleSet?: ConfigDefaultRuleSet; + /** + * + * @type {ConfigOverrideRuleSet} + * @memberof Config + */ + overrideRuleSet?: ConfigOverrideRuleSet; } /** * Check if a given object implements the Config interface. */ export function instanceOfConfig(value: object): value is Config { - return true; + return true; } export function ConfigFromJSON(json: any): Config { - return ConfigFromJSONTyped(json, false); + return ConfigFromJSONTyped(json, false); } export function ConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): Config { - if (json == null) { - return json; - } - return { - alias: json["alias"] == null ? undefined : json["alias"], - normalize: json["normalize"] == null ? undefined : json["normalize"], - compatibilityLevel: json["compatibilityLevel"] == null ? undefined : json["compatibilityLevel"], - compatibilityGroup: json["compatibilityGroup"] == null ? undefined : json["compatibilityGroup"], - defaultMetadata: - json["defaultMetadata"] == null - ? undefined - : ConfigDefaultMetadataFromJSON(json["defaultMetadata"]), - overrideMetadata: - json["overrideMetadata"] == null - ? undefined - : ConfigOverrideMetadataFromJSON(json["overrideMetadata"]), - defaultRuleSet: - json["defaultRuleSet"] == null - ? undefined - : ConfigDefaultRuleSetFromJSON(json["defaultRuleSet"]), - overrideRuleSet: - json["overrideRuleSet"] == null - ? undefined - : ConfigOverrideRuleSetFromJSON(json["overrideRuleSet"]), - }; + if (json == null) { + return json; + } + return { + + 'alias': json['alias'] == null ? undefined : json['alias'], + 'normalize': json['normalize'] == null ? undefined : json['normalize'], + 'compatibilityLevel': json['compatibilityLevel'] == null ? undefined : json['compatibilityLevel'], + 'compatibilityGroup': json['compatibilityGroup'] == null ? undefined : json['compatibilityGroup'], + 'defaultMetadata': json['defaultMetadata'] == null ? undefined : ConfigDefaultMetadataFromJSON(json['defaultMetadata']), + 'overrideMetadata': json['overrideMetadata'] == null ? undefined : ConfigOverrideMetadataFromJSON(json['overrideMetadata']), + 'defaultRuleSet': json['defaultRuleSet'] == null ? undefined : ConfigDefaultRuleSetFromJSON(json['defaultRuleSet']), + 'overrideRuleSet': json['overrideRuleSet'] == null ? undefined : ConfigOverrideRuleSetFromJSON(json['overrideRuleSet']), + }; } export function ConfigToJSON(json: any): Config { - return ConfigToJSONTyped(json, false); + return ConfigToJSONTyped(json, false); } -export function ConfigToJSONTyped( - value?: Config | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigToJSONTyped(value?: Config | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - alias: value["alias"], - normalize: value["normalize"], - compatibilityLevel: value["compatibilityLevel"], - compatibilityGroup: value["compatibilityGroup"], - defaultMetadata: ConfigDefaultMetadataToJSON(value["defaultMetadata"]), - overrideMetadata: ConfigOverrideMetadataToJSON(value["overrideMetadata"]), - defaultRuleSet: ConfigDefaultRuleSetToJSON(value["defaultRuleSet"]), - overrideRuleSet: ConfigOverrideRuleSetToJSON(value["overrideRuleSet"]), - }; + return { + + 'alias': value['alias'], + 'normalize': value['normalize'], + 'compatibilityLevel': value['compatibilityLevel'], + 'compatibilityGroup': value['compatibilityGroup'], + 'defaultMetadata': ConfigDefaultMetadataToJSON(value['defaultMetadata']), + 'overrideMetadata': ConfigOverrideMetadataToJSON(value['overrideMetadata']), + 'defaultRuleSet': ConfigDefaultRuleSetToJSON(value['defaultRuleSet']), + 'overrideRuleSet': ConfigOverrideRuleSetToJSON(value['overrideRuleSet']), + }; } + diff --git a/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts b/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts index 57da683e95..4bccf18541 100644 --- a/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts +++ b/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Default value for the metadata to be used during schema registration. * @export * @interface ConfigDefaultMetadata */ export interface ConfigDefaultMetadata { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigDefaultMetadata - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigDefaultMetadata + */ + properties?: object; } /** * Check if a given object implements the ConfigDefaultMetadata interface. */ export function instanceOfConfigDefaultMetadata(value: object): value is ConfigDefaultMetadata { - return true; + return true; } export function ConfigDefaultMetadataFromJSON(json: any): ConfigDefaultMetadata { - return ConfigDefaultMetadataFromJSONTyped(json, false); + return ConfigDefaultMetadataFromJSONTyped(json, false); } -export function ConfigDefaultMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigDefaultMetadata { - if (json == null) { - return json; - } - return { - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function ConfigDefaultMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigDefaultMetadata { + if (json == null) { + return json; + } + return { + + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } export function ConfigDefaultMetadataToJSON(json: any): ConfigDefaultMetadata { - return ConfigDefaultMetadataToJSONTyped(json, false); + return ConfigDefaultMetadataToJSONTyped(json, false); } -export function ConfigDefaultMetadataToJSONTyped( - value?: ConfigDefaultMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigDefaultMetadataToJSONTyped(value?: ConfigDefaultMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - properties: value["properties"], - }; + return { + + 'properties': value['properties'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts b/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts index 550902816e..cb0883d57e 100644 --- a/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts +++ b/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Default value for the ruleSet to be used during schema registration. * @export * @interface ConfigDefaultRuleSet */ export interface ConfigDefaultRuleSet { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigDefaultRuleSet - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigDefaultRuleSet + */ + properties?: object; } /** * Check if a given object implements the ConfigDefaultRuleSet interface. */ export function instanceOfConfigDefaultRuleSet(value: object): value is ConfigDefaultRuleSet { - return true; + return true; } export function ConfigDefaultRuleSetFromJSON(json: any): ConfigDefaultRuleSet { - return ConfigDefaultRuleSetFromJSONTyped(json, false); + return ConfigDefaultRuleSetFromJSONTyped(json, false); } -export function ConfigDefaultRuleSetFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigDefaultRuleSet { - if (json == null) { - return json; - } - return { - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function ConfigDefaultRuleSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigDefaultRuleSet { + if (json == null) { + return json; + } + return { + + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } export function ConfigDefaultRuleSetToJSON(json: any): ConfigDefaultRuleSet { - return ConfigDefaultRuleSetToJSONTyped(json, false); + return ConfigDefaultRuleSetToJSONTyped(json, false); } -export function ConfigDefaultRuleSetToJSONTyped( - value?: ConfigDefaultRuleSet | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigDefaultRuleSetToJSONTyped(value?: ConfigDefaultRuleSet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - properties: value["properties"], - }; + return { + + 'properties': value['properties'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts b/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts index 41af20371c..f3e1349231 100644 --- a/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts +++ b/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Override value for the metadata to be used during schema registration. * @export * @interface ConfigOverrideMetadata */ export interface ConfigOverrideMetadata { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigOverrideMetadata - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigOverrideMetadata + */ + properties?: object; } /** * Check if a given object implements the ConfigOverrideMetadata interface. */ export function instanceOfConfigOverrideMetadata(value: object): value is ConfigOverrideMetadata { - return true; + return true; } export function ConfigOverrideMetadataFromJSON(json: any): ConfigOverrideMetadata { - return ConfigOverrideMetadataFromJSONTyped(json, false); + return ConfigOverrideMetadataFromJSONTyped(json, false); } -export function ConfigOverrideMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigOverrideMetadata { - if (json == null) { - return json; - } - return { - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function ConfigOverrideMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigOverrideMetadata { + if (json == null) { + return json; + } + return { + + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } export function ConfigOverrideMetadataToJSON(json: any): ConfigOverrideMetadata { - return ConfigOverrideMetadataToJSONTyped(json, false); + return ConfigOverrideMetadataToJSONTyped(json, false); } -export function ConfigOverrideMetadataToJSONTyped( - value?: ConfigOverrideMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigOverrideMetadataToJSONTyped(value?: ConfigOverrideMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - properties: value["properties"], - }; + return { + + 'properties': value['properties'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts b/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts index 873294fb69..ecb5f0e095 100644 --- a/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts +++ b/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Override value for the ruleSet to be used during schema registration. * @export * @interface ConfigOverrideRuleSet */ export interface ConfigOverrideRuleSet { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigOverrideRuleSet - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigOverrideRuleSet + */ + properties?: object; } /** * Check if a given object implements the ConfigOverrideRuleSet interface. */ export function instanceOfConfigOverrideRuleSet(value: object): value is ConfigOverrideRuleSet { - return true; + return true; } export function ConfigOverrideRuleSetFromJSON(json: any): ConfigOverrideRuleSet { - return ConfigOverrideRuleSetFromJSONTyped(json, false); + return ConfigOverrideRuleSetFromJSONTyped(json, false); } -export function ConfigOverrideRuleSetFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigOverrideRuleSet { - if (json == null) { - return json; - } - return { - properties: json["properties"] == null ? undefined : json["properties"], - }; +export function ConfigOverrideRuleSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigOverrideRuleSet { + if (json == null) { + return json; + } + return { + + 'properties': json['properties'] == null ? undefined : json['properties'], + }; } export function ConfigOverrideRuleSetToJSON(json: any): ConfigOverrideRuleSet { - return ConfigOverrideRuleSetToJSONTyped(json, false); + return ConfigOverrideRuleSetToJSONTyped(json, false); } -export function ConfigOverrideRuleSetToJSONTyped( - value?: ConfigOverrideRuleSet | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigOverrideRuleSetToJSONTyped(value?: ConfigOverrideRuleSet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - properties: value["properties"], - }; + return { + + 'properties': value['properties'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts b/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts index ddac731a9c..8e444c9da6 100644 --- a/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts +++ b/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts @@ -5,42 +5,42 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConfigDefaultMetadata } from "./ConfigDefaultMetadata"; +import { mapValues } from '../runtime'; +import type { ConfigDefaultMetadata } from './ConfigDefaultMetadata'; import { - ConfigDefaultMetadataFromJSON, - ConfigDefaultMetadataFromJSONTyped, - ConfigDefaultMetadataToJSON, - ConfigDefaultMetadataToJSONTyped, -} from "./ConfigDefaultMetadata"; -import type { ConfigOverrideMetadata } from "./ConfigOverrideMetadata"; + ConfigDefaultMetadataFromJSON, + ConfigDefaultMetadataFromJSONTyped, + ConfigDefaultMetadataToJSON, + ConfigDefaultMetadataToJSONTyped, +} from './ConfigDefaultMetadata'; +import type { ConfigOverrideMetadata } from './ConfigOverrideMetadata'; import { - ConfigOverrideMetadataFromJSON, - ConfigOverrideMetadataFromJSONTyped, - ConfigOverrideMetadataToJSON, - ConfigOverrideMetadataToJSONTyped, -} from "./ConfigOverrideMetadata"; -import type { ConfigDefaultRuleSet } from "./ConfigDefaultRuleSet"; + ConfigOverrideMetadataFromJSON, + ConfigOverrideMetadataFromJSONTyped, + ConfigOverrideMetadataToJSON, + ConfigOverrideMetadataToJSONTyped, +} from './ConfigOverrideMetadata'; +import type { ConfigDefaultRuleSet } from './ConfigDefaultRuleSet'; import { - ConfigDefaultRuleSetFromJSON, - ConfigDefaultRuleSetFromJSONTyped, - ConfigDefaultRuleSetToJSON, - ConfigDefaultRuleSetToJSONTyped, -} from "./ConfigDefaultRuleSet"; -import type { ConfigOverrideRuleSet } from "./ConfigOverrideRuleSet"; + ConfigDefaultRuleSetFromJSON, + ConfigDefaultRuleSetFromJSONTyped, + ConfigDefaultRuleSetToJSON, + ConfigDefaultRuleSetToJSONTyped, +} from './ConfigDefaultRuleSet'; +import type { ConfigOverrideRuleSet } from './ConfigOverrideRuleSet'; import { - ConfigOverrideRuleSetFromJSON, - ConfigOverrideRuleSetFromJSONTyped, - ConfigOverrideRuleSetToJSON, - ConfigOverrideRuleSetToJSONTyped, -} from "./ConfigOverrideRuleSet"; + ConfigOverrideRuleSetFromJSON, + ConfigOverrideRuleSetFromJSONTyped, + ConfigOverrideRuleSetToJSON, + ConfigOverrideRuleSetToJSONTyped, +} from './ConfigOverrideRuleSet'; /** * Config update request @@ -48,123 +48,108 @@ import { * @interface ConfigUpdateRequest */ export interface ConfigUpdateRequest { - /** - * If alias is specified, then this subject is an alias for the subject - * named by the alias. That means that any reference to this subject - * will be replaced by the alias. - * @type {string} - * @memberof ConfigUpdateRequest - */ - alias?: string; - /** - * If true, then schemas are automatically normalized when registered - * or when passed during lookups. This means that clients do not have - * to pass the "normalize" query parameter to have normalization occur. - * @type {boolean} - * @memberof ConfigUpdateRequest - */ - normalize?: boolean; - /** - * Compatibility Level - * @type {string} - * @memberof ConfigUpdateRequest - */ - compatibility?: string; - /** - * Only schemas that belong to the same compatibility group will be - * checked for compatibility. - * @type {string} - * @memberof ConfigUpdateRequest - */ - compatibilityGroup?: string; - /** - * - * @type {ConfigDefaultMetadata} - * @memberof ConfigUpdateRequest - */ - defaultMetadata?: ConfigDefaultMetadata; - /** - * - * @type {ConfigOverrideMetadata} - * @memberof ConfigUpdateRequest - */ - overrideMetadata?: ConfigOverrideMetadata; - /** - * - * @type {ConfigDefaultRuleSet} - * @memberof ConfigUpdateRequest - */ - defaultRuleSet?: ConfigDefaultRuleSet; - /** - * - * @type {ConfigOverrideRuleSet} - * @memberof ConfigUpdateRequest - */ - overrideRuleSet?: ConfigOverrideRuleSet; + /** + * If alias is specified, then this subject is an alias for the subject + * named by the alias. That means that any reference to this subject + * will be replaced by the alias. + * @type {string} + * @memberof ConfigUpdateRequest + */ + alias?: string; + /** + * If true, then schemas are automatically normalized when registered + * or when passed during lookups. This means that clients do not have + * to pass the "normalize" query parameter to have normalization occur. + * @type {boolean} + * @memberof ConfigUpdateRequest + */ + normalize?: boolean; + /** + * Compatibility Level + * @type {string} + * @memberof ConfigUpdateRequest + */ + compatibility?: string; + /** + * Only schemas that belong to the same compatibility group will be + * checked for compatibility. + * @type {string} + * @memberof ConfigUpdateRequest + */ + compatibilityGroup?: string; + /** + * + * @type {ConfigDefaultMetadata} + * @memberof ConfigUpdateRequest + */ + defaultMetadata?: ConfigDefaultMetadata; + /** + * + * @type {ConfigOverrideMetadata} + * @memberof ConfigUpdateRequest + */ + overrideMetadata?: ConfigOverrideMetadata; + /** + * + * @type {ConfigDefaultRuleSet} + * @memberof ConfigUpdateRequest + */ + defaultRuleSet?: ConfigDefaultRuleSet; + /** + * + * @type {ConfigOverrideRuleSet} + * @memberof ConfigUpdateRequest + */ + overrideRuleSet?: ConfigOverrideRuleSet; } /** * Check if a given object implements the ConfigUpdateRequest interface. */ export function instanceOfConfigUpdateRequest(value: object): value is ConfigUpdateRequest { - return true; + return true; } export function ConfigUpdateRequestFromJSON(json: any): ConfigUpdateRequest { - return ConfigUpdateRequestFromJSONTyped(json, false); + return ConfigUpdateRequestFromJSONTyped(json, false); } -export function ConfigUpdateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConfigUpdateRequest { - if (json == null) { - return json; - } - return { - alias: json["alias"] == null ? undefined : json["alias"], - normalize: json["normalize"] == null ? undefined : json["normalize"], - compatibility: json["compatibility"] == null ? undefined : json["compatibility"], - compatibilityGroup: json["compatibilityGroup"] == null ? undefined : json["compatibilityGroup"], - defaultMetadata: - json["defaultMetadata"] == null - ? undefined - : ConfigDefaultMetadataFromJSON(json["defaultMetadata"]), - overrideMetadata: - json["overrideMetadata"] == null - ? undefined - : ConfigOverrideMetadataFromJSON(json["overrideMetadata"]), - defaultRuleSet: - json["defaultRuleSet"] == null - ? undefined - : ConfigDefaultRuleSetFromJSON(json["defaultRuleSet"]), - overrideRuleSet: - json["overrideRuleSet"] == null - ? undefined - : ConfigOverrideRuleSetFromJSON(json["overrideRuleSet"]), - }; +export function ConfigUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigUpdateRequest { + if (json == null) { + return json; + } + return { + + 'alias': json['alias'] == null ? undefined : json['alias'], + 'normalize': json['normalize'] == null ? undefined : json['normalize'], + 'compatibility': json['compatibility'] == null ? undefined : json['compatibility'], + 'compatibilityGroup': json['compatibilityGroup'] == null ? undefined : json['compatibilityGroup'], + 'defaultMetadata': json['defaultMetadata'] == null ? undefined : ConfigDefaultMetadataFromJSON(json['defaultMetadata']), + 'overrideMetadata': json['overrideMetadata'] == null ? undefined : ConfigOverrideMetadataFromJSON(json['overrideMetadata']), + 'defaultRuleSet': json['defaultRuleSet'] == null ? undefined : ConfigDefaultRuleSetFromJSON(json['defaultRuleSet']), + 'overrideRuleSet': json['overrideRuleSet'] == null ? undefined : ConfigOverrideRuleSetFromJSON(json['overrideRuleSet']), + }; } export function ConfigUpdateRequestToJSON(json: any): ConfigUpdateRequest { - return ConfigUpdateRequestToJSONTyped(json, false); + return ConfigUpdateRequestToJSONTyped(json, false); } -export function ConfigUpdateRequestToJSONTyped( - value?: ConfigUpdateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConfigUpdateRequestToJSONTyped(value?: ConfigUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - alias: value["alias"], - normalize: value["normalize"], - compatibility: value["compatibility"], - compatibilityGroup: value["compatibilityGroup"], - defaultMetadata: ConfigDefaultMetadataToJSON(value["defaultMetadata"]), - overrideMetadata: ConfigOverrideMetadataToJSON(value["overrideMetadata"]), - defaultRuleSet: ConfigDefaultRuleSetToJSON(value["defaultRuleSet"]), - overrideRuleSet: ConfigOverrideRuleSetToJSON(value["overrideRuleSet"]), - }; + return { + + 'alias': value['alias'], + 'normalize': value['normalize'], + 'compatibility': value['compatibility'], + 'compatibilityGroup': value['compatibilityGroup'], + 'defaultMetadata': ConfigDefaultMetadataToJSON(value['defaultMetadata']), + 'overrideMetadata': ConfigOverrideMetadataToJSON(value['overrideMetadata']), + 'defaultRuleSet': ConfigDefaultRuleSetToJSON(value['defaultRuleSet']), + 'overrideRuleSet': ConfigOverrideRuleSetToJSON(value['overrideRuleSet']), + }; } + diff --git a/src/clients/schemaRegistryRest/models/CreateDekRequest.ts b/src/clients/schemaRegistryRest/models/CreateDekRequest.ts index 9b6c974929..130c0ba9b5 100644 --- a/src/clients/schemaRegistryRest/models/CreateDekRequest.ts +++ b/src/clients/schemaRegistryRest/models/CreateDekRequest.ts @@ -5,107 +5,104 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CreateDekRequest */ export interface CreateDekRequest { - /** - * Subject of the dek - * @type {string} - * @memberof CreateDekRequest - */ - subject?: string; - /** - * Version of the dek - * @type {number} - * @memberof CreateDekRequest - */ - version?: number; - /** - * Algorithm of the dek - * @type {string} - * @memberof CreateDekRequest - */ - algorithm?: CreateDekRequestAlgorithmEnum; - /** - * Encrypted key material of the dek - * @type {string} - * @memberof CreateDekRequest - */ - encryptedKeyMaterial?: string; - /** - * Whether the dek is deleted - * @type {boolean} - * @memberof CreateDekRequest - */ - deleted?: boolean; + /** + * Subject of the dek + * @type {string} + * @memberof CreateDekRequest + */ + subject?: string; + /** + * Version of the dek + * @type {number} + * @memberof CreateDekRequest + */ + version?: number; + /** + * Algorithm of the dek + * @type {string} + * @memberof CreateDekRequest + */ + algorithm?: CreateDekRequestAlgorithmEnum; + /** + * Encrypted key material of the dek + * @type {string} + * @memberof CreateDekRequest + */ + encryptedKeyMaterial?: string; + /** + * Whether the dek is deleted + * @type {boolean} + * @memberof CreateDekRequest + */ + deleted?: boolean; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum CreateDekRequestAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } + /** * Check if a given object implements the CreateDekRequest interface. */ export function instanceOfCreateDekRequest(value: object): value is CreateDekRequest { - return true; + return true; } export function CreateDekRequestFromJSON(json: any): CreateDekRequest { - return CreateDekRequestFromJSONTyped(json, false); + return CreateDekRequestFromJSONTyped(json, false); } -export function CreateDekRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateDekRequest { - if (json == null) { - return json; - } - return { - subject: json["subject"] == null ? undefined : json["subject"], - version: json["version"] == null ? undefined : json["version"], - algorithm: json["algorithm"] == null ? undefined : json["algorithm"], - encryptedKeyMaterial: - json["encryptedKeyMaterial"] == null ? undefined : json["encryptedKeyMaterial"], - deleted: json["deleted"] == null ? undefined : json["deleted"], - }; +export function CreateDekRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDekRequest { + if (json == null) { + return json; + } + return { + + 'subject': json['subject'] == null ? undefined : json['subject'], + 'version': json['version'] == null ? undefined : json['version'], + 'algorithm': json['algorithm'] == null ? undefined : json['algorithm'], + 'encryptedKeyMaterial': json['encryptedKeyMaterial'] == null ? undefined : json['encryptedKeyMaterial'], + 'deleted': json['deleted'] == null ? undefined : json['deleted'], + }; } export function CreateDekRequestToJSON(json: any): CreateDekRequest { - return CreateDekRequestToJSONTyped(json, false); + return CreateDekRequestToJSONTyped(json, false); } -export function CreateDekRequestToJSONTyped( - value?: CreateDekRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateDekRequestToJSONTyped(value?: CreateDekRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - subject: value["subject"], - version: value["version"], - algorithm: value["algorithm"], - encryptedKeyMaterial: value["encryptedKeyMaterial"], - deleted: value["deleted"], - }; + return { + + 'subject': value['subject'], + 'version': value['version'], + 'algorithm': value['algorithm'], + 'encryptedKeyMaterial': value['encryptedKeyMaterial'], + 'deleted': value['deleted'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/CreateKekRequest.ts b/src/clients/schemaRegistryRest/models/CreateKekRequest.ts index 872db50a5a..8045899400 100644 --- a/src/clients/schemaRegistryRest/models/CreateKekRequest.ts +++ b/src/clients/schemaRegistryRest/models/CreateKekRequest.ts @@ -5,112 +5,109 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CreateKekRequest */ export interface CreateKekRequest { - /** - * Name of the kek - * @type {string} - * @memberof CreateKekRequest - */ - name?: string; - /** - * KMS type of the kek - * @type {string} - * @memberof CreateKekRequest - */ - kmsType?: string; - /** - * KMS key ID of the kek - * @type {string} - * @memberof CreateKekRequest - */ - kmsKeyId?: string; - /** - * Properties of the kek - * @type {{ [key: string]: string; }} - * @memberof CreateKekRequest - */ - kmsProps?: { [key: string]: string }; - /** - * Description of the kek - * @type {string} - * @memberof CreateKekRequest - */ - doc?: string; - /** - * Whether the kek is shared - * @type {boolean} - * @memberof CreateKekRequest - */ - shared?: boolean; - /** - * Whether the kek is deleted - * @type {boolean} - * @memberof CreateKekRequest - */ - deleted?: boolean; + /** + * Name of the kek + * @type {string} + * @memberof CreateKekRequest + */ + name?: string; + /** + * KMS type of the kek + * @type {string} + * @memberof CreateKekRequest + */ + kmsType?: string; + /** + * KMS key ID of the kek + * @type {string} + * @memberof CreateKekRequest + */ + kmsKeyId?: string; + /** + * Properties of the kek + * @type {{ [key: string]: string; }} + * @memberof CreateKekRequest + */ + kmsProps?: { [key: string]: string; }; + /** + * Description of the kek + * @type {string} + * @memberof CreateKekRequest + */ + doc?: string; + /** + * Whether the kek is shared + * @type {boolean} + * @memberof CreateKekRequest + */ + shared?: boolean; + /** + * Whether the kek is deleted + * @type {boolean} + * @memberof CreateKekRequest + */ + deleted?: boolean; } /** * Check if a given object implements the CreateKekRequest interface. */ export function instanceOfCreateKekRequest(value: object): value is CreateKekRequest { - return true; + return true; } export function CreateKekRequestFromJSON(json: any): CreateKekRequest { - return CreateKekRequestFromJSONTyped(json, false); + return CreateKekRequestFromJSONTyped(json, false); } -export function CreateKekRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CreateKekRequest { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - kmsType: json["kmsType"] == null ? undefined : json["kmsType"], - kmsKeyId: json["kmsKeyId"] == null ? undefined : json["kmsKeyId"], - kmsProps: json["kmsProps"] == null ? undefined : json["kmsProps"], - doc: json["doc"] == null ? undefined : json["doc"], - shared: json["shared"] == null ? undefined : json["shared"], - deleted: json["deleted"] == null ? undefined : json["deleted"], - }; +export function CreateKekRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateKekRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'kmsType': json['kmsType'] == null ? undefined : json['kmsType'], + 'kmsKeyId': json['kmsKeyId'] == null ? undefined : json['kmsKeyId'], + 'kmsProps': json['kmsProps'] == null ? undefined : json['kmsProps'], + 'doc': json['doc'] == null ? undefined : json['doc'], + 'shared': json['shared'] == null ? undefined : json['shared'], + 'deleted': json['deleted'] == null ? undefined : json['deleted'], + }; } export function CreateKekRequestToJSON(json: any): CreateKekRequest { - return CreateKekRequestToJSONTyped(json, false); + return CreateKekRequestToJSONTyped(json, false); } -export function CreateKekRequestToJSONTyped( - value?: CreateKekRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CreateKekRequestToJSONTyped(value?: CreateKekRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - kmsType: value["kmsType"], - kmsKeyId: value["kmsKeyId"], - kmsProps: value["kmsProps"], - doc: value["doc"], - shared: value["shared"], - deleted: value["deleted"], - }; + return { + + 'name': value['name'], + 'kmsType': value['kmsType'], + 'kmsKeyId': value['kmsKeyId'], + 'kmsProps': value['kmsProps'], + 'doc': value['doc'], + 'shared': value['shared'], + 'deleted': value['deleted'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/Dek.ts b/src/clients/schemaRegistryRest/models/Dek.ts index 7a4ffa4838..1195502ea3 100644 --- a/src/clients/schemaRegistryRest/models/Dek.ts +++ b/src/clients/schemaRegistryRest/models/Dek.ts @@ -5,125 +5,128 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface Dek */ export interface Dek { - /** - * Kek name of the dek - * @type {string} - * @memberof Dek - */ - kekName?: string; - /** - * Subject of the dek - * @type {string} - * @memberof Dek - */ - subject?: string; - /** - * Version of the dek - * @type {number} - * @memberof Dek - */ - version?: number; - /** - * Algorithm of the dek - * @type {string} - * @memberof Dek - */ - algorithm?: DekAlgorithmEnum; - /** - * Encrypted key material of the dek - * @type {string} - * @memberof Dek - */ - encryptedKeyMaterial?: string; - /** - * Raw key material of the dek - * @type {string} - * @memberof Dek - */ - keyMaterial?: string; - /** - * Timestamp of the dek - * @type {number} - * @memberof Dek - */ - ts?: number; - /** - * Whether the dek is deleted - * @type {boolean} - * @memberof Dek - */ - deleted?: boolean; + /** + * Kek name of the dek + * @type {string} + * @memberof Dek + */ + kekName?: string; + /** + * Subject of the dek + * @type {string} + * @memberof Dek + */ + subject?: string; + /** + * Version of the dek + * @type {number} + * @memberof Dek + */ + version?: number; + /** + * Algorithm of the dek + * @type {string} + * @memberof Dek + */ + algorithm?: DekAlgorithmEnum; + /** + * Encrypted key material of the dek + * @type {string} + * @memberof Dek + */ + encryptedKeyMaterial?: string; + /** + * Raw key material of the dek + * @type {string} + * @memberof Dek + */ + keyMaterial?: string; + /** + * Timestamp of the dek + * @type {number} + * @memberof Dek + */ + ts?: number; + /** + * Whether the dek is deleted + * @type {boolean} + * @memberof Dek + */ + deleted?: boolean; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum DekAlgorithmEnum { - Aes128Gcm = "AES128_GCM", - Aes256Gcm = "AES256_GCM", - Aes256Siv = "AES256_SIV", + Aes128Gcm = 'AES128_GCM', + Aes256Gcm = 'AES256_GCM', + Aes256Siv = 'AES256_SIV' } + /** * Check if a given object implements the Dek interface. */ export function instanceOfDek(value: object): value is Dek { - return true; + return true; } export function DekFromJSON(json: any): Dek { - return DekFromJSONTyped(json, false); + return DekFromJSONTyped(json, false); } export function DekFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dek { - if (json == null) { - return json; - } - return { - kekName: json["kekName"] == null ? undefined : json["kekName"], - subject: json["subject"] == null ? undefined : json["subject"], - version: json["version"] == null ? undefined : json["version"], - algorithm: json["algorithm"] == null ? undefined : json["algorithm"], - encryptedKeyMaterial: - json["encryptedKeyMaterial"] == null ? undefined : json["encryptedKeyMaterial"], - keyMaterial: json["keyMaterial"] == null ? undefined : json["keyMaterial"], - ts: json["ts"] == null ? undefined : json["ts"], - deleted: json["deleted"] == null ? undefined : json["deleted"], - }; + if (json == null) { + return json; + } + return { + + 'kekName': json['kekName'] == null ? undefined : json['kekName'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'version': json['version'] == null ? undefined : json['version'], + 'algorithm': json['algorithm'] == null ? undefined : json['algorithm'], + 'encryptedKeyMaterial': json['encryptedKeyMaterial'] == null ? undefined : json['encryptedKeyMaterial'], + 'keyMaterial': json['keyMaterial'] == null ? undefined : json['keyMaterial'], + 'ts': json['ts'] == null ? undefined : json['ts'], + 'deleted': json['deleted'] == null ? undefined : json['deleted'], + }; } export function DekToJSON(json: any): Dek { - return DekToJSONTyped(json, false); + return DekToJSONTyped(json, false); } export function DekToJSONTyped(value?: Dek | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - kekName: value["kekName"], - subject: value["subject"], - version: value["version"], - algorithm: value["algorithm"], - encryptedKeyMaterial: value["encryptedKeyMaterial"], - keyMaterial: value["keyMaterial"], - ts: value["ts"], - deleted: value["deleted"], - }; + return { + + 'kekName': value['kekName'], + 'subject': value['subject'], + 'version': value['version'], + 'algorithm': value['algorithm'], + 'encryptedKeyMaterial': value['encryptedKeyMaterial'], + 'keyMaterial': value['keyMaterial'], + 'ts': value['ts'], + 'deleted': value['deleted'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ErrorMessage.ts b/src/clients/schemaRegistryRest/models/ErrorMessage.ts index d92c08a1d1..261bc9afcc 100644 --- a/src/clients/schemaRegistryRest/models/ErrorMessage.ts +++ b/src/clients/schemaRegistryRest/models/ErrorMessage.ts @@ -5,69 +5,69 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Error message * @export * @interface ErrorMessage */ export interface ErrorMessage { - /** - * Error code - * @type {number} - * @memberof ErrorMessage - */ - error_code?: number; - /** - * Detailed error message - * @type {string} - * @memberof ErrorMessage - */ - message?: string; + /** + * Error code + * @type {number} + * @memberof ErrorMessage + */ + error_code?: number; + /** + * Detailed error message + * @type {string} + * @memberof ErrorMessage + */ + message?: string; } /** * Check if a given object implements the ErrorMessage interface. */ export function instanceOfErrorMessage(value: object): value is ErrorMessage { - return true; + return true; } export function ErrorMessageFromJSON(json: any): ErrorMessage { - return ErrorMessageFromJSONTyped(json, false); + return ErrorMessageFromJSONTyped(json, false); } export function ErrorMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorMessage { - if (json == null) { - return json; - } - return { - error_code: json["error_code"] == null ? undefined : json["error_code"], - message: json["message"] == null ? undefined : json["message"], - }; + if (json == null) { + return json; + } + return { + + 'error_code': json['error_code'] == null ? undefined : json['error_code'], + 'message': json['message'] == null ? undefined : json['message'], + }; } export function ErrorMessageToJSON(json: any): ErrorMessage { - return ErrorMessageToJSONTyped(json, false); + return ErrorMessageToJSONTyped(json, false); } -export function ErrorMessageToJSONTyped( - value?: ErrorMessage | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ErrorMessageToJSONTyped(value?: ErrorMessage | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - error_code: value["error_code"], - message: value["message"], - }; + return { + + 'error_code': value['error_code'], + 'message': value['message'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts b/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts index c404febdf3..99e3e4315c 100644 --- a/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts +++ b/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts @@ -5,85 +5,77 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The map containing exporter’s configurations * @export * @interface ExporterConfigResponse */ export interface ExporterConfigResponse { - /** - * Config SR URL - * @type {string} - * @memberof ExporterConfigResponse - */ - schema_registry_url?: string; - /** - * Config SR Auth - * @type {string} - * @memberof ExporterConfigResponse - */ - basic_auth_credentials_source?: string; - /** - * Config SR User Info - * @type {string} - * @memberof ExporterConfigResponse - */ - basic_auth_user_info?: string; + /** + * Config SR URL + * @type {string} + * @memberof ExporterConfigResponse + */ + schema_registry_url?: string; + /** + * Config SR Auth + * @type {string} + * @memberof ExporterConfigResponse + */ + basic_auth_credentials_source?: string; + /** + * Config SR User Info + * @type {string} + * @memberof ExporterConfigResponse + */ + basic_auth_user_info?: string; } /** * Check if a given object implements the ExporterConfigResponse interface. */ export function instanceOfExporterConfigResponse(value: object): value is ExporterConfigResponse { - return true; + return true; } export function ExporterConfigResponseFromJSON(json: any): ExporterConfigResponse { - return ExporterConfigResponseFromJSONTyped(json, false); + return ExporterConfigResponseFromJSONTyped(json, false); } -export function ExporterConfigResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExporterConfigResponse { - if (json == null) { - return json; - } - return { - schema_registry_url: - json["schema.registry.url"] == null ? undefined : json["schema.registry.url"], - basic_auth_credentials_source: - json["basic.auth.credentials.source"] == null - ? undefined - : json["basic.auth.credentials.source"], - basic_auth_user_info: - json["basic.auth.user.info"] == null ? undefined : json["basic.auth.user.info"], - }; +export function ExporterConfigResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterConfigResponse { + if (json == null) { + return json; + } + return { + + 'schema_registry_url': json['schema.registry.url'] == null ? undefined : json['schema.registry.url'], + 'basic_auth_credentials_source': json['basic.auth.credentials.source'] == null ? undefined : json['basic.auth.credentials.source'], + 'basic_auth_user_info': json['basic.auth.user.info'] == null ? undefined : json['basic.auth.user.info'], + }; } export function ExporterConfigResponseToJSON(json: any): ExporterConfigResponse { - return ExporterConfigResponseToJSONTyped(json, false); + return ExporterConfigResponseToJSONTyped(json, false); } -export function ExporterConfigResponseToJSONTyped( - value?: ExporterConfigResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExporterConfigResponseToJSONTyped(value?: ExporterConfigResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - "schema.registry.url": value["schema_registry_url"], - "basic.auth.credentials.source": value["basic_auth_credentials_source"], - "basic.auth.user.info": value["basic_auth_user_info"], - }; + return { + + 'schema.registry.url': value['schema_registry_url'], + 'basic.auth.credentials.source': value['basic_auth_credentials_source'], + 'basic.auth.user.info': value['basic_auth_user_info'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ExporterReference.ts b/src/clients/schemaRegistryRest/models/ExporterReference.ts index d14158ed3d..4761dd6133 100644 --- a/src/clients/schemaRegistryRest/models/ExporterReference.ts +++ b/src/clients/schemaRegistryRest/models/ExporterReference.ts @@ -5,105 +5,101 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * The format for a typical exporter object * @export * @interface ExporterReference */ export interface ExporterReference { - /** - * Name of the exporter - * @type {string} - * @memberof ExporterReference - */ - name?: string; - /** - * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) - * @type {string} - * @memberof ExporterReference - */ - contextType?: string; - /** - * Customized context of the exporter if contextType equals CUSTOM. - * @type {string} - * @memberof ExporterReference - */ - context?: string; - /** - * Name of each exporter subject - * @type {Array} - * @memberof ExporterReference - */ - subjects?: Array; - /** - * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. - * @type {string} - * @memberof ExporterReference - */ - subjectRenameFormat?: string; - /** - * The map containing exporter’s configurations - * @type {{ [key: string]: string; }} - * @memberof ExporterReference - */ - config?: { [key: string]: string }; + /** + * Name of the exporter + * @type {string} + * @memberof ExporterReference + */ + name?: string; + /** + * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) + * @type {string} + * @memberof ExporterReference + */ + contextType?: string; + /** + * Customized context of the exporter if contextType equals CUSTOM. + * @type {string} + * @memberof ExporterReference + */ + context?: string; + /** + * Name of each exporter subject + * @type {Array} + * @memberof ExporterReference + */ + subjects?: Array; + /** + * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. + * @type {string} + * @memberof ExporterReference + */ + subjectRenameFormat?: string; + /** + * The map containing exporter’s configurations + * @type {{ [key: string]: string; }} + * @memberof ExporterReference + */ + config?: { [key: string]: string; }; } /** * Check if a given object implements the ExporterReference interface. */ export function instanceOfExporterReference(value: object): value is ExporterReference { - return true; + return true; } export function ExporterReferenceFromJSON(json: any): ExporterReference { - return ExporterReferenceFromJSONTyped(json, false); + return ExporterReferenceFromJSONTyped(json, false); } -export function ExporterReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExporterReference { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - contextType: json["contextType"] == null ? undefined : json["contextType"], - context: json["context"] == null ? undefined : json["context"], - subjects: json["subjects"] == null ? undefined : json["subjects"], - subjectRenameFormat: - json["subjectRenameFormat"] == null ? undefined : json["subjectRenameFormat"], - config: json["config"] == null ? undefined : json["config"], - }; +export function ExporterReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterReference { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'contextType': json['contextType'] == null ? undefined : json['contextType'], + 'context': json['context'] == null ? undefined : json['context'], + 'subjects': json['subjects'] == null ? undefined : json['subjects'], + 'subjectRenameFormat': json['subjectRenameFormat'] == null ? undefined : json['subjectRenameFormat'], + 'config': json['config'] == null ? undefined : json['config'], + }; } export function ExporterReferenceToJSON(json: any): ExporterReference { - return ExporterReferenceToJSONTyped(json, false); + return ExporterReferenceToJSONTyped(json, false); } -export function ExporterReferenceToJSONTyped( - value?: ExporterReference | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExporterReferenceToJSONTyped(value?: ExporterReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - contextType: value["contextType"], - context: value["context"], - subjects: value["subjects"], - subjectRenameFormat: value["subjectRenameFormat"], - config: value["config"], - }; + return { + + 'name': value['name'], + 'contextType': value['contextType'], + 'context': value['context'], + 'subjects': value['subjects'], + 'subjectRenameFormat': value['subjectRenameFormat'], + 'config': value['config'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ExporterResponse.ts b/src/clients/schemaRegistryRest/models/ExporterResponse.ts index 71389a95d7..79ca83464b 100644 --- a/src/clients/schemaRegistryRest/models/ExporterResponse.ts +++ b/src/clients/schemaRegistryRest/models/ExporterResponse.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Exporter register response * @export * @interface ExporterResponse */ export interface ExporterResponse { - /** - * Name of the exporter - * @type {string} - * @memberof ExporterResponse - */ - name?: string; + /** + * Name of the exporter + * @type {string} + * @memberof ExporterResponse + */ + name?: string; } /** * Check if a given object implements the ExporterResponse interface. */ export function instanceOfExporterResponse(value: object): value is ExporterResponse { - return true; + return true; } export function ExporterResponseFromJSON(json: any): ExporterResponse { - return ExporterResponseFromJSONTyped(json, false); + return ExporterResponseFromJSONTyped(json, false); } -export function ExporterResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExporterResponse { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - }; +export function ExporterResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterResponse { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + }; } export function ExporterResponseToJSON(json: any): ExporterResponse { - return ExporterResponseToJSONTyped(json, false); + return ExporterResponseToJSONTyped(json, false); } -export function ExporterResponseToJSONTyped( - value?: ExporterResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExporterResponseToJSONTyped(value?: ExporterResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - }; + return { + + 'name': value['name'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts b/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts index 62ca2eeb35..b3b5eed74e 100644 --- a/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts +++ b/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts @@ -5,96 +5,93 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Exporter status get request * @export * @interface ExporterStatusResponse */ export interface ExporterStatusResponse { - /** - * Name of exporter. - * @type {string} - * @memberof ExporterStatusResponse - */ - name?: string; - /** - * State of the exporter. Could be STARTING, RUNNING or PAUSED - * @type {string} - * @memberof ExporterStatusResponse - */ - state?: string; - /** - * Offset of the exporter - * @type {number} - * @memberof ExporterStatusResponse - */ - offset?: number; - /** - * Timestamp of the exporter - * @type {number} - * @memberof ExporterStatusResponse - */ - ts?: number; - /** - * Error trace of the exporter - * @type {string} - * @memberof ExporterStatusResponse - */ - trace?: string; + /** + * Name of exporter. + * @type {string} + * @memberof ExporterStatusResponse + */ + name?: string; + /** + * State of the exporter. Could be STARTING, RUNNING or PAUSED + * @type {string} + * @memberof ExporterStatusResponse + */ + state?: string; + /** + * Offset of the exporter + * @type {number} + * @memberof ExporterStatusResponse + */ + offset?: number; + /** + * Timestamp of the exporter + * @type {number} + * @memberof ExporterStatusResponse + */ + ts?: number; + /** + * Error trace of the exporter + * @type {string} + * @memberof ExporterStatusResponse + */ + trace?: string; } /** * Check if a given object implements the ExporterStatusResponse interface. */ export function instanceOfExporterStatusResponse(value: object): value is ExporterStatusResponse { - return true; + return true; } export function ExporterStatusResponseFromJSON(json: any): ExporterStatusResponse { - return ExporterStatusResponseFromJSONTyped(json, false); + return ExporterStatusResponseFromJSONTyped(json, false); } -export function ExporterStatusResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExporterStatusResponse { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - state: json["state"] == null ? undefined : json["state"], - offset: json["offset"] == null ? undefined : json["offset"], - ts: json["ts"] == null ? undefined : json["ts"], - trace: json["trace"] == null ? undefined : json["trace"], - }; +export function ExporterStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterStatusResponse { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'state': json['state'] == null ? undefined : json['state'], + 'offset': json['offset'] == null ? undefined : json['offset'], + 'ts': json['ts'] == null ? undefined : json['ts'], + 'trace': json['trace'] == null ? undefined : json['trace'], + }; } export function ExporterStatusResponseToJSON(json: any): ExporterStatusResponse { - return ExporterStatusResponseToJSONTyped(json, false); + return ExporterStatusResponseToJSONTyped(json, false); } -export function ExporterStatusResponseToJSONTyped( - value?: ExporterStatusResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExporterStatusResponseToJSONTyped(value?: ExporterStatusResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - state: value["state"], - offset: value["offset"], - ts: value["ts"], - trace: value["trace"], - }; + return { + + 'name': value['name'], + 'state': value['state'], + 'offset': value['offset'], + 'ts': value['ts'], + 'trace': value['trace'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts b/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts index f206c8b80c..5c42ec56b9 100644 --- a/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts +++ b/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts @@ -5,97 +5,93 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Exporter update request * @export * @interface ExporterUpdateRequest */ export interface ExporterUpdateRequest { - /** - * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) - * @type {string} - * @memberof ExporterUpdateRequest - */ - contextType?: string; - /** - * Customized context of the exporter if contextType equals CUSTOM. - * @type {string} - * @memberof ExporterUpdateRequest - */ - context?: string; - /** - * Name of each exporter subject - * @type {Array} - * @memberof ExporterUpdateRequest - */ - subjects?: Array; - /** - * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. - * @type {string} - * @memberof ExporterUpdateRequest - */ - subjectRenameFormat?: string; - /** - * The map containing exporter’s configurations - * @type {{ [key: string]: string; }} - * @memberof ExporterUpdateRequest - */ - config?: { [key: string]: string }; + /** + * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) + * @type {string} + * @memberof ExporterUpdateRequest + */ + contextType?: string; + /** + * Customized context of the exporter if contextType equals CUSTOM. + * @type {string} + * @memberof ExporterUpdateRequest + */ + context?: string; + /** + * Name of each exporter subject + * @type {Array} + * @memberof ExporterUpdateRequest + */ + subjects?: Array; + /** + * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. + * @type {string} + * @memberof ExporterUpdateRequest + */ + subjectRenameFormat?: string; + /** + * The map containing exporter’s configurations + * @type {{ [key: string]: string; }} + * @memberof ExporterUpdateRequest + */ + config?: { [key: string]: string; }; } /** * Check if a given object implements the ExporterUpdateRequest interface. */ export function instanceOfExporterUpdateRequest(value: object): value is ExporterUpdateRequest { - return true; + return true; } export function ExporterUpdateRequestFromJSON(json: any): ExporterUpdateRequest { - return ExporterUpdateRequestFromJSONTyped(json, false); + return ExporterUpdateRequestFromJSONTyped(json, false); } -export function ExporterUpdateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExporterUpdateRequest { - if (json == null) { - return json; - } - return { - contextType: json["contextType"] == null ? undefined : json["contextType"], - context: json["context"] == null ? undefined : json["context"], - subjects: json["subjects"] == null ? undefined : json["subjects"], - subjectRenameFormat: - json["subjectRenameFormat"] == null ? undefined : json["subjectRenameFormat"], - config: json["config"] == null ? undefined : json["config"], - }; +export function ExporterUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterUpdateRequest { + if (json == null) { + return json; + } + return { + + 'contextType': json['contextType'] == null ? undefined : json['contextType'], + 'context': json['context'] == null ? undefined : json['context'], + 'subjects': json['subjects'] == null ? undefined : json['subjects'], + 'subjectRenameFormat': json['subjectRenameFormat'] == null ? undefined : json['subjectRenameFormat'], + 'config': json['config'] == null ? undefined : json['config'], + }; } export function ExporterUpdateRequestToJSON(json: any): ExporterUpdateRequest { - return ExporterUpdateRequestToJSONTyped(json, false); + return ExporterUpdateRequestToJSONTyped(json, false); } -export function ExporterUpdateRequestToJSONTyped( - value?: ExporterUpdateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExporterUpdateRequestToJSONTyped(value?: ExporterUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - contextType: value["contextType"], - context: value["context"], - subjects: value["subjects"], - subjectRenameFormat: value["subjectRenameFormat"], - config: value["config"], - }; + return { + + 'contextType': value['contextType'], + 'context': value['context'], + 'subjects': value['subjects'], + 'subjectRenameFormat': value['subjectRenameFormat'], + 'config': value['config'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/Kek.ts b/src/clients/schemaRegistryRest/models/Kek.ts index af77d45bcc..84556afc60 100644 --- a/src/clients/schemaRegistryRest/models/Kek.ts +++ b/src/clients/schemaRegistryRest/models/Kek.ts @@ -5,114 +5,117 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface Kek */ export interface Kek { - /** - * Name of the kek - * @type {string} - * @memberof Kek - */ - name?: string; - /** - * KMS type of the kek - * @type {string} - * @memberof Kek - */ - kmsType?: string; - /** - * KMS key ID of the kek - * @type {string} - * @memberof Kek - */ - kmsKeyId?: string; - /** - * Properties of the kek - * @type {{ [key: string]: string; }} - * @memberof Kek - */ - kmsProps?: { [key: string]: string }; - /** - * Description of the kek - * @type {string} - * @memberof Kek - */ - doc?: string; - /** - * Whether the kek is shared - * @type {boolean} - * @memberof Kek - */ - shared?: boolean; - /** - * Timestamp of the kek - * @type {number} - * @memberof Kek - */ - ts?: number; - /** - * Whether the kek is deleted - * @type {boolean} - * @memberof Kek - */ - deleted?: boolean; + /** + * Name of the kek + * @type {string} + * @memberof Kek + */ + name?: string; + /** + * KMS type of the kek + * @type {string} + * @memberof Kek + */ + kmsType?: string; + /** + * KMS key ID of the kek + * @type {string} + * @memberof Kek + */ + kmsKeyId?: string; + /** + * Properties of the kek + * @type {{ [key: string]: string; }} + * @memberof Kek + */ + kmsProps?: { [key: string]: string; }; + /** + * Description of the kek + * @type {string} + * @memberof Kek + */ + doc?: string; + /** + * Whether the kek is shared + * @type {boolean} + * @memberof Kek + */ + shared?: boolean; + /** + * Timestamp of the kek + * @type {number} + * @memberof Kek + */ + ts?: number; + /** + * Whether the kek is deleted + * @type {boolean} + * @memberof Kek + */ + deleted?: boolean; } /** * Check if a given object implements the Kek interface. */ export function instanceOfKek(value: object): value is Kek { - return true; + return true; } export function KekFromJSON(json: any): Kek { - return KekFromJSONTyped(json, false); + return KekFromJSONTyped(json, false); } export function KekFromJSONTyped(json: any, ignoreDiscriminator: boolean): Kek { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - kmsType: json["kmsType"] == null ? undefined : json["kmsType"], - kmsKeyId: json["kmsKeyId"] == null ? undefined : json["kmsKeyId"], - kmsProps: json["kmsProps"] == null ? undefined : json["kmsProps"], - doc: json["doc"] == null ? undefined : json["doc"], - shared: json["shared"] == null ? undefined : json["shared"], - ts: json["ts"] == null ? undefined : json["ts"], - deleted: json["deleted"] == null ? undefined : json["deleted"], - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'kmsType': json['kmsType'] == null ? undefined : json['kmsType'], + 'kmsKeyId': json['kmsKeyId'] == null ? undefined : json['kmsKeyId'], + 'kmsProps': json['kmsProps'] == null ? undefined : json['kmsProps'], + 'doc': json['doc'] == null ? undefined : json['doc'], + 'shared': json['shared'] == null ? undefined : json['shared'], + 'ts': json['ts'] == null ? undefined : json['ts'], + 'deleted': json['deleted'] == null ? undefined : json['deleted'], + }; } export function KekToJSON(json: any): Kek { - return KekToJSONTyped(json, false); + return KekToJSONTyped(json, false); } export function KekToJSONTyped(value?: Kek | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - name: value["name"], - kmsType: value["kmsType"], - kmsKeyId: value["kmsKeyId"], - kmsProps: value["kmsProps"], - doc: value["doc"], - shared: value["shared"], - ts: value["ts"], - deleted: value["deleted"], - }; + return { + + 'name': value['name'], + 'kmsType': value['kmsType'], + 'kmsKeyId': value['kmsKeyId'], + 'kmsProps': value['kmsProps'], + 'doc': value['doc'], + 'shared': value['shared'], + 'ts': value['ts'], + 'deleted': value['deleted'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/Metadata.ts b/src/clients/schemaRegistryRest/models/Metadata.ts index d62594e048..5e2dd397a1 100644 --- a/src/clients/schemaRegistryRest/models/Metadata.ts +++ b/src/clients/schemaRegistryRest/models/Metadata.ts @@ -5,77 +5,77 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * User-defined metadata * @export * @interface Metadata */ export interface Metadata { - /** - * - * @type {{ [key: string]: Set; }} - * @memberof Metadata - */ - tags?: { [key: string]: Set }; - /** - * - * @type {{ [key: string]: string; }} - * @memberof Metadata - */ - properties?: { [key: string]: string }; - /** - * - * @type {Set} - * @memberof Metadata - */ - sensitive?: Set; + /** + * + * @type {{ [key: string]: Set; }} + * @memberof Metadata + */ + tags?: { [key: string]: Set; }; + /** + * + * @type {{ [key: string]: string; }} + * @memberof Metadata + */ + properties?: { [key: string]: string; }; + /** + * + * @type {Set} + * @memberof Metadata + */ + sensitive?: Set; } /** * Check if a given object implements the Metadata interface. */ export function instanceOfMetadata(value: object): value is Metadata { - return true; + return true; } export function MetadataFromJSON(json: any): Metadata { - return MetadataFromJSONTyped(json, false); + return MetadataFromJSONTyped(json, false); } export function MetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): Metadata { - if (json == null) { - return json; - } - return { - tags: json["tags"] == null ? undefined : json["tags"], - properties: json["properties"] == null ? undefined : json["properties"], - sensitive: json["sensitive"] == null ? undefined : new Set(json["sensitive"]), - }; + if (json == null) { + return json; + } + return { + + 'tags': json['tags'] == null ? undefined : json['tags'], + 'properties': json['properties'] == null ? undefined : json['properties'], + 'sensitive': json['sensitive'] == null ? undefined : new Set(json['sensitive']), + }; } export function MetadataToJSON(json: any): Metadata { - return MetadataToJSONTyped(json, false); + return MetadataToJSONTyped(json, false); } -export function MetadataToJSONTyped( - value?: Metadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function MetadataToJSONTyped(value?: Metadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - tags: value["tags"], - properties: value["properties"], - sensitive: value["sensitive"] == null ? undefined : Array.from(value["sensitive"] as Set), - }; + return { + + 'tags': value['tags'], + 'properties': value['properties'], + 'sensitive': value['sensitive'] == null ? undefined : Array.from(value['sensitive'] as Set), + }; } + diff --git a/src/clients/schemaRegistryRest/models/Mode.ts b/src/clients/schemaRegistryRest/models/Mode.ts index d8e1738cf6..26cc10e9d6 100644 --- a/src/clients/schemaRegistryRest/models/Mode.ts +++ b/src/clients/schemaRegistryRest/models/Mode.ts @@ -5,58 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Schema Registry operating mode * @export * @interface Mode */ export interface Mode { - /** - * Schema Registry operating mode - * @type {string} - * @memberof Mode - */ - mode?: string; + /** + * Schema Registry operating mode + * @type {string} + * @memberof Mode + */ + mode?: string; } /** * Check if a given object implements the Mode interface. */ export function instanceOfMode(value: object): value is Mode { - return true; + return true; } export function ModeFromJSON(json: any): Mode { - return ModeFromJSONTyped(json, false); + return ModeFromJSONTyped(json, false); } export function ModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mode { - if (json == null) { - return json; - } - return { - mode: json["mode"] == null ? undefined : json["mode"], - }; + if (json == null) { + return json; + } + return { + + 'mode': json['mode'] == null ? undefined : json['mode'], + }; } export function ModeToJSON(json: any): Mode { - return ModeToJSONTyped(json, false); + return ModeToJSONTyped(json, false); } export function ModeToJSONTyped(value?: Mode | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - mode: value["mode"], - }; + return { + + 'mode': value['mode'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts b/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts index 6ffbfaeadf..ca5254d472 100644 --- a/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts +++ b/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Mode update request * @export * @interface ModeUpdateRequest */ export interface ModeUpdateRequest { - /** - * Schema Registry operating mode - * @type {string} - * @memberof ModeUpdateRequest - */ - mode?: string; + /** + * Schema Registry operating mode + * @type {string} + * @memberof ModeUpdateRequest + */ + mode?: string; } /** * Check if a given object implements the ModeUpdateRequest interface. */ export function instanceOfModeUpdateRequest(value: object): value is ModeUpdateRequest { - return true; + return true; } export function ModeUpdateRequestFromJSON(json: any): ModeUpdateRequest { - return ModeUpdateRequestFromJSONTyped(json, false); + return ModeUpdateRequestFromJSONTyped(json, false); } -export function ModeUpdateRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ModeUpdateRequest { - if (json == null) { - return json; - } - return { - mode: json["mode"] == null ? undefined : json["mode"], - }; +export function ModeUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModeUpdateRequest { + if (json == null) { + return json; + } + return { + + 'mode': json['mode'] == null ? undefined : json['mode'], + }; } export function ModeUpdateRequestToJSON(json: any): ModeUpdateRequest { - return ModeUpdateRequestToJSONTyped(json, false); + return ModeUpdateRequestToJSONTyped(json, false); } -export function ModeUpdateRequestToJSONTyped( - value?: ModeUpdateRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ModeUpdateRequestToJSONTyped(value?: ModeUpdateRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - mode: value["mode"], - }; + return { + + 'mode': value['mode'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts b/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts index 292e47f991..7defa60d5a 100644 --- a/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts +++ b/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts @@ -5,21 +5,21 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ExporterReference } from "./ExporterReference"; +import { mapValues } from '../runtime'; +import type { ExporterReference } from './ExporterReference'; import { - ExporterReferenceFromJSON, - ExporterReferenceFromJSONTyped, - ExporterReferenceToJSON, - ExporterReferenceToJSONTyped, -} from "./ExporterReference"; + ExporterReferenceFromJSON, + ExporterReferenceFromJSONTyped, + ExporterReferenceToJSON, + ExporterReferenceToJSONTyped, +} from './ExporterReference'; /** * Exporter register request @@ -27,56 +27,47 @@ import { * @interface RegisterExporterRequest */ export interface RegisterExporterRequest { - /** - * References to other schemas - * @type {Array} - * @memberof RegisterExporterRequest - */ - references?: Array; + /** + * References to other schemas + * @type {Array} + * @memberof RegisterExporterRequest + */ + references?: Array; } /** * Check if a given object implements the RegisterExporterRequest interface. */ export function instanceOfRegisterExporterRequest(value: object): value is RegisterExporterRequest { - return true; + return true; } export function RegisterExporterRequestFromJSON(json: any): RegisterExporterRequest { - return RegisterExporterRequestFromJSONTyped(json, false); + return RegisterExporterRequestFromJSONTyped(json, false); } -export function RegisterExporterRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RegisterExporterRequest { - if (json == null) { - return json; - } - return { - references: - json["references"] == null - ? undefined - : (json["references"] as Array).map(ExporterReferenceFromJSON), - }; +export function RegisterExporterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterExporterRequest { + if (json == null) { + return json; + } + return { + + 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(ExporterReferenceFromJSON)), + }; } export function RegisterExporterRequestToJSON(json: any): RegisterExporterRequest { - return RegisterExporterRequestToJSONTyped(json, false); + return RegisterExporterRequestToJSONTyped(json, false); } -export function RegisterExporterRequestToJSONTyped( - value?: RegisterExporterRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RegisterExporterRequestToJSONTyped(value?: RegisterExporterRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - references: - value["references"] == null - ? undefined - : (value["references"] as Array).map(ExporterReferenceToJSON), - }; + return { + + 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(ExporterReferenceToJSON)), + }; } + diff --git a/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts b/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts index 68648b6999..d3fd7974d6 100644 --- a/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts +++ b/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts @@ -5,35 +5,35 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SchemaReference } from "./SchemaReference"; +import { mapValues } from '../runtime'; +import type { SchemaReference } from './SchemaReference'; import { - SchemaReferenceFromJSON, - SchemaReferenceFromJSONTyped, - SchemaReferenceToJSON, - SchemaReferenceToJSONTyped, -} from "./SchemaReference"; -import type { RuleSet } from "./RuleSet"; + SchemaReferenceFromJSON, + SchemaReferenceFromJSONTyped, + SchemaReferenceToJSON, + SchemaReferenceToJSONTyped, +} from './SchemaReference'; +import type { RuleSet } from './RuleSet'; import { - RuleSetFromJSON, - RuleSetFromJSONTyped, - RuleSetToJSON, - RuleSetToJSONTyped, -} from "./RuleSet"; -import type { Metadata } from "./Metadata"; + RuleSetFromJSON, + RuleSetFromJSONTyped, + RuleSetToJSON, + RuleSetToJSONTyped, +} from './RuleSet'; +import type { Metadata } from './Metadata'; import { - MetadataFromJSON, - MetadataFromJSONTyped, - MetadataToJSON, - MetadataToJSONTyped, -} from "./Metadata"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './Metadata'; /** * Schema register request @@ -41,104 +41,95 @@ import { * @interface RegisterSchemaRequest */ export interface RegisterSchemaRequest { - /** - * Version number - * @type {number} - * @memberof RegisterSchemaRequest - */ - version?: number; - /** - * Globally unique identifier of the schema - * @type {number} - * @memberof RegisterSchemaRequest - */ - id?: number; - /** - * Schema type - * @type {string} - * @memberof RegisterSchemaRequest - */ - schemaType?: string; - /** - * References to other schemas - * @type {Array} - * @memberof RegisterSchemaRequest - */ - references?: Array; - /** - * Schema definition string - * @type {string} - * @memberof RegisterSchemaRequest - */ - schema?: string; - /** - * - * @type {Metadata} - * @memberof RegisterSchemaRequest - */ - metadata?: Metadata | null; - /** - * - * @type {RuleSet} - * @memberof RegisterSchemaRequest - */ - ruleSet?: RuleSet | null; + /** + * Version number + * @type {number} + * @memberof RegisterSchemaRequest + */ + version?: number; + /** + * Globally unique identifier of the schema + * @type {number} + * @memberof RegisterSchemaRequest + */ + id?: number; + /** + * Schema type + * @type {string} + * @memberof RegisterSchemaRequest + */ + schemaType?: string; + /** + * References to other schemas + * @type {Array} + * @memberof RegisterSchemaRequest + */ + references?: Array; + /** + * Schema definition string + * @type {string} + * @memberof RegisterSchemaRequest + */ + schema?: string; + /** + * + * @type {Metadata} + * @memberof RegisterSchemaRequest + */ + metadata?: Metadata | null; + /** + * + * @type {RuleSet} + * @memberof RegisterSchemaRequest + */ + ruleSet?: RuleSet | null; } /** * Check if a given object implements the RegisterSchemaRequest interface. */ export function instanceOfRegisterSchemaRequest(value: object): value is RegisterSchemaRequest { - return true; + return true; } export function RegisterSchemaRequestFromJSON(json: any): RegisterSchemaRequest { - return RegisterSchemaRequestFromJSONTyped(json, false); + return RegisterSchemaRequestFromJSONTyped(json, false); } -export function RegisterSchemaRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RegisterSchemaRequest { - if (json == null) { - return json; - } - return { - version: json["version"] == null ? undefined : json["version"], - id: json["id"] == null ? undefined : json["id"], - schemaType: json["schemaType"] == null ? undefined : json["schemaType"], - references: - json["references"] == null - ? undefined - : (json["references"] as Array).map(SchemaReferenceFromJSON), - schema: json["schema"] == null ? undefined : json["schema"], - metadata: json["metadata"] == null ? undefined : MetadataFromJSON(json["metadata"]), - ruleSet: json["ruleSet"] == null ? undefined : RuleSetFromJSON(json["ruleSet"]), - }; +export function RegisterSchemaRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterSchemaRequest { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'id': json['id'] == null ? undefined : json['id'], + 'schemaType': json['schemaType'] == null ? undefined : json['schemaType'], + 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(SchemaReferenceFromJSON)), + 'schema': json['schema'] == null ? undefined : json['schema'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'ruleSet': json['ruleSet'] == null ? undefined : RuleSetFromJSON(json['ruleSet']), + }; } export function RegisterSchemaRequestToJSON(json: any): RegisterSchemaRequest { - return RegisterSchemaRequestToJSONTyped(json, false); + return RegisterSchemaRequestToJSONTyped(json, false); } -export function RegisterSchemaRequestToJSONTyped( - value?: RegisterSchemaRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RegisterSchemaRequestToJSONTyped(value?: RegisterSchemaRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - version: value["version"], - id: value["id"], - schemaType: value["schemaType"], - references: - value["references"] == null - ? undefined - : (value["references"] as Array).map(SchemaReferenceToJSON), - schema: value["schema"], - metadata: MetadataToJSON(value["metadata"]), - ruleSet: RuleSetToJSON(value["ruleSet"]), - }; + return { + + 'version': value['version'], + 'id': value['id'], + 'schemaType': value['schemaType'], + 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(SchemaReferenceToJSON)), + 'schema': value['schema'], + 'metadata': MetadataToJSON(value['metadata']), + 'ruleSet': RuleSetToJSON(value['ruleSet']), + }; } + diff --git a/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts b/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts index 7c0367efaa..cb29904d18 100644 --- a/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts +++ b/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts @@ -5,64 +5,61 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Schema register response * @export * @interface RegisterSchemaResponse */ export interface RegisterSchemaResponse { - /** - * Globally unique identifier of the schema - * @type {number} - * @memberof RegisterSchemaResponse - */ - id?: number; + /** + * Globally unique identifier of the schema + * @type {number} + * @memberof RegisterSchemaResponse + */ + id?: number; } /** * Check if a given object implements the RegisterSchemaResponse interface. */ export function instanceOfRegisterSchemaResponse(value: object): value is RegisterSchemaResponse { - return true; + return true; } export function RegisterSchemaResponseFromJSON(json: any): RegisterSchemaResponse { - return RegisterSchemaResponseFromJSONTyped(json, false); + return RegisterSchemaResponseFromJSONTyped(json, false); } -export function RegisterSchemaResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RegisterSchemaResponse { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - }; +export function RegisterSchemaResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterSchemaResponse { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + }; } export function RegisterSchemaResponseToJSON(json: any): RegisterSchemaResponse { - return RegisterSchemaResponseToJSONTyped(json, false); + return RegisterSchemaResponseToJSONTyped(json, false); } -export function RegisterSchemaResponseToJSONTyped( - value?: RegisterSchemaResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RegisterSchemaResponseToJSONTyped(value?: RegisterSchemaResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - }; + return { + + 'id': value['id'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/Rule.ts b/src/clients/schemaRegistryRest/models/Rule.ts index c71ae14f85..97f50a54b8 100644 --- a/src/clients/schemaRegistryRest/models/Rule.ts +++ b/src/clients/schemaRegistryRest/models/Rule.ts @@ -5,159 +5,163 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Rule * @export * @interface Rule */ export interface Rule { - /** - * Rule name - * @type {string} - * @memberof Rule - */ - name?: string; - /** - * Rule doc - * @type {string} - * @memberof Rule - */ - doc?: string; - /** - * Rule kind - * @type {string} - * @memberof Rule - */ - kind?: RuleKindEnum; - /** - * Rule mode - * @type {string} - * @memberof Rule - */ - mode?: RuleModeEnum; - /** - * Rule type - * @type {string} - * @memberof Rule - */ - type?: string; - /** - * The tags to which this rule applies - * @type {Set} - * @memberof Rule - */ - tags?: Set; - /** - * Optional params for the rule - * @type {{ [key: string]: string; }} - * @memberof Rule - */ - params?: { [key: string]: string }; - /** - * Rule expression - * @type {string} - * @memberof Rule - */ - expr?: string; - /** - * Rule action on success - * @type {string} - * @memberof Rule - */ - onSuccess?: string; - /** - * Rule action on failure - * @type {string} - * @memberof Rule - */ - onFailure?: string; - /** - * Whether the rule is disabled - * @type {boolean} - * @memberof Rule - */ - disabled?: boolean; + /** + * Rule name + * @type {string} + * @memberof Rule + */ + name?: string; + /** + * Rule doc + * @type {string} + * @memberof Rule + */ + doc?: string; + /** + * Rule kind + * @type {string} + * @memberof Rule + */ + kind?: RuleKindEnum; + /** + * Rule mode + * @type {string} + * @memberof Rule + */ + mode?: RuleModeEnum; + /** + * Rule type + * @type {string} + * @memberof Rule + */ + type?: string; + /** + * The tags to which this rule applies + * @type {Set} + * @memberof Rule + */ + tags?: Set; + /** + * Optional params for the rule + * @type {{ [key: string]: string; }} + * @memberof Rule + */ + params?: { [key: string]: string; }; + /** + * Rule expression + * @type {string} + * @memberof Rule + */ + expr?: string; + /** + * Rule action on success + * @type {string} + * @memberof Rule + */ + onSuccess?: string; + /** + * Rule action on failure + * @type {string} + * @memberof Rule + */ + onFailure?: string; + /** + * Whether the rule is disabled + * @type {boolean} + * @memberof Rule + */ + disabled?: boolean; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum RuleKindEnum { - Transform = "TRANSFORM", - Condition = "CONDITION", + Transform = 'TRANSFORM', + Condition = 'CONDITION' } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum RuleModeEnum { - Upgrade = "UPGRADE", - Downgrade = "DOWNGRADE", - Updown = "UPDOWN", - Write = "WRITE", - Read = "READ", - Writeread = "WRITEREAD", + Upgrade = 'UPGRADE', + Downgrade = 'DOWNGRADE', + Updown = 'UPDOWN', + Write = 'WRITE', + Read = 'READ', + Writeread = 'WRITEREAD' } + /** * Check if a given object implements the Rule interface. */ export function instanceOfRule(value: object): value is Rule { - return true; + return true; } export function RuleFromJSON(json: any): Rule { - return RuleFromJSONTyped(json, false); + return RuleFromJSONTyped(json, false); } export function RuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Rule { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - doc: json["doc"] == null ? undefined : json["doc"], - kind: json["kind"] == null ? undefined : json["kind"], - mode: json["mode"] == null ? undefined : json["mode"], - type: json["type"] == null ? undefined : json["type"], - tags: json["tags"] == null ? undefined : new Set(json["tags"]), - params: json["params"] == null ? undefined : json["params"], - expr: json["expr"] == null ? undefined : json["expr"], - onSuccess: json["onSuccess"] == null ? undefined : json["onSuccess"], - onFailure: json["onFailure"] == null ? undefined : json["onFailure"], - disabled: json["disabled"] == null ? undefined : json["disabled"], - }; + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'doc': json['doc'] == null ? undefined : json['doc'], + 'kind': json['kind'] == null ? undefined : json['kind'], + 'mode': json['mode'] == null ? undefined : json['mode'], + 'type': json['type'] == null ? undefined : json['type'], + 'tags': json['tags'] == null ? undefined : new Set(json['tags']), + 'params': json['params'] == null ? undefined : json['params'], + 'expr': json['expr'] == null ? undefined : json['expr'], + 'onSuccess': json['onSuccess'] == null ? undefined : json['onSuccess'], + 'onFailure': json['onFailure'] == null ? undefined : json['onFailure'], + 'disabled': json['disabled'] == null ? undefined : json['disabled'], + }; } export function RuleToJSON(json: any): Rule { - return RuleToJSONTyped(json, false); + return RuleToJSONTyped(json, false); } export function RuleToJSONTyped(value?: Rule | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - name: value["name"], - doc: value["doc"], - kind: value["kind"], - mode: value["mode"], - type: value["type"], - tags: value["tags"] == null ? undefined : Array.from(value["tags"] as Set), - params: value["params"], - expr: value["expr"], - onSuccess: value["onSuccess"], - onFailure: value["onFailure"], - disabled: value["disabled"], - }; + return { + + 'name': value['name'], + 'doc': value['doc'], + 'kind': value['kind'], + 'mode': value['mode'], + 'type': value['type'], + 'tags': value['tags'] == null ? undefined : Array.from(value['tags'] as Set), + 'params': value['params'], + 'expr': value['expr'], + 'onSuccess': value['onSuccess'], + 'onFailure': value['onFailure'], + 'disabled': value['disabled'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/RuleSet.ts b/src/clients/schemaRegistryRest/models/RuleSet.ts index ea644bb892..b06ed896de 100644 --- a/src/clients/schemaRegistryRest/models/RuleSet.ts +++ b/src/clients/schemaRegistryRest/models/RuleSet.ts @@ -5,16 +5,21 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { Rule } from "./Rule"; -import { RuleFromJSON, RuleFromJSONTyped, RuleToJSON, RuleToJSONTyped } from "./Rule"; +import { mapValues } from '../runtime'; +import type { Rule } from './Rule'; +import { + RuleFromJSON, + RuleFromJSONTyped, + RuleToJSON, + RuleToJSONTyped, +} from './Rule'; /** * Schema rule set @@ -22,67 +27,55 @@ import { RuleFromJSON, RuleFromJSONTyped, RuleToJSON, RuleToJSONTyped } from "./ * @interface RuleSet */ export interface RuleSet { - /** - * - * @type {Array} - * @memberof RuleSet - */ - migrationRules?: Array; - /** - * - * @type {Array} - * @memberof RuleSet - */ - domainRules?: Array; + /** + * + * @type {Array} + * @memberof RuleSet + */ + migrationRules?: Array; + /** + * + * @type {Array} + * @memberof RuleSet + */ + domainRules?: Array; } /** * Check if a given object implements the RuleSet interface. */ export function instanceOfRuleSet(value: object): value is RuleSet { - return true; + return true; } export function RuleSetFromJSON(json: any): RuleSet { - return RuleSetFromJSONTyped(json, false); + return RuleSetFromJSONTyped(json, false); } export function RuleSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuleSet { - if (json == null) { - return json; - } - return { - migrationRules: - json["migrationRules"] == null - ? undefined - : (json["migrationRules"] as Array).map(RuleFromJSON), - domainRules: - json["domainRules"] == null - ? undefined - : (json["domainRules"] as Array).map(RuleFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'migrationRules': json['migrationRules'] == null ? undefined : ((json['migrationRules'] as Array).map(RuleFromJSON)), + 'domainRules': json['domainRules'] == null ? undefined : ((json['domainRules'] as Array).map(RuleFromJSON)), + }; } export function RuleSetToJSON(json: any): RuleSet { - return RuleSetToJSONTyped(json, false); + return RuleSetToJSONTyped(json, false); } -export function RuleSetToJSONTyped( - value?: RuleSet | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RuleSetToJSONTyped(value?: RuleSet | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - migrationRules: - value["migrationRules"] == null - ? undefined - : (value["migrationRules"] as Array).map(RuleToJSON), - domainRules: - value["domainRules"] == null - ? undefined - : (value["domainRules"] as Array).map(RuleToJSON), - }; + return { + + 'migrationRules': value['migrationRules'] == null ? undefined : ((value['migrationRules'] as Array).map(RuleToJSON)), + 'domainRules': value['domainRules'] == null ? undefined : ((value['domainRules'] as Array).map(RuleToJSON)), + }; } + diff --git a/src/clients/schemaRegistryRest/models/Schema.ts b/src/clients/schemaRegistryRest/models/Schema.ts index fa3b5fcb64..37cd97653b 100644 --- a/src/clients/schemaRegistryRest/models/Schema.ts +++ b/src/clients/schemaRegistryRest/models/Schema.ts @@ -5,35 +5,35 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SchemaReference } from "./SchemaReference"; +import { mapValues } from '../runtime'; +import type { SchemaReference } from './SchemaReference'; import { - SchemaReferenceFromJSON, - SchemaReferenceFromJSONTyped, - SchemaReferenceToJSON, - SchemaReferenceToJSONTyped, -} from "./SchemaReference"; -import type { RuleSet } from "./RuleSet"; + SchemaReferenceFromJSON, + SchemaReferenceFromJSONTyped, + SchemaReferenceToJSON, + SchemaReferenceToJSONTyped, +} from './SchemaReference'; +import type { RuleSet } from './RuleSet'; import { - RuleSetFromJSON, - RuleSetFromJSONTyped, - RuleSetToJSON, - RuleSetToJSONTyped, -} from "./RuleSet"; -import type { Metadata } from "./Metadata"; + RuleSetFromJSON, + RuleSetFromJSONTyped, + RuleSetToJSON, + RuleSetToJSONTyped, +} from './RuleSet'; +import type { Metadata } from './Metadata'; import { - MetadataFromJSON, - MetadataFromJSONTyped, - MetadataToJSON, - MetadataToJSONTyped, -} from "./Metadata"; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from './Metadata'; /** * Schema @@ -41,109 +41,103 @@ import { * @interface Schema */ export interface Schema { - /** - * Name of the subject - * @type {string} - * @memberof Schema - */ - subject?: string; - /** - * Version number - * @type {number} - * @memberof Schema - */ - version?: number; - /** - * Globally unique identifier of the schema - * @type {number} - * @memberof Schema - */ - id?: number; - /** - * Schema type - * @type {string} - * @memberof Schema - */ - schemaType?: string; - /** - * References to other schemas - * @type {Array} - * @memberof Schema - */ - references?: Array; - /** - * Schema definition string - * @type {string} - * @memberof Schema - */ - schema?: string; - /** - * - * @type {Metadata} - * @memberof Schema - */ - metadata?: Metadata | null; - /** - * - * @type {RuleSet} - * @memberof Schema - */ - ruleSet?: RuleSet | null; + /** + * Name of the subject + * @type {string} + * @memberof Schema + */ + subject?: string; + /** + * Version number + * @type {number} + * @memberof Schema + */ + version?: number; + /** + * Globally unique identifier of the schema + * @type {number} + * @memberof Schema + */ + id?: number; + /** + * Schema type + * @type {string} + * @memberof Schema + */ + schemaType?: string; + /** + * References to other schemas + * @type {Array} + * @memberof Schema + */ + references?: Array; + /** + * Schema definition string + * @type {string} + * @memberof Schema + */ + schema?: string; + /** + * + * @type {Metadata} + * @memberof Schema + */ + metadata?: Metadata | null; + /** + * + * @type {RuleSet} + * @memberof Schema + */ + ruleSet?: RuleSet | null; } /** * Check if a given object implements the Schema interface. */ export function instanceOfSchema(value: object): value is Schema { - return true; + return true; } export function SchemaFromJSON(json: any): Schema { - return SchemaFromJSONTyped(json, false); + return SchemaFromJSONTyped(json, false); } export function SchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): Schema { - if (json == null) { - return json; - } - return { - subject: json["subject"] == null ? undefined : json["subject"], - version: json["version"] == null ? undefined : json["version"], - id: json["id"] == null ? undefined : json["id"], - schemaType: json["schemaType"] == null ? undefined : json["schemaType"], - references: - json["references"] == null - ? undefined - : (json["references"] as Array).map(SchemaReferenceFromJSON), - schema: json["schema"] == null ? undefined : json["schema"], - metadata: json["metadata"] == null ? undefined : MetadataFromJSON(json["metadata"]), - ruleSet: json["ruleSet"] == null ? undefined : RuleSetFromJSON(json["ruleSet"]), - }; + if (json == null) { + return json; + } + return { + + 'subject': json['subject'] == null ? undefined : json['subject'], + 'version': json['version'] == null ? undefined : json['version'], + 'id': json['id'] == null ? undefined : json['id'], + 'schemaType': json['schemaType'] == null ? undefined : json['schemaType'], + 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(SchemaReferenceFromJSON)), + 'schema': json['schema'] == null ? undefined : json['schema'], + 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), + 'ruleSet': json['ruleSet'] == null ? undefined : RuleSetFromJSON(json['ruleSet']), + }; } export function SchemaToJSON(json: any): Schema { - return SchemaToJSONTyped(json, false); + return SchemaToJSONTyped(json, false); } -export function SchemaToJSONTyped( - value?: Schema | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SchemaToJSONTyped(value?: Schema | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - subject: value["subject"], - version: value["version"], - id: value["id"], - schemaType: value["schemaType"], - references: - value["references"] == null - ? undefined - : (value["references"] as Array).map(SchemaReferenceToJSON), - schema: value["schema"], - metadata: MetadataToJSON(value["metadata"]), - ruleSet: RuleSetToJSON(value["ruleSet"]), - }; + return { + + 'subject': value['subject'], + 'version': value['version'], + 'id': value['id'], + 'schemaType': value['schemaType'], + 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(SchemaReferenceToJSON)), + 'schema': value['schema'], + 'metadata': MetadataToJSON(value['metadata']), + 'ruleSet': RuleSetToJSON(value['ruleSet']), + }; } + diff --git a/src/clients/schemaRegistryRest/models/SchemaReference.ts b/src/clients/schemaRegistryRest/models/SchemaReference.ts index 22f25ef9c8..09b79b9f32 100644 --- a/src/clients/schemaRegistryRest/models/SchemaReference.ts +++ b/src/clients/schemaRegistryRest/models/SchemaReference.ts @@ -5,80 +5,77 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Schema reference * @export * @interface SchemaReference */ export interface SchemaReference { - /** - * Reference name - * @type {string} - * @memberof SchemaReference - */ - name?: string; - /** - * Name of the referenced subject - * @type {string} - * @memberof SchemaReference - */ - subject?: string; - /** - * Version number of the referenced subject - * @type {number} - * @memberof SchemaReference - */ - version?: number; + /** + * Reference name + * @type {string} + * @memberof SchemaReference + */ + name?: string; + /** + * Name of the referenced subject + * @type {string} + * @memberof SchemaReference + */ + subject?: string; + /** + * Version number of the referenced subject + * @type {number} + * @memberof SchemaReference + */ + version?: number; } /** * Check if a given object implements the SchemaReference interface. */ export function instanceOfSchemaReference(value: object): value is SchemaReference { - return true; + return true; } export function SchemaReferenceFromJSON(json: any): SchemaReference { - return SchemaReferenceFromJSONTyped(json, false); + return SchemaReferenceFromJSONTyped(json, false); } -export function SchemaReferenceFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SchemaReference { - if (json == null) { - return json; - } - return { - name: json["name"] == null ? undefined : json["name"], - subject: json["subject"] == null ? undefined : json["subject"], - version: json["version"] == null ? undefined : json["version"], - }; +export function SchemaReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaReference { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'version': json['version'] == null ? undefined : json['version'], + }; } export function SchemaReferenceToJSON(json: any): SchemaReference { - return SchemaReferenceToJSONTyped(json, false); + return SchemaReferenceToJSONTyped(json, false); } -export function SchemaReferenceToJSONTyped( - value?: SchemaReference | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SchemaReferenceToJSONTyped(value?: SchemaReference | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - subject: value["subject"], - version: value["version"], - }; + return { + + 'name': value['name'], + 'subject': value['subject'], + 'version': value['version'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/SchemaString.ts b/src/clients/schemaRegistryRest/models/SchemaString.ts index 94d50e6379..9a4c3560a2 100644 --- a/src/clients/schemaRegistryRest/models/SchemaString.ts +++ b/src/clients/schemaRegistryRest/models/SchemaString.ts @@ -5,21 +5,21 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SchemaReference } from "./SchemaReference"; +import { mapValues } from '../runtime'; +import type { SchemaReference } from './SchemaReference'; import { - SchemaReferenceFromJSON, - SchemaReferenceFromJSONTyped, - SchemaReferenceToJSON, - SchemaReferenceToJSONTyped, -} from "./SchemaReference"; + SchemaReferenceFromJSON, + SchemaReferenceFromJSONTyped, + SchemaReferenceToJSON, + SchemaReferenceToJSONTyped, +} from './SchemaReference'; /** * Schema definition @@ -27,77 +27,71 @@ import { * @interface SchemaString */ export interface SchemaString { - /** - * Schema type - * @type {string} - * @memberof SchemaString - */ - schemaType?: string; - /** - * Schema string identified by the ID - * @type {string} - * @memberof SchemaString - */ - schema?: string; - /** - * References to other schemas - * @type {Array} - * @memberof SchemaString - */ - references?: Array; - /** - * Maximum ID - * @type {number} - * @memberof SchemaString - */ - maxId?: number; + /** + * Schema type + * @type {string} + * @memberof SchemaString + */ + schemaType?: string; + /** + * Schema string identified by the ID + * @type {string} + * @memberof SchemaString + */ + schema?: string; + /** + * References to other schemas + * @type {Array} + * @memberof SchemaString + */ + references?: Array; + /** + * Maximum ID + * @type {number} + * @memberof SchemaString + */ + maxId?: number; } /** * Check if a given object implements the SchemaString interface. */ export function instanceOfSchemaString(value: object): value is SchemaString { - return true; + return true; } export function SchemaStringFromJSON(json: any): SchemaString { - return SchemaStringFromJSONTyped(json, false); + return SchemaStringFromJSONTyped(json, false); } export function SchemaStringFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaString { - if (json == null) { - return json; - } - return { - schemaType: json["schemaType"] == null ? undefined : json["schemaType"], - schema: json["schema"] == null ? undefined : json["schema"], - references: - json["references"] == null - ? undefined - : (json["references"] as Array).map(SchemaReferenceFromJSON), - maxId: json["maxId"] == null ? undefined : json["maxId"], - }; + if (json == null) { + return json; + } + return { + + 'schemaType': json['schemaType'] == null ? undefined : json['schemaType'], + 'schema': json['schema'] == null ? undefined : json['schema'], + 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(SchemaReferenceFromJSON)), + 'maxId': json['maxId'] == null ? undefined : json['maxId'], + }; } export function SchemaStringToJSON(json: any): SchemaString { - return SchemaStringToJSONTyped(json, false); + return SchemaStringToJSONTyped(json, false); } -export function SchemaStringToJSONTyped( - value?: SchemaString | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SchemaStringToJSONTyped(value?: SchemaString | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - schemaType: value["schemaType"], - schema: value["schema"], - references: - value["references"] == null - ? undefined - : (value["references"] as Array).map(SchemaReferenceToJSON), - maxId: value["maxId"], - }; + return { + + 'schemaType': value['schemaType'], + 'schema': value['schema'], + 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(SchemaReferenceToJSON)), + 'maxId': value['maxId'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/SubjectVersion.ts b/src/clients/schemaRegistryRest/models/SubjectVersion.ts index 22101e773d..2fec622fc9 100644 --- a/src/clients/schemaRegistryRest/models/SubjectVersion.ts +++ b/src/clients/schemaRegistryRest/models/SubjectVersion.ts @@ -5,72 +5,69 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Subject version pair * @export * @interface SubjectVersion */ export interface SubjectVersion { - /** - * Name of the subject - * @type {string} - * @memberof SubjectVersion - */ - subject?: string; - /** - * Version number - * @type {number} - * @memberof SubjectVersion - */ - version?: number; + /** + * Name of the subject + * @type {string} + * @memberof SubjectVersion + */ + subject?: string; + /** + * Version number + * @type {number} + * @memberof SubjectVersion + */ + version?: number; } /** * Check if a given object implements the SubjectVersion interface. */ export function instanceOfSubjectVersion(value: object): value is SubjectVersion { - return true; + return true; } export function SubjectVersionFromJSON(json: any): SubjectVersion { - return SubjectVersionFromJSONTyped(json, false); + return SubjectVersionFromJSONTyped(json, false); } -export function SubjectVersionFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SubjectVersion { - if (json == null) { - return json; - } - return { - subject: json["subject"] == null ? undefined : json["subject"], - version: json["version"] == null ? undefined : json["version"], - }; +export function SubjectVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubjectVersion { + if (json == null) { + return json; + } + return { + + 'subject': json['subject'] == null ? undefined : json['subject'], + 'version': json['version'] == null ? undefined : json['version'], + }; } export function SubjectVersionToJSON(json: any): SubjectVersion { - return SubjectVersionToJSONTyped(json, false); + return SubjectVersionToJSONTyped(json, false); } -export function SubjectVersionToJSONTyped( - value?: SubjectVersion | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SubjectVersionToJSONTyped(value?: SubjectVersion | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - subject: value["subject"], - version: value["version"], - }; + return { + + 'subject': value['subject'], + 'version': value['version'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts b/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts index a4d566e671..206febbb8f 100644 --- a/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts +++ b/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts @@ -5,80 +5,77 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UpdateKekRequest */ export interface UpdateKekRequest { - /** - * Properties of the kek - * @type {{ [key: string]: string; }} - * @memberof UpdateKekRequest - */ - kmsProps?: { [key: string]: string }; - /** - * Description of the kek - * @type {string} - * @memberof UpdateKekRequest - */ - doc?: string; - /** - * Whether the kek is shared - * @type {boolean} - * @memberof UpdateKekRequest - */ - shared?: boolean; + /** + * Properties of the kek + * @type {{ [key: string]: string; }} + * @memberof UpdateKekRequest + */ + kmsProps?: { [key: string]: string; }; + /** + * Description of the kek + * @type {string} + * @memberof UpdateKekRequest + */ + doc?: string; + /** + * Whether the kek is shared + * @type {boolean} + * @memberof UpdateKekRequest + */ + shared?: boolean; } /** * Check if a given object implements the UpdateKekRequest interface. */ export function instanceOfUpdateKekRequest(value: object): value is UpdateKekRequest { - return true; + return true; } export function UpdateKekRequestFromJSON(json: any): UpdateKekRequest { - return UpdateKekRequestFromJSONTyped(json, false); + return UpdateKekRequestFromJSONTyped(json, false); } -export function UpdateKekRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): UpdateKekRequest { - if (json == null) { - return json; - } - return { - kmsProps: json["kmsProps"] == null ? undefined : json["kmsProps"], - doc: json["doc"] == null ? undefined : json["doc"], - shared: json["shared"] == null ? undefined : json["shared"], - }; +export function UpdateKekRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateKekRequest { + if (json == null) { + return json; + } + return { + + 'kmsProps': json['kmsProps'] == null ? undefined : json['kmsProps'], + 'doc': json['doc'] == null ? undefined : json['doc'], + 'shared': json['shared'] == null ? undefined : json['shared'], + }; } export function UpdateKekRequestToJSON(json: any): UpdateKekRequest { - return UpdateKekRequestToJSONTyped(json, false); + return UpdateKekRequestToJSONTyped(json, false); } -export function UpdateKekRequestToJSONTyped( - value?: UpdateKekRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UpdateKekRequestToJSONTyped(value?: UpdateKekRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kmsProps: value["kmsProps"], - doc: value["doc"], - shared: value["shared"], - }; + return { + + 'kmsProps': value['kmsProps'], + 'doc': value['doc'], + 'shared': value['shared'], + }; } + diff --git a/src/clients/schemaRegistryRest/models/index.ts b/src/clients/schemaRegistryRest/models/index.ts index 3882144773..e8902c5498 100644 --- a/src/clients/schemaRegistryRest/models/index.ts +++ b/src/clients/schemaRegistryRest/models/index.ts @@ -1,33 +1,33 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ClusterConfig"; -export * from "./CompatibilityCheckResponse"; -export * from "./Config"; -export * from "./ConfigDefaultMetadata"; -export * from "./ConfigDefaultRuleSet"; -export * from "./ConfigOverrideMetadata"; -export * from "./ConfigOverrideRuleSet"; -export * from "./ConfigUpdateRequest"; -export * from "./CreateDekRequest"; -export * from "./CreateKekRequest"; -export * from "./Dek"; -export * from "./ErrorMessage"; -export * from "./ExporterConfigResponse"; -export * from "./ExporterReference"; -export * from "./ExporterResponse"; -export * from "./ExporterStatusResponse"; -export * from "./ExporterUpdateRequest"; -export * from "./Kek"; -export * from "./Metadata"; -export * from "./Mode"; -export * from "./ModeUpdateRequest"; -export * from "./RegisterExporterRequest"; -export * from "./RegisterSchemaRequest"; -export * from "./RegisterSchemaResponse"; -export * from "./Rule"; -export * from "./RuleSet"; -export * from "./Schema"; -export * from "./SchemaReference"; -export * from "./SchemaString"; -export * from "./SubjectVersion"; -export * from "./UpdateKekRequest"; +export * from './ClusterConfig'; +export * from './CompatibilityCheckResponse'; +export * from './Config'; +export * from './ConfigDefaultMetadata'; +export * from './ConfigDefaultRuleSet'; +export * from './ConfigOverrideMetadata'; +export * from './ConfigOverrideRuleSet'; +export * from './ConfigUpdateRequest'; +export * from './CreateDekRequest'; +export * from './CreateKekRequest'; +export * from './Dek'; +export * from './ErrorMessage'; +export * from './ExporterConfigResponse'; +export * from './ExporterReference'; +export * from './ExporterResponse'; +export * from './ExporterStatusResponse'; +export * from './ExporterUpdateRequest'; +export * from './Kek'; +export * from './Metadata'; +export * from './Mode'; +export * from './ModeUpdateRequest'; +export * from './RegisterExporterRequest'; +export * from './RegisterSchemaRequest'; +export * from './RegisterSchemaResponse'; +export * from './Rule'; +export * from './RuleSet'; +export * from './Schema'; +export * from './SchemaReference'; +export * from './SchemaString'; +export * from './SubjectVersion'; +export * from './UpdateKekRequest'; diff --git a/src/clients/schemaRegistryRest/runtime.ts b/src/clients/schemaRegistryRest/runtime.ts index 0b1335049f..ded6f84996 100644 --- a/src/clients/schemaRegistryRest/runtime.ts +++ b/src/clients/schemaRegistryRest/runtime.ts @@ -5,85 +5,83 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const BASE_PATH = "https://psrc-00000.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } diff --git a/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml b/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml index 347b11dcd2..8bc61e593a 100644 --- a/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml +++ b/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml @@ -3,6 +3,10 @@ openapi: 3.0.0 info: title: SQL API v1 version: 0.0.1 + contact: + name: Flink + url: https://confluent.slack.com/app_redirect?channel=flink-ccloud + email: flink-control-plane@confluent.io x-api-id: a19bfe13-af66-493b-930a-5b7664bf52b7 x-audience: external-public x-tag-group: SQL API (%s) @@ -47,8 +51,8 @@ paths: required: false schema: type: string - x-extensible-enum: [AZUREML, AZUREOPENAI, BEDROCK, COUCHBASE, ELASTIC, - GOOGLEAI, MONGODB, OPENAI, PINECONE, SAGEMAKER, VERTEXAI] + x-extensible-enum: [AZUREML, AZUREOPENAI, A2A, ANTHROPIC, BEDROCK, CONFLUENT_JDBC, COSMOSDB, COUCHBASE, ELASTIC, + FIREWORKSAI, GOOGLEAI, MCP_SERVER, MONGODB, OPENAI, PINECONE, REST, S3VECTORS, SAGEMAKER, VERTEXAI] description: Filter the results by exact match for spec.connection_type - name: page_size in: query @@ -435,6 +439,7 @@ paths: - Statement Results (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statement Result. @@ -507,7 +512,9 @@ paths: schema: type: string example: lfcp-00000 - description: Filter the results by exact match for spec.compute_pool. + description: |- + Filter the results by exact match for spec.compute_pool_id. + When creating statements, if compute_pool_id is not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. - name: page_size in: query required: false @@ -536,6 +543,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statements. @@ -588,6 +596,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] requestBody: content: application/json: @@ -603,7 +612,6 @@ paths: type: object required: - statement - - compute_pool_id responses: '201': @@ -634,7 +642,6 @@ paths: required: - statement_name - statement - - compute_pool_id '400': $ref: '#/components/responses/BadRequestError' '401': @@ -687,6 +694,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statement. @@ -708,7 +716,6 @@ paths: required: - statement_name - statement - - compute_pool_id headers: X-Request-Id: schema: @@ -760,6 +767,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '202': description: A Statement is being deleted. @@ -816,6 +824,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '202': description: A Statement is being updated. @@ -857,7 +866,7 @@ paths: required: - resource_version patch: - x-lifecycle-stage: Early Access + x-lifecycle-stage: General Availability x-self-access: true x-request-access-name: SQL API v1 operationId: patchSqlv1Statement @@ -890,6 +899,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] requestBody: content: application/json-patch+json: @@ -913,7 +923,6 @@ paths: required: - statement_name - statement - - compute_pool_id '400': $ref: '#/components/responses/BadRequestError' '401': @@ -970,6 +979,7 @@ paths: - Statement Exceptions (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statement Exceptions. @@ -995,68 +1005,2077 @@ paths: '500': $ref: '#/components/responses/DefaultSystemError' -components: - schemas: - sql.v1.Connection: - type: object - description: |- - `Connection` models a reusable endpoint and auth token to authenticate the caller to - use that endpoint. - Only `OrganizationAdmins` and `EnvironmentAdmins` will have the permissions to create, update and delete `Connections`. - `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model - creation statements. - The API allows you to list, create, read, and delete your connections. - ## The Connections Model - + # List Materialized Tables + /sql/v1/organizations/{organization_id}/environments/{environment_id}/materialized-tables: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1MaterializedTables + summary: List all materialized tables + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted and paginated list of all materialized tables. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: page_size + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 100 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A list of Materialized Tables. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTableList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + # Create a materialized table + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables: + post: + x-lifecycle-stage: Preview + operationId: createSqlv1MaterializedTable + summary: Create a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Create a new Materialized Table. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTable' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - query + responses: + '201': + description: Materialized Table is being created + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + Location: + schema: + type: string + format: uri + example: https://flink.region.provider.confluent.cloud/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name} + description: Materialized Table uri + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTable' + - type: object + required: + - spec + - status + properties: + spec: + type: object + required: + - query + - compute_pool_id + - principal + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '409': + $ref: '#/components/responses/ConflictError' + '422': + $ref: '#/components/responses/ValidationError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + # Get, Update, and Delete a specific Materialized Table + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}: + get: + x-lifecycle-stage: Preview + operationId: getSqlv1MaterializedTable + summary: Read a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a specific Materialized Table by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: table_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Materialized Table + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: The requested Materialized Table. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTable' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + put: + x-lifecycle-stage: Preview + operationId: updateSqlv1MaterializedTable + summary: Update/Evolve a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to update a Materialized Table's mutable fields. + Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: table_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Materialized Table + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + description: The Materialized Table resource with updated spec fields. + required: true + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTable' + - type: object + required: + - spec + - name + - metadata + properties: + metadata: + type: object + required: + - resource_version + responses: + '201': + description: Materialized Table update accepted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTable' + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '409': + $ref: '#/components/responses/ConflictError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + delete: + x-lifecycle-stage: Preview + operationId: deleteSqlv1MaterializedTable + summary: Delete a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Delete a specific Materialized Table by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: table_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Materialized Table + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '202': + description: A Materialized Table is being deleted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + # Materialized Table Versions API + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1MaterializedTableVersions + summary: List all the versions of a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - in: path + name: table_name + required: true + schema: + type: string + description: The unique identifier for the Materialized Table. + - name: page_size + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 100 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Materialized Table Versions (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A list of Materialized Table Versions. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersionList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions/{version}: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: getSqlv1MaterializedTableVersion + summary: Read a materialized table version + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a specific version of a Materialized Table. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - in: path + name: table_name + required: true + schema: + type: string + description: The unique identifier for the Materialized Table. + - in: path + name: version + required: true + schema: + type: integer + format: int32 + minimum: 1 + description: The version number of the Materialized Table. + tags: + - Materialized Table Versions (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: The requested Materialized Table Version. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersion' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + # List Agents + /sql/v1/organizations/{organization_id}/environments/{environment_id}/agents: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1Agents + summary: List all agents + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted and paginated list of all agents. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: page_size + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 100 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A list of Agents. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.AgentList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + # Create an agent + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents: + post: + x-lifecycle-stage: Preview + operationId: createSqlv1Agent + summary: Create an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to create an Agent. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Agent' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - model + - prompt + responses: + '200': + description: Agent. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + Location: + schema: + type: string + format: uri + example: https://flink.region.provider.confluent.cloud/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name} + description: Agent uri + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Agent' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - model + - prompt + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '409': + $ref: '#/components/responses/ConflictError' + '422': + $ref: '#/components/responses/ValidationError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + # Get, Update, and Delete a specific Agent + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}: + get: + x-lifecycle-stage: Preview + operationId: getSqlv1Agent + summary: Read an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a specific Agent by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: agent_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Agent + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: The requested Agent. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.Agent' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + put: + x-lifecycle-stage: Preview + operationId: updateSqlv1Agent + summary: Alter an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to update an Agent's mutable fields. + Mutable fields include: `description`, `model`, `prompt`, and `properties`. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: agent_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Agent + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + description: The Agent resource with updated spec fields. + required: true + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Agent' + - type: object + required: + - spec + - name + - metadata + properties: + metadata: + type: object + required: + - resource_version + responses: + '200': + description: Agent has been updated. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.Agent' + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '409': + $ref: '#/components/responses/ConflictError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + delete: + x-lifecycle-stage: Preview + operationId: deleteSqlv1Agent + summary: Delete an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Delete a specific Agent by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: agent_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Agent + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A Agent has been deleted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + + # Tools API + /sql/v1/organizations/{organization_id}/environments/{environment_id}/tools: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + post: + x-lifecycle-stage: Preview + x-self-access: false + x-request-access-name: SQL API v1 + operationId: createSqlv1Tool + summary: Create a Tool + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to create a Tool. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Tool' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - connection + + responses: + '201': + description: A Tool has been successfully created. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + Location: + schema: + type: string + format: uri + example: https://flink.region.provider.confluent.cloud/sql/v1/organizations/{organization_id}/environments/{environment_id}/tools/{name} + description: Tool resource uri + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Tool' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - connection + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '409': + $ref: '#/components/responses/ConflictError' + '422': + $ref: '#/components/responses/ValidationError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1Tools + summary: List of Tools + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted, filtered, paginated list of all Tools. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: database_name + required: true + schema: + type: string + description: The name of the database. + - name: page_size + in: query + required: false + schema: + type: integer + default: 10 + maximum: 100 + x-max-page-items: 500 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + responses: + '200': + description: Tools. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.ToolList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: getSqlv1Tool + summary: Read a Tool + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to read a Tool. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: database_name + in: path + required: true + schema: + type: string + description: The name of the database. + - name: tool_name + in: path + required: true + schema: + type: string + description: The user provided name of the Tool. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + responses: + '200': + description: Tool. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Tool' + - type: object + required: + - api_version + - kind + - metadata + - name + - spec + properties: + spec: + type: object + required: + - connection + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + delete: + x-lifecycle-stage: Preview + x-self-access: false + x-request-access-name: SQL API v1 + operationId: deleteSqlv1Tool + summary: Delete a Tool + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to delete a Tool. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: database_name + in: path + required: true + schema: + type: string + description: The name of the database. + - name: tool_name + in: path + required: true + schema: + type: string + description: The user provided name of the Tool. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + responses: + '200': + description: A Tool has been deleted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + +components: + schemas: + sql.v1.MaterializedTable: + type: object + description: Represents a Materialized Table resource. + required: + - api_version + - kind + - metadata + - name + - organization_id + - environment_id + - spec + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - MaterializedTable + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - type: object + properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/databases/lkc-123/materialized-tables/high-value-orders + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + labels: + type: object + additionalProperties: + type: string + name: + type: string + description: The user-provided name of the resource, unique within this environment. + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + maxLength: 100 + example: "high-value-orders" + x-immutable: true + organization_id: + type: string + format: uuid + description: The unique identifier for the organization. + x-immutable: true + readOnly: true + environment_id: + type: string + description: The unique identifier for the environment. + x-immutable: true + readOnly: true + spec: + $ref: '#/components/schemas/sql.v1.MaterializedTableSpec' + status: + readOnly: true + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTableStatus' + + sql.v1.MaterializedTableList: + type: object + description: A list of Materialized Table resources. + required: + - api_version + - kind + - metadata + - data + properties: + api_version: + type: string + enum: + - sql/v1 + readOnly: true + kind: + type: string + enum: + - MaterializedTableList + readOnly: true + metadata: + $ref: '#/components/schemas/ListMeta' + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTable' + uniqueItems: true + + sql.v1.MaterializedTableSpec: + type: object + description: The specifications of the Materialized Table. + properties: + kafka_cluster_id: + type: string + description: The ID of Kafka cluster hosting the Materialized Table's topic. Populated from the `kafka_cluster_id` path parameter on creation. + example: "lkc-12345" + readOnly: true # Populated from path + compute_pool_id: + type: string + description: |- + The id associated with the compute pool in context. + If not specified, the materialized table will use the default compute pool. The default pool is automatically determined by the system. + example: "lfcp-123" + principal: + type: string + description: The id of a principal this Materialized Table query runs as. + example: "sa-abc123" + maxLength: 255 + stopped: + type: boolean + description: Indicates whether the Materialized Table query should be stopped. + example: false + table_options: + type: object + description: Defines configuration properties for the table, equivalent to the SQL 'WITH' clause + additionalProperties: + type: string + maxProperties: 8192 + session_options: + type: object + description: Session configurations equivalent to the SQL 'SET' statement. + additionalProperties: + type: string + maxProperties: 8192 + columns: + type: array + description: Details of each column in Materialized Table resource. If columns are not specified, we infer from query. If it's specified it must be compatible with the types in the query. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableColumnDetails' + watermark: + $ref: '#/components/schemas/sql.v1.MaterializedTableWatermark' + constraints: + type: array + description: Specify table constraints. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableConstraint' + distributed_by: + $ref: '#/components/schemas/sql.v1.MaterializedTableDistribution' + query: + type: string + description: Contains the query section (usually starting with a SELECT) of the latest Materialized Table. + example: "SELECT user_id, product_id, price, quantity FROM orders WHERE price > 1000;" + maxLength: 131072 + + sql.v1.MaterializedTableStatus: + type: object + description: The status of the Materialized Table. + properties: + phase: + type: string + x-extensible-enum: [PENDING, RUNNING, COMPLETED, DELETING, FAILING, FAILED, CREATING, ALTERING, DEGRADED, STOPPING, STOPPED] + description: The lifecycle phase of the materialized table. + example: RUNNING + detail: + type: string + description: Optional. Human-readable description of phase. + example: "Materialized table is running." + warnings: + type: array + description: List of warnings encountered during materialized table execution. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableWarning' + creation_statement: + type: string + description: Entire Materialized Table statement as submitted by user e.g CREATE OR ALTER MATERIALIZED TABLE ... + example: "CREATE OR ALTER MATERIALIZED TABLE high-value-orders AS SELECT user_id, product_id, price, quantity FROM orders WHERE price > 1000;" + scaling_status: + $ref: '#/components/schemas/sql.v1.ScalingStatus' + version: + type: integer + format: int32 + minimum: 1 + description: Represents the evolution history of the Materialized Table. The current value indicates the latest version. + example: 3 + + sql.v1.MaterializedTableVersion: + type: object + description: Represents a specific version of a Materialized Table resource. + required: + - api_version + - kind + - metadata + - name + - organization_id + - environment_id + - spec + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - MaterializedTableVersion + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - type: object + properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-123/environments/env-123/databases/lkc-123/materialized-tables/high-value-orders/versions/4 + name: + type: string + description: | + The resource version name, unique within the Kafka cluster. + Name conforms to DNS Subdomain (RFC 1123). + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + maxLength: 100 + example: "mt-123-v4" + readOnly: true + organization_id: + type: string + format: uuid + description: The unique identifier for the organization. + x-immutable: true + readOnly: true + environment_id: + type: string + description: The unique identifier for the environment. + x-immutable: true + readOnly: true + spec: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersionSpec' + + sql.v1.MaterializedTableVersionList: + type: object + description: A list of Materialized Table Version resources. + required: + - api_version + - kind + - metadata + - data + properties: + api_version: + type: string + enum: + - sql/v1 + readOnly: true + kind: + type: string + enum: + - MaterializedTableVersionList + readOnly: true + metadata: + $ref: '#/components/schemas/ListMeta' + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersion' + uniqueItems: true + + sql.v1.MaterializedTableVersionSpec: + type: object + description: The specifications of the Materialized Table Version. + required: + - version + - statement + properties: + version: + type: integer + format: int32 + minimum: 1 + description: The version number of the Materialized Table. + example: 4 + readOnly: true + statement: + type: string + description: | + The full SQL statement for the materialized table as generated by SHOW CREATE MATERIALIZED TABLE at the time of the evolution. + example: "CREATE OR ALTER MATERIALIZED TABLE orders AS SELECT user_id, product_id, price FROM orders;" + readOnly: true + maxLength: 131072 + changes: + type: array + description: Changes affecting resources since the previous version. + items: + $ref: '#/components/schemas/sql.v1.ResourceChange' + readOnly: true + + sql.v1.ResourceChange: + type: object + description: Details of a change to a specific resource. + required: + - kind + - environment_locator + - database_locator + - name + - details + properties: + kind: + type: string + x-extensible-enum: [MATERIALIZED_TABLE, TABLE, VIEW, FUNCTION] + description: The type of resource that was changed. + example: MATERIALIZED_TABLE + environment_locator: + type: string + description: The environment containing the resource. Can be either the environment name or ID, depending on how it is referenced in the SQL statement text. + example: "env-abc" + database_locator: + type: string + description: The database containing the resource. Can be either the database name or ID, depending on how it is referenced in the SQL statement text. + example: "lkc-123" + name: + type: string + description: The name of the resource, unique within its scope (environment and database). + example: "orders" + details: + type: array + description: Human-readable descriptions of the changes made to this resource. + items: + type: string + example: ["Column 'product_name: VARCHAR' added", "Column 'product_id: BIGINT' added"] + readOnly: true + + sql.v1.MaterializedTableColumnDetails: + type: object + description: Details of a column in the Materialized Table. + discriminator: + propertyName: kind + mapping: + Physical: '#/components/schemas/sql.v1.PhysicalColumn' + Metadata: '#/components/schemas/sql.v1.MetadataColumn' + Computed: '#/components/schemas/sql.v1.ComputedColumn' + oneOf: + - $ref: '#/components/schemas/sql.v1.PhysicalColumn' + - $ref: '#/components/schemas/sql.v1.MetadataColumn' + - $ref: '#/components/schemas/sql.v1.ComputedColumn' + + sql.v1.ColumnCommon: + type: object + required: + - name + - type + properties: + name: + type: string + description: The name of the column. + type: + $ref: '#/components/schemas/DataType' + comment: + type: string + description: A comment or description for the column. + + sql.v1.PhysicalColumn: + description: Physical columns define the structure of the table and the data types of its fields. + allOf: + - $ref: '#/components/schemas/sql.v1.ColumnCommon' + - type: object + required: + - kind + properties: + name: + example: user_id + type: + example: + type: "BIGINT" + nullable: false + kind: + type: string + description: The kind of column. + enum: [Physical] + example: Physical + + sql.v1.MetadataColumn: + description: Metadata columns reference system properties. + allOf: + - $ref: '#/components/schemas/sql.v1.ColumnCommon' + - type: object + required: + - kind + - metadata_key + properties: + name: + example: table_offset + type: + example: + type: "BIGINT" + nullable: false + kind: + type: string + description: The kind of column. + enum: [Metadata] + example: Metadata + metadata_key: + type: string + description: The system metadata key to reference. + example: "offset" + virtual: + type: boolean + description: Indicates if the metadata column is virtual. + default: false + example: true + + sql.v1.ComputedColumn: + description: Computed columns are generated via an expression. + allOf: + - $ref: '#/components/schemas/sql.v1.ColumnCommon' + - type: object + required: + - kind + - expression + properties: + name: + example: total_price + type: + example: + type: "DECIMAL" + nullable: false + precision: 10 + scale: 2 + kind: + type: string + description: The kind of column. + enum: [Computed] + example: Computed + expression: + type: string + description: The SQL expression used to compute the column value. + example: "quantity * price" + virtual: + type: boolean + description: Indicates if the computed column is virtual. + default: false + example: true + + sql.v1.MaterializedTableWatermark: + type: object + description: Watermark strategy for the Materialized Table resource. + properties: + column_name: + type: string + example: "event_timestamp" + expression: + type: string + example: "event_timestamp - INTERVAL '5' SECOND" + + sql.v1.MaterializedTableConstraint: + type: object + description: A constraint on the materialized table. + properties: + name: + type: string + example: "pk_orders" + kind: + type: string + x-extensible-enum: [PRIMARY_KEY] + description: The type of constraint. + example: PRIMARY_KEY + column_names: + type: array + items: + type: string + example: ["user_id", "product_id"] + enforced: + type: boolean + description: Whether the constraint is enforced. + default: false + + sql.v1.MaterializedTableDistribution: + type: object + description: Distribution (bucket by) strategy. + properties: + column_names: + type: array + items: + type: string + example: ["user_id"] + buckets: + type: integer + format: int32 + minimum: 1 + default: 6 + description: The number of buckets. + example: 12 + sql.v1.MaterializedTableWarning: + type: object + description: Represents a non-fatal issue encountered during materialized table processing. + allOf: + - $ref: '#/components/schemas/sql.v1.StatementWarning' + + sql.v1.Connection: + type: object + description: |- + `Connection` models a reusable endpoint and auth token to authenticate the caller to + use that endpoint. + Only `OrganizationAdmins` and `EnvironmentAdmins` will have the permissions to create, update and delete `Connections`. + `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model + creation statements. + The API allows you to list, create, read, and delete your connections. + ## The Connections Model + + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - Connection + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/connections/my-openai-connection + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + name: + type: string + example: my-openai-connection + description: The user provided name of the resource, unique within this environment. + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + x-immutable: true + maxLength: 100 + spec: + $ref: '#/components/schemas/sql.v1.ConnectionSpec' + status: + $ref: '#/components/schemas/sql.v1.ConnectionStatus' + + sql.v1.ConnectionList: + type: object + description: |- + `Connection` models a reusable endpoint and auth token to authenticate the caller to + use that endpoint. + Only `OrgAdmins` and `EnvAdmins` will have the permissions to create, update and delete `Connections`. + `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model + creation statements. + The API allows you to list, create, read, and delete your connections. + ## The Connection Model + + required: + - api_version + - kind + - metadata + - data + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - ConnectionList + metadata: + allOf: + - $ref: '#/components/schemas/ListMeta' + - properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/connections + first: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections + last: + example: "" + prev: + example: "" + next: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections?page_token=UvmDWOB1iwfAIBPj6EYb + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + allOf: + - $ref: '#/components/schemas/sql.v1.Connection' + - type: object + required: + - api_version + - kind + - metadata + - spec + - status + - name + - organization_id + - environment_id + properties: + spec: + type: object + required: + - connection_type + - endpoint + uniqueItems: true + + sql.v1.ConnectionStatus: + type: object + required: + - phase + description: The status of the Connection + properties: + phase: + type: string + x-extensible-enum: [ACTIVE, UNREACHABLE, INVALID_AUTH] + description: | + Describes the status of the connection: + + READY: The Connection is usable; + + UNREACHABLE: The Connection endpoint is unreachable; + + INVALID_AUTH: The Connection auth token is invalid; + example: READY + readOnly: true + detail: + type: string + description: Details about why connection transitioned into a given status. + example: 'Lookup failed: ai.openai.com' + readOnly: true + readOnly: true + + sql.v1.PlaintextProvider: + type: object + description: | + Describes a sensitive piece of information passed in plaintext. + + Confluent only accepts authentication tokens of supported model providers from OrgAdmins and EnvAdmins. + For now, only 'PlainText' provider is supported. It stores authentication token details as opaque bytes in an encrypted form. + This option offers limited security as it only provides a single level of encryption. + properties: + kind: + description: | + Plaintext Provider Kind Type + type: string + enum: [PlaintextProvider] + x-immutable: true + data: + description: | + Authentication token in plaintext JSON string. + For composite tokens, provide them as JSON. + This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. + + Scoped to an endpoint of a `Connection` resource. + type: string + format: byte + + sql.v1.ConnectionSpec: + type: object + description: Encapsulates the model provider access details + properties: + connection_type: + type: string + example: OPENAI + description: The type of this connection. + x-immutable: true + x-extensible-enum: [AZUREML, AZUREOPENAI, A2A, ANTHROPIC, BEDROCK, CONFLUENT_JDBC, COSMOSDB, COUCHBASE, ELASTIC, + FIREWORKSAI, GOOGLEAI, MCP_SERVER, MONGODB, OPENAI, PINECONE, REST, S3VECTORS, SAGEMAKER, VERTEXAI] + endpoint: + type: string + example: 'https://api.openai.com/v1/chat/completions' + description: The endpoint that is used to run model inferencing. + maxLength: 16384 + x-immutable: true + auth_data: + type: object + description: | + The vendor specific authentication token details + + The contents are stored as opaque bytes given in plaintext by an EnvAdmin. + In future, we would support more secure methods for distributing authentication tokens. + discriminator: + propertyName: kind + mapping: + PlaintextProvider: '#/components/schemas/sql.v1.PlaintextProvider' + oneOf: + - $ref: '#/components/schemas/sql.v1.PlaintextProvider' + x-immutable: false + x-enable-listmeta: true + x-enable-objectmeta: true + + + sql.v1.Agent: + type: object + description: Represents an Agent resource. + required: + - api_version + - kind + - metadata + - name + - organization_id + - environment_id + - spec + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - Agent + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - type: object + properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/databases/lkc-123/agents/chat-listener-agent + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + labels: + type: object + additionalProperties: + type: string + name: + type: string + description: The user-provided name of the agent, unique within this environment. + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + maxLength: 100 + example: "chat-listener-agent" + x-immutable: true + organization_id: + type: string + format: uuid + description: The unique identifier for the organization. + x-immutable: true + readOnly: true + environment_id: + type: string + description: The unique identifier for the environment. + x-immutable: true + readOnly: true + spec: + $ref: '#/components/schemas/sql.v1.AgentSpec' + status: + readOnly: true + allOf: + - $ref: '#/components/schemas/sql.v1.AgentStatus' + + sql.v1.AgentList: + type: object + description: A list of Agent resources. + required: + - api_version + - kind + - metadata + - data properties: api_version: type: string enum: - sql/v1 - description: APIVersion defines the schema version of this representation of a resource. - example: sql/v1 readOnly: true kind: type: string - description: Kind defines the object this REST resource represents. enum: - - Connection + - AgentList readOnly: true metadata: - allOf: - - $ref: '#/components/schemas/ObjectMeta' - - properties: - self: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/connections/my-openai-connection - uid: - example: 12345678-1234-1234-1234-123456789012 - resource_version: - example: a23av - resource_name: - example: "" - name: + $ref: '#/components/schemas/ListMeta' + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + $ref: '#/components/schemas/sql.v1.Agent' + uniqueItems: true + + sql.v1.AgentSpec: + type: object + description: The specifications of the Agent. + properties: + description: type: string - example: my-openai-connection - description: The user provided name of the resource, unique within this environment. - pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' - x-immutable: true - maxLength: 100 - spec: - $ref: '#/components/schemas/sql.v1.ConnectionSpec' - status: - $ref: '#/components/schemas/sql.v1.ConnectionStatus' + example: 'An agent that listens to chat messages and creates issues' + description: The description of the agent. + model: + type: string + example: chat_listener + description: The name of the model the agent uses for inferencing. + prompt: + type: string + example: Create an issue from the content using bebb0fa3-e084-412d-a000-b02280558318 + as the team ID + description: The instruction prompt that guides the agent's behavior. + maxLength: 65536 + tools: + type: array + description: The list of tools available to the agent. + items: + type: string + example: + - linear-mcp-tool + properties: + type: object + description: A set of key-value option pairs that configure the agent's + behavior. + additionalProperties: + type: string + example: + max_iterations: '5' - sql.v1.ConnectionList: + sql.v1.AgentStatus: + type: object + description: The status of the Agent. + properties: + phase: + type: string + x-extensible-enum: [READY, RUNNING] + description: | + Describes the status of the agent: + + READY: The Agent is created; + + RUNNING: The Agent is created and running in a query; + example: RUNNING + + sql.v1.ToolList: type: object description: |- - `Connection` models a reusable endpoint and auth token to authenticate the caller to - use that endpoint. - Only `OrgAdmins` and `EnvAdmins` will have the permissions to create, update and delete `Connections`. - `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model - creation statements. - The API allows you to list, create, read, and delete your connections. - ## The Connection Model - + `Tool` models a reusable tool resource backed by a connection that can be referenced + by agents to perform actions. + The API allows you to create your tools. + ## The Tool Model + required: - api_version - kind @@ -1073,129 +3092,135 @@ components: type: string description: Kind defines the object this REST resource represents. enum: - - ConnectionList + - ToolList metadata: allOf: - $ref: '#/components/schemas/ListMeta' - properties: self: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/connections + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/databases/my-database/tools first: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/databases/my-database/tools last: example: "" prev: example: "" next: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections?page_token=UvmDWOB1iwfAIBPj6EYb + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/databases/my-database/tools?page_token=UvmDWOB1iwfAIBPj6EYb data: type: array description: A data property that contains an array of resource items. Each entry in the array is a separate resource. items: allOf: - - $ref: '#/components/schemas/sql.v1.Connection' + - $ref: '#/components/schemas/sql.v1.Tool' - type: object required: - api_version - kind - metadata + - name - spec - status - - name - organization_id - environment_id properties: spec: type: object required: - - connection_type - - endpoint + - connection uniqueItems: true - sql.v1.ConnectionStatus: + sql.v1.Tool: type: object - required: - - phase - description: The status of the Connection + description: |- + `Tool` models a reusable tool resource backed by a connection that can be referenced + by agents to perform actions. + The API allows you to create your tools. + ## The Tools Model + properties: - phase: + api_version: type: string - x-extensible-enum: [ACTIVE, UNREACHABLE, INVALID_AUTH] - description: | - Describes the status of the connection: - - READY: The Connection is usable; - - UNREACHABLE: The Connection endpoint is unreachable; - - INVALID_AUTH: The Connection auth token is invalid; - example: READY + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 readOnly: true - detail: + kind: type: string - description: Details about why connection transitioned into a given status. - example: 'Lookup failed: ai.openai.com' + description: Kind defines the object this REST resource represents. + enum: + - Tool readOnly: true - readOnly: true - - sql.v1.PlaintextProvider: - type: object - description: | - Describes a sensitive piece of information passed in plaintext. - - Confluent only accepts authentication tokens of supported model providers from OrgAdmins and EnvAdmins. - For now, only 'PlainText' provider is supported. It stores authentication token details as opaque bytes in an encrypted form. - This option offers limited security as it only provides a single level of encryption. - properties: - kind: - description: | - Plaintext Provider Kind Type + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/tools/linear-mcp-tool + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + name: type: string - enum: [PlaintextProvider] + example: linear-mcp-tool + description: The user provided name of the tool, unique within this environment. + pattern: '[a-z0-9_]([-a-z0-9_]*[a-z0-9_])?' x-immutable: true - data: - description: | - Authentication token in plaintext JSON string. - For composite tokens, provide them as JSON. - This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. + maxLength: 100 + spec: + $ref: '#/components/schemas/sql.v1.ToolSpec' + status: + $ref: '#/components/schemas/sql.v1.ToolStatus' - Scoped to an endpoint of a `Connection` resource. + sql.v1.ToolSpec: + type: object + description: The spec of the Tool + properties: + connection: type: string - format: byte + example: linear-mcp-connection-streamable + description: The name of the connection this tool uses. + options: + type: object + description: A set of key-value option pairs that configure the tool's behavior. + additionalProperties: + type: string + example: + type: 'mcp' + allowed_tools: 'create_issue, list_issues' + request_timeout: '30' + x-enable-listmeta: true + x-enable-objectmeta: true - sql.v1.ConnectionSpec: + sql.v1.ToolStatus: type: object - description: Encapsulates the model provider access details + required: + - phase + description: The status of the Tool properties: - connection_type: - type: string - example: OPENAI - description: The type of this connection. - x-immutable: true - x-extensible-enum: [OPENAI, AZUREML, AZUREOPENAI, BEDROCK, SAGEMAKER, GOOGLEAI, VERTEXAI, MONGODB, PINECONE, - ELASTIC] - endpoint: + phase: type: string - example: 'https://api.openai.com/v1/chat/completions' - description: The endpoint that is used to run model inferencing. - maxLength: 16384 - x-immutable: true - auth_data: - type: object + x-extensible-enum: [ACTIVE, INACTIVE, ERROR] description: | - The vendor specific authentication token details + Describes the status of the tool: - The contents are stored as opaque bytes given in plaintext by an EnvAdmin. - In future, we would support more secure methods for distributing authentication tokens. - discriminator: - propertyName: kind - mapping: - PlaintextProvider: '#/components/schemas/sql.v1.PlaintextProvider' - oneOf: - - $ref: '#/components/schemas/sql.v1.PlaintextProvider' - x-immutable: false - x-enable-listmeta: true - x-enable-objectmeta: true + ACTIVE: The Tool is usable; + + INACTIVE: The Tool is not currently active; + + ERROR: The Tool encountered an error; + example: ACTIVE + readOnly: true + detail: + type: string + description: Details about why the tool transitioned into a given status. + example: 'Tool is ready' + readOnly: true + readOnly: true sql.v1.Statement: type: object @@ -1235,7 +3260,7 @@ components: labels: type: object additionalProperties: - type: string + type: string name: type: string example: sql123 @@ -1288,11 +3313,19 @@ components: readOnly: true scaling_status: $ref: '#/components/schemas/sql.v1.ScalingStatus' + state_limit_status: + $ref: '#/components/schemas/sql.v1.StateLimitStatus' detail: type: string description: Details about the execution status of this statement. example: Statement is running successfully readOnly: true + warnings: + type: array + description: List of warnings encountered during statement execution. + items: + $ref: '#/components/schemas/sql.v1.StatementWarning' + readOnly: true traits: $ref: '#/components/schemas/sql.v1.StatementTraits' network_kind: @@ -1320,10 +3353,61 @@ components: latest_offsets_timestamp: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which the Kafka topic offsets were added to the statement status. It is represented in RFC3339 format and is in UTC. readOnly: true + end_time: + type: string + format: date-time + example: '2025-03-19T01:02:03-04:05' + description: | + The date and time in UTC (represented as RFC3339 format) at which the statement reached its final terminal state. + This field is set when the Phase is COMPLETED, FAILED, or STOPPED. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + duration: + type: string + format: duration + example: 'PT2H30M' + description: | + The total elapsed time (represented as ISO 8601 format) from when the statement transitioned from + PENDING to RUNNING until it reached a final terminal state. This field is calculated and set when + the Phase is COMPLETED, FAILED, or STOPPED. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + affected_resource: + type: object + description: | + A reference to the resource created by this statement, if any. This field is set when a statement + (e.g., CREATE MATERIALIZED TABLE) results in a new user-facing resource. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + required: + - kind + - environment_id + - resource_name + properties: + kind: + type: string + x-extensible-enum: [MATERIALIZED_TABLE] + description: The kind of resource that was created. + example: MATERIALIZED_TABLE + environment_id: + type: string + description: The unique identifier for the environment containing the + resource. + example: env-abc + database_id: + type: string + description: | + The unique identifier for the database containing the resource. + Only present for resource kinds that are scoped to a database. + example: lkc-123 + resource_name: + type: string + description: The name of the created resource, unique within its scope. + example: my-materialized-table readOnly: true MultipleSearchFilter: description: Filter a collection by a string search for one or more values @@ -1357,6 +3441,12 @@ components: type: integer schema: $ref: '#/components/schemas/sql.v1.ResultSchema' + connection_refs: + type: array + description: The names of connections that the SQL statement references (e.g., in FROM clauses). + items: + type: string + example: ["my-postgres-connection", "my-kafka-connection"] readOnly: true sql.v1.StatementList: @@ -1420,7 +3510,6 @@ components: type: object required: - statement - - compute_pool_id uniqueItems: true sql.v1.StatementResult: @@ -1500,11 +3589,13 @@ components: description: A map (key-value pairs) of statement properties. additionalProperties: type: string - maximum: 8192 + maxProperties: 8192 compute_pool_id: type: string example: fcp-00000 - description: The id associated with the compute pool in context. + description: |- + The id associated with the compute pool in context. + If not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. maxLength: 255 principal: type: string @@ -1512,18 +3603,19 @@ components: description: The id of a principal this statement runs as. maxLength: 255 x-immutable: true - authorized_principals: - type: array - example: [sa-abc123, sa-abc456] - description: The list of ids of the principals granting permissions to run this statement. - items: - type: string - maxLength: 255 - x-immutable: true stopped: type: boolean description: Indicates whether the statement should be stopped. example: false + execution_mode: + type: string + example: streaming + description: | + The execution mode of the statement. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + maxLength: 255 + readOnly: true x-enable-listmeta: true x-enable-objectmeta: true @@ -1546,7 +3638,7 @@ components: updated_at: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. uid: @@ -1577,7 +3669,7 @@ components: updated_at: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. uid: @@ -1660,6 +3752,43 @@ components: type: string readOnly: true + sql.v1.StateLimitStatus: + description: State limit status for this statement. + properties: + state_limit_state: + description: | + OK: The statement is within state limits. + + APPROACHING_SOFT_LIMIT: The statement is approaching soft state limits. + + EXCEEDING_SOFT_LIMIT: The statement is exceeding soft state limits. + + APPROACHING_HARD_LIMIT: The statement is approaching hard state limits. + + EXCEEDING_HARD_LIMIT: The statement is exceeding hard state limits. + example: OK + readOnly: true + type: string + x-extensible-enum: + - OK + - APPROACHING_SOFT_LIMIT + - EXCEEDING_SOFT_LIMIT + - APPROACHING_HARD_LIMIT + - EXCEEDING_HARD_LIMIT + last_updated: + description: The last time the state limit status was updated. + example: 1996-03-19T01:02:03-04:05 + format: date-time + readOnly: true + type: string + detail: + description: Details about why state limit status is in its current state. + example: The statement is within state limits. + type: string + readOnly: true + readOnly: true + type: object + sql.v1.ResultSchema: type: object description: "The table columns of the results schema." @@ -1735,6 +3864,9 @@ components: type: integer format: int32 description: "The fractional precision of the data type (if applicable)." + class_name: + type: string + description: "The class name of the structured data type (if applicable)." required: - type - nullable @@ -1801,6 +3933,47 @@ components: parameter: description: A string indicating which query parameter caused the error. type: string + sql.v1.StatementWarning: + type: object + description: Represents a non-fatal issue encountered during statement processing. + required: + - severity + - created_at + - reason + - message + properties: + severity: + $ref: '#/components/schemas/sql.v1.WarningSeverity' + created_at: + type: string + format: date-time + description: The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + example: '2025-11-10T16:20:00Z' + readOnly: true + reason: + type: string + description: A machine-readable short, upper case summary delimited by underscore. + example: MISSING_WINDOW_START_END + message: + type: string + description: A human-readable string containing the description of the warning. + example: The statement is missing window start and end bounds which may lead to unbounded state growth. + + sql.v1.WarningSeverity: + type: string + x-extensible-enum: + - LOW + - MODERATE + - CRITICAL + description: | + Indicates the severity of the warning. + + LOW: Indicates a low severity warning and for informing the user. + + MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + + CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + example: MODERATE # Exceptions API Components @@ -1817,8 +3990,8 @@ components: sql.v1.StatementExceptionList: type: object description: |- - StatementExceptionList is a list of exceptions coming from FAILED or FAILING Statements created by - the SQL Statements API. + StatementExceptionList is a list of exceptions coming from FAILED or FAILING Statements created by + the SQL Statements API. required: - api_version - kind @@ -1867,7 +4040,7 @@ components: timestamp: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which the exception occurred. It is represented in RFC3339 format and is in UTC. readOnly: true @@ -1946,6 +4119,13 @@ components: description: | Authenticate with resource-specific API Keys using HTTP Basic Auth. Treat the resource-specific API Key ID as the username and resource-specific API Key Secret as the password. + external-access-token: + type: oauth2 + description: Authenticate with OAuth 2.0. + flows: + clientCredentials: + tokenUrl: https:///token + scopes: {} responses: BadRequestError: description: Bad Request @@ -2152,3 +4332,37 @@ tags: The API allows you to list, create, read, and delete your connections. ## The Connections Model + - name: Agents (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + `Agent` models an AI agent that uses a specified model, prompt, and set of tools + to autonomously perform tasks. + The API allows you to create your agents. + ## The Agents Model + + - name: Tools (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + `Tool` models a reusable tool resource backed by a connection that can be referenced + by agents to perform actions. + The API allows you to create your tools. + ## The Tools Model + + - name: Materialized Tables (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + `MaterializedTable` represents a core resource used to define and manage streaming SQL queries that persist results. + The API allows you to list, create, read, update, and delete your materialized tables. + ## The Materialized Table Model + + - name: Materialized Table Versions (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + `MaterializedTableVersion` represents a specific version of a Materialized Table, capturing the state and changes at that point in time. + The API allows you to list and read versions of your materialized tables. + ## The Materialized Table Version Model + \ No newline at end of file diff --git a/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts b/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts index 5624662793..69d7b9a988 100644 --- a/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts +++ b/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts @@ -12,106 +12,95 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { ProduceRequest, ProduceResponse } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + ProduceRequest, + ProduceResponse, +} from '../models/index'; import { - ProduceRequestFromJSON, - ProduceRequestToJSON, - ProduceResponseFromJSON, - ProduceResponseToJSON, -} from "../models/index"; + ProduceRequestFromJSON, + ProduceRequestToJSON, + ProduceResponseFromJSON, + ProduceResponseToJSON, +} from '../models/index'; export interface GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest { - cluster_id: string; - topic_name: string; - x_connection_id: string; - ProduceRequest: ProduceRequest; - dry_run?: boolean; + cluster_id: string; + topic_name: string; + x_connection_id: string; + ProduceRequest: ProduceRequest; + dry_run?: boolean; } /** - * + * */ export class ConfluentCloudProduceRecordsResourceApi extends runtime.BaseAPI { - /** - * Produce Record - */ - async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw( - requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', - ); - } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', - ); - } + /** + * Produce Record + */ + async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' + ); + } - if (requestParameters["x_connection_id"] == null) { - throw new runtime.RequiredError( - "x_connection_id", - 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', - ); - } + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' + ); + } - if (requestParameters["ProduceRequest"] == null) { - throw new runtime.RequiredError( - "ProduceRequest", - 'Required parameter "ProduceRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', - ); - } + if (requestParameters['x_connection_id'] == null) { + throw new runtime.RequiredError( + 'x_connection_id', + 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' + ); + } - const queryParameters: any = {}; + if (requestParameters['ProduceRequest'] == null) { + throw new runtime.RequiredError( + 'ProduceRequest', + 'Required parameter "ProduceRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' + ); + } - if (requestParameters["dry_run"] != null) { - queryParameters["dry_run"] = requestParameters["dry_run"]; - } + const queryParameters: any = {}; + + if (requestParameters['dry_run'] != null) { + queryParameters['dry_run'] = requestParameters['dry_run']; + } + + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; - headerParameters["Content-Type"] = "application/json"; + if (requestParameters['x_connection_id'] != null) { + headerParameters['x-connection-id'] = String(requestParameters['x_connection_id']); + } + + const response = await this.request({ + path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/records`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ProduceRequestToJSON(requestParameters['ProduceRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); + } - if (requestParameters["x_connection_id"] != null) { - headerParameters["x-connection-id"] = String(requestParameters["x_connection_id"]); + /** + * Produce Record + */ + async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/records` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ProduceRequestToJSON(requestParameters["ProduceRequest"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); - } - - /** - * Produce Record - */ - async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost( - requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } } diff --git a/src/clients/sidecar/apis/ConnectionsResourceApi.ts b/src/clients/sidecar/apis/ConnectionsResourceApi.ts index e298ea3c0c..1b6a0a884b 100644 --- a/src/clients/sidecar/apis/ConnectionsResourceApi.ts +++ b/src/clients/sidecar/apis/ConnectionsResourceApi.ts @@ -12,324 +12,268 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { Connection, ConnectionSpec, ConnectionsList, Failure } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + Connection, + ConnectionSpec, + ConnectionsList, + Failure, +} from '../models/index'; import { - ConnectionFromJSON, - ConnectionToJSON, - ConnectionSpecFromJSON, - ConnectionSpecToJSON, - ConnectionsListFromJSON, - ConnectionsListToJSON, - FailureFromJSON, - FailureToJSON, -} from "../models/index"; + ConnectionFromJSON, + ConnectionToJSON, + ConnectionSpecFromJSON, + ConnectionSpecToJSON, + ConnectionsListFromJSON, + ConnectionsListToJSON, + FailureFromJSON, + FailureToJSON, +} from '../models/index'; export interface GatewayV1ConnectionsIdDeleteRequest { - id: string; + id: string; } export interface GatewayV1ConnectionsIdGetRequest { - id: string; + id: string; } export interface GatewayV1ConnectionsIdPatchRequest { - id: string; - body: object; + id: string; + body: object; } export interface GatewayV1ConnectionsIdPutRequest { - id: string; - ConnectionSpec: ConnectionSpec; + id: string; + ConnectionSpec: ConnectionSpec; } export interface GatewayV1ConnectionsPostRequest { - ConnectionSpec: ConnectionSpec; - dry_run?: boolean; + ConnectionSpec: ConnectionSpec; + dry_run?: boolean; } /** - * + * */ export class ConnectionsResourceApi extends runtime.BaseAPI { - /** - * List Connections - */ - async gatewayV1ConnectionsGetRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/connections`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionsListFromJSON(jsonValue)); - } - - /** - * List Connections - */ - async gatewayV1ConnectionsGet( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ConnectionsGetRaw(initOverrides); - return await response.value(); - } - - /** - * Delete Connection - */ - async gatewayV1ConnectionsIdDeleteRaw( - requestParameters: GatewayV1ConnectionsIdDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdDelete().', - ); + + /** + * List Connections + */ + async gatewayV1ConnectionsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/connections`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionsListFromJSON(jsonValue)); + } + + /** + * List Connections + */ + async gatewayV1ConnectionsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ConnectionsGetRaw(initOverrides); + return await response.value(); + } + + /** + * Delete Connection + */ + async gatewayV1ConnectionsIdDeleteRaw(requestParameters: GatewayV1ConnectionsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdDelete().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/connections/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "DELETE", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete Connection - */ - async gatewayV1ConnectionsIdDelete( - requestParameters: GatewayV1ConnectionsIdDeleteRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.gatewayV1ConnectionsIdDeleteRaw(requestParameters, initOverrides); - } - - /** - * Get Connection - */ - async gatewayV1ConnectionsIdGetRaw( - requestParameters: GatewayV1ConnectionsIdGetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdGet().', - ); + /** + * Delete Connection + */ + async gatewayV1ConnectionsIdDelete(requestParameters: GatewayV1ConnectionsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.gatewayV1ConnectionsIdDeleteRaw(requestParameters, initOverrides); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/connections/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); - } - - /** - * Get Connection - */ - async gatewayV1ConnectionsIdGet( - requestParameters: GatewayV1ConnectionsIdGetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ConnectionsIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Patch Connection - */ - async gatewayV1ConnectionsIdPatchRaw( - requestParameters: GatewayV1ConnectionsIdPatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPatch().', - ); + /** + * Get Connection + */ + async gatewayV1ConnectionsIdGetRaw(requestParameters: GatewayV1ConnectionsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdGet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); } - if (requestParameters["body"] == null) { - throw new runtime.RequiredError( - "body", - 'Required parameter "body" was null or undefined when calling gatewayV1ConnectionsIdPatch().', - ); + /** + * Get Connection + */ + async gatewayV1ConnectionsIdGet(requestParameters: GatewayV1ConnectionsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ConnectionsIdGetRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/gateway/v1/connections/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "PATCH", - headers: headerParameters, - query: queryParameters, - body: requestParameters["body"] as any, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); - } - - /** - * Patch Connection - */ - async gatewayV1ConnectionsIdPatch( - requestParameters: GatewayV1ConnectionsIdPatchRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ConnectionsIdPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update Connection - */ - async gatewayV1ConnectionsIdPutRaw( - requestParameters: GatewayV1ConnectionsIdPutRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["id"] == null) { - throw new runtime.RequiredError( - "id", - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPut().', - ); + /** + * Patch Connection + */ + async gatewayV1ConnectionsIdPatchRaw(requestParameters: GatewayV1ConnectionsIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPatch().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling gatewayV1ConnectionsIdPatch().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: requestParameters['body'] as any, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); } - if (requestParameters["ConnectionSpec"] == null) { - throw new runtime.RequiredError( - "ConnectionSpec", - 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsIdPut().', - ); + /** + * Patch Connection + */ + async gatewayV1ConnectionsIdPatch(requestParameters: GatewayV1ConnectionsIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ConnectionsIdPatchRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/gateway/v1/connections/{id}`.replace( - `{${"id"}}`, - encodeURIComponent(String(requestParameters["id"])), - ), - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: ConnectionSpecToJSON(requestParameters["ConnectionSpec"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); - } - - /** - * Update Connection - */ - async gatewayV1ConnectionsIdPut( - requestParameters: GatewayV1ConnectionsIdPutRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ConnectionsIdPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create Connection - */ - async gatewayV1ConnectionsPostRaw( - requestParameters: GatewayV1ConnectionsPostRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["ConnectionSpec"] == null) { - throw new runtime.RequiredError( - "ConnectionSpec", - 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsPost().', - ); + /** + * Update Connection + */ + async gatewayV1ConnectionsIdPutRaw(requestParameters: GatewayV1ConnectionsIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPut().' + ); + } + + if (requestParameters['ConnectionSpec'] == null) { + throw new runtime.RequiredError( + 'ConnectionSpec', + 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsIdPut().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: ConnectionSpecToJSON(requestParameters['ConnectionSpec']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); } - const queryParameters: any = {}; + /** + * Update Connection + */ + async gatewayV1ConnectionsIdPut(requestParameters: GatewayV1ConnectionsIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ConnectionsIdPutRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create Connection + */ + async gatewayV1ConnectionsPostRaw(requestParameters: GatewayV1ConnectionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['ConnectionSpec'] == null) { + throw new runtime.RequiredError( + 'ConnectionSpec', + 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsPost().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['dry_run'] != null) { + queryParameters['dry_run'] = requestParameters['dry_run']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/gateway/v1/connections`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ConnectionSpecToJSON(requestParameters['ConnectionSpec']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } - if (requestParameters["dry_run"] != null) { - queryParameters["dry_run"] = requestParameters["dry_run"]; + /** + * Create Connection + */ + async gatewayV1ConnectionsPost(requestParameters: GatewayV1ConnectionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ConnectionsPostRaw(requestParameters, initOverrides); + return await response.value(); } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/gateway/v1/connections`, - method: "POST", - headers: headerParameters, - query: queryParameters, - body: ConnectionSpecToJSON(requestParameters["ConnectionSpec"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); - } - - /** - * Create Connection - */ - async gatewayV1ConnectionsPost( - requestParameters: GatewayV1ConnectionsPostRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ConnectionsPostRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/sidecar/apis/HandshakeResourceApi.ts b/src/clients/sidecar/apis/HandshakeResourceApi.ts index e9cf2e1ccd..daf83d686c 100644 --- a/src/clients/sidecar/apis/HandshakeResourceApi.ts +++ b/src/clients/sidecar/apis/HandshakeResourceApi.ts @@ -12,46 +12,45 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { SidecarAccessToken } from "../models/index"; -import { SidecarAccessTokenFromJSON, SidecarAccessTokenToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + SidecarAccessToken, +} from '../models/index'; +import { + SidecarAccessTokenFromJSON, + SidecarAccessTokenToJSON, +} from '../models/index'; /** - * + * */ export class HandshakeResourceApi extends runtime.BaseAPI { - /** - * Handshake - */ - async gatewayV1HandshakeGetRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/handshake`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SidecarAccessTokenFromJSON(jsonValue), - ); - } - - /** - * Handshake - */ - async gatewayV1HandshakeGet( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1HandshakeGetRaw(initOverrides); - return await response.value(); - } + + /** + * Handshake + */ + async gatewayV1HandshakeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/handshake`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SidecarAccessTokenFromJSON(jsonValue)); + } + + /** + * Handshake + */ + async gatewayV1HandshakeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1HandshakeGetRaw(initOverrides); + return await response.value(); + } + } diff --git a/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts b/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts index 9dad00a91d..438f173709 100644 --- a/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts +++ b/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts @@ -12,108 +12,90 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; import type { SimpleConsumeMultiPartitionRequest, SimpleConsumeMultiPartitionResponse, -} from "../models/index"; +} from '../models/index'; import { - SimpleConsumeMultiPartitionRequestFromJSON, - SimpleConsumeMultiPartitionRequestToJSON, - SimpleConsumeMultiPartitionResponseFromJSON, - SimpleConsumeMultiPartitionResponseToJSON, -} from "../models/index"; + SimpleConsumeMultiPartitionRequestFromJSON, + SimpleConsumeMultiPartitionRequestToJSON, + SimpleConsumeMultiPartitionResponseFromJSON, + SimpleConsumeMultiPartitionResponseToJSON, +} from '../models/index'; export interface GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest { - cluster_id: string; - topic_name: string; - x_connection_id: string; - SimpleConsumeMultiPartitionRequest: SimpleConsumeMultiPartitionRequest; + cluster_id: string; + topic_name: string; + x_connection_id: string; + SimpleConsumeMultiPartitionRequest: SimpleConsumeMultiPartitionRequest; } /** - * + * */ export class KafkaConsumeResourceApi extends runtime.BaseAPI { - /** - * Message Viewer - */ - async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw( - requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["cluster_id"] == null) { - throw new runtime.RequiredError( - "cluster_id", - 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', - ); - } - if (requestParameters["topic_name"] == null) { - throw new runtime.RequiredError( - "topic_name", - 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', - ); - } + /** + * Message Viewer + */ + async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['cluster_id'] == null) { + throw new runtime.RequiredError( + 'cluster_id', + 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' + ); + } - if (requestParameters["x_connection_id"] == null) { - throw new runtime.RequiredError( - "x_connection_id", - 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', - ); - } + if (requestParameters['topic_name'] == null) { + throw new runtime.RequiredError( + 'topic_name', + 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' + ); + } - if (requestParameters["SimpleConsumeMultiPartitionRequest"] == null) { - throw new runtime.RequiredError( - "SimpleConsumeMultiPartitionRequest", - 'Required parameter "SimpleConsumeMultiPartitionRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', - ); - } + if (requestParameters['x_connection_id'] == null) { + throw new runtime.RequiredError( + 'x_connection_id', + 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' + ); + } - const queryParameters: any = {}; + if (requestParameters['SimpleConsumeMultiPartitionRequest'] == null) { + throw new runtime.RequiredError( + 'SimpleConsumeMultiPartitionRequest', + 'Required parameter "SimpleConsumeMultiPartitionRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters["Content-Type"] = "application/json"; + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['x_connection_id'] != null) { + headerParameters['x-connection-id'] = String(requestParameters['x_connection_id']); + } + + const response = await this.request({ + path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/partitions/-/consume`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: SimpleConsumeMultiPartitionRequestToJSON(requestParameters['SimpleConsumeMultiPartitionRequest']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SimpleConsumeMultiPartitionResponseFromJSON(jsonValue)); + } - if (requestParameters["x_connection_id"] != null) { - headerParameters["x-connection-id"] = String(requestParameters["x_connection_id"]); + /** + * Message Viewer + */ + async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw(requestParameters, initOverrides); + return await response.value(); } - const response = await this.request( - { - path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/partitions/-/consume` - .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) - .replace( - `{${"topic_name"}}`, - encodeURIComponent(String(requestParameters["topic_name"])), - ), - method: "POST", - headers: headerParameters, - query: queryParameters, - body: SimpleConsumeMultiPartitionRequestToJSON( - requestParameters["SimpleConsumeMultiPartitionRequest"], - ), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SimpleConsumeMultiPartitionResponseFromJSON(jsonValue), - ); - } - - /** - * Message Viewer - */ - async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost( - requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw( - requestParameters, - initOverrides, - ); - return await response.value(); - } } diff --git a/src/clients/sidecar/apis/LoginRealmResourceApi.ts b/src/clients/sidecar/apis/LoginRealmResourceApi.ts index 0fa0b50ee3..71f794033e 100644 --- a/src/clients/sidecar/apis/LoginRealmResourceApi.ts +++ b/src/clients/sidecar/apis/LoginRealmResourceApi.ts @@ -12,41 +12,37 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; /** - * + * */ export class LoginRealmResourceApi extends runtime.BaseAPI { - /** - * Proxy Login Realm Request - */ - async apiLoginRealmGetRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/api/login/realm`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.VoidApiResponse(response); - } - - /** - * Proxy Login Realm Request - */ - async apiLoginRealmGet( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - await this.apiLoginRealmGetRaw(initOverrides); - } + + /** + * Proxy Login Realm Request + */ + async apiLoginRealmGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/api/login/realm`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Proxy Login Realm Request + */ + async apiLoginRealmGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.apiLoginRealmGetRaw(initOverrides); + } + } diff --git a/src/clients/sidecar/apis/MicroProfileHealthApi.ts b/src/clients/sidecar/apis/MicroProfileHealthApi.ts index bb9e1bcac6..eb96bb8198 100644 --- a/src/clients/sidecar/apis/MicroProfileHealthApi.ts +++ b/src/clients/sidecar/apis/MicroProfileHealthApi.ts @@ -12,151 +12,131 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { HealthResponse } from "../models/index"; -import { HealthResponseFromJSON, HealthResponseToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + HealthResponse, +} from '../models/index'; +import { + HealthResponseFromJSON, + HealthResponseToJSON, +} from '../models/index'; /** - * + * */ export class MicroProfileHealthApi extends runtime.BaseAPI { - /** - * Check the liveness of the application - * The Liveness check of this application - */ - async microprofileHealthLivenessRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/health/live`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the liveness of the application - * The Liveness check of this application - */ - async microprofileHealthLiveness( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.microprofileHealthLivenessRaw(initOverrides); - return await response.value(); - } - - /** - * Check the readiness of the application - * The Readiness check of this application - */ - async microprofileHealthReadinessRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/health/ready`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the readiness of the application - * The Readiness check of this application - */ - async microprofileHealthReadiness( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.microprofileHealthReadinessRaw(initOverrides); - return await response.value(); - } - - /** - * Check the health of the application - * An aggregated view of the Liveness, Readiness and Startup of this application - */ - async microprofileHealthRootRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/health`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the health of the application - * An aggregated view of the Liveness, Readiness and Startup of this application - */ - async microprofileHealthRoot( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.microprofileHealthRootRaw(initOverrides); - return await response.value(); - } - - /** - * Check the startup of the application - * The Startup check of this application - */ - async microprofileHealthStartupRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/health/started`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the startup of the application - * The Startup check of this application - */ - async microprofileHealthStartup( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.microprofileHealthStartupRaw(initOverrides); - return await response.value(); - } + + /** + * Check the liveness of the application + * The Liveness check of this application + */ + async microprofileHealthLivenessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/health/live`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the liveness of the application + * The Liveness check of this application + */ + async microprofileHealthLiveness(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.microprofileHealthLivenessRaw(initOverrides); + return await response.value(); + } + + /** + * Check the readiness of the application + * The Readiness check of this application + */ + async microprofileHealthReadinessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/health/ready`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the readiness of the application + * The Readiness check of this application + */ + async microprofileHealthReadiness(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.microprofileHealthReadinessRaw(initOverrides); + return await response.value(); + } + + /** + * Check the health of the application + * An aggregated view of the Liveness, Readiness and Startup of this application + */ + async microprofileHealthRootRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/health`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the health of the application + * An aggregated view of the Liveness, Readiness and Startup of this application + */ + async microprofileHealthRoot(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.microprofileHealthRootRaw(initOverrides); + return await response.value(); + } + + /** + * Check the startup of the application + * The Startup check of this application + */ + async microprofileHealthStartupRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/health/started`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the startup of the application + * The Startup check of this application + */ + async microprofileHealthStartup(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.microprofileHealthStartupRaw(initOverrides); + return await response.value(); + } + } diff --git a/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts b/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts index d78a63afab..498f3e1f1f 100644 --- a/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts +++ b/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts @@ -12,61 +12,55 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; export interface GatewayV1CallbackVscodeDocsGetRequest { - code?: string; - state?: string; + code?: string; + state?: string; } /** - * + * */ export class OAuthCallbackResourceApi extends runtime.BaseAPI { - /** - * Callback - */ - async gatewayV1CallbackVscodeDocsGetRaw( - requestParameters: GatewayV1CallbackVscodeDocsGetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - if (requestParameters["code"] != null) { - queryParameters["code"] = requestParameters["code"]; - } + /** + * Callback + */ + async gatewayV1CallbackVscodeDocsGetRaw(requestParameters: GatewayV1CallbackVscodeDocsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - if (requestParameters["state"] != null) { - queryParameters["state"] = requestParameters["state"]; - } + if (requestParameters['code'] != null) { + queryParameters['code'] = requestParameters['code']; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['state'] != null) { + queryParameters['state'] = requestParameters['state']; + } - const response = await this.request( - { - path: `/gateway/v1/callback-vscode-docs`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/callback-vscode-docs`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; + /** + * Callback + */ + async gatewayV1CallbackVscodeDocsGet(requestParameters: GatewayV1CallbackVscodeDocsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1CallbackVscodeDocsGetRaw(requestParameters, initOverrides); + return await response.value(); } - } - /** - * Callback - */ - async gatewayV1CallbackVscodeDocsGet( - requestParameters: GatewayV1CallbackVscodeDocsGetRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1CallbackVscodeDocsGetRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts b/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts index 029119c6e5..19823df13d 100644 --- a/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts +++ b/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts @@ -12,66 +12,60 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; + +import * as runtime from '../runtime'; export interface RootGetRequest { - email?: string; - message?: string; - success?: boolean; + email?: string; + message?: string; + success?: boolean; } /** - * + * */ export class PasswordResetCallbackResourceApi extends runtime.BaseAPI { - /** - * Password Reset Callback - */ - async rootGetRaw( - requestParameters: RootGetRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - if (requestParameters["email"] != null) { - queryParameters["email"] = requestParameters["email"]; - } + /** + * Password Reset Callback + */ + async rootGetRaw(requestParameters: RootGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; - if (requestParameters["message"] != null) { - queryParameters["message"] = requestParameters["message"]; - } + if (requestParameters['email'] != null) { + queryParameters['email'] = requestParameters['email']; + } - if (requestParameters["success"] != null) { - queryParameters["success"] = requestParameters["success"]; - } + if (requestParameters['message'] != null) { + queryParameters['message'] = requestParameters['message']; + } + + if (requestParameters['success'] != null) { + queryParameters['success'] = requestParameters['success']; + } - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request( - { - path: `/`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); + const response = await this.request({ + path: `/`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } - if (this.isJsonMime(response.headers.get("content-type"))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; + /** + * Password Reset Callback + */ + async rootGet(requestParameters: RootGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.rootGetRaw(requestParameters, initOverrides); + return await response.value(); } - } - /** - * Password Reset Callback - */ - async rootGet( - requestParameters: RootGetRequest = {}, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.rootGetRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/sidecar/apis/PreferencesResourceApi.ts b/src/clients/sidecar/apis/PreferencesResourceApi.ts index bf763a3e59..0d1a747e78 100644 --- a/src/clients/sidecar/apis/PreferencesResourceApi.ts +++ b/src/clients/sidecar/apis/PreferencesResourceApi.ts @@ -12,98 +12,88 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { Failure, Preferences } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + Failure, + Preferences, +} from '../models/index'; import { - FailureFromJSON, - FailureToJSON, - PreferencesFromJSON, - PreferencesToJSON, -} from "../models/index"; + FailureFromJSON, + FailureToJSON, + PreferencesFromJSON, + PreferencesToJSON, +} from '../models/index'; export interface GatewayV1PreferencesPutRequest { - Preferences: Preferences; + Preferences: Preferences; } /** - * + * */ export class PreferencesResourceApi extends runtime.BaseAPI { - /** - * Get Preferences - */ - async gatewayV1PreferencesGetRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/preferences`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); - } - - /** - * Get Preferences - */ - async gatewayV1PreferencesGet( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1PreferencesGetRaw(initOverrides); - return await response.value(); - } - - /** - * Update Preferences - */ - async gatewayV1PreferencesPutRaw( - requestParameters: GatewayV1PreferencesPutRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - if (requestParameters["Preferences"] == null) { - throw new runtime.RequiredError( - "Preferences", - 'Required parameter "Preferences" was null or undefined when calling gatewayV1PreferencesPut().', - ); + + /** + * Get Preferences + */ + async gatewayV1PreferencesGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/preferences`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); + } + + /** + * Get Preferences + */ + async gatewayV1PreferencesGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1PreferencesGetRaw(initOverrides); + return await response.value(); + } + + /** + * Update Preferences + */ + async gatewayV1PreferencesPutRaw(requestParameters: GatewayV1PreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['Preferences'] == null) { + throw new runtime.RequiredError( + 'Preferences', + 'Required parameter "Preferences" was null or undefined when calling gatewayV1PreferencesPut().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/gateway/v1/preferences`, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: PreferencesToJSON(requestParameters['Preferences']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); + } + + /** + * Update Preferences + */ + async gatewayV1PreferencesPut(requestParameters: GatewayV1PreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1PreferencesPutRaw(requestParameters, initOverrides); + return await response.value(); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters["Content-Type"] = "application/json"; - - const response = await this.request( - { - path: `/gateway/v1/preferences`, - method: "PUT", - headers: headerParameters, - query: queryParameters, - body: PreferencesToJSON(requestParameters["Preferences"]), - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); - } - - /** - * Update Preferences - */ - async gatewayV1PreferencesPut( - requestParameters: GatewayV1PreferencesPutRequest, - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1PreferencesPutRaw(requestParameters, initOverrides); - return await response.value(); - } } diff --git a/src/clients/sidecar/apis/VersionResourceApi.ts b/src/clients/sidecar/apis/VersionResourceApi.ts index b029b9a896..63e0ed6857 100644 --- a/src/clients/sidecar/apis/VersionResourceApi.ts +++ b/src/clients/sidecar/apis/VersionResourceApi.ts @@ -12,46 +12,45 @@ * Do not edit the class manually. */ -import * as runtime from "../runtime"; -import type { SidecarVersionResponse } from "../models/index"; -import { SidecarVersionResponseFromJSON, SidecarVersionResponseToJSON } from "../models/index"; + +import * as runtime from '../runtime'; +import type { + SidecarVersionResponse, +} from '../models/index'; +import { + SidecarVersionResponseFromJSON, + SidecarVersionResponseToJSON, +} from '../models/index'; /** - * + * */ export class VersionResourceApi extends runtime.BaseAPI { - /** - * Version - */ - async gatewayV1VersionGetRaw( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request( - { - path: `/gateway/v1/version`, - method: "GET", - headers: headerParameters, - query: queryParameters, - }, - initOverrides, - ); - - return new runtime.JSONApiResponse(response, (jsonValue) => - SidecarVersionResponseFromJSON(jsonValue), - ); - } - - /** - * Version - */ - async gatewayV1VersionGet( - initOverrides?: RequestInit | runtime.InitOverrideFunction, - ): Promise { - const response = await this.gatewayV1VersionGetRaw(initOverrides); - return await response.value(); - } + + /** + * Version + */ + async gatewayV1VersionGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/gateway/v1/version`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SidecarVersionResponseFromJSON(jsonValue)); + } + + /** + * Version + */ + async gatewayV1VersionGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.gatewayV1VersionGetRaw(initOverrides); + return await response.value(); + } + } diff --git a/src/clients/sidecar/apis/index.ts b/src/clients/sidecar/apis/index.ts index 4e286c5872..d0c88cd8a3 100644 --- a/src/clients/sidecar/apis/index.ts +++ b/src/clients/sidecar/apis/index.ts @@ -1,12 +1,12 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ConfluentCloudProduceRecordsResourceApi"; -export * from "./ConnectionsResourceApi"; -export * from "./HandshakeResourceApi"; -export * from "./KafkaConsumeResourceApi"; -export * from "./LoginRealmResourceApi"; -export * from "./MicroProfileHealthApi"; -export * from "./OAuthCallbackResourceApi"; -export * from "./PasswordResetCallbackResourceApi"; -export * from "./PreferencesResourceApi"; -export * from "./VersionResourceApi"; +export * from './ConfluentCloudProduceRecordsResourceApi'; +export * from './ConnectionsResourceApi'; +export * from './HandshakeResourceApi'; +export * from './KafkaConsumeResourceApi'; +export * from './LoginRealmResourceApi'; +export * from './MicroProfileHealthApi'; +export * from './OAuthCallbackResourceApi'; +export * from './PasswordResetCallbackResourceApi'; +export * from './PreferencesResourceApi'; +export * from './VersionResourceApi'; diff --git a/src/clients/sidecar/index.ts b/src/clients/sidecar/index.ts index ee2637724a..bebe8bbbe2 100644 --- a/src/clients/sidecar/index.ts +++ b/src/clients/sidecar/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./runtime"; -export * from "./apis/index"; -export * from "./models/index"; +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/src/clients/sidecar/models/ApiKeyAndSecret.ts b/src/clients/sidecar/models/ApiKeyAndSecret.ts index 181c793dd6..0127a9950f 100644 --- a/src/clients/sidecar/models/ApiKeyAndSecret.ts +++ b/src/clients/sidecar/models/ApiKeyAndSecret.ts @@ -12,67 +12,64 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * API key and secret authentication credentials * @export * @interface ApiKeyAndSecret */ export interface ApiKeyAndSecret { - /** - * The API key to use when connecting to the external service. - * @type {string} - * @memberof ApiKeyAndSecret - */ - api_key: string; - /** - * The API secret to use when connecting to the external service. - * @type {string} - * @memberof ApiKeyAndSecret - */ - api_secret: string; + /** + * The API key to use when connecting to the external service. + * @type {string} + * @memberof ApiKeyAndSecret + */ + api_key: string; + /** + * The API secret to use when connecting to the external service. + * @type {string} + * @memberof ApiKeyAndSecret + */ + api_secret: string; } /** * Check if a given object implements the ApiKeyAndSecret interface. */ export function instanceOfApiKeyAndSecret(value: object): value is ApiKeyAndSecret { - if (!("api_key" in value) || value["api_key"] === undefined) return false; - if (!("api_secret" in value) || value["api_secret"] === undefined) return false; - return true; + if (!('api_key' in value) || value['api_key'] === undefined) return false; + if (!('api_secret' in value) || value['api_secret'] === undefined) return false; + return true; } export function ApiKeyAndSecretFromJSON(json: any): ApiKeyAndSecret { - return ApiKeyAndSecretFromJSONTyped(json, false); + return ApiKeyAndSecretFromJSONTyped(json, false); } -export function ApiKeyAndSecretFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ApiKeyAndSecret { - if (json == null) { - return json; - } - return { - api_key: json["api_key"], - api_secret: json["api_secret"], - }; +export function ApiKeyAndSecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyAndSecret { + if (json == null) { + return json; + } + return { + + 'api_key': json['api_key'], + 'api_secret': json['api_secret'], + }; } export function ApiKeyAndSecretToJSON(json: any): ApiKeyAndSecret { - return ApiKeyAndSecretToJSONTyped(json, false); + return ApiKeyAndSecretToJSONTyped(json, false); } -export function ApiKeyAndSecretToJSONTyped( - value?: ApiKeyAndSecret | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ApiKeyAndSecretToJSONTyped(value?: ApiKeyAndSecret | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_key: value["api_key"], - api_secret: value["api_secret"], - }; + return { + + 'api_key': value['api_key'], + 'api_secret': value['api_secret'], + }; } + diff --git a/src/clients/sidecar/models/AuthError.ts b/src/clients/sidecar/models/AuthError.ts index a523e0a591..557fb733a1 100644 --- a/src/clients/sidecar/models/AuthError.ts +++ b/src/clients/sidecar/models/AuthError.ts @@ -12,62 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface AuthError */ export interface AuthError { - /** - * - * @type {string} - * @memberof AuthError - */ - message?: string; - /** - * - * @type {boolean} - * @memberof AuthError - */ - is_transient?: boolean; + /** + * + * @type {string} + * @memberof AuthError + */ + message?: string; + /** + * + * @type {boolean} + * @memberof AuthError + */ + is_transient?: boolean; } /** * Check if a given object implements the AuthError interface. */ export function instanceOfAuthError(value: object): value is AuthError { - return true; + return true; } export function AuthErrorFromJSON(json: any): AuthError { - return AuthErrorFromJSONTyped(json, false); + return AuthErrorFromJSONTyped(json, false); } export function AuthErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthError { - if (json == null) { - return json; - } - return { - message: json["message"] == null ? undefined : json["message"], - is_transient: json["is_transient"] == null ? undefined : json["is_transient"], - }; + if (json == null) { + return json; + } + return { + + 'message': json['message'] == null ? undefined : json['message'], + 'is_transient': json['is_transient'] == null ? undefined : json['is_transient'], + }; } export function AuthErrorToJSON(json: any): AuthError { - return AuthErrorToJSONTyped(json, false); + return AuthErrorToJSONTyped(json, false); } -export function AuthErrorToJSONTyped( - value?: AuthError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AuthErrorToJSONTyped(value?: AuthError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - message: value["message"], - is_transient: value["is_transient"], - }; + return { + + 'message': value['message'], + 'is_transient': value['is_transient'], + }; } + diff --git a/src/clients/sidecar/models/AuthErrors.ts b/src/clients/sidecar/models/AuthErrors.ts index a5020c082b..a773163c37 100644 --- a/src/clients/sidecar/models/AuthErrors.ts +++ b/src/clients/sidecar/models/AuthErrors.ts @@ -12,80 +12,78 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AuthError } from "./AuthError"; +import { mapValues } from '../runtime'; +import type { AuthError } from './AuthError'; import { - AuthErrorFromJSON, - AuthErrorFromJSONTyped, - AuthErrorToJSON, - AuthErrorToJSONTyped, -} from "./AuthError"; + AuthErrorFromJSON, + AuthErrorFromJSONTyped, + AuthErrorToJSON, + AuthErrorToJSONTyped, +} from './AuthError'; /** - * + * * @export * @interface AuthErrors */ export interface AuthErrors { - /** - * - * @type {AuthError} - * @memberof AuthErrors - */ - auth_status_check?: AuthError; - /** - * - * @type {AuthError} - * @memberof AuthErrors - */ - sign_in?: AuthError; - /** - * - * @type {AuthError} - * @memberof AuthErrors - */ - token_refresh?: AuthError; + /** + * + * @type {AuthError} + * @memberof AuthErrors + */ + auth_status_check?: AuthError; + /** + * + * @type {AuthError} + * @memberof AuthErrors + */ + sign_in?: AuthError; + /** + * + * @type {AuthError} + * @memberof AuthErrors + */ + token_refresh?: AuthError; } /** * Check if a given object implements the AuthErrors interface. */ export function instanceOfAuthErrors(value: object): value is AuthErrors { - return true; + return true; } export function AuthErrorsFromJSON(json: any): AuthErrors { - return AuthErrorsFromJSONTyped(json, false); + return AuthErrorsFromJSONTyped(json, false); } export function AuthErrorsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthErrors { - if (json == null) { - return json; - } - return { - auth_status_check: - json["auth_status_check"] == null ? undefined : AuthErrorFromJSON(json["auth_status_check"]), - sign_in: json["sign_in"] == null ? undefined : AuthErrorFromJSON(json["sign_in"]), - token_refresh: - json["token_refresh"] == null ? undefined : AuthErrorFromJSON(json["token_refresh"]), - }; + if (json == null) { + return json; + } + return { + + 'auth_status_check': json['auth_status_check'] == null ? undefined : AuthErrorFromJSON(json['auth_status_check']), + 'sign_in': json['sign_in'] == null ? undefined : AuthErrorFromJSON(json['sign_in']), + 'token_refresh': json['token_refresh'] == null ? undefined : AuthErrorFromJSON(json['token_refresh']), + }; } export function AuthErrorsToJSON(json: any): AuthErrors { - return AuthErrorsToJSONTyped(json, false); + return AuthErrorsToJSONTyped(json, false); } -export function AuthErrorsToJSONTyped( - value?: AuthErrors | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function AuthErrorsToJSONTyped(value?: AuthErrors | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - auth_status_check: AuthErrorToJSON(value["auth_status_check"]), - sign_in: AuthErrorToJSON(value["sign_in"]), - token_refresh: AuthErrorToJSON(value["token_refresh"]), - }; + return { + + 'auth_status_check': AuthErrorToJSON(value['auth_status_check']), + 'sign_in': AuthErrorToJSON(value['sign_in']), + 'token_refresh': AuthErrorToJSON(value['token_refresh']), + }; } + diff --git a/src/clients/sidecar/models/BasicCredentials.ts b/src/clients/sidecar/models/BasicCredentials.ts index 902c17b3ce..6f3f454cbe 100644 --- a/src/clients/sidecar/models/BasicCredentials.ts +++ b/src/clients/sidecar/models/BasicCredentials.ts @@ -12,67 +12,64 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Basic authentication credentials * @export * @interface BasicCredentials */ export interface BasicCredentials { - /** - * The username to use when connecting to the external service. - * @type {string} - * @memberof BasicCredentials - */ - username: string; - /** - * The password to use when connecting to the external service. - * @type {string} - * @memberof BasicCredentials - */ - password: string; + /** + * The username to use when connecting to the external service. + * @type {string} + * @memberof BasicCredentials + */ + username: string; + /** + * The password to use when connecting to the external service. + * @type {string} + * @memberof BasicCredentials + */ + password: string; } /** * Check if a given object implements the BasicCredentials interface. */ export function instanceOfBasicCredentials(value: object): value is BasicCredentials { - if (!("username" in value) || value["username"] === undefined) return false; - if (!("password" in value) || value["password"] === undefined) return false; - return true; + if (!('username' in value) || value['username'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; } export function BasicCredentialsFromJSON(json: any): BasicCredentials { - return BasicCredentialsFromJSONTyped(json, false); + return BasicCredentialsFromJSONTyped(json, false); } -export function BasicCredentialsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): BasicCredentials { - if (json == null) { - return json; - } - return { - username: json["username"], - password: json["password"], - }; +export function BasicCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BasicCredentials { + if (json == null) { + return json; + } + return { + + 'username': json['username'], + 'password': json['password'], + }; } export function BasicCredentialsToJSON(json: any): BasicCredentials { - return BasicCredentialsToJSONTyped(json, false); + return BasicCredentialsToJSONTyped(json, false); } -export function BasicCredentialsToJSONTyped( - value?: BasicCredentials | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function BasicCredentialsToJSONTyped(value?: BasicCredentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - username: value["username"], - password: value["password"], - }; + return { + + 'username': value['username'], + 'password': value['password'], + }; } + diff --git a/src/clients/sidecar/models/CCloudConfig.ts b/src/clients/sidecar/models/CCloudConfig.ts index e4114c24b4..f1841b5e98 100644 --- a/src/clients/sidecar/models/CCloudConfig.ts +++ b/src/clients/sidecar/models/CCloudConfig.ts @@ -12,63 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Configuration for Confluent Cloud connections * @export * @interface CCloudConfig */ export interface CCloudConfig { - /** - * The identifier of the CCloud organization to use. The user's default organization is used when absent. - * @type {string} - * @memberof CCloudConfig - */ - organization_id?: string; - /** - * The URI that users will be redirected to after successfully completing the authentication flow with Confluent Cloud. - * @type {string} - * @memberof CCloudConfig - */ - ide_auth_callback_uri?: string; + /** + * The identifier of the CCloud organization to use. The user's default organization is used when absent. + * @type {string} + * @memberof CCloudConfig + */ + organization_id?: string; + /** + * The URI that users will be redirected to after successfully completing the authentication flow with Confluent Cloud. + * @type {string} + * @memberof CCloudConfig + */ + ide_auth_callback_uri?: string; } /** * Check if a given object implements the CCloudConfig interface. */ export function instanceOfCCloudConfig(value: object): value is CCloudConfig { - return true; + return true; } export function CCloudConfigFromJSON(json: any): CCloudConfig { - return CCloudConfigFromJSONTyped(json, false); + return CCloudConfigFromJSONTyped(json, false); } export function CCloudConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): CCloudConfig { - if (json == null) { - return json; - } - return { - organization_id: json["organization_id"] == null ? undefined : json["organization_id"], - ide_auth_callback_uri: - json["ide_auth_callback_uri"] == null ? undefined : json["ide_auth_callback_uri"], - }; + if (json == null) { + return json; + } + return { + + 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], + 'ide_auth_callback_uri': json['ide_auth_callback_uri'] == null ? undefined : json['ide_auth_callback_uri'], + }; } export function CCloudConfigToJSON(json: any): CCloudConfig { - return CCloudConfigToJSONTyped(json, false); + return CCloudConfigToJSONTyped(json, false); } -export function CCloudConfigToJSONTyped( - value?: CCloudConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CCloudConfigToJSONTyped(value?: CCloudConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - organization_id: value["organization_id"], - ide_auth_callback_uri: value["ide_auth_callback_uri"], - }; + return { + + 'organization_id': value['organization_id'], + 'ide_auth_callback_uri': value['ide_auth_callback_uri'], + }; } + diff --git a/src/clients/sidecar/models/CCloudStatus.ts b/src/clients/sidecar/models/CCloudStatus.ts index 572c651655..efbfc74356 100644 --- a/src/clients/sidecar/models/CCloudStatus.ts +++ b/src/clients/sidecar/models/CCloudStatus.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AuthErrors } from "./AuthErrors"; +import { mapValues } from '../runtime'; +import type { AuthErrors } from './AuthErrors'; import { - AuthErrorsFromJSON, - AuthErrorsFromJSONTyped, - AuthErrorsToJSON, - AuthErrorsToJSONTyped, -} from "./AuthErrors"; -import type { ConnectedState } from "./ConnectedState"; + AuthErrorsFromJSON, + AuthErrorsFromJSONTyped, + AuthErrorsToJSON, + AuthErrorsToJSONTyped, +} from './AuthErrors'; +import type { ConnectedState } from './ConnectedState'; import { - ConnectedStateFromJSON, - ConnectedStateFromJSONTyped, - ConnectedStateToJSON, - ConnectedStateToJSONTyped, -} from "./ConnectedState"; -import type { UserInfo } from "./UserInfo"; + ConnectedStateFromJSON, + ConnectedStateFromJSONTyped, + ConnectedStateToJSON, + ConnectedStateToJSONTyped, +} from './ConnectedState'; +import type { UserInfo } from './UserInfo'; import { - UserInfoFromJSON, - UserInfoFromJSONTyped, - UserInfoToJSON, - UserInfoToJSONTyped, -} from "./UserInfo"; + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from './UserInfo'; /** * The status related to CCloud. @@ -41,78 +41,74 @@ import { * @interface CCloudStatus */ export interface CCloudStatus { - /** - * The state of the connection to CCloud. - * @type {ConnectedState} - * @memberof CCloudStatus - */ - state: ConnectedState; - /** - * If the connection's auth context holds a valid token, this attribute holds the time at which the user must re-authenticate because, for instance, the refresh token reached the end of its absolute lifetime. - * @type {Date} - * @memberof CCloudStatus - */ - requires_authentication_at?: Date; - /** - * Information about the authenticated principal, if known. - * @type {UserInfo} - * @memberof CCloudStatus - */ - user?: UserInfo; - /** - * Errors related to the connection to the Kafka cluster. - * @type {AuthErrors} - * @memberof CCloudStatus - */ - errors?: AuthErrors; + /** + * The state of the connection to CCloud. + * @type {ConnectedState} + * @memberof CCloudStatus + */ + state: ConnectedState; + /** + * If the connection's auth context holds a valid token, this attribute holds the time at which the user must re-authenticate because, for instance, the refresh token reached the end of its absolute lifetime. + * @type {Date} + * @memberof CCloudStatus + */ + requires_authentication_at?: Date; + /** + * Information about the authenticated principal, if known. + * @type {UserInfo} + * @memberof CCloudStatus + */ + user?: UserInfo; + /** + * Errors related to the connection to the Kafka cluster. + * @type {AuthErrors} + * @memberof CCloudStatus + */ + errors?: AuthErrors; } + + /** * Check if a given object implements the CCloudStatus interface. */ export function instanceOfCCloudStatus(value: object): value is CCloudStatus { - if (!("state" in value) || value["state"] === undefined) return false; - return true; + if (!('state' in value) || value['state'] === undefined) return false; + return true; } export function CCloudStatusFromJSON(json: any): CCloudStatus { - return CCloudStatusFromJSONTyped(json, false); + return CCloudStatusFromJSONTyped(json, false); } export function CCloudStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CCloudStatus { - if (json == null) { - return json; - } - return { - state: ConnectedStateFromJSON(json["state"]), - requires_authentication_at: - json["requires_authentication_at"] == null - ? undefined - : new Date(json["requires_authentication_at"]), - user: json["user"] == null ? undefined : UserInfoFromJSON(json["user"]), - errors: json["errors"] == null ? undefined : AuthErrorsFromJSON(json["errors"]), - }; + if (json == null) { + return json; + } + return { + + 'state': ConnectedStateFromJSON(json['state']), + 'requires_authentication_at': json['requires_authentication_at'] == null ? undefined : (new Date(json['requires_authentication_at'])), + 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), + 'errors': json['errors'] == null ? undefined : AuthErrorsFromJSON(json['errors']), + }; } export function CCloudStatusToJSON(json: any): CCloudStatus { - return CCloudStatusToJSONTyped(json, false); + return CCloudStatusToJSONTyped(json, false); } -export function CCloudStatusToJSONTyped( - value?: CCloudStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CCloudStatusToJSONTyped(value?: CCloudStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - state: ConnectedStateToJSON(value["state"]), - requires_authentication_at: - value["requires_authentication_at"] == null - ? undefined - : value["requires_authentication_at"].toISOString(), - user: UserInfoToJSON(value["user"]), - errors: AuthErrorsToJSON(value["errors"]), - }; + return { + + 'state': ConnectedStateToJSON(value['state']), + 'requires_authentication_at': value['requires_authentication_at'] == null ? undefined : ((value['requires_authentication_at']).toISOString()), + 'user': UserInfoToJSON(value['user']), + 'errors': AuthErrorsToJSON(value['errors']), + }; } + diff --git a/src/clients/sidecar/models/CollectionMetadata.ts b/src/clients/sidecar/models/CollectionMetadata.ts index 149334ae94..75bb5aeb81 100644 --- a/src/clients/sidecar/models/CollectionMetadata.ts +++ b/src/clients/sidecar/models/CollectionMetadata.ts @@ -12,73 +12,70 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface CollectionMetadata */ export interface CollectionMetadata { - /** - * - * @type {string} - * @memberof CollectionMetadata - */ - self?: string; - /** - * - * @type {string} - * @memberof CollectionMetadata - */ - next?: string; - /** - * - * @type {number} - * @memberof CollectionMetadata - */ - total_size?: number; + /** + * + * @type {string} + * @memberof CollectionMetadata + */ + self?: string; + /** + * + * @type {string} + * @memberof CollectionMetadata + */ + next?: string; + /** + * + * @type {number} + * @memberof CollectionMetadata + */ + total_size?: number; } /** * Check if a given object implements the CollectionMetadata interface. */ export function instanceOfCollectionMetadata(value: object): value is CollectionMetadata { - return true; + return true; } export function CollectionMetadataFromJSON(json: any): CollectionMetadata { - return CollectionMetadataFromJSONTyped(json, false); + return CollectionMetadataFromJSONTyped(json, false); } -export function CollectionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): CollectionMetadata { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - next: json["next"] == null ? undefined : json["next"], - total_size: json["total_size"] == null ? undefined : json["total_size"], - }; +export function CollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'next': json['next'] == null ? undefined : json['next'], + 'total_size': json['total_size'] == null ? undefined : json['total_size'], + }; } export function CollectionMetadataToJSON(json: any): CollectionMetadata { - return CollectionMetadataToJSONTyped(json, false); + return CollectionMetadataToJSONTyped(json, false); } -export function CollectionMetadataToJSONTyped( - value?: CollectionMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function CollectionMetadataToJSONTyped(value?: CollectionMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - next: value["next"], - total_size: value["total_size"], - }; + return { + + 'self': value['self'], + 'next': value['next'], + 'total_size': value['total_size'], + }; } + diff --git a/src/clients/sidecar/models/ConnectedState.ts b/src/clients/sidecar/models/ConnectedState.ts index ebcbd3ad22..407c32fcd4 100644 --- a/src/clients/sidecar/models/ConnectedState.ts +++ b/src/clients/sidecar/models/ConnectedState.ts @@ -13,47 +13,43 @@ */ /** - * + * * @export * @enum {string} */ export enum ConnectedState { - None = "NONE", - Attempting = "ATTEMPTING", - Success = "SUCCESS", - Expired = "EXPIRED", - Failed = "FAILED", + None = 'NONE', + Attempting = 'ATTEMPTING', + Success = 'SUCCESS', + Expired = 'EXPIRED', + Failed = 'FAILED' } + export function instanceOfConnectedState(value: any): boolean { - for (const key in ConnectedState) { - if (Object.prototype.hasOwnProperty.call(ConnectedState, key)) { - if (ConnectedState[key as keyof typeof ConnectedState] === value) { - return true; - } + for (const key in ConnectedState) { + if (Object.prototype.hasOwnProperty.call(ConnectedState, key)) { + if (ConnectedState[key as keyof typeof ConnectedState] === value) { + return true; + } + } } - } - return false; + return false; } export function ConnectedStateFromJSON(json: any): ConnectedState { - return ConnectedStateFromJSONTyped(json, false); + return ConnectedStateFromJSONTyped(json, false); } -export function ConnectedStateFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConnectedState { - return json as ConnectedState; +export function ConnectedStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectedState { + return json as ConnectedState; } export function ConnectedStateToJSON(value?: ConnectedState | null): any { - return value as any; + return value as any; } -export function ConnectedStateToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): ConnectedState { - return value as ConnectedState; +export function ConnectedStateToJSONTyped(value: any, ignoreDiscriminator: boolean): ConnectedState { + return value as ConnectedState; } + diff --git a/src/clients/sidecar/models/Connection.ts b/src/clients/sidecar/models/Connection.ts index 585d670ca9..634d6f2275 100644 --- a/src/clients/sidecar/models/Connection.ts +++ b/src/clients/sidecar/models/Connection.ts @@ -12,122 +12,122 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ConnectionSpec } from "./ConnectionSpec"; +import { mapValues } from '../runtime'; +import type { ConnectionSpec } from './ConnectionSpec'; import { - ConnectionSpecFromJSON, - ConnectionSpecFromJSONTyped, - ConnectionSpecToJSON, - ConnectionSpecToJSONTyped, -} from "./ConnectionSpec"; -import type { ConnectionMetadata } from "./ConnectionMetadata"; + ConnectionSpecFromJSON, + ConnectionSpecFromJSONTyped, + ConnectionSpecToJSON, + ConnectionSpecToJSONTyped, +} from './ConnectionSpec'; +import type { ConnectionMetadata } from './ConnectionMetadata'; import { - ConnectionMetadataFromJSON, - ConnectionMetadataFromJSONTyped, - ConnectionMetadataToJSON, - ConnectionMetadataToJSONTyped, -} from "./ConnectionMetadata"; -import type { ConnectionStatus } from "./ConnectionStatus"; + ConnectionMetadataFromJSON, + ConnectionMetadataFromJSONTyped, + ConnectionMetadataToJSON, + ConnectionMetadataToJSONTyped, +} from './ConnectionMetadata'; +import type { ConnectionStatus } from './ConnectionStatus'; import { - ConnectionStatusFromJSON, - ConnectionStatusFromJSONTyped, - ConnectionStatusToJSON, - ConnectionStatusToJSONTyped, -} from "./ConnectionStatus"; + ConnectionStatusFromJSON, + ConnectionStatusFromJSONTyped, + ConnectionStatusToJSON, + ConnectionStatusToJSONTyped, +} from './ConnectionStatus'; /** - * + * * @export * @interface Connection */ export interface Connection { - /** - * - * @type {string} - * @memberof Connection - */ - api_version: string; - /** - * - * @type {string} - * @memberof Connection - */ - kind: string; - /** - * - * @type {string} - * @memberof Connection - */ - id: string; - /** - * - * @type {ConnectionMetadata} - * @memberof Connection - */ - metadata: ConnectionMetadata; - /** - * - * @type {ConnectionSpec} - * @memberof Connection - */ - spec: ConnectionSpec; - /** - * - * @type {ConnectionStatus} - * @memberof Connection - */ - status: ConnectionStatus; + /** + * + * @type {string} + * @memberof Connection + */ + api_version: string; + /** + * + * @type {string} + * @memberof Connection + */ + kind: string; + /** + * + * @type {string} + * @memberof Connection + */ + id: string; + /** + * + * @type {ConnectionMetadata} + * @memberof Connection + */ + metadata: ConnectionMetadata; + /** + * + * @type {ConnectionSpec} + * @memberof Connection + */ + spec: ConnectionSpec; + /** + * + * @type {ConnectionStatus} + * @memberof Connection + */ + status: ConnectionStatus; } /** * Check if a given object implements the Connection interface. */ export function instanceOfConnection(value: object): value is Connection { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("id" in value) || value["id"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - if (!("status" in value) || value["status"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + if (!('status' in value) || value['status'] === undefined) return false; + return true; } export function ConnectionFromJSON(json: any): Connection { - return ConnectionFromJSONTyped(json, false); + return ConnectionFromJSONTyped(json, false); } export function ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Connection { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - id: json["id"], - metadata: ConnectionMetadataFromJSON(json["metadata"]), - spec: ConnectionSpecFromJSON(json["spec"]), - status: ConnectionStatusFromJSON(json["status"]), - }; + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'id': json['id'], + 'metadata': ConnectionMetadataFromJSON(json['metadata']), + 'spec': ConnectionSpecFromJSON(json['spec']), + 'status': ConnectionStatusFromJSON(json['status']), + }; } export function ConnectionToJSON(json: any): Connection { - return ConnectionToJSONTyped(json, false); + return ConnectionToJSONTyped(json, false); } -export function ConnectionToJSONTyped( - value?: Connection | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConnectionToJSONTyped(value?: Connection | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - id: value["id"], - metadata: ConnectionMetadataToJSON(value["metadata"]), - spec: ConnectionSpecToJSON(value["spec"]), - status: ConnectionStatusToJSON(value["status"]), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'id': value['id'], + 'metadata': ConnectionMetadataToJSON(value['metadata']), + 'spec': ConnectionSpecToJSON(value['spec']), + 'status': ConnectionStatusToJSON(value['status']), + }; } + diff --git a/src/clients/sidecar/models/ConnectionMetadata.ts b/src/clients/sidecar/models/ConnectionMetadata.ts index 252851518f..9dc09551f0 100644 --- a/src/clients/sidecar/models/ConnectionMetadata.ts +++ b/src/clients/sidecar/models/ConnectionMetadata.ts @@ -12,73 +12,70 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ConnectionMetadata */ export interface ConnectionMetadata { - /** - * - * @type {string} - * @memberof ConnectionMetadata - */ - self?: string; - /** - * - * @type {string} - * @memberof ConnectionMetadata - */ - resource_name?: string; - /** - * - * @type {string} - * @memberof ConnectionMetadata - */ - sign_in_uri?: string; + /** + * + * @type {string} + * @memberof ConnectionMetadata + */ + self?: string; + /** + * + * @type {string} + * @memberof ConnectionMetadata + */ + resource_name?: string; + /** + * + * @type {string} + * @memberof ConnectionMetadata + */ + sign_in_uri?: string; } /** * Check if a given object implements the ConnectionMetadata interface. */ export function instanceOfConnectionMetadata(value: object): value is ConnectionMetadata { - return true; + return true; } export function ConnectionMetadataFromJSON(json: any): ConnectionMetadata { - return ConnectionMetadataFromJSONTyped(json, false); + return ConnectionMetadataFromJSONTyped(json, false); } -export function ConnectionMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConnectionMetadata { - if (json == null) { - return json; - } - return { - self: json["self"] == null ? undefined : json["self"], - resource_name: json["resource_name"] == null ? undefined : json["resource_name"], - sign_in_uri: json["sign_in_uri"] == null ? undefined : json["sign_in_uri"], - }; +export function ConnectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'] == null ? undefined : json['self'], + 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], + 'sign_in_uri': json['sign_in_uri'] == null ? undefined : json['sign_in_uri'], + }; } export function ConnectionMetadataToJSON(json: any): ConnectionMetadata { - return ConnectionMetadataToJSONTyped(json, false); + return ConnectionMetadataToJSONTyped(json, false); } -export function ConnectionMetadataToJSONTyped( - value?: ConnectionMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConnectionMetadataToJSONTyped(value?: ConnectionMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - resource_name: value["resource_name"], - sign_in_uri: value["sign_in_uri"], - }; + return { + + 'self': value['self'], + 'resource_name': value['resource_name'], + 'sign_in_uri': value['sign_in_uri'], + }; } + diff --git a/src/clients/sidecar/models/ConnectionSpec.ts b/src/clients/sidecar/models/ConnectionSpec.ts index 26489f193b..3dd12a1f6f 100644 --- a/src/clients/sidecar/models/ConnectionSpec.ts +++ b/src/clients/sidecar/models/ConnectionSpec.ts @@ -12,42 +12,42 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SchemaRegistryConfig } from "./SchemaRegistryConfig"; +import { mapValues } from '../runtime'; +import type { SchemaRegistryConfig } from './SchemaRegistryConfig'; import { - SchemaRegistryConfigFromJSON, - SchemaRegistryConfigFromJSONTyped, - SchemaRegistryConfigToJSON, - SchemaRegistryConfigToJSONTyped, -} from "./SchemaRegistryConfig"; -import type { ConnectionType } from "./ConnectionType"; + SchemaRegistryConfigFromJSON, + SchemaRegistryConfigFromJSONTyped, + SchemaRegistryConfigToJSON, + SchemaRegistryConfigToJSONTyped, +} from './SchemaRegistryConfig'; +import type { ConnectionType } from './ConnectionType'; import { - ConnectionTypeFromJSON, - ConnectionTypeFromJSONTyped, - ConnectionTypeToJSON, - ConnectionTypeToJSONTyped, -} from "./ConnectionType"; -import type { LocalConfig } from "./LocalConfig"; + ConnectionTypeFromJSON, + ConnectionTypeFromJSONTyped, + ConnectionTypeToJSON, + ConnectionTypeToJSONTyped, +} from './ConnectionType'; +import type { LocalConfig } from './LocalConfig'; import { - LocalConfigFromJSON, - LocalConfigFromJSONTyped, - LocalConfigToJSON, - LocalConfigToJSONTyped, -} from "./LocalConfig"; -import type { CCloudConfig } from "./CCloudConfig"; + LocalConfigFromJSON, + LocalConfigFromJSONTyped, + LocalConfigToJSON, + LocalConfigToJSONTyped, +} from './LocalConfig'; +import type { CCloudConfig } from './CCloudConfig'; import { - CCloudConfigFromJSON, - CCloudConfigFromJSONTyped, - CCloudConfigToJSON, - CCloudConfigToJSONTyped, -} from "./CCloudConfig"; -import type { KafkaClusterConfig } from "./KafkaClusterConfig"; + CCloudConfigFromJSON, + CCloudConfigFromJSONTyped, + CCloudConfigToJSON, + CCloudConfigToJSONTyped, +} from './CCloudConfig'; +import type { KafkaClusterConfig } from './KafkaClusterConfig'; import { - KafkaClusterConfigFromJSON, - KafkaClusterConfigFromJSONTyped, - KafkaClusterConfigToJSON, - KafkaClusterConfigToJSONTyped, -} from "./KafkaClusterConfig"; + KafkaClusterConfigFromJSON, + KafkaClusterConfigFromJSONTyped, + KafkaClusterConfigToJSON, + KafkaClusterConfigToJSONTyped, +} from './KafkaClusterConfig'; /** * The connection details that can be set or changed. @@ -55,104 +55,97 @@ import { * @interface ConnectionSpec */ export interface ConnectionSpec { - /** - * The unique identifier of the connection resource. - * @type {string} - * @memberof ConnectionSpec - */ - id?: string; - /** - * The user-supplied name of the connection resource. - * @type {string} - * @memberof ConnectionSpec - */ - name?: string; - /** - * The type of connection resource. - * @type {ConnectionType} - * @memberof ConnectionSpec - */ - type?: ConnectionType; - /** - * The details for connecting to CCloud. - * @type {CCloudConfig} - * @memberof ConnectionSpec - */ - ccloud_config?: CCloudConfig; - /** - * The details for connecting to Confluent Local. - * @type {LocalConfig} - * @memberof ConnectionSpec - */ - local_config?: LocalConfig; - /** - * The details for connecting to a CCloud, Confluent Platform, or Apache Kafka cluster. - * @type {KafkaClusterConfig} - * @memberof ConnectionSpec - */ - kafka_cluster?: KafkaClusterConfig; - /** - * The details for connecting to a Schema Registry. - * @type {SchemaRegistryConfig} - * @memberof ConnectionSpec - */ - schema_registry?: SchemaRegistryConfig; + /** + * The unique identifier of the connection resource. + * @type {string} + * @memberof ConnectionSpec + */ + id?: string; + /** + * The user-supplied name of the connection resource. + * @type {string} + * @memberof ConnectionSpec + */ + name?: string; + /** + * The type of connection resource. + * @type {ConnectionType} + * @memberof ConnectionSpec + */ + type?: ConnectionType; + /** + * The details for connecting to CCloud. + * @type {CCloudConfig} + * @memberof ConnectionSpec + */ + ccloud_config?: CCloudConfig; + /** + * The details for connecting to Confluent Local. + * @type {LocalConfig} + * @memberof ConnectionSpec + */ + local_config?: LocalConfig; + /** + * The details for connecting to a CCloud, Confluent Platform, or Apache Kafka cluster. + * @type {KafkaClusterConfig} + * @memberof ConnectionSpec + */ + kafka_cluster?: KafkaClusterConfig; + /** + * The details for connecting to a Schema Registry. + * @type {SchemaRegistryConfig} + * @memberof ConnectionSpec + */ + schema_registry?: SchemaRegistryConfig; } + + /** * Check if a given object implements the ConnectionSpec interface. */ export function instanceOfConnectionSpec(value: object): value is ConnectionSpec { - return true; + return true; } export function ConnectionSpecFromJSON(json: any): ConnectionSpec { - return ConnectionSpecFromJSONTyped(json, false); + return ConnectionSpecFromJSONTyped(json, false); } -export function ConnectionSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConnectionSpec { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - name: json["name"] == null ? undefined : json["name"], - type: json["type"] == null ? undefined : ConnectionTypeFromJSON(json["type"]), - ccloud_config: - json["ccloud_config"] == null ? undefined : CCloudConfigFromJSON(json["ccloud_config"]), - local_config: - json["local_config"] == null ? undefined : LocalConfigFromJSON(json["local_config"]), - kafka_cluster: - json["kafka_cluster"] == null ? undefined : KafkaClusterConfigFromJSON(json["kafka_cluster"]), - schema_registry: - json["schema_registry"] == null - ? undefined - : SchemaRegistryConfigFromJSON(json["schema_registry"]), - }; +export function ConnectionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionSpec { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'type': json['type'] == null ? undefined : ConnectionTypeFromJSON(json['type']), + 'ccloud_config': json['ccloud_config'] == null ? undefined : CCloudConfigFromJSON(json['ccloud_config']), + 'local_config': json['local_config'] == null ? undefined : LocalConfigFromJSON(json['local_config']), + 'kafka_cluster': json['kafka_cluster'] == null ? undefined : KafkaClusterConfigFromJSON(json['kafka_cluster']), + 'schema_registry': json['schema_registry'] == null ? undefined : SchemaRegistryConfigFromJSON(json['schema_registry']), + }; } export function ConnectionSpecToJSON(json: any): ConnectionSpec { - return ConnectionSpecToJSONTyped(json, false); + return ConnectionSpecToJSONTyped(json, false); } -export function ConnectionSpecToJSONTyped( - value?: ConnectionSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConnectionSpecToJSONTyped(value?: ConnectionSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - name: value["name"], - type: ConnectionTypeToJSON(value["type"]), - ccloud_config: CCloudConfigToJSON(value["ccloud_config"]), - local_config: LocalConfigToJSON(value["local_config"]), - kafka_cluster: KafkaClusterConfigToJSON(value["kafka_cluster"]), - schema_registry: SchemaRegistryConfigToJSON(value["schema_registry"]), - }; + return { + + 'id': value['id'], + 'name': value['name'], + 'type': ConnectionTypeToJSON(value['type']), + 'ccloud_config': CCloudConfigToJSON(value['ccloud_config']), + 'local_config': LocalConfigToJSON(value['local_config']), + 'kafka_cluster': KafkaClusterConfigToJSON(value['kafka_cluster']), + 'schema_registry': SchemaRegistryConfigToJSON(value['schema_registry']), + }; } + diff --git a/src/clients/sidecar/models/ConnectionStatus.ts b/src/clients/sidecar/models/ConnectionStatus.ts index 184a2bf974..5f8c8337cd 100644 --- a/src/clients/sidecar/models/ConnectionStatus.ts +++ b/src/clients/sidecar/models/ConnectionStatus.ts @@ -12,99 +12,92 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SchemaRegistryStatus } from "./SchemaRegistryStatus"; +import { mapValues } from '../runtime'; +import type { SchemaRegistryStatus } from './SchemaRegistryStatus'; import { - SchemaRegistryStatusFromJSON, - SchemaRegistryStatusFromJSONTyped, - SchemaRegistryStatusToJSON, - SchemaRegistryStatusToJSONTyped, -} from "./SchemaRegistryStatus"; -import type { CCloudStatus } from "./CCloudStatus"; + SchemaRegistryStatusFromJSON, + SchemaRegistryStatusFromJSONTyped, + SchemaRegistryStatusToJSON, + SchemaRegistryStatusToJSONTyped, +} from './SchemaRegistryStatus'; +import type { CCloudStatus } from './CCloudStatus'; import { - CCloudStatusFromJSON, - CCloudStatusFromJSONTyped, - CCloudStatusToJSON, - CCloudStatusToJSONTyped, -} from "./CCloudStatus"; -import type { KafkaClusterStatus } from "./KafkaClusterStatus"; + CCloudStatusFromJSON, + CCloudStatusFromJSONTyped, + CCloudStatusToJSON, + CCloudStatusToJSONTyped, +} from './CCloudStatus'; +import type { KafkaClusterStatus } from './KafkaClusterStatus'; import { - KafkaClusterStatusFromJSON, - KafkaClusterStatusFromJSONTyped, - KafkaClusterStatusToJSON, - KafkaClusterStatusToJSONTyped, -} from "./KafkaClusterStatus"; + KafkaClusterStatusFromJSON, + KafkaClusterStatusFromJSONTyped, + KafkaClusterStatusToJSON, + KafkaClusterStatusToJSONTyped, +} from './KafkaClusterStatus'; /** - * + * * @export * @interface ConnectionStatus */ export interface ConnectionStatus { - /** - * - * @type {CCloudStatus} - * @memberof ConnectionStatus - */ - ccloud?: CCloudStatus; - /** - * - * @type {KafkaClusterStatus} - * @memberof ConnectionStatus - */ - kafka_cluster?: KafkaClusterStatus; - /** - * - * @type {SchemaRegistryStatus} - * @memberof ConnectionStatus - */ - schema_registry?: SchemaRegistryStatus; + /** + * + * @type {CCloudStatus} + * @memberof ConnectionStatus + */ + ccloud?: CCloudStatus; + /** + * + * @type {KafkaClusterStatus} + * @memberof ConnectionStatus + */ + kafka_cluster?: KafkaClusterStatus; + /** + * + * @type {SchemaRegistryStatus} + * @memberof ConnectionStatus + */ + schema_registry?: SchemaRegistryStatus; } /** * Check if a given object implements the ConnectionStatus interface. */ export function instanceOfConnectionStatus(value: object): value is ConnectionStatus { - return true; + return true; } export function ConnectionStatusFromJSON(json: any): ConnectionStatus { - return ConnectionStatusFromJSONTyped(json, false); + return ConnectionStatusFromJSONTyped(json, false); } -export function ConnectionStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConnectionStatus { - if (json == null) { - return json; - } - return { - ccloud: json["ccloud"] == null ? undefined : CCloudStatusFromJSON(json["ccloud"]), - kafka_cluster: - json["kafka_cluster"] == null ? undefined : KafkaClusterStatusFromJSON(json["kafka_cluster"]), - schema_registry: - json["schema_registry"] == null - ? undefined - : SchemaRegistryStatusFromJSON(json["schema_registry"]), - }; +export function ConnectionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionStatus { + if (json == null) { + return json; + } + return { + + 'ccloud': json['ccloud'] == null ? undefined : CCloudStatusFromJSON(json['ccloud']), + 'kafka_cluster': json['kafka_cluster'] == null ? undefined : KafkaClusterStatusFromJSON(json['kafka_cluster']), + 'schema_registry': json['schema_registry'] == null ? undefined : SchemaRegistryStatusFromJSON(json['schema_registry']), + }; } export function ConnectionStatusToJSON(json: any): ConnectionStatus { - return ConnectionStatusToJSONTyped(json, false); + return ConnectionStatusToJSONTyped(json, false); } -export function ConnectionStatusToJSONTyped( - value?: ConnectionStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConnectionStatusToJSONTyped(value?: ConnectionStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - ccloud: CCloudStatusToJSON(value["ccloud"]), - kafka_cluster: KafkaClusterStatusToJSON(value["kafka_cluster"]), - schema_registry: SchemaRegistryStatusToJSON(value["schema_registry"]), - }; + return { + + 'ccloud': CCloudStatusToJSON(value['ccloud']), + 'kafka_cluster': KafkaClusterStatusToJSON(value['kafka_cluster']), + 'schema_registry': SchemaRegistryStatusToJSON(value['schema_registry']), + }; } + diff --git a/src/clients/sidecar/models/ConnectionType.ts b/src/clients/sidecar/models/ConnectionType.ts index e284708ac3..289ddcc434 100644 --- a/src/clients/sidecar/models/ConnectionType.ts +++ b/src/clients/sidecar/models/ConnectionType.ts @@ -13,45 +13,41 @@ */ /** - * + * * @export * @enum {string} */ export enum ConnectionType { - Local = "LOCAL", - Ccloud = "CCLOUD", - Direct = "DIRECT", + Local = 'LOCAL', + Ccloud = 'CCLOUD', + Direct = 'DIRECT' } + export function instanceOfConnectionType(value: any): boolean { - for (const key in ConnectionType) { - if (Object.prototype.hasOwnProperty.call(ConnectionType, key)) { - if (ConnectionType[key as keyof typeof ConnectionType] === value) { - return true; - } + for (const key in ConnectionType) { + if (Object.prototype.hasOwnProperty.call(ConnectionType, key)) { + if (ConnectionType[key as keyof typeof ConnectionType] === value) { + return true; + } + } } - } - return false; + return false; } export function ConnectionTypeFromJSON(json: any): ConnectionType { - return ConnectionTypeFromJSONTyped(json, false); + return ConnectionTypeFromJSONTyped(json, false); } -export function ConnectionTypeFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConnectionType { - return json as ConnectionType; +export function ConnectionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionType { + return json as ConnectionType; } export function ConnectionTypeToJSON(value?: ConnectionType | null): any { - return value as any; + return value as any; } -export function ConnectionTypeToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): ConnectionType { - return value as ConnectionType; +export function ConnectionTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ConnectionType { + return value as ConnectionType; } + diff --git a/src/clients/sidecar/models/ConnectionsList.ts b/src/clients/sidecar/models/ConnectionsList.ts index 6010581e13..6b5abd54ba 100644 --- a/src/clients/sidecar/models/ConnectionsList.ts +++ b/src/clients/sidecar/models/ConnectionsList.ts @@ -12,100 +12,97 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { CollectionMetadata } from "./CollectionMetadata"; +import { mapValues } from '../runtime'; +import type { CollectionMetadata } from './CollectionMetadata'; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from "./CollectionMetadata"; -import type { Connection } from "./Connection"; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from './CollectionMetadata'; +import type { Connection } from './Connection'; import { - ConnectionFromJSON, - ConnectionFromJSONTyped, - ConnectionToJSON, - ConnectionToJSONTyped, -} from "./Connection"; + ConnectionFromJSON, + ConnectionFromJSONTyped, + ConnectionToJSON, + ConnectionToJSONTyped, +} from './Connection'; /** - * + * * @export * @interface ConnectionsList */ export interface ConnectionsList { - /** - * - * @type {string} - * @memberof ConnectionsList - */ - api_version: string; - /** - * - * @type {string} - * @memberof ConnectionsList - */ - kind: string; - /** - * - * @type {CollectionMetadata} - * @memberof ConnectionsList - */ - metadata: CollectionMetadata; - /** - * - * @type {Array} - * @memberof ConnectionsList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConnectionsList + */ + api_version: string; + /** + * + * @type {string} + * @memberof ConnectionsList + */ + kind: string; + /** + * + * @type {CollectionMetadata} + * @memberof ConnectionsList + */ + metadata: CollectionMetadata; + /** + * + * @type {Array} + * @memberof ConnectionsList + */ + data: Array; } /** * Check if a given object implements the ConnectionsList interface. */ export function instanceOfConnectionsList(value: object): value is ConnectionsList { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("metadata" in value) || value["metadata"] === undefined) return false; - if (!("data" in value) || value["data"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('data' in value) || value['data'] === undefined) return false; + return true; } export function ConnectionsListFromJSON(json: any): ConnectionsList { - return ConnectionsListFromJSONTyped(json, false); + return ConnectionsListFromJSONTyped(json, false); } -export function ConnectionsListFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ConnectionsList { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: CollectionMetadataFromJSON(json["metadata"]), - data: (json["data"] as Array).map(ConnectionFromJSON), - }; +export function ConnectionsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionsList { + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': CollectionMetadataFromJSON(json['metadata']), + 'data': ((json['data'] as Array).map(ConnectionFromJSON)), + }; } export function ConnectionsListToJSON(json: any): ConnectionsList { - return ConnectionsListToJSONTyped(json, false); + return ConnectionsListToJSONTyped(json, false); } -export function ConnectionsListToJSONTyped( - value?: ConnectionsList | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ConnectionsListToJSONTyped(value?: ConnectionsList | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: CollectionMetadataToJSON(value["metadata"]), - data: (value["data"] as Array).map(ConnectionToJSON), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': CollectionMetadataToJSON(value['metadata']), + 'data': ((value['data'] as Array).map(ConnectionToJSON)), + }; } + diff --git a/src/clients/sidecar/models/DataFormat.ts b/src/clients/sidecar/models/DataFormat.ts index 5d16843a7e..6284caf58c 100644 --- a/src/clients/sidecar/models/DataFormat.ts +++ b/src/clients/sidecar/models/DataFormat.ts @@ -14,7 +14,7 @@ /** * The data format that represents the bytes of a Kafka message. - * + * * * AVRO: Apache Avro schema format. * * JSONSCHEMA: JSON schema format. * * PROTOBUF: Google Protocol Buffers schema format. @@ -30,42 +30,44 @@ * And further, we tried to but could not interpret these bytes as a JSON value. * - The Kafka serializer/deserializer known to sidecar failed to parse the schematized bytes * (meaning the schema id was present in the magic bytes, but our classes could not interpret the rest of the bytes.) - * + * * @export * @enum {string} */ export enum DataFormat { - Avro = "AVRO", - Jsonschema = "JSONSCHEMA", - Protobuf = "PROTOBUF", - Json = "JSON", - Utf8String = "UTF8_STRING", - RawBytes = "RAW_BYTES", + Avro = 'AVRO', + Jsonschema = 'JSONSCHEMA', + Protobuf = 'PROTOBUF', + Json = 'JSON', + Utf8String = 'UTF8_STRING', + RawBytes = 'RAW_BYTES' } + export function instanceOfDataFormat(value: any): boolean { - for (const key in DataFormat) { - if (Object.prototype.hasOwnProperty.call(DataFormat, key)) { - if (DataFormat[key as keyof typeof DataFormat] === value) { - return true; - } + for (const key in DataFormat) { + if (Object.prototype.hasOwnProperty.call(DataFormat, key)) { + if (DataFormat[key as keyof typeof DataFormat] === value) { + return true; + } + } } - } - return false; + return false; } export function DataFormatFromJSON(json: any): DataFormat { - return DataFormatFromJSONTyped(json, false); + return DataFormatFromJSONTyped(json, false); } export function DataFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataFormat { - return json as DataFormat; + return json as DataFormat; } export function DataFormatToJSON(value?: DataFormat | null): any { - return value as any; + return value as any; } export function DataFormatToJSONTyped(value: any, ignoreDiscriminator: boolean): DataFormat { - return value as DataFormat; + return value as DataFormat; } + diff --git a/src/clients/sidecar/models/ExceededFields.ts b/src/clients/sidecar/models/ExceededFields.ts index 3f9b599623..3102c7ef27 100644 --- a/src/clients/sidecar/models/ExceededFields.ts +++ b/src/clients/sidecar/models/ExceededFields.ts @@ -12,65 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ExceededFields */ export interface ExceededFields { - /** - * - * @type {boolean} - * @memberof ExceededFields - */ - key?: boolean; - /** - * - * @type {boolean} - * @memberof ExceededFields - */ - value?: boolean; + /** + * + * @type {boolean} + * @memberof ExceededFields + */ + key?: boolean; + /** + * + * @type {boolean} + * @memberof ExceededFields + */ + value?: boolean; } /** * Check if a given object implements the ExceededFields interface. */ export function instanceOfExceededFields(value: object): value is ExceededFields { - return true; + return true; } export function ExceededFieldsFromJSON(json: any): ExceededFields { - return ExceededFieldsFromJSONTyped(json, false); + return ExceededFieldsFromJSONTyped(json, false); } -export function ExceededFieldsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ExceededFields { - if (json == null) { - return json; - } - return { - key: json["key"] == null ? undefined : json["key"], - value: json["value"] == null ? undefined : json["value"], - }; +export function ExceededFieldsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExceededFields { + if (json == null) { + return json; + } + return { + + 'key': json['key'] == null ? undefined : json['key'], + 'value': json['value'] == null ? undefined : json['value'], + }; } export function ExceededFieldsToJSON(json: any): ExceededFields { - return ExceededFieldsToJSONTyped(json, false); + return ExceededFieldsToJSONTyped(json, false); } -export function ExceededFieldsToJSONTyped( - value?: ExceededFields | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ExceededFieldsToJSONTyped(value?: ExceededFields | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - key: value["key"], - value: value["value"], - }; + return { + + 'key': value['key'], + 'value': value['value'], + }; } + diff --git a/src/clients/sidecar/models/Failure.ts b/src/clients/sidecar/models/Failure.ts index bb43f8f489..c0d124a55b 100644 --- a/src/clients/sidecar/models/Failure.ts +++ b/src/clients/sidecar/models/Failure.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { SidecarError } from "./SidecarError"; +import { mapValues } from '../runtime'; +import type { SidecarError } from './SidecarError'; import { - SidecarErrorFromJSON, - SidecarErrorFromJSONTyped, - SidecarErrorToJSON, - SidecarErrorToJSONTyped, -} from "./SidecarError"; + SidecarErrorFromJSON, + SidecarErrorFromJSONTyped, + SidecarErrorToJSON, + SidecarErrorToJSONTyped, +} from './SidecarError'; /** * Provides overall information about problems encountered while performing an operation. @@ -27,81 +27,79 @@ import { * @interface Failure */ export interface Failure { - /** - * - * @type {string} - * @memberof Failure - */ - status?: string; - /** - * - * @type {string} - * @memberof Failure - */ - code?: string; - /** - * - * @type {string} - * @memberof Failure - */ - title?: string; - /** - * - * @type {string} - * @memberof Failure - */ - id?: string; - /** - * - * @type {Array} - * @memberof Failure - */ - errors?: Array; + /** + * + * @type {string} + * @memberof Failure + */ + status?: string; + /** + * + * @type {string} + * @memberof Failure + */ + code?: string; + /** + * + * @type {string} + * @memberof Failure + */ + title?: string; + /** + * + * @type {string} + * @memberof Failure + */ + id?: string; + /** + * + * @type {Array} + * @memberof Failure + */ + errors?: Array; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - return true; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - status: json["status"] == null ? undefined : json["status"], - code: json["code"] == null ? undefined : json["code"], - title: json["title"] == null ? undefined : json["title"], - id: json["id"] == null ? undefined : json["id"], - errors: - json["errors"] == null ? undefined : (json["errors"] as Array).map(SidecarErrorFromJSON), - }; + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + 'code': json['code'] == null ? undefined : json['code'], + 'title': json['title'] == null ? undefined : json['title'], + 'id': json['id'] == null ? undefined : json['id'], + 'errors': json['errors'] == null ? undefined : ((json['errors'] as Array).map(SidecarErrorFromJSON)), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped( - value?: Failure | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - status: value["status"], - code: value["code"], - title: value["title"], - id: value["id"], - errors: - value["errors"] == null ? undefined : (value["errors"] as Array).map(SidecarErrorToJSON), - }; + return { + + 'status': value['status'], + 'code': value['code'], + 'title': value['title'], + 'id': value['id'], + 'errors': value['errors'] == null ? undefined : ((value['errors'] as Array).map(SidecarErrorToJSON)), + }; } + diff --git a/src/clients/sidecar/models/HashAlgorithm.ts b/src/clients/sidecar/models/HashAlgorithm.ts index 88fba770ec..89647244d9 100644 --- a/src/clients/sidecar/models/HashAlgorithm.ts +++ b/src/clients/sidecar/models/HashAlgorithm.ts @@ -13,38 +13,40 @@ */ /** - * + * * @export * @enum {string} */ export enum HashAlgorithm { - _256 = "SCRAM_SHA_256", - _512 = "SCRAM_SHA_512", + _256 = 'SCRAM_SHA_256', + _512 = 'SCRAM_SHA_512' } + export function instanceOfHashAlgorithm(value: any): boolean { - for (const key in HashAlgorithm) { - if (Object.prototype.hasOwnProperty.call(HashAlgorithm, key)) { - if (HashAlgorithm[key as keyof typeof HashAlgorithm] === value) { - return true; - } + for (const key in HashAlgorithm) { + if (Object.prototype.hasOwnProperty.call(HashAlgorithm, key)) { + if (HashAlgorithm[key as keyof typeof HashAlgorithm] === value) { + return true; + } + } } - } - return false; + return false; } export function HashAlgorithmFromJSON(json: any): HashAlgorithm { - return HashAlgorithmFromJSONTyped(json, false); + return HashAlgorithmFromJSONTyped(json, false); } export function HashAlgorithmFromJSONTyped(json: any, ignoreDiscriminator: boolean): HashAlgorithm { - return json as HashAlgorithm; + return json as HashAlgorithm; } export function HashAlgorithmToJSON(value?: HashAlgorithm | null): any { - return value as any; + return value as any; } export function HashAlgorithmToJSONTyped(value: any, ignoreDiscriminator: boolean): HashAlgorithm { - return value as HashAlgorithm; + return value as HashAlgorithm; } + diff --git a/src/clients/sidecar/models/HealthCheck.ts b/src/clients/sidecar/models/HealthCheck.ts index 8311ba4650..8f090445cf 100644 --- a/src/clients/sidecar/models/HealthCheck.ts +++ b/src/clients/sidecar/models/HealthCheck.ts @@ -12,79 +12,80 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface HealthCheck */ export interface HealthCheck { - /** - * - * @type {object} - * @memberof HealthCheck - */ - data?: object | null; - /** - * - * @type {string} - * @memberof HealthCheck - */ - name?: string; - /** - * - * @type {string} - * @memberof HealthCheck - */ - status?: HealthCheckStatusEnum; + /** + * + * @type {object} + * @memberof HealthCheck + */ + data?: object | null; + /** + * + * @type {string} + * @memberof HealthCheck + */ + name?: string; + /** + * + * @type {string} + * @memberof HealthCheck + */ + status?: HealthCheckStatusEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum HealthCheckStatusEnum { - Up = "UP", - Down = "DOWN", + Up = 'UP', + Down = 'DOWN' } + /** * Check if a given object implements the HealthCheck interface. */ export function instanceOfHealthCheck(value: object): value is HealthCheck { - return true; + return true; } export function HealthCheckFromJSON(json: any): HealthCheck { - return HealthCheckFromJSONTyped(json, false); + return HealthCheckFromJSONTyped(json, false); } export function HealthCheckFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthCheck { - if (json == null) { - return json; - } - return { - data: json["data"] == null ? undefined : json["data"], - name: json["name"] == null ? undefined : json["name"], - status: json["status"] == null ? undefined : json["status"], - }; + if (json == null) { + return json; + } + return { + + 'data': json['data'] == null ? undefined : json['data'], + 'name': json['name'] == null ? undefined : json['name'], + 'status': json['status'] == null ? undefined : json['status'], + }; } export function HealthCheckToJSON(json: any): HealthCheck { - return HealthCheckToJSONTyped(json, false); + return HealthCheckToJSONTyped(json, false); } -export function HealthCheckToJSONTyped( - value?: HealthCheck | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HealthCheckToJSONTyped(value?: HealthCheck | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - data: value["data"], - name: value["name"], - status: value["status"], - }; + return { + + 'data': value['data'], + 'name': value['name'], + 'status': value['status'], + }; } + diff --git a/src/clients/sidecar/models/HealthResponse.ts b/src/clients/sidecar/models/HealthResponse.ts index 5a211542d4..eb52d38911 100644 --- a/src/clients/sidecar/models/HealthResponse.ts +++ b/src/clients/sidecar/models/HealthResponse.ts @@ -12,84 +12,80 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { HealthCheck } from "./HealthCheck"; +import { mapValues } from '../runtime'; +import type { HealthCheck } from './HealthCheck'; import { - HealthCheckFromJSON, - HealthCheckFromJSONTyped, - HealthCheckToJSON, - HealthCheckToJSONTyped, -} from "./HealthCheck"; + HealthCheckFromJSON, + HealthCheckFromJSONTyped, + HealthCheckToJSON, + HealthCheckToJSONTyped, +} from './HealthCheck'; /** - * + * * @export * @interface HealthResponse */ export interface HealthResponse { - /** - * - * @type {Array} - * @memberof HealthResponse - */ - checks?: Array; - /** - * - * @type {string} - * @memberof HealthResponse - */ - status?: HealthResponseStatusEnum; + /** + * + * @type {Array} + * @memberof HealthResponse + */ + checks?: Array; + /** + * + * @type {string} + * @memberof HealthResponse + */ + status?: HealthResponseStatusEnum; } /** - * @export - * @enum {string} - */ +* @export +* @enum {string} +*/ export enum HealthResponseStatusEnum { - Up = "UP", - Down = "DOWN", + Up = 'UP', + Down = 'DOWN' } + /** * Check if a given object implements the HealthResponse interface. */ export function instanceOfHealthResponse(value: object): value is HealthResponse { - return true; + return true; } export function HealthResponseFromJSON(json: any): HealthResponse { - return HealthResponseFromJSONTyped(json, false); + return HealthResponseFromJSONTyped(json, false); } -export function HealthResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): HealthResponse { - if (json == null) { - return json; - } - return { - checks: - json["checks"] == null ? undefined : (json["checks"] as Array).map(HealthCheckFromJSON), - status: json["status"] == null ? undefined : json["status"], - }; +export function HealthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthResponse { + if (json == null) { + return json; + } + return { + + 'checks': json['checks'] == null ? undefined : ((json['checks'] as Array).map(HealthCheckFromJSON)), + 'status': json['status'] == null ? undefined : json['status'], + }; } export function HealthResponseToJSON(json: any): HealthResponse { - return HealthResponseToJSONTyped(json, false); + return HealthResponseToJSONTyped(json, false); } -export function HealthResponseToJSONTyped( - value?: HealthResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function HealthResponseToJSONTyped(value?: HealthResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - checks: - value["checks"] == null ? undefined : (value["checks"] as Array).map(HealthCheckToJSON), - status: value["status"], - }; + return { + + 'checks': value['checks'] == null ? undefined : ((value['checks'] as Array).map(HealthCheckToJSON)), + 'status': value['status'], + }; } + diff --git a/src/clients/sidecar/models/JsonNode.ts b/src/clients/sidecar/models/JsonNode.ts index 9609af0b34..95b41ebf01 100644 --- a/src/clients/sidecar/models/JsonNode.ts +++ b/src/clients/sidecar/models/JsonNode.ts @@ -12,231 +12,232 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { JsonNodeType } from "./JsonNodeType"; +import { mapValues } from '../runtime'; +import type { JsonNodeType } from './JsonNodeType'; import { - JsonNodeTypeFromJSON, - JsonNodeTypeFromJSONTyped, - JsonNodeTypeToJSON, - JsonNodeTypeToJSONTyped, -} from "./JsonNodeType"; + JsonNodeTypeFromJSON, + JsonNodeTypeFromJSONTyped, + JsonNodeTypeToJSON, + JsonNodeTypeToJSONTyped, +} from './JsonNodeType'; /** - * + * * @export * @interface JsonNode */ export interface JsonNode { - /** - * - * @type {boolean} - * @memberof JsonNode - */ - empty?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - valueNode?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - containerNode?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - missingNode?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - array?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - object?: boolean; - /** - * - * @type {JsonNodeType} - * @memberof JsonNode - */ - nodeType?: JsonNodeType; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - pojo?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - number?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - integralNumber?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - floatingPointNumber?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _short?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _int?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _long?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _float?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _double?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - bigDecimal?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - bigInteger?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - textual?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _boolean?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _null?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - binary?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + empty?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + valueNode?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + containerNode?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + missingNode?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + array?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + object?: boolean; + /** + * + * @type {JsonNodeType} + * @memberof JsonNode + */ + nodeType?: JsonNodeType; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + pojo?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + number?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + integralNumber?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + floatingPointNumber?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _short?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _int?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _long?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _float?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _double?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + bigDecimal?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + bigInteger?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + textual?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _boolean?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _null?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + binary?: boolean; } + + /** * Check if a given object implements the JsonNode interface. */ export function instanceOfJsonNode(value: object): value is JsonNode { - return true; + return true; } export function JsonNodeFromJSON(json: any): JsonNode { - return JsonNodeFromJSONTyped(json, false); + return JsonNodeFromJSONTyped(json, false); } export function JsonNodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonNode { - if (json == null) { - return json; - } - return { - empty: json["empty"] == null ? undefined : json["empty"], - valueNode: json["valueNode"] == null ? undefined : json["valueNode"], - containerNode: json["containerNode"] == null ? undefined : json["containerNode"], - missingNode: json["missingNode"] == null ? undefined : json["missingNode"], - array: json["array"] == null ? undefined : json["array"], - object: json["object"] == null ? undefined : json["object"], - nodeType: json["nodeType"] == null ? undefined : JsonNodeTypeFromJSON(json["nodeType"]), - pojo: json["pojo"] == null ? undefined : json["pojo"], - number: json["number"] == null ? undefined : json["number"], - integralNumber: json["integralNumber"] == null ? undefined : json["integralNumber"], - floatingPointNumber: - json["floatingPointNumber"] == null ? undefined : json["floatingPointNumber"], - _short: json["short"] == null ? undefined : json["short"], - _int: json["int"] == null ? undefined : json["int"], - _long: json["long"] == null ? undefined : json["long"], - _float: json["float"] == null ? undefined : json["float"], - _double: json["double"] == null ? undefined : json["double"], - bigDecimal: json["bigDecimal"] == null ? undefined : json["bigDecimal"], - bigInteger: json["bigInteger"] == null ? undefined : json["bigInteger"], - textual: json["textual"] == null ? undefined : json["textual"], - _boolean: json["boolean"] == null ? undefined : json["boolean"], - _null: json["null"] == null ? undefined : json["null"], - binary: json["binary"] == null ? undefined : json["binary"], - }; + if (json == null) { + return json; + } + return { + + 'empty': json['empty'] == null ? undefined : json['empty'], + 'valueNode': json['valueNode'] == null ? undefined : json['valueNode'], + 'containerNode': json['containerNode'] == null ? undefined : json['containerNode'], + 'missingNode': json['missingNode'] == null ? undefined : json['missingNode'], + 'array': json['array'] == null ? undefined : json['array'], + 'object': json['object'] == null ? undefined : json['object'], + 'nodeType': json['nodeType'] == null ? undefined : JsonNodeTypeFromJSON(json['nodeType']), + 'pojo': json['pojo'] == null ? undefined : json['pojo'], + 'number': json['number'] == null ? undefined : json['number'], + 'integralNumber': json['integralNumber'] == null ? undefined : json['integralNumber'], + 'floatingPointNumber': json['floatingPointNumber'] == null ? undefined : json['floatingPointNumber'], + '_short': json['short'] == null ? undefined : json['short'], + '_int': json['int'] == null ? undefined : json['int'], + '_long': json['long'] == null ? undefined : json['long'], + '_float': json['float'] == null ? undefined : json['float'], + '_double': json['double'] == null ? undefined : json['double'], + 'bigDecimal': json['bigDecimal'] == null ? undefined : json['bigDecimal'], + 'bigInteger': json['bigInteger'] == null ? undefined : json['bigInteger'], + 'textual': json['textual'] == null ? undefined : json['textual'], + '_boolean': json['boolean'] == null ? undefined : json['boolean'], + '_null': json['null'] == null ? undefined : json['null'], + 'binary': json['binary'] == null ? undefined : json['binary'], + }; } export function JsonNodeToJSON(json: any): JsonNode { - return JsonNodeToJSONTyped(json, false); + return JsonNodeToJSONTyped(json, false); } -export function JsonNodeToJSONTyped( - value?: JsonNode | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function JsonNodeToJSONTyped(value?: JsonNode | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - empty: value["empty"], - valueNode: value["valueNode"], - containerNode: value["containerNode"], - missingNode: value["missingNode"], - array: value["array"], - object: value["object"], - nodeType: JsonNodeTypeToJSON(value["nodeType"]), - pojo: value["pojo"], - number: value["number"], - integralNumber: value["integralNumber"], - floatingPointNumber: value["floatingPointNumber"], - short: value["_short"], - int: value["_int"], - long: value["_long"], - float: value["_float"], - double: value["_double"], - bigDecimal: value["bigDecimal"], - bigInteger: value["bigInteger"], - textual: value["textual"], - boolean: value["_boolean"], - null: value["_null"], - binary: value["binary"], - }; + return { + + 'empty': value['empty'], + 'valueNode': value['valueNode'], + 'containerNode': value['containerNode'], + 'missingNode': value['missingNode'], + 'array': value['array'], + 'object': value['object'], + 'nodeType': JsonNodeTypeToJSON(value['nodeType']), + 'pojo': value['pojo'], + 'number': value['number'], + 'integralNumber': value['integralNumber'], + 'floatingPointNumber': value['floatingPointNumber'], + 'short': value['_short'], + 'int': value['_int'], + 'long': value['_long'], + 'float': value['_float'], + 'double': value['_double'], + 'bigDecimal': value['bigDecimal'], + 'bigInteger': value['bigInteger'], + 'textual': value['textual'], + 'boolean': value['_boolean'], + 'null': value['_null'], + 'binary': value['binary'], + }; } + diff --git a/src/clients/sidecar/models/JsonNodeType.ts b/src/clients/sidecar/models/JsonNodeType.ts index a19241d824..9ff969968f 100644 --- a/src/clients/sidecar/models/JsonNodeType.ts +++ b/src/clients/sidecar/models/JsonNodeType.ts @@ -13,45 +13,47 @@ */ /** - * + * * @export * @enum {string} */ export enum JsonNodeType { - Array = "ARRAY", - Binary = "BINARY", - Boolean = "BOOLEAN", - Missing = "MISSING", - Null = "NULL", - Number = "NUMBER", - Object = "OBJECT", - Pojo = "POJO", - String = "STRING", + Array = 'ARRAY', + Binary = 'BINARY', + Boolean = 'BOOLEAN', + Missing = 'MISSING', + Null = 'NULL', + Number = 'NUMBER', + Object = 'OBJECT', + Pojo = 'POJO', + String = 'STRING' } + export function instanceOfJsonNodeType(value: any): boolean { - for (const key in JsonNodeType) { - if (Object.prototype.hasOwnProperty.call(JsonNodeType, key)) { - if (JsonNodeType[key as keyof typeof JsonNodeType] === value) { - return true; - } + for (const key in JsonNodeType) { + if (Object.prototype.hasOwnProperty.call(JsonNodeType, key)) { + if (JsonNodeType[key as keyof typeof JsonNodeType] === value) { + return true; + } + } } - } - return false; + return false; } export function JsonNodeTypeFromJSON(json: any): JsonNodeType { - return JsonNodeTypeFromJSONTyped(json, false); + return JsonNodeTypeFromJSONTyped(json, false); } export function JsonNodeTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonNodeType { - return json as JsonNodeType; + return json as JsonNodeType; } export function JsonNodeTypeToJSON(value?: JsonNodeType | null): any { - return value as any; + return value as any; } export function JsonNodeTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): JsonNodeType { - return value as JsonNodeType; + return value as JsonNodeType; } + diff --git a/src/clients/sidecar/models/KafkaClusterConfig.ts b/src/clients/sidecar/models/KafkaClusterConfig.ts index 7d22c72a6d..e1ff469e1b 100644 --- a/src/clients/sidecar/models/KafkaClusterConfig.ts +++ b/src/clients/sidecar/models/KafkaClusterConfig.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TLSConfig } from "./TLSConfig"; +import { mapValues } from '../runtime'; +import type { TLSConfig } from './TLSConfig'; import { - TLSConfigFromJSON, - TLSConfigFromJSONTyped, - TLSConfigToJSON, - TLSConfigToJSONTyped, -} from "./TLSConfig"; -import type { KafkaClusterConfigCredentials } from "./KafkaClusterConfigCredentials"; + TLSConfigFromJSON, + TLSConfigFromJSONTyped, + TLSConfigToJSON, + TLSConfigToJSONTyped, +} from './TLSConfig'; +import type { KafkaClusterConfigCredentials } from './KafkaClusterConfigCredentials'; import { - KafkaClusterConfigCredentialsFromJSON, - KafkaClusterConfigCredentialsFromJSONTyped, - KafkaClusterConfigCredentialsToJSON, - KafkaClusterConfigCredentialsToJSONTyped, -} from "./KafkaClusterConfigCredentials"; + KafkaClusterConfigCredentialsFromJSON, + KafkaClusterConfigCredentialsFromJSONTyped, + KafkaClusterConfigCredentialsToJSON, + KafkaClusterConfigCredentialsToJSONTyped, +} from './KafkaClusterConfigCredentials'; /** * Kafka cluster configuration. @@ -34,78 +34,72 @@ import { * @interface KafkaClusterConfig */ export interface KafkaClusterConfig { - /** - * A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. - * @type {string} - * @memberof KafkaClusterConfig - */ - bootstrap_servers: string; - /** - * - * @type {KafkaClusterConfigCredentials} - * @memberof KafkaClusterConfig - */ - credentials?: KafkaClusterConfigCredentials; - /** - * The SSL configuration for connecting to the Kafka cluster. To disable, set `enabled` to false. To use the default SSL settings, set `enabled` to true and leave the `truststore` and `keystore` fields unset. - * @type {TLSConfig} - * @memberof KafkaClusterConfig - */ - ssl?: TLSConfig | null; - /** - * The suffix to append to the Kafka client config option client.id when interacting with this Kafka cluster. Is useful when, for instance, connecting to WarpStream agents via Kubernetes port-forwarding. - * @type {string} - * @memberof KafkaClusterConfig - */ - client_id_suffix?: string | null; + /** + * A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. + * @type {string} + * @memberof KafkaClusterConfig + */ + bootstrap_servers: string; + /** + * + * @type {KafkaClusterConfigCredentials} + * @memberof KafkaClusterConfig + */ + credentials?: KafkaClusterConfigCredentials; + /** + * The SSL configuration for connecting to the Kafka cluster. To disable, set `enabled` to false. To use the default SSL settings, set `enabled` to true and leave the `truststore` and `keystore` fields unset. + * @type {TLSConfig} + * @memberof KafkaClusterConfig + */ + ssl?: TLSConfig | null; + /** + * The suffix to append to the Kafka client config option client.id when interacting with this Kafka cluster. Is useful when, for instance, connecting to WarpStream agents via Kubernetes port-forwarding. + * @type {string} + * @memberof KafkaClusterConfig + */ + client_id_suffix?: string | null; } /** * Check if a given object implements the KafkaClusterConfig interface. */ export function instanceOfKafkaClusterConfig(value: object): value is KafkaClusterConfig { - if (!("bootstrap_servers" in value) || value["bootstrap_servers"] === undefined) return false; - return true; + if (!('bootstrap_servers' in value) || value['bootstrap_servers'] === undefined) return false; + return true; } export function KafkaClusterConfigFromJSON(json: any): KafkaClusterConfig { - return KafkaClusterConfigFromJSONTyped(json, false); + return KafkaClusterConfigFromJSONTyped(json, false); } -export function KafkaClusterConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): KafkaClusterConfig { - if (json == null) { - return json; - } - return { - bootstrap_servers: json["bootstrap_servers"], - credentials: - json["credentials"] == null - ? undefined - : KafkaClusterConfigCredentialsFromJSON(json["credentials"]), - ssl: json["ssl"] == null ? undefined : TLSConfigFromJSON(json["ssl"]), - client_id_suffix: json["client_id_suffix"] == null ? undefined : json["client_id_suffix"], - }; +export function KafkaClusterConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): KafkaClusterConfig { + if (json == null) { + return json; + } + return { + + 'bootstrap_servers': json['bootstrap_servers'], + 'credentials': json['credentials'] == null ? undefined : KafkaClusterConfigCredentialsFromJSON(json['credentials']), + 'ssl': json['ssl'] == null ? undefined : TLSConfigFromJSON(json['ssl']), + 'client_id_suffix': json['client_id_suffix'] == null ? undefined : json['client_id_suffix'], + }; } export function KafkaClusterConfigToJSON(json: any): KafkaClusterConfig { - return KafkaClusterConfigToJSONTyped(json, false); + return KafkaClusterConfigToJSONTyped(json, false); } -export function KafkaClusterConfigToJSONTyped( - value?: KafkaClusterConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function KafkaClusterConfigToJSONTyped(value?: KafkaClusterConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - bootstrap_servers: value["bootstrap_servers"], - credentials: KafkaClusterConfigCredentialsToJSON(value["credentials"]), - ssl: TLSConfigToJSON(value["ssl"]), - client_id_suffix: value["client_id_suffix"], - }; + return { + + 'bootstrap_servers': value['bootstrap_servers'], + 'credentials': KafkaClusterConfigCredentialsToJSON(value['credentials']), + 'ssl': TLSConfigToJSON(value['ssl']), + 'client_id_suffix': value['client_id_suffix'], + }; } + diff --git a/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts b/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts index cd3d6688a2..9d7c4dcd4d 100644 --- a/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts +++ b/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts @@ -12,111 +12,101 @@ * Do not edit the class manually. */ -import type { ApiKeyAndSecret } from "./ApiKeyAndSecret"; +import type { ApiKeyAndSecret } from './ApiKeyAndSecret'; import { - instanceOfApiKeyAndSecret, - ApiKeyAndSecretFromJSON, - ApiKeyAndSecretFromJSONTyped, - ApiKeyAndSecretToJSON, -} from "./ApiKeyAndSecret"; -import type { BasicCredentials } from "./BasicCredentials"; + instanceOfApiKeyAndSecret, + ApiKeyAndSecretFromJSON, + ApiKeyAndSecretFromJSONTyped, + ApiKeyAndSecretToJSON, +} from './ApiKeyAndSecret'; +import type { BasicCredentials } from './BasicCredentials'; import { - instanceOfBasicCredentials, - BasicCredentialsFromJSON, - BasicCredentialsFromJSONTyped, - BasicCredentialsToJSON, -} from "./BasicCredentials"; -import type { KerberosCredentials } from "./KerberosCredentials"; + instanceOfBasicCredentials, + BasicCredentialsFromJSON, + BasicCredentialsFromJSONTyped, + BasicCredentialsToJSON, +} from './BasicCredentials'; +import type { KerberosCredentials } from './KerberosCredentials'; import { - instanceOfKerberosCredentials, - KerberosCredentialsFromJSON, - KerberosCredentialsFromJSONTyped, - KerberosCredentialsToJSON, -} from "./KerberosCredentials"; -import type { OAuthCredentials } from "./OAuthCredentials"; + instanceOfKerberosCredentials, + KerberosCredentialsFromJSON, + KerberosCredentialsFromJSONTyped, + KerberosCredentialsToJSON, +} from './KerberosCredentials'; +import type { OAuthCredentials } from './OAuthCredentials'; import { - instanceOfOAuthCredentials, - OAuthCredentialsFromJSON, - OAuthCredentialsFromJSONTyped, - OAuthCredentialsToJSON, -} from "./OAuthCredentials"; -import type { ScramCredentials } from "./ScramCredentials"; + instanceOfOAuthCredentials, + OAuthCredentialsFromJSON, + OAuthCredentialsFromJSONTyped, + OAuthCredentialsToJSON, +} from './OAuthCredentials'; +import type { ScramCredentials } from './ScramCredentials'; import { - instanceOfScramCredentials, - ScramCredentialsFromJSON, - ScramCredentialsFromJSONTyped, - ScramCredentialsToJSON, -} from "./ScramCredentials"; + instanceOfScramCredentials, + ScramCredentialsFromJSON, + ScramCredentialsFromJSONTyped, + ScramCredentialsToJSON, +} from './ScramCredentials'; /** * @type KafkaClusterConfigCredentials * The credentials for the Kafka cluster, or null if no authentication is required * @export */ -export type KafkaClusterConfigCredentials = - | ApiKeyAndSecret - | BasicCredentials - | KerberosCredentials - | OAuthCredentials - | ScramCredentials; +export type KafkaClusterConfigCredentials = ApiKeyAndSecret | BasicCredentials | KerberosCredentials | OAuthCredentials | ScramCredentials; export function KafkaClusterConfigCredentialsFromJSON(json: any): KafkaClusterConfigCredentials { - return KafkaClusterConfigCredentialsFromJSONTyped(json, false); + return KafkaClusterConfigCredentialsFromJSONTyped(json, false); } -export function KafkaClusterConfigCredentialsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): KafkaClusterConfigCredentials { - if (json == null) { - return json; - } - if (instanceOfApiKeyAndSecret(json)) { - return ApiKeyAndSecretFromJSONTyped(json, true); - } - if (instanceOfBasicCredentials(json)) { - return BasicCredentialsFromJSONTyped(json, true); - } - if (instanceOfKerberosCredentials(json)) { - return KerberosCredentialsFromJSONTyped(json, true); - } - if (instanceOfOAuthCredentials(json)) { - return OAuthCredentialsFromJSONTyped(json, true); - } - if (instanceOfScramCredentials(json)) { - return ScramCredentialsFromJSONTyped(json, true); - } +export function KafkaClusterConfigCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KafkaClusterConfigCredentials { + if (json == null) { + return json; + } + if (instanceOfApiKeyAndSecret(json)) { + return ApiKeyAndSecretFromJSONTyped(json, true); + } + if (instanceOfBasicCredentials(json)) { + return BasicCredentialsFromJSONTyped(json, true); + } + if (instanceOfKerberosCredentials(json)) { + return KerberosCredentialsFromJSONTyped(json, true); + } + if (instanceOfOAuthCredentials(json)) { + return OAuthCredentialsFromJSONTyped(json, true); + } + if (instanceOfScramCredentials(json)) { + return ScramCredentialsFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function KafkaClusterConfigCredentialsToJSON(json: any): any { - return KafkaClusterConfigCredentialsToJSONTyped(json, false); + return KafkaClusterConfigCredentialsToJSONTyped(json, false); } -export function KafkaClusterConfigCredentialsToJSONTyped( - value?: KafkaClusterConfigCredentials | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function KafkaClusterConfigCredentialsToJSONTyped(value?: KafkaClusterConfigCredentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - if (instanceOfApiKeyAndSecret(value)) { - return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); - } - if (instanceOfBasicCredentials(value)) { - return BasicCredentialsToJSON(value as BasicCredentials); - } - if (instanceOfKerberosCredentials(value)) { - return KerberosCredentialsToJSON(value as KerberosCredentials); - } - if (instanceOfOAuthCredentials(value)) { - return OAuthCredentialsToJSON(value as OAuthCredentials); - } - if (instanceOfScramCredentials(value)) { - return ScramCredentialsToJSON(value as ScramCredentials); - } + if (instanceOfApiKeyAndSecret(value)) { + return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); + } + if (instanceOfBasicCredentials(value)) { + return BasicCredentialsToJSON(value as BasicCredentials); + } + if (instanceOfKerberosCredentials(value)) { + return KerberosCredentialsToJSON(value as KerberosCredentials); + } + if (instanceOfOAuthCredentials(value)) { + return OAuthCredentialsToJSON(value as OAuthCredentials); + } + if (instanceOfScramCredentials(value)) { + return ScramCredentialsToJSON(value as ScramCredentials); + } - return {}; + return {}; } + diff --git a/src/clients/sidecar/models/KafkaClusterStatus.ts b/src/clients/sidecar/models/KafkaClusterStatus.ts index efcc7a9290..c21ff2b183 100644 --- a/src/clients/sidecar/models/KafkaClusterStatus.ts +++ b/src/clients/sidecar/models/KafkaClusterStatus.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AuthErrors } from "./AuthErrors"; +import { mapValues } from '../runtime'; +import type { AuthErrors } from './AuthErrors'; import { - AuthErrorsFromJSON, - AuthErrorsFromJSONTyped, - AuthErrorsToJSON, - AuthErrorsToJSONTyped, -} from "./AuthErrors"; -import type { ConnectedState } from "./ConnectedState"; + AuthErrorsFromJSON, + AuthErrorsFromJSONTyped, + AuthErrorsToJSON, + AuthErrorsToJSONTyped, +} from './AuthErrors'; +import type { ConnectedState } from './ConnectedState'; import { - ConnectedStateFromJSON, - ConnectedStateFromJSONTyped, - ConnectedStateToJSON, - ConnectedStateToJSONTyped, -} from "./ConnectedState"; -import type { UserInfo } from "./UserInfo"; + ConnectedStateFromJSON, + ConnectedStateFromJSONTyped, + ConnectedStateToJSON, + ConnectedStateToJSONTyped, +} from './ConnectedState'; +import type { UserInfo } from './UserInfo'; import { - UserInfoFromJSON, - UserInfoFromJSONTyped, - UserInfoToJSON, - UserInfoToJSONTyped, -} from "./UserInfo"; + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from './UserInfo'; /** * The status related to the specified Kafka cluster. @@ -41,67 +41,66 @@ import { * @interface KafkaClusterStatus */ export interface KafkaClusterStatus { - /** - * The state of the connection to the Kafka cluster. - * @type {ConnectedState} - * @memberof KafkaClusterStatus - */ - state: ConnectedState; - /** - * Information about the authenticated principal, if known. - * @type {UserInfo} - * @memberof KafkaClusterStatus - */ - user?: UserInfo; - /** - * Errors related to the connection to the Kafka cluster. - * @type {AuthErrors} - * @memberof KafkaClusterStatus - */ - errors?: AuthErrors; + /** + * The state of the connection to the Kafka cluster. + * @type {ConnectedState} + * @memberof KafkaClusterStatus + */ + state: ConnectedState; + /** + * Information about the authenticated principal, if known. + * @type {UserInfo} + * @memberof KafkaClusterStatus + */ + user?: UserInfo; + /** + * Errors related to the connection to the Kafka cluster. + * @type {AuthErrors} + * @memberof KafkaClusterStatus + */ + errors?: AuthErrors; } + + /** * Check if a given object implements the KafkaClusterStatus interface. */ export function instanceOfKafkaClusterStatus(value: object): value is KafkaClusterStatus { - if (!("state" in value) || value["state"] === undefined) return false; - return true; + if (!('state' in value) || value['state'] === undefined) return false; + return true; } export function KafkaClusterStatusFromJSON(json: any): KafkaClusterStatus { - return KafkaClusterStatusFromJSONTyped(json, false); + return KafkaClusterStatusFromJSONTyped(json, false); } -export function KafkaClusterStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): KafkaClusterStatus { - if (json == null) { - return json; - } - return { - state: ConnectedStateFromJSON(json["state"]), - user: json["user"] == null ? undefined : UserInfoFromJSON(json["user"]), - errors: json["errors"] == null ? undefined : AuthErrorsFromJSON(json["errors"]), - }; +export function KafkaClusterStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): KafkaClusterStatus { + if (json == null) { + return json; + } + return { + + 'state': ConnectedStateFromJSON(json['state']), + 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), + 'errors': json['errors'] == null ? undefined : AuthErrorsFromJSON(json['errors']), + }; } export function KafkaClusterStatusToJSON(json: any): KafkaClusterStatus { - return KafkaClusterStatusToJSONTyped(json, false); + return KafkaClusterStatusToJSONTyped(json, false); } -export function KafkaClusterStatusToJSONTyped( - value?: KafkaClusterStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function KafkaClusterStatusToJSONTyped(value?: KafkaClusterStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - state: ConnectedStateToJSON(value["state"]), - user: UserInfoToJSON(value["user"]), - errors: AuthErrorsToJSON(value["errors"]), - }; + return { + + 'state': ConnectedStateToJSON(value['state']), + 'user': UserInfoToJSON(value['user']), + 'errors': AuthErrorsToJSON(value['errors']), + }; } + diff --git a/src/clients/sidecar/models/KerberosCredentials.ts b/src/clients/sidecar/models/KerberosCredentials.ts index f57494aff3..2dd29b9989 100644 --- a/src/clients/sidecar/models/KerberosCredentials.ts +++ b/src/clients/sidecar/models/KerberosCredentials.ts @@ -12,75 +12,72 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Kerberos authentication credentials * @export * @interface KerberosCredentials */ export interface KerberosCredentials { - /** - * The Kerberos principal to use. - * @type {string} - * @memberof KerberosCredentials - */ - principal: string; - /** - * The Kerberos keytab file path. - * @type {string} - * @memberof KerberosCredentials - */ - keytab_path: string; - /** - * Service name that matches the primary name of the Kafka brokers configured in the Broker JAAS file. Defaults to 'kafka'. - * @type {string} - * @memberof KerberosCredentials - */ - service_name?: string; + /** + * The Kerberos principal to use. + * @type {string} + * @memberof KerberosCredentials + */ + principal: string; + /** + * The Kerberos keytab file path. + * @type {string} + * @memberof KerberosCredentials + */ + keytab_path: string; + /** + * Service name that matches the primary name of the Kafka brokers configured in the Broker JAAS file. Defaults to 'kafka'. + * @type {string} + * @memberof KerberosCredentials + */ + service_name?: string; } /** * Check if a given object implements the KerberosCredentials interface. */ export function instanceOfKerberosCredentials(value: object): value is KerberosCredentials { - if (!("principal" in value) || value["principal"] === undefined) return false; - if (!("keytab_path" in value) || value["keytab_path"] === undefined) return false; - return true; + if (!('principal' in value) || value['principal'] === undefined) return false; + if (!('keytab_path' in value) || value['keytab_path'] === undefined) return false; + return true; } export function KerberosCredentialsFromJSON(json: any): KerberosCredentials { - return KerberosCredentialsFromJSONTyped(json, false); + return KerberosCredentialsFromJSONTyped(json, false); } -export function KerberosCredentialsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): KerberosCredentials { - if (json == null) { - return json; - } - return { - principal: json["principal"], - keytab_path: json["keytab_path"], - service_name: json["service_name"] == null ? undefined : json["service_name"], - }; +export function KerberosCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KerberosCredentials { + if (json == null) { + return json; + } + return { + + 'principal': json['principal'], + 'keytab_path': json['keytab_path'], + 'service_name': json['service_name'] == null ? undefined : json['service_name'], + }; } export function KerberosCredentialsToJSON(json: any): KerberosCredentials { - return KerberosCredentialsToJSONTyped(json, false); + return KerberosCredentialsToJSONTyped(json, false); } -export function KerberosCredentialsToJSONTyped( - value?: KerberosCredentials | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function KerberosCredentialsToJSONTyped(value?: KerberosCredentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - principal: value["principal"], - keytab_path: value["keytab_path"], - service_name: value["service_name"], - }; + return { + + 'principal': value['principal'], + 'keytab_path': value['keytab_path'], + 'service_name': value['service_name'], + }; } + diff --git a/src/clients/sidecar/models/KeyOrValueMetadata.ts b/src/clients/sidecar/models/KeyOrValueMetadata.ts index d16f3441fd..e7bf437b27 100644 --- a/src/clients/sidecar/models/KeyOrValueMetadata.ts +++ b/src/clients/sidecar/models/KeyOrValueMetadata.ts @@ -12,81 +12,80 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { DataFormat } from "./DataFormat"; +import { mapValues } from '../runtime'; +import type { DataFormat } from './DataFormat'; import { - DataFormatFromJSON, - DataFormatFromJSONTyped, - DataFormatToJSON, - DataFormatToJSONTyped, -} from "./DataFormat"; + DataFormatFromJSON, + DataFormatFromJSONTyped, + DataFormatToJSON, + DataFormatToJSONTyped, +} from './DataFormat'; /** - * + * * @export * @interface KeyOrValueMetadata */ export interface KeyOrValueMetadata { - /** - * - * @type {number} - * @memberof KeyOrValueMetadata - */ - schema_id?: number; - /** - * - * @type {string} - * @memberof KeyOrValueMetadata - */ - schema_guid?: string; - /** - * - * @type {DataFormat} - * @memberof KeyOrValueMetadata - */ - data_format?: DataFormat; + /** + * + * @type {number} + * @memberof KeyOrValueMetadata + */ + schema_id?: number; + /** + * + * @type {string} + * @memberof KeyOrValueMetadata + */ + schema_guid?: string; + /** + * + * @type {DataFormat} + * @memberof KeyOrValueMetadata + */ + data_format?: DataFormat; } + + /** * Check if a given object implements the KeyOrValueMetadata interface. */ export function instanceOfKeyOrValueMetadata(value: object): value is KeyOrValueMetadata { - return true; + return true; } export function KeyOrValueMetadataFromJSON(json: any): KeyOrValueMetadata { - return KeyOrValueMetadataFromJSONTyped(json, false); + return KeyOrValueMetadataFromJSONTyped(json, false); } -export function KeyOrValueMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): KeyOrValueMetadata { - if (json == null) { - return json; - } - return { - schema_id: json["schema_id"] == null ? undefined : json["schema_id"], - schema_guid: json["schema_guid"] == null ? undefined : json["schema_guid"], - data_format: json["data_format"] == null ? undefined : DataFormatFromJSON(json["data_format"]), - }; +export function KeyOrValueMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyOrValueMetadata { + if (json == null) { + return json; + } + return { + + 'schema_id': json['schema_id'] == null ? undefined : json['schema_id'], + 'schema_guid': json['schema_guid'] == null ? undefined : json['schema_guid'], + 'data_format': json['data_format'] == null ? undefined : DataFormatFromJSON(json['data_format']), + }; } export function KeyOrValueMetadataToJSON(json: any): KeyOrValueMetadata { - return KeyOrValueMetadataToJSONTyped(json, false); + return KeyOrValueMetadataToJSONTyped(json, false); } -export function KeyOrValueMetadataToJSONTyped( - value?: KeyOrValueMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function KeyOrValueMetadataToJSONTyped(value?: KeyOrValueMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - schema_id: value["schema_id"], - schema_guid: value["schema_guid"], - data_format: DataFormatToJSON(value["data_format"]), - }; + return { + + 'schema_id': value['schema_id'], + 'schema_guid': value['schema_guid'], + 'data_format': DataFormatToJSON(value['data_format']), + }; } + diff --git a/src/clients/sidecar/models/KeyStore.ts b/src/clients/sidecar/models/KeyStore.ts index 7fa84edb8e..69d7f349f3 100644 --- a/src/clients/sidecar/models/KeyStore.ts +++ b/src/clients/sidecar/models/KeyStore.ts @@ -12,87 +12,89 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { StoreType } from "./StoreType"; +import { mapValues } from '../runtime'; +import type { StoreType } from './StoreType'; import { - StoreTypeFromJSON, - StoreTypeFromJSONTyped, - StoreTypeToJSON, - StoreTypeToJSONTyped, -} from "./StoreType"; + StoreTypeFromJSON, + StoreTypeFromJSONTyped, + StoreTypeToJSON, + StoreTypeToJSONTyped, +} from './StoreType'; /** - * + * * @export * @interface KeyStore */ export interface KeyStore { - /** - * The path to the local key store file. Only specified if client needs to be authenticated by the server (mutual TLS). - * @type {string} - * @memberof KeyStore - */ - path: string; - /** - * The password for the local key store file. If a password is not set, key store file configured will still be used, but integrity checking is disabled. A key store password is not supported for PEM format. - * @type {string} - * @memberof KeyStore - */ - password?: string | null; - /** - * The file format of the local key store file. - * @type {StoreType} - * @memberof KeyStore - */ - type?: StoreType | null; - /** - * The password of the private key in the local key store file. - * @type {string} - * @memberof KeyStore - */ - key_password?: string | null; + /** + * The path to the local key store file. Only specified if client needs to be authenticated by the server (mutual TLS). + * @type {string} + * @memberof KeyStore + */ + path: string; + /** + * The password for the local key store file. If a password is not set, key store file configured will still be used, but integrity checking is disabled. A key store password is not supported for PEM format. + * @type {string} + * @memberof KeyStore + */ + password?: string | null; + /** + * The file format of the local key store file. + * @type {StoreType} + * @memberof KeyStore + */ + type?: StoreType | null; + /** + * The password of the private key in the local key store file. + * @type {string} + * @memberof KeyStore + */ + key_password?: string | null; } + + /** * Check if a given object implements the KeyStore interface. */ export function instanceOfKeyStore(value: object): value is KeyStore { - if (!("path" in value) || value["path"] === undefined) return false; - return true; + if (!('path' in value) || value['path'] === undefined) return false; + return true; } export function KeyStoreFromJSON(json: any): KeyStore { - return KeyStoreFromJSONTyped(json, false); + return KeyStoreFromJSONTyped(json, false); } export function KeyStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyStore { - if (json == null) { - return json; - } - return { - path: json["path"], - password: json["password"] == null ? undefined : json["password"], - type: json["type"] == null ? undefined : StoreTypeFromJSON(json["type"]), - key_password: json["key_password"] == null ? undefined : json["key_password"], - }; + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'password': json['password'] == null ? undefined : json['password'], + 'type': json['type'] == null ? undefined : StoreTypeFromJSON(json['type']), + 'key_password': json['key_password'] == null ? undefined : json['key_password'], + }; } export function KeyStoreToJSON(json: any): KeyStore { - return KeyStoreToJSONTyped(json, false); + return KeyStoreToJSONTyped(json, false); } -export function KeyStoreToJSONTyped( - value?: KeyStore | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function KeyStoreToJSONTyped(value?: KeyStore | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - password: value["password"], - type: StoreTypeToJSON(value["type"]), - key_password: value["key_password"], - }; + return { + + 'path': value['path'], + 'password': value['password'], + 'type': StoreTypeToJSON(value['type']), + 'key_password': value['key_password'], + }; } + diff --git a/src/clients/sidecar/models/LocalConfig.ts b/src/clients/sidecar/models/LocalConfig.ts index 1fdff7471a..350d413b7a 100644 --- a/src/clients/sidecar/models/LocalConfig.ts +++ b/src/clients/sidecar/models/LocalConfig.ts @@ -12,55 +12,54 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * Configuration when using Confluent Local and optionally a local Schema Registry. * @export * @interface LocalConfig */ export interface LocalConfig { - /** - * The URL of the Schema Registry running locally. - * @type {string} - * @memberof LocalConfig - */ - schema_registry_uri?: string; + /** + * The URL of the Schema Registry running locally. + * @type {string} + * @memberof LocalConfig + */ + schema_registry_uri?: string; } /** * Check if a given object implements the LocalConfig interface. */ export function instanceOfLocalConfig(value: object): value is LocalConfig { - return true; + return true; } export function LocalConfigFromJSON(json: any): LocalConfig { - return LocalConfigFromJSONTyped(json, false); + return LocalConfigFromJSONTyped(json, false); } export function LocalConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocalConfig { - if (json == null) { - return json; - } - return { - schema_registry_uri: - json["schema-registry-uri"] == null ? undefined : json["schema-registry-uri"], - }; + if (json == null) { + return json; + } + return { + + 'schema_registry_uri': json['schema-registry-uri'] == null ? undefined : json['schema-registry-uri'], + }; } export function LocalConfigToJSON(json: any): LocalConfig { - return LocalConfigToJSONTyped(json, false); + return LocalConfigToJSONTyped(json, false); } -export function LocalConfigToJSONTyped( - value?: LocalConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function LocalConfigToJSONTyped(value?: LocalConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - "schema-registry-uri": value["schema_registry_uri"], - }; + return { + + 'schema-registry-uri': value['schema_registry_uri'], + }; } + diff --git a/src/clients/sidecar/models/OAuthCredentials.ts b/src/clients/sidecar/models/OAuthCredentials.ts index b53b487669..ade8eb0372 100644 --- a/src/clients/sidecar/models/OAuthCredentials.ts +++ b/src/clients/sidecar/models/OAuthCredentials.ts @@ -12,110 +12,104 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** * OAuth 2.0 authentication credentials * @export * @interface OAuthCredentials */ export interface OAuthCredentials { - /** - * The URL of the OAuth 2.0 identity provider's token endpoint. - * @type {string} - * @memberof OAuthCredentials - */ - tokens_url: string; - /** - * The public identifier for the application as registered with the OAuth 2.0 identity provider. - * @type {string} - * @memberof OAuthCredentials - */ - client_id: string; - /** - * The client secret known only to the application and the OAuth 2.0 identity provider. - * @type {string} - * @memberof OAuthCredentials - */ - client_secret?: string; - /** - * The scope to use. The scope is optional and required only when your identity provider doesn't have a default scope or your groups claim is linked to a scope path to use when connecting to the external service. - * @type {string} - * @memberof OAuthCredentials - */ - scope?: string; - /** - * The timeout in milliseconds when connecting to your identity provider. - * @type {number} - * @memberof OAuthCredentials - */ - connect_timeout_millis?: number; - /** - * Additional property that can be added in the request header to identify the logical cluster ID to connect to. For example, this may be a Confluent Cloud Kafka or Schema Registry cluster ID. - * @type {string} - * @memberof OAuthCredentials - */ - ccloud_logical_cluster_id?: string; - /** - * Additional property that can be added in the request header to identify the principal ID for authorization. For example, this may be a Confluent Cloud identity pool ID. - * @type {string} - * @memberof OAuthCredentials - */ - ccloud_identity_pool_id?: string; + /** + * The URL of the OAuth 2.0 identity provider's token endpoint. + * @type {string} + * @memberof OAuthCredentials + */ + tokens_url: string; + /** + * The public identifier for the application as registered with the OAuth 2.0 identity provider. + * @type {string} + * @memberof OAuthCredentials + */ + client_id: string; + /** + * The client secret known only to the application and the OAuth 2.0 identity provider. + * @type {string} + * @memberof OAuthCredentials + */ + client_secret?: string; + /** + * The scope to use. The scope is optional and required only when your identity provider doesn't have a default scope or your groups claim is linked to a scope path to use when connecting to the external service. + * @type {string} + * @memberof OAuthCredentials + */ + scope?: string; + /** + * The timeout in milliseconds when connecting to your identity provider. + * @type {number} + * @memberof OAuthCredentials + */ + connect_timeout_millis?: number; + /** + * Additional property that can be added in the request header to identify the logical cluster ID to connect to. For example, this may be a Confluent Cloud Kafka or Schema Registry cluster ID. + * @type {string} + * @memberof OAuthCredentials + */ + ccloud_logical_cluster_id?: string; + /** + * Additional property that can be added in the request header to identify the principal ID for authorization. For example, this may be a Confluent Cloud identity pool ID. + * @type {string} + * @memberof OAuthCredentials + */ + ccloud_identity_pool_id?: string; } /** * Check if a given object implements the OAuthCredentials interface. */ export function instanceOfOAuthCredentials(value: object): value is OAuthCredentials { - if (!("tokens_url" in value) || value["tokens_url"] === undefined) return false; - if (!("client_id" in value) || value["client_id"] === undefined) return false; - return true; + if (!('tokens_url' in value) || value['tokens_url'] === undefined) return false; + if (!('client_id' in value) || value['client_id'] === undefined) return false; + return true; } export function OAuthCredentialsFromJSON(json: any): OAuthCredentials { - return OAuthCredentialsFromJSONTyped(json, false); + return OAuthCredentialsFromJSONTyped(json, false); } -export function OAuthCredentialsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): OAuthCredentials { - if (json == null) { - return json; - } - return { - tokens_url: json["tokens_url"], - client_id: json["client_id"], - client_secret: json["client_secret"] == null ? undefined : json["client_secret"], - scope: json["scope"] == null ? undefined : json["scope"], - connect_timeout_millis: - json["connect_timeout_millis"] == null ? undefined : json["connect_timeout_millis"], - ccloud_logical_cluster_id: - json["ccloud_logical_cluster_id"] == null ? undefined : json["ccloud_logical_cluster_id"], - ccloud_identity_pool_id: - json["ccloud_identity_pool_id"] == null ? undefined : json["ccloud_identity_pool_id"], - }; +export function OAuthCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthCredentials { + if (json == null) { + return json; + } + return { + + 'tokens_url': json['tokens_url'], + 'client_id': json['client_id'], + 'client_secret': json['client_secret'] == null ? undefined : json['client_secret'], + 'scope': json['scope'] == null ? undefined : json['scope'], + 'connect_timeout_millis': json['connect_timeout_millis'] == null ? undefined : json['connect_timeout_millis'], + 'ccloud_logical_cluster_id': json['ccloud_logical_cluster_id'] == null ? undefined : json['ccloud_logical_cluster_id'], + 'ccloud_identity_pool_id': json['ccloud_identity_pool_id'] == null ? undefined : json['ccloud_identity_pool_id'], + }; } export function OAuthCredentialsToJSON(json: any): OAuthCredentials { - return OAuthCredentialsToJSONTyped(json, false); + return OAuthCredentialsToJSONTyped(json, false); } -export function OAuthCredentialsToJSONTyped( - value?: OAuthCredentials | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function OAuthCredentialsToJSONTyped(value?: OAuthCredentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - tokens_url: value["tokens_url"], - client_id: value["client_id"], - client_secret: value["client_secret"], - scope: value["scope"], - connect_timeout_millis: value["connect_timeout_millis"], - ccloud_logical_cluster_id: value["ccloud_logical_cluster_id"], - ccloud_identity_pool_id: value["ccloud_identity_pool_id"], - }; + return { + + 'tokens_url': value['tokens_url'], + 'client_id': value['client_id'], + 'client_secret': value['client_secret'], + 'scope': value['scope'], + 'connect_timeout_millis': value['connect_timeout_millis'], + 'ccloud_logical_cluster_id': value['ccloud_logical_cluster_id'], + 'ccloud_identity_pool_id': value['ccloud_identity_pool_id'], + }; } + diff --git a/src/clients/sidecar/models/PartitionConsumeData.ts b/src/clients/sidecar/models/PartitionConsumeData.ts index 35a70e18ea..c82dcc16d9 100644 --- a/src/clients/sidecar/models/PartitionConsumeData.ts +++ b/src/clients/sidecar/models/PartitionConsumeData.ts @@ -12,87 +12,78 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PartitionConsumeRecord } from "./PartitionConsumeRecord"; +import { mapValues } from '../runtime'; +import type { PartitionConsumeRecord } from './PartitionConsumeRecord'; import { - PartitionConsumeRecordFromJSON, - PartitionConsumeRecordFromJSONTyped, - PartitionConsumeRecordToJSON, - PartitionConsumeRecordToJSONTyped, -} from "./PartitionConsumeRecord"; + PartitionConsumeRecordFromJSON, + PartitionConsumeRecordFromJSONTyped, + PartitionConsumeRecordToJSON, + PartitionConsumeRecordToJSONTyped, +} from './PartitionConsumeRecord'; /** - * + * * @export * @interface PartitionConsumeData */ export interface PartitionConsumeData { - /** - * - * @type {number} - * @memberof PartitionConsumeData - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof PartitionConsumeData - */ - next_offset?: number; - /** - * - * @type {Array} - * @memberof PartitionConsumeData - */ - records?: Array; + /** + * + * @type {number} + * @memberof PartitionConsumeData + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof PartitionConsumeData + */ + next_offset?: number; + /** + * + * @type {Array} + * @memberof PartitionConsumeData + */ + records?: Array; } /** * Check if a given object implements the PartitionConsumeData interface. */ export function instanceOfPartitionConsumeData(value: object): value is PartitionConsumeData { - return true; + return true; } export function PartitionConsumeDataFromJSON(json: any): PartitionConsumeData { - return PartitionConsumeDataFromJSONTyped(json, false); + return PartitionConsumeDataFromJSONTyped(json, false); } -export function PartitionConsumeDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PartitionConsumeData { - if (json == null) { - return json; - } - return { - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - next_offset: json["next_offset"] == null ? undefined : json["next_offset"], - records: - json["records"] == null - ? undefined - : (json["records"] as Array).map(PartitionConsumeRecordFromJSON), - }; +export function PartitionConsumeDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionConsumeData { + if (json == null) { + return json; + } + return { + + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'next_offset': json['next_offset'] == null ? undefined : json['next_offset'], + 'records': json['records'] == null ? undefined : ((json['records'] as Array).map(PartitionConsumeRecordFromJSON)), + }; } export function PartitionConsumeDataToJSON(json: any): PartitionConsumeData { - return PartitionConsumeDataToJSONTyped(json, false); + return PartitionConsumeDataToJSONTyped(json, false); } -export function PartitionConsumeDataToJSONTyped( - value?: PartitionConsumeData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PartitionConsumeDataToJSONTyped(value?: PartitionConsumeData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partition_id: value["partition_id"], - next_offset: value["next_offset"], - records: - value["records"] == null - ? undefined - : (value["records"] as Array).map(PartitionConsumeRecordToJSON), - }; + return { + + 'partition_id': value['partition_id'], + 'next_offset': value['next_offset'], + 'records': value['records'] == null ? undefined : ((value['records'] as Array).map(PartitionConsumeRecordToJSON)), + }; } + diff --git a/src/clients/sidecar/models/PartitionConsumeRecord.ts b/src/clients/sidecar/models/PartitionConsumeRecord.ts index f22f8b26fb..928df4d0cc 100644 --- a/src/clients/sidecar/models/PartitionConsumeRecord.ts +++ b/src/clients/sidecar/models/PartitionConsumeRecord.ts @@ -12,182 +12,172 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { RecordMetadata } from "./RecordMetadata"; +import { mapValues } from '../runtime'; +import type { RecordMetadata } from './RecordMetadata'; import { - RecordMetadataFromJSON, - RecordMetadataFromJSONTyped, - RecordMetadataToJSON, - RecordMetadataToJSONTyped, -} from "./RecordMetadata"; -import type { ExceededFields } from "./ExceededFields"; + RecordMetadataFromJSON, + RecordMetadataFromJSONTyped, + RecordMetadataToJSON, + RecordMetadataToJSONTyped, +} from './RecordMetadata'; +import type { ExceededFields } from './ExceededFields'; import { - ExceededFieldsFromJSON, - ExceededFieldsFromJSONTyped, - ExceededFieldsToJSON, - ExceededFieldsToJSONTyped, -} from "./ExceededFields"; -import type { TimestampType } from "./TimestampType"; + ExceededFieldsFromJSON, + ExceededFieldsFromJSONTyped, + ExceededFieldsToJSON, + ExceededFieldsToJSONTyped, +} from './ExceededFields'; +import type { TimestampType } from './TimestampType'; import { - TimestampTypeFromJSON, - TimestampTypeFromJSONTyped, - TimestampTypeToJSON, - TimestampTypeToJSONTyped, -} from "./TimestampType"; -import type { JsonNode } from "./JsonNode"; + TimestampTypeFromJSON, + TimestampTypeFromJSONTyped, + TimestampTypeToJSON, + TimestampTypeToJSONTyped, +} from './TimestampType'; +import type { JsonNode } from './JsonNode'; import { - JsonNodeFromJSON, - JsonNodeFromJSONTyped, - JsonNodeToJSON, - JsonNodeToJSONTyped, -} from "./JsonNode"; -import type { PartitionConsumeRecordHeader } from "./PartitionConsumeRecordHeader"; + JsonNodeFromJSON, + JsonNodeFromJSONTyped, + JsonNodeToJSON, + JsonNodeToJSONTyped, +} from './JsonNode'; +import type { PartitionConsumeRecordHeader } from './PartitionConsumeRecordHeader'; import { - PartitionConsumeRecordHeaderFromJSON, - PartitionConsumeRecordHeaderFromJSONTyped, - PartitionConsumeRecordHeaderToJSON, - PartitionConsumeRecordHeaderToJSONTyped, -} from "./PartitionConsumeRecordHeader"; + PartitionConsumeRecordHeaderFromJSON, + PartitionConsumeRecordHeaderFromJSONTyped, + PartitionConsumeRecordHeaderToJSON, + PartitionConsumeRecordHeaderToJSONTyped, +} from './PartitionConsumeRecordHeader'; /** - * + * * @export * @interface PartitionConsumeRecord */ export interface PartitionConsumeRecord { - /** - * - * @type {number} - * @memberof PartitionConsumeRecord - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof PartitionConsumeRecord - */ - offset?: number; - /** - * - * @type {number} - * @memberof PartitionConsumeRecord - */ - timestamp?: number; - /** - * - * @type {TimestampType} - * @memberof PartitionConsumeRecord - */ - timestamp_type?: TimestampType; - /** - * - * @type {Array} - * @memberof PartitionConsumeRecord - */ - headers?: Array; - /** - * - * @type {JsonNode} - * @memberof PartitionConsumeRecord - */ - key?: JsonNode; - /** - * - * @type {JsonNode} - * @memberof PartitionConsumeRecord - */ - value?: JsonNode; - /** - * - * @type {RecordMetadata} - * @memberof PartitionConsumeRecord - */ - metadata?: RecordMetadata; - /** - * - * @type {string} - * @memberof PartitionConsumeRecord - */ - key_decoding_error?: string; - /** - * - * @type {string} - * @memberof PartitionConsumeRecord - */ - value_decoding_error?: string; - /** - * - * @type {ExceededFields} - * @memberof PartitionConsumeRecord - */ - exceeded_fields?: ExceededFields; + /** + * + * @type {number} + * @memberof PartitionConsumeRecord + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof PartitionConsumeRecord + */ + offset?: number; + /** + * + * @type {number} + * @memberof PartitionConsumeRecord + */ + timestamp?: number; + /** + * + * @type {TimestampType} + * @memberof PartitionConsumeRecord + */ + timestamp_type?: TimestampType; + /** + * + * @type {Array} + * @memberof PartitionConsumeRecord + */ + headers?: Array; + /** + * + * @type {JsonNode} + * @memberof PartitionConsumeRecord + */ + key?: JsonNode; + /** + * + * @type {JsonNode} + * @memberof PartitionConsumeRecord + */ + value?: JsonNode; + /** + * + * @type {RecordMetadata} + * @memberof PartitionConsumeRecord + */ + metadata?: RecordMetadata; + /** + * + * @type {string} + * @memberof PartitionConsumeRecord + */ + key_decoding_error?: string; + /** + * + * @type {string} + * @memberof PartitionConsumeRecord + */ + value_decoding_error?: string; + /** + * + * @type {ExceededFields} + * @memberof PartitionConsumeRecord + */ + exceeded_fields?: ExceededFields; } + + /** * Check if a given object implements the PartitionConsumeRecord interface. */ export function instanceOfPartitionConsumeRecord(value: object): value is PartitionConsumeRecord { - return true; + return true; } export function PartitionConsumeRecordFromJSON(json: any): PartitionConsumeRecord { - return PartitionConsumeRecordFromJSONTyped(json, false); + return PartitionConsumeRecordFromJSONTyped(json, false); } -export function PartitionConsumeRecordFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PartitionConsumeRecord { - if (json == null) { - return json; - } - return { - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - offset: json["offset"] == null ? undefined : json["offset"], - timestamp: json["timestamp"] == null ? undefined : json["timestamp"], - timestamp_type: - json["timestamp_type"] == null ? undefined : TimestampTypeFromJSON(json["timestamp_type"]), - headers: - json["headers"] == null - ? undefined - : (json["headers"] as Array).map(PartitionConsumeRecordHeaderFromJSON), - key: json["key"] == null ? undefined : JsonNodeFromJSON(json["key"]), - value: json["value"] == null ? undefined : JsonNodeFromJSON(json["value"]), - metadata: json["metadata"] == null ? undefined : RecordMetadataFromJSON(json["metadata"]), - key_decoding_error: json["key_decoding_error"] == null ? undefined : json["key_decoding_error"], - value_decoding_error: - json["value_decoding_error"] == null ? undefined : json["value_decoding_error"], - exceeded_fields: - json["exceeded_fields"] == null ? undefined : ExceededFieldsFromJSON(json["exceeded_fields"]), - }; +export function PartitionConsumeRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionConsumeRecord { + if (json == null) { + return json; + } + return { + + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'offset': json['offset'] == null ? undefined : json['offset'], + 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], + 'timestamp_type': json['timestamp_type'] == null ? undefined : TimestampTypeFromJSON(json['timestamp_type']), + 'headers': json['headers'] == null ? undefined : ((json['headers'] as Array).map(PartitionConsumeRecordHeaderFromJSON)), + 'key': json['key'] == null ? undefined : JsonNodeFromJSON(json['key']), + 'value': json['value'] == null ? undefined : JsonNodeFromJSON(json['value']), + 'metadata': json['metadata'] == null ? undefined : RecordMetadataFromJSON(json['metadata']), + 'key_decoding_error': json['key_decoding_error'] == null ? undefined : json['key_decoding_error'], + 'value_decoding_error': json['value_decoding_error'] == null ? undefined : json['value_decoding_error'], + 'exceeded_fields': json['exceeded_fields'] == null ? undefined : ExceededFieldsFromJSON(json['exceeded_fields']), + }; } export function PartitionConsumeRecordToJSON(json: any): PartitionConsumeRecord { - return PartitionConsumeRecordToJSONTyped(json, false); + return PartitionConsumeRecordToJSONTyped(json, false); } -export function PartitionConsumeRecordToJSONTyped( - value?: PartitionConsumeRecord | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PartitionConsumeRecordToJSONTyped(value?: PartitionConsumeRecord | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partition_id: value["partition_id"], - offset: value["offset"], - timestamp: value["timestamp"], - timestamp_type: TimestampTypeToJSON(value["timestamp_type"]), - headers: - value["headers"] == null - ? undefined - : (value["headers"] as Array).map(PartitionConsumeRecordHeaderToJSON), - key: JsonNodeToJSON(value["key"]), - value: JsonNodeToJSON(value["value"]), - metadata: RecordMetadataToJSON(value["metadata"]), - key_decoding_error: value["key_decoding_error"], - value_decoding_error: value["value_decoding_error"], - exceeded_fields: ExceededFieldsToJSON(value["exceeded_fields"]), - }; + return { + + 'partition_id': value['partition_id'], + 'offset': value['offset'], + 'timestamp': value['timestamp'], + 'timestamp_type': TimestampTypeToJSON(value['timestamp_type']), + 'headers': value['headers'] == null ? undefined : ((value['headers'] as Array).map(PartitionConsumeRecordHeaderToJSON)), + 'key': JsonNodeToJSON(value['key']), + 'value': JsonNodeToJSON(value['value']), + 'metadata': RecordMetadataToJSON(value['metadata']), + 'key_decoding_error': value['key_decoding_error'], + 'value_decoding_error': value['value_decoding_error'], + 'exceeded_fields': ExceededFieldsToJSON(value['exceeded_fields']), + }; } + diff --git a/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts b/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts index 0c9d52176d..d82b728239 100644 --- a/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts +++ b/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts @@ -12,67 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PartitionConsumeRecordHeader */ export interface PartitionConsumeRecordHeader { - /** - * - * @type {string} - * @memberof PartitionConsumeRecordHeader - */ - key?: string; - /** - * - * @type {string} - * @memberof PartitionConsumeRecordHeader - */ - value?: string; + /** + * + * @type {string} + * @memberof PartitionConsumeRecordHeader + */ + key?: string; + /** + * + * @type {string} + * @memberof PartitionConsumeRecordHeader + */ + value?: string; } /** * Check if a given object implements the PartitionConsumeRecordHeader interface. */ -export function instanceOfPartitionConsumeRecordHeader( - value: object, -): value is PartitionConsumeRecordHeader { - return true; +export function instanceOfPartitionConsumeRecordHeader(value: object): value is PartitionConsumeRecordHeader { + return true; } export function PartitionConsumeRecordHeaderFromJSON(json: any): PartitionConsumeRecordHeader { - return PartitionConsumeRecordHeaderFromJSONTyped(json, false); + return PartitionConsumeRecordHeaderFromJSONTyped(json, false); } -export function PartitionConsumeRecordHeaderFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PartitionConsumeRecordHeader { - if (json == null) { - return json; - } - return { - key: json["key"] == null ? undefined : json["key"], - value: json["value"] == null ? undefined : json["value"], - }; +export function PartitionConsumeRecordHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionConsumeRecordHeader { + if (json == null) { + return json; + } + return { + + 'key': json['key'] == null ? undefined : json['key'], + 'value': json['value'] == null ? undefined : json['value'], + }; } export function PartitionConsumeRecordHeaderToJSON(json: any): PartitionConsumeRecordHeader { - return PartitionConsumeRecordHeaderToJSONTyped(json, false); + return PartitionConsumeRecordHeaderToJSONTyped(json, false); } -export function PartitionConsumeRecordHeaderToJSONTyped( - value?: PartitionConsumeRecordHeader | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PartitionConsumeRecordHeaderToJSONTyped(value?: PartitionConsumeRecordHeader | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - key: value["key"], - value: value["value"], - }; + return { + + 'key': value['key'], + 'value': value['value'], + }; } + diff --git a/src/clients/sidecar/models/PartitionOffset.ts b/src/clients/sidecar/models/PartitionOffset.ts index 70cf6500d7..49a9b8c3ef 100644 --- a/src/clients/sidecar/models/PartitionOffset.ts +++ b/src/clients/sidecar/models/PartitionOffset.ts @@ -12,65 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PartitionOffset */ export interface PartitionOffset { - /** - * - * @type {number} - * @memberof PartitionOffset - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof PartitionOffset - */ - offset?: number; + /** + * + * @type {number} + * @memberof PartitionOffset + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof PartitionOffset + */ + offset?: number; } /** * Check if a given object implements the PartitionOffset interface. */ export function instanceOfPartitionOffset(value: object): value is PartitionOffset { - return true; + return true; } export function PartitionOffsetFromJSON(json: any): PartitionOffset { - return PartitionOffsetFromJSONTyped(json, false); + return PartitionOffsetFromJSONTyped(json, false); } -export function PartitionOffsetFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PartitionOffset { - if (json == null) { - return json; - } - return { - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - offset: json["offset"] == null ? undefined : json["offset"], - }; +export function PartitionOffsetFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionOffset { + if (json == null) { + return json; + } + return { + + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'offset': json['offset'] == null ? undefined : json['offset'], + }; } export function PartitionOffsetToJSON(json: any): PartitionOffset { - return PartitionOffsetToJSONTyped(json, false); + return PartitionOffsetToJSONTyped(json, false); } -export function PartitionOffsetToJSONTyped( - value?: PartitionOffset | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PartitionOffsetToJSONTyped(value?: PartitionOffset | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partition_id: value["partition_id"], - offset: value["offset"], - }; + return { + + 'partition_id': value['partition_id'], + 'offset': value['offset'], + }; } + diff --git a/src/clients/sidecar/models/Preferences.ts b/src/clients/sidecar/models/Preferences.ts index 20e03cc706..5461a18ef6 100644 --- a/src/clients/sidecar/models/Preferences.ts +++ b/src/clients/sidecar/models/Preferences.ts @@ -12,96 +12,96 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PreferencesMetadata } from "./PreferencesMetadata"; +import { mapValues } from '../runtime'; +import type { PreferencesMetadata } from './PreferencesMetadata'; import { - PreferencesMetadataFromJSON, - PreferencesMetadataFromJSONTyped, - PreferencesMetadataToJSON, - PreferencesMetadataToJSONTyped, -} from "./PreferencesMetadata"; -import type { PreferencesSpec } from "./PreferencesSpec"; + PreferencesMetadataFromJSON, + PreferencesMetadataFromJSONTyped, + PreferencesMetadataToJSON, + PreferencesMetadataToJSONTyped, +} from './PreferencesMetadata'; +import type { PreferencesSpec } from './PreferencesSpec'; import { - PreferencesSpecFromJSON, - PreferencesSpecFromJSONTyped, - PreferencesSpecToJSON, - PreferencesSpecToJSONTyped, -} from "./PreferencesSpec"; + PreferencesSpecFromJSON, + PreferencesSpecFromJSONTyped, + PreferencesSpecToJSON, + PreferencesSpecToJSONTyped, +} from './PreferencesSpec'; /** - * + * * @export * @interface Preferences */ export interface Preferences { - /** - * - * @type {string} - * @memberof Preferences - */ - api_version: string; - /** - * - * @type {string} - * @memberof Preferences - */ - kind: string; - /** - * - * @type {PreferencesMetadata} - * @memberof Preferences - */ - metadata?: PreferencesMetadata; - /** - * - * @type {PreferencesSpec} - * @memberof Preferences - */ - spec: PreferencesSpec; + /** + * + * @type {string} + * @memberof Preferences + */ + api_version: string; + /** + * + * @type {string} + * @memberof Preferences + */ + kind: string; + /** + * + * @type {PreferencesMetadata} + * @memberof Preferences + */ + metadata?: PreferencesMetadata; + /** + * + * @type {PreferencesSpec} + * @memberof Preferences + */ + spec: PreferencesSpec; } /** * Check if a given object implements the Preferences interface. */ export function instanceOfPreferences(value: object): value is Preferences { - if (!("api_version" in value) || value["api_version"] === undefined) return false; - if (!("kind" in value) || value["kind"] === undefined) return false; - if (!("spec" in value) || value["spec"] === undefined) return false; - return true; + if (!('api_version' in value) || value['api_version'] === undefined) return false; + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('spec' in value) || value['spec'] === undefined) return false; + return true; } export function PreferencesFromJSON(json: any): Preferences { - return PreferencesFromJSONTyped(json, false); + return PreferencesFromJSONTyped(json, false); } export function PreferencesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Preferences { - if (json == null) { - return json; - } - return { - api_version: json["api_version"], - kind: json["kind"], - metadata: json["metadata"] == null ? undefined : PreferencesMetadataFromJSON(json["metadata"]), - spec: PreferencesSpecFromJSON(json["spec"]), - }; + if (json == null) { + return json; + } + return { + + 'api_version': json['api_version'], + 'kind': json['kind'], + 'metadata': json['metadata'] == null ? undefined : PreferencesMetadataFromJSON(json['metadata']), + 'spec': PreferencesSpecFromJSON(json['spec']), + }; } export function PreferencesToJSON(json: any): Preferences { - return PreferencesToJSONTyped(json, false); + return PreferencesToJSONTyped(json, false); } -export function PreferencesToJSONTyped( - value?: Preferences | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PreferencesToJSONTyped(value?: Preferences | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - api_version: value["api_version"], - kind: value["kind"], - metadata: PreferencesMetadataToJSON(value["metadata"]), - spec: PreferencesSpecToJSON(value["spec"]), - }; + return { + + 'api_version': value['api_version'], + 'kind': value['kind'], + 'metadata': PreferencesMetadataToJSON(value['metadata']), + 'spec': PreferencesSpecToJSON(value['spec']), + }; } + diff --git a/src/clients/sidecar/models/PreferencesMetadata.ts b/src/clients/sidecar/models/PreferencesMetadata.ts index 76711ebea4..27095ea29b 100644 --- a/src/clients/sidecar/models/PreferencesMetadata.ts +++ b/src/clients/sidecar/models/PreferencesMetadata.ts @@ -12,58 +12,55 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PreferencesMetadata */ export interface PreferencesMetadata { - /** - * - * @type {string} - * @memberof PreferencesMetadata - */ - self: string; + /** + * + * @type {string} + * @memberof PreferencesMetadata + */ + self: string; } /** * Check if a given object implements the PreferencesMetadata interface. */ export function instanceOfPreferencesMetadata(value: object): value is PreferencesMetadata { - if (!("self" in value) || value["self"] === undefined) return false; - return true; + if (!('self' in value) || value['self'] === undefined) return false; + return true; } export function PreferencesMetadataFromJSON(json: any): PreferencesMetadata { - return PreferencesMetadataFromJSONTyped(json, false); + return PreferencesMetadataFromJSONTyped(json, false); } -export function PreferencesMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PreferencesMetadata { - if (json == null) { - return json; - } - return { - self: json["self"], - }; +export function PreferencesMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreferencesMetadata { + if (json == null) { + return json; + } + return { + + 'self': json['self'], + }; } export function PreferencesMetadataToJSON(json: any): PreferencesMetadata { - return PreferencesMetadataToJSONTyped(json, false); + return PreferencesMetadataToJSONTyped(json, false); } -export function PreferencesMetadataToJSONTyped( - value?: PreferencesMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PreferencesMetadataToJSONTyped(value?: PreferencesMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - self: value["self"], - }; + return { + + 'self': value['self'], + }; } + diff --git a/src/clients/sidecar/models/PreferencesSpec.ts b/src/clients/sidecar/models/PreferencesSpec.ts index 5870c32e81..773496360e 100644 --- a/src/clients/sidecar/models/PreferencesSpec.ts +++ b/src/clients/sidecar/models/PreferencesSpec.ts @@ -12,84 +12,78 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface PreferencesSpec */ export interface PreferencesSpec { - /** - * - * @type {string} - * @memberof PreferencesSpec - */ - kerberos_config_file_path?: string; - /** - * - * @type {Array} - * @memberof PreferencesSpec - */ - tls_pem_paths?: Array; - /** - * - * @type {boolean} - * @memberof PreferencesSpec - */ - trust_all_certificates?: boolean; - /** - * - * @type {{ [key: string]: Array; }} - * @memberof PreferencesSpec - */ - flink_private_endpoints?: { [key: string]: Array }; + /** + * + * @type {string} + * @memberof PreferencesSpec + */ + kerberos_config_file_path?: string; + /** + * + * @type {Array} + * @memberof PreferencesSpec + */ + tls_pem_paths?: Array; + /** + * + * @type {boolean} + * @memberof PreferencesSpec + */ + trust_all_certificates?: boolean; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof PreferencesSpec + */ + flink_private_endpoints?: { [key: string]: Array; }; } /** * Check if a given object implements the PreferencesSpec interface. */ export function instanceOfPreferencesSpec(value: object): value is PreferencesSpec { - return true; + return true; } export function PreferencesSpecFromJSON(json: any): PreferencesSpec { - return PreferencesSpecFromJSONTyped(json, false); + return PreferencesSpecFromJSONTyped(json, false); } -export function PreferencesSpecFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): PreferencesSpec { - if (json == null) { - return json; - } - return { - kerberos_config_file_path: - json["kerberos_config_file_path"] == null ? undefined : json["kerberos_config_file_path"], - tls_pem_paths: json["tls_pem_paths"] == null ? undefined : json["tls_pem_paths"], - trust_all_certificates: - json["trust_all_certificates"] == null ? undefined : json["trust_all_certificates"], - flink_private_endpoints: - json["flink_private_endpoints"] == null ? undefined : json["flink_private_endpoints"], - }; +export function PreferencesSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreferencesSpec { + if (json == null) { + return json; + } + return { + + 'kerberos_config_file_path': json['kerberos_config_file_path'] == null ? undefined : json['kerberos_config_file_path'], + 'tls_pem_paths': json['tls_pem_paths'] == null ? undefined : json['tls_pem_paths'], + 'trust_all_certificates': json['trust_all_certificates'] == null ? undefined : json['trust_all_certificates'], + 'flink_private_endpoints': json['flink_private_endpoints'] == null ? undefined : json['flink_private_endpoints'], + }; } export function PreferencesSpecToJSON(json: any): PreferencesSpec { - return PreferencesSpecToJSONTyped(json, false); + return PreferencesSpecToJSONTyped(json, false); } -export function PreferencesSpecToJSONTyped( - value?: PreferencesSpec | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function PreferencesSpecToJSONTyped(value?: PreferencesSpec | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - kerberos_config_file_path: value["kerberos_config_file_path"], - tls_pem_paths: value["tls_pem_paths"], - trust_all_certificates: value["trust_all_certificates"], - flink_private_endpoints: value["flink_private_endpoints"], - }; + return { + + 'kerberos_config_file_path': value['kerberos_config_file_path'], + 'tls_pem_paths': value['tls_pem_paths'], + 'trust_all_certificates': value['trust_all_certificates'], + 'flink_private_endpoints': value['flink_private_endpoints'], + }; } + diff --git a/src/clients/sidecar/models/ProduceRequest.ts b/src/clients/sidecar/models/ProduceRequest.ts index 7e670cb4e9..b54a339620 100644 --- a/src/clients/sidecar/models/ProduceRequest.ts +++ b/src/clients/sidecar/models/ProduceRequest.ts @@ -12,111 +12,101 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ProduceRequestHeader } from "./ProduceRequestHeader"; +import { mapValues } from '../runtime'; +import type { ProduceRequestHeader } from './ProduceRequestHeader'; import { - ProduceRequestHeaderFromJSON, - ProduceRequestHeaderFromJSONTyped, - ProduceRequestHeaderToJSON, - ProduceRequestHeaderToJSONTyped, -} from "./ProduceRequestHeader"; -import type { ProduceRequestData } from "./ProduceRequestData"; + ProduceRequestHeaderFromJSON, + ProduceRequestHeaderFromJSONTyped, + ProduceRequestHeaderToJSON, + ProduceRequestHeaderToJSONTyped, +} from './ProduceRequestHeader'; +import type { ProduceRequestData } from './ProduceRequestData'; import { - ProduceRequestDataFromJSON, - ProduceRequestDataFromJSONTyped, - ProduceRequestDataToJSON, - ProduceRequestDataToJSONTyped, -} from "./ProduceRequestData"; + ProduceRequestDataFromJSON, + ProduceRequestDataFromJSONTyped, + ProduceRequestDataToJSON, + ProduceRequestDataToJSONTyped, +} from './ProduceRequestData'; /** - * + * * @export * @interface ProduceRequest */ export interface ProduceRequest { - /** - * - * @type {number} - * @memberof ProduceRequest - */ - partition_id?: number; - /** - * - * @type {Array} - * @memberof ProduceRequest - */ - headers?: Array; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - key?: ProduceRequestData; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - value?: ProduceRequestData; - /** - * - * @type {Date} - * @memberof ProduceRequest - */ - timestamp?: Date; + /** + * + * @type {number} + * @memberof ProduceRequest + */ + partition_id?: number; + /** + * + * @type {Array} + * @memberof ProduceRequest + */ + headers?: Array; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + key?: ProduceRequestData; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + value?: ProduceRequestData; + /** + * + * @type {Date} + * @memberof ProduceRequest + */ + timestamp?: Date; } /** * Check if a given object implements the ProduceRequest interface. */ export function instanceOfProduceRequest(value: object): value is ProduceRequest { - return true; + return true; } export function ProduceRequestFromJSON(json: any): ProduceRequest { - return ProduceRequestFromJSONTyped(json, false); + return ProduceRequestFromJSONTyped(json, false); } -export function ProduceRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceRequest { - if (json == null) { - return json; - } - return { - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - headers: - json["headers"] == null - ? undefined - : (json["headers"] as Array).map(ProduceRequestHeaderFromJSON), - key: json["key"] == null ? undefined : ProduceRequestDataFromJSON(json["key"]), - value: json["value"] == null ? undefined : ProduceRequestDataFromJSON(json["value"]), - timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), - }; +export function ProduceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequest { + if (json == null) { + return json; + } + return { + + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'headers': json['headers'] == null ? undefined : ((json['headers'] as Array).map(ProduceRequestHeaderFromJSON)), + 'key': json['key'] == null ? undefined : ProduceRequestDataFromJSON(json['key']), + 'value': json['value'] == null ? undefined : ProduceRequestDataFromJSON(json['value']), + 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), + }; } export function ProduceRequestToJSON(json: any): ProduceRequest { - return ProduceRequestToJSONTyped(json, false); + return ProduceRequestToJSONTyped(json, false); } -export function ProduceRequestToJSONTyped( - value?: ProduceRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceRequestToJSONTyped(value?: ProduceRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - partition_id: value["partition_id"], - headers: - value["headers"] == null - ? undefined - : (value["headers"] as Array).map(ProduceRequestHeaderToJSON), - key: ProduceRequestDataToJSON(value["key"]), - value: ProduceRequestDataToJSON(value["value"]), - timestamp: - value["timestamp"] == null ? undefined : value["timestamp"].toISOString().substring(0, 10), - }; + return { + + 'partition_id': value['partition_id'], + 'headers': value['headers'] == null ? undefined : ((value['headers'] as Array).map(ProduceRequestHeaderToJSON)), + 'key': ProduceRequestDataToJSON(value['key']), + 'value': ProduceRequestDataToJSON(value['value']), + 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString().substring(0,10)), + }; } + diff --git a/src/clients/sidecar/models/ProduceRequestData.ts b/src/clients/sidecar/models/ProduceRequestData.ts index 7c6131a62a..956272f921 100644 --- a/src/clients/sidecar/models/ProduceRequestData.ts +++ b/src/clients/sidecar/models/ProduceRequestData.ts @@ -12,106 +12,102 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProduceRequestData */ export interface ProduceRequestData { - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - type?: string; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject?: string; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject_name_strategy?: string; - /** - * - * @type {number} - * @memberof ProduceRequestData - */ - schema_id?: number; - /** - * - * @type {number} - * @memberof ProduceRequestData - */ - schema_version?: number; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - schema?: string; - /** - * - * @type {any} - * @memberof ProduceRequestData - */ - data?: any | null; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + type?: string; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject?: string; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject_name_strategy?: string; + /** + * + * @type {number} + * @memberof ProduceRequestData + */ + schema_id?: number; + /** + * + * @type {number} + * @memberof ProduceRequestData + */ + schema_version?: number; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + schema?: string; + /** + * + * @type {any} + * @memberof ProduceRequestData + */ + data?: any | null; } /** * Check if a given object implements the ProduceRequestData interface. */ export function instanceOfProduceRequestData(value: object): value is ProduceRequestData { - return true; + return true; } export function ProduceRequestDataFromJSON(json: any): ProduceRequestData { - return ProduceRequestDataFromJSONTyped(json, false); + return ProduceRequestDataFromJSONTyped(json, false); } -export function ProduceRequestDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceRequestData { - if (json == null) { - return json; - } - return { - type: json["type"] == null ? undefined : json["type"], - subject: json["subject"] == null ? undefined : json["subject"], - subject_name_strategy: - json["subject_name_strategy"] == null ? undefined : json["subject_name_strategy"], - schema_id: json["schema_id"] == null ? undefined : json["schema_id"], - schema_version: json["schema_version"] == null ? undefined : json["schema_version"], - schema: json["schema"] == null ? undefined : json["schema"], - data: json["data"] == null ? undefined : json["data"], - }; +export function ProduceRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestData { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'subject_name_strategy': json['subject_name_strategy'] == null ? undefined : json['subject_name_strategy'], + 'schema_id': json['schema_id'] == null ? undefined : json['schema_id'], + 'schema_version': json['schema_version'] == null ? undefined : json['schema_version'], + 'schema': json['schema'] == null ? undefined : json['schema'], + 'data': json['data'] == null ? undefined : json['data'], + }; } export function ProduceRequestDataToJSON(json: any): ProduceRequestData { - return ProduceRequestDataToJSONTyped(json, false); + return ProduceRequestDataToJSONTyped(json, false); } -export function ProduceRequestDataToJSONTyped( - value?: ProduceRequestData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceRequestDataToJSONTyped(value?: ProduceRequestData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - type: value["type"], - subject: value["subject"], - subject_name_strategy: value["subject_name_strategy"], - schema_id: value["schema_id"], - schema_version: value["schema_version"], - schema: value["schema"], - data: value["data"], - }; + return { + + 'type': value['type'], + 'subject': value['subject'], + 'subject_name_strategy': value['subject_name_strategy'], + 'schema_id': value['schema_id'], + 'schema_version': value['schema_version'], + 'schema': value['schema'], + 'data': value['data'], + }; } + diff --git a/src/clients/sidecar/models/ProduceRequestHeader.ts b/src/clients/sidecar/models/ProduceRequestHeader.ts index 2b44d6e26b..589f00afc2 100644 --- a/src/clients/sidecar/models/ProduceRequestHeader.ts +++ b/src/clients/sidecar/models/ProduceRequestHeader.ts @@ -12,66 +12,63 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProduceRequestHeader */ export interface ProduceRequestHeader { - /** - * - * @type {string} - * @memberof ProduceRequestHeader - */ - name: string; - /** - * - * @type {Blob} - * @memberof ProduceRequestHeader - */ - value?: Blob; + /** + * + * @type {string} + * @memberof ProduceRequestHeader + */ + name: string; + /** + * + * @type {Blob} + * @memberof ProduceRequestHeader + */ + value?: Blob; } /** * Check if a given object implements the ProduceRequestHeader interface. */ export function instanceOfProduceRequestHeader(value: object): value is ProduceRequestHeader { - if (!("name" in value) || value["name"] === undefined) return false; - return true; + if (!('name' in value) || value['name'] === undefined) return false; + return true; } export function ProduceRequestHeaderFromJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderFromJSONTyped(json, false); + return ProduceRequestHeaderFromJSONTyped(json, false); } -export function ProduceRequestHeaderFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceRequestHeader { - if (json == null) { - return json; - } - return { - name: json["name"], - value: json["value"] == null ? undefined : json["value"], - }; +export function ProduceRequestHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestHeader { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'value': json['value'] == null ? undefined : json['value'], + }; } export function ProduceRequestHeaderToJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderToJSONTyped(json, false); + return ProduceRequestHeaderToJSONTyped(json, false); } -export function ProduceRequestHeaderToJSONTyped( - value?: ProduceRequestHeader | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceRequestHeaderToJSONTyped(value?: ProduceRequestHeader | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - name: value["name"], - value: value["value"], - }; + return { + + 'name': value['name'], + 'value': value['value'], + }; } + diff --git a/src/clients/sidecar/models/ProduceResponse.ts b/src/clients/sidecar/models/ProduceResponse.ts index d26fb1f707..f4a9672e42 100644 --- a/src/clients/sidecar/models/ProduceResponse.ts +++ b/src/clients/sidecar/models/ProduceResponse.ts @@ -12,131 +12,127 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { ProduceResponseData } from "./ProduceResponseData"; +import { mapValues } from '../runtime'; +import type { ProduceResponseData } from './ProduceResponseData'; import { - ProduceResponseDataFromJSON, - ProduceResponseDataFromJSONTyped, - ProduceResponseDataToJSON, - ProduceResponseDataToJSONTyped, -} from "./ProduceResponseData"; + ProduceResponseDataFromJSON, + ProduceResponseDataFromJSONTyped, + ProduceResponseDataToJSON, + ProduceResponseDataToJSONTyped, +} from './ProduceResponseData'; /** - * + * * @export * @interface ProduceResponse */ export interface ProduceResponse { - /** - * - * @type {number} - * @memberof ProduceResponse - */ - error_code: number; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - message?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - cluster_id?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - topic_name?: string; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - offset?: number; - /** - * - * @type {Date} - * @memberof ProduceResponse - */ - timestamp?: Date; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - key?: ProduceResponseData; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - value?: ProduceResponseData; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + error_code: number; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + cluster_id?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + topic_name?: string; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + offset?: number; + /** + * + * @type {Date} + * @memberof ProduceResponse + */ + timestamp?: Date; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + key?: ProduceResponseData; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + value?: ProduceResponseData; } /** * Check if a given object implements the ProduceResponse interface. */ export function instanceOfProduceResponse(value: object): value is ProduceResponse { - if (!("error_code" in value) || value["error_code"] === undefined) return false; - return true; + if (!('error_code' in value) || value['error_code'] === undefined) return false; + return true; } export function ProduceResponseFromJSON(json: any): ProduceResponse { - return ProduceResponseFromJSONTyped(json, false); + return ProduceResponseFromJSONTyped(json, false); } -export function ProduceResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceResponse { - if (json == null) { - return json; - } - return { - error_code: json["error_code"], - message: json["message"] == null ? undefined : json["message"], - cluster_id: json["cluster_id"] == null ? undefined : json["cluster_id"], - topic_name: json["topic_name"] == null ? undefined : json["topic_name"], - partition_id: json["partition_id"] == null ? undefined : json["partition_id"], - offset: json["offset"] == null ? undefined : json["offset"], - timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), - key: json["key"] == null ? undefined : ProduceResponseDataFromJSON(json["key"]), - value: json["value"] == null ? undefined : ProduceResponseDataFromJSON(json["value"]), - }; +export function ProduceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponse { + if (json == null) { + return json; + } + return { + + 'error_code': json['error_code'], + 'message': json['message'] == null ? undefined : json['message'], + 'cluster_id': json['cluster_id'] == null ? undefined : json['cluster_id'], + 'topic_name': json['topic_name'] == null ? undefined : json['topic_name'], + 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], + 'offset': json['offset'] == null ? undefined : json['offset'], + 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), + 'key': json['key'] == null ? undefined : ProduceResponseDataFromJSON(json['key']), + 'value': json['value'] == null ? undefined : ProduceResponseDataFromJSON(json['value']), + }; } export function ProduceResponseToJSON(json: any): ProduceResponse { - return ProduceResponseToJSONTyped(json, false); + return ProduceResponseToJSONTyped(json, false); } -export function ProduceResponseToJSONTyped( - value?: ProduceResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceResponseToJSONTyped(value?: ProduceResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - error_code: value["error_code"], - message: value["message"], - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - partition_id: value["partition_id"], - offset: value["offset"], - timestamp: - value["timestamp"] == null ? undefined : value["timestamp"].toISOString().substring(0, 10), - key: ProduceResponseDataToJSON(value["key"]), - value: ProduceResponseDataToJSON(value["value"]), - }; + return { + + 'error_code': value['error_code'], + 'message': value['message'], + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'partition_id': value['partition_id'], + 'offset': value['offset'], + 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString().substring(0,10)), + 'key': ProduceResponseDataToJSON(value['key']), + 'value': ProduceResponseDataToJSON(value['value']), + }; } + diff --git a/src/clients/sidecar/models/ProduceResponseData.ts b/src/clients/sidecar/models/ProduceResponseData.ts index 4a175137e6..2bfd4ecc02 100644 --- a/src/clients/sidecar/models/ProduceResponseData.ts +++ b/src/clients/sidecar/models/ProduceResponseData.ts @@ -12,91 +12,88 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface ProduceResponseData */ export interface ProduceResponseData { - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - size: number; - /** - * - * @type {string} - * @memberof ProduceResponseData - */ - type: string; - /** - * - * @type {string} - * @memberof ProduceResponseData - */ - subject?: string; - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - schema_id?: number; - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - schema_version?: number; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + size: number; + /** + * + * @type {string} + * @memberof ProduceResponseData + */ + type: string; + /** + * + * @type {string} + * @memberof ProduceResponseData + */ + subject?: string; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + schema_id?: number; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + schema_version?: number; } /** * Check if a given object implements the ProduceResponseData interface. */ export function instanceOfProduceResponseData(value: object): value is ProduceResponseData { - if (!("size" in value) || value["size"] === undefined) return false; - if (!("type" in value) || value["type"] === undefined) return false; - return true; + if (!('size' in value) || value['size'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; } export function ProduceResponseDataFromJSON(json: any): ProduceResponseData { - return ProduceResponseDataFromJSONTyped(json, false); + return ProduceResponseDataFromJSONTyped(json, false); } -export function ProduceResponseDataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ProduceResponseData { - if (json == null) { - return json; - } - return { - size: json["size"], - type: json["type"], - subject: json["subject"] == null ? undefined : json["subject"], - schema_id: json["schema_id"] == null ? undefined : json["schema_id"], - schema_version: json["schema_version"] == null ? undefined : json["schema_version"], - }; +export function ProduceResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponseData { + if (json == null) { + return json; + } + return { + + 'size': json['size'], + 'type': json['type'], + 'subject': json['subject'] == null ? undefined : json['subject'], + 'schema_id': json['schema_id'] == null ? undefined : json['schema_id'], + 'schema_version': json['schema_version'] == null ? undefined : json['schema_version'], + }; } export function ProduceResponseDataToJSON(json: any): ProduceResponseData { - return ProduceResponseDataToJSONTyped(json, false); + return ProduceResponseDataToJSONTyped(json, false); } -export function ProduceResponseDataToJSONTyped( - value?: ProduceResponseData | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ProduceResponseDataToJSONTyped(value?: ProduceResponseData | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - size: value["size"], - type: value["type"], - subject: value["subject"], - schema_id: value["schema_id"], - schema_version: value["schema_version"], - }; + return { + + 'size': value['size'], + 'type': value['type'], + 'subject': value['subject'], + 'schema_id': value['schema_id'], + 'schema_version': value['schema_version'], + }; } + diff --git a/src/clients/sidecar/models/RecordMetadata.ts b/src/clients/sidecar/models/RecordMetadata.ts index 3478d87d57..1ed7405741 100644 --- a/src/clients/sidecar/models/RecordMetadata.ts +++ b/src/clients/sidecar/models/RecordMetadata.ts @@ -12,77 +12,70 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { KeyOrValueMetadata } from "./KeyOrValueMetadata"; +import { mapValues } from '../runtime'; +import type { KeyOrValueMetadata } from './KeyOrValueMetadata'; import { - KeyOrValueMetadataFromJSON, - KeyOrValueMetadataFromJSONTyped, - KeyOrValueMetadataToJSON, - KeyOrValueMetadataToJSONTyped, -} from "./KeyOrValueMetadata"; + KeyOrValueMetadataFromJSON, + KeyOrValueMetadataFromJSONTyped, + KeyOrValueMetadataToJSON, + KeyOrValueMetadataToJSONTyped, +} from './KeyOrValueMetadata'; /** - * + * * @export * @interface RecordMetadata */ export interface RecordMetadata { - /** - * - * @type {KeyOrValueMetadata} - * @memberof RecordMetadata - */ - key_metadata?: KeyOrValueMetadata; - /** - * - * @type {KeyOrValueMetadata} - * @memberof RecordMetadata - */ - value_metadata?: KeyOrValueMetadata; + /** + * + * @type {KeyOrValueMetadata} + * @memberof RecordMetadata + */ + key_metadata?: KeyOrValueMetadata; + /** + * + * @type {KeyOrValueMetadata} + * @memberof RecordMetadata + */ + value_metadata?: KeyOrValueMetadata; } /** * Check if a given object implements the RecordMetadata interface. */ export function instanceOfRecordMetadata(value: object): value is RecordMetadata { - return true; + return true; } export function RecordMetadataFromJSON(json: any): RecordMetadata { - return RecordMetadataFromJSONTyped(json, false); + return RecordMetadataFromJSONTyped(json, false); } -export function RecordMetadataFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RecordMetadata { - if (json == null) { - return json; - } - return { - key_metadata: - json["key_metadata"] == null ? undefined : KeyOrValueMetadataFromJSON(json["key_metadata"]), - value_metadata: - json["value_metadata"] == null - ? undefined - : KeyOrValueMetadataFromJSON(json["value_metadata"]), - }; +export function RecordMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordMetadata { + if (json == null) { + return json; + } + return { + + 'key_metadata': json['key_metadata'] == null ? undefined : KeyOrValueMetadataFromJSON(json['key_metadata']), + 'value_metadata': json['value_metadata'] == null ? undefined : KeyOrValueMetadataFromJSON(json['value_metadata']), + }; } export function RecordMetadataToJSON(json: any): RecordMetadata { - return RecordMetadataToJSONTyped(json, false); + return RecordMetadataToJSONTyped(json, false); } -export function RecordMetadataToJSONTyped( - value?: RecordMetadata | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function RecordMetadataToJSONTyped(value?: RecordMetadata | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - key_metadata: KeyOrValueMetadataToJSON(value["key_metadata"]), - value_metadata: KeyOrValueMetadataToJSON(value["value_metadata"]), - }; + return { + + 'key_metadata': KeyOrValueMetadataToJSON(value['key_metadata']), + 'value_metadata': KeyOrValueMetadataToJSON(value['value_metadata']), + }; } + diff --git a/src/clients/sidecar/models/SchemaRegistryConfig.ts b/src/clients/sidecar/models/SchemaRegistryConfig.ts index f3492b6db6..37238d1ca7 100644 --- a/src/clients/sidecar/models/SchemaRegistryConfig.ts +++ b/src/clients/sidecar/models/SchemaRegistryConfig.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TLSConfig } from "./TLSConfig"; +import { mapValues } from '../runtime'; +import type { TLSConfig } from './TLSConfig'; import { - TLSConfigFromJSON, - TLSConfigFromJSONTyped, - TLSConfigToJSON, - TLSConfigToJSONTyped, -} from "./TLSConfig"; -import type { SchemaRegistryConfigCredentials } from "./SchemaRegistryConfigCredentials"; + TLSConfigFromJSON, + TLSConfigFromJSONTyped, + TLSConfigToJSON, + TLSConfigToJSONTyped, +} from './TLSConfig'; +import type { SchemaRegistryConfigCredentials } from './SchemaRegistryConfigCredentials'; import { - SchemaRegistryConfigCredentialsFromJSON, - SchemaRegistryConfigCredentialsFromJSONTyped, - SchemaRegistryConfigCredentialsToJSON, - SchemaRegistryConfigCredentialsToJSONTyped, -} from "./SchemaRegistryConfigCredentials"; + SchemaRegistryConfigCredentialsFromJSON, + SchemaRegistryConfigCredentialsFromJSONTyped, + SchemaRegistryConfigCredentialsToJSON, + SchemaRegistryConfigCredentialsToJSONTyped, +} from './SchemaRegistryConfigCredentials'; /** * Schema Registry configuration. @@ -34,78 +34,72 @@ import { * @interface SchemaRegistryConfig */ export interface SchemaRegistryConfig { - /** - * The identifier of the Schema Registry cluster, if known. - * @type {string} - * @memberof SchemaRegistryConfig - */ - id?: string; - /** - * The URL of the Schema Registry. - * @type {string} - * @memberof SchemaRegistryConfig - */ - uri: string; - /** - * - * @type {SchemaRegistryConfigCredentials} - * @memberof SchemaRegistryConfig - */ - credentials?: SchemaRegistryConfigCredentials; - /** - * The SSL configuration for connecting to Schema Registry. If null, the connection will use SSL with the default settings. To disable, set `enabled` to false. - * @type {TLSConfig} - * @memberof SchemaRegistryConfig - */ - ssl?: TLSConfig | null; + /** + * The identifier of the Schema Registry cluster, if known. + * @type {string} + * @memberof SchemaRegistryConfig + */ + id?: string; + /** + * The URL of the Schema Registry. + * @type {string} + * @memberof SchemaRegistryConfig + */ + uri: string; + /** + * + * @type {SchemaRegistryConfigCredentials} + * @memberof SchemaRegistryConfig + */ + credentials?: SchemaRegistryConfigCredentials; + /** + * The SSL configuration for connecting to Schema Registry. If null, the connection will use SSL with the default settings. To disable, set `enabled` to false. + * @type {TLSConfig} + * @memberof SchemaRegistryConfig + */ + ssl?: TLSConfig | null; } /** * Check if a given object implements the SchemaRegistryConfig interface. */ export function instanceOfSchemaRegistryConfig(value: object): value is SchemaRegistryConfig { - if (!("uri" in value) || value["uri"] === undefined) return false; - return true; + if (!('uri' in value) || value['uri'] === undefined) return false; + return true; } export function SchemaRegistryConfigFromJSON(json: any): SchemaRegistryConfig { - return SchemaRegistryConfigFromJSONTyped(json, false); + return SchemaRegistryConfigFromJSONTyped(json, false); } -export function SchemaRegistryConfigFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SchemaRegistryConfig { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - uri: json["uri"], - credentials: - json["credentials"] == null - ? undefined - : SchemaRegistryConfigCredentialsFromJSON(json["credentials"]), - ssl: json["ssl"] == null ? undefined : TLSConfigFromJSON(json["ssl"]), - }; +export function SchemaRegistryConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaRegistryConfig { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'uri': json['uri'], + 'credentials': json['credentials'] == null ? undefined : SchemaRegistryConfigCredentialsFromJSON(json['credentials']), + 'ssl': json['ssl'] == null ? undefined : TLSConfigFromJSON(json['ssl']), + }; } export function SchemaRegistryConfigToJSON(json: any): SchemaRegistryConfig { - return SchemaRegistryConfigToJSONTyped(json, false); + return SchemaRegistryConfigToJSONTyped(json, false); } -export function SchemaRegistryConfigToJSONTyped( - value?: SchemaRegistryConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SchemaRegistryConfigToJSONTyped(value?: SchemaRegistryConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - uri: value["uri"], - credentials: SchemaRegistryConfigCredentialsToJSON(value["credentials"]), - ssl: TLSConfigToJSON(value["ssl"]), - }; + return { + + 'id': value['id'], + 'uri': value['uri'], + 'credentials': SchemaRegistryConfigCredentialsToJSON(value['credentials']), + 'ssl': TLSConfigToJSON(value['ssl']), + }; } + diff --git a/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts b/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts index bfb66b785e..bf63497c8f 100644 --- a/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts +++ b/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts @@ -12,27 +12,27 @@ * Do not edit the class manually. */ -import type { ApiKeyAndSecret } from "./ApiKeyAndSecret"; +import type { ApiKeyAndSecret } from './ApiKeyAndSecret'; import { - instanceOfApiKeyAndSecret, - ApiKeyAndSecretFromJSON, - ApiKeyAndSecretFromJSONTyped, - ApiKeyAndSecretToJSON, -} from "./ApiKeyAndSecret"; -import type { BasicCredentials } from "./BasicCredentials"; + instanceOfApiKeyAndSecret, + ApiKeyAndSecretFromJSON, + ApiKeyAndSecretFromJSONTyped, + ApiKeyAndSecretToJSON, +} from './ApiKeyAndSecret'; +import type { BasicCredentials } from './BasicCredentials'; import { - instanceOfBasicCredentials, - BasicCredentialsFromJSON, - BasicCredentialsFromJSONTyped, - BasicCredentialsToJSON, -} from "./BasicCredentials"; -import type { OAuthCredentials } from "./OAuthCredentials"; + instanceOfBasicCredentials, + BasicCredentialsFromJSON, + BasicCredentialsFromJSONTyped, + BasicCredentialsToJSON, +} from './BasicCredentials'; +import type { OAuthCredentials } from './OAuthCredentials'; import { - instanceOfOAuthCredentials, - OAuthCredentialsFromJSON, - OAuthCredentialsFromJSONTyped, - OAuthCredentialsToJSON, -} from "./OAuthCredentials"; + instanceOfOAuthCredentials, + OAuthCredentialsFromJSON, + OAuthCredentialsFromJSONTyped, + OAuthCredentialsToJSON, +} from './OAuthCredentials'; /** * @type SchemaRegistryConfigCredentials @@ -41,53 +41,46 @@ import { */ export type SchemaRegistryConfigCredentials = ApiKeyAndSecret | BasicCredentials | OAuthCredentials; -export function SchemaRegistryConfigCredentialsFromJSON( - json: any, -): SchemaRegistryConfigCredentials { - return SchemaRegistryConfigCredentialsFromJSONTyped(json, false); +export function SchemaRegistryConfigCredentialsFromJSON(json: any): SchemaRegistryConfigCredentials { + return SchemaRegistryConfigCredentialsFromJSONTyped(json, false); } -export function SchemaRegistryConfigCredentialsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SchemaRegistryConfigCredentials { - if (json == null) { - return json; - } - if (instanceOfApiKeyAndSecret(json)) { - return ApiKeyAndSecretFromJSONTyped(json, true); - } - if (instanceOfBasicCredentials(json)) { - return BasicCredentialsFromJSONTyped(json, true); - } - if (instanceOfOAuthCredentials(json)) { - return OAuthCredentialsFromJSONTyped(json, true); - } +export function SchemaRegistryConfigCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaRegistryConfigCredentials { + if (json == null) { + return json; + } + if (instanceOfApiKeyAndSecret(json)) { + return ApiKeyAndSecretFromJSONTyped(json, true); + } + if (instanceOfBasicCredentials(json)) { + return BasicCredentialsFromJSONTyped(json, true); + } + if (instanceOfOAuthCredentials(json)) { + return OAuthCredentialsFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function SchemaRegistryConfigCredentialsToJSON(json: any): any { - return SchemaRegistryConfigCredentialsToJSONTyped(json, false); + return SchemaRegistryConfigCredentialsToJSONTyped(json, false); } -export function SchemaRegistryConfigCredentialsToJSONTyped( - value?: SchemaRegistryConfigCredentials | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SchemaRegistryConfigCredentialsToJSONTyped(value?: SchemaRegistryConfigCredentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - if (instanceOfApiKeyAndSecret(value)) { - return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); - } - if (instanceOfBasicCredentials(value)) { - return BasicCredentialsToJSON(value as BasicCredentials); - } - if (instanceOfOAuthCredentials(value)) { - return OAuthCredentialsToJSON(value as OAuthCredentials); - } + if (instanceOfApiKeyAndSecret(value)) { + return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); + } + if (instanceOfBasicCredentials(value)) { + return BasicCredentialsToJSON(value as BasicCredentials); + } + if (instanceOfOAuthCredentials(value)) { + return OAuthCredentialsToJSON(value as OAuthCredentials); + } - return {}; + return {}; } + diff --git a/src/clients/sidecar/models/SchemaRegistryStatus.ts b/src/clients/sidecar/models/SchemaRegistryStatus.ts index 5c5993f7db..9f839b08b3 100644 --- a/src/clients/sidecar/models/SchemaRegistryStatus.ts +++ b/src/clients/sidecar/models/SchemaRegistryStatus.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { AuthErrors } from "./AuthErrors"; +import { mapValues } from '../runtime'; +import type { AuthErrors } from './AuthErrors'; import { - AuthErrorsFromJSON, - AuthErrorsFromJSONTyped, - AuthErrorsToJSON, - AuthErrorsToJSONTyped, -} from "./AuthErrors"; -import type { ConnectedState } from "./ConnectedState"; + AuthErrorsFromJSON, + AuthErrorsFromJSONTyped, + AuthErrorsToJSON, + AuthErrorsToJSONTyped, +} from './AuthErrors'; +import type { ConnectedState } from './ConnectedState'; import { - ConnectedStateFromJSON, - ConnectedStateFromJSONTyped, - ConnectedStateToJSON, - ConnectedStateToJSONTyped, -} from "./ConnectedState"; -import type { UserInfo } from "./UserInfo"; + ConnectedStateFromJSON, + ConnectedStateFromJSONTyped, + ConnectedStateToJSON, + ConnectedStateToJSONTyped, +} from './ConnectedState'; +import type { UserInfo } from './UserInfo'; import { - UserInfoFromJSON, - UserInfoFromJSONTyped, - UserInfoToJSON, - UserInfoToJSONTyped, -} from "./UserInfo"; + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from './UserInfo'; /** * The status related to the specified Schema Registry. @@ -41,67 +41,66 @@ import { * @interface SchemaRegistryStatus */ export interface SchemaRegistryStatus { - /** - * The state of the connection to the Schema Registry. - * @type {ConnectedState} - * @memberof SchemaRegistryStatus - */ - state: ConnectedState; - /** - * Information about the authenticated principal, if known. - * @type {UserInfo} - * @memberof SchemaRegistryStatus - */ - user?: UserInfo; - /** - * Errors related to the connection to the Schema Registry. - * @type {AuthErrors} - * @memberof SchemaRegistryStatus - */ - errors?: AuthErrors; + /** + * The state of the connection to the Schema Registry. + * @type {ConnectedState} + * @memberof SchemaRegistryStatus + */ + state: ConnectedState; + /** + * Information about the authenticated principal, if known. + * @type {UserInfo} + * @memberof SchemaRegistryStatus + */ + user?: UserInfo; + /** + * Errors related to the connection to the Schema Registry. + * @type {AuthErrors} + * @memberof SchemaRegistryStatus + */ + errors?: AuthErrors; } + + /** * Check if a given object implements the SchemaRegistryStatus interface. */ export function instanceOfSchemaRegistryStatus(value: object): value is SchemaRegistryStatus { - if (!("state" in value) || value["state"] === undefined) return false; - return true; + if (!('state' in value) || value['state'] === undefined) return false; + return true; } export function SchemaRegistryStatusFromJSON(json: any): SchemaRegistryStatus { - return SchemaRegistryStatusFromJSONTyped(json, false); + return SchemaRegistryStatusFromJSONTyped(json, false); } -export function SchemaRegistryStatusFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SchemaRegistryStatus { - if (json == null) { - return json; - } - return { - state: ConnectedStateFromJSON(json["state"]), - user: json["user"] == null ? undefined : UserInfoFromJSON(json["user"]), - errors: json["errors"] == null ? undefined : AuthErrorsFromJSON(json["errors"]), - }; +export function SchemaRegistryStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaRegistryStatus { + if (json == null) { + return json; + } + return { + + 'state': ConnectedStateFromJSON(json['state']), + 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), + 'errors': json['errors'] == null ? undefined : AuthErrorsFromJSON(json['errors']), + }; } export function SchemaRegistryStatusToJSON(json: any): SchemaRegistryStatus { - return SchemaRegistryStatusToJSONTyped(json, false); + return SchemaRegistryStatusToJSONTyped(json, false); } -export function SchemaRegistryStatusToJSONTyped( - value?: SchemaRegistryStatus | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SchemaRegistryStatusToJSONTyped(value?: SchemaRegistryStatus | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - state: ConnectedStateToJSON(value["state"]), - user: UserInfoToJSON(value["user"]), - errors: AuthErrorsToJSON(value["errors"]), - }; + return { + + 'state': ConnectedStateToJSON(value['state']), + 'user': UserInfoToJSON(value['user']), + 'errors': AuthErrorsToJSON(value['errors']), + }; } + diff --git a/src/clients/sidecar/models/ScramCredentials.ts b/src/clients/sidecar/models/ScramCredentials.ts index 0c28dc0ec2..4a42910e20 100644 --- a/src/clients/sidecar/models/ScramCredentials.ts +++ b/src/clients/sidecar/models/ScramCredentials.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { HashAlgorithm } from "./HashAlgorithm"; +import { mapValues } from '../runtime'; +import type { HashAlgorithm } from './HashAlgorithm'; import { - HashAlgorithmFromJSON, - HashAlgorithmFromJSONTyped, - HashAlgorithmToJSON, - HashAlgorithmToJSONTyped, -} from "./HashAlgorithm"; + HashAlgorithmFromJSON, + HashAlgorithmFromJSONTyped, + HashAlgorithmToJSON, + HashAlgorithmToJSONTyped, +} from './HashAlgorithm'; /** * Scram authentication credentials @@ -27,69 +27,68 @@ import { * @interface ScramCredentials */ export interface ScramCredentials { - /** - * Hash algorithm - * @type {HashAlgorithm} - * @memberof ScramCredentials - */ - hash_algorithm: HashAlgorithm; - /** - * The username to use when connecting to the external service. - * @type {string} - * @memberof ScramCredentials - */ - scram_username: string; - /** - * The password to use when connecting to the external service. - * @type {string} - * @memberof ScramCredentials - */ - scram_password: string; + /** + * Hash algorithm + * @type {HashAlgorithm} + * @memberof ScramCredentials + */ + hash_algorithm: HashAlgorithm; + /** + * The username to use when connecting to the external service. + * @type {string} + * @memberof ScramCredentials + */ + scram_username: string; + /** + * The password to use when connecting to the external service. + * @type {string} + * @memberof ScramCredentials + */ + scram_password: string; } + + /** * Check if a given object implements the ScramCredentials interface. */ export function instanceOfScramCredentials(value: object): value is ScramCredentials { - if (!("hash_algorithm" in value) || value["hash_algorithm"] === undefined) return false; - if (!("scram_username" in value) || value["scram_username"] === undefined) return false; - if (!("scram_password" in value) || value["scram_password"] === undefined) return false; - return true; + if (!('hash_algorithm' in value) || value['hash_algorithm'] === undefined) return false; + if (!('scram_username' in value) || value['scram_username'] === undefined) return false; + if (!('scram_password' in value) || value['scram_password'] === undefined) return false; + return true; } export function ScramCredentialsFromJSON(json: any): ScramCredentials { - return ScramCredentialsFromJSONTyped(json, false); + return ScramCredentialsFromJSONTyped(json, false); } -export function ScramCredentialsFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): ScramCredentials { - if (json == null) { - return json; - } - return { - hash_algorithm: HashAlgorithmFromJSON(json["hash_algorithm"]), - scram_username: json["scram_username"], - scram_password: json["scram_password"], - }; +export function ScramCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScramCredentials { + if (json == null) { + return json; + } + return { + + 'hash_algorithm': HashAlgorithmFromJSON(json['hash_algorithm']), + 'scram_username': json['scram_username'], + 'scram_password': json['scram_password'], + }; } export function ScramCredentialsToJSON(json: any): ScramCredentials { - return ScramCredentialsToJSONTyped(json, false); + return ScramCredentialsToJSONTyped(json, false); } -export function ScramCredentialsToJSONTyped( - value?: ScramCredentials | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function ScramCredentialsToJSONTyped(value?: ScramCredentials | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - hash_algorithm: HashAlgorithmToJSON(value["hash_algorithm"]), - scram_username: value["scram_username"], - scram_password: value["scram_password"], - }; + return { + + 'hash_algorithm': HashAlgorithmToJSON(value['hash_algorithm']), + 'scram_username': value['scram_username'], + 'scram_password': value['scram_password'], + }; } + diff --git a/src/clients/sidecar/models/SidecarAccessToken.ts b/src/clients/sidecar/models/SidecarAccessToken.ts index abb95f82a3..0a79504322 100644 --- a/src/clients/sidecar/models/SidecarAccessToken.ts +++ b/src/clients/sidecar/models/SidecarAccessToken.ts @@ -12,57 +12,54 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SidecarAccessToken */ export interface SidecarAccessToken { - /** - * - * @type {string} - * @memberof SidecarAccessToken - */ - auth_secret?: string; + /** + * + * @type {string} + * @memberof SidecarAccessToken + */ + auth_secret?: string; } /** * Check if a given object implements the SidecarAccessToken interface. */ export function instanceOfSidecarAccessToken(value: object): value is SidecarAccessToken { - return true; + return true; } export function SidecarAccessTokenFromJSON(json: any): SidecarAccessToken { - return SidecarAccessTokenFromJSONTyped(json, false); + return SidecarAccessTokenFromJSONTyped(json, false); } -export function SidecarAccessTokenFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SidecarAccessToken { - if (json == null) { - return json; - } - return { - auth_secret: json["auth_secret"] == null ? undefined : json["auth_secret"], - }; +export function SidecarAccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarAccessToken { + if (json == null) { + return json; + } + return { + + 'auth_secret': json['auth_secret'] == null ? undefined : json['auth_secret'], + }; } export function SidecarAccessTokenToJSON(json: any): SidecarAccessToken { - return SidecarAccessTokenToJSONTyped(json, false); + return SidecarAccessTokenToJSONTyped(json, false); } -export function SidecarAccessTokenToJSONTyped( - value?: SidecarAccessToken | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SidecarAccessTokenToJSONTyped(value?: SidecarAccessToken | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - auth_secret: value["auth_secret"], - }; + return { + + 'auth_secret': value['auth_secret'], + }; } + diff --git a/src/clients/sidecar/models/SidecarError.ts b/src/clients/sidecar/models/SidecarError.ts index 09c0ab1db7..64f20cbf16 100644 --- a/src/clients/sidecar/models/SidecarError.ts +++ b/src/clients/sidecar/models/SidecarError.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { JsonNode } from "./JsonNode"; +import { mapValues } from '../runtime'; +import type { JsonNode } from './JsonNode'; import { - JsonNodeFromJSON, - JsonNodeFromJSONTyped, - JsonNodeToJSON, - JsonNodeToJSONTyped, -} from "./JsonNode"; + JsonNodeFromJSON, + JsonNodeFromJSONTyped, + JsonNodeToJSON, + JsonNodeToJSONTyped, +} from './JsonNode'; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface SidecarError */ export interface SidecarError { - /** - * - * @type {string} - * @memberof SidecarError - */ - code?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - status?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - title?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - id?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - detail?: string; - /** - * - * @type {JsonNode} - * @memberof SidecarError - */ - source?: JsonNode; + /** + * + * @type {string} + * @memberof SidecarError + */ + code?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + status?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + title?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + id?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + detail?: string; + /** + * + * @type {JsonNode} + * @memberof SidecarError + */ + source?: JsonNode; } /** * Check if a given object implements the SidecarError interface. */ export function instanceOfSidecarError(value: object): value is SidecarError { - return true; + return true; } export function SidecarErrorFromJSON(json: any): SidecarError { - return SidecarErrorFromJSONTyped(json, false); + return SidecarErrorFromJSONTyped(json, false); } export function SidecarErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarError { - if (json == null) { - return json; - } - return { - code: json["code"] == null ? undefined : json["code"], - status: json["status"] == null ? undefined : json["status"], - title: json["title"] == null ? undefined : json["title"], - id: json["id"] == null ? undefined : json["id"], - detail: json["detail"] == null ? undefined : json["detail"], - source: json["source"] == null ? undefined : JsonNodeFromJSON(json["source"]), - }; + if (json == null) { + return json; + } + return { + + 'code': json['code'] == null ? undefined : json['code'], + 'status': json['status'] == null ? undefined : json['status'], + 'title': json['title'] == null ? undefined : json['title'], + 'id': json['id'] == null ? undefined : json['id'], + 'detail': json['detail'] == null ? undefined : json['detail'], + 'source': json['source'] == null ? undefined : JsonNodeFromJSON(json['source']), + }; } export function SidecarErrorToJSON(json: any): SidecarError { - return SidecarErrorToJSONTyped(json, false); + return SidecarErrorToJSONTyped(json, false); } -export function SidecarErrorToJSONTyped( - value?: SidecarError | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SidecarErrorToJSONTyped(value?: SidecarError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - code: value["code"], - status: value["status"], - title: value["title"], - id: value["id"], - detail: value["detail"], - source: JsonNodeToJSON(value["source"]), - }; + return { + + 'code': value['code'], + 'status': value['status'], + 'title': value['title'], + 'id': value['id'], + 'detail': value['detail'], + 'source': JsonNodeToJSON(value['source']), + }; } + diff --git a/src/clients/sidecar/models/SidecarVersionResponse.ts b/src/clients/sidecar/models/SidecarVersionResponse.ts index 009021cedb..7ad40370dd 100644 --- a/src/clients/sidecar/models/SidecarVersionResponse.ts +++ b/src/clients/sidecar/models/SidecarVersionResponse.ts @@ -12,57 +12,54 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface SidecarVersionResponse */ export interface SidecarVersionResponse { - /** - * - * @type {string} - * @memberof SidecarVersionResponse - */ - version?: string; + /** + * + * @type {string} + * @memberof SidecarVersionResponse + */ + version?: string; } /** * Check if a given object implements the SidecarVersionResponse interface. */ export function instanceOfSidecarVersionResponse(value: object): value is SidecarVersionResponse { - return true; + return true; } export function SidecarVersionResponseFromJSON(json: any): SidecarVersionResponse { - return SidecarVersionResponseFromJSONTyped(json, false); + return SidecarVersionResponseFromJSONTyped(json, false); } -export function SidecarVersionResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SidecarVersionResponse { - if (json == null) { - return json; - } - return { - version: json["version"] == null ? undefined : json["version"], - }; +export function SidecarVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarVersionResponse { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + }; } export function SidecarVersionResponseToJSON(json: any): SidecarVersionResponse { - return SidecarVersionResponseToJSONTyped(json, false); + return SidecarVersionResponseToJSONTyped(json, false); } -export function SidecarVersionResponseToJSONTyped( - value?: SidecarVersionResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SidecarVersionResponseToJSONTyped(value?: SidecarVersionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - version: value["version"], - }; + return { + + 'version': value['version'], + }; } + diff --git a/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts b/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts index 65019f3ede..9dd45dabb6 100644 --- a/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts +++ b/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts @@ -12,117 +12,102 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PartitionOffset } from "./PartitionOffset"; +import { mapValues } from '../runtime'; +import type { PartitionOffset } from './PartitionOffset'; import { - PartitionOffsetFromJSON, - PartitionOffsetFromJSONTyped, - PartitionOffsetToJSON, - PartitionOffsetToJSONTyped, -} from "./PartitionOffset"; + PartitionOffsetFromJSON, + PartitionOffsetFromJSONTyped, + PartitionOffsetToJSON, + PartitionOffsetToJSONTyped, +} from './PartitionOffset'; /** - * + * * @export * @interface SimpleConsumeMultiPartitionRequest */ export interface SimpleConsumeMultiPartitionRequest { - /** - * - * @type {Array} - * @memberof SimpleConsumeMultiPartitionRequest - */ - offsets?: Array; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - max_poll_records?: number; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - timestamp?: number; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - fetch_max_bytes?: number; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - message_max_bytes?: number; - /** - * - * @type {boolean} - * @memberof SimpleConsumeMultiPartitionRequest - */ - from_beginning?: boolean; + /** + * + * @type {Array} + * @memberof SimpleConsumeMultiPartitionRequest + */ + offsets?: Array; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + max_poll_records?: number; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + timestamp?: number; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + fetch_max_bytes?: number; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + message_max_bytes?: number; + /** + * + * @type {boolean} + * @memberof SimpleConsumeMultiPartitionRequest + */ + from_beginning?: boolean; } /** * Check if a given object implements the SimpleConsumeMultiPartitionRequest interface. */ -export function instanceOfSimpleConsumeMultiPartitionRequest( - value: object, -): value is SimpleConsumeMultiPartitionRequest { - return true; +export function instanceOfSimpleConsumeMultiPartitionRequest(value: object): value is SimpleConsumeMultiPartitionRequest { + return true; } -export function SimpleConsumeMultiPartitionRequestFromJSON( - json: any, -): SimpleConsumeMultiPartitionRequest { - return SimpleConsumeMultiPartitionRequestFromJSONTyped(json, false); +export function SimpleConsumeMultiPartitionRequestFromJSON(json: any): SimpleConsumeMultiPartitionRequest { + return SimpleConsumeMultiPartitionRequestFromJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionRequestFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SimpleConsumeMultiPartitionRequest { - if (json == null) { - return json; - } - return { - offsets: - json["offsets"] == null - ? undefined - : (json["offsets"] as Array).map(PartitionOffsetFromJSON), - max_poll_records: json["max_poll_records"] == null ? undefined : json["max_poll_records"], - timestamp: json["timestamp"] == null ? undefined : json["timestamp"], - fetch_max_bytes: json["fetch_max_bytes"] == null ? undefined : json["fetch_max_bytes"], - message_max_bytes: json["message_max_bytes"] == null ? undefined : json["message_max_bytes"], - from_beginning: json["from_beginning"] == null ? undefined : json["from_beginning"], - }; +export function SimpleConsumeMultiPartitionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SimpleConsumeMultiPartitionRequest { + if (json == null) { + return json; + } + return { + + 'offsets': json['offsets'] == null ? undefined : ((json['offsets'] as Array).map(PartitionOffsetFromJSON)), + 'max_poll_records': json['max_poll_records'] == null ? undefined : json['max_poll_records'], + 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], + 'fetch_max_bytes': json['fetch_max_bytes'] == null ? undefined : json['fetch_max_bytes'], + 'message_max_bytes': json['message_max_bytes'] == null ? undefined : json['message_max_bytes'], + 'from_beginning': json['from_beginning'] == null ? undefined : json['from_beginning'], + }; } -export function SimpleConsumeMultiPartitionRequestToJSON( - json: any, -): SimpleConsumeMultiPartitionRequest { - return SimpleConsumeMultiPartitionRequestToJSONTyped(json, false); +export function SimpleConsumeMultiPartitionRequestToJSON(json: any): SimpleConsumeMultiPartitionRequest { + return SimpleConsumeMultiPartitionRequestToJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionRequestToJSONTyped( - value?: SimpleConsumeMultiPartitionRequest | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SimpleConsumeMultiPartitionRequestToJSONTyped(value?: SimpleConsumeMultiPartitionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - offsets: - value["offsets"] == null - ? undefined - : (value["offsets"] as Array).map(PartitionOffsetToJSON), - max_poll_records: value["max_poll_records"], - timestamp: value["timestamp"], - fetch_max_bytes: value["fetch_max_bytes"], - message_max_bytes: value["message_max_bytes"], - from_beginning: value["from_beginning"], - }; + return { + + 'offsets': value['offsets'] == null ? undefined : ((value['offsets'] as Array).map(PartitionOffsetToJSON)), + 'max_poll_records': value['max_poll_records'], + 'timestamp': value['timestamp'], + 'fetch_max_bytes': value['fetch_max_bytes'], + 'message_max_bytes': value['message_max_bytes'], + 'from_beginning': value['from_beginning'], + }; } + diff --git a/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts b/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts index 5536fcb6e9..21f978e7c5 100644 --- a/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts +++ b/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts @@ -12,93 +12,78 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { PartitionConsumeData } from "./PartitionConsumeData"; +import { mapValues } from '../runtime'; +import type { PartitionConsumeData } from './PartitionConsumeData'; import { - PartitionConsumeDataFromJSON, - PartitionConsumeDataFromJSONTyped, - PartitionConsumeDataToJSON, - PartitionConsumeDataToJSONTyped, -} from "./PartitionConsumeData"; + PartitionConsumeDataFromJSON, + PartitionConsumeDataFromJSONTyped, + PartitionConsumeDataToJSON, + PartitionConsumeDataToJSONTyped, +} from './PartitionConsumeData'; /** - * + * * @export * @interface SimpleConsumeMultiPartitionResponse */ export interface SimpleConsumeMultiPartitionResponse { - /** - * - * @type {string} - * @memberof SimpleConsumeMultiPartitionResponse - */ - cluster_id?: string; - /** - * - * @type {string} - * @memberof SimpleConsumeMultiPartitionResponse - */ - topic_name?: string; - /** - * - * @type {Array} - * @memberof SimpleConsumeMultiPartitionResponse - */ - partition_data_list?: Array; + /** + * + * @type {string} + * @memberof SimpleConsumeMultiPartitionResponse + */ + cluster_id?: string; + /** + * + * @type {string} + * @memberof SimpleConsumeMultiPartitionResponse + */ + topic_name?: string; + /** + * + * @type {Array} + * @memberof SimpleConsumeMultiPartitionResponse + */ + partition_data_list?: Array; } /** * Check if a given object implements the SimpleConsumeMultiPartitionResponse interface. */ -export function instanceOfSimpleConsumeMultiPartitionResponse( - value: object, -): value is SimpleConsumeMultiPartitionResponse { - return true; +export function instanceOfSimpleConsumeMultiPartitionResponse(value: object): value is SimpleConsumeMultiPartitionResponse { + return true; } -export function SimpleConsumeMultiPartitionResponseFromJSON( - json: any, -): SimpleConsumeMultiPartitionResponse { - return SimpleConsumeMultiPartitionResponseFromJSONTyped(json, false); +export function SimpleConsumeMultiPartitionResponseFromJSON(json: any): SimpleConsumeMultiPartitionResponse { + return SimpleConsumeMultiPartitionResponseFromJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionResponseFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): SimpleConsumeMultiPartitionResponse { - if (json == null) { - return json; - } - return { - cluster_id: json["cluster_id"] == null ? undefined : json["cluster_id"], - topic_name: json["topic_name"] == null ? undefined : json["topic_name"], - partition_data_list: - json["partition_data_list"] == null - ? undefined - : (json["partition_data_list"] as Array).map(PartitionConsumeDataFromJSON), - }; +export function SimpleConsumeMultiPartitionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SimpleConsumeMultiPartitionResponse { + if (json == null) { + return json; + } + return { + + 'cluster_id': json['cluster_id'] == null ? undefined : json['cluster_id'], + 'topic_name': json['topic_name'] == null ? undefined : json['topic_name'], + 'partition_data_list': json['partition_data_list'] == null ? undefined : ((json['partition_data_list'] as Array).map(PartitionConsumeDataFromJSON)), + }; } -export function SimpleConsumeMultiPartitionResponseToJSON( - json: any, -): SimpleConsumeMultiPartitionResponse { - return SimpleConsumeMultiPartitionResponseToJSONTyped(json, false); +export function SimpleConsumeMultiPartitionResponseToJSON(json: any): SimpleConsumeMultiPartitionResponse { + return SimpleConsumeMultiPartitionResponseToJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionResponseToJSONTyped( - value?: SimpleConsumeMultiPartitionResponse | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function SimpleConsumeMultiPartitionResponseToJSONTyped(value?: SimpleConsumeMultiPartitionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - cluster_id: value["cluster_id"], - topic_name: value["topic_name"], - partition_data_list: - value["partition_data_list"] == null - ? undefined - : (value["partition_data_list"] as Array).map(PartitionConsumeDataToJSON), - }; + return { + + 'cluster_id': value['cluster_id'], + 'topic_name': value['topic_name'], + 'partition_data_list': value['partition_data_list'] == null ? undefined : ((value['partition_data_list'] as Array).map(PartitionConsumeDataToJSON)), + }; } + diff --git a/src/clients/sidecar/models/StoreType.ts b/src/clients/sidecar/models/StoreType.ts index 3185db34f5..a11d0997d1 100644 --- a/src/clients/sidecar/models/StoreType.ts +++ b/src/clients/sidecar/models/StoreType.ts @@ -13,40 +13,42 @@ */ /** - * + * * @export * @enum {string} */ export enum StoreType { - Jks = "JKS", - Pkcs12 = "PKCS12", - Pem = "PEM", - Unknown = "UNKNOWN", + Jks = 'JKS', + Pkcs12 = 'PKCS12', + Pem = 'PEM', + Unknown = 'UNKNOWN' } + export function instanceOfStoreType(value: any): boolean { - for (const key in StoreType) { - if (Object.prototype.hasOwnProperty.call(StoreType, key)) { - if (StoreType[key as keyof typeof StoreType] === value) { - return true; - } + for (const key in StoreType) { + if (Object.prototype.hasOwnProperty.call(StoreType, key)) { + if (StoreType[key as keyof typeof StoreType] === value) { + return true; + } + } } - } - return false; + return false; } export function StoreTypeFromJSON(json: any): StoreType { - return StoreTypeFromJSONTyped(json, false); + return StoreTypeFromJSONTyped(json, false); } export function StoreTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreType { - return json as StoreType; + return json as StoreType; } export function StoreTypeToJSON(value?: StoreType | null): any { - return value as any; + return value as any; } export function StoreTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): StoreType { - return value as StoreType; + return value as StoreType; } + diff --git a/src/clients/sidecar/models/TLSConfig.ts b/src/clients/sidecar/models/TLSConfig.ts index f65598b75a..86d37c062e 100644 --- a/src/clients/sidecar/models/TLSConfig.ts +++ b/src/clients/sidecar/models/TLSConfig.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { TrustStore } from "./TrustStore"; +import { mapValues } from '../runtime'; +import type { TrustStore } from './TrustStore'; import { - TrustStoreFromJSON, - TrustStoreFromJSONTyped, - TrustStoreToJSON, - TrustStoreToJSONTyped, -} from "./TrustStore"; -import type { KeyStore } from "./KeyStore"; + TrustStoreFromJSON, + TrustStoreFromJSONTyped, + TrustStoreToJSON, + TrustStoreToJSONTyped, +} from './TrustStore'; +import type { KeyStore } from './KeyStore'; import { - KeyStoreFromJSON, - KeyStoreFromJSONTyped, - KeyStoreToJSON, - KeyStoreToJSONTyped, -} from "./KeyStore"; + KeyStoreFromJSON, + KeyStoreFromJSONTyped, + KeyStoreToJSON, + KeyStoreToJSONTyped, +} from './KeyStore'; /** * SSL configuration @@ -34,72 +34,72 @@ import { * @interface TLSConfig */ export interface TLSConfig { - /** - * Whether to verify the server certificate hostname. Defaults to true if not set. - * @type {boolean} - * @memberof TLSConfig - */ - verify_hostname?: boolean; - /** - * Whether SSL is enabled. If not set, defaults to true. - * @type {boolean} - * @memberof TLSConfig - */ - enabled: boolean; - /** - * The trust store configuration for authenticating the server's certificate. - * @type {TrustStore} - * @memberof TLSConfig - */ - truststore?: TrustStore | null; - /** - * The key store configuration that will identify and authenticate the client to the server, required for mutual TLS (mTLS) - * @type {KeyStore} - * @memberof TLSConfig - */ - keystore?: KeyStore | null; + /** + * Whether to verify the server certificate hostname. Defaults to true if not set. + * @type {boolean} + * @memberof TLSConfig + */ + verify_hostname?: boolean; + /** + * Whether SSL is enabled. If not set, defaults to true. + * @type {boolean} + * @memberof TLSConfig + */ + enabled: boolean; + /** + * The trust store configuration for authenticating the server's certificate. + * @type {TrustStore} + * @memberof TLSConfig + */ + truststore?: TrustStore | null; + /** + * The key store configuration that will identify and authenticate the client to the server, required for mutual TLS (mTLS) + * @type {KeyStore} + * @memberof TLSConfig + */ + keystore?: KeyStore | null; } /** * Check if a given object implements the TLSConfig interface. */ export function instanceOfTLSConfig(value: object): value is TLSConfig { - if (!("enabled" in value) || value["enabled"] === undefined) return false; - return true; + if (!('enabled' in value) || value['enabled'] === undefined) return false; + return true; } export function TLSConfigFromJSON(json: any): TLSConfig { - return TLSConfigFromJSONTyped(json, false); + return TLSConfigFromJSONTyped(json, false); } export function TLSConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): TLSConfig { - if (json == null) { - return json; - } - return { - verify_hostname: json["verify_hostname"] == null ? undefined : json["verify_hostname"], - enabled: json["enabled"], - truststore: json["truststore"] == null ? undefined : TrustStoreFromJSON(json["truststore"]), - keystore: json["keystore"] == null ? undefined : KeyStoreFromJSON(json["keystore"]), - }; + if (json == null) { + return json; + } + return { + + 'verify_hostname': json['verify_hostname'] == null ? undefined : json['verify_hostname'], + 'enabled': json['enabled'], + 'truststore': json['truststore'] == null ? undefined : TrustStoreFromJSON(json['truststore']), + 'keystore': json['keystore'] == null ? undefined : KeyStoreFromJSON(json['keystore']), + }; } export function TLSConfigToJSON(json: any): TLSConfig { - return TLSConfigToJSONTyped(json, false); + return TLSConfigToJSONTyped(json, false); } -export function TLSConfigToJSONTyped( - value?: TLSConfig | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TLSConfigToJSONTyped(value?: TLSConfig | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - verify_hostname: value["verify_hostname"], - enabled: value["enabled"], - truststore: TrustStoreToJSON(value["truststore"]), - keystore: KeyStoreToJSON(value["keystore"]), - }; + return { + + 'verify_hostname': value['verify_hostname'], + 'enabled': value['enabled'], + 'truststore': TrustStoreToJSON(value['truststore']), + 'keystore': KeyStoreToJSON(value['keystore']), + }; } + diff --git a/src/clients/sidecar/models/TimestampType.ts b/src/clients/sidecar/models/TimestampType.ts index db4012be4f..fe9ba95c32 100644 --- a/src/clients/sidecar/models/TimestampType.ts +++ b/src/clients/sidecar/models/TimestampType.ts @@ -13,39 +13,41 @@ */ /** - * + * * @export * @enum {string} */ export enum TimestampType { - NoTimestampType = "NO_TIMESTAMP_TYPE", - CreateTime = "CREATE_TIME", - LogAppendTime = "LOG_APPEND_TIME", + NoTimestampType = 'NO_TIMESTAMP_TYPE', + CreateTime = 'CREATE_TIME', + LogAppendTime = 'LOG_APPEND_TIME' } + export function instanceOfTimestampType(value: any): boolean { - for (const key in TimestampType) { - if (Object.prototype.hasOwnProperty.call(TimestampType, key)) { - if (TimestampType[key as keyof typeof TimestampType] === value) { - return true; - } + for (const key in TimestampType) { + if (Object.prototype.hasOwnProperty.call(TimestampType, key)) { + if (TimestampType[key as keyof typeof TimestampType] === value) { + return true; + } + } } - } - return false; + return false; } export function TimestampTypeFromJSON(json: any): TimestampType { - return TimestampTypeFromJSONTyped(json, false); + return TimestampTypeFromJSONTyped(json, false); } export function TimestampTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimestampType { - return json as TimestampType; + return json as TimestampType; } export function TimestampTypeToJSON(value?: TimestampType | null): any { - return value as any; + return value as any; } export function TimestampTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): TimestampType { - return value as TimestampType; + return value as TimestampType; } + diff --git a/src/clients/sidecar/models/TrustStore.ts b/src/clients/sidecar/models/TrustStore.ts index d4592dd87a..7cc6544955 100644 --- a/src/clients/sidecar/models/TrustStore.ts +++ b/src/clients/sidecar/models/TrustStore.ts @@ -12,79 +12,81 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; -import type { StoreType } from "./StoreType"; +import { mapValues } from '../runtime'; +import type { StoreType } from './StoreType'; import { - StoreTypeFromJSON, - StoreTypeFromJSONTyped, - StoreTypeToJSON, - StoreTypeToJSONTyped, -} from "./StoreType"; + StoreTypeFromJSON, + StoreTypeFromJSONTyped, + StoreTypeToJSON, + StoreTypeToJSONTyped, +} from './StoreType'; /** - * + * * @export * @interface TrustStore */ export interface TrustStore { - /** - * The path to the local trust store file. Required for authenticating the server's certificate. - * @type {string} - * @memberof TrustStore - */ - path: string; - /** - * The password for the local trust store file. If a password is not set, trust store file configured will still be used, but integrity checking is disabled. A trust store password is not supported for PEM format. - * @type {string} - * @memberof TrustStore - */ - password?: string | null; - /** - * The file format of the local trust store file - * @type {StoreType} - * @memberof TrustStore - */ - type?: StoreType | null; + /** + * The path to the local trust store file. Required for authenticating the server's certificate. + * @type {string} + * @memberof TrustStore + */ + path: string; + /** + * The password for the local trust store file. If a password is not set, trust store file configured will still be used, but integrity checking is disabled. A trust store password is not supported for PEM format. + * @type {string} + * @memberof TrustStore + */ + password?: string | null; + /** + * The file format of the local trust store file + * @type {StoreType} + * @memberof TrustStore + */ + type?: StoreType | null; } + + /** * Check if a given object implements the TrustStore interface. */ export function instanceOfTrustStore(value: object): value is TrustStore { - if (!("path" in value) || value["path"] === undefined) return false; - return true; + if (!('path' in value) || value['path'] === undefined) return false; + return true; } export function TrustStoreFromJSON(json: any): TrustStore { - return TrustStoreFromJSONTyped(json, false); + return TrustStoreFromJSONTyped(json, false); } export function TrustStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrustStore { - if (json == null) { - return json; - } - return { - path: json["path"], - password: json["password"] == null ? undefined : json["password"], - type: json["type"] == null ? undefined : StoreTypeFromJSON(json["type"]), - }; + if (json == null) { + return json; + } + return { + + 'path': json['path'], + 'password': json['password'] == null ? undefined : json['password'], + 'type': json['type'] == null ? undefined : StoreTypeFromJSON(json['type']), + }; } export function TrustStoreToJSON(json: any): TrustStore { - return TrustStoreToJSONTyped(json, false); + return TrustStoreToJSONTyped(json, false); } -export function TrustStoreToJSONTyped( - value?: TrustStore | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function TrustStoreToJSONTyped(value?: TrustStore | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - path: value["path"], - password: value["password"], - type: StoreTypeToJSON(value["type"]), - }; + return { + + 'path': value['path'], + 'password': value['password'], + 'type': StoreTypeToJSON(value['type']), + }; } + diff --git a/src/clients/sidecar/models/UserInfo.ts b/src/clients/sidecar/models/UserInfo.ts index 85fc66ee10..30f74c3225 100644 --- a/src/clients/sidecar/models/UserInfo.ts +++ b/src/clients/sidecar/models/UserInfo.ts @@ -12,94 +12,94 @@ * Do not edit the class manually. */ -import { mapValues } from "../runtime"; +import { mapValues } from '../runtime'; /** - * + * * @export * @interface UserInfo */ export interface UserInfo { - /** - * - * @type {string} - * @memberof UserInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - username?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - first_name?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - last_name?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - social_connection?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - auth_type?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + id?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + username?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + first_name?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + last_name?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + social_connection?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + auth_type?: string; } /** * Check if a given object implements the UserInfo interface. */ export function instanceOfUserInfo(value: object): value is UserInfo { - return true; + return true; } export function UserInfoFromJSON(json: any): UserInfo { - return UserInfoFromJSONTyped(json, false); + return UserInfoFromJSONTyped(json, false); } export function UserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserInfo { - if (json == null) { - return json; - } - return { - id: json["id"] == null ? undefined : json["id"], - username: json["username"] == null ? undefined : json["username"], - first_name: json["first_name"] == null ? undefined : json["first_name"], - last_name: json["last_name"] == null ? undefined : json["last_name"], - social_connection: json["social_connection"] == null ? undefined : json["social_connection"], - auth_type: json["auth_type"] == null ? undefined : json["auth_type"], - }; + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'username': json['username'] == null ? undefined : json['username'], + 'first_name': json['first_name'] == null ? undefined : json['first_name'], + 'last_name': json['last_name'] == null ? undefined : json['last_name'], + 'social_connection': json['social_connection'] == null ? undefined : json['social_connection'], + 'auth_type': json['auth_type'] == null ? undefined : json['auth_type'], + }; } export function UserInfoToJSON(json: any): UserInfo { - return UserInfoToJSONTyped(json, false); + return UserInfoToJSONTyped(json, false); } -export function UserInfoToJSONTyped( - value?: UserInfo | null, - ignoreDiscriminator: boolean = false, -): any { - if (value == null) { - return value; - } +export function UserInfoToJSONTyped(value?: UserInfo | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } - return { - id: value["id"], - username: value["username"], - first_name: value["first_name"], - last_name: value["last_name"], - social_connection: value["social_connection"], - auth_type: value["auth_type"], - }; + return { + + 'id': value['id'], + 'username': value['username'], + 'first_name': value['first_name'], + 'last_name': value['last_name'], + 'social_connection': value['social_connection'], + 'auth_type': value['auth_type'], + }; } + diff --git a/src/clients/sidecar/models/index.ts b/src/clients/sidecar/models/index.ts index b5e515871c..a5511c3453 100644 --- a/src/clients/sidecar/models/index.ts +++ b/src/clients/sidecar/models/index.ts @@ -1,59 +1,59 @@ /* tslint:disable */ /* eslint-disable */ -export * from "./ApiKeyAndSecret"; -export * from "./AuthError"; -export * from "./AuthErrors"; -export * from "./BasicCredentials"; -export * from "./CCloudConfig"; -export * from "./CCloudStatus"; -export * from "./CollectionMetadata"; -export * from "./ConnectedState"; -export * from "./Connection"; -export * from "./ConnectionMetadata"; -export * from "./ConnectionSpec"; -export * from "./ConnectionStatus"; -export * from "./ConnectionType"; -export * from "./ConnectionsList"; -export * from "./DataFormat"; -export * from "./ExceededFields"; -export * from "./Failure"; -export * from "./HashAlgorithm"; -export * from "./HealthCheck"; -export * from "./HealthResponse"; -export * from "./JsonNode"; -export * from "./JsonNodeType"; -export * from "./KafkaClusterConfig"; -export * from "./KafkaClusterConfigCredentials"; -export * from "./KafkaClusterStatus"; -export * from "./KerberosCredentials"; -export * from "./KeyOrValueMetadata"; -export * from "./KeyStore"; -export * from "./LocalConfig"; -export * from "./OAuthCredentials"; -export * from "./PartitionConsumeData"; -export * from "./PartitionConsumeRecord"; -export * from "./PartitionConsumeRecordHeader"; -export * from "./PartitionOffset"; -export * from "./Preferences"; -export * from "./PreferencesMetadata"; -export * from "./PreferencesSpec"; -export * from "./ProduceRequest"; -export * from "./ProduceRequestData"; -export * from "./ProduceRequestHeader"; -export * from "./ProduceResponse"; -export * from "./ProduceResponseData"; -export * from "./RecordMetadata"; -export * from "./SchemaRegistryConfig"; -export * from "./SchemaRegistryConfigCredentials"; -export * from "./SchemaRegistryStatus"; -export * from "./ScramCredentials"; -export * from "./SidecarAccessToken"; -export * from "./SidecarError"; -export * from "./SidecarVersionResponse"; -export * from "./SimpleConsumeMultiPartitionRequest"; -export * from "./SimpleConsumeMultiPartitionResponse"; -export * from "./StoreType"; -export * from "./TLSConfig"; -export * from "./TimestampType"; -export * from "./TrustStore"; -export * from "./UserInfo"; +export * from './ApiKeyAndSecret'; +export * from './AuthError'; +export * from './AuthErrors'; +export * from './BasicCredentials'; +export * from './CCloudConfig'; +export * from './CCloudStatus'; +export * from './CollectionMetadata'; +export * from './ConnectedState'; +export * from './Connection'; +export * from './ConnectionMetadata'; +export * from './ConnectionSpec'; +export * from './ConnectionStatus'; +export * from './ConnectionType'; +export * from './ConnectionsList'; +export * from './DataFormat'; +export * from './ExceededFields'; +export * from './Failure'; +export * from './HashAlgorithm'; +export * from './HealthCheck'; +export * from './HealthResponse'; +export * from './JsonNode'; +export * from './JsonNodeType'; +export * from './KafkaClusterConfig'; +export * from './KafkaClusterConfigCredentials'; +export * from './KafkaClusterStatus'; +export * from './KerberosCredentials'; +export * from './KeyOrValueMetadata'; +export * from './KeyStore'; +export * from './LocalConfig'; +export * from './OAuthCredentials'; +export * from './PartitionConsumeData'; +export * from './PartitionConsumeRecord'; +export * from './PartitionConsumeRecordHeader'; +export * from './PartitionOffset'; +export * from './Preferences'; +export * from './PreferencesMetadata'; +export * from './PreferencesSpec'; +export * from './ProduceRequest'; +export * from './ProduceRequestData'; +export * from './ProduceRequestHeader'; +export * from './ProduceResponse'; +export * from './ProduceResponseData'; +export * from './RecordMetadata'; +export * from './SchemaRegistryConfig'; +export * from './SchemaRegistryConfigCredentials'; +export * from './SchemaRegistryStatus'; +export * from './ScramCredentials'; +export * from './SidecarAccessToken'; +export * from './SidecarError'; +export * from './SidecarVersionResponse'; +export * from './SimpleConsumeMultiPartitionRequest'; +export * from './SimpleConsumeMultiPartitionResponse'; +export * from './StoreType'; +export * from './TLSConfig'; +export * from './TimestampType'; +export * from './TrustStore'; +export * from './UserInfo'; diff --git a/src/clients/sidecar/runtime.ts b/src/clients/sidecar/runtime.ts index d4246adf51..2157573986 100644 --- a/src/clients/sidecar/runtime.ts +++ b/src/clients/sidecar/runtime.ts @@ -12,78 +12,76 @@ * Do not edit the class manually. */ + export const BASE_PATH = "http://127.0.0.1:26636".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: - | string - | Promise - | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === "function" ? apiKey : () => apiKey; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; } - return undefined; - } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === "function" ? accessToken : async () => accessToken; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; } - return undefined; - } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -92,395 +90,342 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - private static readonly jsonRegex = new RegExp( - "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", - "i", - ); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && response.status >= 200 && response.status < 300) { - return response; + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; } - throw new ResponseError(response, "Response returned an error code"); - } - - private async createFetchParams( - context: RequestOpts, - initOverrides?: RequestInit | InitOverrideFunction, - ) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += "?" + this.configuration.queryParamsStringify(context.query); + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); } - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } - const initOverrideFn = - typeof initOverrides === "function" ? initOverrides : async () => initOverrides; + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })), - }; + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } - let body: any; - if ( - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers["Content-Type"])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body, - }; + const init: RequestInit = { + ...overriddenInit, + body + }; - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = - (await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - })) || fetchParams; - } + return { url, init }; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = - (await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - })) || response; + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError( - e, - "The request failed and the interceptors did not return an alternative response", - ); - } else { - throw e; + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } } - } + return response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = - (await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - })) || response; - } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; } - return response; - }; - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -} +}; function isBlob(value: any): value is Blob { - return typeof Blob !== "undefined" && value instanceof Blob; + return typeof Blob !== 'undefined' && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor( - public response: Response, - msg?: string, - ) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor( - public cause: Error, - msg?: string, - ) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor( - public field: string, - msg?: string, - ) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; -export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { - [key: string]: - | string - | number - | null - | boolean - | Array - | Set - | HTTPQuery; -}; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { - headers?: HTTPHeaders; - method: HTTPMethod; - credentials?: RequestCredentials; - body?: HTTPBody; -}; -export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; -export type InitOverrideFunction = (requestContext: { - init: HTTPRequestInit; - context: RequestOpts; -}) => Promise; +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ""): string { - return Object.keys(params) - .map((key) => querystringSingleKey(key, params[key], prefix)) - .filter((part) => part.length > 0) - .join("&"); +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); } -function querystringSingleKey( - key: string, - value: - | string - | number - | null - | undefined - | boolean - | Array - | Set - | HTTPQuery, - keyPrefix: string = "", -): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value - .map((singleValue) => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ("multipart/form-data" === consume.contentType) { - return true; + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } } - } - return false; + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor( - public raw: Response, - private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, - ) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - } + async value(): Promise { + return await this.raw.blob(); + }; } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - } + async value(): Promise { + return await this.raw.text(); + }; } From 849d4cfe05f4f16889b572bae25549cfcc24ab68 Mon Sep 17 00:00:00 2001 From: Noel Cothren Date: Mon, 2 Mar 2026 13:17:48 -0700 Subject: [PATCH 2/3] revert prettier changes on unrelated clients --- src/clients/docker/apis/ConfigApi.ts | 415 +-- src/clients/docker/apis/ContainerApi.ts | 2598 +++++++++------- src/clients/docker/apis/DistributionApi.ts | 100 +- src/clients/docker/apis/ExecApi.ts | 387 +-- src/clients/docker/apis/ImageApi.ts | 1642 +++++----- src/clients/docker/apis/NetworkApi.ts | 606 ++-- src/clients/docker/apis/NodeApi.ts | 348 ++- src/clients/docker/apis/PluginApi.ts | 933 +++--- src/clients/docker/apis/SecretApi.ts | 415 +-- src/clients/docker/apis/ServiceApi.ts | 631 ++-- src/clients/docker/apis/SessionApi.ts | 77 +- src/clients/docker/apis/SwarmApi.ts | 564 ++-- src/clients/docker/apis/SystemApi.ts | 548 ++-- src/clients/docker/apis/TaskApi.ts | 295 +- src/clients/docker/apis/VolumeApi.ts | 508 ++-- src/clients/docker/apis/index.ts | 30 +- src/clients/docker/index.ts | 6 +- src/clients/docker/models/Address.ts | 72 +- src/clients/docker/models/AuthConfig.ts | 106 +- src/clients/docker/models/BuildCache.ts | 265 +- src/clients/docker/models/BuildInfo.ts | 207 +- .../docker/models/BuildPruneResponse.ts | 79 +- src/clients/docker/models/ChangeType.ts | 40 +- src/clients/docker/models/ClusterInfo.ts | 263 +- src/clients/docker/models/ClusterVolume.ts | 218 +- .../docker/models/ClusterVolumeInfo.ts | 131 +- .../models/ClusterVolumePublishStatusInner.ts | 134 +- .../docker/models/ClusterVolumeSpec.ts | 106 +- .../models/ClusterVolumeSpecAccessMode.ts | 324 +- ...SpecAccessModeAccessibilityRequirements.ts | 99 +- ...lusterVolumeSpecAccessModeCapacityRange.ts | 99 +- ...ClusterVolumeSpecAccessModeSecretsInner.ts | 103 +- src/clients/docker/models/Commit.ts | 76 +- src/clients/docker/models/Config.ts | 146 +- .../docker/models/ConfigCreateRequest.ts | 124 +- src/clients/docker/models/ConfigReference.ts | 69 +- src/clients/docker/models/ConfigSpec.ts | 119 +- src/clients/docker/models/ContainerConfig.ts | 508 ++-- .../docker/models/ContainerCreateRequest.ts | 563 ++-- .../docker/models/ContainerCreateResponse.ts | 81 +- .../docker/models/ContainerInspectResponse.ts | 533 ++-- .../docker/models/ContainerPruneResponse.ts | 79 +- src/clients/docker/models/ContainerState.ts | 297 +- src/clients/docker/models/ContainerSummary.ts | 340 ++- .../models/ContainerSummaryHostConfig.ts | 67 +- .../models/ContainerSummaryNetworkSettings.ts | 83 +- .../docker/models/ContainerTopResponse.ts | 81 +- .../docker/models/ContainerUpdateRequest.ts | 822 ++--- .../docker/models/ContainerUpdateResponse.ts | 61 +- .../docker/models/ContainerWaitExitError.ts | 61 +- .../docker/models/ContainerWaitResponse.ts | 91 +- src/clients/docker/models/CreateImageInfo.ts | 168 +- src/clients/docker/models/DeviceMapping.ts | 88 +- src/clients/docker/models/DeviceRequest.ts | 126 +- .../docker/models/DistributionInspect.ts | 109 +- src/clients/docker/models/Driver.ts | 74 +- .../docker/models/EndpointIPAMConfig.ts | 95 +- .../docker/models/EndpointPortConfig.ts | 168 +- src/clients/docker/models/EndpointSettings.ts | 289 +- src/clients/docker/models/EndpointSpec.ts | 107 +- .../docker/models/EngineDescription.ts | 111 +- .../models/EngineDescriptionPluginsInner.ts | 83 +- src/clients/docker/models/ErrorDetail.ts | 74 +- src/clients/docker/models/ErrorResponse.ts | 58 +- src/clients/docker/models/EventActor.ts | 76 +- src/clients/docker/models/EventMessage.ts | 193 +- src/clients/docker/models/ExecConfig.ts | 234 +- .../docker/models/ExecInspectResponse.ts | 236 +- src/clients/docker/models/ExecStartConfig.ts | 95 +- src/clients/docker/models/FilesystemChange.ts | 99 +- .../docker/models/GenericResourcesInner.ts | 111 +- ...nericResourcesInnerDiscreteResourceSpec.ts | 91 +- .../GenericResourcesInnerNamedResourceSpec.ts | 91 +- src/clients/docker/models/GraphDriverData.ts | 91 +- src/clients/docker/models/Health.ts | 133 +- src/clients/docker/models/HealthConfig.ts | 150 +- .../docker/models/HealthcheckResult.ts | 131 +- .../docker/models/HistoryResponseItem.ts | 153 +- src/clients/docker/models/HostConfig.ts | 1722 ++++++----- .../docker/models/HostConfigAllOfLogConfig.ts | 106 +- src/clients/docker/models/IPAM.ts | 109 +- src/clients/docker/models/IPAMConfig.ts | 106 +- src/clients/docker/models/IdResponse.ts | 58 +- src/clients/docker/models/ImageConfig.ts | 611 ++-- .../docker/models/ImageDeleteResponseItem.ts | 79 +- src/clients/docker/models/ImageID.ts | 56 +- src/clients/docker/models/ImageInspect.ts | 530 ++-- .../docker/models/ImageInspectMetadata.ts | 73 +- .../docker/models/ImageInspectRootFS.ts | 81 +- .../docker/models/ImagePruneResponse.ts | 97 +- .../docker/models/ImageSearchResponseItem.ts | 127 +- src/clients/docker/models/ImageSummary.ts | 312 +- src/clients/docker/models/IndexInfo.ts | 134 +- src/clients/docker/models/JoinTokens.ts | 78 +- src/clients/docker/models/Limit.ts | 87 +- src/clients/docker/models/LocalNodeState.ts | 50 +- src/clients/docker/models/ManagerStatus.ts | 109 +- src/clients/docker/models/Mount.ts | 235 +- src/clients/docker/models/MountBindOptions.ts | 112 +- src/clients/docker/models/MountPoint.ts | 239 +- .../docker/models/MountTmpfsOptions.ts | 77 +- .../docker/models/MountVolumeOptions.ts | 108 +- .../models/MountVolumeOptionsDriverConfig.ts | 81 +- src/clients/docker/models/Network.ts | 394 +-- .../docker/models/NetworkAttachmentConfig.ts | 101 +- .../docker/models/NetworkConnectRequest.ts | 92 +- src/clients/docker/models/NetworkContainer.ts | 127 +- .../docker/models/NetworkCreateRequest.ts | 313 +- .../docker/models/NetworkCreateResponse.ts | 79 +- .../docker/models/NetworkDisconnectRequest.ts | 87 +- .../docker/models/NetworkPruneResponse.ts | 63 +- src/clients/docker/models/NetworkSettings.ts | 546 ++-- src/clients/docker/models/NetworkingConfig.ts | 83 +- src/clients/docker/models/Node.ts | 235 +- src/clients/docker/models/NodeDescription.ts | 175 +- src/clients/docker/models/NodeSpec.ts | 129 +- src/clients/docker/models/NodeState.ts | 36 +- src/clients/docker/models/NodeStatus.ts | 106 +- src/clients/docker/models/OCIDescriptor.ts | 96 +- src/clients/docker/models/OCIPlatform.ts | 138 +- src/clients/docker/models/ObjectVersion.ts | 60 +- src/clients/docker/models/PeerInfo.ts | 74 +- src/clients/docker/models/PeerNode.ts | 74 +- src/clients/docker/models/Platform.ts | 80 +- src/clients/docker/models/Plugin.ts | 168 +- src/clients/docker/models/PluginConfig.ts | 418 +-- src/clients/docker/models/PluginConfigArgs.ts | 119 +- .../docker/models/PluginConfigInterface.ts | 120 +- .../docker/models/PluginConfigLinux.ts | 113 +- .../docker/models/PluginConfigNetwork.ts | 65 +- .../docker/models/PluginConfigRootfs.ts | 79 +- src/clients/docker/models/PluginConfigUser.ts | 79 +- src/clients/docker/models/PluginDevice.ts | 114 +- src/clients/docker/models/PluginEnv.ts | 114 +- .../docker/models/PluginInterfaceType.ts | 101 +- src/clients/docker/models/PluginMount.ts | 168 +- src/clients/docker/models/PluginPrivilege.ts | 95 +- src/clients/docker/models/PluginSettings.ts | 141 +- src/clients/docker/models/PluginsInfo.ts | 110 +- src/clients/docker/models/Port.ts | 116 +- src/clients/docker/models/PortBinding.ts | 74 +- src/clients/docker/models/ProcessConfig.ts | 122 +- src/clients/docker/models/ProgressDetail.ts | 79 +- src/clients/docker/models/PushImageInfo.ts | 119 +- src/clients/docker/models/Reachability.ts | 34 +- .../docker/models/RegistryServiceConfig.ts | 280 +- src/clients/docker/models/ResourceObject.ts | 117 +- src/clients/docker/models/Resources.ts | 786 ++--- .../models/ResourcesBlkioWeightDeviceInner.ts | 87 +- .../docker/models/ResourcesUlimitsInner.ts | 95 +- src/clients/docker/models/RestartPolicy.ts | 105 +- src/clients/docker/models/Runtime.ts | 86 +- src/clients/docker/models/Secret.ts | 146 +- .../docker/models/SecretCreateRequest.ts | 146 +- src/clients/docker/models/SecretSpec.ts | 141 +- src/clients/docker/models/Service.ts | 262 +- .../docker/models/ServiceCreateRequest.ts | 260 +- .../docker/models/ServiceCreateResponse.ts | 79 +- src/clients/docker/models/ServiceEndpoint.ts | 143 +- .../models/ServiceEndpointVirtualIPsInner.ts | 83 +- src/clients/docker/models/ServiceJobStatus.ts | 96 +- .../docker/models/ServiceServiceStatus.ts | 115 +- src/clients/docker/models/ServiceSpec.ts | 253 +- src/clients/docker/models/ServiceSpecMode.ts | 143 +- .../models/ServiceSpecModeReplicated.ts | 67 +- .../models/ServiceSpecModeReplicatedJob.ts | 89 +- .../models/ServiceSpecRollbackConfig.ts | 192 +- .../docker/models/ServiceSpecUpdateConfig.ts | 188 +- .../docker/models/ServiceUpdateRequest.ts | 260 +- .../docker/models/ServiceUpdateResponse.ts | 63 +- .../docker/models/ServiceUpdateStatus.ts | 122 +- src/clients/docker/models/Swarm.ts | 286 +- src/clients/docker/models/SwarmInfo.ts | 237 +- src/clients/docker/models/SwarmInitRequest.ts | 245 +- src/clients/docker/models/SwarmJoinRequest.ts | 167 +- src/clients/docker/models/SwarmSpec.ts | 250 +- .../docker/models/SwarmSpecCAConfig.ts | 161 +- .../SwarmSpecCAConfigExternalCAsInner.ts | 148 +- .../docker/models/SwarmSpecDispatcher.ts | 63 +- .../models/SwarmSpecEncryptionConfig.ts | 69 +- .../docker/models/SwarmSpecOrchestration.ts | 66 +- src/clients/docker/models/SwarmSpecRaft.ts | 149 +- .../docker/models/SwarmSpecTaskDefaults.ts | 76 +- .../models/SwarmSpecTaskDefaultsLogDriver.ts | 91 +- .../docker/models/SwarmUnlockRequest.ts | 63 +- .../docker/models/SystemAuthResponse.ts | 81 +- .../docker/models/SystemDataUsageResponse.ts | 188 +- src/clients/docker/models/SystemInfo.ts | 1464 ++++----- .../SystemInfoDefaultAddressPoolsInner.ts | 91 +- src/clients/docker/models/SystemVersion.ts | 295 +- .../models/SystemVersionComponentsInner.ts | 119 +- .../docker/models/SystemVersionPlatform.ts | 65 +- src/clients/docker/models/TLSInfo.ts | 97 +- src/clients/docker/models/Task.ts | 335 +- src/clients/docker/models/TaskSpec.ts | 318 +- .../docker/models/TaskSpecContainerSpec.ts | 672 +++-- .../TaskSpecContainerSpecConfigsInner.ts | 162 +- .../TaskSpecContainerSpecConfigsInnerFile.ts | 129 +- .../models/TaskSpecContainerSpecDNSConfig.ts | 103 +- .../models/TaskSpecContainerSpecPrivileges.ts | 115 +- ...ecContainerSpecPrivilegesCredentialSpec.ts | 167 +- ...ecContainerSpecPrivilegesSELinuxContext.ts | 137 +- .../TaskSpecContainerSpecSecretsInner.ts | 132 +- .../TaskSpecContainerSpecSecretsInnerFile.ts | 125 +- .../docker/models/TaskSpecLogDriver.ts | 79 +- .../models/TaskSpecNetworkAttachmentSpec.ts | 71 +- .../docker/models/TaskSpecPlacement.ts | 203 +- .../TaskSpecPlacementPreferencesInner.ts | 90 +- ...TaskSpecPlacementPreferencesInnerSpread.ts | 77 +- .../docker/models/TaskSpecPluginSpec.ts | 133 +- .../docker/models/TaskSpecResources.ts | 101 +- .../docker/models/TaskSpecRestartPolicy.ts | 132 +- src/clients/docker/models/TaskState.ts | 60 +- src/clients/docker/models/TaskStatus.ts | 151 +- .../models/TaskStatusContainerStatus.ts | 99 +- src/clients/docker/models/ThrottleDevice.ts | 79 +- .../docker/models/UnlockKeyResponse.ts | 63 +- src/clients/docker/models/Volume.ts | 268 +- .../docker/models/VolumeCreateOptions.ts | 146 +- .../docker/models/VolumeListResponse.ts | 90 +- .../docker/models/VolumePruneResponse.ts | 79 +- .../docker/models/VolumeUpdateRequest.ts | 73 +- src/clients/docker/models/VolumeUsageData.ts | 95 +- src/clients/docker/models/index.ts | 412 +-- src/clients/docker/runtime.ts | 649 ++-- .../apis/FlinkArtifactsArtifactV1Api.ts | 906 +++--- .../apis/PresignedUrlsArtifactV1Api.ts | 101 +- src/clients/flinkArtifacts/apis/index.ts | 4 +- src/clients/flinkArtifacts/index.ts | 6 +- .../models/ArtifactV1FlinkArtifact.ts | 317 +- .../models/ArtifactV1FlinkArtifactList.ts | 166 +- .../ArtifactV1FlinkArtifactListDataInner.ts | 336 ++- .../ArtifactV1FlinkArtifactListMetadata.ts | 137 +- .../models/ArtifactV1FlinkArtifactMetadata.ts | 129 +- .../models/ArtifactV1FlinkArtifactVersion.ts | 159 +- ...ifactV1FlinkArtifactVersionUploadSource.ts | 82 +- .../models/ArtifactV1PresignedUrl.ts | 200 +- .../models/ArtifactV1PresignedUrlRequest.ts | 203 +- .../ArtifactV1PresignedUrlRequestMetadata.ts | 136 +- .../ArtifactV1UploadSourcePresignedUrl.ts | 183 +- ...ifactV1UploadSourcePresignedUrlMetadata.ts | 136 +- ...reateArtifactV1FlinkArtifact201Response.ts | 335 +- .../CreateArtifactV1FlinkArtifactRequest.ts | 241 +- ...ifactV1FlinkArtifactRequestUploadSource.ts | 82 +- .../flinkArtifacts/models/ErrorSource.ts | 70 +- src/clients/flinkArtifacts/models/Failure.ts | 56 +- .../GetArtifactV1FlinkArtifact200Response.ts | 341 ++- src/clients/flinkArtifacts/models/ListMeta.ts | 118 +- .../flinkArtifacts/models/ModelError.ts | 146 +- .../flinkArtifacts/models/ObjectMeta.ts | 112 +- .../flinkArtifacts/models/ObjectReference.ts | 137 +- ...oadUrlArtifactV1PresignedUrl200Response.ts | 214 +- ...dUploadUrlArtifactV1PresignedUrlRequest.ts | 222 +- src/clients/flinkArtifacts/models/index.ts | 48 +- src/clients/flinkArtifacts/runtime.ts | 647 ++-- .../apis/ComputePoolsFcpmV2Api.ts | 628 ++-- .../flinkComputePool/apis/RegionsFcpmV2Api.ts | 134 +- src/clients/flinkComputePool/apis/index.ts | 4 +- src/clients/flinkComputePool/index.ts | 6 +- .../CreateFcpmV2ComputePool202Response.ts | 205 +- .../models/CreateFcpmV2ComputePoolRequest.ts | 195 +- ...CreateFcpmV2ComputePoolRequestAllOfSpec.ts | 89 +- .../models/EnvScopedObjectReference.ts | 113 +- .../flinkComputePool/models/ErrorSource.ts | 70 +- .../flinkComputePool/models/Failure.ts | 56 +- .../models/FcpmV2ComputePool.ts | 191 +- .../models/FcpmV2ComputePoolList.ts | 156 +- .../models/FcpmV2ComputePoolListDataInner.ts | 188 +- .../models/FcpmV2ComputePoolListMetadata.ts | 129 +- .../models/FcpmV2ComputePoolMetadata.ts | 125 +- .../models/FcpmV2ComputePoolSpec.ts | 187 +- .../models/FcpmV2ComputePoolStatus.ts | 74 +- .../flinkComputePool/models/FcpmV2Region.ts | 210 +- .../models/FcpmV2RegionList.ts | 156 +- .../models/FcpmV2RegionListDataInner.ts | 229 +- .../models/FcpmV2RegionListMetadata.ts | 129 +- .../models/FcpmV2RegionMetadata.ts | 121 +- .../models/GetFcpmV2ComputePool200Response.ts | 207 +- .../models/GlobalObjectReference.ts | 93 +- .../ListFcpmV2ComputePools200Response.ts | 166 +- ...V2ComputePools200ResponseAllOfDataInner.ts | 88 +- ...mputePools200ResponseAllOfDataInnerSpec.ts | 89 +- .../flinkComputePool/models/ListMeta.ts | 118 +- .../flinkComputePool/models/ModelError.ts | 146 +- .../flinkComputePool/models/ObjectMeta.ts | 112 +- .../models/ObjectReference.ts | 137 +- .../models/UpdateFcpmV2ComputePoolRequest.ts | 195 +- ...UpdateFcpmV2ComputePoolRequestAllOfSpec.ts | 75 +- src/clients/flinkComputePool/models/index.ts | 58 +- src/clients/flinkComputePool/runtime.ts | 647 ++-- src/clients/flinkSql/apis/AgentsSqlV1Api.ts | 817 +++-- .../flinkSql/apis/ConnectionsSqlV1Api.ts | 674 +++-- .../apis/MaterializedTableVersionsSqlV1Api.ts | 383 ++- .../apis/MaterializedTablesSqlV1Api.ts | 831 ++--- .../apis/StatementExceptionsSqlV1Api.ts | 152 +- .../flinkSql/apis/StatementResultsSqlV1Api.ts | 157 +- .../flinkSql/apis/StatementsSqlV1Api.ts | 947 +++--- src/clients/flinkSql/apis/ToolsSqlV1Api.ts | 575 ++-- src/clients/flinkSql/apis/index.ts | 16 +- src/clients/flinkSql/index.ts | 6 +- src/clients/flinkSql/models/ColumnDetails.ts | 84 +- .../models/CreateSqlv1AgentRequest.ts | 219 +- .../CreateSqlv1Connection201Response.ts | 191 +- .../models/CreateSqlv1ConnectionRequest.ts | 185 +- ...CreateSqlv1MaterializedTable201Response.ts | 233 +- .../CreateSqlv1MaterializedTableRequest.ts | 232 +- .../models/CreateSqlv1Statement201Response.ts | 249 +- .../models/CreateSqlv1StatementRequest.ts | 245 +- .../flinkSql/models/CreateSqlv1ToolRequest.ts | 180 +- src/clients/flinkSql/models/DataType.ts | 249 +- src/clients/flinkSql/models/ErrorSource.ts | 68 +- .../flinkSql/models/ExceptionListMeta.ts | 57 +- src/clients/flinkSql/models/Failure.ts | 54 +- .../models/GetSqlv1Connection200Response.ts | 188 +- .../models/GetSqlv1Statement200Response.ts | 250 +- .../GetSqlv1StatementResult200Response.ts | 156 +- .../models/GetSqlv1Tool200Response.ts | 186 +- .../models/JsonPatchRequestAddReplace.ts | 112 +- .../models/JsonPatchRequestMoveCopy.ts | 110 +- .../flinkSql/models/JsonPatchRequestRemove.ts | 86 +- src/clients/flinkSql/models/ListMeta.ts | 68 +- src/clients/flinkSql/models/ModelError.ts | 144 +- src/clients/flinkSql/models/ObjectMeta.ts | 118 +- .../flinkSql/models/PatchRequestInner.ts | 110 +- src/clients/flinkSql/models/ResultListMeta.ts | 87 +- src/clients/flinkSql/models/RowFieldType.ts | 102 +- src/clients/flinkSql/models/SqlV1Agent.ts | 224 +- src/clients/flinkSql/models/SqlV1AgentList.ts | 150 +- .../flinkSql/models/SqlV1AgentMetadata.ts | 157 +- src/clients/flinkSql/models/SqlV1AgentSpec.ts | 121 +- .../flinkSql/models/SqlV1AgentStatus.ts | 67 +- .../flinkSql/models/SqlV1ColumnCommon.ts | 107 +- .../flinkSql/models/SqlV1ComputedColumn.ts | 154 +- .../flinkSql/models/SqlV1Connection.ts | 187 +- .../flinkSql/models/SqlV1ConnectionList.ts | 154 +- .../models/SqlV1ConnectionListDataInner.ts | 192 +- .../models/SqlV1ConnectionListMetadata.ts | 127 +- .../models/SqlV1ConnectionMetadata.ts | 141 +- .../flinkSql/models/SqlV1ConnectionSpec.ts | 104 +- .../models/SqlV1ConnectionSpecAuthData.ts | 78 +- .../flinkSql/models/SqlV1ConnectionStatus.ts | 84 +- .../flinkSql/models/SqlV1MaterializedTable.ts | 230 +- .../SqlV1MaterializedTableColumnDetails.ts | 123 +- .../SqlV1MaterializedTableConstraint.ts | 117 +- .../SqlV1MaterializedTableDistribution.ts | 85 +- .../models/SqlV1MaterializedTableList.ts | 154 +- .../models/SqlV1MaterializedTableMetadata.ts | 161 +- .../models/SqlV1MaterializedTableSpec.ts | 287 +- .../models/SqlV1MaterializedTableStatus.ts | 174 +- .../models/SqlV1MaterializedTableVersion.ts | 209 +- .../SqlV1MaterializedTableVersionList.ts | 162 +- .../SqlV1MaterializedTableVersionMetadata.ts | 137 +- .../SqlV1MaterializedTableVersionSpec.ts | 115 +- .../models/SqlV1MaterializedTableWarning.ts | 129 +- .../models/SqlV1MaterializedTableWatermark.ts | 81 +- .../flinkSql/models/SqlV1MetadataColumn.ts | 154 +- .../flinkSql/models/SqlV1PhysicalColumn.ts | 120 +- .../flinkSql/models/SqlV1PlaintextProvider.ts | 98 +- .../flinkSql/models/SqlV1ResourceChange.ts | 131 +- .../flinkSql/models/SqlV1ResultSchema.ts | 75 +- .../flinkSql/models/SqlV1ScalingStatus.ts | 82 +- .../flinkSql/models/SqlV1StateLimitStatus.ts | 100 +- src/clients/flinkSql/models/SqlV1Statement.ts | 247 +- .../models/SqlV1StatementException.ts | 110 +- .../models/SqlV1StatementExceptionList.ts | 158 +- .../flinkSql/models/SqlV1StatementList.ts | 154 +- .../models/SqlV1StatementListDataInner.ts | 256 +- .../models/SqlV1StatementListMetadata.ts | 127 +- .../flinkSql/models/SqlV1StatementMetadata.ts | 157 +- .../flinkSql/models/SqlV1StatementResult.ts | 153 +- .../models/SqlV1StatementResultResults.ts | 99 +- .../flinkSql/models/SqlV1StatementSpec.ts | 143 +- .../flinkSql/models/SqlV1StatementStatus.ts | 363 +-- .../SqlV1StatementStatusAffectedResource.ts | 131 +- .../flinkSql/models/SqlV1StatementTraits.ts | 149 +- .../flinkSql/models/SqlV1StatementWarning.ts | 125 +- src/clients/flinkSql/models/SqlV1Tool.ts | 181 +- src/clients/flinkSql/models/SqlV1ToolList.ts | 149 +- .../flinkSql/models/SqlV1ToolListDataInner.ts | 188 +- .../flinkSql/models/SqlV1ToolListMetadata.ts | 123 +- .../flinkSql/models/SqlV1ToolMetadata.ts | 141 +- src/clients/flinkSql/models/SqlV1ToolSpec.ts | 68 +- .../flinkSql/models/SqlV1ToolStatus.ts | 84 +- .../flinkSql/models/StatementObjectMeta.ts | 139 +- .../models/UpdateSqlv1AgentRequest.ts | 219 +- .../models/UpdateSqlv1ConnectionRequest.ts | 174 +- .../UpdateSqlv1MaterializedTableRequest.ts | 232 +- .../models/UpdateSqlv1StatementRequest.ts | 234 +- src/clients/flinkSql/models/index.ts | 176 +- src/clients/flinkSql/runtime.ts | 645 ++-- .../flinkWorkspaces/apis/WorkspacesWsV1Api.ts | 819 ++--- src/clients/flinkWorkspaces/apis/index.ts | 2 +- src/clients/flinkWorkspaces/index.ts | 6 +- .../models/CreateWsV1Workspace201Response.ts | 211 +- .../models/CreateWsV1WorkspaceRequest.ts | 229 +- .../CreateWsV1WorkspaceRequestAllOfSpec.ts | 137 +- .../models/EnvScopedObjectReference.ts | 111 +- .../flinkWorkspaces/models/ErrorSource.ts | 70 +- src/clients/flinkWorkspaces/models/Failure.ts | 56 +- .../models/GetWsV1Workspace200Response.ts | 223 +- .../GetWsV1Workspace200ResponseAllOfSpec.ts | 153 +- .../models/GlobalObjectReference.ts | 93 +- .../models/JSONPatchRequestAddReplace.ts | 114 +- .../models/JSONPatchRequestMoveCopy.ts | 112 +- .../models/JSONPatchRequestRemove.ts | 88 +- .../flinkWorkspaces/models/ListMeta.ts | 70 +- .../flinkWorkspaces/models/ModelError.ts | 146 +- .../flinkWorkspaces/models/ObjectMeta.ts | 126 +- .../models/PatchRequestInner.ts | 112 +- .../models/PutWsV1WorkspaceRequest.ts | 223 +- .../PutWsV1WorkspaceRequestAllOfMetadata.ts | 75 +- .../PutWsV1WorkspaceRequestAllOfSpec.ts | 89 +- .../flinkWorkspaces/models/WsV1Block.ts | 108 +- .../flinkWorkspaces/models/WsV1CodeOptions.ts | 61 +- .../flinkWorkspaces/models/WsV1Workspace.ts | 222 +- .../models/WsV1WorkspaceList.ts | 156 +- .../models/WsV1WorkspaceListDataInner.ts | 207 +- .../models/WsV1WorkspaceMetadata.ts | 136 +- .../models/WsV1WorkspaceSpec.ts | 171 +- .../models/WsV1WorkspaceSpecBlocksInner.ts | 121 +- .../models/WsV1WorkspaceStatus.ts | 66 +- src/clients/flinkWorkspaces/models/index.ts | 56 +- src/clients/flinkWorkspaces/runtime.ts | 647 ++-- src/clients/kafkaRest/apis/ACLV3Api.ts | 635 ++-- .../kafkaRest/apis/ClusterLinkingV3Api.ts | 2688 ++++++++++------- src/clients/kafkaRest/apis/ClusterV3Api.ts | 109 +- src/clients/kafkaRest/apis/ConfigsV3Api.ts | 1538 ++++++---- .../kafkaRest/apis/ConsumerGroupV3Api.ts | 908 +++--- src/clients/kafkaRest/apis/PartitionV3Api.ts | 273 +- src/clients/kafkaRest/apis/RecordsV3Api.ts | 145 +- src/clients/kafkaRest/apis/TopicV3Api.ts | 612 ++-- src/clients/kafkaRest/apis/index.ts | 16 +- src/clients/kafkaRest/index.ts | 6 +- .../kafkaRest/models/AbstractConfigData.ts | 247 +- src/clients/kafkaRest/models/AclData.ts | 246 +- src/clients/kafkaRest/models/AclDataList.ts | 118 +- .../kafkaRest/models/AclResourceType.ts | 52 +- .../models/AlterBrokerReplicaExclusionData.ts | 235 +- .../AlterBrokerReplicaExclusionDataList.ts | 135 +- .../models/AlterConfigBatchRequestData.ts | 95 +- .../AlterConfigBatchRequestDataDataInner.ts | 107 +- .../models/AlterMirrorStatusResponseData.ts | 181 +- .../AlterMirrorStatusResponseDataList.ts | 135 +- .../models/AlterMirrorsRequestData.ts | 78 +- .../kafkaRest/models/AnyUnevenLoadData.ts | 242 +- .../kafkaRest/models/BalancerStatusData.ts | 209 +- .../kafkaRest/models/BrokerConfigData.ts | 265 +- .../kafkaRest/models/BrokerConfigDataList.ts | 123 +- src/clients/kafkaRest/models/BrokerData.ts | 220 +- .../kafkaRest/models/BrokerDataList.ts | 123 +- .../kafkaRest/models/BrokerRemovalData.ts | 177 +- .../kafkaRest/models/BrokerRemovalDataList.ts | 123 +- .../BrokerReplicaExclusionBatchRequestData.ts | 87 +- .../models/BrokerReplicaExclusionData.ts | 181 +- .../models/BrokerReplicaExclusionDataList.ts | 127 +- .../BrokerReplicaExclusionRequestData.ts | 93 +- .../kafkaRest/models/BrokerTaskData.ts | 307 +- .../kafkaRest/models/BrokerTaskDataList.ts | 123 +- .../kafkaRest/models/BrokerTaskType.ts | 42 +- .../kafkaRest/models/ClusterConfigData.ts | 265 +- .../kafkaRest/models/ClusterConfigDataList.ts | 123 +- src/clients/kafkaRest/models/ClusterData.ts | 243 +- .../kafkaRest/models/ClusterDataList.ts | 123 +- src/clients/kafkaRest/models/ConfigData.ts | 76 +- .../kafkaRest/models/ConfigSynonymData.ts | 97 +- .../models/ConsumerAssignmentData.ts | 231 +- .../models/ConsumerAssignmentDataList.ts | 127 +- src/clients/kafkaRest/models/ConsumerData.ts | 206 +- .../kafkaRest/models/ConsumerDataList.ts | 123 +- .../kafkaRest/models/ConsumerGroupData.ts | 247 +- .../kafkaRest/models/ConsumerGroupDataList.ts | 123 +- .../models/ConsumerGroupLagSummaryData.ts | 307 +- .../kafkaRest/models/ConsumerLagData.ts | 271 +- .../kafkaRest/models/ConsumerLagDataList.ts | 123 +- .../kafkaRest/models/CreateAclRequestData.ts | 185 +- .../models/CreateAclRequestDataList.ts | 79 +- .../kafkaRest/models/CreateLinkRequestData.ts | 140 +- .../models/CreateMirrorTopicRequestData.ts | 129 +- .../models/CreateTopicRequestData.ts | 145 +- .../CreateTopicRequestDataConfigsInner.ts | 91 +- .../models/DeleteKafkaAcls200Response.ts | 79 +- src/clients/kafkaRest/models/LinkTask.ts | 106 +- src/clients/kafkaRest/models/LinkTaskError.ts | 76 +- .../models/ListLinkConfigsResponseData.ts | 241 +- .../models/ListLinkConfigsResponseDataList.ts | 131 +- .../kafkaRest/models/ListLinksResponseData.ts | 290 +- .../models/ListLinksResponseDataList.ts | 127 +- .../models/ListMirrorTopicsResponseData.ts | 283 +- .../ListMirrorTopicsResponseDataList.ts | 135 +- src/clients/kafkaRest/models/MirrorLag.ts | 95 +- .../kafkaRest/models/MirrorTopicStatus.ts | 58 +- src/clients/kafkaRest/models/ModelError.ts | 76 +- src/clients/kafkaRest/models/PartitionData.ts | 206 +- .../kafkaRest/models/PartitionDataList.ts | 123 +- .../kafkaRest/models/ProduceRequest.ts | 155 +- .../kafkaRest/models/ProduceRequestData.ts | 126 +- .../kafkaRest/models/ProduceRequestHeader.ts | 79 +- .../kafkaRest/models/ProduceResponse.ts | 203 +- .../kafkaRest/models/ProduceResponseData.ts | 81 +- .../kafkaRest/models/ReassignmentData.ts | 213 +- .../kafkaRest/models/ReassignmentDataList.ts | 123 +- src/clients/kafkaRest/models/Relationship.ts | 58 +- .../kafkaRest/models/RemoveBrokerTaskData.ts | 272 +- .../models/RemoveBrokerTaskDataList.ts | 127 +- .../models/RemoveBrokersRequestData.ts | 67 +- src/clients/kafkaRest/models/ReplicaData.ts | 226 +- .../kafkaRest/models/ReplicaDataList.ts | 123 +- .../kafkaRest/models/ReplicaStatusData.ts | 344 +-- .../kafkaRest/models/ReplicaStatusDataList.ts | 123 +- src/clients/kafkaRest/models/Resource.ts | 88 +- .../kafkaRest/models/ResourceCollection.ts | 93 +- .../models/ResourceCollectionMetadata.ts | 83 +- .../kafkaRest/models/ResourceMetadata.ts | 79 +- .../kafkaRest/models/TopicConfigData.ts | 265 +- .../kafkaRest/models/TopicConfigDataList.ts | 123 +- src/clients/kafkaRest/models/TopicData.ts | 262 +- src/clients/kafkaRest/models/TopicDataList.ts | 118 +- .../models/UpdateConfigRequestData.ts | 61 +- .../models/UpdateLinkConfigRequestData.ts | 67 +- .../models/UpdatePartitionCountRequestData.ts | 71 +- src/clients/kafkaRest/models/index.ts | 174 +- src/clients/kafkaRest/runtime.ts | 647 ++-- src/clients/medusa/apis/BatchManagementApi.ts | 227 +- .../apis/ConfluentProducerControllerApi.ts | 71 +- src/clients/medusa/apis/EventThrottlersApi.ts | 82 +- src/clients/medusa/apis/ExampleDatasetsApi.ts | 81 +- .../medusa/apis/SchemaManagementApi.ts | 282 +- .../medusa/apis/StreamManagementApi.ts | 361 ++- src/clients/medusa/apis/ValueGeneratorsApi.ts | 315 +- src/clients/medusa/apis/index.ts | 14 +- src/clients/medusa/index.ts | 6 +- .../medusa/models/AvroSchemaResponse.ts | 61 +- .../medusa/models/AvroSchemaResponseList.ts | 139 +- src/clients/medusa/models/CategoryList.ts | 161 +- .../medusa/models/CollectionMetadata.ts | 77 +- src/clients/medusa/models/ColumnDTO.ts | 95 +- src/clients/medusa/models/DatasetDTO.ts | 100 +- src/clients/medusa/models/EventDTO.ts | 165 +- src/clients/medusa/models/EventMessage.ts | 72 +- src/clients/medusa/models/EventMessageList.ts | 133 +- .../medusa/models/EventStreamSimulation.ts | 94 +- .../models/EventStreamSimulationList.ts | 143 +- .../medusa/models/EventThrottlerDTO.ts | 88 +- .../medusa/models/EventThrottlerDetails.ts | 111 +- .../models/EventThrottlerDetailsList.ts | 143 +- src/clients/medusa/models/ExampleDataset.ts | 105 +- .../medusa/models/ExampleDatasetList.ts | 135 +- .../medusa/models/ExpectedArgumentDetails.ts | 109 +- src/clients/medusa/models/FieldDTO.ts | 104 +- src/clients/medusa/models/GenerationDTO.ts | 233 +- src/clients/medusa/models/ProducerHealth.ts | 61 +- src/clients/medusa/models/RowDTO.ts | 58 +- src/clients/medusa/models/StreamDetails.ts | 56 +- src/clients/medusa/models/TableDTO.ts | 133 +- src/clients/medusa/models/TableLinkDTO.ts | 89 +- .../medusa/models/ValueGeneratorDetails.ts | 188 +- .../models/ValueGeneratorDetailsList.ts | 143 +- src/clients/medusa/models/index.ts | 52 +- src/clients/medusa/runtime.ts | 647 ++-- .../apis/TemplateCollectionsScaffoldV1Api.ts | 192 +- .../apis/TemplatesScaffoldV1Api.ts | 325 +- src/clients/scaffoldingService/apis/index.ts | 4 +- src/clients/scaffoldingService/index.ts | 6 +- .../models/ApplyScaffoldV1TemplateRequest.ts | 67 +- .../scaffoldingService/models/ErrorSource.ts | 72 +- .../scaffoldingService/models/Failure.ts | 58 +- .../GetScaffoldV1Template200Response.ts | 155 +- ...ScaffoldV1TemplateCollection200Response.ts | 157 +- .../models/GlobalObjectReference.ts | 95 +- .../scaffoldingService/models/ListMeta.ts | 120 +- .../scaffoldingService/models/ModelError.ts | 148 +- .../scaffoldingService/models/ObjectMeta.ts | 114 +- .../models/ObjectReference.ts | 139 +- .../models/ScaffoldV1Template.ts | 149 +- .../models/ScaffoldV1TemplateCollection.ts | 155 +- .../ScaffoldV1TemplateCollectionList.ts | 172 +- ...affoldV1TemplateCollectionListDataInner.ts | 152 +- ...caffoldV1TemplateCollectionListMetadata.ts | 139 +- .../ScaffoldV1TemplateCollectionMetadata.ts | 138 +- .../ScaffoldV1TemplateCollectionSpec.ts | 105 +- .../models/ScaffoldV1TemplateList.ts | 156 +- .../models/ScaffoldV1TemplateListDataInner.ts | 148 +- .../models/ScaffoldV1TemplateListMetadata.ts | 131 +- .../models/ScaffoldV1TemplateMetadata.ts | 127 +- .../models/ScaffoldV1TemplateOption.ts | 230 +- .../models/ScaffoldV1TemplateSpec.ts | 206 +- .../scaffoldingService/models/index.ts | 46 +- src/clients/scaffoldingService/runtime.ts | 649 ++-- .../apis/CompatibilityV1Api.ts | 302 +- .../schemaRegistryRest/apis/ConfigV1Api.ts | 719 +++-- .../schemaRegistryRest/apis/ContextsV1Api.ts | 90 +- .../apis/DataEncryptionKeysV1Api.ts | 1327 ++++---- .../schemaRegistryRest/apis/ExportersV1Api.ts | 1248 ++++---- .../apis/KeyEncryptionKeysV1Api.ts | 627 ++-- .../schemaRegistryRest/apis/ModesV1Api.ts | 556 ++-- .../schemaRegistryRest/apis/SchemasV1Api.ts | 734 +++-- .../schemaRegistryRest/apis/SubjectsV1Api.ts | 1187 ++++---- src/clients/schemaRegistryRest/apis/index.ts | 18 +- src/clients/schemaRegistryRest/index.ts | 6 +- .../models/ClusterConfig.ts | 70 +- .../models/CompatibilityCheckResponse.ts | 79 +- .../schemaRegistryRest/models/Config.ts | 236 +- .../models/ConfigDefaultMetadata.ts | 59 +- .../models/ConfigDefaultRuleSet.ts | 59 +- .../models/ConfigOverrideMetadata.ts | 59 +- .../models/ConfigOverrideRuleSet.ts | 59 +- .../models/ConfigUpdateRequest.ts | 241 +- .../models/CreateDekRequest.ts | 139 +- .../models/CreateKekRequest.ts | 157 +- src/clients/schemaRegistryRest/models/Dek.ts | 177 +- .../schemaRegistryRest/models/ErrorMessage.ts | 70 +- .../models/ExporterConfigResponse.ts | 96 +- .../models/ExporterReference.ts | 140 +- .../models/ExporterResponse.ts | 59 +- .../models/ExporterStatusResponse.ts | 123 +- .../models/ExporterUpdateRequest.ts | 124 +- src/clients/schemaRegistryRest/models/Kek.ts | 163 +- .../schemaRegistryRest/models/Metadata.ts | 86 +- src/clients/schemaRegistryRest/models/Mode.ts | 49 +- .../models/ModeUpdateRequest.ts | 59 +- .../models/RegisterExporterRequest.ts | 77 +- .../models/RegisterSchemaRequest.ts | 197 +- .../models/RegisterSchemaResponse.ts | 59 +- src/clients/schemaRegistryRest/models/Rule.ts | 238 +- .../schemaRegistryRest/models/RuleSet.ts | 91 +- .../schemaRegistryRest/models/Schema.ts | 208 +- .../models/SchemaReference.ts | 91 +- .../schemaRegistryRest/models/SchemaString.ts | 120 +- .../models/SubjectVersion.ts | 75 +- .../models/UpdateKekRequest.ts | 93 +- .../schemaRegistryRest/models/index.ts | 62 +- src/clients/schemaRegistryRest/runtime.ts | 647 ++-- ...ConfluentCloudProduceRecordsResourceApi.ts | 157 +- .../sidecar/apis/ConnectionsResourceApi.ts | 510 ++-- .../sidecar/apis/HandshakeResourceApi.ts | 75 +- .../sidecar/apis/KafkaConsumeResourceApi.ts | 150 +- .../sidecar/apis/LoginRealmResourceApi.ts | 62 +- .../sidecar/apis/MicroProfileHealthApi.ts | 266 +- .../sidecar/apis/OAuthCallbackResourceApi.ts | 80 +- .../apis/PasswordResetCallbackResourceApi.ts | 88 +- .../sidecar/apis/PreferencesResourceApi.ts | 158 +- .../sidecar/apis/VersionResourceApi.ts | 75 +- src/clients/sidecar/apis/index.ts | 20 +- src/clients/sidecar/index.ts | 6 +- src/clients/sidecar/models/ApiKeyAndSecret.ts | 77 +- src/clients/sidecar/models/AuthError.ts | 70 +- src/clients/sidecar/models/AuthErrors.ts | 100 +- .../sidecar/models/BasicCredentials.ts | 77 +- src/clients/sidecar/models/CCloudConfig.ts | 69 +- src/clients/sidecar/models/CCloudStatus.ts | 146 +- .../sidecar/models/CollectionMetadata.ts | 91 +- src/clients/sidecar/models/ConnectedState.ts | 46 +- src/clients/sidecar/models/Connection.ts | 182 +- .../sidecar/models/ConnectionMetadata.ts | 91 +- src/clients/sidecar/models/ConnectionSpec.ts | 221 +- .../sidecar/models/ConnectionStatus.ts | 131 +- src/clients/sidecar/models/ConnectionType.ts | 42 +- src/clients/sidecar/models/ConnectionsList.ts | 139 +- src/clients/sidecar/models/DataFormat.ts | 40 +- src/clients/sidecar/models/ExceededFields.ts | 75 +- src/clients/sidecar/models/Failure.ts | 130 +- src/clients/sidecar/models/HashAlgorithm.ts | 30 +- src/clients/sidecar/models/HealthCheck.ts | 97 +- src/clients/sidecar/models/HealthResponse.ts | 100 +- src/clients/sidecar/models/JsonNode.ts | 405 ++- src/clients/sidecar/models/JsonNodeType.ts | 44 +- .../sidecar/models/KafkaClusterConfig.ts | 134 +- .../models/KafkaClusterConfigCredentials.ts | 158 +- .../sidecar/models/KafkaClusterStatus.ts | 129 +- .../sidecar/models/KerberosCredentials.ts | 93 +- .../sidecar/models/KeyOrValueMetadata.ts | 105 +- src/clients/sidecar/models/KeyStore.ts | 118 +- src/clients/sidecar/models/LocalConfig.ts | 53 +- .../sidecar/models/OAuthCredentials.ts | 160 +- .../sidecar/models/PartitionConsumeData.ts | 109 +- .../sidecar/models/PartitionConsumeRecord.ts | 290 +- .../models/PartitionConsumeRecordHeader.ts | 79 +- src/clients/sidecar/models/PartitionOffset.ts | 75 +- src/clients/sidecar/models/Preferences.ts | 132 +- .../sidecar/models/PreferencesMetadata.ts | 61 +- src/clients/sidecar/models/PreferencesSpec.ts | 110 +- src/clients/sidecar/models/ProduceRequest.ts | 154 +- .../sidecar/models/ProduceRequestData.ts | 156 +- .../sidecar/models/ProduceRequestHeader.ts | 77 +- src/clients/sidecar/models/ProduceResponse.ts | 202 +- .../sidecar/models/ProduceResponseData.ts | 127 +- src/clients/sidecar/models/RecordMetadata.ts | 91 +- .../sidecar/models/SchemaRegistryConfig.ts | 134 +- .../models/SchemaRegistryConfigCredentials.ts | 107 +- .../sidecar/models/SchemaRegistryStatus.ts | 129 +- .../sidecar/models/ScramCredentials.ts | 109 +- .../sidecar/models/SidecarAccessToken.ts | 59 +- src/clients/sidecar/models/SidecarError.ts | 144 +- .../sidecar/models/SidecarVersionResponse.ts | 59 +- .../SimpleConsumeMultiPartitionRequest.ts | 169 +- .../SimpleConsumeMultiPartitionResponse.ts | 121 +- src/clients/sidecar/models/StoreType.ts | 34 +- src/clients/sidecar/models/TLSConfig.ts | 126 +- src/clients/sidecar/models/TimestampType.ts | 32 +- src/clients/sidecar/models/TrustStore.ts | 102 +- src/clients/sidecar/models/UserInfo.ts | 134 +- src/clients/sidecar/models/index.ts | 114 +- src/clients/sidecar/runtime.ts | 645 ++-- 703 files changed, 69492 insertions(+), 61632 deletions(-) diff --git a/src/clients/docker/apis/ConfigApi.ts b/src/clients/docker/apis/ConfigApi.ts index d2a05d4ba8..4314594b46 100644 --- a/src/clients/docker/apis/ConfigApi.ts +++ b/src/clients/docker/apis/ConfigApi.ts @@ -2,233 +2,284 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { Config, ConfigCreateRequest, ConfigSpec, ErrorResponse, IdResponse, -} from '../models/index'; +} from "../models/index"; import { - ConfigFromJSON, - ConfigToJSON, - ConfigCreateRequestFromJSON, - ConfigCreateRequestToJSON, - ConfigSpecFromJSON, - ConfigSpecToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - IdResponseFromJSON, - IdResponseToJSON, -} from '../models/index'; + ConfigFromJSON, + ConfigToJSON, + ConfigCreateRequestFromJSON, + ConfigCreateRequestToJSON, + ConfigSpecFromJSON, + ConfigSpecToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + IdResponseFromJSON, + IdResponseToJSON, +} from "../models/index"; export interface ConfigCreateOperationRequest { - body?: ConfigCreateRequest; + body?: ConfigCreateRequest; } export interface ConfigDeleteRequest { - id: string; + id: string; } export interface ConfigInspectRequest { - id: string; + id: string; } export interface ConfigListRequest { - filters?: string; + filters?: string; } export interface ConfigUpdateRequest { - id: string; - version: number; - body?: ConfigSpec; + id: string; + version: number; + body?: ConfigSpec; } /** - * + * */ export class ConfigApi extends runtime.BaseAPI { - - /** - * Create a config - */ - async configCreateRaw(requestParameters: ConfigCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/configs/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ConfigCreateRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); - } - - /** - * Create a config - */ - async configCreate(requestParameters: ConfigCreateOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.configCreateRaw(requestParameters, initOverrides); - return await response.value(); + /** + * Create a config + */ + async configCreateRaw( + requestParameters: ConfigCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/configs/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ConfigCreateRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + } + + /** + * Create a config + */ + async configCreate( + requestParameters: ConfigCreateOperationRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.configCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a config + */ + async configDeleteRaw( + requestParameters: ConfigDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling configDelete().', + ); } - /** - * Delete a config - */ - async configDeleteRaw(requestParameters: ConfigDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling configDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/configs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/configs/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a config + */ + async configDelete( + requestParameters: ConfigDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.configDeleteRaw(requestParameters, initOverrides); + } + + /** + * Inspect a config + */ + async configInspectRaw( + requestParameters: ConfigInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling configInspect().', + ); } - /** - * Delete a config - */ - async configDelete(requestParameters: ConfigDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.configDeleteRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/configs/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + } + + /** + * Inspect a config + */ + async configInspect( + requestParameters: ConfigInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.configInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List configs + */ + async configListRaw( + requestParameters: ConfigListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Inspect a config - */ - async configInspectRaw(requestParameters: ConfigInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling configInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/configs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/configs`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigFromJSON)); + } + + /** + * List configs + */ + async configList( + requestParameters: ConfigListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.configListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a Config + */ + async configUpdateRaw( + requestParameters: ConfigUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling configUpdate().', + ); } - /** - * Inspect a config - */ - async configInspect(requestParameters: ConfigInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.configInspectRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling configUpdate().', + ); } - /** - * List configs - */ - async configListRaw(requestParameters: ConfigListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/configs`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigFromJSON)); - } - - /** - * List configs - */ - async configList(requestParameters: ConfigListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.configListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a Config - */ - async configUpdateRaw(requestParameters: ConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling configUpdate().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling configUpdate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/configs/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ConfigSpecToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } + const queryParameters: any = {}; - /** - * Update a Config - */ - async configUpdate(requestParameters: ConfigUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.configUpdateRaw(requestParameters, initOverrides); + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/configs/{id}/update`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ConfigSpecToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update a Config + */ + async configUpdate( + requestParameters: ConfigUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.configUpdateRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/ContainerApi.ts b/src/clients/docker/apis/ContainerApi.ts index 68efbb4069..46be968070 100644 --- a/src/clients/docker/apis/ContainerApi.ts +++ b/src/clients/docker/apis/ContainerApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ContainerCreateRequest, ContainerCreateResponse, @@ -26,1266 +25,1571 @@ import type { ContainerWaitResponse, ErrorResponse, FilesystemChange, -} from '../models/index'; +} from "../models/index"; import { - ContainerCreateRequestFromJSON, - ContainerCreateRequestToJSON, - ContainerCreateResponseFromJSON, - ContainerCreateResponseToJSON, - ContainerInspectResponseFromJSON, - ContainerInspectResponseToJSON, - ContainerPruneResponseFromJSON, - ContainerPruneResponseToJSON, - ContainerSummaryFromJSON, - ContainerSummaryToJSON, - ContainerTopResponseFromJSON, - ContainerTopResponseToJSON, - ContainerUpdateRequestFromJSON, - ContainerUpdateRequestToJSON, - ContainerUpdateResponseFromJSON, - ContainerUpdateResponseToJSON, - ContainerWaitResponseFromJSON, - ContainerWaitResponseToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - FilesystemChangeFromJSON, - FilesystemChangeToJSON, -} from '../models/index'; + ContainerCreateRequestFromJSON, + ContainerCreateRequestToJSON, + ContainerCreateResponseFromJSON, + ContainerCreateResponseToJSON, + ContainerInspectResponseFromJSON, + ContainerInspectResponseToJSON, + ContainerPruneResponseFromJSON, + ContainerPruneResponseToJSON, + ContainerSummaryFromJSON, + ContainerSummaryToJSON, + ContainerTopResponseFromJSON, + ContainerTopResponseToJSON, + ContainerUpdateRequestFromJSON, + ContainerUpdateRequestToJSON, + ContainerUpdateResponseFromJSON, + ContainerUpdateResponseToJSON, + ContainerWaitResponseFromJSON, + ContainerWaitResponseToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + FilesystemChangeFromJSON, + FilesystemChangeToJSON, +} from "../models/index"; export interface ContainerArchiveRequest { - id: string; - path: string; + id: string; + path: string; } export interface ContainerArchiveInfoRequest { - id: string; - path: string; + id: string; + path: string; } export interface ContainerAttachRequest { - id: string; - detachKeys?: string; - logs?: boolean; - stream?: boolean; - stdin?: boolean; - stdout?: boolean; - stderr?: boolean; + id: string; + detachKeys?: string; + logs?: boolean; + stream?: boolean; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; } export interface ContainerAttachWebsocketRequest { - id: string; - detachKeys?: string; - logs?: boolean; - stream?: boolean; - stdin?: boolean; - stdout?: boolean; - stderr?: boolean; + id: string; + detachKeys?: string; + logs?: boolean; + stream?: boolean; + stdin?: boolean; + stdout?: boolean; + stderr?: boolean; } export interface ContainerChangesRequest { - id: string; + id: string; } export interface ContainerCreateOperationRequest { - body: ContainerCreateRequest; - name?: string; - platform?: string; + body: ContainerCreateRequest; + name?: string; + platform?: string; } export interface ContainerDeleteRequest { - id: string; - v?: boolean; - force?: boolean; - link?: boolean; + id: string; + v?: boolean; + force?: boolean; + link?: boolean; } export interface ContainerExportRequest { - id: string; + id: string; } export interface ContainerInspectRequest { - id: string; - size?: boolean; + id: string; + size?: boolean; } export interface ContainerKillRequest { - id: string; - signal?: string; + id: string; + signal?: string; } export interface ContainerListRequest { - all?: boolean; - limit?: number; - size?: boolean; - filters?: string; + all?: boolean; + limit?: number; + size?: boolean; + filters?: string; } export interface ContainerLogsRequest { - id: string; - follow?: boolean; - stdout?: boolean; - stderr?: boolean; - since?: number; - until?: number; - timestamps?: boolean; - tail?: string; + id: string; + follow?: boolean; + stdout?: boolean; + stderr?: boolean; + since?: number; + until?: number; + timestamps?: boolean; + tail?: string; } export interface ContainerPauseRequest { - id: string; + id: string; } export interface ContainerPruneRequest { - filters?: string; + filters?: string; } export interface ContainerRenameRequest { - id: string; - name: string; + id: string; + name: string; } export interface ContainerResizeRequest { - id: string; - h?: number; - w?: number; + id: string; + h?: number; + w?: number; } export interface ContainerRestartRequest { - id: string; - signal?: string; - t?: number; + id: string; + signal?: string; + t?: number; } export interface ContainerStartRequest { - id: string; - detachKeys?: string; + id: string; + detachKeys?: string; } export interface ContainerStatsRequest { - id: string; - stream?: boolean; - one_shot?: boolean; + id: string; + stream?: boolean; + one_shot?: boolean; } export interface ContainerStopRequest { - id: string; - signal?: string; - t?: number; + id: string; + signal?: string; + t?: number; } export interface ContainerTopRequest { - id: string; - ps_args?: string; + id: string; + ps_args?: string; } export interface ContainerUnpauseRequest { - id: string; + id: string; } export interface ContainerUpdateOperationRequest { - id: string; - update: ContainerUpdateRequest; + id: string; + update: ContainerUpdateRequest; } export interface ContainerWaitRequest { - id: string; - condition?: ContainerWaitConditionEnum; + id: string; + condition?: ContainerWaitConditionEnum; } export interface PutContainerArchiveRequest { - id: string; - path: string; - inputStream: Blob; - noOverwriteDirNonDir?: string; - copyUIDGID?: string; + id: string; + path: string; + inputStream: Blob; + noOverwriteDirNonDir?: string; + copyUIDGID?: string; } /** - * + * */ export class ContainerApi extends runtime.BaseAPI { + /** + * Get a tar archive of a resource in the filesystem of container id. + * Get an archive of a filesystem resource in a container + */ + async containerArchiveRaw( + requestParameters: ContainerArchiveRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerArchive().', + ); + } + + if (requestParameters["path"] == null) { + throw new runtime.RequiredError( + "path", + 'Required parameter "path" was null or undefined when calling containerArchive().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["path"] != null) { + queryParameters["path"] = requestParameters["path"]; + } - /** - * Get a tar archive of a resource in the filesystem of container id. - * Get an archive of a filesystem resource in a container - */ - async containerArchiveRaw(requestParameters: ContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerArchive().' - ); - } - - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling containerArchive().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['path'] != null) { - queryParameters['path'] = requestParameters['path']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/archive`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Get a tar archive of a resource in the filesystem of container id. - * Get an archive of a filesystem resource in a container - */ - async containerArchive(requestParameters: ContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerArchiveRaw(requestParameters, initOverrides); - } - - /** - * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. - * Get information about files in a container - */ - async containerArchiveInfoRaw(requestParameters: ContainerArchiveInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerArchiveInfo().' - ); - } - - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling containerArchiveInfo().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['path'] != null) { - queryParameters['path'] = requestParameters['path']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/archive`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'HEAD', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. - * Get information about files in a container - */ - async containerArchiveInfo(requestParameters: ContainerArchiveInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerArchiveInfoRaw(requestParameters, initOverrides); - } - - /** - * 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`. - * Attach to a container - */ - async containerAttachRaw(requestParameters: ContainerAttachRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerAttach().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['detachKeys'] != null) { - queryParameters['detachKeys'] = requestParameters['detachKeys']; - } - - if (requestParameters['logs'] != null) { - queryParameters['logs'] = requestParameters['logs']; - } - - if (requestParameters['stream'] != null) { - queryParameters['stream'] = requestParameters['stream']; - } - - if (requestParameters['stdin'] != null) { - queryParameters['stdin'] = requestParameters['stdin']; - } - - if (requestParameters['stdout'] != null) { - queryParameters['stdout'] = requestParameters['stdout']; - } - - if (requestParameters['stderr'] != null) { - queryParameters['stderr'] = requestParameters['stderr']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/attach`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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`. - * Attach to a container - */ - async containerAttach(requestParameters: ContainerAttachRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerAttachRaw(requestParameters, initOverrides); - } - - /** - * Attach to a container via a websocket - */ - async containerAttachWebsocketRaw(requestParameters: ContainerAttachWebsocketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerAttachWebsocket().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['detachKeys'] != null) { - queryParameters['detachKeys'] = requestParameters['detachKeys']; - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/archive`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Get a tar archive of a resource in the filesystem of container id. + * Get an archive of a filesystem resource in a container + */ + async containerArchive( + requestParameters: ContainerArchiveRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerArchiveRaw(requestParameters, initOverrides); + } + + /** + * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. + * Get information about files in a container + */ + async containerArchiveInfoRaw( + requestParameters: ContainerArchiveInfoRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerArchiveInfo().', + ); + } + + if (requestParameters["path"] == null) { + throw new runtime.RequiredError( + "path", + 'Required parameter "path" was null or undefined when calling containerArchiveInfo().', + ); + } - if (requestParameters['logs'] != null) { - queryParameters['logs'] = requestParameters['logs']; - } - - if (requestParameters['stream'] != null) { - queryParameters['stream'] = requestParameters['stream']; - } - - if (requestParameters['stdin'] != null) { - queryParameters['stdin'] = requestParameters['stdin']; - } + const queryParameters: any = {}; + + if (requestParameters["path"] != null) { + queryParameters["path"] = requestParameters["path"]; + } - if (requestParameters['stdout'] != null) { - queryParameters['stdout'] = requestParameters['stdout']; - } - - if (requestParameters['stderr'] != null) { - queryParameters['stderr'] = requestParameters['stderr']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/attach/ws`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Attach to a container via a websocket - */ - async containerAttachWebsocket(requestParameters: ContainerAttachWebsocketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerAttachWebsocketRaw(requestParameters, initOverrides); - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/archive`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "HEAD", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. + * Get information about files in a container + */ + async containerArchiveInfo( + requestParameters: ContainerArchiveInfoRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerArchiveInfoRaw(requestParameters, initOverrides); + } + + /** + * 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`. + * Attach to a container + */ + async containerAttachRaw( + requestParameters: ContainerAttachRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerAttach().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["detachKeys"] != null) { + queryParameters["detachKeys"] = requestParameters["detachKeys"]; + } - /** - * 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\") - * Get changes on a container’s filesystem - */ - async containerChangesRaw(requestParameters: ContainerChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerChanges().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["logs"] != null) { + queryParameters["logs"] = requestParameters["logs"]; + } - const response = await this.request({ - path: `/containers/{id}/changes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["stream"] != null) { + queryParameters["stream"] = requestParameters["stream"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FilesystemChangeFromJSON)); + if (requestParameters["stdin"] != null) { + queryParameters["stdin"] = requestParameters["stdin"]; } - /** - * 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\") - * Get changes on a container’s filesystem - */ - async containerChanges(requestParameters: ContainerChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.containerChangesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create a container - */ - async containerCreateRaw(requestParameters: ContainerCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling containerCreate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; - } + if (requestParameters["stdout"] != null) { + queryParameters["stdout"] = requestParameters["stdout"]; + } - if (requestParameters['platform'] != null) { - queryParameters['platform'] = requestParameters['platform']; - } + if (requestParameters["stderr"] != null) { + queryParameters["stderr"] = requestParameters["stderr"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/attach`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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`. + * Attach to a container + */ + async containerAttach( + requestParameters: ContainerAttachRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerAttachRaw(requestParameters, initOverrides); + } + + /** + * Attach to a container via a websocket + */ + async containerAttachWebsocketRaw( + requestParameters: ContainerAttachWebsocketRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerAttachWebsocket().', + ); + } - headerParameters['Content-Type'] = 'application/json'; + const queryParameters: any = {}; - const response = await this.request({ - path: `/containers/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ContainerCreateRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ContainerCreateResponseFromJSON(jsonValue)); - } - - /** - * Create a container - */ - async containerCreate(requestParameters: ContainerCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerCreateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Remove a container - */ - async containerDeleteRaw(requestParameters: ContainerDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerDelete().' - ); - } + if (requestParameters["detachKeys"] != null) { + queryParameters["detachKeys"] = requestParameters["detachKeys"]; + } - const queryParameters: any = {}; - - if (requestParameters['v'] != null) { - queryParameters['v'] = requestParameters['v']; - } - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - if (requestParameters['link'] != null) { - queryParameters['link'] = requestParameters['link']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Remove a container - */ - async containerDelete(requestParameters: ContainerDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerDeleteRaw(requestParameters, initOverrides); - } - - /** - * Export the contents of a container as a tarball. - * Export a container - */ - async containerExportRaw(requestParameters: ContainerExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerExport().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["logs"] != null) { + queryParameters["logs"] = requestParameters["logs"]; + } - return new runtime.VoidApiResponse(response); - } - - /** - * Export the contents of a container as a tarball. - * Export a container - */ - async containerExport(requestParameters: ContainerExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerExportRaw(requestParameters, initOverrides); - } - - /** - * Return low-level information about a container. - * Inspect a container - */ - async containerInspectRaw(requestParameters: ContainerInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerInspect().' - ); - } + if (requestParameters["stream"] != null) { + queryParameters["stream"] = requestParameters["stream"]; + } - const queryParameters: any = {}; - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/json`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ContainerInspectResponseFromJSON(jsonValue)); - } - - /** - * Return low-level information about a container. - * Inspect a container - */ - async containerInspect(requestParameters: ContainerInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerInspectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Send a POSIX signal to a container, defaulting to killing to the container. - * Kill a container - */ - async containerKillRaw(requestParameters: ContainerKillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerKill().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['signal'] != null) { - queryParameters['signal'] = requestParameters['signal']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/kill`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Send a POSIX signal to a container, defaulting to killing to the container. - * Kill a container - */ - async containerKill(requestParameters: ContainerKillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerKillRaw(requestParameters, initOverrides); + if (requestParameters["stdin"] != null) { + queryParameters["stdin"] = requestParameters["stdin"]; } - /** - * 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 . - * List containers - */ - async containerListRaw(requestParameters: ContainerListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['all'] != null) { - queryParameters['all'] = requestParameters['all']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/json`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ContainerSummaryFromJSON)); + if (requestParameters["stdout"] != null) { + queryParameters["stdout"] = requestParameters["stdout"]; } - /** - * 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 . - * List containers - */ - async containerList(requestParameters: ContainerListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.containerListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. - * Get container logs - */ - async containerLogsRaw(requestParameters: ContainerLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerLogs().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['follow'] != null) { - queryParameters['follow'] = requestParameters['follow']; - } - - if (requestParameters['stdout'] != null) { - queryParameters['stdout'] = requestParameters['stdout']; - } - - if (requestParameters['stderr'] != null) { - queryParameters['stderr'] = requestParameters['stderr']; - } + if (requestParameters["stderr"] != null) { + queryParameters["stderr"] = requestParameters["stderr"]; + } - if (requestParameters['since'] != null) { - queryParameters['since'] = requestParameters['since']; - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/attach/ws`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Attach to a container via a websocket + */ + async containerAttachWebsocket( + requestParameters: ContainerAttachWebsocketRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerAttachWebsocketRaw(requestParameters, initOverrides); + } + + /** + * 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\") + * Get changes on a container’s filesystem + */ + async containerChangesRaw( + requestParameters: ContainerChangesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerChanges().', + ); + } - if (requestParameters['until'] != null) { - queryParameters['until'] = requestParameters['until']; - } - - if (requestParameters['timestamps'] != null) { - queryParameters['timestamps'] = requestParameters['timestamps']; - } - - if (requestParameters['tail'] != null) { - queryParameters['tail'] = requestParameters['tail']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. - * Get container logs - */ - async containerLogs(requestParameters: ContainerLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerLogsRaw(requestParameters, initOverrides); - return await response.value(); - } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/changes`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(FilesystemChangeFromJSON), + ); + } + + /** + * 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\") + * Get changes on a container’s filesystem + */ + async containerChanges( + requestParameters: ContainerChangesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.containerChangesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create a container + */ + async containerCreateRaw( + requestParameters: ContainerCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling containerCreate().', + ); + } - /** - * 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. - * Pause a container - */ - async containerPauseRaw(requestParameters: ContainerPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerPause().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/pause`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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. - * Pause a container - */ - async containerPause(requestParameters: ContainerPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerPauseRaw(requestParameters, initOverrides); - } - - /** - * Delete stopped containers - */ - async containerPruneRaw(requestParameters: ContainerPruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/prune`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ContainerPruneResponseFromJSON(jsonValue)); - } - - /** - * Delete stopped containers - */ - async containerPrune(requestParameters: ContainerPruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerPruneRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Rename a container - */ - async containerRenameRaw(requestParameters: ContainerRenameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerRename().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling containerRename().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["name"] != null) { + queryParameters["name"] = requestParameters["name"]; + } - const response = await this.request({ - path: `/containers/{id}/rename`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Rename a container - */ - async containerRename(requestParameters: ContainerRenameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerRenameRaw(requestParameters, initOverrides); - } - - /** - * Resize the TTY for a container. - * Resize a container TTY - */ - async containerResizeRaw(requestParameters: ContainerResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerResize().' - ); - } + if (requestParameters["platform"] != null) { + queryParameters["platform"] = requestParameters["platform"]; + } - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/containers/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ContainerCreateRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ContainerCreateResponseFromJSON(jsonValue), + ); + } + + /** + * Create a container + */ + async containerCreate( + requestParameters: ContainerCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Remove a container + */ + async containerDeleteRaw( + requestParameters: ContainerDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerDelete().', + ); + } - if (requestParameters['h'] != null) { - queryParameters['h'] = requestParameters['h']; - } + const queryParameters: any = {}; - if (requestParameters['w'] != null) { - queryParameters['w'] = requestParameters['w']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/resize`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Resize the TTY for a container. - * Resize a container TTY - */ - async containerResize(requestParameters: ContainerResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerResizeRaw(requestParameters, initOverrides); - } - - /** - * Restart a container - */ - async containerRestartRaw(requestParameters: ContainerRestartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerRestart().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['signal'] != null) { - queryParameters['signal'] = requestParameters['signal']; - } - - if (requestParameters['t'] != null) { - queryParameters['t'] = requestParameters['t']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/restart`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["v"] != null) { + queryParameters["v"] = requestParameters["v"]; } - /** - * Restart a container - */ - async containerRestart(requestParameters: ContainerRestartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerRestartRaw(requestParameters, initOverrides); - } - - /** - * Start a container - */ - async containerStartRaw(requestParameters: ContainerStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerStart().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['detachKeys'] != null) { - queryParameters['detachKeys'] = requestParameters['detachKeys']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/start`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Start a container - */ - async containerStart(requestParameters: ContainerStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerStartRaw(requestParameters, initOverrides); - } - - /** - * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` - * Get container stats based on resource usage - */ - async containerStatsRaw(requestParameters: ContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerStats().' - ); - } + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; + } - const queryParameters: any = {}; + if (requestParameters["link"] != null) { + queryParameters["link"] = requestParameters["link"]; + } - if (requestParameters['stream'] != null) { - queryParameters['stream'] = requestParameters['stream']; - } - - if (requestParameters['one_shot'] != null) { - queryParameters['one-shot'] = requestParameters['one_shot']; - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Remove a container + */ + async containerDelete( + requestParameters: ContainerDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerDeleteRaw(requestParameters, initOverrides); + } + + /** + * Export the contents of a container as a tarball. + * Export a container + */ + async containerExportRaw( + requestParameters: ContainerExportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerExport().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/stats`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` - * Get container stats based on resource usage - */ - async containerStats(requestParameters: ContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerStatsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Stop a container - */ - async containerStopRaw(requestParameters: ContainerStopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerStop().' - ); - } - - const queryParameters: any = {}; + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/export`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Export the contents of a container as a tarball. + * Export a container + */ + async containerExport( + requestParameters: ContainerExportRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerExportRaw(requestParameters, initOverrides); + } + + /** + * Return low-level information about a container. + * Inspect a container + */ + async containerInspectRaw( + requestParameters: ContainerInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerInspect().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["size"] != null) { + queryParameters["size"] = requestParameters["size"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/json`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ContainerInspectResponseFromJSON(jsonValue), + ); + } + + /** + * Return low-level information about a container. + * Inspect a container + */ + async containerInspect( + requestParameters: ContainerInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Send a POSIX signal to a container, defaulting to killing to the container. + * Kill a container + */ + async containerKillRaw( + requestParameters: ContainerKillRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerKill().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["signal"] != null) { + queryParameters["signal"] = requestParameters["signal"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/kill`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Send a POSIX signal to a container, defaulting to killing to the container. + * Kill a container + */ + async containerKill( + requestParameters: ContainerKillRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerKillRaw(requestParameters, initOverrides); + } + + /** + * 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 . + * List containers + */ + async containerListRaw( + requestParameters: ContainerListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["all"] != null) { + queryParameters["all"] = requestParameters["all"]; + } + + if (requestParameters["limit"] != null) { + queryParameters["limit"] = requestParameters["limit"]; + } + + if (requestParameters["size"] != null) { + queryParameters["size"] = requestParameters["size"]; + } + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/json`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(ContainerSummaryFromJSON), + ); + } + + /** + * 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 . + * List containers + */ + async containerList( + requestParameters: ContainerListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.containerListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + * Get container logs + */ + async containerLogsRaw( + requestParameters: ContainerLogsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerLogs().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["follow"] != null) { + queryParameters["follow"] = requestParameters["follow"]; + } + + if (requestParameters["stdout"] != null) { + queryParameters["stdout"] = requestParameters["stdout"]; + } + + if (requestParameters["stderr"] != null) { + queryParameters["stderr"] = requestParameters["stderr"]; + } + + if (requestParameters["since"] != null) { + queryParameters["since"] = requestParameters["since"]; + } + + if (requestParameters["until"] != null) { + queryParameters["until"] = requestParameters["until"]; + } + + if (requestParameters["timestamps"] != null) { + queryParameters["timestamps"] = requestParameters["timestamps"]; + } + + if (requestParameters["tail"] != null) { + queryParameters["tail"] = requestParameters["tail"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/logs`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + * Get container logs + */ + async containerLogs( + requestParameters: ContainerLogsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerLogsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Pause a container + */ + async containerPauseRaw( + requestParameters: ContainerPauseRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerPause().', + ); + } - if (requestParameters['signal'] != null) { - queryParameters['signal'] = requestParameters['signal']; - } - - if (requestParameters['t'] != null) { - queryParameters['t'] = requestParameters['t']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/stop`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Stop a container - */ - async containerStop(requestParameters: ContainerStopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerStopRaw(requestParameters, initOverrides); - } - - /** - * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. - * List processes running inside a container - */ - async containerTopRaw(requestParameters: ContainerTopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerTop().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['ps_args'] != null) { - queryParameters['ps_args'] = requestParameters['ps_args']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/top`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ContainerTopResponseFromJSON(jsonValue)); - } - - /** - * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. - * List processes running inside a container - */ - async containerTop(requestParameters: ContainerTopRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerTopRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Resume a container which has been paused. - * Unpause a container - */ - async containerUnpauseRaw(requestParameters: ContainerUnpauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerUnpause().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/unpause`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Resume a container which has been paused. - * Unpause a container - */ - async containerUnpause(requestParameters: ContainerUnpauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.containerUnpauseRaw(requestParameters, initOverrides); - } - - /** - * Change various configuration options of a container without having to recreate it. - * Update a container - */ - async containerUpdateRaw(requestParameters: ContainerUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerUpdate().' - ); - } - - if (requestParameters['update'] == null) { - throw new runtime.RequiredError( - 'update', - 'Required parameter "update" was null or undefined when calling containerUpdate().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/containers/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ContainerUpdateRequestToJSON(requestParameters['update']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ContainerUpdateResponseFromJSON(jsonValue)); - } - - /** - * Change various configuration options of a container without having to recreate it. - * Update a container - */ - async containerUpdate(requestParameters: ContainerUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerUpdateRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Block until a container stops, then returns the exit code. - * Wait for a container - */ - async containerWaitRaw(requestParameters: ContainerWaitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerWait().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['condition'] != null) { - queryParameters['condition'] = requestParameters['condition']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/containers/{id}/wait`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ContainerWaitResponseFromJSON(jsonValue)); - } - - /** - * Block until a container stops, then returns the exit code. - * Wait for a container - */ - async containerWait(requestParameters: ContainerWaitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerWaitRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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\". - * Extract an archive of files or folders to a directory in a container - */ - async putContainerArchiveRaw(requestParameters: PutContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling putContainerArchive().' - ); - } - - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling putContainerArchive().' - ); - } - - if (requestParameters['inputStream'] == null) { - throw new runtime.RequiredError( - 'inputStream', - 'Required parameter "inputStream" was null or undefined when calling putContainerArchive().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['path'] != null) { - queryParameters['path'] = requestParameters['path']; - } - - if (requestParameters['noOverwriteDirNonDir'] != null) { - queryParameters['noOverwriteDirNonDir'] = requestParameters['noOverwriteDirNonDir']; - } - - if (requestParameters['copyUIDGID'] != null) { - queryParameters['copyUIDGID'] = requestParameters['copyUIDGID']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-tar'; - - const response = await this.request({ - path: `/containers/{id}/archive`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: requestParameters['inputStream'] as any, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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\". - * Extract an archive of files or folders to a directory in a container - */ - async putContainerArchive(requestParameters: PutContainerArchiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.putContainerArchiveRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/pause`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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. + * Pause a container + */ + async containerPause( + requestParameters: ContainerPauseRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerPauseRaw(requestParameters, initOverrides); + } + + /** + * Delete stopped containers + */ + async containerPruneRaw( + requestParameters: ContainerPruneRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/prune`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ContainerPruneResponseFromJSON(jsonValue), + ); + } + + /** + * Delete stopped containers + */ + async containerPrune( + requestParameters: ContainerPruneRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerPruneRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Rename a container + */ + async containerRenameRaw( + requestParameters: ContainerRenameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerRename().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling containerRename().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["name"] != null) { + queryParameters["name"] = requestParameters["name"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/rename`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Rename a container + */ + async containerRename( + requestParameters: ContainerRenameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerRenameRaw(requestParameters, initOverrides); + } + + /** + * Resize the TTY for a container. + * Resize a container TTY + */ + async containerResizeRaw( + requestParameters: ContainerResizeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerResize().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["h"] != null) { + queryParameters["h"] = requestParameters["h"]; + } + + if (requestParameters["w"] != null) { + queryParameters["w"] = requestParameters["w"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/resize`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Resize the TTY for a container. + * Resize a container TTY + */ + async containerResize( + requestParameters: ContainerResizeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerResizeRaw(requestParameters, initOverrides); + } + + /** + * Restart a container + */ + async containerRestartRaw( + requestParameters: ContainerRestartRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerRestart().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["signal"] != null) { + queryParameters["signal"] = requestParameters["signal"]; + } + + if (requestParameters["t"] != null) { + queryParameters["t"] = requestParameters["t"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/restart`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Restart a container + */ + async containerRestart( + requestParameters: ContainerRestartRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerRestartRaw(requestParameters, initOverrides); + } + + /** + * Start a container + */ + async containerStartRaw( + requestParameters: ContainerStartRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerStart().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["detachKeys"] != null) { + queryParameters["detachKeys"] = requestParameters["detachKeys"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/start`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Start a container + */ + async containerStart( + requestParameters: ContainerStartRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerStartRaw(requestParameters, initOverrides); + } + + /** + * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + * Get container stats based on resource usage + */ + async containerStatsRaw( + requestParameters: ContainerStatsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerStats().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["stream"] != null) { + queryParameters["stream"] = requestParameters["stream"]; + } + + if (requestParameters["one_shot"] != null) { + queryParameters["one-shot"] = requestParameters["one_shot"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/stats`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * 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 = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + * Get container stats based on resource usage + */ + async containerStats( + requestParameters: ContainerStatsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerStatsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Stop a container + */ + async containerStopRaw( + requestParameters: ContainerStopRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerStop().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["signal"] != null) { + queryParameters["signal"] = requestParameters["signal"]; + } + + if (requestParameters["t"] != null) { + queryParameters["t"] = requestParameters["t"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/stop`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Stop a container + */ + async containerStop( + requestParameters: ContainerStopRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerStopRaw(requestParameters, initOverrides); + } + + /** + * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + * List processes running inside a container + */ + async containerTopRaw( + requestParameters: ContainerTopRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerTop().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["ps_args"] != null) { + queryParameters["ps_args"] = requestParameters["ps_args"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/top`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ContainerTopResponseFromJSON(jsonValue), + ); + } + + /** + * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + * List processes running inside a container + */ + async containerTop( + requestParameters: ContainerTopRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerTopRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Resume a container which has been paused. + * Unpause a container + */ + async containerUnpauseRaw( + requestParameters: ContainerUnpauseRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerUnpause().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/unpause`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Resume a container which has been paused. + * Unpause a container + */ + async containerUnpause( + requestParameters: ContainerUnpauseRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.containerUnpauseRaw(requestParameters, initOverrides); + } + + /** + * Change various configuration options of a container without having to recreate it. + * Update a container + */ + async containerUpdateRaw( + requestParameters: ContainerUpdateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerUpdate().', + ); + } + + if (requestParameters["update"] == null) { + throw new runtime.RequiredError( + "update", + 'Required parameter "update" was null or undefined when calling containerUpdate().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/containers/{id}/update`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ContainerUpdateRequestToJSON(requestParameters["update"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ContainerUpdateResponseFromJSON(jsonValue), + ); + } + + /** + * Change various configuration options of a container without having to recreate it. + * Update a container + */ + async containerUpdate( + requestParameters: ContainerUpdateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Block until a container stops, then returns the exit code. + * Wait for a container + */ + async containerWaitRaw( + requestParameters: ContainerWaitRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerWait().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["condition"] != null) { + queryParameters["condition"] = requestParameters["condition"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/containers/{id}/wait`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ContainerWaitResponseFromJSON(jsonValue), + ); + } + + /** + * Block until a container stops, then returns the exit code. + * Wait for a container + */ + async containerWait( + requestParameters: ContainerWaitRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerWaitRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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\". + * Extract an archive of files or folders to a directory in a container + */ + async putContainerArchiveRaw( + requestParameters: PutContainerArchiveRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling putContainerArchive().', + ); + } + + if (requestParameters["path"] == null) { + throw new runtime.RequiredError( + "path", + 'Required parameter "path" was null or undefined when calling putContainerArchive().', + ); + } + + if (requestParameters["inputStream"] == null) { + throw new runtime.RequiredError( + "inputStream", + 'Required parameter "inputStream" was null or undefined when calling putContainerArchive().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["path"] != null) { + queryParameters["path"] = requestParameters["path"]; + } + + if (requestParameters["noOverwriteDirNonDir"] != null) { + queryParameters["noOverwriteDirNonDir"] = requestParameters["noOverwriteDirNonDir"]; + } + + if (requestParameters["copyUIDGID"] != null) { + queryParameters["copyUIDGID"] = requestParameters["copyUIDGID"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/x-tar"; + + const response = await this.request( + { + path: `/containers/{id}/archive`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: requestParameters["inputStream"] as any, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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\". + * Extract an archive of files or folders to a directory in a container + */ + async putContainerArchive( + requestParameters: PutContainerArchiveRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.putContainerArchiveRaw(requestParameters, initOverrides); + } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ContainerWaitConditionEnum { - NotRunning = 'not-running', - NextExit = 'next-exit', - Removed = 'removed' + NotRunning = "not-running", + NextExit = "next-exit", + Removed = "removed", } diff --git a/src/clients/docker/apis/DistributionApi.ts b/src/clients/docker/apis/DistributionApi.ts index cdd2849dc8..60ef67b7ef 100644 --- a/src/clients/docker/apis/DistributionApi.ts +++ b/src/clients/docker/apis/DistributionApi.ts @@ -2,71 +2,79 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - DistributionInspect, - ErrorResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { DistributionInspect, ErrorResponse } from "../models/index"; import { - DistributionInspectFromJSON, - DistributionInspectToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/index'; + DistributionInspectFromJSON, + DistributionInspectToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, +} from "../models/index"; export interface DistributionInspectRequest { - name: string; + name: string; } /** - * + * */ export class DistributionApi extends runtime.BaseAPI { + /** + * Return image digest and platform information by contacting the registry. + * Get image information from the registry + */ + async distributionInspectRaw( + requestParameters: DistributionInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling distributionInspect().', + ); + } - /** - * Return image digest and platform information by contacting the registry. - * Get image information from the registry - */ - async distributionInspectRaw(requestParameters: DistributionInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling distributionInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - const response = await this.request({ - path: `/distribution/{name}/json`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => DistributionInspectFromJSON(jsonValue)); - } + const response = await this.request( + { + path: `/distribution/{name}/json`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - * Return image digest and platform information by contacting the registry. - * Get image information from the registry - */ - async distributionInspect(requestParameters: DistributionInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.distributionInspectRaw(requestParameters, initOverrides); - return await response.value(); - } + return new runtime.JSONApiResponse(response, (jsonValue) => + DistributionInspectFromJSON(jsonValue), + ); + } + /** + * Return image digest and platform information by contacting the registry. + * Get image information from the registry + */ + async distributionInspect( + requestParameters: DistributionInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.distributionInspectRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/docker/apis/ExecApi.ts b/src/clients/docker/apis/ExecApi.ts index 996a21fbc9..8bb37b8bab 100644 --- a/src/clients/docker/apis/ExecApi.ts +++ b/src/clients/docker/apis/ExecApi.ts @@ -2,220 +2,267 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, ExecConfig, ExecInspectResponse, ExecStartConfig, IdResponse, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - ExecConfigFromJSON, - ExecConfigToJSON, - ExecInspectResponseFromJSON, - ExecInspectResponseToJSON, - ExecStartConfigFromJSON, - ExecStartConfigToJSON, - IdResponseFromJSON, - IdResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + ExecConfigFromJSON, + ExecConfigToJSON, + ExecInspectResponseFromJSON, + ExecInspectResponseToJSON, + ExecStartConfigFromJSON, + ExecStartConfigToJSON, + IdResponseFromJSON, + IdResponseToJSON, +} from "../models/index"; export interface ContainerExecRequest { - id: string; - execConfig: ExecConfig; + id: string; + execConfig: ExecConfig; } export interface ExecInspectRequest { - id: string; + id: string; } export interface ExecResizeRequest { - id: string; - h?: number; - w?: number; + id: string; + h?: number; + w?: number; } export interface ExecStartRequest { - id: string; - execStartConfig?: ExecStartConfig; + id: string; + execStartConfig?: ExecStartConfig; } /** - * + * */ export class ExecApi extends runtime.BaseAPI { - - /** - * Run a command inside a running container. - * Create an exec instance - */ - async containerExecRaw(requestParameters: ContainerExecRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling containerExec().' - ); - } - - if (requestParameters['execConfig'] == null) { - throw new runtime.RequiredError( - 'execConfig', - 'Required parameter "execConfig" was null or undefined when calling containerExec().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/containers/{id}/exec`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ExecConfigToJSON(requestParameters['execConfig']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + /** + * Run a command inside a running container. + * Create an exec instance + */ + async containerExecRaw( + requestParameters: ContainerExecRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling containerExec().', + ); } - /** - * Run a command inside a running container. - * Create an exec instance - */ - async containerExec(requestParameters: ContainerExecRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.containerExecRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["execConfig"] == null) { + throw new runtime.RequiredError( + "execConfig", + 'Required parameter "execConfig" was null or undefined when calling containerExec().', + ); } - /** - * Return low-level information about an exec instance. - * Inspect an exec instance - */ - async execInspectRaw(requestParameters: ExecInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling execInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/exec/{id}/json`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExecInspectResponseFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/containers/{id}/exec`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ExecConfigToJSON(requestParameters["execConfig"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + } + + /** + * Run a command inside a running container. + * Create an exec instance + */ + async containerExec( + requestParameters: ContainerExecRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.containerExecRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return low-level information about an exec instance. + * Inspect an exec instance + */ + async execInspectRaw( + requestParameters: ExecInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling execInspect().', + ); } - /** - * Return low-level information about an exec instance. - * Inspect an exec instance - */ - async execInspect(requestParameters: ExecInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.execInspectRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/exec/{id}/json`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExecInspectResponseFromJSON(jsonValue), + ); + } + + /** + * Return low-level information about an exec instance. + * Inspect an exec instance + */ + async execInspect( + requestParameters: ExecInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.execInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Resize an exec instance + */ + async execResizeRaw( + requestParameters: ExecResizeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling execResize().', + ); } - /** - * 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. - * Resize an exec instance - */ - async execResizeRaw(requestParameters: ExecResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling execResize().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['h'] != null) { - queryParameters['h'] = requestParameters['h']; - } - - if (requestParameters['w'] != null) { - queryParameters['w'] = requestParameters['w']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/exec/{id}/resize`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } + const queryParameters: any = {}; - /** - * 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. - * Resize an exec instance - */ - async execResize(requestParameters: ExecResizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.execResizeRaw(requestParameters, initOverrides); + if (requestParameters["h"] != null) { + queryParameters["h"] = requestParameters["h"]; } - /** - * 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. - * Start an exec instance - */ - async execStartRaw(requestParameters: ExecStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling execStart().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/exec/{id}/start`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ExecStartConfigToJSON(requestParameters['execStartConfig']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["w"] != null) { + queryParameters["w"] = requestParameters["w"]; } - /** - * 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. - * Start an exec instance - */ - async execStart(requestParameters: ExecStartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.execStartRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/exec/{id}/resize`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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. + * Resize an exec instance + */ + async execResize( + requestParameters: ExecResizeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.execResizeRaw(requestParameters, initOverrides); + } + + /** + * 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. + * Start an exec instance + */ + async execStartRaw( + requestParameters: ExecStartRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling execStart().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/exec/{id}/start`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ExecStartConfigToJSON(requestParameters["execStartConfig"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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. + * Start an exec instance + */ + async execStart( + requestParameters: ExecStartRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.execStartRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/ImageApi.ts b/src/clients/docker/apis/ImageApi.ts index bfd2bc45d9..5f6f44d4b6 100644 --- a/src/clients/docker/apis/ImageApi.ts +++ b/src/clients/docker/apis/ImageApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { BuildPruneResponse, ContainerConfig, @@ -25,886 +24,1053 @@ import type { ImagePruneResponse, ImageSearchResponseItem, ImageSummary, -} from '../models/index'; +} from "../models/index"; import { - BuildPruneResponseFromJSON, - BuildPruneResponseToJSON, - ContainerConfigFromJSON, - ContainerConfigToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - HistoryResponseItemFromJSON, - HistoryResponseItemToJSON, - IdResponseFromJSON, - IdResponseToJSON, - ImageDeleteResponseItemFromJSON, - ImageDeleteResponseItemToJSON, - ImageInspectFromJSON, - ImageInspectToJSON, - ImagePruneResponseFromJSON, - ImagePruneResponseToJSON, - ImageSearchResponseItemFromJSON, - ImageSearchResponseItemToJSON, - ImageSummaryFromJSON, - ImageSummaryToJSON, -} from '../models/index'; + BuildPruneResponseFromJSON, + BuildPruneResponseToJSON, + ContainerConfigFromJSON, + ContainerConfigToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + HistoryResponseItemFromJSON, + HistoryResponseItemToJSON, + IdResponseFromJSON, + IdResponseToJSON, + ImageDeleteResponseItemFromJSON, + ImageDeleteResponseItemToJSON, + ImageInspectFromJSON, + ImageInspectToJSON, + ImagePruneResponseFromJSON, + ImagePruneResponseToJSON, + ImageSearchResponseItemFromJSON, + ImageSearchResponseItemToJSON, + ImageSummaryFromJSON, + ImageSummaryToJSON, +} from "../models/index"; export interface BuildPruneRequest { - keep_storage?: number; - all?: boolean; - filters?: string; + keep_storage?: number; + all?: boolean; + filters?: string; } export interface ImageBuildRequest { - dockerfile?: string; - t?: string; - extrahosts?: string; - remote?: string; - q?: boolean; - nocache?: boolean; - cachefrom?: string; - pull?: string; - rm?: boolean; - forcerm?: boolean; - memory?: number; - memswap?: number; - cpushares?: number; - cpusetcpus?: string; - cpuperiod?: number; - cpuquota?: number; - buildargs?: string; - shmsize?: number; - squash?: boolean; - labels?: string; - networkmode?: string; - Content_type?: ImageBuildContentTypeEnum; - X_Registry_Config?: string; - platform?: string; - target?: string; - outputs?: string; - version?: ImageBuildVersionEnum; - inputStream?: Blob; + dockerfile?: string; + t?: string; + extrahosts?: string; + remote?: string; + q?: boolean; + nocache?: boolean; + cachefrom?: string; + pull?: string; + rm?: boolean; + forcerm?: boolean; + memory?: number; + memswap?: number; + cpushares?: number; + cpusetcpus?: string; + cpuperiod?: number; + cpuquota?: number; + buildargs?: string; + shmsize?: number; + squash?: boolean; + labels?: string; + networkmode?: string; + Content_type?: ImageBuildContentTypeEnum; + X_Registry_Config?: string; + platform?: string; + target?: string; + outputs?: string; + version?: ImageBuildVersionEnum; + inputStream?: Blob; } export interface ImageCommitRequest { - container?: string; - repo?: string; - tag?: string; - comment?: string; - author?: string; - pause?: boolean; - changes?: string; - containerConfig?: ContainerConfig; + container?: string; + repo?: string; + tag?: string; + comment?: string; + author?: string; + pause?: boolean; + changes?: string; + containerConfig?: ContainerConfig; } export interface ImageCreateRequest { - fromImage?: string; - fromSrc?: string; - repo?: string; - tag?: string; - message?: string; - X_Registry_Auth?: string; - changes?: Array; - platform?: string; - inputImage?: string; + fromImage?: string; + fromSrc?: string; + repo?: string; + tag?: string; + message?: string; + X_Registry_Auth?: string; + changes?: Array; + platform?: string; + inputImage?: string; } export interface ImageDeleteRequest { - name: string; - force?: boolean; - noprune?: boolean; + name: string; + force?: boolean; + noprune?: boolean; } export interface ImageGetRequest { - name: string; + name: string; } export interface ImageGetAllRequest { - names?: Array; + names?: Array; } export interface ImageHistoryRequest { - name: string; + name: string; } export interface ImageInspectRequest { - name: string; + name: string; } export interface ImageListRequest { - all?: boolean; - filters?: string; - shared_size?: boolean; - digests?: boolean; + all?: boolean; + filters?: string; + shared_size?: boolean; + digests?: boolean; } export interface ImageLoadRequest { - quiet?: boolean; - imagesTarball?: Blob; + quiet?: boolean; + imagesTarball?: Blob; } export interface ImagePruneRequest { - filters?: string; + filters?: string; } export interface ImagePushRequest { - name: string; - X_Registry_Auth: string; - tag?: string; + name: string; + X_Registry_Auth: string; + tag?: string; } export interface ImageSearchRequest { - term: string; - limit?: number; - filters?: string; + term: string; + limit?: number; + filters?: string; } export interface ImageTagRequest { - name: string; - repo?: string; - tag?: string; + name: string; + repo?: string; + tag?: string; } /** - * + * */ export class ImageApi extends runtime.BaseAPI { - - /** - * Delete builder cache - */ - async buildPruneRaw(requestParameters: BuildPruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['keep_storage'] != null) { - queryParameters['keep-storage'] = requestParameters['keep_storage']; - } - - if (requestParameters['all'] != null) { - queryParameters['all'] = requestParameters['all']; - } - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/build/prune`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => BuildPruneResponseFromJSON(jsonValue)); + /** + * Delete builder cache + */ + async buildPruneRaw( + requestParameters: BuildPruneRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["keep_storage"] != null) { + queryParameters["keep-storage"] = requestParameters["keep_storage"]; } - /** - * Delete builder cache - */ - async buildPrune(requestParameters: BuildPruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.buildPruneRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["all"] != null) { + queryParameters["all"] = requestParameters["all"]; } - /** - * 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. - * Build an image - */ - async imageBuildRaw(requestParameters: ImageBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['dockerfile'] != null) { - queryParameters['dockerfile'] = requestParameters['dockerfile']; - } - - if (requestParameters['t'] != null) { - queryParameters['t'] = requestParameters['t']; - } + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; + } - if (requestParameters['extrahosts'] != null) { - queryParameters['extrahosts'] = requestParameters['extrahosts']; - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/build/prune`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + BuildPruneResponseFromJSON(jsonValue), + ); + } + + /** + * Delete builder cache + */ + async buildPrune( + requestParameters: BuildPruneRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.buildPruneRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Build an image + */ + async imageBuildRaw( + requestParameters: ImageBuildRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["dockerfile"] != null) { + queryParameters["dockerfile"] = requestParameters["dockerfile"]; + } - if (requestParameters['remote'] != null) { - queryParameters['remote'] = requestParameters['remote']; - } + if (requestParameters["t"] != null) { + queryParameters["t"] = requestParameters["t"]; + } - if (requestParameters['q'] != null) { - queryParameters['q'] = requestParameters['q']; - } + if (requestParameters["extrahosts"] != null) { + queryParameters["extrahosts"] = requestParameters["extrahosts"]; + } - if (requestParameters['nocache'] != null) { - queryParameters['nocache'] = requestParameters['nocache']; - } + if (requestParameters["remote"] != null) { + queryParameters["remote"] = requestParameters["remote"]; + } - if (requestParameters['cachefrom'] != null) { - queryParameters['cachefrom'] = requestParameters['cachefrom']; - } + if (requestParameters["q"] != null) { + queryParameters["q"] = requestParameters["q"]; + } - if (requestParameters['pull'] != null) { - queryParameters['pull'] = requestParameters['pull']; - } + if (requestParameters["nocache"] != null) { + queryParameters["nocache"] = requestParameters["nocache"]; + } - if (requestParameters['rm'] != null) { - queryParameters['rm'] = requestParameters['rm']; - } + if (requestParameters["cachefrom"] != null) { + queryParameters["cachefrom"] = requestParameters["cachefrom"]; + } - if (requestParameters['forcerm'] != null) { - queryParameters['forcerm'] = requestParameters['forcerm']; - } + if (requestParameters["pull"] != null) { + queryParameters["pull"] = requestParameters["pull"]; + } - if (requestParameters['memory'] != null) { - queryParameters['memory'] = requestParameters['memory']; - } + if (requestParameters["rm"] != null) { + queryParameters["rm"] = requestParameters["rm"]; + } - if (requestParameters['memswap'] != null) { - queryParameters['memswap'] = requestParameters['memswap']; - } + if (requestParameters["forcerm"] != null) { + queryParameters["forcerm"] = requestParameters["forcerm"]; + } - if (requestParameters['cpushares'] != null) { - queryParameters['cpushares'] = requestParameters['cpushares']; - } + if (requestParameters["memory"] != null) { + queryParameters["memory"] = requestParameters["memory"]; + } - if (requestParameters['cpusetcpus'] != null) { - queryParameters['cpusetcpus'] = requestParameters['cpusetcpus']; - } + if (requestParameters["memswap"] != null) { + queryParameters["memswap"] = requestParameters["memswap"]; + } - if (requestParameters['cpuperiod'] != null) { - queryParameters['cpuperiod'] = requestParameters['cpuperiod']; - } + if (requestParameters["cpushares"] != null) { + queryParameters["cpushares"] = requestParameters["cpushares"]; + } - if (requestParameters['cpuquota'] != null) { - queryParameters['cpuquota'] = requestParameters['cpuquota']; - } + if (requestParameters["cpusetcpus"] != null) { + queryParameters["cpusetcpus"] = requestParameters["cpusetcpus"]; + } - if (requestParameters['buildargs'] != null) { - queryParameters['buildargs'] = requestParameters['buildargs']; - } + if (requestParameters["cpuperiod"] != null) { + queryParameters["cpuperiod"] = requestParameters["cpuperiod"]; + } - if (requestParameters['shmsize'] != null) { - queryParameters['shmsize'] = requestParameters['shmsize']; - } + if (requestParameters["cpuquota"] != null) { + queryParameters["cpuquota"] = requestParameters["cpuquota"]; + } - if (requestParameters['squash'] != null) { - queryParameters['squash'] = requestParameters['squash']; - } + if (requestParameters["buildargs"] != null) { + queryParameters["buildargs"] = requestParameters["buildargs"]; + } - if (requestParameters['labels'] != null) { - queryParameters['labels'] = requestParameters['labels']; - } + if (requestParameters["shmsize"] != null) { + queryParameters["shmsize"] = requestParameters["shmsize"]; + } - if (requestParameters['networkmode'] != null) { - queryParameters['networkmode'] = requestParameters['networkmode']; - } + if (requestParameters["squash"] != null) { + queryParameters["squash"] = requestParameters["squash"]; + } - if (requestParameters['platform'] != null) { - queryParameters['platform'] = requestParameters['platform']; - } + if (requestParameters["labels"] != null) { + queryParameters["labels"] = requestParameters["labels"]; + } - if (requestParameters['target'] != null) { - queryParameters['target'] = requestParameters['target']; - } + if (requestParameters["networkmode"] != null) { + queryParameters["networkmode"] = requestParameters["networkmode"]; + } - if (requestParameters['outputs'] != null) { - queryParameters['outputs'] = requestParameters['outputs']; - } + if (requestParameters["platform"] != null) { + queryParameters["platform"] = requestParameters["platform"]; + } - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } + if (requestParameters["target"] != null) { + queryParameters["target"] = requestParameters["target"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["outputs"] != null) { + queryParameters["outputs"] = requestParameters["outputs"]; + } - headerParameters['Content-Type'] = 'application/octet-stream'; + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; + } - if (requestParameters['Content_type'] != null) { - headerParameters['Content-type'] = String(requestParameters['Content_type']); - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['X_Registry_Config'] != null) { - headerParameters['X-Registry-Config'] = String(requestParameters['X_Registry_Config']); - } + headerParameters["Content-Type"] = "application/octet-stream"; - const response = await this.request({ - path: `/build`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['inputStream'] as any, - }, initOverrides); + if (requestParameters["Content_type"] != null) { + headerParameters["Content-type"] = String(requestParameters["Content_type"]); + } - return new runtime.VoidApiResponse(response); + if (requestParameters["X_Registry_Config"] != null) { + headerParameters["X-Registry-Config"] = String(requestParameters["X_Registry_Config"]); } - /** - * 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. - * Build an image - */ - async imageBuild(requestParameters: ImageBuildRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.imageBuildRaw(requestParameters, initOverrides); + const response = await this.request( + { + path: `/build`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["inputStream"] as any, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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. + * Build an image + */ + async imageBuild( + requestParameters: ImageBuildRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.imageBuildRaw(requestParameters, initOverrides); + } + + /** + * Create a new image from a container + */ + async imageCommitRaw( + requestParameters: ImageCommitRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["container"] != null) { + queryParameters["container"] = requestParameters["container"]; } - /** - * Create a new image from a container - */ - async imageCommitRaw(requestParameters: ImageCommitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + if (requestParameters["repo"] != null) { + queryParameters["repo"] = requestParameters["repo"]; + } - if (requestParameters['container'] != null) { - queryParameters['container'] = requestParameters['container']; - } + if (requestParameters["tag"] != null) { + queryParameters["tag"] = requestParameters["tag"]; + } - if (requestParameters['repo'] != null) { - queryParameters['repo'] = requestParameters['repo']; - } + if (requestParameters["comment"] != null) { + queryParameters["comment"] = requestParameters["comment"]; + } - if (requestParameters['tag'] != null) { - queryParameters['tag'] = requestParameters['tag']; - } + if (requestParameters["author"] != null) { + queryParameters["author"] = requestParameters["author"]; + } - if (requestParameters['comment'] != null) { - queryParameters['comment'] = requestParameters['comment']; - } + if (requestParameters["pause"] != null) { + queryParameters["pause"] = requestParameters["pause"]; + } - if (requestParameters['author'] != null) { - queryParameters['author'] = requestParameters['author']; - } + if (requestParameters["changes"] != null) { + queryParameters["changes"] = requestParameters["changes"]; + } - if (requestParameters['pause'] != null) { - queryParameters['pause'] = requestParameters['pause']; - } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/commit`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ContainerConfigToJSON(requestParameters["containerConfig"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + } + + /** + * Create a new image from a container + */ + async imageCommit( + requestParameters: ImageCommitRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.imageCommitRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create an image by either pulling it from a registry or importing it. + * Create an image + */ + async imageCreateRaw( + requestParameters: ImageCreateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["fromImage"] != null) { + queryParameters["fromImage"] = requestParameters["fromImage"]; + } - if (requestParameters['changes'] != null) { - queryParameters['changes'] = requestParameters['changes']; - } + if (requestParameters["fromSrc"] != null) { + queryParameters["fromSrc"] = requestParameters["fromSrc"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["repo"] != null) { + queryParameters["repo"] = requestParameters["repo"]; + } - headerParameters['Content-Type'] = 'application/json'; + if (requestParameters["tag"] != null) { + queryParameters["tag"] = requestParameters["tag"]; + } - const response = await this.request({ - path: `/commit`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ContainerConfigToJSON(requestParameters['containerConfig']), - }, initOverrides); + if (requestParameters["message"] != null) { + queryParameters["message"] = requestParameters["message"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + if (requestParameters["changes"] != null) { + queryParameters["changes"] = requestParameters["changes"]!.join( + runtime.COLLECTION_FORMATS["csv"], + ); } - /** - * Create a new image from a container - */ - async imageCommit(requestParameters: ImageCommitRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.imageCommitRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["platform"] != null) { + queryParameters["platform"] = requestParameters["platform"]; } - /** - * Create an image by either pulling it from a registry or importing it. - * Create an image - */ - async imageCreateRaw(requestParameters: ImageCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['fromImage'] != null) { - queryParameters['fromImage'] = requestParameters['fromImage']; - } + headerParameters["Content-Type"] = "text/plain"; - if (requestParameters['fromSrc'] != null) { - queryParameters['fromSrc'] = requestParameters['fromSrc']; - } - - if (requestParameters['repo'] != null) { - queryParameters['repo'] = requestParameters['repo']; - } + if (requestParameters["X_Registry_Auth"] != null) { + headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); + } - if (requestParameters['tag'] != null) { - queryParameters['tag'] = requestParameters['tag']; - } + const response = await this.request( + { + path: `/images/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["inputImage"] as any, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Create an image by either pulling it from a registry or importing it. + * Create an image + */ + async imageCreate( + requestParameters: ImageCreateRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.imageCreateRaw(requestParameters, initOverrides); + } + + /** + * 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. + * Remove an image + */ + async imageDeleteRaw( + requestParameters: ImageDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling imageDelete().', + ); + } - if (requestParameters['message'] != null) { - queryParameters['message'] = requestParameters['message']; - } - - if (requestParameters['changes'] != null) { - queryParameters['changes'] = requestParameters['changes']!.join(runtime.COLLECTION_FORMATS["csv"]); - } + const queryParameters: any = {}; - if (requestParameters['platform'] != null) { - queryParameters['platform'] = requestParameters['platform']; - } + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; + } - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'text/plain'; + if (requestParameters["noprune"] != null) { + queryParameters["noprune"] = requestParameters["noprune"]; + } - if (requestParameters['X_Registry_Auth'] != null) { - headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); - } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(ImageDeleteResponseItemFromJSON), + ); + } + + /** + * 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. + * Remove an image + */ + async imageDelete( + requestParameters: ImageDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.imageDeleteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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\" } } ``` + * Export an image + */ + async imageGetRaw( + requestParameters: ImageGetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling imageGet().', + ); + } - const response = await this.request({ - path: `/images/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['inputImage'] as any, - }, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/{name}/get`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * 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\" } } ``` + * Export an image + */ + async imageGet( + requestParameters: ImageGetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.imageGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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). + * Export several images + */ + async imageGetAllRaw( + requestParameters: ImageGetAllRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["names"] != null) { + queryParameters["names"] = requestParameters["names"]!.join( + runtime.COLLECTION_FORMATS["csv"], + ); + } - return new runtime.VoidApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/get`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * 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). + * Export several images + */ + async imageGetAll( + requestParameters: ImageGetAllRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.imageGetAllRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return parent layers of an image. + * Get the history of an image + */ + async imageHistoryRaw( + requestParameters: ImageHistoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling imageHistory().', + ); } - /** - * Create an image by either pulling it from a registry or importing it. - * Create an image - */ - async imageCreate(requestParameters: ImageCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.imageCreateRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/{name}/history`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(HistoryResponseItemFromJSON), + ); + } + + /** + * Return parent layers of an image. + * Get the history of an image + */ + async imageHistory( + requestParameters: ImageHistoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.imageHistoryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Return low-level information about an image. + * Inspect an image + */ + async imageInspectRaw( + requestParameters: ImageInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling imageInspect().', + ); } - /** - * 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. - * Remove an image - */ - async imageDeleteRaw(requestParameters: ImageDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling imageDelete().' - ); - } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/{name}/json`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ImageInspectFromJSON(jsonValue)); + } + + /** + * Return low-level information about an image. + * Inspect an image + */ + async imageInspect( + requestParameters: ImageInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.imageInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. + * List Images + */ + async imageListRaw( + requestParameters: ImageListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["all"] != null) { + queryParameters["all"] = requestParameters["all"]; + } - const queryParameters: any = {}; + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; + } - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - if (requestParameters['noprune'] != null) { - queryParameters['noprune'] = requestParameters['noprune']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageDeleteResponseItemFromJSON)); - } - - /** - * 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. - * Remove an image - */ - async imageDelete(requestParameters: ImageDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.imageDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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\" } } ``` - * Export an image - */ - async imageGetRaw(requestParameters: ImageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling imageGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/{name}/get`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * 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\" } } ``` - * Export an image - */ - async imageGet(requestParameters: ImageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.imageGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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). - * Export several images - */ - async imageGetAllRaw(requestParameters: ImageGetAllRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['names'] != null) { - queryParameters['names'] = requestParameters['names']!.join(runtime.COLLECTION_FORMATS["csv"]); - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/get`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * 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). - * Export several images - */ - async imageGetAll(requestParameters: ImageGetAllRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.imageGetAllRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Return parent layers of an image. - * Get the history of an image - */ - async imageHistoryRaw(requestParameters: ImageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling imageHistory().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/{name}/history`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(HistoryResponseItemFromJSON)); - } - - /** - * Return parent layers of an image. - * Get the history of an image - */ - async imageHistory(requestParameters: ImageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.imageHistoryRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Return low-level information about an image. - * Inspect an image - */ - async imageInspectRaw(requestParameters: ImageInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling imageInspect().' - ); - } + if (requestParameters["shared_size"] != null) { + queryParameters["shared-size"] = requestParameters["shared_size"]; + } - const queryParameters: any = {}; + if (requestParameters["digests"] != null) { + queryParameters["digests"] = requestParameters["digests"]; + } - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/{name}/json`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/json`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(ImageSummaryFromJSON), + ); + } + + /** + * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. + * List Images + */ + async imageList( + requestParameters: ImageListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.imageListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). + * Import images + */ + async imageLoadRaw( + requestParameters: ImageLoadRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["quiet"] != null) { + queryParameters["quiet"] = requestParameters["quiet"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => ImageInspectFromJSON(jsonValue)); - } - - /** - * Return low-level information about an image. - * Inspect an image - */ - async imageInspect(requestParameters: ImageInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.imageInspectRaw(requestParameters, initOverrides); - return await response.value(); - } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/x-tar"; + + const response = await this.request( + { + path: `/images/load`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["imagesTarball"] as any, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). + * Import images + */ + async imageLoad( + requestParameters: ImageLoadRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.imageLoadRaw(requestParameters, initOverrides); + } + + /** + * Delete unused images + */ + async imagePruneRaw( + requestParameters: ImagePruneRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; + } - /** - * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. - * List Images - */ - async imageListRaw(requestParameters: ImageListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/prune`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ImagePruneResponseFromJSON(jsonValue), + ); + } + + /** + * Delete unused images + */ + async imagePrune( + requestParameters: ImagePruneRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.imagePruneRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Push an image + */ + async imagePushRaw( + requestParameters: ImagePushRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling imagePush().', + ); + } - if (requestParameters['all'] != null) { - queryParameters['all'] = requestParameters['all']; - } + if (requestParameters["X_Registry_Auth"] == null) { + throw new runtime.RequiredError( + "X_Registry_Auth", + 'Required parameter "X_Registry_Auth" was null or undefined when calling imagePush().', + ); + } - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - if (requestParameters['shared_size'] != null) { - queryParameters['shared-size'] = requestParameters['shared_size']; - } - - if (requestParameters['digests'] != null) { - queryParameters['digests'] = requestParameters['digests']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/json`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageSummaryFromJSON)); - } - - /** - * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. - * List Images - */ - async imageList(requestParameters: ImageListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.imageListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). - * Import images - */ - async imageLoadRaw(requestParameters: ImageLoadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['quiet'] != null) { - queryParameters['quiet'] = requestParameters['quiet']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/x-tar'; - - const response = await this.request({ - path: `/images/load`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['imagesTarball'] as any, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). - * Import images - */ - async imageLoad(requestParameters: ImageLoadRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.imageLoadRaw(requestParameters, initOverrides); + if (requestParameters["tag"] != null) { + queryParameters["tag"] = requestParameters["tag"]; } - /** - * Delete unused images - */ - async imagePruneRaw(requestParameters: ImagePruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/prune`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => ImagePruneResponseFromJSON(jsonValue)); - } - - /** - * Delete unused images - */ - async imagePrune(requestParameters: ImagePruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.imagePruneRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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. - * Push an image - */ - async imagePushRaw(requestParameters: ImagePushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling imagePush().' - ); - } - - if (requestParameters['X_Registry_Auth'] == null) { - throw new runtime.RequiredError( - 'X_Registry_Auth', - 'Required parameter "X_Registry_Auth" was null or undefined when calling imagePush().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['tag'] != null) { - queryParameters['tag'] = requestParameters['tag']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['X_Registry_Auth'] != null) { - headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); - } - - const response = await this.request({ - path: `/images/{name}/push`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["X_Registry_Auth"] != null) { + headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); } - /** - * 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. - * Push an image - */ - async imagePush(requestParameters: ImagePushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.imagePushRaw(requestParameters, initOverrides); + const response = await this.request( + { + path: `/images/{name}/push`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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. + * Push an image + */ + async imagePush( + requestParameters: ImagePushRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.imagePushRaw(requestParameters, initOverrides); + } + + /** + * Search for an image on Docker Hub. + * Search images + */ + async imageSearchRaw( + requestParameters: ImageSearchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["term"] == null) { + throw new runtime.RequiredError( + "term", + 'Required parameter "term" was null or undefined when calling imageSearch().', + ); } - /** - * Search for an image on Docker Hub. - * Search images - */ - async imageSearchRaw(requestParameters: ImageSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['term'] == null) { - throw new runtime.RequiredError( - 'term', - 'Required parameter "term" was null or undefined when calling imageSearch().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['term'] != null) { - queryParameters['term'] = requestParameters['term']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/images/search`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ImageSearchResponseItemFromJSON)); - } - - /** - * Search for an image on Docker Hub. - * Search images - */ - async imageSearch(requestParameters: ImageSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.imageSearchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Tag an image so that it becomes part of a repository. - * Tag an image - */ - async imageTagRaw(requestParameters: ImageTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling imageTag().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + if (requestParameters["term"] != null) { + queryParameters["term"] = requestParameters["term"]; + } - if (requestParameters['repo'] != null) { - queryParameters['repo'] = requestParameters['repo']; - } + if (requestParameters["limit"] != null) { + queryParameters["limit"] = requestParameters["limit"]; + } - if (requestParameters['tag'] != null) { - queryParameters['tag'] = requestParameters['tag']; - } + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/search`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(ImageSearchResponseItemFromJSON), + ); + } + + /** + * Search for an image on Docker Hub. + * Search images + */ + async imageSearch( + requestParameters: ImageSearchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.imageSearchRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Tag an image so that it becomes part of a repository. + * Tag an image + */ + async imageTagRaw( + requestParameters: ImageTagRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling imageTag().', + ); + } - const response = await this.request({ - path: `/images/{name}/tag`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.VoidApiResponse(response); + if (requestParameters["repo"] != null) { + queryParameters["repo"] = requestParameters["repo"]; } - /** - * Tag an image so that it becomes part of a repository. - * Tag an image - */ - async imageTag(requestParameters: ImageTagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.imageTagRaw(requestParameters, initOverrides); + if (requestParameters["tag"] != null) { + queryParameters["tag"] = requestParameters["tag"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/images/{name}/tag`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Tag an image so that it becomes part of a repository. + * Tag an image + */ + async imageTag( + requestParameters: ImageTagRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.imageTagRaw(requestParameters, initOverrides); + } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ImageBuildContentTypeEnum { - ApplicationXTar = 'application/x-tar' + ApplicationXTar = "application/x-tar", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ImageBuildVersionEnum { - _1 = '1', - _2 = '2' + _1 = "1", + _2 = "2", } diff --git a/src/clients/docker/apis/NetworkApi.ts b/src/clients/docker/apis/NetworkApi.ts index 4c3832f753..1de938d1e4 100644 --- a/src/clients/docker/apis/NetworkApi.ts +++ b/src/clients/docker/apis/NetworkApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, Network, @@ -22,314 +21,391 @@ import type { NetworkCreateResponse, NetworkDisconnectRequest, NetworkPruneResponse, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - NetworkFromJSON, - NetworkToJSON, - NetworkConnectRequestFromJSON, - NetworkConnectRequestToJSON, - NetworkCreateRequestFromJSON, - NetworkCreateRequestToJSON, - NetworkCreateResponseFromJSON, - NetworkCreateResponseToJSON, - NetworkDisconnectRequestFromJSON, - NetworkDisconnectRequestToJSON, - NetworkPruneResponseFromJSON, - NetworkPruneResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + NetworkFromJSON, + NetworkToJSON, + NetworkConnectRequestFromJSON, + NetworkConnectRequestToJSON, + NetworkCreateRequestFromJSON, + NetworkCreateRequestToJSON, + NetworkCreateResponseFromJSON, + NetworkCreateResponseToJSON, + NetworkDisconnectRequestFromJSON, + NetworkDisconnectRequestToJSON, + NetworkPruneResponseFromJSON, + NetworkPruneResponseToJSON, +} from "../models/index"; export interface NetworkConnectOperationRequest { - id: string; - container: NetworkConnectRequest; + id: string; + container: NetworkConnectRequest; } export interface NetworkCreateOperationRequest { - networkConfig: NetworkCreateRequest; + networkConfig: NetworkCreateRequest; } export interface NetworkDeleteRequest { - id: string; + id: string; } export interface NetworkDisconnectOperationRequest { - id: string; - container: NetworkDisconnectRequest; + id: string; + container: NetworkDisconnectRequest; } export interface NetworkInspectRequest { - id: string; - verbose?: boolean; - scope?: string; + id: string; + verbose?: boolean; + scope?: string; } export interface NetworkListRequest { - filters?: string; + filters?: string; } export interface NetworkPruneRequest { - filters?: string; + filters?: string; } /** - * + * */ export class NetworkApi extends runtime.BaseAPI { - - /** - * Connect a container to a network - */ - async networkConnectRaw(requestParameters: NetworkConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling networkConnect().' - ); - } - - if (requestParameters['container'] == null) { - throw new runtime.RequiredError( - 'container', - 'Required parameter "container" was null or undefined when calling networkConnect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/networks/{id}/connect`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworkConnectRequestToJSON(requestParameters['container']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Connect a container to a network - */ - async networkConnect(requestParameters: NetworkConnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networkConnectRaw(requestParameters, initOverrides); - } - - /** - * Create a network - */ - async networkCreateRaw(requestParameters: NetworkCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['networkConfig'] == null) { - throw new runtime.RequiredError( - 'networkConfig', - 'Required parameter "networkConfig" was null or undefined when calling networkCreate().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/networks/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworkCreateRequestToJSON(requestParameters['networkConfig']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NetworkCreateResponseFromJSON(jsonValue)); - } - - /** - * Create a network - */ - async networkCreate(requestParameters: NetworkCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.networkCreateRaw(requestParameters, initOverrides); - return await response.value(); + /** + * Connect a container to a network + */ + async networkConnectRaw( + requestParameters: NetworkConnectOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling networkConnect().', + ); } - /** - * Remove a network - */ - async networkDeleteRaw(requestParameters: NetworkDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling networkDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/networks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["container"] == null) { + throw new runtime.RequiredError( + "container", + 'Required parameter "container" was null or undefined when calling networkConnect().', + ); } - /** - * Remove a network - */ - async networkDelete(requestParameters: NetworkDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networkDeleteRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/networks/{id}/connect`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: NetworkConnectRequestToJSON(requestParameters["container"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Connect a container to a network + */ + async networkConnect( + requestParameters: NetworkConnectOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.networkConnectRaw(requestParameters, initOverrides); + } + + /** + * Create a network + */ + async networkCreateRaw( + requestParameters: NetworkCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["networkConfig"] == null) { + throw new runtime.RequiredError( + "networkConfig", + 'Required parameter "networkConfig" was null or undefined when calling networkCreate().', + ); } - /** - * Disconnect a container from a network - */ - async networkDisconnectRaw(requestParameters: NetworkDisconnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling networkDisconnect().' - ); - } - - if (requestParameters['container'] == null) { - throw new runtime.RequiredError( - 'container', - 'Required parameter "container" was null or undefined when calling networkDisconnect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/networks/{id}/disconnect`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NetworkDisconnectRequestToJSON(requestParameters['container']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/networks/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: NetworkCreateRequestToJSON(requestParameters["networkConfig"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + NetworkCreateResponseFromJSON(jsonValue), + ); + } + + /** + * Create a network + */ + async networkCreate( + requestParameters: NetworkCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.networkCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Remove a network + */ + async networkDeleteRaw( + requestParameters: NetworkDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling networkDelete().', + ); } - /** - * Disconnect a container from a network - */ - async networkDisconnect(requestParameters: NetworkDisconnectOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.networkDisconnectRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/networks/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Remove a network + */ + async networkDelete( + requestParameters: NetworkDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.networkDeleteRaw(requestParameters, initOverrides); + } + + /** + * Disconnect a container from a network + */ + async networkDisconnectRaw( + requestParameters: NetworkDisconnectOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling networkDisconnect().', + ); } - /** - * Inspect a network - */ - async networkInspectRaw(requestParameters: NetworkInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling networkInspect().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['verbose'] != null) { - queryParameters['verbose'] = requestParameters['verbose']; - } - - if (requestParameters['scope'] != null) { - queryParameters['scope'] = requestParameters['scope']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/networks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NetworkFromJSON(jsonValue)); + if (requestParameters["container"] == null) { + throw new runtime.RequiredError( + "container", + 'Required parameter "container" was null or undefined when calling networkDisconnect().', + ); } - /** - * Inspect a network - */ - async networkInspect(requestParameters: NetworkInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.networkInspectRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/networks/{id}/disconnect`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: NetworkDisconnectRequestToJSON(requestParameters["container"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Disconnect a container from a network + */ + async networkDisconnect( + requestParameters: NetworkDisconnectOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.networkDisconnectRaw(requestParameters, initOverrides); + } + + /** + * Inspect a network + */ + async networkInspectRaw( + requestParameters: NetworkInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling networkInspect().', + ); } - /** - * 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. - * List networks - */ - async networkListRaw(requestParameters: NetworkListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - const response = await this.request({ - path: `/networks`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworkFromJSON)); + if (requestParameters["verbose"] != null) { + queryParameters["verbose"] = requestParameters["verbose"]; } - /** - * 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. - * List networks - */ - async networkList(requestParameters: NetworkListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.networkListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["scope"] != null) { + queryParameters["scope"] = requestParameters["scope"]; } - /** - * Delete unused networks - */ - async networkPruneRaw(requestParameters: NetworkPruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/networks/prune`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NetworkPruneResponseFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/networks/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => NetworkFromJSON(jsonValue)); + } + + /** + * Inspect a network + */ + async networkInspect( + requestParameters: NetworkInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.networkInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * List networks + */ + async networkListRaw( + requestParameters: NetworkListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Delete unused networks - */ - async networkPrune(requestParameters: NetworkPruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.networkPruneRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/networks`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NetworkFromJSON)); + } + + /** + * 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. + * List networks + */ + async networkList( + requestParameters: NetworkListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.networkListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete unused networks + */ + async networkPruneRaw( + requestParameters: NetworkPruneRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/networks/prune`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + NetworkPruneResponseFromJSON(jsonValue), + ); + } + + /** + * Delete unused networks + */ + async networkPrune( + requestParameters: NetworkPruneRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.networkPruneRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/docker/apis/NodeApi.ts b/src/clients/docker/apis/NodeApi.ts index 6e39ded86f..fb7a3e5c97 100644 --- a/src/clients/docker/apis/NodeApi.ts +++ b/src/clients/docker/apis/NodeApi.ts @@ -2,199 +2,237 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - Node, - NodeSpec, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, Node, NodeSpec } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - NodeFromJSON, - NodeToJSON, - NodeSpecFromJSON, - NodeSpecToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + NodeFromJSON, + NodeToJSON, + NodeSpecFromJSON, + NodeSpecToJSON, +} from "../models/index"; export interface NodeDeleteRequest { - id: string; - force?: boolean; + id: string; + force?: boolean; } export interface NodeInspectRequest { - id: string; + id: string; } export interface NodeListRequest { - filters?: string; + filters?: string; } export interface NodeUpdateRequest { - id: string; - version: number; - body?: NodeSpec; + id: string; + version: number; + body?: NodeSpec; } /** - * + * */ export class NodeApi extends runtime.BaseAPI { - - /** - * Delete a node - */ - async nodeDeleteRaw(requestParameters: NodeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling nodeDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/nodes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + /** + * Delete a node + */ + async nodeDeleteRaw( + requestParameters: NodeDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling nodeDelete().', + ); } - /** - * Delete a node - */ - async nodeDelete(requestParameters: NodeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.nodeDeleteRaw(requestParameters, initOverrides); - } + const queryParameters: any = {}; - /** - * Inspect a node - */ - async nodeInspectRaw(requestParameters: NodeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling nodeInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/nodes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => NodeFromJSON(jsonValue)); + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } - /** - * Inspect a node - */ - async nodeInspect(requestParameters: NodeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.nodeInspectRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/nodes/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a node + */ + async nodeDelete( + requestParameters: NodeDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.nodeDeleteRaw(requestParameters, initOverrides); + } + + /** + * Inspect a node + */ + async nodeInspectRaw( + requestParameters: NodeInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling nodeInspect().', + ); } - /** - * List nodes - */ - async nodeListRaw(requestParameters: NodeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/nodes`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NodeFromJSON)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/nodes/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => NodeFromJSON(jsonValue)); + } + + /** + * Inspect a node + */ + async nodeInspect( + requestParameters: NodeInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.nodeInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List nodes + */ + async nodeListRaw( + requestParameters: NodeListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * List nodes - */ - async nodeList(requestParameters: NodeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.nodeListRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/nodes`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(NodeFromJSON)); + } + + /** + * List nodes + */ + async nodeList( + requestParameters: NodeListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.nodeListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a node + */ + async nodeUpdateRaw( + requestParameters: NodeUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling nodeUpdate().', + ); } - /** - * Update a node - */ - async nodeUpdateRaw(requestParameters: NodeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling nodeUpdate().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling nodeUpdate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/nodes/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NodeSpecToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling nodeUpdate().', + ); } - /** - * Update a node - */ - async nodeUpdate(requestParameters: NodeUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.nodeUpdateRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/nodes/{id}/update`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: NodeSpecToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update a node + */ + async nodeUpdate( + requestParameters: NodeUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.nodeUpdateRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/PluginApi.ts b/src/clients/docker/apis/PluginApi.ts index a102a77865..d065678092 100644 --- a/src/clients/docker/apis/PluginApi.ts +++ b/src/clients/docker/apis/PluginApi.ts @@ -2,508 +2,623 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - Plugin, - PluginPrivilege, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, Plugin, PluginPrivilege } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - PluginFromJSON, - PluginToJSON, - PluginPrivilegeFromJSON, - PluginPrivilegeToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + PluginFromJSON, + PluginToJSON, + PluginPrivilegeFromJSON, + PluginPrivilegeToJSON, +} from "../models/index"; export interface GetPluginPrivilegesRequest { - remote: string; + remote: string; } export interface PluginCreateRequest { - name: string; - tarContext?: Blob; + name: string; + tarContext?: Blob; } export interface PluginDeleteRequest { - name: string; - force?: boolean; + name: string; + force?: boolean; } export interface PluginDisableRequest { - name: string; - force?: boolean; + name: string; + force?: boolean; } export interface PluginEnableRequest { - name: string; - timeout?: number; + name: string; + timeout?: number; } export interface PluginInspectRequest { - name: string; + name: string; } export interface PluginListRequest { - filters?: string; + filters?: string; } export interface PluginPullRequest { - remote: string; - name?: string; - X_Registry_Auth?: string; - body?: Array; + remote: string; + name?: string; + X_Registry_Auth?: string; + body?: Array; } export interface PluginPushRequest { - name: string; + name: string; } export interface PluginSetRequest { - name: string; - body?: Array; + name: string; + body?: Array; } export interface PluginUpgradeRequest { - name: string; - remote: string; - X_Registry_Auth?: string; - body?: Array; + name: string; + remote: string; + X_Registry_Auth?: string; + body?: Array; } /** - * + * */ export class PluginApi extends runtime.BaseAPI { - - /** - * Get plugin privileges - */ - async getPluginPrivilegesRaw(requestParameters: GetPluginPrivilegesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['remote'] == null) { - throw new runtime.RequiredError( - 'remote', - 'Required parameter "remote" was null or undefined when calling getPluginPrivileges().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['remote'] != null) { - queryParameters['remote'] = requestParameters['remote']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/plugins/privileges`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PluginPrivilegeFromJSON)); + /** + * Get plugin privileges + */ + async getPluginPrivilegesRaw( + requestParameters: GetPluginPrivilegesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["remote"] == null) { + throw new runtime.RequiredError( + "remote", + 'Required parameter "remote" was null or undefined when calling getPluginPrivileges().', + ); } - /** - * Get plugin privileges - */ - async getPluginPrivileges(requestParameters: GetPluginPrivilegesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getPluginPrivilegesRaw(requestParameters, initOverrides); - return await response.value(); - } + const queryParameters: any = {}; - /** - * Create a plugin - */ - async pluginCreateRaw(requestParameters: PluginCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginCreate().' - ); - } + if (requestParameters["remote"] != null) { + queryParameters["remote"] = requestParameters["remote"]; + } - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins/privileges`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(PluginPrivilegeFromJSON), + ); + } + + /** + * Get plugin privileges + */ + async getPluginPrivileges( + requestParameters: GetPluginPrivilegesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getPluginPrivilegesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create a plugin + */ + async pluginCreateRaw( + requestParameters: PluginCreateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginCreate().', + ); + } - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["name"] != null) { + queryParameters["name"] = requestParameters["name"]; + } - headerParameters['Content-Type'] = 'application/x-tar'; + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/x-tar"; + + const response = await this.request( + { + path: `/plugins/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["tarContext"] as any, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Create a plugin + */ + async pluginCreate( + requestParameters: PluginCreateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginCreateRaw(requestParameters, initOverrides); + } + + /** + * Remove a plugin + */ + async pluginDeleteRaw( + requestParameters: PluginDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginDelete().', + ); + } - const response = await this.request({ - path: `/plugins/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['tarContext'] as any, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.VoidApiResponse(response); + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } - /** - * Create a plugin - */ - async pluginCreate(requestParameters: PluginCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginCreateRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); + } + + /** + * Remove a plugin + */ + async pluginDelete( + requestParameters: PluginDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.pluginDeleteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Disable a plugin + */ + async pluginDisableRaw( + requestParameters: PluginDisableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginDisable().', + ); } - /** - * Remove a plugin - */ - async pluginDeleteRaw(requestParameters: PluginDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/plugins/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); - } + const queryParameters: any = {}; - /** - * Remove a plugin - */ - async pluginDelete(requestParameters: PluginDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.pluginDeleteRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } - /** - * Disable a plugin - */ - async pluginDisableRaw(requestParameters: PluginDisableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginDisable().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/plugins/{name}/disable`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins/{name}/disable`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Disable a plugin + */ + async pluginDisable( + requestParameters: PluginDisableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginDisableRaw(requestParameters, initOverrides); + } + + /** + * Enable a plugin + */ + async pluginEnableRaw( + requestParameters: PluginEnableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginEnable().', + ); } - /** - * Disable a plugin - */ - async pluginDisable(requestParameters: PluginDisableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginDisableRaw(requestParameters, initOverrides); - } + const queryParameters: any = {}; - /** - * Enable a plugin - */ - async pluginEnableRaw(requestParameters: PluginEnableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginEnable().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['timeout'] != null) { - queryParameters['timeout'] = requestParameters['timeout']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/plugins/{name}/enable`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["timeout"] != null) { + queryParameters["timeout"] = requestParameters["timeout"]; } - /** - * Enable a plugin - */ - async pluginEnable(requestParameters: PluginEnableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginEnableRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins/{name}/enable`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Enable a plugin + */ + async pluginEnable( + requestParameters: PluginEnableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginEnableRaw(requestParameters, initOverrides); + } + + /** + * Inspect a plugin + */ + async pluginInspectRaw( + requestParameters: PluginInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginInspect().', + ); } - /** - * Inspect a plugin - */ - async pluginInspectRaw(requestParameters: PluginInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/plugins/{name}/json`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins/{name}/json`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => PluginFromJSON(jsonValue)); + } + + /** + * Inspect a plugin + */ + async pluginInspect( + requestParameters: PluginInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.pluginInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns information about installed plugins. + * List plugins + */ + async pluginListRaw( + requestParameters: PluginListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Inspect a plugin - */ - async pluginInspect(requestParameters: PluginInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.pluginInspectRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PluginFromJSON)); + } + + /** + * Returns information about installed plugins. + * List plugins + */ + async pluginList( + requestParameters: PluginListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.pluginListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + * Install a plugin + */ + async pluginPullRaw( + requestParameters: PluginPullRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["remote"] == null) { + throw new runtime.RequiredError( + "remote", + 'Required parameter "remote" was null or undefined when calling pluginPull().', + ); } - /** - * Returns information about installed plugins. - * List plugins - */ - async pluginListRaw(requestParameters: PluginListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } + if (requestParameters["remote"] != null) { + queryParameters["remote"] = requestParameters["remote"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["name"] != null) { + queryParameters["name"] = requestParameters["name"]; + } - const response = await this.request({ - path: `/plugins`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PluginFromJSON)); - } + headerParameters["Content-Type"] = "application/json"; - /** - * Returns information about installed plugins. - * List plugins - */ - async pluginList(requestParameters: PluginListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.pluginListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["X_Registry_Auth"] != null) { + headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); } - /** - * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). - * Install a plugin - */ - async pluginPullRaw(requestParameters: PluginPullRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['remote'] == null) { - throw new runtime.RequiredError( - 'remote', - 'Required parameter "remote" was null or undefined when calling pluginPull().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['remote'] != null) { - queryParameters['remote'] = requestParameters['remote']; - } - - if (requestParameters['name'] != null) { - queryParameters['name'] = requestParameters['name']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['X_Registry_Auth'] != null) { - headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); - } - - const response = await this.request({ - path: `/plugins/pull`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body']!.map(PluginPrivilegeToJSON), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const response = await this.request( + { + path: `/plugins/pull`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["body"]!.map(PluginPrivilegeToJSON), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + * Install a plugin + */ + async pluginPull( + requestParameters: PluginPullRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginPullRaw(requestParameters, initOverrides); + } + + /** + * Push a plugin to the registry. + * Push a plugin + */ + async pluginPushRaw( + requestParameters: PluginPushRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginPush().', + ); } - /** - * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). - * Install a plugin - */ - async pluginPull(requestParameters: PluginPullRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginPullRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/plugins/{name}/push`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Push a plugin to the registry. + * Push a plugin + */ + async pluginPush( + requestParameters: PluginPushRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginPushRaw(requestParameters, initOverrides); + } + + /** + * Configure a plugin + */ + async pluginSetRaw( + requestParameters: PluginSetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginSet().', + ); } - /** - * Push a plugin to the registry. - * Push a plugin - */ - async pluginPushRaw(requestParameters: PluginPushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginPush().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/plugins/{name}/push`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/plugins/{name}/set`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["body"], + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Configure a plugin + */ + async pluginSet( + requestParameters: PluginSetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginSetRaw(requestParameters, initOverrides); + } + + /** + * Upgrade a plugin + */ + async pluginUpgradeRaw( + requestParameters: PluginUpgradeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pluginUpgrade().', + ); } - /** - * Push a plugin to the registry. - * Push a plugin - */ - async pluginPush(requestParameters: PluginPushRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginPushRaw(requestParameters, initOverrides); + if (requestParameters["remote"] == null) { + throw new runtime.RequiredError( + "remote", + 'Required parameter "remote" was null or undefined when calling pluginUpgrade().', + ); } - /** - * Configure a plugin - */ - async pluginSetRaw(requestParameters: PluginSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginSet().' - ); - } - - const queryParameters: any = {}; + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/plugins/{name}/set`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body'], - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["remote"] != null) { + queryParameters["remote"] = requestParameters["remote"]; } - /** - * Configure a plugin - */ - async pluginSet(requestParameters: PluginSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginSetRaw(requestParameters, initOverrides); - } + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Upgrade a plugin - */ - async pluginUpgradeRaw(requestParameters: PluginUpgradeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pluginUpgrade().' - ); - } - - if (requestParameters['remote'] == null) { - throw new runtime.RequiredError( - 'remote', - 'Required parameter "remote" was null or undefined when calling pluginUpgrade().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['remote'] != null) { - queryParameters['remote'] = requestParameters['remote']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['X_Registry_Auth'] != null) { - headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); - } - - const response = await this.request({ - path: `/plugins/{name}/upgrade`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body']!.map(PluginPrivilegeToJSON), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } + headerParameters["Content-Type"] = "application/json"; - /** - * Upgrade a plugin - */ - async pluginUpgrade(requestParameters: PluginUpgradeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.pluginUpgradeRaw(requestParameters, initOverrides); + if (requestParameters["X_Registry_Auth"] != null) { + headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); } + const response = await this.request( + { + path: `/plugins/{name}/upgrade`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["body"]!.map(PluginPrivilegeToJSON), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Upgrade a plugin + */ + async pluginUpgrade( + requestParameters: PluginUpgradeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.pluginUpgradeRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/SecretApi.ts b/src/clients/docker/apis/SecretApi.ts index 077a1e5d64..d9c4bf8a11 100644 --- a/src/clients/docker/apis/SecretApi.ts +++ b/src/clients/docker/apis/SecretApi.ts @@ -2,233 +2,284 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, IdResponse, Secret, SecretCreateRequest, SecretSpec, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IdResponseFromJSON, - IdResponseToJSON, - SecretFromJSON, - SecretToJSON, - SecretCreateRequestFromJSON, - SecretCreateRequestToJSON, - SecretSpecFromJSON, - SecretSpecToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IdResponseFromJSON, + IdResponseToJSON, + SecretFromJSON, + SecretToJSON, + SecretCreateRequestFromJSON, + SecretCreateRequestToJSON, + SecretSpecFromJSON, + SecretSpecToJSON, +} from "../models/index"; export interface SecretCreateOperationRequest { - body?: SecretCreateRequest; + body?: SecretCreateRequest; } export interface SecretDeleteRequest { - id: string; + id: string; } export interface SecretInspectRequest { - id: string; + id: string; } export interface SecretListRequest { - filters?: string; + filters?: string; } export interface SecretUpdateRequest { - id: string; - version: number; - body?: SecretSpec; + id: string; + version: number; + body?: SecretSpec; } /** - * + * */ export class SecretApi extends runtime.BaseAPI { - - /** - * Create a secret - */ - async secretCreateRaw(requestParameters: SecretCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/secrets/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SecretCreateRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); - } - - /** - * Create a secret - */ - async secretCreate(requestParameters: SecretCreateOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.secretCreateRaw(requestParameters, initOverrides); - return await response.value(); + /** + * Create a secret + */ + async secretCreateRaw( + requestParameters: SecretCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/secrets/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SecretCreateRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => IdResponseFromJSON(jsonValue)); + } + + /** + * Create a secret + */ + async secretCreate( + requestParameters: SecretCreateOperationRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.secretCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a secret + */ + async secretDeleteRaw( + requestParameters: SecretDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling secretDelete().', + ); } - /** - * Delete a secret - */ - async secretDeleteRaw(requestParameters: SecretDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling secretDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/secrets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/secrets/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a secret + */ + async secretDelete( + requestParameters: SecretDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.secretDeleteRaw(requestParameters, initOverrides); + } + + /** + * Inspect a secret + */ + async secretInspectRaw( + requestParameters: SecretInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling secretInspect().', + ); } - /** - * Delete a secret - */ - async secretDelete(requestParameters: SecretDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.secretDeleteRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/secrets/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue)); + } + + /** + * Inspect a secret + */ + async secretInspect( + requestParameters: SecretInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.secretInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List secrets + */ + async secretListRaw( + requestParameters: SecretListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Inspect a secret - */ - async secretInspectRaw(requestParameters: SecretInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling secretInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/secrets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SecretFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/secrets`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SecretFromJSON)); + } + + /** + * List secrets + */ + async secretList( + requestParameters: SecretListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.secretListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a Secret + */ + async secretUpdateRaw( + requestParameters: SecretUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling secretUpdate().', + ); } - /** - * Inspect a secret - */ - async secretInspect(requestParameters: SecretInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.secretInspectRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling secretUpdate().', + ); } - /** - * List secrets - */ - async secretListRaw(requestParameters: SecretListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/secrets`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SecretFromJSON)); - } - - /** - * List secrets - */ - async secretList(requestParameters: SecretListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.secretListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Update a Secret - */ - async secretUpdateRaw(requestParameters: SecretUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling secretUpdate().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling secretUpdate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/secrets/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SecretSpecToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } + const queryParameters: any = {}; - /** - * Update a Secret - */ - async secretUpdate(requestParameters: SecretUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.secretUpdateRaw(requestParameters, initOverrides); + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/secrets/{id}/update`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SecretSpecToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update a Secret + */ + async secretUpdate( + requestParameters: SecretUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.secretUpdateRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/ServiceApi.ts b/src/clients/docker/apis/ServiceApi.ts index fe824530a8..bc81187e2b 100644 --- a/src/clients/docker/apis/ServiceApi.ts +++ b/src/clients/docker/apis/ServiceApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, Service, @@ -21,345 +20,413 @@ import type { ServiceCreateResponse, ServiceUpdateRequest, ServiceUpdateResponse, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - ServiceFromJSON, - ServiceToJSON, - ServiceCreateRequestFromJSON, - ServiceCreateRequestToJSON, - ServiceCreateResponseFromJSON, - ServiceCreateResponseToJSON, - ServiceUpdateRequestFromJSON, - ServiceUpdateRequestToJSON, - ServiceUpdateResponseFromJSON, - ServiceUpdateResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + ServiceFromJSON, + ServiceToJSON, + ServiceCreateRequestFromJSON, + ServiceCreateRequestToJSON, + ServiceCreateResponseFromJSON, + ServiceCreateResponseToJSON, + ServiceUpdateRequestFromJSON, + ServiceUpdateRequestToJSON, + ServiceUpdateResponseFromJSON, + ServiceUpdateResponseToJSON, +} from "../models/index"; export interface ServiceCreateOperationRequest { - body: ServiceCreateRequest; - X_Registry_Auth?: string; + body: ServiceCreateRequest; + X_Registry_Auth?: string; } export interface ServiceDeleteRequest { - id: string; + id: string; } export interface ServiceInspectRequest { - id: string; - insertDefaults?: boolean; + id: string; + insertDefaults?: boolean; } export interface ServiceListRequest { - filters?: string; - status?: boolean; + filters?: string; + status?: boolean; } export interface ServiceLogsRequest { - id: string; - details?: boolean; - follow?: boolean; - stdout?: boolean; - stderr?: boolean; - since?: number; - timestamps?: boolean; - tail?: string; + id: string; + details?: boolean; + follow?: boolean; + stdout?: boolean; + stderr?: boolean; + since?: number; + timestamps?: boolean; + tail?: string; } export interface ServiceUpdateOperationRequest { - id: string; - version: number; - body: ServiceUpdateRequest; - registryAuthFrom?: ServiceUpdateRegistryAuthFromEnum; - rollback?: string; - X_Registry_Auth?: string; + id: string; + version: number; + body: ServiceUpdateRequest; + registryAuthFrom?: ServiceUpdateRegistryAuthFromEnum; + rollback?: string; + X_Registry_Auth?: string; } /** - * + * */ export class ServiceApi extends runtime.BaseAPI { + /** + * Create a service + */ + async serviceCreateRaw( + requestParameters: ServiceCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling serviceCreate().', + ); + } + + const queryParameters: any = {}; - /** - * Create a service - */ - async serviceCreateRaw(requestParameters: ServiceCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling serviceCreate().' - ); - } + const headerParameters: runtime.HTTPHeaders = {}; - const queryParameters: any = {}; + headerParameters["Content-Type"] = "application/json"; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["X_Registry_Auth"] != null) { + headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); + } - headerParameters['Content-Type'] = 'application/json'; + const response = await this.request( + { + path: `/services/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ServiceCreateRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ServiceCreateResponseFromJSON(jsonValue), + ); + } + + /** + * Create a service + */ + async serviceCreate( + requestParameters: ServiceCreateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.serviceCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a service + */ + async serviceDeleteRaw( + requestParameters: ServiceDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling serviceDelete().', + ); + } - if (requestParameters['X_Registry_Auth'] != null) { - headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); - } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/services/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a service + */ + async serviceDelete( + requestParameters: ServiceDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.serviceDeleteRaw(requestParameters, initOverrides); + } + + /** + * Inspect a service + */ + async serviceInspectRaw( + requestParameters: ServiceInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling serviceInspect().', + ); + } - const response = await this.request({ - path: `/services/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceCreateRequestToJSON(requestParameters['body']), - }, initOverrides); + const queryParameters: any = {}; + + if (requestParameters["insertDefaults"] != null) { + queryParameters["insertDefaults"] = requestParameters["insertDefaults"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => ServiceCreateResponseFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/services/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ServiceFromJSON(jsonValue)); + } + + /** + * Inspect a service + */ + async serviceInspect( + requestParameters: ServiceInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.serviceInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List services + */ + async serviceListRaw( + requestParameters: ServiceListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Create a service - */ - async serviceCreate(requestParameters: ServiceCreateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.serviceCreateRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["status"] != null) { + queryParameters["status"] = requestParameters["status"]; } - /** - * Delete a service - */ - async serviceDeleteRaw(requestParameters: ServiceDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling serviceDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/services/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/services`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFromJSON)); + } + + /** + * List services + */ + async serviceList( + requestParameters: ServiceListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.serviceListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Get service logs + */ + async serviceLogsRaw( + requestParameters: ServiceLogsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling serviceLogs().', + ); } - /** - * Delete a service - */ - async serviceDelete(requestParameters: ServiceDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.serviceDeleteRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + if (requestParameters["details"] != null) { + queryParameters["details"] = requestParameters["details"]; } - /** - * Inspect a service - */ - async serviceInspectRaw(requestParameters: ServiceInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling serviceInspect().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['insertDefaults'] != null) { - queryParameters['insertDefaults'] = requestParameters['insertDefaults']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/services/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ServiceFromJSON(jsonValue)); + if (requestParameters["follow"] != null) { + queryParameters["follow"] = requestParameters["follow"]; } - /** - * Inspect a service - */ - async serviceInspect(requestParameters: ServiceInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.serviceInspectRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["stdout"] != null) { + queryParameters["stdout"] = requestParameters["stdout"]; } - /** - * List services - */ - async serviceListRaw(requestParameters: ServiceListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; + if (requestParameters["stderr"] != null) { + queryParameters["stderr"] = requestParameters["stderr"]; + } - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } + if (requestParameters["since"] != null) { + queryParameters["since"] = requestParameters["since"]; + } - if (requestParameters['status'] != null) { - queryParameters['status'] = requestParameters['status']; - } + if (requestParameters["timestamps"] != null) { + queryParameters["timestamps"] = requestParameters["timestamps"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["tail"] != null) { + queryParameters["tail"] = requestParameters["tail"]; + } - const response = await this.request({ - path: `/services`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/services/{id}/logs`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * 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. + * Get service logs + */ + async serviceLogs( + requestParameters: ServiceLogsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.serviceLogsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a service + */ + async serviceUpdateRaw( + requestParameters: ServiceUpdateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling serviceUpdate().', + ); + } - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ServiceFromJSON)); + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling serviceUpdate().', + ); } - /** - * List services - */ - async serviceList(requestParameters: ServiceListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.serviceListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling serviceUpdate().', + ); } - /** - * 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. - * Get service logs - */ - async serviceLogsRaw(requestParameters: ServiceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling serviceLogs().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['details'] != null) { - queryParameters['details'] = requestParameters['details']; - } - - if (requestParameters['follow'] != null) { - queryParameters['follow'] = requestParameters['follow']; - } - - if (requestParameters['stdout'] != null) { - queryParameters['stdout'] = requestParameters['stdout']; - } - - if (requestParameters['stderr'] != null) { - queryParameters['stderr'] = requestParameters['stderr']; - } - - if (requestParameters['since'] != null) { - queryParameters['since'] = requestParameters['since']; - } - - if (requestParameters['timestamps'] != null) { - queryParameters['timestamps'] = requestParameters['timestamps']; - } - - if (requestParameters['tail'] != null) { - queryParameters['tail'] = requestParameters['tail']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/services/{id}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); + const queryParameters: any = {}; + + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; } - /** - * 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. - * Get service logs - */ - async serviceLogs(requestParameters: ServiceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.serviceLogsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["registryAuthFrom"] != null) { + queryParameters["registryAuthFrom"] = requestParameters["registryAuthFrom"]; } - /** - * Update a service - */ - async serviceUpdateRaw(requestParameters: ServiceUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling serviceUpdate().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling serviceUpdate().' - ); - } - - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling serviceUpdate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } - - if (requestParameters['registryAuthFrom'] != null) { - queryParameters['registryAuthFrom'] = requestParameters['registryAuthFrom']; - } - - if (requestParameters['rollback'] != null) { - queryParameters['rollback'] = requestParameters['rollback']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['X_Registry_Auth'] != null) { - headerParameters['X-Registry-Auth'] = String(requestParameters['X_Registry_Auth']); - } - - const response = await this.request({ - path: `/services/{id}/update`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ServiceUpdateRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ServiceUpdateResponseFromJSON(jsonValue)); + if (requestParameters["rollback"] != null) { + queryParameters["rollback"] = requestParameters["rollback"]; } - /** - * Update a service - */ - async serviceUpdate(requestParameters: ServiceUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.serviceUpdateRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (requestParameters["X_Registry_Auth"] != null) { + headerParameters["X-Registry-Auth"] = String(requestParameters["X_Registry_Auth"]); } + const response = await this.request( + { + path: `/services/{id}/update`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ServiceUpdateRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ServiceUpdateResponseFromJSON(jsonValue), + ); + } + + /** + * Update a service + */ + async serviceUpdate( + requestParameters: ServiceUpdateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.serviceUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum ServiceUpdateOperationRegistryAuthFromEnum { - Spec = 'spec', - PreviousSpec = 'previous-spec' + Spec = "spec", + PreviousSpec = "previous-spec", } diff --git a/src/clients/docker/apis/SessionApi.ts b/src/clients/docker/apis/SessionApi.ts index 37e3ee94ec..29dec14551 100644 --- a/src/clients/docker/apis/SessionApi.ts +++ b/src/clients/docker/apis/SessionApi.ts @@ -2,56 +2,53 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, -} from '../models/index'; -import { - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse } from "../models/index"; +import { ErrorResponseFromJSON, ErrorResponseToJSON } from "../models/index"; /** - * + * */ export class SessionApi extends runtime.BaseAPI { - - /** - * 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 ``` - * Initialize interactive session - */ - async sessionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/session`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * 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 ``` - * Initialize interactive session - */ - async session(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.sessionRaw(initOverrides); - } - + /** + * 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 ``` + * Initialize interactive session + */ + async sessionRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/session`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * 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 ``` + * Initialize interactive session + */ + async session(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.sessionRaw(initOverrides); + } } diff --git a/src/clients/docker/apis/SwarmApi.ts b/src/clients/docker/apis/SwarmApi.ts index 75edfa663a..602384bed1 100644 --- a/src/clients/docker/apis/SwarmApi.ts +++ b/src/clients/docker/apis/SwarmApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, Swarm, @@ -22,300 +21,357 @@ import type { SwarmSpec, SwarmUnlockRequest, UnlockKeyResponse, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - SwarmFromJSON, - SwarmToJSON, - SwarmInitRequestFromJSON, - SwarmInitRequestToJSON, - SwarmJoinRequestFromJSON, - SwarmJoinRequestToJSON, - SwarmSpecFromJSON, - SwarmSpecToJSON, - SwarmUnlockRequestFromJSON, - SwarmUnlockRequestToJSON, - UnlockKeyResponseFromJSON, - UnlockKeyResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + SwarmFromJSON, + SwarmToJSON, + SwarmInitRequestFromJSON, + SwarmInitRequestToJSON, + SwarmJoinRequestFromJSON, + SwarmJoinRequestToJSON, + SwarmSpecFromJSON, + SwarmSpecToJSON, + SwarmUnlockRequestFromJSON, + SwarmUnlockRequestToJSON, + UnlockKeyResponseFromJSON, + UnlockKeyResponseToJSON, +} from "../models/index"; export interface SwarmInitOperationRequest { - body: SwarmInitRequest; + body: SwarmInitRequest; } export interface SwarmJoinOperationRequest { - body: SwarmJoinRequest; + body: SwarmJoinRequest; } export interface SwarmLeaveRequest { - force?: boolean; + force?: boolean; } export interface SwarmUnlockOperationRequest { - body: SwarmUnlockRequest; + body: SwarmUnlockRequest; } export interface SwarmUpdateRequest { - version: number; - body: SwarmSpec; - rotateWorkerToken?: boolean; - rotateManagerToken?: boolean; - rotateManagerUnlockKey?: boolean; + version: number; + body: SwarmSpec; + rotateWorkerToken?: boolean; + rotateManagerToken?: boolean; + rotateManagerUnlockKey?: boolean; } /** - * + * */ export class SwarmApi extends runtime.BaseAPI { - - /** - * Initialize a new swarm - */ - async swarmInitRaw(requestParameters: SwarmInitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling swarmInit().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/swarm/init`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SwarmInitRequestToJSON(requestParameters['body']), - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Initialize a new swarm - */ - async swarmInit(requestParameters: SwarmInitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.swarmInitRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Inspect swarm - */ - async swarmInspectRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/swarm`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SwarmFromJSON(jsonValue)); - } - - /** - * Inspect swarm - */ - async swarmInspect(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.swarmInspectRaw(initOverrides); - return await response.value(); + /** + * Initialize a new swarm + */ + async swarmInitRaw( + requestParameters: SwarmInitOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling swarmInit().', + ); } - /** - * Join an existing swarm - */ - async swarmJoinRaw(requestParameters: SwarmJoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling swarmJoin().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters["Content-Type"] = "application/json"; - headerParameters['Content-Type'] = 'application/json'; + const response = await this.request( + { + path: `/swarm/init`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SwarmInitRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); - const response = await this.request({ - path: `/swarm/join`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SwarmJoinRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; } - - /** - * Join an existing swarm - */ - async swarmJoin(requestParameters: SwarmJoinOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.swarmJoinRaw(requestParameters, initOverrides); + } + + /** + * Initialize a new swarm + */ + async swarmInit( + requestParameters: SwarmInitOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.swarmInitRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Inspect swarm + */ + async swarmInspectRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/swarm`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SwarmFromJSON(jsonValue)); + } + + /** + * Inspect swarm + */ + async swarmInspect(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.swarmInspectRaw(initOverrides); + return await response.value(); + } + + /** + * Join an existing swarm + */ + async swarmJoinRaw( + requestParameters: SwarmJoinOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling swarmJoin().', + ); } - /** - * Leave a swarm - */ - async swarmLeaveRaw(requestParameters: SwarmLeaveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/swarm/leave`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/swarm/join`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SwarmJoinRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Join an existing swarm + */ + async swarmJoin( + requestParameters: SwarmJoinOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.swarmJoinRaw(requestParameters, initOverrides); + } + + /** + * Leave a swarm + */ + async swarmLeaveRaw( + requestParameters: SwarmLeaveRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } - /** - * Leave a swarm - */ - async swarmLeave(requestParameters: SwarmLeaveRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.swarmLeaveRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/swarm/leave`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Leave a swarm + */ + async swarmLeave( + requestParameters: SwarmLeaveRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.swarmLeaveRaw(requestParameters, initOverrides); + } + + /** + * Unlock a locked manager + */ + async swarmUnlockRaw( + requestParameters: SwarmUnlockOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling swarmUnlock().', + ); } - /** - * Unlock a locked manager - */ - async swarmUnlockRaw(requestParameters: SwarmUnlockOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling swarmUnlock().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/swarm/unlock`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SwarmUnlockRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/swarm/unlock`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SwarmUnlockRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Unlock a locked manager + */ + async swarmUnlock( + requestParameters: SwarmUnlockOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.swarmUnlockRaw(requestParameters, initOverrides); + } + + /** + * Get the unlock key + */ + async swarmUnlockkeyRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/swarm/unlockkey`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + UnlockKeyResponseFromJSON(jsonValue), + ); + } + + /** + * Get the unlock key + */ + async swarmUnlockkey( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.swarmUnlockkeyRaw(initOverrides); + return await response.value(); + } + + /** + * Update a swarm + */ + async swarmUpdateRaw( + requestParameters: SwarmUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling swarmUpdate().', + ); } - /** - * Unlock a locked manager - */ - async swarmUnlock(requestParameters: SwarmUnlockOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.swarmUnlockRaw(requestParameters, initOverrides); + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling swarmUpdate().', + ); } - /** - * Get the unlock key - */ - async swarmUnlockkeyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/swarm/unlockkey`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => UnlockKeyResponseFromJSON(jsonValue)); + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; } - /** - * Get the unlock key - */ - async swarmUnlockkey(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.swarmUnlockkeyRaw(initOverrides); - return await response.value(); + if (requestParameters["rotateWorkerToken"] != null) { + queryParameters["rotateWorkerToken"] = requestParameters["rotateWorkerToken"]; } - /** - * Update a swarm - */ - async swarmUpdateRaw(requestParameters: SwarmUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling swarmUpdate().' - ); - } - - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling swarmUpdate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } - - if (requestParameters['rotateWorkerToken'] != null) { - queryParameters['rotateWorkerToken'] = requestParameters['rotateWorkerToken']; - } - - if (requestParameters['rotateManagerToken'] != null) { - queryParameters['rotateManagerToken'] = requestParameters['rotateManagerToken']; - } - - if (requestParameters['rotateManagerUnlockKey'] != null) { - queryParameters['rotateManagerUnlockKey'] = requestParameters['rotateManagerUnlockKey']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/swarm/update`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SwarmSpecToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["rotateManagerToken"] != null) { + queryParameters["rotateManagerToken"] = requestParameters["rotateManagerToken"]; } - /** - * Update a swarm - */ - async swarmUpdate(requestParameters: SwarmUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.swarmUpdateRaw(requestParameters, initOverrides); + if (requestParameters["rotateManagerUnlockKey"] != null) { + queryParameters["rotateManagerUnlockKey"] = requestParameters["rotateManagerUnlockKey"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/swarm/update`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SwarmSpecToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Update a swarm + */ + async swarmUpdate( + requestParameters: SwarmUpdateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.swarmUpdateRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/SystemApi.ts b/src/clients/docker/apis/SystemApi.ts index e3a3a5d920..1eeb636b9f 100644 --- a/src/clients/docker/apis/SystemApi.ts +++ b/src/clients/docker/apis/SystemApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { AuthConfig, ErrorResponse, @@ -22,278 +21,333 @@ import type { SystemDataUsageResponse, SystemInfo, SystemVersion, -} from '../models/index'; +} from "../models/index"; import { - AuthConfigFromJSON, - AuthConfigToJSON, - ErrorResponseFromJSON, - ErrorResponseToJSON, - EventMessageFromJSON, - EventMessageToJSON, - SystemAuthResponseFromJSON, - SystemAuthResponseToJSON, - SystemDataUsageResponseFromJSON, - SystemDataUsageResponseToJSON, - SystemInfoFromJSON, - SystemInfoToJSON, - SystemVersionFromJSON, - SystemVersionToJSON, -} from '../models/index'; + AuthConfigFromJSON, + AuthConfigToJSON, + ErrorResponseFromJSON, + ErrorResponseToJSON, + EventMessageFromJSON, + EventMessageToJSON, + SystemAuthResponseFromJSON, + SystemAuthResponseToJSON, + SystemDataUsageResponseFromJSON, + SystemDataUsageResponseToJSON, + SystemInfoFromJSON, + SystemInfoToJSON, + SystemVersionFromJSON, + SystemVersionToJSON, +} from "../models/index"; export interface SystemAuthRequest { - authConfig?: AuthConfig; + authConfig?: AuthConfig; } export interface SystemDataUsageRequest { - type?: Array; + type?: Array; } export interface SystemEventsRequest { - since?: string; - until?: string; - filters?: string; + since?: string; + until?: string; + filters?: string; } /** - * + * */ export class SystemApi extends runtime.BaseAPI { - - /** - * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - * Check auth configuration - */ - async systemAuthRaw(requestParameters: SystemAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/auth`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AuthConfigToJSON(requestParameters['authConfig']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SystemAuthResponseFromJSON(jsonValue)); - } - - /** - * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - * Check auth configuration - */ - async systemAuth(requestParameters: SystemAuthRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemAuthRaw(requestParameters, initOverrides); - switch (response.raw.status) { - case 200: - return await response.value(); - case 204: - return null; - default: - return await response.value(); - } - } - - /** - * Get data usage information - */ - async systemDataUsageRaw(requestParameters: SystemDataUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['type'] != null) { - queryParameters['type'] = requestParameters['type']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/system/df`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SystemDataUsageResponseFromJSON(jsonValue)); - } - - /** - * Get data usage information - */ - async systemDataUsage(requestParameters: SystemDataUsageRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemDataUsageRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 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 - * Monitor events - */ - async systemEventsRaw(requestParameters: SystemEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['since'] != null) { - queryParameters['since'] = requestParameters['since']; - } - - if (requestParameters['until'] != null) { - queryParameters['until'] = requestParameters['until']; - } - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/events`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => EventMessageFromJSON(jsonValue)); - } - - /** - * 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 - * Monitor events - */ - async systemEvents(requestParameters: SystemEventsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemEventsRaw(requestParameters, initOverrides); + /** + * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. + * Check auth configuration + */ + async systemAuthRaw( + requestParameters: SystemAuthRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/auth`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AuthConfigToJSON(requestParameters["authConfig"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SystemAuthResponseFromJSON(jsonValue), + ); + } + + /** + * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. + * Check auth configuration + */ + async systemAuth( + requestParameters: SystemAuthRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.systemAuthRaw(requestParameters, initOverrides); + switch (response.raw.status) { + case 200: return await response.value(); - } - - /** - * Get system information - */ - async systemInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/info`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue)); - } - - /** - * Get system information - */ - async systemInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemInfoRaw(initOverrides); + case 204: + return null; + default: return await response.value(); } - - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPingRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/_ping`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + } + + /** + * Get data usage information + */ + async systemDataUsageRaw( + requestParameters: SystemDataUsageRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["type"] != null) { + queryParameters["type"] = requestParameters["type"]; } - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPing(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemPingRaw(initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/system/df`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SystemDataUsageResponseFromJSON(jsonValue), + ); + } + + /** + * Get data usage information + */ + async systemDataUsage( + requestParameters: SystemDataUsageRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.systemDataUsageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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 + * Monitor events + */ + async systemEventsRaw( + requestParameters: SystemEventsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["since"] != null) { + queryParameters["since"] = requestParameters["since"]; } - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPingHeadRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/_ping`, - method: 'HEAD', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + if (requestParameters["until"] != null) { + queryParameters["until"] = requestParameters["until"]; } - /** - * This is a dummy endpoint you can use to test if the server is accessible. - * Ping - */ - async systemPingHead(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemPingHeadRaw(initOverrides); - return await response.value(); + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Returns the version of Docker that is running and various information about the system that Docker is running on. - * Get version - */ - async systemVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/version`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SystemVersionFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/events`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => EventMessageFromJSON(jsonValue)); + } + + /** + * 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 + * Monitor events + */ + async systemEvents( + requestParameters: SystemEventsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.systemEventsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get system information + */ + async systemInfoRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/info`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue)); + } + + /** + * Get system information + */ + async systemInfo( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.systemInfoRaw(initOverrides); + return await response.value(); + } + + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPingRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/_ping`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; } - - /** - * Returns the version of Docker that is running and various information about the system that Docker is running on. - * Get version - */ - async systemVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.systemVersionRaw(initOverrides); - return await response.value(); + } + + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPing(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.systemPingRaw(initOverrides); + return await response.value(); + } + + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPingHeadRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/_ping`, + method: "HEAD", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; } - + } + + /** + * This is a dummy endpoint you can use to test if the server is accessible. + * Ping + */ + async systemPingHead( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.systemPingHeadRaw(initOverrides); + return await response.value(); + } + + /** + * Returns the version of Docker that is running and various information about the system that Docker is running on. + * Get version + */ + async systemVersionRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/version`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SystemVersionFromJSON(jsonValue)); + } + + /** + * Returns the version of Docker that is running and various information about the system that Docker is running on. + * Get version + */ + async systemVersion( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.systemVersionRaw(initOverrides); + return await response.value(); + } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum SystemDataUsageTypeEnum { - Container = 'container', - Image = 'image', - Volume = 'volume', - BuildCache = 'build-cache' + Container = "container", + Image = "image", + Volume = "volume", + BuildCache = "build-cache", } diff --git a/src/clients/docker/apis/TaskApi.ts b/src/clients/docker/apis/TaskApi.ts index 8913112fe1..9b13677a83 100644 --- a/src/clients/docker/apis/TaskApi.ts +++ b/src/clients/docker/apis/TaskApi.ts @@ -2,177 +2,204 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - Task, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, Task } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - TaskFromJSON, - TaskToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + TaskFromJSON, + TaskToJSON, +} from "../models/index"; export interface TaskInspectRequest { - id: string; + id: string; } export interface TaskListRequest { - filters?: string; + filters?: string; } export interface TaskLogsRequest { - id: string; - details?: boolean; - follow?: boolean; - stdout?: boolean; - stderr?: boolean; - since?: number; - timestamps?: boolean; - tail?: string; + id: string; + details?: boolean; + follow?: boolean; + stdout?: boolean; + stderr?: boolean; + since?: number; + timestamps?: boolean; + tail?: string; } /** - * + * */ export class TaskApi extends runtime.BaseAPI { + /** + * Inspect a task + */ + async taskInspectRaw( + requestParameters: TaskInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling taskInspect().', + ); + } - /** - * Inspect a task - */ - async taskInspectRaw(requestParameters: TaskInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling taskInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/tasks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TaskFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/tasks/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TaskFromJSON(jsonValue)); + } + + /** + * Inspect a task + */ + async taskInspect( + requestParameters: TaskInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.taskInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List tasks + */ + async taskListRaw( + requestParameters: TaskListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Inspect a task - */ - async taskInspect(requestParameters: TaskInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.taskInspectRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/tasks`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TaskFromJSON)); + } + + /** + * List tasks + */ + async taskList( + requestParameters: TaskListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.taskListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * 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. + * Get task logs + */ + async taskLogsRaw( + requestParameters: TaskLogsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling taskLogs().', + ); } - /** - * List tasks - */ - async taskListRaw(requestParameters: TaskListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } + if (requestParameters["details"] != null) { + queryParameters["details"] = requestParameters["details"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["follow"] != null) { + queryParameters["follow"] = requestParameters["follow"]; + } - const response = await this.request({ - path: `/tasks`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["stdout"] != null) { + queryParameters["stdout"] = requestParameters["stdout"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TaskFromJSON)); + if (requestParameters["stderr"] != null) { + queryParameters["stderr"] = requestParameters["stderr"]; } - /** - * List tasks - */ - async taskList(requestParameters: TaskListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.taskListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["since"] != null) { + queryParameters["since"] = requestParameters["since"]; } - /** - * 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. - * Get task logs - */ - async taskLogsRaw(requestParameters: TaskLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling taskLogs().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['details'] != null) { - queryParameters['details'] = requestParameters['details']; - } - - if (requestParameters['follow'] != null) { - queryParameters['follow'] = requestParameters['follow']; - } - - if (requestParameters['stdout'] != null) { - queryParameters['stdout'] = requestParameters['stdout']; - } - - if (requestParameters['stderr'] != null) { - queryParameters['stderr'] = requestParameters['stderr']; - } - - if (requestParameters['since'] != null) { - queryParameters['since'] = requestParameters['since']; - } - - if (requestParameters['timestamps'] != null) { - queryParameters['timestamps'] = requestParameters['timestamps']; - } - - if (requestParameters['tail'] != null) { - queryParameters['tail'] = requestParameters['tail']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/tasks/{id}/logs`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); + if (requestParameters["timestamps"] != null) { + queryParameters["timestamps"] = requestParameters["timestamps"]; } - /** - * 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. - * Get task logs - */ - async taskLogs(requestParameters: TaskLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.taskLogsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["tail"] != null) { + queryParameters["tail"] = requestParameters["tail"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/tasks/{id}/logs`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * 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. + * Get task logs + */ + async taskLogs( + requestParameters: TaskLogsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.taskLogsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/docker/apis/VolumeApi.ts b/src/clients/docker/apis/VolumeApi.ts index fa435cb5b0..beb28d3fcd 100644 --- a/src/clients/docker/apis/VolumeApi.ts +++ b/src/clients/docker/apis/VolumeApi.ts @@ -2,18 +2,17 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, Volume, @@ -21,265 +20,330 @@ import type { VolumeListResponse, VolumePruneResponse, VolumeUpdateRequest, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - VolumeFromJSON, - VolumeToJSON, - VolumeCreateOptionsFromJSON, - VolumeCreateOptionsToJSON, - VolumeListResponseFromJSON, - VolumeListResponseToJSON, - VolumePruneResponseFromJSON, - VolumePruneResponseToJSON, - VolumeUpdateRequestFromJSON, - VolumeUpdateRequestToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + VolumeFromJSON, + VolumeToJSON, + VolumeCreateOptionsFromJSON, + VolumeCreateOptionsToJSON, + VolumeListResponseFromJSON, + VolumeListResponseToJSON, + VolumePruneResponseFromJSON, + VolumePruneResponseToJSON, + VolumeUpdateRequestFromJSON, + VolumeUpdateRequestToJSON, +} from "../models/index"; export interface VolumeCreateRequest { - volumeConfig: VolumeCreateOptions; + volumeConfig: VolumeCreateOptions; } export interface VolumeDeleteRequest { - name: string; - force?: boolean; + name: string; + force?: boolean; } export interface VolumeInspectRequest { - name: string; + name: string; } export interface VolumeListRequest { - filters?: string; + filters?: string; } export interface VolumePruneRequest { - filters?: string; + filters?: string; } export interface VolumeUpdateOperationRequest { - name: string; - version: number; - body?: VolumeUpdateRequest; + name: string; + version: number; + body?: VolumeUpdateRequest; } /** - * + * */ export class VolumeApi extends runtime.BaseAPI { - - /** - * Create a volume - */ - async volumeCreateRaw(requestParameters: VolumeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['volumeConfig'] == null) { - throw new runtime.RequiredError( - 'volumeConfig', - 'Required parameter "volumeConfig" was null or undefined when calling volumeCreate().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/volumes/create`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: VolumeCreateOptionsToJSON(requestParameters['volumeConfig']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); + /** + * Create a volume + */ + async volumeCreateRaw( + requestParameters: VolumeCreateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["volumeConfig"] == null) { + throw new runtime.RequiredError( + "volumeConfig", + 'Required parameter "volumeConfig" was null or undefined when calling volumeCreate().', + ); } - /** - * Create a volume - */ - async volumeCreate(requestParameters: VolumeCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.volumeCreateRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/volumes/create`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: VolumeCreateOptionsToJSON(requestParameters["volumeConfig"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); + } + + /** + * Create a volume + */ + async volumeCreate( + requestParameters: VolumeCreateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.volumeCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Instruct the driver to remove the volume. + * Remove a volume + */ + async volumeDeleteRaw( + requestParameters: VolumeDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling volumeDelete().', + ); } - /** - * Instruct the driver to remove the volume. - * Remove a volume - */ - async volumeDeleteRaw(requestParameters: VolumeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling volumeDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/volumes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } + const queryParameters: any = {}; - /** - * Instruct the driver to remove the volume. - * Remove a volume - */ - async volumeDelete(requestParameters: VolumeDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.volumeDeleteRaw(requestParameters, initOverrides); + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } - /** - * Inspect a volume - */ - async volumeInspectRaw(requestParameters: VolumeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling volumeInspect().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/volumes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/volumes/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Instruct the driver to remove the volume. + * Remove a volume + */ + async volumeDelete( + requestParameters: VolumeDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.volumeDeleteRaw(requestParameters, initOverrides); + } + + /** + * Inspect a volume + */ + async volumeInspectRaw( + requestParameters: VolumeInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling volumeInspect().', + ); } - /** - * Inspect a volume - */ - async volumeInspect(requestParameters: VolumeInspectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.volumeInspectRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/volumes/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => VolumeFromJSON(jsonValue)); + } + + /** + * Inspect a volume + */ + async volumeInspect( + requestParameters: VolumeInspectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.volumeInspectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List volumes + */ + async volumeListRaw( + requestParameters: VolumeListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * List volumes - */ - async volumeListRaw(requestParameters: VolumeListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/volumes`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => VolumeListResponseFromJSON(jsonValue)); - } - - /** - * List volumes - */ - async volumeList(requestParameters: VolumeListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.volumeListRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/volumes`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + VolumeListResponseFromJSON(jsonValue), + ); + } + + /** + * List volumes + */ + async volumeList( + requestParameters: VolumeListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.volumeListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete unused volumes + */ + async volumePruneRaw( + requestParameters: VolumePruneRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["filters"] != null) { + queryParameters["filters"] = requestParameters["filters"]; } - /** - * Delete unused volumes - */ - async volumePruneRaw(requestParameters: VolumePruneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['filters'] != null) { - queryParameters['filters'] = requestParameters['filters']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/volumes/prune`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => VolumePruneResponseFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/volumes/prune`, + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + VolumePruneResponseFromJSON(jsonValue), + ); + } + + /** + * Delete unused volumes + */ + async volumePrune( + requestParameters: VolumePruneRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.volumePruneRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * \"Update a volume. Valid only for Swarm cluster volumes\" + */ + async volumeUpdateRaw( + requestParameters: VolumeUpdateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling volumeUpdate().', + ); } - /** - * Delete unused volumes - */ - async volumePrune(requestParameters: VolumePruneRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.volumePruneRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling volumeUpdate().', + ); } - /** - * \"Update a volume. Valid only for Swarm cluster volumes\" - */ - async volumeUpdateRaw(requestParameters: VolumeUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling volumeUpdate().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling volumeUpdate().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['version'] != null) { - queryParameters['version'] = requestParameters['version']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/volumes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: VolumeUpdateRequestToJSON(requestParameters['body']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } + const queryParameters: any = {}; - /** - * \"Update a volume. Valid only for Swarm cluster volumes\" - */ - async volumeUpdate(requestParameters: VolumeUpdateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.volumeUpdateRaw(requestParameters, initOverrides); + if (requestParameters["version"] != null) { + queryParameters["version"] = requestParameters["version"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/volumes/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: VolumeUpdateRequestToJSON(requestParameters["body"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * \"Update a volume. Valid only for Swarm cluster volumes\" + */ + async volumeUpdate( + requestParameters: VolumeUpdateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.volumeUpdateRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/docker/apis/index.ts b/src/clients/docker/apis/index.ts index 67720eb7d9..cb57d30132 100644 --- a/src/clients/docker/apis/index.ts +++ b/src/clients/docker/apis/index.ts @@ -1,17 +1,17 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ConfigApi'; -export * from './ContainerApi'; -export * from './DistributionApi'; -export * from './ExecApi'; -export * from './ImageApi'; -export * from './NetworkApi'; -export * from './NodeApi'; -export * from './PluginApi'; -export * from './SecretApi'; -export * from './ServiceApi'; -export * from './SessionApi'; -export * from './SwarmApi'; -export * from './SystemApi'; -export * from './TaskApi'; -export * from './VolumeApi'; +export * from "./ConfigApi"; +export * from "./ContainerApi"; +export * from "./DistributionApi"; +export * from "./ExecApi"; +export * from "./ImageApi"; +export * from "./NetworkApi"; +export * from "./NodeApi"; +export * from "./PluginApi"; +export * from "./SecretApi"; +export * from "./ServiceApi"; +export * from "./SessionApi"; +export * from "./SwarmApi"; +export * from "./SystemApi"; +export * from "./TaskApi"; +export * from "./VolumeApi"; diff --git a/src/clients/docker/index.ts b/src/clients/docker/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/docker/index.ts +++ b/src/clients/docker/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/docker/models/Address.ts b/src/clients/docker/models/Address.ts index 4ffa85e032..170850a1fe 100644 --- a/src/clients/docker/models/Address.ts +++ b/src/clients/docker/models/Address.ts @@ -2,72 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Address represents an IPv4 or IPv6 IP address. * @export * @interface Address */ export interface Address { - /** - * IP address. - * @type {string} - * @memberof Address - */ - Addr?: string; - /** - * Mask length of the IP address. - * @type {number} - * @memberof Address - */ - PrefixLen?: number; + /** + * IP address. + * @type {string} + * @memberof Address + */ + Addr?: string; + /** + * Mask length of the IP address. + * @type {number} + * @memberof Address + */ + PrefixLen?: number; } /** * Check if a given object implements the Address interface. */ export function instanceOfAddress(value: object): value is Address { - return true; + return true; } export function AddressFromJSON(json: any): Address { - return AddressFromJSONTyped(json, false); + return AddressFromJSONTyped(json, false); } export function AddressFromJSONTyped(json: any, ignoreDiscriminator: boolean): Address { - if (json == null) { - return json; - } - return { - - 'Addr': json['Addr'] == null ? undefined : json['Addr'], - 'PrefixLen': json['PrefixLen'] == null ? undefined : json['PrefixLen'], - }; + if (json == null) { + return json; + } + return { + Addr: json["Addr"] == null ? undefined : json["Addr"], + PrefixLen: json["PrefixLen"] == null ? undefined : json["PrefixLen"], + }; } export function AddressToJSON(json: any): Address { - return AddressToJSONTyped(json, false); + return AddressToJSONTyped(json, false); } -export function AddressToJSONTyped(value?: Address | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AddressToJSONTyped( + value?: Address | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Addr': value['Addr'], - 'PrefixLen': value['PrefixLen'], - }; + return { + Addr: value["Addr"], + PrefixLen: value["PrefixLen"], + }; } - diff --git a/src/clients/docker/models/AuthConfig.ts b/src/clients/docker/models/AuthConfig.ts index 16293a24d9..28fc24ecfb 100644 --- a/src/clients/docker/models/AuthConfig.ts +++ b/src/clients/docker/models/AuthConfig.ts @@ -2,88 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface AuthConfig */ export interface AuthConfig { - /** - * - * @type {string} - * @memberof AuthConfig - */ - username?: string; - /** - * - * @type {string} - * @memberof AuthConfig - */ - password?: string; - /** - * - * @type {string} - * @memberof AuthConfig - */ - email?: string; - /** - * - * @type {string} - * @memberof AuthConfig - */ - serveraddress?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + username?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + password?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + email?: string; + /** + * + * @type {string} + * @memberof AuthConfig + */ + serveraddress?: string; } /** * Check if a given object implements the AuthConfig interface. */ export function instanceOfAuthConfig(value: object): value is AuthConfig { - return true; + return true; } export function AuthConfigFromJSON(json: any): AuthConfig { - return AuthConfigFromJSONTyped(json, false); + return AuthConfigFromJSONTyped(json, false); } export function AuthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthConfig { - if (json == null) { - return json; - } - return { - - 'username': json['username'] == null ? undefined : json['username'], - 'password': json['password'] == null ? undefined : json['password'], - 'email': json['email'] == null ? undefined : json['email'], - 'serveraddress': json['serveraddress'] == null ? undefined : json['serveraddress'], - }; + if (json == null) { + return json; + } + return { + username: json["username"] == null ? undefined : json["username"], + password: json["password"] == null ? undefined : json["password"], + email: json["email"] == null ? undefined : json["email"], + serveraddress: json["serveraddress"] == null ? undefined : json["serveraddress"], + }; } export function AuthConfigToJSON(json: any): AuthConfig { - return AuthConfigToJSONTyped(json, false); + return AuthConfigToJSONTyped(json, false); } -export function AuthConfigToJSONTyped(value?: AuthConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AuthConfigToJSONTyped( + value?: AuthConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'username': value['username'], - 'password': value['password'], - 'email': value['email'], - 'serveraddress': value['serveraddress'], - }; + return { + username: value["username"], + password: value["password"], + email: value["email"], + serveraddress: value["serveraddress"], + }; } - diff --git a/src/clients/docker/models/BuildCache.ts b/src/clients/docker/models/BuildCache.ts index a0201bba0b..6161546fde 100644 --- a/src/clients/docker/models/BuildCache.ts +++ b/src/clients/docker/models/BuildCache.ts @@ -2,173 +2,172 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * BuildCache contains information about a build cache record. - * + * * @export * @interface BuildCache */ export interface BuildCache { - /** - * Unique ID of the build cache record. - * - * @type {string} - * @memberof BuildCache - */ - ID?: string; - /** - * ID of the parent build cache record. - * - * > **Deprecated**: This field is deprecated, and omitted if empty. - * - * @type {string} - * @memberof BuildCache - */ - Parent?: string | null; - /** - * List of parent build cache record IDs. - * - * @type {Array} - * @memberof BuildCache - */ - Parents?: Array | null; - /** - * Cache record type. - * - * @type {string} - * @memberof BuildCache - */ - Type?: BuildCacheTypeEnum; - /** - * Description of the build-step that produced the build cache. - * - * @type {string} - * @memberof BuildCache - */ - Description?: string; - /** - * Indicates if the build cache is in use. - * - * @type {boolean} - * @memberof BuildCache - */ - InUse?: boolean; - /** - * Indicates if the build cache is shared. - * - * @type {boolean} - * @memberof BuildCache - */ - Shared?: boolean; - /** - * Amount of disk space used by the build cache (in bytes). - * - * @type {number} - * @memberof BuildCache - */ - Size?: number; - /** - * Date and time at which the build cache was created in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof BuildCache - */ - CreatedAt?: string; - /** - * Date and time at which the build cache was last used in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof BuildCache - */ - LastUsedAt?: string | null; - /** - * - * @type {number} - * @memberof BuildCache - */ - UsageCount?: number; + /** + * Unique ID of the build cache record. + * + * @type {string} + * @memberof BuildCache + */ + ID?: string; + /** + * ID of the parent build cache record. + * + * > **Deprecated**: This field is deprecated, and omitted if empty. + * + * @type {string} + * @memberof BuildCache + */ + Parent?: string | null; + /** + * List of parent build cache record IDs. + * + * @type {Array} + * @memberof BuildCache + */ + Parents?: Array | null; + /** + * Cache record type. + * + * @type {string} + * @memberof BuildCache + */ + Type?: BuildCacheTypeEnum; + /** + * Description of the build-step that produced the build cache. + * + * @type {string} + * @memberof BuildCache + */ + Description?: string; + /** + * Indicates if the build cache is in use. + * + * @type {boolean} + * @memberof BuildCache + */ + InUse?: boolean; + /** + * Indicates if the build cache is shared. + * + * @type {boolean} + * @memberof BuildCache + */ + Shared?: boolean; + /** + * Amount of disk space used by the build cache (in bytes). + * + * @type {number} + * @memberof BuildCache + */ + Size?: number; + /** + * Date and time at which the build cache was created in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof BuildCache + */ + CreatedAt?: string; + /** + * Date and time at which the build cache was last used in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof BuildCache + */ + LastUsedAt?: string | null; + /** + * + * @type {number} + * @memberof BuildCache + */ + UsageCount?: number; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum BuildCacheTypeEnum { - Internal = 'internal', - Frontend = 'frontend', - SourceLocal = 'source.local', - SourceGitCheckout = 'source.git.checkout', - ExecCachemount = 'exec.cachemount', - Regular = 'regular' + Internal = "internal", + Frontend = "frontend", + SourceLocal = "source.local", + SourceGitCheckout = "source.git.checkout", + ExecCachemount = "exec.cachemount", + Regular = "regular", } - /** * Check if a given object implements the BuildCache interface. */ export function instanceOfBuildCache(value: object): value is BuildCache { - return true; + return true; } export function BuildCacheFromJSON(json: any): BuildCache { - return BuildCacheFromJSONTyped(json, false); + return BuildCacheFromJSONTyped(json, false); } export function BuildCacheFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildCache { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Parent': json['Parent'] == null ? undefined : json['Parent'], - 'Parents': json['Parents'] == null ? undefined : json['Parents'], - 'Type': json['Type'] == null ? undefined : json['Type'], - 'Description': json['Description'] == null ? undefined : json['Description'], - 'InUse': json['InUse'] == null ? undefined : json['InUse'], - 'Shared': json['Shared'] == null ? undefined : json['Shared'], - 'Size': json['Size'] == null ? undefined : json['Size'], - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'LastUsedAt': json['LastUsedAt'] == null ? undefined : json['LastUsedAt'], - 'UsageCount': json['UsageCount'] == null ? undefined : json['UsageCount'], - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Parent: json["Parent"] == null ? undefined : json["Parent"], + Parents: json["Parents"] == null ? undefined : json["Parents"], + Type: json["Type"] == null ? undefined : json["Type"], + Description: json["Description"] == null ? undefined : json["Description"], + InUse: json["InUse"] == null ? undefined : json["InUse"], + Shared: json["Shared"] == null ? undefined : json["Shared"], + Size: json["Size"] == null ? undefined : json["Size"], + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + LastUsedAt: json["LastUsedAt"] == null ? undefined : json["LastUsedAt"], + UsageCount: json["UsageCount"] == null ? undefined : json["UsageCount"], + }; } export function BuildCacheToJSON(json: any): BuildCache { - return BuildCacheToJSONTyped(json, false); + return BuildCacheToJSONTyped(json, false); } -export function BuildCacheToJSONTyped(value?: BuildCache | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BuildCacheToJSONTyped( + value?: BuildCache | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Parent': value['Parent'], - 'Parents': value['Parents'], - 'Type': value['Type'], - 'Description': value['Description'], - 'InUse': value['InUse'], - 'Shared': value['Shared'], - 'Size': value['Size'], - 'CreatedAt': value['CreatedAt'], - 'LastUsedAt': value['LastUsedAt'], - 'UsageCount': value['UsageCount'], - }; + return { + ID: value["ID"], + Parent: value["Parent"], + Parents: value["Parents"], + Type: value["Type"], + Description: value["Description"], + InUse: value["InUse"], + Shared: value["Shared"], + Size: value["Size"], + CreatedAt: value["CreatedAt"], + LastUsedAt: value["LastUsedAt"], + UsageCount: value["UsageCount"], + }; } - diff --git a/src/clients/docker/models/BuildInfo.ts b/src/clients/docker/models/BuildInfo.ts index 6ca3e312c0..19fbbea8b2 100644 --- a/src/clients/docker/models/BuildInfo.ts +++ b/src/clients/docker/models/BuildInfo.ts @@ -2,142 +2,143 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorDetail } from './ErrorDetail'; +import { mapValues } from "../runtime"; +import type { ErrorDetail } from "./ErrorDetail"; import { - ErrorDetailFromJSON, - ErrorDetailFromJSONTyped, - ErrorDetailToJSON, - ErrorDetailToJSONTyped, -} from './ErrorDetail'; -import type { ProgressDetail } from './ProgressDetail'; + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from "./ErrorDetail"; +import type { ProgressDetail } from "./ProgressDetail"; import { - ProgressDetailFromJSON, - ProgressDetailFromJSONTyped, - ProgressDetailToJSON, - ProgressDetailToJSONTyped, -} from './ProgressDetail'; -import type { ImageID } from './ImageID'; + ProgressDetailFromJSON, + ProgressDetailFromJSONTyped, + ProgressDetailToJSON, + ProgressDetailToJSONTyped, +} from "./ProgressDetail"; +import type { ImageID } from "./ImageID"; import { - ImageIDFromJSON, - ImageIDFromJSONTyped, - ImageIDToJSON, - ImageIDToJSONTyped, -} from './ImageID'; + ImageIDFromJSON, + ImageIDFromJSONTyped, + ImageIDToJSON, + ImageIDToJSONTyped, +} from "./ImageID"; /** - * + * * @export * @interface BuildInfo */ export interface BuildInfo { - /** - * - * @type {string} - * @memberof BuildInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof BuildInfo - */ - stream?: string; - /** - * - * @type {string} - * @memberof BuildInfo - */ - error?: string; - /** - * - * @type {ErrorDetail} - * @memberof BuildInfo - */ - errorDetail?: ErrorDetail; - /** - * - * @type {string} - * @memberof BuildInfo - */ - status?: string; - /** - * - * @type {string} - * @memberof BuildInfo - */ - progress?: string; - /** - * - * @type {ProgressDetail} - * @memberof BuildInfo - */ - progressDetail?: ProgressDetail; - /** - * - * @type {ImageID} - * @memberof BuildInfo - */ - aux?: ImageID; + /** + * + * @type {string} + * @memberof BuildInfo + */ + id?: string; + /** + * + * @type {string} + * @memberof BuildInfo + */ + stream?: string; + /** + * + * @type {string} + * @memberof BuildInfo + */ + error?: string; + /** + * + * @type {ErrorDetail} + * @memberof BuildInfo + */ + errorDetail?: ErrorDetail; + /** + * + * @type {string} + * @memberof BuildInfo + */ + status?: string; + /** + * + * @type {string} + * @memberof BuildInfo + */ + progress?: string; + /** + * + * @type {ProgressDetail} + * @memberof BuildInfo + */ + progressDetail?: ProgressDetail; + /** + * + * @type {ImageID} + * @memberof BuildInfo + */ + aux?: ImageID; } /** * Check if a given object implements the BuildInfo interface. */ export function instanceOfBuildInfo(value: object): value is BuildInfo { - return true; + return true; } export function BuildInfoFromJSON(json: any): BuildInfo { - return BuildInfoFromJSONTyped(json, false); + return BuildInfoFromJSONTyped(json, false); } export function BuildInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildInfo { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'stream': json['stream'] == null ? undefined : json['stream'], - 'error': json['error'] == null ? undefined : json['error'], - 'errorDetail': json['errorDetail'] == null ? undefined : ErrorDetailFromJSON(json['errorDetail']), - 'status': json['status'] == null ? undefined : json['status'], - 'progress': json['progress'] == null ? undefined : json['progress'], - 'progressDetail': json['progressDetail'] == null ? undefined : ProgressDetailFromJSON(json['progressDetail']), - 'aux': json['aux'] == null ? undefined : ImageIDFromJSON(json['aux']), - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + stream: json["stream"] == null ? undefined : json["stream"], + error: json["error"] == null ? undefined : json["error"], + errorDetail: json["errorDetail"] == null ? undefined : ErrorDetailFromJSON(json["errorDetail"]), + status: json["status"] == null ? undefined : json["status"], + progress: json["progress"] == null ? undefined : json["progress"], + progressDetail: + json["progressDetail"] == null ? undefined : ProgressDetailFromJSON(json["progressDetail"]), + aux: json["aux"] == null ? undefined : ImageIDFromJSON(json["aux"]), + }; } export function BuildInfoToJSON(json: any): BuildInfo { - return BuildInfoToJSONTyped(json, false); + return BuildInfoToJSONTyped(json, false); } -export function BuildInfoToJSONTyped(value?: BuildInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BuildInfoToJSONTyped( + value?: BuildInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'stream': value['stream'], - 'error': value['error'], - 'errorDetail': ErrorDetailToJSON(value['errorDetail']), - 'status': value['status'], - 'progress': value['progress'], - 'progressDetail': ProgressDetailToJSON(value['progressDetail']), - 'aux': ImageIDToJSON(value['aux']), - }; + return { + id: value["id"], + stream: value["stream"], + error: value["error"], + errorDetail: ErrorDetailToJSON(value["errorDetail"]), + status: value["status"], + progress: value["progress"], + progressDetail: ProgressDetailToJSON(value["progressDetail"]), + aux: ImageIDToJSON(value["aux"]), + }; } - diff --git a/src/clients/docker/models/BuildPruneResponse.ts b/src/clients/docker/models/BuildPruneResponse.ts index 9d95560492..4421d06b96 100644 --- a/src/clients/docker/models/BuildPruneResponse.ts +++ b/src/clients/docker/models/BuildPruneResponse.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface BuildPruneResponse */ export interface BuildPruneResponse { - /** - * - * @type {Array} - * @memberof BuildPruneResponse - */ - CachesDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof BuildPruneResponse - */ - SpaceReclaimed?: number; + /** + * + * @type {Array} + * @memberof BuildPruneResponse + */ + CachesDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof BuildPruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the BuildPruneResponse interface. */ export function instanceOfBuildPruneResponse(value: object): value is BuildPruneResponse { - return true; + return true; } export function BuildPruneResponseFromJSON(json: any): BuildPruneResponse { - return BuildPruneResponseFromJSONTyped(json, false); + return BuildPruneResponseFromJSONTyped(json, false); } -export function BuildPruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildPruneResponse { - if (json == null) { - return json; - } - return { - - 'CachesDeleted': json['CachesDeleted'] == null ? undefined : json['CachesDeleted'], - 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], - }; +export function BuildPruneResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BuildPruneResponse { + if (json == null) { + return json; + } + return { + CachesDeleted: json["CachesDeleted"] == null ? undefined : json["CachesDeleted"], + SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], + }; } export function BuildPruneResponseToJSON(json: any): BuildPruneResponse { - return BuildPruneResponseToJSONTyped(json, false); + return BuildPruneResponseToJSONTyped(json, false); } -export function BuildPruneResponseToJSONTyped(value?: BuildPruneResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BuildPruneResponseToJSONTyped( + value?: BuildPruneResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CachesDeleted': value['CachesDeleted'], - 'SpaceReclaimed': value['SpaceReclaimed'], - }; + return { + CachesDeleted: value["CachesDeleted"], + SpaceReclaimed: value["SpaceReclaimed"], + }; } - diff --git a/src/clients/docker/models/ChangeType.ts b/src/clients/docker/models/ChangeType.ts index a0de3c0849..e1592bc86a 100644 --- a/src/clients/docker/models/ChangeType.ts +++ b/src/clients/docker/models/ChangeType.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,47 +14,45 @@ /** * Kind of change - * + * * Can be one of: - * + * * - `0`: Modified ("C") * - `1`: Added ("A") * - `2`: Deleted ("D") - * + * * @export * @enum {string} */ export enum ChangeType { - NUMBER_0 = 0, - NUMBER_1 = 1, - NUMBER_2 = 2 + NUMBER_0 = 0, + NUMBER_1 = 1, + NUMBER_2 = 2, } - export function instanceOfChangeType(value: any): boolean { - for (const key in ChangeType) { - if (Object.prototype.hasOwnProperty.call(ChangeType, key)) { - if (ChangeType[key as keyof typeof ChangeType] === value) { - return true; - } - } + for (const key in ChangeType) { + if (Object.prototype.hasOwnProperty.call(ChangeType, key)) { + if (ChangeType[key as keyof typeof ChangeType] === value) { + return true; + } } - return false; + } + return false; } export function ChangeTypeFromJSON(json: any): ChangeType { - return ChangeTypeFromJSONTyped(json, false); + return ChangeTypeFromJSONTyped(json, false); } export function ChangeTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeType { - return json as ChangeType; + return json as ChangeType; } export function ChangeTypeToJSON(value?: ChangeType | null): any { - return value as any; + return value as any; } export function ChangeTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ChangeType { - return value as ChangeType; + return value as ChangeType; } - diff --git a/src/clients/docker/models/ClusterInfo.ts b/src/clients/docker/models/ClusterInfo.ts index ced9983b95..3d087ab8c4 100644 --- a/src/clients/docker/models/ClusterInfo.ts +++ b/src/clients/docker/models/ClusterInfo.ts @@ -2,172 +2,173 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { TLSInfo } from './TLSInfo'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { TLSInfo } from "./TLSInfo"; import { - TLSInfoFromJSON, - TLSInfoFromJSONTyped, - TLSInfoToJSON, - TLSInfoToJSONTyped, -} from './TLSInfo'; -import type { SwarmSpec } from './SwarmSpec'; + TLSInfoFromJSON, + TLSInfoFromJSONTyped, + TLSInfoToJSON, + TLSInfoToJSONTyped, +} from "./TLSInfo"; +import type { SwarmSpec } from "./SwarmSpec"; import { - SwarmSpecFromJSON, - SwarmSpecFromJSONTyped, - SwarmSpecToJSON, - SwarmSpecToJSONTyped, -} from './SwarmSpec'; + SwarmSpecFromJSON, + SwarmSpecFromJSONTyped, + SwarmSpecToJSON, + SwarmSpecToJSONTyped, +} from "./SwarmSpec"; /** * ClusterInfo represents information about the swarm as is returned by the * "/info" endpoint. Join-tokens are not included. - * + * * @export * @interface ClusterInfo */ export interface ClusterInfo { - /** - * The ID of the swarm. - * @type {string} - * @memberof ClusterInfo - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof ClusterInfo - */ - Version?: ObjectVersion; - /** - * Date and time at which the swarm was initialised in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof ClusterInfo - */ - CreatedAt?: string; - /** - * Date and time at which the swarm was last updated in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof ClusterInfo - */ - UpdatedAt?: string; - /** - * - * @type {SwarmSpec} - * @memberof ClusterInfo - */ - Spec?: SwarmSpec; - /** - * - * @type {TLSInfo} - * @memberof ClusterInfo - */ - TLSInfo?: TLSInfo; - /** - * Whether there is currently a root CA rotation in progress for the swarm - * - * @type {boolean} - * @memberof ClusterInfo - */ - RootRotationInProgress?: boolean; - /** - * DataPathPort specifies the data path port number for data traffic. - * Acceptable port range is 1024 to 49151. - * If no port is set or is set to 0, the default port (4789) is used. - * - * @type {number} - * @memberof ClusterInfo - */ - DataPathPort?: number; - /** - * Default Address Pool specifies default subnet pools for global scope - * networks. - * - * @type {Array} - * @memberof ClusterInfo - */ - DefaultAddrPool?: Array; - /** - * SubnetSize specifies the subnet size of the networks created from the - * default subnet pool. - * - * @type {number} - * @memberof ClusterInfo - */ - SubnetSize?: number; + /** + * The ID of the swarm. + * @type {string} + * @memberof ClusterInfo + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof ClusterInfo + */ + Version?: ObjectVersion; + /** + * Date and time at which the swarm was initialised in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof ClusterInfo + */ + CreatedAt?: string; + /** + * Date and time at which the swarm was last updated in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof ClusterInfo + */ + UpdatedAt?: string; + /** + * + * @type {SwarmSpec} + * @memberof ClusterInfo + */ + Spec?: SwarmSpec; + /** + * + * @type {TLSInfo} + * @memberof ClusterInfo + */ + TLSInfo?: TLSInfo; + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @type {boolean} + * @memberof ClusterInfo + */ + RootRotationInProgress?: boolean; + /** + * DataPathPort specifies the data path port number for data traffic. + * Acceptable port range is 1024 to 49151. + * If no port is set or is set to 0, the default port (4789) is used. + * + * @type {number} + * @memberof ClusterInfo + */ + DataPathPort?: number; + /** + * Default Address Pool specifies default subnet pools for global scope + * networks. + * + * @type {Array} + * @memberof ClusterInfo + */ + DefaultAddrPool?: Array; + /** + * SubnetSize specifies the subnet size of the networks created from the + * default subnet pool. + * + * @type {number} + * @memberof ClusterInfo + */ + SubnetSize?: number; } /** * Check if a given object implements the ClusterInfo interface. */ export function instanceOfClusterInfo(value: object): value is ClusterInfo { - return true; + return true; } export function ClusterInfoFromJSON(json: any): ClusterInfo { - return ClusterInfoFromJSONTyped(json, false); + return ClusterInfoFromJSONTyped(json, false); } export function ClusterInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterInfo { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : SwarmSpecFromJSON(json['Spec']), - 'TLSInfo': json['TLSInfo'] == null ? undefined : TLSInfoFromJSON(json['TLSInfo']), - 'RootRotationInProgress': json['RootRotationInProgress'] == null ? undefined : json['RootRotationInProgress'], - 'DataPathPort': json['DataPathPort'] == null ? undefined : json['DataPathPort'], - 'DefaultAddrPool': json['DefaultAddrPool'] == null ? undefined : json['DefaultAddrPool'], - 'SubnetSize': json['SubnetSize'] == null ? undefined : json['SubnetSize'], - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : SwarmSpecFromJSON(json["Spec"]), + TLSInfo: json["TLSInfo"] == null ? undefined : TLSInfoFromJSON(json["TLSInfo"]), + RootRotationInProgress: + json["RootRotationInProgress"] == null ? undefined : json["RootRotationInProgress"], + DataPathPort: json["DataPathPort"] == null ? undefined : json["DataPathPort"], + DefaultAddrPool: json["DefaultAddrPool"] == null ? undefined : json["DefaultAddrPool"], + SubnetSize: json["SubnetSize"] == null ? undefined : json["SubnetSize"], + }; } export function ClusterInfoToJSON(json: any): ClusterInfo { - return ClusterInfoToJSONTyped(json, false); + return ClusterInfoToJSONTyped(json, false); } -export function ClusterInfoToJSONTyped(value?: ClusterInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterInfoToJSONTyped( + value?: ClusterInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': SwarmSpecToJSON(value['Spec']), - 'TLSInfo': TLSInfoToJSON(value['TLSInfo']), - 'RootRotationInProgress': value['RootRotationInProgress'], - 'DataPathPort': value['DataPathPort'], - 'DefaultAddrPool': value['DefaultAddrPool'], - 'SubnetSize': value['SubnetSize'], - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: SwarmSpecToJSON(value["Spec"]), + TLSInfo: TLSInfoToJSON(value["TLSInfo"]), + RootRotationInProgress: value["RootRotationInProgress"], + DataPathPort: value["DataPathPort"], + DefaultAddrPool: value["DefaultAddrPool"], + SubnetSize: value["SubnetSize"], + }; } - diff --git a/src/clients/docker/models/ClusterVolume.ts b/src/clients/docker/models/ClusterVolume.ts index 51c9e8e9ed..b430e6c405 100644 --- a/src/clients/docker/models/ClusterVolume.ts +++ b/src/clients/docker/models/ClusterVolume.ts @@ -2,148 +2,154 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { ClusterVolumeSpec } from './ClusterVolumeSpec'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { ClusterVolumeSpec } from "./ClusterVolumeSpec"; import { - ClusterVolumeSpecFromJSON, - ClusterVolumeSpecFromJSONTyped, - ClusterVolumeSpecToJSON, - ClusterVolumeSpecToJSONTyped, -} from './ClusterVolumeSpec'; -import type { ClusterVolumeInfo } from './ClusterVolumeInfo'; + ClusterVolumeSpecFromJSON, + ClusterVolumeSpecFromJSONTyped, + ClusterVolumeSpecToJSON, + ClusterVolumeSpecToJSONTyped, +} from "./ClusterVolumeSpec"; +import type { ClusterVolumeInfo } from "./ClusterVolumeInfo"; import { - ClusterVolumeInfoFromJSON, - ClusterVolumeInfoFromJSONTyped, - ClusterVolumeInfoToJSON, - ClusterVolumeInfoToJSONTyped, -} from './ClusterVolumeInfo'; -import type { ClusterVolumePublishStatusInner } from './ClusterVolumePublishStatusInner'; + ClusterVolumeInfoFromJSON, + ClusterVolumeInfoFromJSONTyped, + ClusterVolumeInfoToJSON, + ClusterVolumeInfoToJSONTyped, +} from "./ClusterVolumeInfo"; +import type { ClusterVolumePublishStatusInner } from "./ClusterVolumePublishStatusInner"; import { - ClusterVolumePublishStatusInnerFromJSON, - ClusterVolumePublishStatusInnerFromJSONTyped, - ClusterVolumePublishStatusInnerToJSON, - ClusterVolumePublishStatusInnerToJSONTyped, -} from './ClusterVolumePublishStatusInner'; + ClusterVolumePublishStatusInnerFromJSON, + ClusterVolumePublishStatusInnerFromJSONTyped, + ClusterVolumePublishStatusInnerToJSON, + ClusterVolumePublishStatusInnerToJSONTyped, +} from "./ClusterVolumePublishStatusInner"; /** * Options and information specific to, and only present on, Swarm CSI * cluster volumes. - * + * * @export * @interface ClusterVolume */ export interface ClusterVolume { - /** - * The Swarm ID of this volume. Because cluster volumes are Swarm - * objects, they have an ID, unlike non-cluster volumes. This ID can - * be used to refer to the Volume instead of the name. - * - * @type {string} - * @memberof ClusterVolume - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof ClusterVolume - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof ClusterVolume - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof ClusterVolume - */ - UpdatedAt?: string; - /** - * - * @type {ClusterVolumeSpec} - * @memberof ClusterVolume - */ - Spec?: ClusterVolumeSpec; - /** - * - * @type {ClusterVolumeInfo} - * @memberof ClusterVolume - */ - Info?: ClusterVolumeInfo; - /** - * The status of the volume as it pertains to its publishing and use on - * specific nodes - * - * @type {Array} - * @memberof ClusterVolume - */ - PublishStatus?: Array; + /** + * The Swarm ID of this volume. Because cluster volumes are Swarm + * objects, they have an ID, unlike non-cluster volumes. This ID can + * be used to refer to the Volume instead of the name. + * + * @type {string} + * @memberof ClusterVolume + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof ClusterVolume + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof ClusterVolume + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof ClusterVolume + */ + UpdatedAt?: string; + /** + * + * @type {ClusterVolumeSpec} + * @memberof ClusterVolume + */ + Spec?: ClusterVolumeSpec; + /** + * + * @type {ClusterVolumeInfo} + * @memberof ClusterVolume + */ + Info?: ClusterVolumeInfo; + /** + * The status of the volume as it pertains to its publishing and use on + * specific nodes + * + * @type {Array} + * @memberof ClusterVolume + */ + PublishStatus?: Array; } /** * Check if a given object implements the ClusterVolume interface. */ export function instanceOfClusterVolume(value: object): value is ClusterVolume { - return true; + return true; } export function ClusterVolumeFromJSON(json: any): ClusterVolume { - return ClusterVolumeFromJSONTyped(json, false); + return ClusterVolumeFromJSONTyped(json, false); } export function ClusterVolumeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolume { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : ClusterVolumeSpecFromJSON(json['Spec']), - 'Info': json['Info'] == null ? undefined : ClusterVolumeInfoFromJSON(json['Info']), - 'PublishStatus': json['PublishStatus'] == null ? undefined : ((json['PublishStatus'] as Array).map(ClusterVolumePublishStatusInnerFromJSON)), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : ClusterVolumeSpecFromJSON(json["Spec"]), + Info: json["Info"] == null ? undefined : ClusterVolumeInfoFromJSON(json["Info"]), + PublishStatus: + json["PublishStatus"] == null + ? undefined + : (json["PublishStatus"] as Array).map(ClusterVolumePublishStatusInnerFromJSON), + }; } export function ClusterVolumeToJSON(json: any): ClusterVolume { - return ClusterVolumeToJSONTyped(json, false); + return ClusterVolumeToJSONTyped(json, false); } -export function ClusterVolumeToJSONTyped(value?: ClusterVolume | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeToJSONTyped( + value?: ClusterVolume | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': ClusterVolumeSpecToJSON(value['Spec']), - 'Info': ClusterVolumeInfoToJSON(value['Info']), - 'PublishStatus': value['PublishStatus'] == null ? undefined : ((value['PublishStatus'] as Array).map(ClusterVolumePublishStatusInnerToJSON)), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: ClusterVolumeSpecToJSON(value["Spec"]), + Info: ClusterVolumeInfoToJSON(value["Info"]), + PublishStatus: + value["PublishStatus"] == null + ? undefined + : (value["PublishStatus"] as Array).map(ClusterVolumePublishStatusInnerToJSON), + }; } - diff --git a/src/clients/docker/models/ClusterVolumeInfo.ts b/src/clients/docker/models/ClusterVolumeInfo.ts index abcbd426b7..4e7ea2f2a8 100644 --- a/src/clients/docker/models/ClusterVolumeInfo.ts +++ b/src/clients/docker/models/ClusterVolumeInfo.ts @@ -2,99 +2,102 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Information about the global status of the volume. - * + * * @export * @interface ClusterVolumeInfo */ export interface ClusterVolumeInfo { - /** - * The capacity of the volume in bytes. A value of 0 indicates that - * the capacity is unknown. - * - * @type {number} - * @memberof ClusterVolumeInfo - */ - CapacityBytes?: number; - /** - * A map of strings to strings returned from the storage plugin when - * the volume is created. - * - * @type {{ [key: string]: string; }} - * @memberof ClusterVolumeInfo - */ - VolumeContext?: { [key: string]: string; }; - /** - * The ID of the volume as returned by the CSI storage plugin. This - * is distinct from the volume's ID as provided by Docker. This ID - * is never used by the user when communicating with Docker to refer - * to this volume. If the ID is blank, then the Volume has not been - * successfully created in the plugin yet. - * - * @type {string} - * @memberof ClusterVolumeInfo - */ - VolumeID?: string; - /** - * The topology this volume is actually accessible from. - * - * @type {Array<{ [key: string]: string; }>} - * @memberof ClusterVolumeInfo - */ - AccessibleTopology?: Array<{ [key: string]: string; }>; + /** + * The capacity of the volume in bytes. A value of 0 indicates that + * the capacity is unknown. + * + * @type {number} + * @memberof ClusterVolumeInfo + */ + CapacityBytes?: number; + /** + * A map of strings to strings returned from the storage plugin when + * the volume is created. + * + * @type {{ [key: string]: string; }} + * @memberof ClusterVolumeInfo + */ + VolumeContext?: { [key: string]: string }; + /** + * The ID of the volume as returned by the CSI storage plugin. This + * is distinct from the volume's ID as provided by Docker. This ID + * is never used by the user when communicating with Docker to refer + * to this volume. If the ID is blank, then the Volume has not been + * successfully created in the plugin yet. + * + * @type {string} + * @memberof ClusterVolumeInfo + */ + VolumeID?: string; + /** + * The topology this volume is actually accessible from. + * + * @type {Array<{ [key: string]: string; }>} + * @memberof ClusterVolumeInfo + */ + AccessibleTopology?: Array<{ [key: string]: string }>; } /** * Check if a given object implements the ClusterVolumeInfo interface. */ export function instanceOfClusterVolumeInfo(value: object): value is ClusterVolumeInfo { - return true; + return true; } export function ClusterVolumeInfoFromJSON(json: any): ClusterVolumeInfo { - return ClusterVolumeInfoFromJSONTyped(json, false); + return ClusterVolumeInfoFromJSONTyped(json, false); } -export function ClusterVolumeInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeInfo { - if (json == null) { - return json; - } - return { - - 'CapacityBytes': json['CapacityBytes'] == null ? undefined : json['CapacityBytes'], - 'VolumeContext': json['VolumeContext'] == null ? undefined : json['VolumeContext'], - 'VolumeID': json['VolumeID'] == null ? undefined : json['VolumeID'], - 'AccessibleTopology': json['AccessibleTopology'] == null ? undefined : json['AccessibleTopology'], - }; +export function ClusterVolumeInfoFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumeInfo { + if (json == null) { + return json; + } + return { + CapacityBytes: json["CapacityBytes"] == null ? undefined : json["CapacityBytes"], + VolumeContext: json["VolumeContext"] == null ? undefined : json["VolumeContext"], + VolumeID: json["VolumeID"] == null ? undefined : json["VolumeID"], + AccessibleTopology: json["AccessibleTopology"] == null ? undefined : json["AccessibleTopology"], + }; } export function ClusterVolumeInfoToJSON(json: any): ClusterVolumeInfo { - return ClusterVolumeInfoToJSONTyped(json, false); + return ClusterVolumeInfoToJSONTyped(json, false); } -export function ClusterVolumeInfoToJSONTyped(value?: ClusterVolumeInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeInfoToJSONTyped( + value?: ClusterVolumeInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CapacityBytes': value['CapacityBytes'], - 'VolumeContext': value['VolumeContext'], - 'VolumeID': value['VolumeID'], - 'AccessibleTopology': value['AccessibleTopology'], - }; + return { + CapacityBytes: value["CapacityBytes"], + VolumeContext: value["VolumeContext"], + VolumeID: value["VolumeID"], + AccessibleTopology: value["AccessibleTopology"], + }; } - diff --git a/src/clients/docker/models/ClusterVolumePublishStatusInner.ts b/src/clients/docker/models/ClusterVolumePublishStatusInner.ts index 9931ab2567..cfdca0fcc8 100644 --- a/src/clients/docker/models/ClusterVolumePublishStatusInner.ts +++ b/src/clients/docker/models/ClusterVolumePublishStatusInner.ts @@ -2,100 +2,106 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ClusterVolumePublishStatusInner */ export interface ClusterVolumePublishStatusInner { - /** - * The ID of the Swarm node the volume is published on. - * - * @type {string} - * @memberof ClusterVolumePublishStatusInner - */ - NodeID?: string; - /** - * The published state of the volume. - * * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. - * * `published` The volume is published successfully to the node. - * * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. - * * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. - * - * @type {string} - * @memberof ClusterVolumePublishStatusInner - */ - State?: ClusterVolumePublishStatusInnerStateEnum; - /** - * A map of strings to strings returned by the CSI controller - * plugin when a volume is published. - * - * @type {{ [key: string]: string; }} - * @memberof ClusterVolumePublishStatusInner - */ - PublishContext?: { [key: string]: string; }; + /** + * The ID of the Swarm node the volume is published on. + * + * @type {string} + * @memberof ClusterVolumePublishStatusInner + */ + NodeID?: string; + /** + * The published state of the volume. + * * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * * `published` The volume is published successfully to the node. + * * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + * + * @type {string} + * @memberof ClusterVolumePublishStatusInner + */ + State?: ClusterVolumePublishStatusInnerStateEnum; + /** + * A map of strings to strings returned by the CSI controller + * plugin when a volume is published. + * + * @type {{ [key: string]: string; }} + * @memberof ClusterVolumePublishStatusInner + */ + PublishContext?: { [key: string]: string }; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ClusterVolumePublishStatusInnerStateEnum { - PendingPublish = 'pending-publish', - Published = 'published', - PendingNodeUnpublish = 'pending-node-unpublish', - PendingControllerUnpublish = 'pending-controller-unpublish' + PendingPublish = "pending-publish", + Published = "published", + PendingNodeUnpublish = "pending-node-unpublish", + PendingControllerUnpublish = "pending-controller-unpublish", } - /** * Check if a given object implements the ClusterVolumePublishStatusInner interface. */ -export function instanceOfClusterVolumePublishStatusInner(value: object): value is ClusterVolumePublishStatusInner { - return true; +export function instanceOfClusterVolumePublishStatusInner( + value: object, +): value is ClusterVolumePublishStatusInner { + return true; } -export function ClusterVolumePublishStatusInnerFromJSON(json: any): ClusterVolumePublishStatusInner { - return ClusterVolumePublishStatusInnerFromJSONTyped(json, false); +export function ClusterVolumePublishStatusInnerFromJSON( + json: any, +): ClusterVolumePublishStatusInner { + return ClusterVolumePublishStatusInnerFromJSONTyped(json, false); } -export function ClusterVolumePublishStatusInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumePublishStatusInner { - if (json == null) { - return json; - } - return { - - 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], - 'State': json['State'] == null ? undefined : json['State'], - 'PublishContext': json['PublishContext'] == null ? undefined : json['PublishContext'], - }; +export function ClusterVolumePublishStatusInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumePublishStatusInner { + if (json == null) { + return json; + } + return { + NodeID: json["NodeID"] == null ? undefined : json["NodeID"], + State: json["State"] == null ? undefined : json["State"], + PublishContext: json["PublishContext"] == null ? undefined : json["PublishContext"], + }; } export function ClusterVolumePublishStatusInnerToJSON(json: any): ClusterVolumePublishStatusInner { - return ClusterVolumePublishStatusInnerToJSONTyped(json, false); + return ClusterVolumePublishStatusInnerToJSONTyped(json, false); } -export function ClusterVolumePublishStatusInnerToJSONTyped(value?: ClusterVolumePublishStatusInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumePublishStatusInnerToJSONTyped( + value?: ClusterVolumePublishStatusInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NodeID': value['NodeID'], - 'State': value['State'], - 'PublishContext': value['PublishContext'], - }; + return { + NodeID: value["NodeID"], + State: value["State"], + PublishContext: value["PublishContext"], + }; } - diff --git a/src/clients/docker/models/ClusterVolumeSpec.ts b/src/clients/docker/models/ClusterVolumeSpec.ts index e51bf8a34b..1ea03660f7 100644 --- a/src/clients/docker/models/ClusterVolumeSpec.ts +++ b/src/clients/docker/models/ClusterVolumeSpec.ts @@ -2,87 +2,93 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ClusterVolumeSpecAccessMode } from './ClusterVolumeSpecAccessMode'; +import { mapValues } from "../runtime"; +import type { ClusterVolumeSpecAccessMode } from "./ClusterVolumeSpecAccessMode"; import { - ClusterVolumeSpecAccessModeFromJSON, - ClusterVolumeSpecAccessModeFromJSONTyped, - ClusterVolumeSpecAccessModeToJSON, - ClusterVolumeSpecAccessModeToJSONTyped, -} from './ClusterVolumeSpecAccessMode'; + ClusterVolumeSpecAccessModeFromJSON, + ClusterVolumeSpecAccessModeFromJSONTyped, + ClusterVolumeSpecAccessModeToJSON, + ClusterVolumeSpecAccessModeToJSONTyped, +} from "./ClusterVolumeSpecAccessMode"; /** * Cluster-specific options used to create the volume. - * + * * @export * @interface ClusterVolumeSpec */ export interface ClusterVolumeSpec { - /** - * Group defines the volume group of this volume. Volumes belonging to - * the same group can be referred to by group name when creating - * Services. Referring to a volume by group instructs Swarm to treat - * volumes in that group interchangeably for the purpose of scheduling. - * Volumes with an empty string for a group technically all belong to - * the same, emptystring group. - * - * @type {string} - * @memberof ClusterVolumeSpec - */ - Group?: string; - /** - * - * @type {ClusterVolumeSpecAccessMode} - * @memberof ClusterVolumeSpec - */ - AccessMode?: ClusterVolumeSpecAccessMode; + /** + * Group defines the volume group of this volume. Volumes belonging to + * the same group can be referred to by group name when creating + * Services. Referring to a volume by group instructs Swarm to treat + * volumes in that group interchangeably for the purpose of scheduling. + * Volumes with an empty string for a group technically all belong to + * the same, emptystring group. + * + * @type {string} + * @memberof ClusterVolumeSpec + */ + Group?: string; + /** + * + * @type {ClusterVolumeSpecAccessMode} + * @memberof ClusterVolumeSpec + */ + AccessMode?: ClusterVolumeSpecAccessMode; } /** * Check if a given object implements the ClusterVolumeSpec interface. */ export function instanceOfClusterVolumeSpec(value: object): value is ClusterVolumeSpec { - return true; + return true; } export function ClusterVolumeSpecFromJSON(json: any): ClusterVolumeSpec { - return ClusterVolumeSpecFromJSONTyped(json, false); + return ClusterVolumeSpecFromJSONTyped(json, false); } -export function ClusterVolumeSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpec { - if (json == null) { - return json; - } - return { - - 'Group': json['Group'] == null ? undefined : json['Group'], - 'AccessMode': json['AccessMode'] == null ? undefined : ClusterVolumeSpecAccessModeFromJSON(json['AccessMode']), - }; +export function ClusterVolumeSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumeSpec { + if (json == null) { + return json; + } + return { + Group: json["Group"] == null ? undefined : json["Group"], + AccessMode: + json["AccessMode"] == null + ? undefined + : ClusterVolumeSpecAccessModeFromJSON(json["AccessMode"]), + }; } export function ClusterVolumeSpecToJSON(json: any): ClusterVolumeSpec { - return ClusterVolumeSpecToJSONTyped(json, false); + return ClusterVolumeSpecToJSONTyped(json, false); } -export function ClusterVolumeSpecToJSONTyped(value?: ClusterVolumeSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecToJSONTyped( + value?: ClusterVolumeSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Group': value['Group'], - 'AccessMode': ClusterVolumeSpecAccessModeToJSON(value['AccessMode']), - }; + return { + Group: value["Group"], + AccessMode: ClusterVolumeSpecAccessModeToJSON(value["AccessMode"]), + }; } - diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts b/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts index 6b5bf43338..4b69a3399f 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessMode.ts @@ -2,200 +2,220 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ClusterVolumeSpecAccessModeAccessibilityRequirements } from './ClusterVolumeSpecAccessModeAccessibilityRequirements'; +import { mapValues } from "../runtime"; +import type { ClusterVolumeSpecAccessModeAccessibilityRequirements } from "./ClusterVolumeSpecAccessModeAccessibilityRequirements"; import { - ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON, - ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped, - ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON, - ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped, -} from './ClusterVolumeSpecAccessModeAccessibilityRequirements'; -import type { ClusterVolumeSpecAccessModeSecretsInner } from './ClusterVolumeSpecAccessModeSecretsInner'; + ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON, + ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped, + ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON, + ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped, +} from "./ClusterVolumeSpecAccessModeAccessibilityRequirements"; +import type { ClusterVolumeSpecAccessModeSecretsInner } from "./ClusterVolumeSpecAccessModeSecretsInner"; import { - ClusterVolumeSpecAccessModeSecretsInnerFromJSON, - ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped, - ClusterVolumeSpecAccessModeSecretsInnerToJSON, - ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped, -} from './ClusterVolumeSpecAccessModeSecretsInner'; -import type { ClusterVolumeSpecAccessModeCapacityRange } from './ClusterVolumeSpecAccessModeCapacityRange'; + ClusterVolumeSpecAccessModeSecretsInnerFromJSON, + ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped, + ClusterVolumeSpecAccessModeSecretsInnerToJSON, + ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped, +} from "./ClusterVolumeSpecAccessModeSecretsInner"; +import type { ClusterVolumeSpecAccessModeCapacityRange } from "./ClusterVolumeSpecAccessModeCapacityRange"; import { - ClusterVolumeSpecAccessModeCapacityRangeFromJSON, - ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped, - ClusterVolumeSpecAccessModeCapacityRangeToJSON, - ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped, -} from './ClusterVolumeSpecAccessModeCapacityRange'; + ClusterVolumeSpecAccessModeCapacityRangeFromJSON, + ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped, + ClusterVolumeSpecAccessModeCapacityRangeToJSON, + ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped, +} from "./ClusterVolumeSpecAccessModeCapacityRange"; /** * Defines how the volume is used by tasks. - * + * * @export * @interface ClusterVolumeSpecAccessMode */ export interface ClusterVolumeSpecAccessMode { - /** - * The set of nodes this volume can be used on at one time. - * - `single` The volume may only be scheduled to one node at a time. - * - `multi` the volume may be scheduled to any supported number of nodes at a time. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessMode - */ - Scope?: ClusterVolumeSpecAccessModeScopeEnum; - /** - * The number and way that different tasks can use this volume - * at one time. - * - `none` The volume may only be used by one task at a time. - * - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - * - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - * - `all` The volume may have any number of readers and writers. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessMode - */ - Sharing?: ClusterVolumeSpecAccessModeSharingEnum; - /** - * Options for using this volume as a Mount-type volume. - * - * Either MountVolume or BlockVolume, but not both, must be - * present. - * properties: - * FsType: - * type: "string" - * description: | - * Specifies the filesystem type for the mount volume. - * Optional. - * MountFlags: - * type: "array" - * description: | - * Flags to pass when mounting the volume. Optional. - * items: - * type: "string" - * BlockVolume: - * type: "object" - * description: | - * Options for using this volume as a Block-type volume. - * Intentionally empty. - * - * @type {object} - * @memberof ClusterVolumeSpecAccessMode - */ - MountVolume?: object; - /** - * Swarm Secrets that are passed to the CSI storage plugin when - * operating on this volume. - * - * @type {Array} - * @memberof ClusterVolumeSpecAccessMode - */ - Secrets?: Array; - /** - * - * @type {ClusterVolumeSpecAccessModeAccessibilityRequirements} - * @memberof ClusterVolumeSpecAccessMode - */ - AccessibilityRequirements?: ClusterVolumeSpecAccessModeAccessibilityRequirements; - /** - * - * @type {ClusterVolumeSpecAccessModeCapacityRange} - * @memberof ClusterVolumeSpecAccessMode - */ - CapacityRange?: ClusterVolumeSpecAccessModeCapacityRange; - /** - * The availability of the volume for use in tasks. - * - `active` The volume is fully available for scheduling on the cluster - * - `pause` No new workloads should use the volume, but existing workloads are not stopped. - * - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessMode - */ - Availability?: ClusterVolumeSpecAccessModeAvailabilityEnum; + /** + * The set of nodes this volume can be used on at one time. + * - `single` The volume may only be scheduled to one node at a time. + * - `multi` the volume may be scheduled to any supported number of nodes at a time. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessMode + */ + Scope?: ClusterVolumeSpecAccessModeScopeEnum; + /** + * The number and way that different tasks can use this volume + * at one time. + * - `none` The volume may only be used by one task at a time. + * - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + * - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + * - `all` The volume may have any number of readers and writers. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessMode + */ + Sharing?: ClusterVolumeSpecAccessModeSharingEnum; + /** + * Options for using this volume as a Mount-type volume. + * + * Either MountVolume or BlockVolume, but not both, must be + * present. + * properties: + * FsType: + * type: "string" + * description: | + * Specifies the filesystem type for the mount volume. + * Optional. + * MountFlags: + * type: "array" + * description: | + * Flags to pass when mounting the volume. Optional. + * items: + * type: "string" + * BlockVolume: + * type: "object" + * description: | + * Options for using this volume as a Block-type volume. + * Intentionally empty. + * + * @type {object} + * @memberof ClusterVolumeSpecAccessMode + */ + MountVolume?: object; + /** + * Swarm Secrets that are passed to the CSI storage plugin when + * operating on this volume. + * + * @type {Array} + * @memberof ClusterVolumeSpecAccessMode + */ + Secrets?: Array; + /** + * + * @type {ClusterVolumeSpecAccessModeAccessibilityRequirements} + * @memberof ClusterVolumeSpecAccessMode + */ + AccessibilityRequirements?: ClusterVolumeSpecAccessModeAccessibilityRequirements; + /** + * + * @type {ClusterVolumeSpecAccessModeCapacityRange} + * @memberof ClusterVolumeSpecAccessMode + */ + CapacityRange?: ClusterVolumeSpecAccessModeCapacityRange; + /** + * The availability of the volume for use in tasks. + * - `active` The volume is fully available for scheduling on the cluster + * - `pause` No new workloads should use the volume, but existing workloads are not stopped. + * - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessMode + */ + Availability?: ClusterVolumeSpecAccessModeAvailabilityEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ClusterVolumeSpecAccessModeScopeEnum { - Single = 'single', - Multi = 'multi' + Single = "single", + Multi = "multi", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ClusterVolumeSpecAccessModeSharingEnum { - None = 'none', - Readonly = 'readonly', - Onewriter = 'onewriter', - All = 'all' + None = "none", + Readonly = "readonly", + Onewriter = "onewriter", + All = "all", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ClusterVolumeSpecAccessModeAvailabilityEnum { - Active = 'active', - Pause = 'pause', - Drain = 'drain' + Active = "active", + Pause = "pause", + Drain = "drain", } - /** * Check if a given object implements the ClusterVolumeSpecAccessMode interface. */ -export function instanceOfClusterVolumeSpecAccessMode(value: object): value is ClusterVolumeSpecAccessMode { - return true; +export function instanceOfClusterVolumeSpecAccessMode( + value: object, +): value is ClusterVolumeSpecAccessMode { + return true; } export function ClusterVolumeSpecAccessModeFromJSON(json: any): ClusterVolumeSpecAccessMode { - return ClusterVolumeSpecAccessModeFromJSONTyped(json, false); + return ClusterVolumeSpecAccessModeFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessMode { - if (json == null) { - return json; - } - return { - - 'Scope': json['Scope'] == null ? undefined : json['Scope'], - 'Sharing': json['Sharing'] == null ? undefined : json['Sharing'], - 'MountVolume': json['MountVolume'] == null ? undefined : json['MountVolume'], - 'Secrets': json['Secrets'] == null ? undefined : ((json['Secrets'] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerFromJSON)), - 'AccessibilityRequirements': json['AccessibilityRequirements'] == null ? undefined : ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON(json['AccessibilityRequirements']), - 'CapacityRange': json['CapacityRange'] == null ? undefined : ClusterVolumeSpecAccessModeCapacityRangeFromJSON(json['CapacityRange']), - 'Availability': json['Availability'] == null ? undefined : json['Availability'], - }; +export function ClusterVolumeSpecAccessModeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumeSpecAccessMode { + if (json == null) { + return json; + } + return { + Scope: json["Scope"] == null ? undefined : json["Scope"], + Sharing: json["Sharing"] == null ? undefined : json["Sharing"], + MountVolume: json["MountVolume"] == null ? undefined : json["MountVolume"], + Secrets: + json["Secrets"] == null + ? undefined + : (json["Secrets"] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerFromJSON), + AccessibilityRequirements: + json["AccessibilityRequirements"] == null + ? undefined + : ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON( + json["AccessibilityRequirements"], + ), + CapacityRange: + json["CapacityRange"] == null + ? undefined + : ClusterVolumeSpecAccessModeCapacityRangeFromJSON(json["CapacityRange"]), + Availability: json["Availability"] == null ? undefined : json["Availability"], + }; } export function ClusterVolumeSpecAccessModeToJSON(json: any): ClusterVolumeSpecAccessMode { - return ClusterVolumeSpecAccessModeToJSONTyped(json, false); + return ClusterVolumeSpecAccessModeToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeToJSONTyped(value?: ClusterVolumeSpecAccessMode | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeToJSONTyped( + value?: ClusterVolumeSpecAccessMode | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Scope': value['Scope'], - 'Sharing': value['Sharing'], - 'MountVolume': value['MountVolume'], - 'Secrets': value['Secrets'] == null ? undefined : ((value['Secrets'] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerToJSON)), - 'AccessibilityRequirements': ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON(value['AccessibilityRequirements']), - 'CapacityRange': ClusterVolumeSpecAccessModeCapacityRangeToJSON(value['CapacityRange']), - 'Availability': value['Availability'], - }; + return { + Scope: value["Scope"], + Sharing: value["Sharing"], + MountVolume: value["MountVolume"], + Secrets: + value["Secrets"] == null + ? undefined + : (value["Secrets"] as Array).map(ClusterVolumeSpecAccessModeSecretsInnerToJSON), + AccessibilityRequirements: ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON( + value["AccessibilityRequirements"], + ), + CapacityRange: ClusterVolumeSpecAccessModeCapacityRangeToJSON(value["CapacityRange"]), + Availability: value["Availability"], + }; } - diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts b/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts index 455e96e6b5..d12e7a6ca6 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessModeAccessibilityRequirements.ts @@ -2,79 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface ClusterVolumeSpecAccessModeAccessibilityRequirements */ export interface ClusterVolumeSpecAccessModeAccessibilityRequirements { - /** - * A list of required topologies, at least one of which the - * volume must be accessible from. - * - * @type {Array<{ [key: string]: string; }>} - * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements - */ - Requisite?: Array<{ [key: string]: string; }>; - /** - * A list of topologies that the volume should attempt to be - * provisioned in. - * - * @type {Array<{ [key: string]: string; }>} - * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements - */ - Preferred?: Array<{ [key: string]: string; }>; + /** + * A list of required topologies, at least one of which the + * volume must be accessible from. + * + * @type {Array<{ [key: string]: string; }>} + * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements + */ + Requisite?: Array<{ [key: string]: string }>; + /** + * A list of topologies that the volume should attempt to be + * provisioned in. + * + * @type {Array<{ [key: string]: string; }>} + * @memberof ClusterVolumeSpecAccessModeAccessibilityRequirements + */ + Preferred?: Array<{ [key: string]: string }>; } /** * Check if a given object implements the ClusterVolumeSpecAccessModeAccessibilityRequirements interface. */ -export function instanceOfClusterVolumeSpecAccessModeAccessibilityRequirements(value: object): value is ClusterVolumeSpecAccessModeAccessibilityRequirements { - return true; +export function instanceOfClusterVolumeSpecAccessModeAccessibilityRequirements( + value: object, +): value is ClusterVolumeSpecAccessModeAccessibilityRequirements { + return true; } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON(json: any): ClusterVolumeSpecAccessModeAccessibilityRequirements { - return ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSON( + json: any, +): ClusterVolumeSpecAccessModeAccessibilityRequirements { + return ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessModeAccessibilityRequirements { - if (json == null) { - return json; - } - return { - - 'Requisite': json['Requisite'] == null ? undefined : json['Requisite'], - 'Preferred': json['Preferred'] == null ? undefined : json['Preferred'], - }; +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumeSpecAccessModeAccessibilityRequirements { + if (json == null) { + return json; + } + return { + Requisite: json["Requisite"] == null ? undefined : json["Requisite"], + Preferred: json["Preferred"] == null ? undefined : json["Preferred"], + }; } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON(json: any): ClusterVolumeSpecAccessModeAccessibilityRequirements { - return ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSON( + json: any, +): ClusterVolumeSpecAccessModeAccessibilityRequirements { + return ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped(value?: ClusterVolumeSpecAccessModeAccessibilityRequirements | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeAccessibilityRequirementsToJSONTyped( + value?: ClusterVolumeSpecAccessModeAccessibilityRequirements | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Requisite': value['Requisite'], - 'Preferred': value['Preferred'], - }; + return { + Requisite: value["Requisite"], + Preferred: value["Preferred"], + }; } - diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts b/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts index 9fa3f7ee24..680ae0dfe2 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessModeCapacityRange.ts @@ -2,78 +2,87 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The desired capacity that the volume should be created with. If * empty, the plugin will decide the capacity. - * + * * @export * @interface ClusterVolumeSpecAccessModeCapacityRange */ export interface ClusterVolumeSpecAccessModeCapacityRange { - /** - * The volume must be at least this big. The value of 0 - * indicates an unspecified minimum - * - * @type {number} - * @memberof ClusterVolumeSpecAccessModeCapacityRange - */ - RequiredBytes?: number; - /** - * The volume must not be bigger than this. The value of 0 - * indicates an unspecified maximum. - * - * @type {number} - * @memberof ClusterVolumeSpecAccessModeCapacityRange - */ - LimitBytes?: number; + /** + * The volume must be at least this big. The value of 0 + * indicates an unspecified minimum + * + * @type {number} + * @memberof ClusterVolumeSpecAccessModeCapacityRange + */ + RequiredBytes?: number; + /** + * The volume must not be bigger than this. The value of 0 + * indicates an unspecified maximum. + * + * @type {number} + * @memberof ClusterVolumeSpecAccessModeCapacityRange + */ + LimitBytes?: number; } /** * Check if a given object implements the ClusterVolumeSpecAccessModeCapacityRange interface. */ -export function instanceOfClusterVolumeSpecAccessModeCapacityRange(value: object): value is ClusterVolumeSpecAccessModeCapacityRange { - return true; +export function instanceOfClusterVolumeSpecAccessModeCapacityRange( + value: object, +): value is ClusterVolumeSpecAccessModeCapacityRange { + return true; } -export function ClusterVolumeSpecAccessModeCapacityRangeFromJSON(json: any): ClusterVolumeSpecAccessModeCapacityRange { - return ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeCapacityRangeFromJSON( + json: any, +): ClusterVolumeSpecAccessModeCapacityRange { + return ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessModeCapacityRange { - if (json == null) { - return json; - } - return { - - 'RequiredBytes': json['RequiredBytes'] == null ? undefined : json['RequiredBytes'], - 'LimitBytes': json['LimitBytes'] == null ? undefined : json['LimitBytes'], - }; +export function ClusterVolumeSpecAccessModeCapacityRangeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumeSpecAccessModeCapacityRange { + if (json == null) { + return json; + } + return { + RequiredBytes: json["RequiredBytes"] == null ? undefined : json["RequiredBytes"], + LimitBytes: json["LimitBytes"] == null ? undefined : json["LimitBytes"], + }; } -export function ClusterVolumeSpecAccessModeCapacityRangeToJSON(json: any): ClusterVolumeSpecAccessModeCapacityRange { - return ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeCapacityRangeToJSON( + json: any, +): ClusterVolumeSpecAccessModeCapacityRange { + return ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped(value?: ClusterVolumeSpecAccessModeCapacityRange | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeCapacityRangeToJSONTyped( + value?: ClusterVolumeSpecAccessModeCapacityRange | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'RequiredBytes': value['RequiredBytes'], - 'LimitBytes': value['LimitBytes'], - }; + return { + RequiredBytes: value["RequiredBytes"], + LimitBytes: value["LimitBytes"], + }; } - diff --git a/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts b/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts index 813377e88a..4a04bf832c 100644 --- a/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts +++ b/src/clients/docker/models/ClusterVolumeSpecAccessModeSecretsInner.ts @@ -2,80 +2,89 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * One cluster volume secret entry. Defines a key-value pair that * is passed to the plugin. - * + * * @export * @interface ClusterVolumeSpecAccessModeSecretsInner */ export interface ClusterVolumeSpecAccessModeSecretsInner { - /** - * Key is the name of the key of the key-value pair passed to - * the plugin. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessModeSecretsInner - */ - Key?: string; - /** - * Secret is the swarm Secret object from which to read data. - * This can be a Secret name or ID. The Secret data is - * retrieved by swarm and used as the value of the key-value - * pair passed to the plugin. - * - * @type {string} - * @memberof ClusterVolumeSpecAccessModeSecretsInner - */ - Secret?: string; + /** + * Key is the name of the key of the key-value pair passed to + * the plugin. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessModeSecretsInner + */ + Key?: string; + /** + * Secret is the swarm Secret object from which to read data. + * This can be a Secret name or ID. The Secret data is + * retrieved by swarm and used as the value of the key-value + * pair passed to the plugin. + * + * @type {string} + * @memberof ClusterVolumeSpecAccessModeSecretsInner + */ + Secret?: string; } /** * Check if a given object implements the ClusterVolumeSpecAccessModeSecretsInner interface. */ -export function instanceOfClusterVolumeSpecAccessModeSecretsInner(value: object): value is ClusterVolumeSpecAccessModeSecretsInner { - return true; +export function instanceOfClusterVolumeSpecAccessModeSecretsInner( + value: object, +): value is ClusterVolumeSpecAccessModeSecretsInner { + return true; } -export function ClusterVolumeSpecAccessModeSecretsInnerFromJSON(json: any): ClusterVolumeSpecAccessModeSecretsInner { - return ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeSecretsInnerFromJSON( + json: any, +): ClusterVolumeSpecAccessModeSecretsInner { + return ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterVolumeSpecAccessModeSecretsInner { - if (json == null) { - return json; - } - return { - - 'Key': json['Key'] == null ? undefined : json['Key'], - 'Secret': json['Secret'] == null ? undefined : json['Secret'], - }; +export function ClusterVolumeSpecAccessModeSecretsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterVolumeSpecAccessModeSecretsInner { + if (json == null) { + return json; + } + return { + Key: json["Key"] == null ? undefined : json["Key"], + Secret: json["Secret"] == null ? undefined : json["Secret"], + }; } -export function ClusterVolumeSpecAccessModeSecretsInnerToJSON(json: any): ClusterVolumeSpecAccessModeSecretsInner { - return ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped(json, false); +export function ClusterVolumeSpecAccessModeSecretsInnerToJSON( + json: any, +): ClusterVolumeSpecAccessModeSecretsInner { + return ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped(json, false); } -export function ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped(value?: ClusterVolumeSpecAccessModeSecretsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterVolumeSpecAccessModeSecretsInnerToJSONTyped( + value?: ClusterVolumeSpecAccessModeSecretsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Key': value['Key'], - 'Secret': value['Secret'], - }; + return { + Key: value["Key"], + Secret: value["Secret"], + }; } - diff --git a/src/clients/docker/models/Commit.ts b/src/clients/docker/models/Commit.ts index 77981fab24..54cb1ebbef 100644 --- a/src/clients/docker/models/Commit.ts +++ b/src/clients/docker/models/Commit.ts @@ -2,76 +2,76 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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`. - * + * * @export * @interface Commit */ export interface Commit { - /** - * Actual commit ID of external tool. - * @type {string} - * @memberof Commit - */ - ID?: string; - /** - * Commit ID of external tool expected by dockerd as set at build time. - * - * @type {string} - * @memberof Commit - */ - Expected?: string; + /** + * Actual commit ID of external tool. + * @type {string} + * @memberof Commit + */ + ID?: string; + /** + * Commit ID of external tool expected by dockerd as set at build time. + * + * @type {string} + * @memberof Commit + */ + Expected?: string; } /** * Check if a given object implements the Commit interface. */ export function instanceOfCommit(value: object): value is Commit { - return true; + return true; } export function CommitFromJSON(json: any): Commit { - return CommitFromJSONTyped(json, false); + return CommitFromJSONTyped(json, false); } export function CommitFromJSONTyped(json: any, ignoreDiscriminator: boolean): Commit { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Expected': json['Expected'] == null ? undefined : json['Expected'], - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Expected: json["Expected"] == null ? undefined : json["Expected"], + }; } export function CommitToJSON(json: any): Commit { - return CommitToJSONTyped(json, false); + return CommitToJSONTyped(json, false); } -export function CommitToJSONTyped(value?: Commit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CommitToJSONTyped( + value?: Commit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Expected': value['Expected'], - }; + return { + ID: value["ID"], + Expected: value["Expected"], + }; } - diff --git a/src/clients/docker/models/Config.ts b/src/clients/docker/models/Config.ts index 1f1d0251d5..4271f6f394 100644 --- a/src/clients/docker/models/Config.ts +++ b/src/clients/docker/models/Config.ts @@ -2,111 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { ConfigSpec } from './ConfigSpec'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { ConfigSpec } from "./ConfigSpec"; import { - ConfigSpecFromJSON, - ConfigSpecFromJSONTyped, - ConfigSpecToJSON, - ConfigSpecToJSONTyped, -} from './ConfigSpec'; + ConfigSpecFromJSON, + ConfigSpecFromJSONTyped, + ConfigSpecToJSON, + ConfigSpecToJSONTyped, +} from "./ConfigSpec"; /** - * + * * @export * @interface Config */ export interface Config { - /** - * - * @type {string} - * @memberof Config - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Config - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Config - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Config - */ - UpdatedAt?: string; - /** - * - * @type {ConfigSpec} - * @memberof Config - */ - Spec?: ConfigSpec; + /** + * + * @type {string} + * @memberof Config + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Config + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Config + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Config + */ + UpdatedAt?: string; + /** + * + * @type {ConfigSpec} + * @memberof Config + */ + Spec?: ConfigSpec; } /** * Check if a given object implements the Config interface. */ export function instanceOfConfig(value: object): value is Config { - return true; + return true; } export function ConfigFromJSON(json: any): Config { - return ConfigFromJSONTyped(json, false); + return ConfigFromJSONTyped(json, false); } export function ConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): Config { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : ConfigSpecFromJSON(json['Spec']), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : ConfigSpecFromJSON(json["Spec"]), + }; } export function ConfigToJSON(json: any): Config { - return ConfigToJSONTyped(json, false); + return ConfigToJSONTyped(json, false); } -export function ConfigToJSONTyped(value?: Config | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigToJSONTyped( + value?: Config | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': ConfigSpecToJSON(value['Spec']), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: ConfigSpecToJSON(value["Spec"]), + }; } - diff --git a/src/clients/docker/models/ConfigCreateRequest.ts b/src/clients/docker/models/ConfigCreateRequest.ts index 0cc4831786..a918cd09b1 100644 --- a/src/clients/docker/models/ConfigCreateRequest.ts +++ b/src/clients/docker/models/ConfigCreateRequest.ts @@ -2,98 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Driver } from './Driver'; -import { - DriverFromJSON, - DriverFromJSONTyped, - DriverToJSON, - DriverToJSONTyped, -} from './Driver'; +import { mapValues } from "../runtime"; +import type { Driver } from "./Driver"; +import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; /** - * + * * @export * @interface ConfigCreateRequest */ export interface ConfigCreateRequest { - /** - * User-defined name of the config. - * @type {string} - * @memberof ConfigCreateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ConfigCreateRequest - */ - Labels?: { [key: string]: string; }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. - * - * @type {string} - * @memberof ConfigCreateRequest - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof ConfigCreateRequest - */ - Templating?: Driver; + /** + * User-defined name of the config. + * @type {string} + * @memberof ConfigCreateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ConfigCreateRequest + */ + Labels?: { [key: string]: string }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * config data. + * + * @type {string} + * @memberof ConfigCreateRequest + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof ConfigCreateRequest + */ + Templating?: Driver; } /** * Check if a given object implements the ConfigCreateRequest interface. */ export function instanceOfConfigCreateRequest(value: object): value is ConfigCreateRequest { - return true; + return true; } export function ConfigCreateRequestFromJSON(json: any): ConfigCreateRequest { - return ConfigCreateRequestFromJSONTyped(json, false); + return ConfigCreateRequestFromJSONTyped(json, false); } -export function ConfigCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigCreateRequest { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Data': json['Data'] == null ? undefined : json['Data'], - 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), - }; +export function ConfigCreateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigCreateRequest { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Data: json["Data"] == null ? undefined : json["Data"], + Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), + }; } export function ConfigCreateRequestToJSON(json: any): ConfigCreateRequest { - return ConfigCreateRequestToJSONTyped(json, false); + return ConfigCreateRequestToJSONTyped(json, false); } -export function ConfigCreateRequestToJSONTyped(value?: ConfigCreateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigCreateRequestToJSONTyped( + value?: ConfigCreateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Data': value['Data'], - 'Templating': DriverToJSON(value['Templating']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + Data: value["Data"], + Templating: DriverToJSON(value["Templating"]), + }; } - diff --git a/src/clients/docker/models/ConfigReference.ts b/src/clients/docker/models/ConfigReference.ts index 961f1982d8..ee2d952b47 100644 --- a/src/clients/docker/models/ConfigReference.ts +++ b/src/clients/docker/models/ConfigReference.ts @@ -2,69 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The config-only network source to provide the configuration for * this network. - * + * * @export * @interface ConfigReference */ export interface ConfigReference { - /** - * The name of the config-only network that provides the network's - * configuration. The specified network must be an existing config-only - * network. Only network names are allowed, not network IDs. - * - * @type {string} - * @memberof ConfigReference - */ - Network?: string; + /** + * The name of the config-only network that provides the network's + * configuration. The specified network must be an existing config-only + * network. Only network names are allowed, not network IDs. + * + * @type {string} + * @memberof ConfigReference + */ + Network?: string; } /** * Check if a given object implements the ConfigReference interface. */ export function instanceOfConfigReference(value: object): value is ConfigReference { - return true; + return true; } export function ConfigReferenceFromJSON(json: any): ConfigReference { - return ConfigReferenceFromJSONTyped(json, false); + return ConfigReferenceFromJSONTyped(json, false); } -export function ConfigReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigReference { - if (json == null) { - return json; - } - return { - - 'Network': json['Network'] == null ? undefined : json['Network'], - }; +export function ConfigReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigReference { + if (json == null) { + return json; + } + return { + Network: json["Network"] == null ? undefined : json["Network"], + }; } export function ConfigReferenceToJSON(json: any): ConfigReference { - return ConfigReferenceToJSONTyped(json, false); + return ConfigReferenceToJSONTyped(json, false); } -export function ConfigReferenceToJSONTyped(value?: ConfigReference | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigReferenceToJSONTyped( + value?: ConfigReference | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Network': value['Network'], - }; + return { + Network: value["Network"], + }; } - diff --git a/src/clients/docker/models/ConfigSpec.ts b/src/clients/docker/models/ConfigSpec.ts index dd4ab14230..240c4fb612 100644 --- a/src/clients/docker/models/ConfigSpec.ts +++ b/src/clients/docker/models/ConfigSpec.ts @@ -2,98 +2,93 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Driver } from './Driver'; -import { - DriverFromJSON, - DriverFromJSONTyped, - DriverToJSON, - DriverToJSONTyped, -} from './Driver'; +import { mapValues } from "../runtime"; +import type { Driver } from "./Driver"; +import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; /** - * + * * @export * @interface ConfigSpec */ export interface ConfigSpec { - /** - * User-defined name of the config. - * @type {string} - * @memberof ConfigSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ConfigSpec - */ - Labels?: { [key: string]: string; }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * config data. - * - * @type {string} - * @memberof ConfigSpec - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof ConfigSpec - */ - Templating?: Driver; + /** + * User-defined name of the config. + * @type {string} + * @memberof ConfigSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ConfigSpec + */ + Labels?: { [key: string]: string }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * config data. + * + * @type {string} + * @memberof ConfigSpec + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof ConfigSpec + */ + Templating?: Driver; } /** * Check if a given object implements the ConfigSpec interface. */ export function instanceOfConfigSpec(value: object): value is ConfigSpec { - return true; + return true; } export function ConfigSpecFromJSON(json: any): ConfigSpec { - return ConfigSpecFromJSONTyped(json, false); + return ConfigSpecFromJSONTyped(json, false); } export function ConfigSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigSpec { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Data': json['Data'] == null ? undefined : json['Data'], - 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Data: json["Data"] == null ? undefined : json["Data"], + Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), + }; } export function ConfigSpecToJSON(json: any): ConfigSpec { - return ConfigSpecToJSONTyped(json, false); + return ConfigSpecToJSONTyped(json, false); } -export function ConfigSpecToJSONTyped(value?: ConfigSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigSpecToJSONTyped( + value?: ConfigSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Data': value['Data'], - 'Templating': DriverToJSON(value['Templating']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + Data: value["Data"], + Templating: DriverToJSON(value["Templating"]), + }; } - diff --git a/src/clients/docker/models/ContainerConfig.ts b/src/clients/docker/models/ContainerConfig.ts index 12b57c2a4e..cd31d5f7f9 100644 --- a/src/clients/docker/models/ContainerConfig.ts +++ b/src/clients/docker/models/ContainerConfig.ts @@ -2,294 +2,298 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { HealthConfig } from './HealthConfig'; +import { mapValues } from "../runtime"; +import type { HealthConfig } from "./HealthConfig"; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from './HealthConfig'; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from "./HealthConfig"; /** * 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. - * + * * @export * @interface ContainerConfig */ export interface ContainerConfig { - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - * @type {string} - * @memberof ContainerConfig - */ - Hostname?: string; - /** - * The domain name to use for the container. - * - * @type {string} - * @memberof ContainerConfig - */ - Domainname?: string; - /** - * The user that commands are run as inside the container. - * @type {string} - * @memberof ContainerConfig - */ - User?: string; - /** - * Whether to attach to `stdin`. - * @type {boolean} - * @memberof ContainerConfig - */ - AttachStdin?: boolean; - /** - * Whether to attach to `stdout`. - * @type {boolean} - * @memberof ContainerConfig - */ - AttachStdout?: boolean; - /** - * Whether to attach to `stderr`. - * @type {boolean} - * @memberof ContainerConfig - */ - AttachStderr?: boolean; - /** - * An object mapping ports to an empty object in the form: - * - * `{"/": {}}` - * - * @type {{ [key: string]: object; }} - * @memberof ContainerConfig - */ - ExposedPorts?: { [key: string]: object; } | null; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @type {boolean} - * @memberof ContainerConfig - */ - Tty?: boolean; - /** - * Open `stdin` - * @type {boolean} - * @memberof ContainerConfig - */ - OpenStdin?: boolean; - /** - * Close `stdin` after one attached client disconnects - * @type {boolean} - * @memberof ContainerConfig - */ - StdinOnce?: boolean; - /** - * A list of environment variables to set inside the container in the - * form `["VAR=value", ...]`. A variable without `=` is removed from the - * environment, rather than to have an empty value. - * - * @type {Array} - * @memberof ContainerConfig - */ - Env?: Array; - /** - * Command to run specified as a string or an array of strings. - * - * @type {Array} - * @memberof ContainerConfig - */ - Cmd?: Array; - /** - * - * @type {HealthConfig} - * @memberof ContainerConfig - */ - Healthcheck?: HealthConfig; - /** - * Command is already escaped (Windows only) - * @type {boolean} - * @memberof ContainerConfig - */ - ArgsEscaped?: boolean | null; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - * @type {string} - * @memberof ContainerConfig - */ - Image?: string; - /** - * An object mapping mount point paths inside the container to empty - * objects. - * - * @type {{ [key: string]: object; }} - * @memberof ContainerConfig - */ - Volumes?: { [key: string]: object; }; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof ContainerConfig - */ - WorkingDir?: string; - /** - * The entry point for the container as a string or an array of strings. - * - * If the array consists of exactly one empty string (`[""]`) then the - * entry point is reset to system default (i.e., the entry point used by - * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - * - * @type {Array} - * @memberof ContainerConfig - */ - Entrypoint?: Array; - /** - * Disable networking for the container. - * @type {boolean} - * @memberof ContainerConfig - */ - NetworkDisabled?: boolean | null; - /** - * MAC address of the container. - * @type {string} - * @memberof ContainerConfig - */ - MacAddress?: string | null; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @type {Array} - * @memberof ContainerConfig - */ - OnBuild?: Array | null; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ContainerConfig - */ - Labels?: { [key: string]: string; }; - /** - * Signal to stop a container as a string or unsigned integer. - * - * @type {string} - * @memberof ContainerConfig - */ - StopSignal?: string | null; - /** - * Timeout to stop a container in seconds. - * @type {number} - * @memberof ContainerConfig - */ - StopTimeout?: number | null; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @type {Array} - * @memberof ContainerConfig - */ - Shell?: Array | null; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @type {string} + * @memberof ContainerConfig + */ + Hostname?: string; + /** + * The domain name to use for the container. + * + * @type {string} + * @memberof ContainerConfig + */ + Domainname?: string; + /** + * The user that commands are run as inside the container. + * @type {string} + * @memberof ContainerConfig + */ + User?: string; + /** + * Whether to attach to `stdin`. + * @type {boolean} + * @memberof ContainerConfig + */ + AttachStdin?: boolean; + /** + * Whether to attach to `stdout`. + * @type {boolean} + * @memberof ContainerConfig + */ + AttachStdout?: boolean; + /** + * Whether to attach to `stderr`. + * @type {boolean} + * @memberof ContainerConfig + */ + AttachStderr?: boolean; + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + * + * @type {{ [key: string]: object; }} + * @memberof ContainerConfig + */ + ExposedPorts?: { [key: string]: object } | null; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @type {boolean} + * @memberof ContainerConfig + */ + Tty?: boolean; + /** + * Open `stdin` + * @type {boolean} + * @memberof ContainerConfig + */ + OpenStdin?: boolean; + /** + * Close `stdin` after one attached client disconnects + * @type {boolean} + * @memberof ContainerConfig + */ + StdinOnce?: boolean; + /** + * A list of environment variables to set inside the container in the + * form `["VAR=value", ...]`. A variable without `=` is removed from the + * environment, rather than to have an empty value. + * + * @type {Array} + * @memberof ContainerConfig + */ + Env?: Array; + /** + * Command to run specified as a string or an array of strings. + * + * @type {Array} + * @memberof ContainerConfig + */ + Cmd?: Array; + /** + * + * @type {HealthConfig} + * @memberof ContainerConfig + */ + Healthcheck?: HealthConfig; + /** + * Command is already escaped (Windows only) + * @type {boolean} + * @memberof ContainerConfig + */ + ArgsEscaped?: boolean | null; + /** + * The name (or reference) of the image to use when creating the container, + * or which was used when the container was created. + * + * @type {string} + * @memberof ContainerConfig + */ + Image?: string; + /** + * An object mapping mount point paths inside the container to empty + * objects. + * + * @type {{ [key: string]: object; }} + * @memberof ContainerConfig + */ + Volumes?: { [key: string]: object }; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof ContainerConfig + */ + WorkingDir?: string; + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the + * entry point is reset to system default (i.e., the entry point used by + * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + * + * @type {Array} + * @memberof ContainerConfig + */ + Entrypoint?: Array; + /** + * Disable networking for the container. + * @type {boolean} + * @memberof ContainerConfig + */ + NetworkDisabled?: boolean | null; + /** + * MAC address of the container. + * @type {string} + * @memberof ContainerConfig + */ + MacAddress?: string | null; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @type {Array} + * @memberof ContainerConfig + */ + OnBuild?: Array | null; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ContainerConfig + */ + Labels?: { [key: string]: string }; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @type {string} + * @memberof ContainerConfig + */ + StopSignal?: string | null; + /** + * Timeout to stop a container in seconds. + * @type {number} + * @memberof ContainerConfig + */ + StopTimeout?: number | null; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @type {Array} + * @memberof ContainerConfig + */ + Shell?: Array | null; } /** * Check if a given object implements the ContainerConfig interface. */ export function instanceOfContainerConfig(value: object): value is ContainerConfig { - return true; + return true; } export function ContainerConfigFromJSON(json: any): ContainerConfig { - return ContainerConfigFromJSONTyped(json, false); + return ContainerConfigFromJSONTyped(json, false); } -export function ContainerConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerConfig { - if (json == null) { - return json; - } - return { - - 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], - 'Domainname': json['Domainname'] == null ? undefined : json['Domainname'], - 'User': json['User'] == null ? undefined : json['User'], - 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], - 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], - 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], - 'ExposedPorts': json['ExposedPorts'] == null ? undefined : json['ExposedPorts'], - 'Tty': json['Tty'] == null ? undefined : json['Tty'], - 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], - 'StdinOnce': json['StdinOnce'] == null ? undefined : json['StdinOnce'], - 'Env': json['Env'] == null ? undefined : json['Env'], - 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], - 'Healthcheck': json['Healthcheck'] == null ? undefined : HealthConfigFromJSON(json['Healthcheck']), - 'ArgsEscaped': json['ArgsEscaped'] == null ? undefined : json['ArgsEscaped'], - 'Image': json['Image'] == null ? undefined : json['Image'], - 'Volumes': json['Volumes'] == null ? undefined : json['Volumes'], - 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], - 'Entrypoint': json['Entrypoint'] == null ? undefined : json['Entrypoint'], - 'NetworkDisabled': json['NetworkDisabled'] == null ? undefined : json['NetworkDisabled'], - 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], - 'OnBuild': json['OnBuild'] == null ? undefined : json['OnBuild'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], - 'StopTimeout': json['StopTimeout'] == null ? undefined : json['StopTimeout'], - 'Shell': json['Shell'] == null ? undefined : json['Shell'], - }; +export function ContainerConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerConfig { + if (json == null) { + return json; + } + return { + Hostname: json["Hostname"] == null ? undefined : json["Hostname"], + Domainname: json["Domainname"] == null ? undefined : json["Domainname"], + User: json["User"] == null ? undefined : json["User"], + AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], + AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], + AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], + ExposedPorts: json["ExposedPorts"] == null ? undefined : json["ExposedPorts"], + Tty: json["Tty"] == null ? undefined : json["Tty"], + OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], + StdinOnce: json["StdinOnce"] == null ? undefined : json["StdinOnce"], + Env: json["Env"] == null ? undefined : json["Env"], + Cmd: json["Cmd"] == null ? undefined : json["Cmd"], + Healthcheck: + json["Healthcheck"] == null ? undefined : HealthConfigFromJSON(json["Healthcheck"]), + ArgsEscaped: json["ArgsEscaped"] == null ? undefined : json["ArgsEscaped"], + Image: json["Image"] == null ? undefined : json["Image"], + Volumes: json["Volumes"] == null ? undefined : json["Volumes"], + WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], + Entrypoint: json["Entrypoint"] == null ? undefined : json["Entrypoint"], + NetworkDisabled: json["NetworkDisabled"] == null ? undefined : json["NetworkDisabled"], + MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], + OnBuild: json["OnBuild"] == null ? undefined : json["OnBuild"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], + StopTimeout: json["StopTimeout"] == null ? undefined : json["StopTimeout"], + Shell: json["Shell"] == null ? undefined : json["Shell"], + }; } export function ContainerConfigToJSON(json: any): ContainerConfig { - return ContainerConfigToJSONTyped(json, false); + return ContainerConfigToJSONTyped(json, false); } -export function ContainerConfigToJSONTyped(value?: ContainerConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerConfigToJSONTyped( + value?: ContainerConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Hostname': value['Hostname'], - 'Domainname': value['Domainname'], - 'User': value['User'], - 'AttachStdin': value['AttachStdin'], - 'AttachStdout': value['AttachStdout'], - 'AttachStderr': value['AttachStderr'], - 'ExposedPorts': value['ExposedPorts'], - 'Tty': value['Tty'], - 'OpenStdin': value['OpenStdin'], - 'StdinOnce': value['StdinOnce'], - 'Env': value['Env'], - 'Cmd': value['Cmd'], - 'Healthcheck': HealthConfigToJSON(value['Healthcheck']), - 'ArgsEscaped': value['ArgsEscaped'], - 'Image': value['Image'], - 'Volumes': value['Volumes'], - 'WorkingDir': value['WorkingDir'], - 'Entrypoint': value['Entrypoint'], - 'NetworkDisabled': value['NetworkDisabled'], - 'MacAddress': value['MacAddress'], - 'OnBuild': value['OnBuild'], - 'Labels': value['Labels'], - 'StopSignal': value['StopSignal'], - 'StopTimeout': value['StopTimeout'], - 'Shell': value['Shell'], - }; + return { + Hostname: value["Hostname"], + Domainname: value["Domainname"], + User: value["User"], + AttachStdin: value["AttachStdin"], + AttachStdout: value["AttachStdout"], + AttachStderr: value["AttachStderr"], + ExposedPorts: value["ExposedPorts"], + Tty: value["Tty"], + OpenStdin: value["OpenStdin"], + StdinOnce: value["StdinOnce"], + Env: value["Env"], + Cmd: value["Cmd"], + Healthcheck: HealthConfigToJSON(value["Healthcheck"]), + ArgsEscaped: value["ArgsEscaped"], + Image: value["Image"], + Volumes: value["Volumes"], + WorkingDir: value["WorkingDir"], + Entrypoint: value["Entrypoint"], + NetworkDisabled: value["NetworkDisabled"], + MacAddress: value["MacAddress"], + OnBuild: value["OnBuild"], + Labels: value["Labels"], + StopSignal: value["StopSignal"], + StopTimeout: value["StopTimeout"], + Shell: value["Shell"], + }; } - diff --git a/src/clients/docker/models/ContainerCreateRequest.ts b/src/clients/docker/models/ContainerCreateRequest.ts index 926526a5f3..b7a509d6fb 100644 --- a/src/clients/docker/models/ContainerCreateRequest.ts +++ b/src/clients/docker/models/ContainerCreateRequest.ts @@ -2,316 +2,323 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { NetworkingConfig } from './NetworkingConfig'; +import { mapValues } from "../runtime"; +import type { NetworkingConfig } from "./NetworkingConfig"; import { - NetworkingConfigFromJSON, - NetworkingConfigFromJSONTyped, - NetworkingConfigToJSON, - NetworkingConfigToJSONTyped, -} from './NetworkingConfig'; -import type { HealthConfig } from './HealthConfig'; + NetworkingConfigFromJSON, + NetworkingConfigFromJSONTyped, + NetworkingConfigToJSON, + NetworkingConfigToJSONTyped, +} from "./NetworkingConfig"; +import type { HealthConfig } from "./HealthConfig"; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from './HealthConfig'; -import type { HostConfig } from './HostConfig'; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from "./HealthConfig"; +import type { HostConfig } from "./HostConfig"; import { - HostConfigFromJSON, - HostConfigFromJSONTyped, - HostConfigToJSON, - HostConfigToJSONTyped, -} from './HostConfig'; + HostConfigFromJSON, + HostConfigFromJSONTyped, + HostConfigToJSON, + HostConfigToJSONTyped, +} from "./HostConfig"; /** - * + * * @export * @interface ContainerCreateRequest */ export interface ContainerCreateRequest { - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - Hostname?: string; - /** - * The domain name to use for the container. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - Domainname?: string; - /** - * The user that commands are run as inside the container. - * @type {string} - * @memberof ContainerCreateRequest - */ - User?: string; - /** - * Whether to attach to `stdin`. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - AttachStdin?: boolean; - /** - * Whether to attach to `stdout`. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - AttachStdout?: boolean; - /** - * Whether to attach to `stderr`. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - AttachStderr?: boolean; - /** - * An object mapping ports to an empty object in the form: - * - * `{"/": {}}` - * - * @type {{ [key: string]: object; }} - * @memberof ContainerCreateRequest - */ - ExposedPorts?: { [key: string]: object; } | null; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @type {boolean} - * @memberof ContainerCreateRequest - */ - Tty?: boolean; - /** - * Open `stdin` - * @type {boolean} - * @memberof ContainerCreateRequest - */ - OpenStdin?: boolean; - /** - * Close `stdin` after one attached client disconnects - * @type {boolean} - * @memberof ContainerCreateRequest - */ - StdinOnce?: boolean; - /** - * A list of environment variables to set inside the container in the - * form `["VAR=value", ...]`. A variable without `=` is removed from the - * environment, rather than to have an empty value. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Env?: Array; - /** - * Command to run specified as a string or an array of strings. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Cmd?: Array; - /** - * - * @type {HealthConfig} - * @memberof ContainerCreateRequest - */ - Healthcheck?: HealthConfig; - /** - * Command is already escaped (Windows only) - * @type {boolean} - * @memberof ContainerCreateRequest - */ - ArgsEscaped?: boolean | null; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - Image?: string; - /** - * An object mapping mount point paths inside the container to empty - * objects. - * - * @type {{ [key: string]: object; }} - * @memberof ContainerCreateRequest - */ - Volumes?: { [key: string]: object; }; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof ContainerCreateRequest - */ - WorkingDir?: string; - /** - * The entry point for the container as a string or an array of strings. - * - * If the array consists of exactly one empty string (`[""]`) then the - * entry point is reset to system default (i.e., the entry point used by - * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Entrypoint?: Array; - /** - * Disable networking for the container. - * @type {boolean} - * @memberof ContainerCreateRequest - */ - NetworkDisabled?: boolean | null; - /** - * MAC address of the container. - * @type {string} - * @memberof ContainerCreateRequest - */ - MacAddress?: string | null; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - OnBuild?: Array | null; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ContainerCreateRequest - */ - Labels?: { [key: string]: string; }; - /** - * Signal to stop a container as a string or unsigned integer. - * - * @type {string} - * @memberof ContainerCreateRequest - */ - StopSignal?: string | null; - /** - * Timeout to stop a container in seconds. - * @type {number} - * @memberof ContainerCreateRequest - */ - StopTimeout?: number | null; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @type {Array} - * @memberof ContainerCreateRequest - */ - Shell?: Array | null; - /** - * - * @type {HostConfig} - * @memberof ContainerCreateRequest - */ - HostConfig?: HostConfig; - /** - * - * @type {NetworkingConfig} - * @memberof ContainerCreateRequest - */ - NetworkingConfig?: NetworkingConfig; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + Hostname?: string; + /** + * The domain name to use for the container. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + Domainname?: string; + /** + * The user that commands are run as inside the container. + * @type {string} + * @memberof ContainerCreateRequest + */ + User?: string; + /** + * Whether to attach to `stdin`. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + AttachStdin?: boolean; + /** + * Whether to attach to `stdout`. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + AttachStdout?: boolean; + /** + * Whether to attach to `stderr`. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + AttachStderr?: boolean; + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + * + * @type {{ [key: string]: object; }} + * @memberof ContainerCreateRequest + */ + ExposedPorts?: { [key: string]: object } | null; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @type {boolean} + * @memberof ContainerCreateRequest + */ + Tty?: boolean; + /** + * Open `stdin` + * @type {boolean} + * @memberof ContainerCreateRequest + */ + OpenStdin?: boolean; + /** + * Close `stdin` after one attached client disconnects + * @type {boolean} + * @memberof ContainerCreateRequest + */ + StdinOnce?: boolean; + /** + * A list of environment variables to set inside the container in the + * form `["VAR=value", ...]`. A variable without `=` is removed from the + * environment, rather than to have an empty value. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Env?: Array; + /** + * Command to run specified as a string or an array of strings. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Cmd?: Array; + /** + * + * @type {HealthConfig} + * @memberof ContainerCreateRequest + */ + Healthcheck?: HealthConfig; + /** + * Command is already escaped (Windows only) + * @type {boolean} + * @memberof ContainerCreateRequest + */ + ArgsEscaped?: boolean | null; + /** + * The name (or reference) of the image to use when creating the container, + * or which was used when the container was created. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + Image?: string; + /** + * An object mapping mount point paths inside the container to empty + * objects. + * + * @type {{ [key: string]: object; }} + * @memberof ContainerCreateRequest + */ + Volumes?: { [key: string]: object }; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof ContainerCreateRequest + */ + WorkingDir?: string; + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the + * entry point is reset to system default (i.e., the entry point used by + * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Entrypoint?: Array; + /** + * Disable networking for the container. + * @type {boolean} + * @memberof ContainerCreateRequest + */ + NetworkDisabled?: boolean | null; + /** + * MAC address of the container. + * @type {string} + * @memberof ContainerCreateRequest + */ + MacAddress?: string | null; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + OnBuild?: Array | null; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ContainerCreateRequest + */ + Labels?: { [key: string]: string }; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @type {string} + * @memberof ContainerCreateRequest + */ + StopSignal?: string | null; + /** + * Timeout to stop a container in seconds. + * @type {number} + * @memberof ContainerCreateRequest + */ + StopTimeout?: number | null; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @type {Array} + * @memberof ContainerCreateRequest + */ + Shell?: Array | null; + /** + * + * @type {HostConfig} + * @memberof ContainerCreateRequest + */ + HostConfig?: HostConfig; + /** + * + * @type {NetworkingConfig} + * @memberof ContainerCreateRequest + */ + NetworkingConfig?: NetworkingConfig; } /** * Check if a given object implements the ContainerCreateRequest interface. */ export function instanceOfContainerCreateRequest(value: object): value is ContainerCreateRequest { - return true; + return true; } export function ContainerCreateRequestFromJSON(json: any): ContainerCreateRequest { - return ContainerCreateRequestFromJSONTyped(json, false); + return ContainerCreateRequestFromJSONTyped(json, false); } -export function ContainerCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerCreateRequest { - if (json == null) { - return json; - } - return { - - 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], - 'Domainname': json['Domainname'] == null ? undefined : json['Domainname'], - 'User': json['User'] == null ? undefined : json['User'], - 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], - 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], - 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], - 'ExposedPorts': json['ExposedPorts'] == null ? undefined : json['ExposedPorts'], - 'Tty': json['Tty'] == null ? undefined : json['Tty'], - 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], - 'StdinOnce': json['StdinOnce'] == null ? undefined : json['StdinOnce'], - 'Env': json['Env'] == null ? undefined : json['Env'], - 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], - 'Healthcheck': json['Healthcheck'] == null ? undefined : HealthConfigFromJSON(json['Healthcheck']), - 'ArgsEscaped': json['ArgsEscaped'] == null ? undefined : json['ArgsEscaped'], - 'Image': json['Image'] == null ? undefined : json['Image'], - 'Volumes': json['Volumes'] == null ? undefined : json['Volumes'], - 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], - 'Entrypoint': json['Entrypoint'] == null ? undefined : json['Entrypoint'], - 'NetworkDisabled': json['NetworkDisabled'] == null ? undefined : json['NetworkDisabled'], - 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], - 'OnBuild': json['OnBuild'] == null ? undefined : json['OnBuild'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], - 'StopTimeout': json['StopTimeout'] == null ? undefined : json['StopTimeout'], - 'Shell': json['Shell'] == null ? undefined : json['Shell'], - 'HostConfig': json['HostConfig'] == null ? undefined : HostConfigFromJSON(json['HostConfig']), - 'NetworkingConfig': json['NetworkingConfig'] == null ? undefined : NetworkingConfigFromJSON(json['NetworkingConfig']), - }; +export function ContainerCreateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerCreateRequest { + if (json == null) { + return json; + } + return { + Hostname: json["Hostname"] == null ? undefined : json["Hostname"], + Domainname: json["Domainname"] == null ? undefined : json["Domainname"], + User: json["User"] == null ? undefined : json["User"], + AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], + AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], + AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], + ExposedPorts: json["ExposedPorts"] == null ? undefined : json["ExposedPorts"], + Tty: json["Tty"] == null ? undefined : json["Tty"], + OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], + StdinOnce: json["StdinOnce"] == null ? undefined : json["StdinOnce"], + Env: json["Env"] == null ? undefined : json["Env"], + Cmd: json["Cmd"] == null ? undefined : json["Cmd"], + Healthcheck: + json["Healthcheck"] == null ? undefined : HealthConfigFromJSON(json["Healthcheck"]), + ArgsEscaped: json["ArgsEscaped"] == null ? undefined : json["ArgsEscaped"], + Image: json["Image"] == null ? undefined : json["Image"], + Volumes: json["Volumes"] == null ? undefined : json["Volumes"], + WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], + Entrypoint: json["Entrypoint"] == null ? undefined : json["Entrypoint"], + NetworkDisabled: json["NetworkDisabled"] == null ? undefined : json["NetworkDisabled"], + MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], + OnBuild: json["OnBuild"] == null ? undefined : json["OnBuild"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], + StopTimeout: json["StopTimeout"] == null ? undefined : json["StopTimeout"], + Shell: json["Shell"] == null ? undefined : json["Shell"], + HostConfig: json["HostConfig"] == null ? undefined : HostConfigFromJSON(json["HostConfig"]), + NetworkingConfig: + json["NetworkingConfig"] == null + ? undefined + : NetworkingConfigFromJSON(json["NetworkingConfig"]), + }; } export function ContainerCreateRequestToJSON(json: any): ContainerCreateRequest { - return ContainerCreateRequestToJSONTyped(json, false); + return ContainerCreateRequestToJSONTyped(json, false); } -export function ContainerCreateRequestToJSONTyped(value?: ContainerCreateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerCreateRequestToJSONTyped( + value?: ContainerCreateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Hostname': value['Hostname'], - 'Domainname': value['Domainname'], - 'User': value['User'], - 'AttachStdin': value['AttachStdin'], - 'AttachStdout': value['AttachStdout'], - 'AttachStderr': value['AttachStderr'], - 'ExposedPorts': value['ExposedPorts'], - 'Tty': value['Tty'], - 'OpenStdin': value['OpenStdin'], - 'StdinOnce': value['StdinOnce'], - 'Env': value['Env'], - 'Cmd': value['Cmd'], - 'Healthcheck': HealthConfigToJSON(value['Healthcheck']), - 'ArgsEscaped': value['ArgsEscaped'], - 'Image': value['Image'], - 'Volumes': value['Volumes'], - 'WorkingDir': value['WorkingDir'], - 'Entrypoint': value['Entrypoint'], - 'NetworkDisabled': value['NetworkDisabled'], - 'MacAddress': value['MacAddress'], - 'OnBuild': value['OnBuild'], - 'Labels': value['Labels'], - 'StopSignal': value['StopSignal'], - 'StopTimeout': value['StopTimeout'], - 'Shell': value['Shell'], - 'HostConfig': HostConfigToJSON(value['HostConfig']), - 'NetworkingConfig': NetworkingConfigToJSON(value['NetworkingConfig']), - }; + return { + Hostname: value["Hostname"], + Domainname: value["Domainname"], + User: value["User"], + AttachStdin: value["AttachStdin"], + AttachStdout: value["AttachStdout"], + AttachStderr: value["AttachStderr"], + ExposedPorts: value["ExposedPorts"], + Tty: value["Tty"], + OpenStdin: value["OpenStdin"], + StdinOnce: value["StdinOnce"], + Env: value["Env"], + Cmd: value["Cmd"], + Healthcheck: HealthConfigToJSON(value["Healthcheck"]), + ArgsEscaped: value["ArgsEscaped"], + Image: value["Image"], + Volumes: value["Volumes"], + WorkingDir: value["WorkingDir"], + Entrypoint: value["Entrypoint"], + NetworkDisabled: value["NetworkDisabled"], + MacAddress: value["MacAddress"], + OnBuild: value["OnBuild"], + Labels: value["Labels"], + StopSignal: value["StopSignal"], + StopTimeout: value["StopTimeout"], + Shell: value["Shell"], + HostConfig: HostConfigToJSON(value["HostConfig"]), + NetworkingConfig: NetworkingConfigToJSON(value["NetworkingConfig"]), + }; } - diff --git a/src/clients/docker/models/ContainerCreateResponse.ts b/src/clients/docker/models/ContainerCreateResponse.ts index 2d661abdd8..8c81d17b8f 100644 --- a/src/clients/docker/models/ContainerCreateResponse.ts +++ b/src/clients/docker/models/ContainerCreateResponse.ts @@ -2,74 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * OK response to ContainerCreate operation * @export * @interface ContainerCreateResponse */ export interface ContainerCreateResponse { - /** - * The ID of the created container - * @type {string} - * @memberof ContainerCreateResponse - */ - Id: string; - /** - * Warnings encountered when creating the container - * @type {Array} - * @memberof ContainerCreateResponse - */ - Warnings: Array; + /** + * The ID of the created container + * @type {string} + * @memberof ContainerCreateResponse + */ + Id: string; + /** + * Warnings encountered when creating the container + * @type {Array} + * @memberof ContainerCreateResponse + */ + Warnings: Array; } /** * Check if a given object implements the ContainerCreateResponse interface. */ export function instanceOfContainerCreateResponse(value: object): value is ContainerCreateResponse { - if (!('Id' in value) || value['Id'] === undefined) return false; - if (!('Warnings' in value) || value['Warnings'] === undefined) return false; - return true; + if (!("Id" in value) || value["Id"] === undefined) return false; + if (!("Warnings" in value) || value["Warnings"] === undefined) return false; + return true; } export function ContainerCreateResponseFromJSON(json: any): ContainerCreateResponse { - return ContainerCreateResponseFromJSONTyped(json, false); + return ContainerCreateResponseFromJSONTyped(json, false); } -export function ContainerCreateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerCreateResponse { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'], - 'Warnings': json['Warnings'], - }; +export function ContainerCreateResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerCreateResponse { + if (json == null) { + return json; + } + return { + Id: json["Id"], + Warnings: json["Warnings"], + }; } export function ContainerCreateResponseToJSON(json: any): ContainerCreateResponse { - return ContainerCreateResponseToJSONTyped(json, false); + return ContainerCreateResponseToJSONTyped(json, false); } -export function ContainerCreateResponseToJSONTyped(value?: ContainerCreateResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerCreateResponseToJSONTyped( + value?: ContainerCreateResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'Warnings': value['Warnings'], - }; + return { + Id: value["Id"], + Warnings: value["Warnings"], + }; } - diff --git a/src/clients/docker/models/ContainerInspectResponse.ts b/src/clients/docker/models/ContainerInspectResponse.ts index 29abce1121..0677f3145d 100644 --- a/src/clients/docker/models/ContainerInspectResponse.ts +++ b/src/clients/docker/models/ContainerInspectResponse.ts @@ -2,301 +2,312 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ContainerConfig } from './ContainerConfig'; +import { mapValues } from "../runtime"; +import type { ContainerConfig } from "./ContainerConfig"; import { - ContainerConfigFromJSON, - ContainerConfigFromJSONTyped, - ContainerConfigToJSON, - ContainerConfigToJSONTyped, -} from './ContainerConfig'; -import type { MountPoint } from './MountPoint'; + ContainerConfigFromJSON, + ContainerConfigFromJSONTyped, + ContainerConfigToJSON, + ContainerConfigToJSONTyped, +} from "./ContainerConfig"; +import type { MountPoint } from "./MountPoint"; import { - MountPointFromJSON, - MountPointFromJSONTyped, - MountPointToJSON, - MountPointToJSONTyped, -} from './MountPoint'; -import type { NetworkSettings } from './NetworkSettings'; + MountPointFromJSON, + MountPointFromJSONTyped, + MountPointToJSON, + MountPointToJSONTyped, +} from "./MountPoint"; +import type { NetworkSettings } from "./NetworkSettings"; import { - NetworkSettingsFromJSON, - NetworkSettingsFromJSONTyped, - NetworkSettingsToJSON, - NetworkSettingsToJSONTyped, -} from './NetworkSettings'; -import type { HostConfig } from './HostConfig'; + NetworkSettingsFromJSON, + NetworkSettingsFromJSONTyped, + NetworkSettingsToJSON, + NetworkSettingsToJSONTyped, +} from "./NetworkSettings"; +import type { HostConfig } from "./HostConfig"; import { - HostConfigFromJSON, - HostConfigFromJSONTyped, - HostConfigToJSON, - HostConfigToJSONTyped, -} from './HostConfig'; -import type { GraphDriverData } from './GraphDriverData'; + HostConfigFromJSON, + HostConfigFromJSONTyped, + HostConfigToJSON, + HostConfigToJSONTyped, +} from "./HostConfig"; +import type { GraphDriverData } from "./GraphDriverData"; import { - GraphDriverDataFromJSON, - GraphDriverDataFromJSONTyped, - GraphDriverDataToJSON, - GraphDriverDataToJSONTyped, -} from './GraphDriverData'; -import type { ContainerState } from './ContainerState'; + GraphDriverDataFromJSON, + GraphDriverDataFromJSONTyped, + GraphDriverDataToJSON, + GraphDriverDataToJSONTyped, +} from "./GraphDriverData"; +import type { ContainerState } from "./ContainerState"; import { - ContainerStateFromJSON, - ContainerStateFromJSONTyped, - ContainerStateToJSON, - ContainerStateToJSONTyped, -} from './ContainerState'; + ContainerStateFromJSON, + ContainerStateFromJSONTyped, + ContainerStateToJSON, + ContainerStateToJSONTyped, +} from "./ContainerState"; /** - * + * * @export * @interface ContainerInspectResponse */ export interface ContainerInspectResponse { - /** - * The ID of the container - * @type {string} - * @memberof ContainerInspectResponse - */ - Id?: string; - /** - * The time the container was created - * @type {string} - * @memberof ContainerInspectResponse - */ - Created?: string; - /** - * The path to the command being run - * @type {string} - * @memberof ContainerInspectResponse - */ - Path?: string; - /** - * The arguments to the command being run - * @type {Array} - * @memberof ContainerInspectResponse - */ - Args?: Array; - /** - * - * @type {ContainerState} - * @memberof ContainerInspectResponse - */ - State?: ContainerState | null; - /** - * The container's image ID - * @type {string} - * @memberof ContainerInspectResponse - */ - Image?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - ResolvConfPath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - HostnamePath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - HostsPath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - LogPath?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - Name?: string; - /** - * - * @type {number} - * @memberof ContainerInspectResponse - */ - RestartCount?: number; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - Driver?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - Platform?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - MountLabel?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - ProcessLabel?: string; - /** - * - * @type {string} - * @memberof ContainerInspectResponse - */ - AppArmorProfile?: string; - /** - * IDs of exec instances that are running in the container. - * @type {Array} - * @memberof ContainerInspectResponse - */ - ExecIDs?: Array | null; - /** - * - * @type {HostConfig} - * @memberof ContainerInspectResponse - */ - HostConfig?: HostConfig; - /** - * - * @type {GraphDriverData} - * @memberof ContainerInspectResponse - */ - GraphDriver?: GraphDriverData; - /** - * The size of files that have been created or changed by this - * container. - * - * @type {number} - * @memberof ContainerInspectResponse - */ - SizeRw?: number; - /** - * The total size of all the files in this container. - * @type {number} - * @memberof ContainerInspectResponse - */ - SizeRootFs?: number; - /** - * - * @type {Array} - * @memberof ContainerInspectResponse - */ - Mounts?: Array; - /** - * - * @type {ContainerConfig} - * @memberof ContainerInspectResponse - */ - Config?: ContainerConfig; - /** - * - * @type {NetworkSettings} - * @memberof ContainerInspectResponse - */ - NetworkSettings?: NetworkSettings; + /** + * The ID of the container + * @type {string} + * @memberof ContainerInspectResponse + */ + Id?: string; + /** + * The time the container was created + * @type {string} + * @memberof ContainerInspectResponse + */ + Created?: string; + /** + * The path to the command being run + * @type {string} + * @memberof ContainerInspectResponse + */ + Path?: string; + /** + * The arguments to the command being run + * @type {Array} + * @memberof ContainerInspectResponse + */ + Args?: Array; + /** + * + * @type {ContainerState} + * @memberof ContainerInspectResponse + */ + State?: ContainerState | null; + /** + * The container's image ID + * @type {string} + * @memberof ContainerInspectResponse + */ + Image?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + ResolvConfPath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + HostnamePath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + HostsPath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + LogPath?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + Name?: string; + /** + * + * @type {number} + * @memberof ContainerInspectResponse + */ + RestartCount?: number; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + Driver?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + Platform?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + MountLabel?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + ProcessLabel?: string; + /** + * + * @type {string} + * @memberof ContainerInspectResponse + */ + AppArmorProfile?: string; + /** + * IDs of exec instances that are running in the container. + * @type {Array} + * @memberof ContainerInspectResponse + */ + ExecIDs?: Array | null; + /** + * + * @type {HostConfig} + * @memberof ContainerInspectResponse + */ + HostConfig?: HostConfig; + /** + * + * @type {GraphDriverData} + * @memberof ContainerInspectResponse + */ + GraphDriver?: GraphDriverData; + /** + * The size of files that have been created or changed by this + * container. + * + * @type {number} + * @memberof ContainerInspectResponse + */ + SizeRw?: number; + /** + * The total size of all the files in this container. + * @type {number} + * @memberof ContainerInspectResponse + */ + SizeRootFs?: number; + /** + * + * @type {Array} + * @memberof ContainerInspectResponse + */ + Mounts?: Array; + /** + * + * @type {ContainerConfig} + * @memberof ContainerInspectResponse + */ + Config?: ContainerConfig; + /** + * + * @type {NetworkSettings} + * @memberof ContainerInspectResponse + */ + NetworkSettings?: NetworkSettings; } /** * Check if a given object implements the ContainerInspectResponse interface. */ -export function instanceOfContainerInspectResponse(value: object): value is ContainerInspectResponse { - return true; +export function instanceOfContainerInspectResponse( + value: object, +): value is ContainerInspectResponse { + return true; } export function ContainerInspectResponseFromJSON(json: any): ContainerInspectResponse { - return ContainerInspectResponseFromJSONTyped(json, false); + return ContainerInspectResponseFromJSONTyped(json, false); } -export function ContainerInspectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerInspectResponse { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'] == null ? undefined : json['Id'], - 'Created': json['Created'] == null ? undefined : json['Created'], - 'Path': json['Path'] == null ? undefined : json['Path'], - 'Args': json['Args'] == null ? undefined : json['Args'], - 'State': json['State'] == null ? undefined : ContainerStateFromJSON(json['State']), - 'Image': json['Image'] == null ? undefined : json['Image'], - 'ResolvConfPath': json['ResolvConfPath'] == null ? undefined : json['ResolvConfPath'], - 'HostnamePath': json['HostnamePath'] == null ? undefined : json['HostnamePath'], - 'HostsPath': json['HostsPath'] == null ? undefined : json['HostsPath'], - 'LogPath': json['LogPath'] == null ? undefined : json['LogPath'], - 'Name': json['Name'] == null ? undefined : json['Name'], - 'RestartCount': json['RestartCount'] == null ? undefined : json['RestartCount'], - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'Platform': json['Platform'] == null ? undefined : json['Platform'], - 'MountLabel': json['MountLabel'] == null ? undefined : json['MountLabel'], - 'ProcessLabel': json['ProcessLabel'] == null ? undefined : json['ProcessLabel'], - 'AppArmorProfile': json['AppArmorProfile'] == null ? undefined : json['AppArmorProfile'], - 'ExecIDs': json['ExecIDs'] == null ? undefined : json['ExecIDs'], - 'HostConfig': json['HostConfig'] == null ? undefined : HostConfigFromJSON(json['HostConfig']), - 'GraphDriver': json['GraphDriver'] == null ? undefined : GraphDriverDataFromJSON(json['GraphDriver']), - 'SizeRw': json['SizeRw'] == null ? undefined : json['SizeRw'], - 'SizeRootFs': json['SizeRootFs'] == null ? undefined : json['SizeRootFs'], - 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountPointFromJSON)), - 'Config': json['Config'] == null ? undefined : ContainerConfigFromJSON(json['Config']), - 'NetworkSettings': json['NetworkSettings'] == null ? undefined : NetworkSettingsFromJSON(json['NetworkSettings']), - }; +export function ContainerInspectResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerInspectResponse { + if (json == null) { + return json; + } + return { + Id: json["Id"] == null ? undefined : json["Id"], + Created: json["Created"] == null ? undefined : json["Created"], + Path: json["Path"] == null ? undefined : json["Path"], + Args: json["Args"] == null ? undefined : json["Args"], + State: json["State"] == null ? undefined : ContainerStateFromJSON(json["State"]), + Image: json["Image"] == null ? undefined : json["Image"], + ResolvConfPath: json["ResolvConfPath"] == null ? undefined : json["ResolvConfPath"], + HostnamePath: json["HostnamePath"] == null ? undefined : json["HostnamePath"], + HostsPath: json["HostsPath"] == null ? undefined : json["HostsPath"], + LogPath: json["LogPath"] == null ? undefined : json["LogPath"], + Name: json["Name"] == null ? undefined : json["Name"], + RestartCount: json["RestartCount"] == null ? undefined : json["RestartCount"], + Driver: json["Driver"] == null ? undefined : json["Driver"], + Platform: json["Platform"] == null ? undefined : json["Platform"], + MountLabel: json["MountLabel"] == null ? undefined : json["MountLabel"], + ProcessLabel: json["ProcessLabel"] == null ? undefined : json["ProcessLabel"], + AppArmorProfile: json["AppArmorProfile"] == null ? undefined : json["AppArmorProfile"], + ExecIDs: json["ExecIDs"] == null ? undefined : json["ExecIDs"], + HostConfig: json["HostConfig"] == null ? undefined : HostConfigFromJSON(json["HostConfig"]), + GraphDriver: + json["GraphDriver"] == null ? undefined : GraphDriverDataFromJSON(json["GraphDriver"]), + SizeRw: json["SizeRw"] == null ? undefined : json["SizeRw"], + SizeRootFs: json["SizeRootFs"] == null ? undefined : json["SizeRootFs"], + Mounts: + json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountPointFromJSON), + Config: json["Config"] == null ? undefined : ContainerConfigFromJSON(json["Config"]), + NetworkSettings: + json["NetworkSettings"] == null + ? undefined + : NetworkSettingsFromJSON(json["NetworkSettings"]), + }; } export function ContainerInspectResponseToJSON(json: any): ContainerInspectResponse { - return ContainerInspectResponseToJSONTyped(json, false); + return ContainerInspectResponseToJSONTyped(json, false); } -export function ContainerInspectResponseToJSONTyped(value?: ContainerInspectResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerInspectResponseToJSONTyped( + value?: ContainerInspectResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'Created': value['Created'], - 'Path': value['Path'], - 'Args': value['Args'], - 'State': ContainerStateToJSON(value['State']), - 'Image': value['Image'], - 'ResolvConfPath': value['ResolvConfPath'], - 'HostnamePath': value['HostnamePath'], - 'HostsPath': value['HostsPath'], - 'LogPath': value['LogPath'], - 'Name': value['Name'], - 'RestartCount': value['RestartCount'], - 'Driver': value['Driver'], - 'Platform': value['Platform'], - 'MountLabel': value['MountLabel'], - 'ProcessLabel': value['ProcessLabel'], - 'AppArmorProfile': value['AppArmorProfile'], - 'ExecIDs': value['ExecIDs'], - 'HostConfig': HostConfigToJSON(value['HostConfig']), - 'GraphDriver': GraphDriverDataToJSON(value['GraphDriver']), - 'SizeRw': value['SizeRw'], - 'SizeRootFs': value['SizeRootFs'], - 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountPointToJSON)), - 'Config': ContainerConfigToJSON(value['Config']), - 'NetworkSettings': NetworkSettingsToJSON(value['NetworkSettings']), - }; + return { + Id: value["Id"], + Created: value["Created"], + Path: value["Path"], + Args: value["Args"], + State: ContainerStateToJSON(value["State"]), + Image: value["Image"], + ResolvConfPath: value["ResolvConfPath"], + HostnamePath: value["HostnamePath"], + HostsPath: value["HostsPath"], + LogPath: value["LogPath"], + Name: value["Name"], + RestartCount: value["RestartCount"], + Driver: value["Driver"], + Platform: value["Platform"], + MountLabel: value["MountLabel"], + ProcessLabel: value["ProcessLabel"], + AppArmorProfile: value["AppArmorProfile"], + ExecIDs: value["ExecIDs"], + HostConfig: HostConfigToJSON(value["HostConfig"]), + GraphDriver: GraphDriverDataToJSON(value["GraphDriver"]), + SizeRw: value["SizeRw"], + SizeRootFs: value["SizeRootFs"], + Mounts: + value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountPointToJSON), + Config: ContainerConfigToJSON(value["Config"]), + NetworkSettings: NetworkSettingsToJSON(value["NetworkSettings"]), + }; } - diff --git a/src/clients/docker/models/ContainerPruneResponse.ts b/src/clients/docker/models/ContainerPruneResponse.ts index 8bcce1cdb6..ff05761107 100644 --- a/src/clients/docker/models/ContainerPruneResponse.ts +++ b/src/clients/docker/models/ContainerPruneResponse.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ContainerPruneResponse */ export interface ContainerPruneResponse { - /** - * Container IDs that were deleted - * @type {Array} - * @memberof ContainerPruneResponse - */ - ContainersDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof ContainerPruneResponse - */ - SpaceReclaimed?: number; + /** + * Container IDs that were deleted + * @type {Array} + * @memberof ContainerPruneResponse + */ + ContainersDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof ContainerPruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the ContainerPruneResponse interface. */ export function instanceOfContainerPruneResponse(value: object): value is ContainerPruneResponse { - return true; + return true; } export function ContainerPruneResponseFromJSON(json: any): ContainerPruneResponse { - return ContainerPruneResponseFromJSONTyped(json, false); + return ContainerPruneResponseFromJSONTyped(json, false); } -export function ContainerPruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerPruneResponse { - if (json == null) { - return json; - } - return { - - 'ContainersDeleted': json['ContainersDeleted'] == null ? undefined : json['ContainersDeleted'], - 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], - }; +export function ContainerPruneResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerPruneResponse { + if (json == null) { + return json; + } + return { + ContainersDeleted: json["ContainersDeleted"] == null ? undefined : json["ContainersDeleted"], + SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], + }; } export function ContainerPruneResponseToJSON(json: any): ContainerPruneResponse { - return ContainerPruneResponseToJSONTyped(json, false); + return ContainerPruneResponseToJSONTyped(json, false); } -export function ContainerPruneResponseToJSONTyped(value?: ContainerPruneResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerPruneResponseToJSONTyped( + value?: ContainerPruneResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ContainersDeleted': value['ContainersDeleted'], - 'SpaceReclaimed': value['SpaceReclaimed'], - }; + return { + ContainersDeleted: value["ContainersDeleted"], + SpaceReclaimed: value["SpaceReclaimed"], + }; } - diff --git a/src/clients/docker/models/ContainerState.ts b/src/clients/docker/models/ContainerState.ts index 445dab13f1..3962e95c15 100644 --- a/src/clients/docker/models/ContainerState.ts +++ b/src/clients/docker/models/ContainerState.ts @@ -2,191 +2,188 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Health } from './Health'; -import { - HealthFromJSON, - HealthFromJSONTyped, - HealthToJSON, - HealthToJSONTyped, -} from './Health'; +import { mapValues } from "../runtime"; +import type { Health } from "./Health"; +import { HealthFromJSON, HealthFromJSONTyped, HealthToJSON, HealthToJSONTyped } from "./Health"; /** * ContainerState stores container's running state. It's part of ContainerJSONBase * and will be returned by the "inspect" command. - * + * * @export * @interface ContainerState */ export interface ContainerState { - /** - * String representation of the container state. Can be one of "created", - * "running", "paused", "restarting", "removing", "exited", or "dead". - * - * @type {string} - * @memberof ContainerState - */ - Status?: ContainerStateStatusEnum; - /** - * Whether this container is running. - * - * Note that a running container can be _paused_. The `Running` and `Paused` - * booleans are not mutually exclusive: - * - * When pausing a container (on Linux), the freezer cgroup is used to suspend - * all processes in the container. Freezing the process requires the process to - * be running. As a result, paused containers are both `Running` _and_ `Paused`. - * - * Use the `Status` field instead to determine if a container's state is "running". - * - * @type {boolean} - * @memberof ContainerState - */ - Running?: boolean; - /** - * Whether this container is paused. - * @type {boolean} - * @memberof ContainerState - */ - Paused?: boolean; - /** - * Whether this container is restarting. - * @type {boolean} - * @memberof ContainerState - */ - Restarting?: boolean; - /** - * Whether a process within this container has been killed because it ran - * out of memory since the container was last started. - * - * @type {boolean} - * @memberof ContainerState - */ - OOMKilled?: boolean; - /** - * - * @type {boolean} - * @memberof ContainerState - */ - Dead?: boolean; - /** - * The process ID of this container - * @type {number} - * @memberof ContainerState - */ - Pid?: number; - /** - * The last exit code of this container - * @type {number} - * @memberof ContainerState - */ - ExitCode?: number; - /** - * - * @type {string} - * @memberof ContainerState - */ - Error?: string; - /** - * The time when this container was last started. - * @type {string} - * @memberof ContainerState - */ - StartedAt?: string; - /** - * The time when this container last exited. - * @type {string} - * @memberof ContainerState - */ - FinishedAt?: string; - /** - * - * @type {Health} - * @memberof ContainerState - */ - Health?: Health | null; + /** + * String representation of the container state. Can be one of "created", + * "running", "paused", "restarting", "removing", "exited", or "dead". + * + * @type {string} + * @memberof ContainerState + */ + Status?: ContainerStateStatusEnum; + /** + * Whether this container is running. + * + * Note that a running container can be _paused_. The `Running` and `Paused` + * booleans are not mutually exclusive: + * + * When pausing a container (on Linux), the freezer cgroup is used to suspend + * all processes in the container. Freezing the process requires the process to + * be running. As a result, paused containers are both `Running` _and_ `Paused`. + * + * Use the `Status` field instead to determine if a container's state is "running". + * + * @type {boolean} + * @memberof ContainerState + */ + Running?: boolean; + /** + * Whether this container is paused. + * @type {boolean} + * @memberof ContainerState + */ + Paused?: boolean; + /** + * Whether this container is restarting. + * @type {boolean} + * @memberof ContainerState + */ + Restarting?: boolean; + /** + * Whether a process within this container has been killed because it ran + * out of memory since the container was last started. + * + * @type {boolean} + * @memberof ContainerState + */ + OOMKilled?: boolean; + /** + * + * @type {boolean} + * @memberof ContainerState + */ + Dead?: boolean; + /** + * The process ID of this container + * @type {number} + * @memberof ContainerState + */ + Pid?: number; + /** + * The last exit code of this container + * @type {number} + * @memberof ContainerState + */ + ExitCode?: number; + /** + * + * @type {string} + * @memberof ContainerState + */ + Error?: string; + /** + * The time when this container was last started. + * @type {string} + * @memberof ContainerState + */ + StartedAt?: string; + /** + * The time when this container last exited. + * @type {string} + * @memberof ContainerState + */ + FinishedAt?: string; + /** + * + * @type {Health} + * @memberof ContainerState + */ + Health?: Health | null; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ContainerStateStatusEnum { - Created = 'created', - Running = 'running', - Paused = 'paused', - Restarting = 'restarting', - Removing = 'removing', - Exited = 'exited', - Dead = 'dead' + Created = "created", + Running = "running", + Paused = "paused", + Restarting = "restarting", + Removing = "removing", + Exited = "exited", + Dead = "dead", } - /** * Check if a given object implements the ContainerState interface. */ export function instanceOfContainerState(value: object): value is ContainerState { - return true; + return true; } export function ContainerStateFromJSON(json: any): ContainerState { - return ContainerStateFromJSONTyped(json, false); + return ContainerStateFromJSONTyped(json, false); } -export function ContainerStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerState { - if (json == null) { - return json; - } - return { - - 'Status': json['Status'] == null ? undefined : json['Status'], - 'Running': json['Running'] == null ? undefined : json['Running'], - 'Paused': json['Paused'] == null ? undefined : json['Paused'], - 'Restarting': json['Restarting'] == null ? undefined : json['Restarting'], - 'OOMKilled': json['OOMKilled'] == null ? undefined : json['OOMKilled'], - 'Dead': json['Dead'] == null ? undefined : json['Dead'], - 'Pid': json['Pid'] == null ? undefined : json['Pid'], - 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], - 'Error': json['Error'] == null ? undefined : json['Error'], - 'StartedAt': json['StartedAt'] == null ? undefined : json['StartedAt'], - 'FinishedAt': json['FinishedAt'] == null ? undefined : json['FinishedAt'], - 'Health': json['Health'] == null ? undefined : HealthFromJSON(json['Health']), - }; +export function ContainerStateFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerState { + if (json == null) { + return json; + } + return { + Status: json["Status"] == null ? undefined : json["Status"], + Running: json["Running"] == null ? undefined : json["Running"], + Paused: json["Paused"] == null ? undefined : json["Paused"], + Restarting: json["Restarting"] == null ? undefined : json["Restarting"], + OOMKilled: json["OOMKilled"] == null ? undefined : json["OOMKilled"], + Dead: json["Dead"] == null ? undefined : json["Dead"], + Pid: json["Pid"] == null ? undefined : json["Pid"], + ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], + Error: json["Error"] == null ? undefined : json["Error"], + StartedAt: json["StartedAt"] == null ? undefined : json["StartedAt"], + FinishedAt: json["FinishedAt"] == null ? undefined : json["FinishedAt"], + Health: json["Health"] == null ? undefined : HealthFromJSON(json["Health"]), + }; } export function ContainerStateToJSON(json: any): ContainerState { - return ContainerStateToJSONTyped(json, false); + return ContainerStateToJSONTyped(json, false); } -export function ContainerStateToJSONTyped(value?: ContainerState | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerStateToJSONTyped( + value?: ContainerState | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Status': value['Status'], - 'Running': value['Running'], - 'Paused': value['Paused'], - 'Restarting': value['Restarting'], - 'OOMKilled': value['OOMKilled'], - 'Dead': value['Dead'], - 'Pid': value['Pid'], - 'ExitCode': value['ExitCode'], - 'Error': value['Error'], - 'StartedAt': value['StartedAt'], - 'FinishedAt': value['FinishedAt'], - 'Health': HealthToJSON(value['Health']), - }; + return { + Status: value["Status"], + Running: value["Running"], + Paused: value["Paused"], + Restarting: value["Restarting"], + OOMKilled: value["OOMKilled"], + Dead: value["Dead"], + Pid: value["Pid"], + ExitCode: value["ExitCode"], + Error: value["Error"], + StartedAt: value["StartedAt"], + FinishedAt: value["FinishedAt"], + Health: HealthToJSON(value["Health"]), + }; } - diff --git a/src/clients/docker/models/ContainerSummary.ts b/src/clients/docker/models/ContainerSummary.ts index 85346dd379..52797a35a9 100644 --- a/src/clients/docker/models/ContainerSummary.ts +++ b/src/clients/docker/models/ContainerSummary.ts @@ -2,205 +2,211 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { MountPoint } from './MountPoint'; -import { - MountPointFromJSON, - MountPointFromJSONTyped, - MountPointToJSON, - MountPointToJSONTyped, -} from './MountPoint'; -import type { ContainerSummaryNetworkSettings } from './ContainerSummaryNetworkSettings'; +import { mapValues } from "../runtime"; +import type { MountPoint } from "./MountPoint"; import { - ContainerSummaryNetworkSettingsFromJSON, - ContainerSummaryNetworkSettingsFromJSONTyped, - ContainerSummaryNetworkSettingsToJSON, - ContainerSummaryNetworkSettingsToJSONTyped, -} from './ContainerSummaryNetworkSettings'; -import type { ContainerSummaryHostConfig } from './ContainerSummaryHostConfig'; + MountPointFromJSON, + MountPointFromJSONTyped, + MountPointToJSON, + MountPointToJSONTyped, +} from "./MountPoint"; +import type { ContainerSummaryNetworkSettings } from "./ContainerSummaryNetworkSettings"; import { - ContainerSummaryHostConfigFromJSON, - ContainerSummaryHostConfigFromJSONTyped, - ContainerSummaryHostConfigToJSON, - ContainerSummaryHostConfigToJSONTyped, -} from './ContainerSummaryHostConfig'; -import type { Port } from './Port'; + ContainerSummaryNetworkSettingsFromJSON, + ContainerSummaryNetworkSettingsFromJSONTyped, + ContainerSummaryNetworkSettingsToJSON, + ContainerSummaryNetworkSettingsToJSONTyped, +} from "./ContainerSummaryNetworkSettings"; +import type { ContainerSummaryHostConfig } from "./ContainerSummaryHostConfig"; import { - PortFromJSON, - PortFromJSONTyped, - PortToJSON, - PortToJSONTyped, -} from './Port'; + ContainerSummaryHostConfigFromJSON, + ContainerSummaryHostConfigFromJSONTyped, + ContainerSummaryHostConfigToJSON, + ContainerSummaryHostConfigToJSONTyped, +} from "./ContainerSummaryHostConfig"; +import type { Port } from "./Port"; +import { PortFromJSON, PortFromJSONTyped, PortToJSON, PortToJSONTyped } from "./Port"; /** - * + * * @export * @interface ContainerSummary */ export interface ContainerSummary { - /** - * The ID of this container - * @type {string} - * @memberof ContainerSummary - */ - Id?: string; - /** - * The names that this container has been given - * @type {Array} - * @memberof ContainerSummary - */ - Names?: Array; - /** - * The name of the image used when creating this container - * @type {string} - * @memberof ContainerSummary - */ - Image?: string; - /** - * The ID of the image that this container was created from - * @type {string} - * @memberof ContainerSummary - */ - ImageID?: string; - /** - * Command to run when starting the container - * @type {string} - * @memberof ContainerSummary - */ - Command?: string; - /** - * When the container was created - * @type {number} - * @memberof ContainerSummary - */ - Created?: number; - /** - * The ports exposed by this container - * @type {Array} - * @memberof ContainerSummary - */ - Ports?: Array; - /** - * The size of files that have been created or changed by this container - * @type {number} - * @memberof ContainerSummary - */ - SizeRw?: number; - /** - * The total size of all the files in this container - * @type {number} - * @memberof ContainerSummary - */ - SizeRootFs?: number; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ContainerSummary - */ - Labels?: { [key: string]: string; }; - /** - * The state of this container (e.g. `Exited`) - * @type {string} - * @memberof ContainerSummary - */ - State?: string; - /** - * Additional human-readable status of this container (e.g. `Exit 0`) - * @type {string} - * @memberof ContainerSummary - */ - Status?: string; - /** - * - * @type {ContainerSummaryHostConfig} - * @memberof ContainerSummary - */ - HostConfig?: ContainerSummaryHostConfig; - /** - * - * @type {ContainerSummaryNetworkSettings} - * @memberof ContainerSummary - */ - NetworkSettings?: ContainerSummaryNetworkSettings; - /** - * - * @type {Array} - * @memberof ContainerSummary - */ - Mounts?: Array; + /** + * The ID of this container + * @type {string} + * @memberof ContainerSummary + */ + Id?: string; + /** + * The names that this container has been given + * @type {Array} + * @memberof ContainerSummary + */ + Names?: Array; + /** + * The name of the image used when creating this container + * @type {string} + * @memberof ContainerSummary + */ + Image?: string; + /** + * The ID of the image that this container was created from + * @type {string} + * @memberof ContainerSummary + */ + ImageID?: string; + /** + * Command to run when starting the container + * @type {string} + * @memberof ContainerSummary + */ + Command?: string; + /** + * When the container was created + * @type {number} + * @memberof ContainerSummary + */ + Created?: number; + /** + * The ports exposed by this container + * @type {Array} + * @memberof ContainerSummary + */ + Ports?: Array; + /** + * The size of files that have been created or changed by this container + * @type {number} + * @memberof ContainerSummary + */ + SizeRw?: number; + /** + * The total size of all the files in this container + * @type {number} + * @memberof ContainerSummary + */ + SizeRootFs?: number; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ContainerSummary + */ + Labels?: { [key: string]: string }; + /** + * The state of this container (e.g. `Exited`) + * @type {string} + * @memberof ContainerSummary + */ + State?: string; + /** + * Additional human-readable status of this container (e.g. `Exit 0`) + * @type {string} + * @memberof ContainerSummary + */ + Status?: string; + /** + * + * @type {ContainerSummaryHostConfig} + * @memberof ContainerSummary + */ + HostConfig?: ContainerSummaryHostConfig; + /** + * + * @type {ContainerSummaryNetworkSettings} + * @memberof ContainerSummary + */ + NetworkSettings?: ContainerSummaryNetworkSettings; + /** + * + * @type {Array} + * @memberof ContainerSummary + */ + Mounts?: Array; } /** * Check if a given object implements the ContainerSummary interface. */ export function instanceOfContainerSummary(value: object): value is ContainerSummary { - return true; + return true; } export function ContainerSummaryFromJSON(json: any): ContainerSummary { - return ContainerSummaryFromJSONTyped(json, false); + return ContainerSummaryFromJSONTyped(json, false); } -export function ContainerSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerSummary { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'] == null ? undefined : json['Id'], - 'Names': json['Names'] == null ? undefined : json['Names'], - 'Image': json['Image'] == null ? undefined : json['Image'], - 'ImageID': json['ImageID'] == null ? undefined : json['ImageID'], - 'Command': json['Command'] == null ? undefined : json['Command'], - 'Created': json['Created'] == null ? undefined : json['Created'], - 'Ports': json['Ports'] == null ? undefined : ((json['Ports'] as Array).map(PortFromJSON)), - 'SizeRw': json['SizeRw'] == null ? undefined : json['SizeRw'], - 'SizeRootFs': json['SizeRootFs'] == null ? undefined : json['SizeRootFs'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'State': json['State'] == null ? undefined : json['State'], - 'Status': json['Status'] == null ? undefined : json['Status'], - 'HostConfig': json['HostConfig'] == null ? undefined : ContainerSummaryHostConfigFromJSON(json['HostConfig']), - 'NetworkSettings': json['NetworkSettings'] == null ? undefined : ContainerSummaryNetworkSettingsFromJSON(json['NetworkSettings']), - 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountPointFromJSON)), - }; +export function ContainerSummaryFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerSummary { + if (json == null) { + return json; + } + return { + Id: json["Id"] == null ? undefined : json["Id"], + Names: json["Names"] == null ? undefined : json["Names"], + Image: json["Image"] == null ? undefined : json["Image"], + ImageID: json["ImageID"] == null ? undefined : json["ImageID"], + Command: json["Command"] == null ? undefined : json["Command"], + Created: json["Created"] == null ? undefined : json["Created"], + Ports: json["Ports"] == null ? undefined : (json["Ports"] as Array).map(PortFromJSON), + SizeRw: json["SizeRw"] == null ? undefined : json["SizeRw"], + SizeRootFs: json["SizeRootFs"] == null ? undefined : json["SizeRootFs"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + State: json["State"] == null ? undefined : json["State"], + Status: json["Status"] == null ? undefined : json["Status"], + HostConfig: + json["HostConfig"] == null + ? undefined + : ContainerSummaryHostConfigFromJSON(json["HostConfig"]), + NetworkSettings: + json["NetworkSettings"] == null + ? undefined + : ContainerSummaryNetworkSettingsFromJSON(json["NetworkSettings"]), + Mounts: + json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountPointFromJSON), + }; } export function ContainerSummaryToJSON(json: any): ContainerSummary { - return ContainerSummaryToJSONTyped(json, false); + return ContainerSummaryToJSONTyped(json, false); } -export function ContainerSummaryToJSONTyped(value?: ContainerSummary | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerSummaryToJSONTyped( + value?: ContainerSummary | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'Names': value['Names'], - 'Image': value['Image'], - 'ImageID': value['ImageID'], - 'Command': value['Command'], - 'Created': value['Created'], - 'Ports': value['Ports'] == null ? undefined : ((value['Ports'] as Array).map(PortToJSON)), - 'SizeRw': value['SizeRw'], - 'SizeRootFs': value['SizeRootFs'], - 'Labels': value['Labels'], - 'State': value['State'], - 'Status': value['Status'], - 'HostConfig': ContainerSummaryHostConfigToJSON(value['HostConfig']), - 'NetworkSettings': ContainerSummaryNetworkSettingsToJSON(value['NetworkSettings']), - 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountPointToJSON)), - }; + return { + Id: value["Id"], + Names: value["Names"], + Image: value["Image"], + ImageID: value["ImageID"], + Command: value["Command"], + Created: value["Created"], + Ports: value["Ports"] == null ? undefined : (value["Ports"] as Array).map(PortToJSON), + SizeRw: value["SizeRw"], + SizeRootFs: value["SizeRootFs"], + Labels: value["Labels"], + State: value["State"], + Status: value["Status"], + HostConfig: ContainerSummaryHostConfigToJSON(value["HostConfig"]), + NetworkSettings: ContainerSummaryNetworkSettingsToJSON(value["NetworkSettings"]), + Mounts: + value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountPointToJSON), + }; } - diff --git a/src/clients/docker/models/ContainerSummaryHostConfig.ts b/src/clients/docker/models/ContainerSummaryHostConfig.ts index 3d9bc87d76..790e1d312c 100644 --- a/src/clients/docker/models/ContainerSummaryHostConfig.ts +++ b/src/clients/docker/models/ContainerSummaryHostConfig.ts @@ -2,64 +2,69 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ContainerSummaryHostConfig */ export interface ContainerSummaryHostConfig { - /** - * - * @type {string} - * @memberof ContainerSummaryHostConfig - */ - NetworkMode?: string; + /** + * + * @type {string} + * @memberof ContainerSummaryHostConfig + */ + NetworkMode?: string; } /** * Check if a given object implements the ContainerSummaryHostConfig interface. */ -export function instanceOfContainerSummaryHostConfig(value: object): value is ContainerSummaryHostConfig { - return true; +export function instanceOfContainerSummaryHostConfig( + value: object, +): value is ContainerSummaryHostConfig { + return true; } export function ContainerSummaryHostConfigFromJSON(json: any): ContainerSummaryHostConfig { - return ContainerSummaryHostConfigFromJSONTyped(json, false); + return ContainerSummaryHostConfigFromJSONTyped(json, false); } -export function ContainerSummaryHostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerSummaryHostConfig { - if (json == null) { - return json; - } - return { - - 'NetworkMode': json['NetworkMode'] == null ? undefined : json['NetworkMode'], - }; +export function ContainerSummaryHostConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerSummaryHostConfig { + if (json == null) { + return json; + } + return { + NetworkMode: json["NetworkMode"] == null ? undefined : json["NetworkMode"], + }; } export function ContainerSummaryHostConfigToJSON(json: any): ContainerSummaryHostConfig { - return ContainerSummaryHostConfigToJSONTyped(json, false); + return ContainerSummaryHostConfigToJSONTyped(json, false); } -export function ContainerSummaryHostConfigToJSONTyped(value?: ContainerSummaryHostConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerSummaryHostConfigToJSONTyped( + value?: ContainerSummaryHostConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NetworkMode': value['NetworkMode'], - }; + return { + NetworkMode: value["NetworkMode"], + }; } - diff --git a/src/clients/docker/models/ContainerSummaryNetworkSettings.ts b/src/clients/docker/models/ContainerSummaryNetworkSettings.ts index e231e64508..3a894bb516 100644 --- a/src/clients/docker/models/ContainerSummaryNetworkSettings.ts +++ b/src/clients/docker/models/ContainerSummaryNetworkSettings.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EndpointSettings } from './EndpointSettings'; +import { mapValues } from "../runtime"; +import type { EndpointSettings } from "./EndpointSettings"; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from './EndpointSettings'; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from "./EndpointSettings"; /** * A summary of the container's network settings @@ -27,47 +27,56 @@ import { * @interface ContainerSummaryNetworkSettings */ export interface ContainerSummaryNetworkSettings { - /** - * - * @type {{ [key: string]: EndpointSettings; }} - * @memberof ContainerSummaryNetworkSettings - */ - Networks?: { [key: string]: EndpointSettings; }; + /** + * + * @type {{ [key: string]: EndpointSettings; }} + * @memberof ContainerSummaryNetworkSettings + */ + Networks?: { [key: string]: EndpointSettings }; } /** * Check if a given object implements the ContainerSummaryNetworkSettings interface. */ -export function instanceOfContainerSummaryNetworkSettings(value: object): value is ContainerSummaryNetworkSettings { - return true; +export function instanceOfContainerSummaryNetworkSettings( + value: object, +): value is ContainerSummaryNetworkSettings { + return true; } -export function ContainerSummaryNetworkSettingsFromJSON(json: any): ContainerSummaryNetworkSettings { - return ContainerSummaryNetworkSettingsFromJSONTyped(json, false); +export function ContainerSummaryNetworkSettingsFromJSON( + json: any, +): ContainerSummaryNetworkSettings { + return ContainerSummaryNetworkSettingsFromJSONTyped(json, false); } -export function ContainerSummaryNetworkSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerSummaryNetworkSettings { - if (json == null) { - return json; - } - return { - - 'Networks': json['Networks'] == null ? undefined : (mapValues(json['Networks'], EndpointSettingsFromJSON)), - }; +export function ContainerSummaryNetworkSettingsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerSummaryNetworkSettings { + if (json == null) { + return json; + } + return { + Networks: + json["Networks"] == null ? undefined : mapValues(json["Networks"], EndpointSettingsFromJSON), + }; } export function ContainerSummaryNetworkSettingsToJSON(json: any): ContainerSummaryNetworkSettings { - return ContainerSummaryNetworkSettingsToJSONTyped(json, false); + return ContainerSummaryNetworkSettingsToJSONTyped(json, false); } -export function ContainerSummaryNetworkSettingsToJSONTyped(value?: ContainerSummaryNetworkSettings | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerSummaryNetworkSettingsToJSONTyped( + value?: ContainerSummaryNetworkSettings | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Networks': value['Networks'] == null ? undefined : (mapValues(value['Networks'], EndpointSettingsToJSON)), - }; + return { + Networks: + value["Networks"] == null ? undefined : mapValues(value["Networks"], EndpointSettingsToJSON), + }; } - diff --git a/src/clients/docker/models/ContainerTopResponse.ts b/src/clients/docker/models/ContainerTopResponse.ts index cdb668cff5..da0feaa9fc 100644 --- a/src/clients/docker/models/ContainerTopResponse.ts +++ b/src/clients/docker/models/ContainerTopResponse.ts @@ -2,74 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * OK response to ContainerTop operation * @export * @interface ContainerTopResponse */ export interface ContainerTopResponse { - /** - * The ps column titles - * @type {Array} - * @memberof ContainerTopResponse - */ - Titles?: Array; - /** - * Each process running in the container, where each is process - * is an array of values corresponding to the titles. - * - * @type {Array>} - * @memberof ContainerTopResponse - */ - Processes?: Array>; + /** + * The ps column titles + * @type {Array} + * @memberof ContainerTopResponse + */ + Titles?: Array; + /** + * Each process running in the container, where each is process + * is an array of values corresponding to the titles. + * + * @type {Array>} + * @memberof ContainerTopResponse + */ + Processes?: Array>; } /** * Check if a given object implements the ContainerTopResponse interface. */ export function instanceOfContainerTopResponse(value: object): value is ContainerTopResponse { - return true; + return true; } export function ContainerTopResponseFromJSON(json: any): ContainerTopResponse { - return ContainerTopResponseFromJSONTyped(json, false); + return ContainerTopResponseFromJSONTyped(json, false); } -export function ContainerTopResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerTopResponse { - if (json == null) { - return json; - } - return { - - 'Titles': json['Titles'] == null ? undefined : json['Titles'], - 'Processes': json['Processes'] == null ? undefined : json['Processes'], - }; +export function ContainerTopResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerTopResponse { + if (json == null) { + return json; + } + return { + Titles: json["Titles"] == null ? undefined : json["Titles"], + Processes: json["Processes"] == null ? undefined : json["Processes"], + }; } export function ContainerTopResponseToJSON(json: any): ContainerTopResponse { - return ContainerTopResponseToJSONTyped(json, false); + return ContainerTopResponseToJSONTyped(json, false); } -export function ContainerTopResponseToJSONTyped(value?: ContainerTopResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerTopResponseToJSONTyped( + value?: ContainerTopResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Titles': value['Titles'], - 'Processes': value['Processes'], - }; + return { + Titles: value["Titles"], + Processes: value["Processes"], + }; } - diff --git a/src/clients/docker/models/ContainerUpdateRequest.ts b/src/clients/docker/models/ContainerUpdateRequest.ts index b62f4ca283..4f125bf704 100644 --- a/src/clients/docker/models/ContainerUpdateRequest.ts +++ b/src/clients/docker/models/ContainerUpdateRequest.ts @@ -2,426 +2,478 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; +import { mapValues } from "../runtime"; +import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from './ResourcesUlimitsInner'; -import type { ThrottleDevice } from './ThrottleDevice'; + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from "./ResourcesUlimitsInner"; +import type { ThrottleDevice } from "./ThrottleDevice"; import { - ThrottleDeviceFromJSON, - ThrottleDeviceFromJSONTyped, - ThrottleDeviceToJSON, - ThrottleDeviceToJSONTyped, -} from './ThrottleDevice'; -import type { DeviceMapping } from './DeviceMapping'; + ThrottleDeviceFromJSON, + ThrottleDeviceFromJSONTyped, + ThrottleDeviceToJSON, + ThrottleDeviceToJSONTyped, +} from "./ThrottleDevice"; +import type { DeviceMapping } from "./DeviceMapping"; import { - DeviceMappingFromJSON, - DeviceMappingFromJSONTyped, - DeviceMappingToJSON, - DeviceMappingToJSONTyped, -} from './DeviceMapping'; -import type { RestartPolicy } from './RestartPolicy'; + DeviceMappingFromJSON, + DeviceMappingFromJSONTyped, + DeviceMappingToJSON, + DeviceMappingToJSONTyped, +} from "./DeviceMapping"; +import type { RestartPolicy } from "./RestartPolicy"; import { - RestartPolicyFromJSON, - RestartPolicyFromJSONTyped, - RestartPolicyToJSON, - RestartPolicyToJSONTyped, -} from './RestartPolicy'; -import type { DeviceRequest } from './DeviceRequest'; + RestartPolicyFromJSON, + RestartPolicyFromJSONTyped, + RestartPolicyToJSON, + RestartPolicyToJSONTyped, +} from "./RestartPolicy"; +import type { DeviceRequest } from "./DeviceRequest"; import { - DeviceRequestFromJSON, - DeviceRequestFromJSONTyped, - DeviceRequestToJSON, - DeviceRequestToJSONTyped, -} from './DeviceRequest'; -import type { ResourcesBlkioWeightDeviceInner } from './ResourcesBlkioWeightDeviceInner'; + DeviceRequestFromJSON, + DeviceRequestFromJSONTyped, + DeviceRequestToJSON, + DeviceRequestToJSONTyped, +} from "./DeviceRequest"; +import type { ResourcesBlkioWeightDeviceInner } from "./ResourcesBlkioWeightDeviceInner"; import { - ResourcesBlkioWeightDeviceInnerFromJSON, - ResourcesBlkioWeightDeviceInnerFromJSONTyped, - ResourcesBlkioWeightDeviceInnerToJSON, - ResourcesBlkioWeightDeviceInnerToJSONTyped, -} from './ResourcesBlkioWeightDeviceInner'; + ResourcesBlkioWeightDeviceInnerFromJSON, + ResourcesBlkioWeightDeviceInnerFromJSONTyped, + ResourcesBlkioWeightDeviceInnerToJSON, + ResourcesBlkioWeightDeviceInnerToJSONTyped, +} from "./ResourcesBlkioWeightDeviceInner"; /** - * + * * @export * @interface ContainerUpdateRequest */ export interface ContainerUpdateRequest { - /** - * An integer value representing this container's relative CPU weight - * versus other containers. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuShares?: number; - /** - * Memory limit in bytes. - * @type {number} - * @memberof ContainerUpdateRequest - */ - Memory?: number; - /** - * Path to `cgroups` under which the container's `cgroup` is created. If - * the path is not absolute, the path is considered to be relative to the - * `cgroups` path of the init process. Cgroups are created if they do not - * already exist. - * - * @type {string} - * @memberof ContainerUpdateRequest - */ - CgroupParent?: string; - /** - * Block IO weight (relative weight). - * @type {number} - * @memberof ContainerUpdateRequest - */ - BlkioWeight?: number; - /** - * Block IO weight (relative device weight) in the form: - * - * ``` - * [{"Path": "device_path", "Weight": weight}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioWeightDevice?: Array; - /** - * Limit read rate (bytes per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceReadBps?: Array; - /** - * Limit write rate (bytes per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceWriteBps?: Array; - /** - * Limit read rate (IO per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceReadIOps?: Array; - /** - * Limit write rate (IO per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - BlkioDeviceWriteIOps?: Array; - /** - * The length of a CPU period in microseconds. - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuPeriod?: number; - /** - * Microseconds of CPU time that the container can get in a CPU period. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuQuota?: number; - /** - * The length of a CPU real-time period in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuRealtimePeriod?: number; - /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuRealtimeRuntime?: number; - /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`). - * - * @type {string} - * @memberof ContainerUpdateRequest - */ - CpusetCpus?: string; - /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only - * effective on NUMA systems. - * - * @type {string} - * @memberof ContainerUpdateRequest - */ - CpusetMems?: string; - /** - * A list of devices to add to the container. - * @type {Array} - * @memberof ContainerUpdateRequest - */ - Devices?: Array; - /** - * a list of cgroup rules to apply to the container - * @type {Array} - * @memberof ContainerUpdateRequest - */ - DeviceCgroupRules?: Array; - /** - * A list of requests for devices to be sent to device drivers. - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - DeviceRequests?: Array; - /** - * Hard limit for kernel TCP buffer memory (in bytes). Depending on the - * OCI runtime in use, this option may be ignored. It is no longer supported - * by the default (runc) runtime. - * - * This field is omitted when empty. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - KernelMemoryTCP?: number; - /** - * Memory soft limit in bytes. - * @type {number} - * @memberof ContainerUpdateRequest - */ - MemoryReservation?: number; - /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited - * swap. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - MemorySwap?: number; - /** - * Tune a container's memory swappiness behavior. Accepts an integer - * between 0 and 100. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - MemorySwappiness?: number; - /** - * CPU quota in units of 10-9 CPUs. - * @type {number} - * @memberof ContainerUpdateRequest - */ - NanoCpus?: number; - /** - * Disable OOM Killer for the container. - * @type {boolean} - * @memberof ContainerUpdateRequest - */ - OomKillDisable?: boolean; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof ContainerUpdateRequest - */ - Init?: boolean | null; - /** - * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` - * to not change. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - PidsLimit?: number | null; - /** - * A list of resource limits to set in the container. For example: - * - * ``` - * {"Name": "nofile", "Soft": 1024, "Hard": 2048} - * ``` - * - * @type {Array} - * @memberof ContainerUpdateRequest - */ - Ulimits?: Array; - /** - * The number of usable CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuCount?: number; - /** - * The usable percentage of the available CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - CpuPercent?: number; - /** - * Maximum IOps for the container system drive (Windows only) - * @type {number} - * @memberof ContainerUpdateRequest - */ - IOMaximumIOps?: number; - /** - * Maximum IO in bytes per second for the container system drive - * (Windows only). - * - * @type {number} - * @memberof ContainerUpdateRequest - */ - IOMaximumBandwidth?: number; - /** - * - * @type {RestartPolicy} - * @memberof ContainerUpdateRequest - */ - RestartPolicy?: RestartPolicy; + /** + * An integer value representing this container's relative CPU weight + * versus other containers. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuShares?: number; + /** + * Memory limit in bytes. + * @type {number} + * @memberof ContainerUpdateRequest + */ + Memory?: number; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If + * the path is not absolute, the path is considered to be relative to the + * `cgroups` path of the init process. Cgroups are created if they do not + * already exist. + * + * @type {string} + * @memberof ContainerUpdateRequest + */ + CgroupParent?: string; + /** + * Block IO weight (relative weight). + * @type {number} + * @memberof ContainerUpdateRequest + */ + BlkioWeight?: number; + /** + * Block IO weight (relative device weight) in the form: + * + * ``` + * [{"Path": "device_path", "Weight": weight}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioWeightDevice?: Array; + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceReadBps?: Array; + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceWriteBps?: Array; + /** + * Limit read rate (IO per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceReadIOps?: Array; + /** + * Limit write rate (IO per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + BlkioDeviceWriteIOps?: Array; + /** + * The length of a CPU period in microseconds. + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuPeriod?: number; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuQuota?: number; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuRealtimePeriod?: number; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuRealtimeRuntime?: number; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * + * @type {string} + * @memberof ContainerUpdateRequest + */ + CpusetCpus?: string; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + * effective on NUMA systems. + * + * @type {string} + * @memberof ContainerUpdateRequest + */ + CpusetMems?: string; + /** + * A list of devices to add to the container. + * @type {Array} + * @memberof ContainerUpdateRequest + */ + Devices?: Array; + /** + * a list of cgroup rules to apply to the container + * @type {Array} + * @memberof ContainerUpdateRequest + */ + DeviceCgroupRules?: Array; + /** + * A list of requests for devices to be sent to device drivers. + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + DeviceRequests?: Array; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + * OCI runtime in use, this option may be ignored. It is no longer supported + * by the default (runc) runtime. + * + * This field is omitted when empty. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + KernelMemoryTCP?: number; + /** + * Memory soft limit in bytes. + * @type {number} + * @memberof ContainerUpdateRequest + */ + MemoryReservation?: number; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + * swap. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + MemorySwap?: number; + /** + * Tune a container's memory swappiness behavior. Accepts an integer + * between 0 and 100. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + MemorySwappiness?: number; + /** + * CPU quota in units of 10-9 CPUs. + * @type {number} + * @memberof ContainerUpdateRequest + */ + NanoCpus?: number; + /** + * Disable OOM Killer for the container. + * @type {boolean} + * @memberof ContainerUpdateRequest + */ + OomKillDisable?: boolean; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof ContainerUpdateRequest + */ + Init?: boolean | null; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + * to not change. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + PidsLimit?: number | null; + /** + * A list of resource limits to set in the container. For example: + * + * ``` + * {"Name": "nofile", "Soft": 1024, "Hard": 2048} + * ``` + * + * @type {Array} + * @memberof ContainerUpdateRequest + */ + Ulimits?: Array; + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuCount?: number; + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + CpuPercent?: number; + /** + * Maximum IOps for the container system drive (Windows only) + * @type {number} + * @memberof ContainerUpdateRequest + */ + IOMaximumIOps?: number; + /** + * Maximum IO in bytes per second for the container system drive + * (Windows only). + * + * @type {number} + * @memberof ContainerUpdateRequest + */ + IOMaximumBandwidth?: number; + /** + * + * @type {RestartPolicy} + * @memberof ContainerUpdateRequest + */ + RestartPolicy?: RestartPolicy; } /** * Check if a given object implements the ContainerUpdateRequest interface. */ export function instanceOfContainerUpdateRequest(value: object): value is ContainerUpdateRequest { - return true; + return true; } export function ContainerUpdateRequestFromJSON(json: any): ContainerUpdateRequest { - return ContainerUpdateRequestFromJSONTyped(json, false); + return ContainerUpdateRequestFromJSONTyped(json, false); } -export function ContainerUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerUpdateRequest { - if (json == null) { - return json; - } - return { - - 'CpuShares': json['CpuShares'] == null ? undefined : json['CpuShares'], - 'Memory': json['Memory'] == null ? undefined : json['Memory'], - 'CgroupParent': json['CgroupParent'] == null ? undefined : json['CgroupParent'], - 'BlkioWeight': json['BlkioWeight'] == null ? undefined : json['BlkioWeight'], - 'BlkioWeightDevice': json['BlkioWeightDevice'] == null ? undefined : ((json['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON)), - 'BlkioDeviceReadBps': json['BlkioDeviceReadBps'] == null ? undefined : ((json['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceWriteBps': json['BlkioDeviceWriteBps'] == null ? undefined : ((json['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceReadIOps': json['BlkioDeviceReadIOps'] == null ? undefined : ((json['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceWriteIOps': json['BlkioDeviceWriteIOps'] == null ? undefined : ((json['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceFromJSON)), - 'CpuPeriod': json['CpuPeriod'] == null ? undefined : json['CpuPeriod'], - 'CpuQuota': json['CpuQuota'] == null ? undefined : json['CpuQuota'], - 'CpuRealtimePeriod': json['CpuRealtimePeriod'] == null ? undefined : json['CpuRealtimePeriod'], - 'CpuRealtimeRuntime': json['CpuRealtimeRuntime'] == null ? undefined : json['CpuRealtimeRuntime'], - 'CpusetCpus': json['CpusetCpus'] == null ? undefined : json['CpusetCpus'], - 'CpusetMems': json['CpusetMems'] == null ? undefined : json['CpusetMems'], - 'Devices': json['Devices'] == null ? undefined : ((json['Devices'] as Array).map(DeviceMappingFromJSON)), - 'DeviceCgroupRules': json['DeviceCgroupRules'] == null ? undefined : json['DeviceCgroupRules'], - 'DeviceRequests': json['DeviceRequests'] == null ? undefined : ((json['DeviceRequests'] as Array).map(DeviceRequestFromJSON)), - 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], - 'MemoryReservation': json['MemoryReservation'] == null ? undefined : json['MemoryReservation'], - 'MemorySwap': json['MemorySwap'] == null ? undefined : json['MemorySwap'], - 'MemorySwappiness': json['MemorySwappiness'] == null ? undefined : json['MemorySwappiness'], - 'NanoCpus': json['NanoCpus'] == null ? undefined : json['NanoCpus'], - 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], - 'Init': json['Init'] == null ? undefined : json['Init'], - 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], - 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), - 'CpuCount': json['CpuCount'] == null ? undefined : json['CpuCount'], - 'CpuPercent': json['CpuPercent'] == null ? undefined : json['CpuPercent'], - 'IOMaximumIOps': json['IOMaximumIOps'] == null ? undefined : json['IOMaximumIOps'], - 'IOMaximumBandwidth': json['IOMaximumBandwidth'] == null ? undefined : json['IOMaximumBandwidth'], - 'RestartPolicy': json['RestartPolicy'] == null ? undefined : RestartPolicyFromJSON(json['RestartPolicy']), - }; +export function ContainerUpdateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerUpdateRequest { + if (json == null) { + return json; + } + return { + CpuShares: json["CpuShares"] == null ? undefined : json["CpuShares"], + Memory: json["Memory"] == null ? undefined : json["Memory"], + CgroupParent: json["CgroupParent"] == null ? undefined : json["CgroupParent"], + BlkioWeight: json["BlkioWeight"] == null ? undefined : json["BlkioWeight"], + BlkioWeightDevice: + json["BlkioWeightDevice"] == null + ? undefined + : (json["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON), + BlkioDeviceReadBps: + json["BlkioDeviceReadBps"] == null + ? undefined + : (json["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceWriteBps: + json["BlkioDeviceWriteBps"] == null + ? undefined + : (json["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceReadIOps: + json["BlkioDeviceReadIOps"] == null + ? undefined + : (json["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceWriteIOps: + json["BlkioDeviceWriteIOps"] == null + ? undefined + : (json["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceFromJSON), + CpuPeriod: json["CpuPeriod"] == null ? undefined : json["CpuPeriod"], + CpuQuota: json["CpuQuota"] == null ? undefined : json["CpuQuota"], + CpuRealtimePeriod: json["CpuRealtimePeriod"] == null ? undefined : json["CpuRealtimePeriod"], + CpuRealtimeRuntime: json["CpuRealtimeRuntime"] == null ? undefined : json["CpuRealtimeRuntime"], + CpusetCpus: json["CpusetCpus"] == null ? undefined : json["CpusetCpus"], + CpusetMems: json["CpusetMems"] == null ? undefined : json["CpusetMems"], + Devices: + json["Devices"] == null + ? undefined + : (json["Devices"] as Array).map(DeviceMappingFromJSON), + DeviceCgroupRules: json["DeviceCgroupRules"] == null ? undefined : json["DeviceCgroupRules"], + DeviceRequests: + json["DeviceRequests"] == null + ? undefined + : (json["DeviceRequests"] as Array).map(DeviceRequestFromJSON), + KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], + MemoryReservation: json["MemoryReservation"] == null ? undefined : json["MemoryReservation"], + MemorySwap: json["MemorySwap"] == null ? undefined : json["MemorySwap"], + MemorySwappiness: json["MemorySwappiness"] == null ? undefined : json["MemorySwappiness"], + NanoCpus: json["NanoCpus"] == null ? undefined : json["NanoCpus"], + OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], + Init: json["Init"] == null ? undefined : json["Init"], + PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], + Ulimits: + json["Ulimits"] == null + ? undefined + : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), + CpuCount: json["CpuCount"] == null ? undefined : json["CpuCount"], + CpuPercent: json["CpuPercent"] == null ? undefined : json["CpuPercent"], + IOMaximumIOps: json["IOMaximumIOps"] == null ? undefined : json["IOMaximumIOps"], + IOMaximumBandwidth: json["IOMaximumBandwidth"] == null ? undefined : json["IOMaximumBandwidth"], + RestartPolicy: + json["RestartPolicy"] == null ? undefined : RestartPolicyFromJSON(json["RestartPolicy"]), + }; } export function ContainerUpdateRequestToJSON(json: any): ContainerUpdateRequest { - return ContainerUpdateRequestToJSONTyped(json, false); + return ContainerUpdateRequestToJSONTyped(json, false); } -export function ContainerUpdateRequestToJSONTyped(value?: ContainerUpdateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerUpdateRequestToJSONTyped( + value?: ContainerUpdateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CpuShares': value['CpuShares'], - 'Memory': value['Memory'], - 'CgroupParent': value['CgroupParent'], - 'BlkioWeight': value['BlkioWeight'], - 'BlkioWeightDevice': value['BlkioWeightDevice'] == null ? undefined : ((value['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON)), - 'BlkioDeviceReadBps': value['BlkioDeviceReadBps'] == null ? undefined : ((value['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceWriteBps': value['BlkioDeviceWriteBps'] == null ? undefined : ((value['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceReadIOps': value['BlkioDeviceReadIOps'] == null ? undefined : ((value['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceWriteIOps': value['BlkioDeviceWriteIOps'] == null ? undefined : ((value['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceToJSON)), - 'CpuPeriod': value['CpuPeriod'], - 'CpuQuota': value['CpuQuota'], - 'CpuRealtimePeriod': value['CpuRealtimePeriod'], - 'CpuRealtimeRuntime': value['CpuRealtimeRuntime'], - 'CpusetCpus': value['CpusetCpus'], - 'CpusetMems': value['CpusetMems'], - 'Devices': value['Devices'] == null ? undefined : ((value['Devices'] as Array).map(DeviceMappingToJSON)), - 'DeviceCgroupRules': value['DeviceCgroupRules'], - 'DeviceRequests': value['DeviceRequests'] == null ? undefined : ((value['DeviceRequests'] as Array).map(DeviceRequestToJSON)), - 'KernelMemoryTCP': value['KernelMemoryTCP'], - 'MemoryReservation': value['MemoryReservation'], - 'MemorySwap': value['MemorySwap'], - 'MemorySwappiness': value['MemorySwappiness'], - 'NanoCpus': value['NanoCpus'], - 'OomKillDisable': value['OomKillDisable'], - 'Init': value['Init'], - 'PidsLimit': value['PidsLimit'], - 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), - 'CpuCount': value['CpuCount'], - 'CpuPercent': value['CpuPercent'], - 'IOMaximumIOps': value['IOMaximumIOps'], - 'IOMaximumBandwidth': value['IOMaximumBandwidth'], - 'RestartPolicy': RestartPolicyToJSON(value['RestartPolicy']), - }; + return { + CpuShares: value["CpuShares"], + Memory: value["Memory"], + CgroupParent: value["CgroupParent"], + BlkioWeight: value["BlkioWeight"], + BlkioWeightDevice: + value["BlkioWeightDevice"] == null + ? undefined + : (value["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON), + BlkioDeviceReadBps: + value["BlkioDeviceReadBps"] == null + ? undefined + : (value["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceWriteBps: + value["BlkioDeviceWriteBps"] == null + ? undefined + : (value["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceReadIOps: + value["BlkioDeviceReadIOps"] == null + ? undefined + : (value["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceWriteIOps: + value["BlkioDeviceWriteIOps"] == null + ? undefined + : (value["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceToJSON), + CpuPeriod: value["CpuPeriod"], + CpuQuota: value["CpuQuota"], + CpuRealtimePeriod: value["CpuRealtimePeriod"], + CpuRealtimeRuntime: value["CpuRealtimeRuntime"], + CpusetCpus: value["CpusetCpus"], + CpusetMems: value["CpusetMems"], + Devices: + value["Devices"] == null + ? undefined + : (value["Devices"] as Array).map(DeviceMappingToJSON), + DeviceCgroupRules: value["DeviceCgroupRules"], + DeviceRequests: + value["DeviceRequests"] == null + ? undefined + : (value["DeviceRequests"] as Array).map(DeviceRequestToJSON), + KernelMemoryTCP: value["KernelMemoryTCP"], + MemoryReservation: value["MemoryReservation"], + MemorySwap: value["MemorySwap"], + MemorySwappiness: value["MemorySwappiness"], + NanoCpus: value["NanoCpus"], + OomKillDisable: value["OomKillDisable"], + Init: value["Init"], + PidsLimit: value["PidsLimit"], + Ulimits: + value["Ulimits"] == null + ? undefined + : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), + CpuCount: value["CpuCount"], + CpuPercent: value["CpuPercent"], + IOMaximumIOps: value["IOMaximumIOps"], + IOMaximumBandwidth: value["IOMaximumBandwidth"], + RestartPolicy: RestartPolicyToJSON(value["RestartPolicy"]), + }; } - diff --git a/src/clients/docker/models/ContainerUpdateResponse.ts b/src/clients/docker/models/ContainerUpdateResponse.ts index e329a8b194..c39af51329 100644 --- a/src/clients/docker/models/ContainerUpdateResponse.ts +++ b/src/clients/docker/models/ContainerUpdateResponse.ts @@ -2,64 +2,67 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * OK response to ContainerUpdate operation * @export * @interface ContainerUpdateResponse */ export interface ContainerUpdateResponse { - /** - * - * @type {Array} - * @memberof ContainerUpdateResponse - */ - Warnings?: Array; + /** + * + * @type {Array} + * @memberof ContainerUpdateResponse + */ + Warnings?: Array; } /** * Check if a given object implements the ContainerUpdateResponse interface. */ export function instanceOfContainerUpdateResponse(value: object): value is ContainerUpdateResponse { - return true; + return true; } export function ContainerUpdateResponseFromJSON(json: any): ContainerUpdateResponse { - return ContainerUpdateResponseFromJSONTyped(json, false); + return ContainerUpdateResponseFromJSONTyped(json, false); } -export function ContainerUpdateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerUpdateResponse { - if (json == null) { - return json; - } - return { - - 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], - }; +export function ContainerUpdateResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerUpdateResponse { + if (json == null) { + return json; + } + return { + Warnings: json["Warnings"] == null ? undefined : json["Warnings"], + }; } export function ContainerUpdateResponseToJSON(json: any): ContainerUpdateResponse { - return ContainerUpdateResponseToJSONTyped(json, false); + return ContainerUpdateResponseToJSONTyped(json, false); } -export function ContainerUpdateResponseToJSONTyped(value?: ContainerUpdateResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerUpdateResponseToJSONTyped( + value?: ContainerUpdateResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Warnings': value['Warnings'], - }; + return { + Warnings: value["Warnings"], + }; } - diff --git a/src/clients/docker/models/ContainerWaitExitError.ts b/src/clients/docker/models/ContainerWaitExitError.ts index 1d554b793d..0618f583cf 100644 --- a/src/clients/docker/models/ContainerWaitExitError.ts +++ b/src/clients/docker/models/ContainerWaitExitError.ts @@ -2,64 +2,67 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * container waiting error, if any * @export * @interface ContainerWaitExitError */ export interface ContainerWaitExitError { - /** - * Details of an error - * @type {string} - * @memberof ContainerWaitExitError - */ - Message?: string; + /** + * Details of an error + * @type {string} + * @memberof ContainerWaitExitError + */ + Message?: string; } /** * Check if a given object implements the ContainerWaitExitError interface. */ export function instanceOfContainerWaitExitError(value: object): value is ContainerWaitExitError { - return true; + return true; } export function ContainerWaitExitErrorFromJSON(json: any): ContainerWaitExitError { - return ContainerWaitExitErrorFromJSONTyped(json, false); + return ContainerWaitExitErrorFromJSONTyped(json, false); } -export function ContainerWaitExitErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerWaitExitError { - if (json == null) { - return json; - } - return { - - 'Message': json['Message'] == null ? undefined : json['Message'], - }; +export function ContainerWaitExitErrorFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerWaitExitError { + if (json == null) { + return json; + } + return { + Message: json["Message"] == null ? undefined : json["Message"], + }; } export function ContainerWaitExitErrorToJSON(json: any): ContainerWaitExitError { - return ContainerWaitExitErrorToJSONTyped(json, false); + return ContainerWaitExitErrorToJSONTyped(json, false); } -export function ContainerWaitExitErrorToJSONTyped(value?: ContainerWaitExitError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerWaitExitErrorToJSONTyped( + value?: ContainerWaitExitError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Message': value['Message'], - }; + return { + Message: value["Message"], + }; } - diff --git a/src/clients/docker/models/ContainerWaitResponse.ts b/src/clients/docker/models/ContainerWaitResponse.ts index 905e1057e4..a78b0e70ca 100644 --- a/src/clients/docker/models/ContainerWaitResponse.ts +++ b/src/clients/docker/models/ContainerWaitResponse.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ContainerWaitExitError } from './ContainerWaitExitError'; +import { mapValues } from "../runtime"; +import type { ContainerWaitExitError } from "./ContainerWaitExitError"; import { - ContainerWaitExitErrorFromJSON, - ContainerWaitExitErrorFromJSONTyped, - ContainerWaitExitErrorToJSON, - ContainerWaitExitErrorToJSONTyped, -} from './ContainerWaitExitError'; + ContainerWaitExitErrorFromJSON, + ContainerWaitExitErrorFromJSONTyped, + ContainerWaitExitErrorToJSON, + ContainerWaitExitErrorToJSONTyped, +} from "./ContainerWaitExitError"; /** * OK response to ContainerWait operation @@ -27,56 +27,59 @@ import { * @interface ContainerWaitResponse */ export interface ContainerWaitResponse { - /** - * Exit code of the container - * @type {number} - * @memberof ContainerWaitResponse - */ - StatusCode: number; - /** - * - * @type {ContainerWaitExitError} - * @memberof ContainerWaitResponse - */ - Error?: ContainerWaitExitError; + /** + * Exit code of the container + * @type {number} + * @memberof ContainerWaitResponse + */ + StatusCode: number; + /** + * + * @type {ContainerWaitExitError} + * @memberof ContainerWaitResponse + */ + Error?: ContainerWaitExitError; } /** * Check if a given object implements the ContainerWaitResponse interface. */ export function instanceOfContainerWaitResponse(value: object): value is ContainerWaitResponse { - if (!('StatusCode' in value) || value['StatusCode'] === undefined) return false; - return true; + if (!("StatusCode" in value) || value["StatusCode"] === undefined) return false; + return true; } export function ContainerWaitResponseFromJSON(json: any): ContainerWaitResponse { - return ContainerWaitResponseFromJSONTyped(json, false); + return ContainerWaitResponseFromJSONTyped(json, false); } -export function ContainerWaitResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerWaitResponse { - if (json == null) { - return json; - } - return { - - 'StatusCode': json['StatusCode'], - 'Error': json['Error'] == null ? undefined : ContainerWaitExitErrorFromJSON(json['Error']), - }; +export function ContainerWaitResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ContainerWaitResponse { + if (json == null) { + return json; + } + return { + StatusCode: json["StatusCode"], + Error: json["Error"] == null ? undefined : ContainerWaitExitErrorFromJSON(json["Error"]), + }; } export function ContainerWaitResponseToJSON(json: any): ContainerWaitResponse { - return ContainerWaitResponseToJSONTyped(json, false); + return ContainerWaitResponseToJSONTyped(json, false); } -export function ContainerWaitResponseToJSONTyped(value?: ContainerWaitResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ContainerWaitResponseToJSONTyped( + value?: ContainerWaitResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'StatusCode': value['StatusCode'], - 'Error': ContainerWaitExitErrorToJSON(value['Error']), - }; + return { + StatusCode: value["StatusCode"], + Error: ContainerWaitExitErrorToJSON(value["Error"]), + }; } - diff --git a/src/clients/docker/models/CreateImageInfo.ts b/src/clients/docker/models/CreateImageInfo.ts index a21a84a4d5..ac2239e6f6 100644 --- a/src/clients/docker/models/CreateImageInfo.ts +++ b/src/clients/docker/models/CreateImageInfo.ts @@ -2,119 +2,123 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorDetail } from './ErrorDetail'; +import { mapValues } from "../runtime"; +import type { ErrorDetail } from "./ErrorDetail"; import { - ErrorDetailFromJSON, - ErrorDetailFromJSONTyped, - ErrorDetailToJSON, - ErrorDetailToJSONTyped, -} from './ErrorDetail'; -import type { ProgressDetail } from './ProgressDetail'; + ErrorDetailFromJSON, + ErrorDetailFromJSONTyped, + ErrorDetailToJSON, + ErrorDetailToJSONTyped, +} from "./ErrorDetail"; +import type { ProgressDetail } from "./ProgressDetail"; import { - ProgressDetailFromJSON, - ProgressDetailFromJSONTyped, - ProgressDetailToJSON, - ProgressDetailToJSONTyped, -} from './ProgressDetail'; + ProgressDetailFromJSON, + ProgressDetailFromJSONTyped, + ProgressDetailToJSON, + ProgressDetailToJSONTyped, +} from "./ProgressDetail"; /** - * + * * @export * @interface CreateImageInfo */ export interface CreateImageInfo { - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - error?: string; - /** - * - * @type {ErrorDetail} - * @memberof CreateImageInfo - */ - errorDetail?: ErrorDetail; - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - status?: string; - /** - * - * @type {string} - * @memberof CreateImageInfo - */ - progress?: string; - /** - * - * @type {ProgressDetail} - * @memberof CreateImageInfo - */ - progressDetail?: ProgressDetail; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + id?: string; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + error?: string; + /** + * + * @type {ErrorDetail} + * @memberof CreateImageInfo + */ + errorDetail?: ErrorDetail; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + status?: string; + /** + * + * @type {string} + * @memberof CreateImageInfo + */ + progress?: string; + /** + * + * @type {ProgressDetail} + * @memberof CreateImageInfo + */ + progressDetail?: ProgressDetail; } /** * Check if a given object implements the CreateImageInfo interface. */ export function instanceOfCreateImageInfo(value: object): value is CreateImageInfo { - return true; + return true; } export function CreateImageInfoFromJSON(json: any): CreateImageInfo { - return CreateImageInfoFromJSONTyped(json, false); + return CreateImageInfoFromJSONTyped(json, false); } -export function CreateImageInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateImageInfo { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'error': json['error'] == null ? undefined : json['error'], - 'errorDetail': json['errorDetail'] == null ? undefined : ErrorDetailFromJSON(json['errorDetail']), - 'status': json['status'] == null ? undefined : json['status'], - 'progress': json['progress'] == null ? undefined : json['progress'], - 'progressDetail': json['progressDetail'] == null ? undefined : ProgressDetailFromJSON(json['progressDetail']), - }; +export function CreateImageInfoFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateImageInfo { + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + error: json["error"] == null ? undefined : json["error"], + errorDetail: json["errorDetail"] == null ? undefined : ErrorDetailFromJSON(json["errorDetail"]), + status: json["status"] == null ? undefined : json["status"], + progress: json["progress"] == null ? undefined : json["progress"], + progressDetail: + json["progressDetail"] == null ? undefined : ProgressDetailFromJSON(json["progressDetail"]), + }; } export function CreateImageInfoToJSON(json: any): CreateImageInfo { - return CreateImageInfoToJSONTyped(json, false); + return CreateImageInfoToJSONTyped(json, false); } -export function CreateImageInfoToJSONTyped(value?: CreateImageInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateImageInfoToJSONTyped( + value?: CreateImageInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'error': value['error'], - 'errorDetail': ErrorDetailToJSON(value['errorDetail']), - 'status': value['status'], - 'progress': value['progress'], - 'progressDetail': ProgressDetailToJSON(value['progressDetail']), - }; + return { + id: value["id"], + error: value["error"], + errorDetail: ErrorDetailToJSON(value["errorDetail"]), + status: value["status"], + progress: value["progress"], + progressDetail: ProgressDetailToJSON(value["progressDetail"]), + }; } - diff --git a/src/clients/docker/models/DeviceMapping.ts b/src/clients/docker/models/DeviceMapping.ts index 036233ccf5..f8813d81de 100644 --- a/src/clients/docker/models/DeviceMapping.ts +++ b/src/clients/docker/models/DeviceMapping.ts @@ -2,80 +2,80 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * A device mapping between the host and container * @export * @interface DeviceMapping */ export interface DeviceMapping { - /** - * - * @type {string} - * @memberof DeviceMapping - */ - PathOnHost?: string; - /** - * - * @type {string} - * @memberof DeviceMapping - */ - PathInContainer?: string; - /** - * - * @type {string} - * @memberof DeviceMapping - */ - CgroupPermissions?: string; + /** + * + * @type {string} + * @memberof DeviceMapping + */ + PathOnHost?: string; + /** + * + * @type {string} + * @memberof DeviceMapping + */ + PathInContainer?: string; + /** + * + * @type {string} + * @memberof DeviceMapping + */ + CgroupPermissions?: string; } /** * Check if a given object implements the DeviceMapping interface. */ export function instanceOfDeviceMapping(value: object): value is DeviceMapping { - return true; + return true; } export function DeviceMappingFromJSON(json: any): DeviceMapping { - return DeviceMappingFromJSONTyped(json, false); + return DeviceMappingFromJSONTyped(json, false); } export function DeviceMappingFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceMapping { - if (json == null) { - return json; - } - return { - - 'PathOnHost': json['PathOnHost'] == null ? undefined : json['PathOnHost'], - 'PathInContainer': json['PathInContainer'] == null ? undefined : json['PathInContainer'], - 'CgroupPermissions': json['CgroupPermissions'] == null ? undefined : json['CgroupPermissions'], - }; + if (json == null) { + return json; + } + return { + PathOnHost: json["PathOnHost"] == null ? undefined : json["PathOnHost"], + PathInContainer: json["PathInContainer"] == null ? undefined : json["PathInContainer"], + CgroupPermissions: json["CgroupPermissions"] == null ? undefined : json["CgroupPermissions"], + }; } export function DeviceMappingToJSON(json: any): DeviceMapping { - return DeviceMappingToJSONTyped(json, false); + return DeviceMappingToJSONTyped(json, false); } -export function DeviceMappingToJSONTyped(value?: DeviceMapping | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DeviceMappingToJSONTyped( + value?: DeviceMapping | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'PathOnHost': value['PathOnHost'], - 'PathInContainer': value['PathInContainer'], - 'CgroupPermissions': value['CgroupPermissions'], - }; + return { + PathOnHost: value["PathOnHost"], + PathInContainer: value["PathInContainer"], + CgroupPermissions: value["CgroupPermissions"], + }; } - diff --git a/src/clients/docker/models/DeviceRequest.ts b/src/clients/docker/models/DeviceRequest.ts index d194a88947..21354e7610 100644 --- a/src/clients/docker/models/DeviceRequest.ts +++ b/src/clients/docker/models/DeviceRequest.ts @@ -2,99 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * A request for devices to be sent to device drivers * @export * @interface DeviceRequest */ export interface DeviceRequest { - /** - * - * @type {string} - * @memberof DeviceRequest - */ - Driver?: string; - /** - * - * @type {number} - * @memberof DeviceRequest - */ - Count?: number; - /** - * - * @type {Array} - * @memberof DeviceRequest - */ - DeviceIDs?: Array; - /** - * A list of capabilities; an OR list of AND lists of capabilities. - * - * @type {Array>} - * @memberof DeviceRequest - */ - Capabilities?: Array>; - /** - * Driver-specific options, specified as a key/value pairs. These options - * are passed directly to the driver. - * - * @type {{ [key: string]: string; }} - * @memberof DeviceRequest - */ - Options?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof DeviceRequest + */ + Driver?: string; + /** + * + * @type {number} + * @memberof DeviceRequest + */ + Count?: number; + /** + * + * @type {Array} + * @memberof DeviceRequest + */ + DeviceIDs?: Array; + /** + * A list of capabilities; an OR list of AND lists of capabilities. + * + * @type {Array>} + * @memberof DeviceRequest + */ + Capabilities?: Array>; + /** + * Driver-specific options, specified as a key/value pairs. These options + * are passed directly to the driver. + * + * @type {{ [key: string]: string; }} + * @memberof DeviceRequest + */ + Options?: { [key: string]: string }; } /** * Check if a given object implements the DeviceRequest interface. */ export function instanceOfDeviceRequest(value: object): value is DeviceRequest { - return true; + return true; } export function DeviceRequestFromJSON(json: any): DeviceRequest { - return DeviceRequestFromJSONTyped(json, false); + return DeviceRequestFromJSONTyped(json, false); } export function DeviceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeviceRequest { - if (json == null) { - return json; - } - return { - - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'Count': json['Count'] == null ? undefined : json['Count'], - 'DeviceIDs': json['DeviceIDs'] == null ? undefined : json['DeviceIDs'], - 'Capabilities': json['Capabilities'] == null ? undefined : json['Capabilities'], - 'Options': json['Options'] == null ? undefined : json['Options'], - }; + if (json == null) { + return json; + } + return { + Driver: json["Driver"] == null ? undefined : json["Driver"], + Count: json["Count"] == null ? undefined : json["Count"], + DeviceIDs: json["DeviceIDs"] == null ? undefined : json["DeviceIDs"], + Capabilities: json["Capabilities"] == null ? undefined : json["Capabilities"], + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function DeviceRequestToJSON(json: any): DeviceRequest { - return DeviceRequestToJSONTyped(json, false); + return DeviceRequestToJSONTyped(json, false); } -export function DeviceRequestToJSONTyped(value?: DeviceRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DeviceRequestToJSONTyped( + value?: DeviceRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Driver': value['Driver'], - 'Count': value['Count'], - 'DeviceIDs': value['DeviceIDs'], - 'Capabilities': value['Capabilities'], - 'Options': value['Options'], - }; + return { + Driver: value["Driver"], + Count: value["Count"], + DeviceIDs: value["DeviceIDs"], + Capabilities: value["Capabilities"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/DistributionInspect.ts b/src/clients/docker/models/DistributionInspect.ts index 78904c780b..859155657f 100644 --- a/src/clients/docker/models/DistributionInspect.ts +++ b/src/clients/docker/models/DistributionInspect.ts @@ -2,92 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { OCIDescriptor } from './OCIDescriptor'; +import { mapValues } from "../runtime"; +import type { OCIDescriptor } from "./OCIDescriptor"; import { - OCIDescriptorFromJSON, - OCIDescriptorFromJSONTyped, - OCIDescriptorToJSON, - OCIDescriptorToJSONTyped, -} from './OCIDescriptor'; -import type { OCIPlatform } from './OCIPlatform'; + OCIDescriptorFromJSON, + OCIDescriptorFromJSONTyped, + OCIDescriptorToJSON, + OCIDescriptorToJSONTyped, +} from "./OCIDescriptor"; +import type { OCIPlatform } from "./OCIPlatform"; import { - OCIPlatformFromJSON, - OCIPlatformFromJSONTyped, - OCIPlatformToJSON, - OCIPlatformToJSONTyped, -} from './OCIPlatform'; + OCIPlatformFromJSON, + OCIPlatformFromJSONTyped, + OCIPlatformToJSON, + OCIPlatformToJSONTyped, +} from "./OCIPlatform"; /** * Describes the result obtained from contacting the registry to retrieve * image metadata. - * + * * @export * @interface DistributionInspect */ export interface DistributionInspect { - /** - * - * @type {OCIDescriptor} - * @memberof DistributionInspect - */ - Descriptor: OCIDescriptor; - /** - * An array containing all platforms supported by the image. - * - * @type {Array} - * @memberof DistributionInspect - */ - Platforms: Array; + /** + * + * @type {OCIDescriptor} + * @memberof DistributionInspect + */ + Descriptor: OCIDescriptor; + /** + * An array containing all platforms supported by the image. + * + * @type {Array} + * @memberof DistributionInspect + */ + Platforms: Array; } /** * Check if a given object implements the DistributionInspect interface. */ export function instanceOfDistributionInspect(value: object): value is DistributionInspect { - if (!('Descriptor' in value) || value['Descriptor'] === undefined) return false; - if (!('Platforms' in value) || value['Platforms'] === undefined) return false; - return true; + if (!("Descriptor" in value) || value["Descriptor"] === undefined) return false; + if (!("Platforms" in value) || value["Platforms"] === undefined) return false; + return true; } export function DistributionInspectFromJSON(json: any): DistributionInspect { - return DistributionInspectFromJSONTyped(json, false); + return DistributionInspectFromJSONTyped(json, false); } -export function DistributionInspectFromJSONTyped(json: any, ignoreDiscriminator: boolean): DistributionInspect { - if (json == null) { - return json; - } - return { - - 'Descriptor': OCIDescriptorFromJSON(json['Descriptor']), - 'Platforms': ((json['Platforms'] as Array).map(OCIPlatformFromJSON)), - }; +export function DistributionInspectFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): DistributionInspect { + if (json == null) { + return json; + } + return { + Descriptor: OCIDescriptorFromJSON(json["Descriptor"]), + Platforms: (json["Platforms"] as Array).map(OCIPlatformFromJSON), + }; } export function DistributionInspectToJSON(json: any): DistributionInspect { - return DistributionInspectToJSONTyped(json, false); + return DistributionInspectToJSONTyped(json, false); } -export function DistributionInspectToJSONTyped(value?: DistributionInspect | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DistributionInspectToJSONTyped( + value?: DistributionInspect | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Descriptor': OCIDescriptorToJSON(value['Descriptor']), - 'Platforms': ((value['Platforms'] as Array).map(OCIPlatformToJSON)), - }; + return { + Descriptor: OCIDescriptorToJSON(value["Descriptor"]), + Platforms: (value["Platforms"] as Array).map(OCIPlatformToJSON), + }; } - diff --git a/src/clients/docker/models/Driver.ts b/src/clients/docker/models/Driver.ts index 2b7967129b..a4a498ec8d 100644 --- a/src/clients/docker/models/Driver.ts +++ b/src/clients/docker/models/Driver.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Driver represents a driver (network, logging, secrets). * @export * @interface Driver */ export interface Driver { - /** - * Name of the driver. - * @type {string} - * @memberof Driver - */ - Name: string; - /** - * Key/value map of driver-specific options. - * @type {{ [key: string]: string; }} - * @memberof Driver - */ - Options?: { [key: string]: string; }; + /** + * Name of the driver. + * @type {string} + * @memberof Driver + */ + Name: string; + /** + * Key/value map of driver-specific options. + * @type {{ [key: string]: string; }} + * @memberof Driver + */ + Options?: { [key: string]: string }; } /** * Check if a given object implements the Driver interface. */ export function instanceOfDriver(value: object): value is Driver { - if (!('Name' in value) || value['Name'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + return true; } export function DriverFromJSON(json: any): Driver { - return DriverFromJSONTyped(json, false); + return DriverFromJSONTyped(json, false); } export function DriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): Driver { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Options': json['Options'] == null ? undefined : json['Options'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"], + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function DriverToJSON(json: any): Driver { - return DriverToJSONTyped(json, false); + return DriverToJSONTyped(json, false); } -export function DriverToJSONTyped(value?: Driver | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DriverToJSONTyped( + value?: Driver | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Options': value['Options'], - }; + return { + Name: value["Name"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/EndpointIPAMConfig.ts b/src/clients/docker/models/EndpointIPAMConfig.ts index 8ec25d9ea0..361ed1472d 100644 --- a/src/clients/docker/models/EndpointIPAMConfig.ts +++ b/src/clients/docker/models/EndpointIPAMConfig.ts @@ -2,81 +2,84 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * EndpointIPAMConfig represents an endpoint's IPAM configuration. - * + * * @export * @interface EndpointIPAMConfig */ export interface EndpointIPAMConfig { - /** - * - * @type {string} - * @memberof EndpointIPAMConfig - */ - IPv4Address?: string; - /** - * - * @type {string} - * @memberof EndpointIPAMConfig - */ - IPv6Address?: string; - /** - * - * @type {Array} - * @memberof EndpointIPAMConfig - */ - LinkLocalIPs?: Array; + /** + * + * @type {string} + * @memberof EndpointIPAMConfig + */ + IPv4Address?: string; + /** + * + * @type {string} + * @memberof EndpointIPAMConfig + */ + IPv6Address?: string; + /** + * + * @type {Array} + * @memberof EndpointIPAMConfig + */ + LinkLocalIPs?: Array; } /** * Check if a given object implements the EndpointIPAMConfig interface. */ export function instanceOfEndpointIPAMConfig(value: object): value is EndpointIPAMConfig { - return true; + return true; } export function EndpointIPAMConfigFromJSON(json: any): EndpointIPAMConfig { - return EndpointIPAMConfigFromJSONTyped(json, false); + return EndpointIPAMConfigFromJSONTyped(json, false); } -export function EndpointIPAMConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointIPAMConfig { - if (json == null) { - return json; - } - return { - - 'IPv4Address': json['IPv4Address'] == null ? undefined : json['IPv4Address'], - 'IPv6Address': json['IPv6Address'] == null ? undefined : json['IPv6Address'], - 'LinkLocalIPs': json['LinkLocalIPs'] == null ? undefined : json['LinkLocalIPs'], - }; +export function EndpointIPAMConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EndpointIPAMConfig { + if (json == null) { + return json; + } + return { + IPv4Address: json["IPv4Address"] == null ? undefined : json["IPv4Address"], + IPv6Address: json["IPv6Address"] == null ? undefined : json["IPv6Address"], + LinkLocalIPs: json["LinkLocalIPs"] == null ? undefined : json["LinkLocalIPs"], + }; } export function EndpointIPAMConfigToJSON(json: any): EndpointIPAMConfig { - return EndpointIPAMConfigToJSONTyped(json, false); + return EndpointIPAMConfigToJSONTyped(json, false); } -export function EndpointIPAMConfigToJSONTyped(value?: EndpointIPAMConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EndpointIPAMConfigToJSONTyped( + value?: EndpointIPAMConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'IPv4Address': value['IPv4Address'], - 'IPv6Address': value['IPv6Address'], - 'LinkLocalIPs': value['LinkLocalIPs'], - }; + return { + IPv4Address: value["IPv4Address"], + IPv6Address: value["IPv6Address"], + LinkLocalIPs: value["LinkLocalIPs"], + }; } - diff --git a/src/clients/docker/models/EndpointPortConfig.ts b/src/clients/docker/models/EndpointPortConfig.ts index b81e929e31..ae8025915a 100644 --- a/src/clients/docker/models/EndpointPortConfig.ts +++ b/src/clients/docker/models/EndpointPortConfig.ts @@ -2,124 +2,126 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface EndpointPortConfig */ export interface EndpointPortConfig { - /** - * - * @type {string} - * @memberof EndpointPortConfig - */ - Name?: string; - /** - * - * @type {string} - * @memberof EndpointPortConfig - */ - Protocol?: EndpointPortConfigProtocolEnum; - /** - * The port inside the container. - * @type {number} - * @memberof EndpointPortConfig - */ - TargetPort?: number; - /** - * The port on the swarm hosts. - * @type {number} - * @memberof EndpointPortConfig - */ - PublishedPort?: number; - /** - * The mode in which port is published. - * - *


- * - * - "ingress" makes the target port accessible on every node, - * regardless of whether there is a task for the service running on - * that node or not. - * - "host" bypasses the routing mesh and publish the port directly on - * the swarm node where that service is running. - * - * @type {string} - * @memberof EndpointPortConfig - */ - PublishMode?: EndpointPortConfigPublishModeEnum; + /** + * + * @type {string} + * @memberof EndpointPortConfig + */ + Name?: string; + /** + * + * @type {string} + * @memberof EndpointPortConfig + */ + Protocol?: EndpointPortConfigProtocolEnum; + /** + * The port inside the container. + * @type {number} + * @memberof EndpointPortConfig + */ + TargetPort?: number; + /** + * The port on the swarm hosts. + * @type {number} + * @memberof EndpointPortConfig + */ + PublishedPort?: number; + /** + * The mode in which port is published. + * + *


+ * + * - "ingress" makes the target port accessible on every node, + * regardless of whether there is a task for the service running on + * that node or not. + * - "host" bypasses the routing mesh and publish the port directly on + * the swarm node where that service is running. + * + * @type {string} + * @memberof EndpointPortConfig + */ + PublishMode?: EndpointPortConfigPublishModeEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum EndpointPortConfigProtocolEnum { - Tcp = 'tcp', - Udp = 'udp', - Sctp = 'sctp' + Tcp = "tcp", + Udp = "udp", + Sctp = "sctp", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum EndpointPortConfigPublishModeEnum { - Ingress = 'ingress', - Host = 'host' + Ingress = "ingress", + Host = "host", } - /** * Check if a given object implements the EndpointPortConfig interface. */ export function instanceOfEndpointPortConfig(value: object): value is EndpointPortConfig { - return true; + return true; } export function EndpointPortConfigFromJSON(json: any): EndpointPortConfig { - return EndpointPortConfigFromJSONTyped(json, false); + return EndpointPortConfigFromJSONTyped(json, false); } -export function EndpointPortConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointPortConfig { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Protocol': json['Protocol'] == null ? undefined : json['Protocol'], - 'TargetPort': json['TargetPort'] == null ? undefined : json['TargetPort'], - 'PublishedPort': json['PublishedPort'] == null ? undefined : json['PublishedPort'], - 'PublishMode': json['PublishMode'] == null ? undefined : json['PublishMode'], - }; +export function EndpointPortConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EndpointPortConfig { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Protocol: json["Protocol"] == null ? undefined : json["Protocol"], + TargetPort: json["TargetPort"] == null ? undefined : json["TargetPort"], + PublishedPort: json["PublishedPort"] == null ? undefined : json["PublishedPort"], + PublishMode: json["PublishMode"] == null ? undefined : json["PublishMode"], + }; } export function EndpointPortConfigToJSON(json: any): EndpointPortConfig { - return EndpointPortConfigToJSONTyped(json, false); + return EndpointPortConfigToJSONTyped(json, false); } -export function EndpointPortConfigToJSONTyped(value?: EndpointPortConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EndpointPortConfigToJSONTyped( + value?: EndpointPortConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Protocol': value['Protocol'], - 'TargetPort': value['TargetPort'], - 'PublishedPort': value['PublishedPort'], - 'PublishMode': value['PublishMode'], - }; + return { + Name: value["Name"], + Protocol: value["Protocol"], + TargetPort: value["TargetPort"], + PublishedPort: value["PublishedPort"], + PublishMode: value["PublishMode"], + }; } - diff --git a/src/clients/docker/models/EndpointSettings.ts b/src/clients/docker/models/EndpointSettings.ts index 0c694f45e6..9f63ed27dd 100644 --- a/src/clients/docker/models/EndpointSettings.ts +++ b/src/clients/docker/models/EndpointSettings.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EndpointIPAMConfig } from './EndpointIPAMConfig'; +import { mapValues } from "../runtime"; +import type { EndpointIPAMConfig } from "./EndpointIPAMConfig"; import { - EndpointIPAMConfigFromJSON, - EndpointIPAMConfigFromJSONTyped, - EndpointIPAMConfigToJSON, - EndpointIPAMConfigToJSONTyped, -} from './EndpointIPAMConfig'; + EndpointIPAMConfigFromJSON, + EndpointIPAMConfigFromJSONTyped, + EndpointIPAMConfigToJSON, + EndpointIPAMConfigToJSONTyped, +} from "./EndpointIPAMConfig"; /** * Configuration for a network endpoint. @@ -27,154 +27,159 @@ import { * @interface EndpointSettings */ export interface EndpointSettings { - /** - * - * @type {EndpointIPAMConfig} - * @memberof EndpointSettings - */ - IPAMConfig?: EndpointIPAMConfig | null; - /** - * - * @type {Array} - * @memberof EndpointSettings - */ - Links?: Array; - /** - * - * @type {Array} - * @memberof EndpointSettings - */ - Aliases?: Array; - /** - * Unique ID of the network. - * - * @type {string} - * @memberof EndpointSettings - */ - NetworkID?: string; - /** - * Unique ID for the service endpoint in a Sandbox. - * - * @type {string} - * @memberof EndpointSettings - */ - EndpointID?: string; - /** - * Gateway address for this network. - * - * @type {string} - * @memberof EndpointSettings - */ - Gateway?: string; - /** - * IPv4 address. - * - * @type {string} - * @memberof EndpointSettings - */ - IPAddress?: string; - /** - * Mask length of the IPv4 address. - * - * @type {number} - * @memberof EndpointSettings - */ - IPPrefixLen?: number; - /** - * IPv6 gateway address. - * - * @type {string} - * @memberof EndpointSettings - */ - IPv6Gateway?: string; - /** - * Global IPv6 address. - * - * @type {string} - * @memberof EndpointSettings - */ - GlobalIPv6Address?: string; - /** - * Mask length of the global IPv6 address. - * - * @type {number} - * @memberof EndpointSettings - */ - GlobalIPv6PrefixLen?: number; - /** - * MAC address for the endpoint on this network. - * - * @type {string} - * @memberof EndpointSettings - */ - MacAddress?: string; - /** - * DriverOpts is a mapping of driver options and values. These options - * are passed directly to the driver and are driver specific. - * - * @type {{ [key: string]: string; }} - * @memberof EndpointSettings - */ - DriverOpts?: { [key: string]: string; } | null; + /** + * + * @type {EndpointIPAMConfig} + * @memberof EndpointSettings + */ + IPAMConfig?: EndpointIPAMConfig | null; + /** + * + * @type {Array} + * @memberof EndpointSettings + */ + Links?: Array; + /** + * + * @type {Array} + * @memberof EndpointSettings + */ + Aliases?: Array; + /** + * Unique ID of the network. + * + * @type {string} + * @memberof EndpointSettings + */ + NetworkID?: string; + /** + * Unique ID for the service endpoint in a Sandbox. + * + * @type {string} + * @memberof EndpointSettings + */ + EndpointID?: string; + /** + * Gateway address for this network. + * + * @type {string} + * @memberof EndpointSettings + */ + Gateway?: string; + /** + * IPv4 address. + * + * @type {string} + * @memberof EndpointSettings + */ + IPAddress?: string; + /** + * Mask length of the IPv4 address. + * + * @type {number} + * @memberof EndpointSettings + */ + IPPrefixLen?: number; + /** + * IPv6 gateway address. + * + * @type {string} + * @memberof EndpointSettings + */ + IPv6Gateway?: string; + /** + * Global IPv6 address. + * + * @type {string} + * @memberof EndpointSettings + */ + GlobalIPv6Address?: string; + /** + * Mask length of the global IPv6 address. + * + * @type {number} + * @memberof EndpointSettings + */ + GlobalIPv6PrefixLen?: number; + /** + * MAC address for the endpoint on this network. + * + * @type {string} + * @memberof EndpointSettings + */ + MacAddress?: string; + /** + * DriverOpts is a mapping of driver options and values. These options + * are passed directly to the driver and are driver specific. + * + * @type {{ [key: string]: string; }} + * @memberof EndpointSettings + */ + DriverOpts?: { [key: string]: string } | null; } /** * Check if a given object implements the EndpointSettings interface. */ export function instanceOfEndpointSettings(value: object): value is EndpointSettings { - return true; + return true; } export function EndpointSettingsFromJSON(json: any): EndpointSettings { - return EndpointSettingsFromJSONTyped(json, false); + return EndpointSettingsFromJSONTyped(json, false); } -export function EndpointSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointSettings { - if (json == null) { - return json; - } - return { - - 'IPAMConfig': json['IPAMConfig'] == null ? undefined : EndpointIPAMConfigFromJSON(json['IPAMConfig']), - 'Links': json['Links'] == null ? undefined : json['Links'], - 'Aliases': json['Aliases'] == null ? undefined : json['Aliases'], - 'NetworkID': json['NetworkID'] == null ? undefined : json['NetworkID'], - 'EndpointID': json['EndpointID'] == null ? undefined : json['EndpointID'], - 'Gateway': json['Gateway'] == null ? undefined : json['Gateway'], - 'IPAddress': json['IPAddress'] == null ? undefined : json['IPAddress'], - 'IPPrefixLen': json['IPPrefixLen'] == null ? undefined : json['IPPrefixLen'], - 'IPv6Gateway': json['IPv6Gateway'] == null ? undefined : json['IPv6Gateway'], - 'GlobalIPv6Address': json['GlobalIPv6Address'] == null ? undefined : json['GlobalIPv6Address'], - 'GlobalIPv6PrefixLen': json['GlobalIPv6PrefixLen'] == null ? undefined : json['GlobalIPv6PrefixLen'], - 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], - 'DriverOpts': json['DriverOpts'] == null ? undefined : json['DriverOpts'], - }; +export function EndpointSettingsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EndpointSettings { + if (json == null) { + return json; + } + return { + IPAMConfig: + json["IPAMConfig"] == null ? undefined : EndpointIPAMConfigFromJSON(json["IPAMConfig"]), + Links: json["Links"] == null ? undefined : json["Links"], + Aliases: json["Aliases"] == null ? undefined : json["Aliases"], + NetworkID: json["NetworkID"] == null ? undefined : json["NetworkID"], + EndpointID: json["EndpointID"] == null ? undefined : json["EndpointID"], + Gateway: json["Gateway"] == null ? undefined : json["Gateway"], + IPAddress: json["IPAddress"] == null ? undefined : json["IPAddress"], + IPPrefixLen: json["IPPrefixLen"] == null ? undefined : json["IPPrefixLen"], + IPv6Gateway: json["IPv6Gateway"] == null ? undefined : json["IPv6Gateway"], + GlobalIPv6Address: json["GlobalIPv6Address"] == null ? undefined : json["GlobalIPv6Address"], + GlobalIPv6PrefixLen: + json["GlobalIPv6PrefixLen"] == null ? undefined : json["GlobalIPv6PrefixLen"], + MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], + DriverOpts: json["DriverOpts"] == null ? undefined : json["DriverOpts"], + }; } export function EndpointSettingsToJSON(json: any): EndpointSettings { - return EndpointSettingsToJSONTyped(json, false); + return EndpointSettingsToJSONTyped(json, false); } -export function EndpointSettingsToJSONTyped(value?: EndpointSettings | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EndpointSettingsToJSONTyped( + value?: EndpointSettings | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'IPAMConfig': EndpointIPAMConfigToJSON(value['IPAMConfig']), - 'Links': value['Links'], - 'Aliases': value['Aliases'], - 'NetworkID': value['NetworkID'], - 'EndpointID': value['EndpointID'], - 'Gateway': value['Gateway'], - 'IPAddress': value['IPAddress'], - 'IPPrefixLen': value['IPPrefixLen'], - 'IPv6Gateway': value['IPv6Gateway'], - 'GlobalIPv6Address': value['GlobalIPv6Address'], - 'GlobalIPv6PrefixLen': value['GlobalIPv6PrefixLen'], - 'MacAddress': value['MacAddress'], - 'DriverOpts': value['DriverOpts'], - }; + return { + IPAMConfig: EndpointIPAMConfigToJSON(value["IPAMConfig"]), + Links: value["Links"], + Aliases: value["Aliases"], + NetworkID: value["NetworkID"], + EndpointID: value["EndpointID"], + Gateway: value["Gateway"], + IPAddress: value["IPAddress"], + IPPrefixLen: value["IPPrefixLen"], + IPv6Gateway: value["IPv6Gateway"], + GlobalIPv6Address: value["GlobalIPv6Address"], + GlobalIPv6PrefixLen: value["GlobalIPv6PrefixLen"], + MacAddress: value["MacAddress"], + DriverOpts: value["DriverOpts"], + }; } - diff --git a/src/clients/docker/models/EndpointSpec.ts b/src/clients/docker/models/EndpointSpec.ts index c1152edd43..662a80b5dc 100644 --- a/src/clients/docker/models/EndpointSpec.ts +++ b/src/clients/docker/models/EndpointSpec.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EndpointPortConfig } from './EndpointPortConfig'; +import { mapValues } from "../runtime"; +import type { EndpointPortConfig } from "./EndpointPortConfig"; import { - EndpointPortConfigFromJSON, - EndpointPortConfigFromJSONTyped, - EndpointPortConfigToJSON, - EndpointPortConfigToJSONTyped, -} from './EndpointPortConfig'; + EndpointPortConfigFromJSON, + EndpointPortConfigFromJSONTyped, + EndpointPortConfigToJSON, + EndpointPortConfigToJSONTyped, +} from "./EndpointPortConfig"; /** * Properties that can be configured to access and load balance a service. @@ -27,68 +27,73 @@ import { * @interface EndpointSpec */ export interface EndpointSpec { - /** - * The mode of resolution to use for internal load balancing between tasks. - * - * @type {string} - * @memberof EndpointSpec - */ - Mode?: EndpointSpecModeEnum; - /** - * List of exposed ports that this service is accessible on from the - * outside. Ports can only be provided if `vip` resolution mode is used. - * - * @type {Array} - * @memberof EndpointSpec - */ - Ports?: Array; + /** + * The mode of resolution to use for internal load balancing between tasks. + * + * @type {string} + * @memberof EndpointSpec + */ + Mode?: EndpointSpecModeEnum; + /** + * List of exposed ports that this service is accessible on from the + * outside. Ports can only be provided if `vip` resolution mode is used. + * + * @type {Array} + * @memberof EndpointSpec + */ + Ports?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum EndpointSpecModeEnum { - Vip = 'vip', - Dnsrr = 'dnsrr' + Vip = "vip", + Dnsrr = "dnsrr", } - /** * Check if a given object implements the EndpointSpec interface. */ export function instanceOfEndpointSpec(value: object): value is EndpointSpec { - return true; + return true; } export function EndpointSpecFromJSON(json: any): EndpointSpec { - return EndpointSpecFromJSONTyped(json, false); + return EndpointSpecFromJSONTyped(json, false); } export function EndpointSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointSpec { - if (json == null) { - return json; - } - return { - - 'Mode': json['Mode'] == null ? undefined : json['Mode'], - 'Ports': json['Ports'] == null ? undefined : ((json['Ports'] as Array).map(EndpointPortConfigFromJSON)), - }; + if (json == null) { + return json; + } + return { + Mode: json["Mode"] == null ? undefined : json["Mode"], + Ports: + json["Ports"] == null + ? undefined + : (json["Ports"] as Array).map(EndpointPortConfigFromJSON), + }; } export function EndpointSpecToJSON(json: any): EndpointSpec { - return EndpointSpecToJSONTyped(json, false); + return EndpointSpecToJSONTyped(json, false); } -export function EndpointSpecToJSONTyped(value?: EndpointSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EndpointSpecToJSONTyped( + value?: EndpointSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Mode': value['Mode'], - 'Ports': value['Ports'] == null ? undefined : ((value['Ports'] as Array).map(EndpointPortConfigToJSON)), - }; + return { + Mode: value["Mode"], + Ports: + value["Ports"] == null + ? undefined + : (value["Ports"] as Array).map(EndpointPortConfigToJSON), + }; } - diff --git a/src/clients/docker/models/EngineDescription.ts b/src/clients/docker/models/EngineDescription.ts index 42297d167c..98ea29b497 100644 --- a/src/clients/docker/models/EngineDescription.ts +++ b/src/clients/docker/models/EngineDescription.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EngineDescriptionPluginsInner } from './EngineDescriptionPluginsInner'; +import { mapValues } from "../runtime"; +import type { EngineDescriptionPluginsInner } from "./EngineDescriptionPluginsInner"; import { - EngineDescriptionPluginsInnerFromJSON, - EngineDescriptionPluginsInnerFromJSONTyped, - EngineDescriptionPluginsInnerToJSON, - EngineDescriptionPluginsInnerToJSONTyped, -} from './EngineDescriptionPluginsInner'; + EngineDescriptionPluginsInnerFromJSON, + EngineDescriptionPluginsInnerFromJSONTyped, + EngineDescriptionPluginsInnerToJSON, + EngineDescriptionPluginsInnerToJSONTyped, +} from "./EngineDescriptionPluginsInner"; /** * EngineDescription provides information about an engine. @@ -27,63 +27,72 @@ import { * @interface EngineDescription */ export interface EngineDescription { - /** - * - * @type {string} - * @memberof EngineDescription - */ - EngineVersion?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof EngineDescription - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {Array} - * @memberof EngineDescription - */ - Plugins?: Array; + /** + * + * @type {string} + * @memberof EngineDescription + */ + EngineVersion?: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof EngineDescription + */ + Labels?: { [key: string]: string }; + /** + * + * @type {Array} + * @memberof EngineDescription + */ + Plugins?: Array; } /** * Check if a given object implements the EngineDescription interface. */ export function instanceOfEngineDescription(value: object): value is EngineDescription { - return true; + return true; } export function EngineDescriptionFromJSON(json: any): EngineDescription { - return EngineDescriptionFromJSONTyped(json, false); + return EngineDescriptionFromJSONTyped(json, false); } -export function EngineDescriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): EngineDescription { - if (json == null) { - return json; - } - return { - - 'EngineVersion': json['EngineVersion'] == null ? undefined : json['EngineVersion'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Plugins': json['Plugins'] == null ? undefined : ((json['Plugins'] as Array).map(EngineDescriptionPluginsInnerFromJSON)), - }; +export function EngineDescriptionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EngineDescription { + if (json == null) { + return json; + } + return { + EngineVersion: json["EngineVersion"] == null ? undefined : json["EngineVersion"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Plugins: + json["Plugins"] == null + ? undefined + : (json["Plugins"] as Array).map(EngineDescriptionPluginsInnerFromJSON), + }; } export function EngineDescriptionToJSON(json: any): EngineDescription { - return EngineDescriptionToJSONTyped(json, false); + return EngineDescriptionToJSONTyped(json, false); } -export function EngineDescriptionToJSONTyped(value?: EngineDescription | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EngineDescriptionToJSONTyped( + value?: EngineDescription | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'EngineVersion': value['EngineVersion'], - 'Labels': value['Labels'], - 'Plugins': value['Plugins'] == null ? undefined : ((value['Plugins'] as Array).map(EngineDescriptionPluginsInnerToJSON)), - }; + return { + EngineVersion: value["EngineVersion"], + Labels: value["Labels"], + Plugins: + value["Plugins"] == null + ? undefined + : (value["Plugins"] as Array).map(EngineDescriptionPluginsInnerToJSON), + }; } - diff --git a/src/clients/docker/models/EngineDescriptionPluginsInner.ts b/src/clients/docker/models/EngineDescriptionPluginsInner.ts index 95e0866cd2..dc6d1c2d1c 100644 --- a/src/clients/docker/models/EngineDescriptionPluginsInner.ts +++ b/src/clients/docker/models/EngineDescriptionPluginsInner.ts @@ -2,72 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface EngineDescriptionPluginsInner */ export interface EngineDescriptionPluginsInner { - /** - * - * @type {string} - * @memberof EngineDescriptionPluginsInner - */ - Type?: string; - /** - * - * @type {string} - * @memberof EngineDescriptionPluginsInner - */ - Name?: string; + /** + * + * @type {string} + * @memberof EngineDescriptionPluginsInner + */ + Type?: string; + /** + * + * @type {string} + * @memberof EngineDescriptionPluginsInner + */ + Name?: string; } /** * Check if a given object implements the EngineDescriptionPluginsInner interface. */ -export function instanceOfEngineDescriptionPluginsInner(value: object): value is EngineDescriptionPluginsInner { - return true; +export function instanceOfEngineDescriptionPluginsInner( + value: object, +): value is EngineDescriptionPluginsInner { + return true; } export function EngineDescriptionPluginsInnerFromJSON(json: any): EngineDescriptionPluginsInner { - return EngineDescriptionPluginsInnerFromJSONTyped(json, false); + return EngineDescriptionPluginsInnerFromJSONTyped(json, false); } -export function EngineDescriptionPluginsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): EngineDescriptionPluginsInner { - if (json == null) { - return json; - } - return { - - 'Type': json['Type'] == null ? undefined : json['Type'], - 'Name': json['Name'] == null ? undefined : json['Name'], - }; +export function EngineDescriptionPluginsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EngineDescriptionPluginsInner { + if (json == null) { + return json; + } + return { + Type: json["Type"] == null ? undefined : json["Type"], + Name: json["Name"] == null ? undefined : json["Name"], + }; } export function EngineDescriptionPluginsInnerToJSON(json: any): EngineDescriptionPluginsInner { - return EngineDescriptionPluginsInnerToJSONTyped(json, false); + return EngineDescriptionPluginsInnerToJSONTyped(json, false); } -export function EngineDescriptionPluginsInnerToJSONTyped(value?: EngineDescriptionPluginsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EngineDescriptionPluginsInnerToJSONTyped( + value?: EngineDescriptionPluginsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Type': value['Type'], - 'Name': value['Name'], - }; + return { + Type: value["Type"], + Name: value["Name"], + }; } - diff --git a/src/clients/docker/models/ErrorDetail.ts b/src/clients/docker/models/ErrorDetail.ts index 6845c9475f..f6a16ea447 100644 --- a/src/clients/docker/models/ErrorDetail.ts +++ b/src/clients/docker/models/ErrorDetail.ts @@ -2,72 +2,72 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ErrorDetail */ export interface ErrorDetail { - /** - * - * @type {number} - * @memberof ErrorDetail - */ - code?: number; - /** - * - * @type {string} - * @memberof ErrorDetail - */ - message?: string; + /** + * + * @type {number} + * @memberof ErrorDetail + */ + code?: number; + /** + * + * @type {string} + * @memberof ErrorDetail + */ + message?: string; } /** * Check if a given object implements the ErrorDetail interface. */ export function instanceOfErrorDetail(value: object): value is ErrorDetail { - return true; + return true; } export function ErrorDetailFromJSON(json: any): ErrorDetail { - return ErrorDetailFromJSONTyped(json, false); + return ErrorDetailFromJSONTyped(json, false); } export function ErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorDetail { - if (json == null) { - return json; - } - return { - - 'code': json['code'] == null ? undefined : json['code'], - 'message': json['message'] == null ? undefined : json['message'], - }; + if (json == null) { + return json; + } + return { + code: json["code"] == null ? undefined : json["code"], + message: json["message"] == null ? undefined : json["message"], + }; } export function ErrorDetailToJSON(json: any): ErrorDetail { - return ErrorDetailToJSONTyped(json, false); + return ErrorDetailToJSONTyped(json, false); } -export function ErrorDetailToJSONTyped(value?: ErrorDetail | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorDetailToJSONTyped( + value?: ErrorDetail | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'code': value['code'], - 'message': value['message'], - }; + return { + code: value["code"], + message: value["message"], + }; } - diff --git a/src/clients/docker/models/ErrorResponse.ts b/src/clients/docker/models/ErrorResponse.ts index 8dbdf38b9f..893dbae9e1 100644 --- a/src/clients/docker/models/ErrorResponse.ts +++ b/src/clients/docker/models/ErrorResponse.ts @@ -2,65 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Represents an error. * @export * @interface ErrorResponse */ export interface ErrorResponse { - /** - * The error message. - * @type {string} - * @memberof ErrorResponse - */ - message: string; + /** + * The error message. + * @type {string} + * @memberof ErrorResponse + */ + message: string; } /** * Check if a given object implements the ErrorResponse interface. */ export function instanceOfErrorResponse(value: object): value is ErrorResponse { - if (!('message' in value) || value['message'] === undefined) return false; - return true; + if (!("message" in value) || value["message"] === undefined) return false; + return true; } export function ErrorResponseFromJSON(json: any): ErrorResponse { - return ErrorResponseFromJSONTyped(json, false); + return ErrorResponseFromJSONTyped(json, false); } export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse { - if (json == null) { - return json; - } - return { - - 'message': json['message'], - }; + if (json == null) { + return json; + } + return { + message: json["message"], + }; } export function ErrorResponseToJSON(json: any): ErrorResponse { - return ErrorResponseToJSONTyped(json, false); + return ErrorResponseToJSONTyped(json, false); } -export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorResponseToJSONTyped( + value?: ErrorResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'message': value['message'], - }; + return { + message: value["message"], + }; } - diff --git a/src/clients/docker/models/EventActor.ts b/src/clients/docker/models/EventActor.ts index 22c93013fc..7ece2fb073 100644 --- a/src/clients/docker/models/EventActor.ts +++ b/src/clients/docker/models/EventActor.ts @@ -2,75 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Actor describes something that generates events, like a container, network, * or a volume. - * + * * @export * @interface EventActor */ export interface EventActor { - /** - * The ID of the object emitting the event - * @type {string} - * @memberof EventActor - */ - ID?: string; - /** - * Various key/value attributes of the object, depending on its type. - * - * @type {{ [key: string]: string; }} - * @memberof EventActor - */ - Attributes?: { [key: string]: string; }; + /** + * The ID of the object emitting the event + * @type {string} + * @memberof EventActor + */ + ID?: string; + /** + * Various key/value attributes of the object, depending on its type. + * + * @type {{ [key: string]: string; }} + * @memberof EventActor + */ + Attributes?: { [key: string]: string }; } /** * Check if a given object implements the EventActor interface. */ export function instanceOfEventActor(value: object): value is EventActor { - return true; + return true; } export function EventActorFromJSON(json: any): EventActor { - return EventActorFromJSONTyped(json, false); + return EventActorFromJSONTyped(json, false); } export function EventActorFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventActor { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Attributes': json['Attributes'] == null ? undefined : json['Attributes'], - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Attributes: json["Attributes"] == null ? undefined : json["Attributes"], + }; } export function EventActorToJSON(json: any): EventActor { - return EventActorToJSONTyped(json, false); + return EventActorToJSONTyped(json, false); } -export function EventActorToJSONTyped(value?: EventActor | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventActorToJSONTyped( + value?: EventActor | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Attributes': value['Attributes'], - }; + return { + ID: value["ID"], + Attributes: value["Attributes"], + }; } - diff --git a/src/clients/docker/models/EventMessage.ts b/src/clients/docker/models/EventMessage.ts index 1567a5d99e..6ec199b5dc 100644 --- a/src/clients/docker/models/EventMessage.ts +++ b/src/clients/docker/models/EventMessage.ts @@ -2,142 +2,141 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EventActor } from './EventActor'; +import { mapValues } from "../runtime"; +import type { EventActor } from "./EventActor"; import { - EventActorFromJSON, - EventActorFromJSONTyped, - EventActorToJSON, - EventActorToJSONTyped, -} from './EventActor'; + EventActorFromJSON, + EventActorFromJSONTyped, + EventActorToJSON, + EventActorToJSONTyped, +} from "./EventActor"; /** * EventMessage represents the information an event contains. - * + * * @export * @interface EventMessage */ export interface EventMessage { - /** - * The type of object emitting the event - * @type {string} - * @memberof EventMessage - */ - Type?: EventMessageTypeEnum; - /** - * The type of event - * @type {string} - * @memberof EventMessage - */ - Action?: string; - /** - * - * @type {EventActor} - * @memberof EventMessage - */ - Actor?: EventActor; - /** - * Scope of the event. Engine events are `local` scope. Cluster (Swarm) - * events are `swarm` scope. - * - * @type {string} - * @memberof EventMessage - */ - scope?: EventMessageScopeEnum; - /** - * Timestamp of event - * @type {number} - * @memberof EventMessage - */ - time?: number; - /** - * Timestamp of event, with nanosecond accuracy - * @type {number} - * @memberof EventMessage - */ - timeNano?: number; + /** + * The type of object emitting the event + * @type {string} + * @memberof EventMessage + */ + Type?: EventMessageTypeEnum; + /** + * The type of event + * @type {string} + * @memberof EventMessage + */ + Action?: string; + /** + * + * @type {EventActor} + * @memberof EventMessage + */ + Actor?: EventActor; + /** + * Scope of the event. Engine events are `local` scope. Cluster (Swarm) + * events are `swarm` scope. + * + * @type {string} + * @memberof EventMessage + */ + scope?: EventMessageScopeEnum; + /** + * Timestamp of event + * @type {number} + * @memberof EventMessage + */ + time?: number; + /** + * Timestamp of event, with nanosecond accuracy + * @type {number} + * @memberof EventMessage + */ + timeNano?: number; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum EventMessageTypeEnum { - Builder = 'builder', - Config = 'config', - Container = 'container', - Daemon = 'daemon', - Image = 'image', - Network = 'network', - Node = 'node', - Plugin = 'plugin', - Secret = 'secret', - Service = 'service', - Volume = 'volume' + Builder = "builder", + Config = "config", + Container = "container", + Daemon = "daemon", + Image = "image", + Network = "network", + Node = "node", + Plugin = "plugin", + Secret = "secret", + Service = "service", + Volume = "volume", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum EventMessageScopeEnum { - Local = 'local', - Swarm = 'swarm' + Local = "local", + Swarm = "swarm", } - /** * Check if a given object implements the EventMessage interface. */ export function instanceOfEventMessage(value: object): value is EventMessage { - return true; + return true; } export function EventMessageFromJSON(json: any): EventMessage { - return EventMessageFromJSONTyped(json, false); + return EventMessageFromJSONTyped(json, false); } export function EventMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMessage { - if (json == null) { - return json; - } - return { - - 'Type': json['Type'] == null ? undefined : json['Type'], - 'Action': json['Action'] == null ? undefined : json['Action'], - 'Actor': json['Actor'] == null ? undefined : EventActorFromJSON(json['Actor']), - 'scope': json['scope'] == null ? undefined : json['scope'], - 'time': json['time'] == null ? undefined : json['time'], - 'timeNano': json['timeNano'] == null ? undefined : json['timeNano'], - }; + if (json == null) { + return json; + } + return { + Type: json["Type"] == null ? undefined : json["Type"], + Action: json["Action"] == null ? undefined : json["Action"], + Actor: json["Actor"] == null ? undefined : EventActorFromJSON(json["Actor"]), + scope: json["scope"] == null ? undefined : json["scope"], + time: json["time"] == null ? undefined : json["time"], + timeNano: json["timeNano"] == null ? undefined : json["timeNano"], + }; } export function EventMessageToJSON(json: any): EventMessage { - return EventMessageToJSONTyped(json, false); + return EventMessageToJSONTyped(json, false); } -export function EventMessageToJSONTyped(value?: EventMessage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventMessageToJSONTyped( + value?: EventMessage | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Type': value['Type'], - 'Action': value['Action'], - 'Actor': EventActorToJSON(value['Actor']), - 'scope': value['scope'], - 'time': value['time'], - 'timeNano': value['timeNano'], - }; + return { + Type: value["Type"], + Action: value["Action"], + Actor: EventActorToJSON(value["Actor"]), + scope: value["scope"], + time: value["time"], + timeNano: value["timeNano"], + }; } - diff --git a/src/clients/docker/models/ExecConfig.ts b/src/clients/docker/models/ExecConfig.ts index e273316166..bdcd1df03d 100644 --- a/src/clients/docker/models/ExecConfig.ts +++ b/src/clients/docker/models/ExecConfig.ts @@ -2,152 +2,152 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ExecConfig */ export interface ExecConfig { - /** - * Attach to `stdin` of the exec command. - * @type {boolean} - * @memberof ExecConfig - */ - AttachStdin?: boolean; - /** - * Attach to `stdout` of the exec command. - * @type {boolean} - * @memberof ExecConfig - */ - AttachStdout?: boolean; - /** - * Attach to `stderr` of the exec command. - * @type {boolean} - * @memberof ExecConfig - */ - AttachStderr?: boolean; - /** - * Initial console size, as an `[height, width]` array. - * @type {Array} - * @memberof ExecConfig - */ - ConsoleSize?: Array | null; - /** - * Override the key sequence for detaching a container. Format is - * a single character `[a-Z]` or `ctrl-` where `` - * is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - * - * @type {string} - * @memberof ExecConfig - */ - DetachKeys?: string; - /** - * Allocate a pseudo-TTY. - * @type {boolean} - * @memberof ExecConfig - */ - Tty?: boolean; - /** - * A list of environment variables in the form `["VAR=value", ...]`. - * - * @type {Array} - * @memberof ExecConfig - */ - Env?: Array; - /** - * Command to run, as a string or array of strings. - * @type {Array} - * @memberof ExecConfig - */ - Cmd?: Array; - /** - * Runs the exec process with extended privileges. - * @type {boolean} - * @memberof ExecConfig - */ - Privileged?: boolean; - /** - * The user, and optionally, group to run the exec process inside - * the container. Format is one of: `user`, `user:group`, `uid`, - * or `uid:gid`. - * - * @type {string} - * @memberof ExecConfig - */ - User?: string; - /** - * The working directory for the exec process inside the container. - * - * @type {string} - * @memberof ExecConfig - */ - WorkingDir?: string; + /** + * Attach to `stdin` of the exec command. + * @type {boolean} + * @memberof ExecConfig + */ + AttachStdin?: boolean; + /** + * Attach to `stdout` of the exec command. + * @type {boolean} + * @memberof ExecConfig + */ + AttachStdout?: boolean; + /** + * Attach to `stderr` of the exec command. + * @type {boolean} + * @memberof ExecConfig + */ + AttachStderr?: boolean; + /** + * Initial console size, as an `[height, width]` array. + * @type {Array} + * @memberof ExecConfig + */ + ConsoleSize?: Array | null; + /** + * Override the key sequence for detaching a container. Format is + * a single character `[a-Z]` or `ctrl-` where `` + * is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * + * @type {string} + * @memberof ExecConfig + */ + DetachKeys?: string; + /** + * Allocate a pseudo-TTY. + * @type {boolean} + * @memberof ExecConfig + */ + Tty?: boolean; + /** + * A list of environment variables in the form `["VAR=value", ...]`. + * + * @type {Array} + * @memberof ExecConfig + */ + Env?: Array; + /** + * Command to run, as a string or array of strings. + * @type {Array} + * @memberof ExecConfig + */ + Cmd?: Array; + /** + * Runs the exec process with extended privileges. + * @type {boolean} + * @memberof ExecConfig + */ + Privileged?: boolean; + /** + * The user, and optionally, group to run the exec process inside + * the container. Format is one of: `user`, `user:group`, `uid`, + * or `uid:gid`. + * + * @type {string} + * @memberof ExecConfig + */ + User?: string; + /** + * The working directory for the exec process inside the container. + * + * @type {string} + * @memberof ExecConfig + */ + WorkingDir?: string; } /** * Check if a given object implements the ExecConfig interface. */ export function instanceOfExecConfig(value: object): value is ExecConfig { - return true; + return true; } export function ExecConfigFromJSON(json: any): ExecConfig { - return ExecConfigFromJSONTyped(json, false); + return ExecConfigFromJSONTyped(json, false); } export function ExecConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecConfig { - if (json == null) { - return json; - } - return { - - 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], - 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], - 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], - 'ConsoleSize': json['ConsoleSize'] == null ? undefined : json['ConsoleSize'], - 'DetachKeys': json['DetachKeys'] == null ? undefined : json['DetachKeys'], - 'Tty': json['Tty'] == null ? undefined : json['Tty'], - 'Env': json['Env'] == null ? undefined : json['Env'], - 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], - 'Privileged': json['Privileged'] == null ? undefined : json['Privileged'], - 'User': json['User'] == null ? undefined : json['User'], - 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], - }; + if (json == null) { + return json; + } + return { + AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], + AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], + AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], + ConsoleSize: json["ConsoleSize"] == null ? undefined : json["ConsoleSize"], + DetachKeys: json["DetachKeys"] == null ? undefined : json["DetachKeys"], + Tty: json["Tty"] == null ? undefined : json["Tty"], + Env: json["Env"] == null ? undefined : json["Env"], + Cmd: json["Cmd"] == null ? undefined : json["Cmd"], + Privileged: json["Privileged"] == null ? undefined : json["Privileged"], + User: json["User"] == null ? undefined : json["User"], + WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], + }; } export function ExecConfigToJSON(json: any): ExecConfig { - return ExecConfigToJSONTyped(json, false); + return ExecConfigToJSONTyped(json, false); } -export function ExecConfigToJSONTyped(value?: ExecConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExecConfigToJSONTyped( + value?: ExecConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'AttachStdin': value['AttachStdin'], - 'AttachStdout': value['AttachStdout'], - 'AttachStderr': value['AttachStderr'], - 'ConsoleSize': value['ConsoleSize'], - 'DetachKeys': value['DetachKeys'], - 'Tty': value['Tty'], - 'Env': value['Env'], - 'Cmd': value['Cmd'], - 'Privileged': value['Privileged'], - 'User': value['User'], - 'WorkingDir': value['WorkingDir'], - }; + return { + AttachStdin: value["AttachStdin"], + AttachStdout: value["AttachStdout"], + AttachStderr: value["AttachStderr"], + ConsoleSize: value["ConsoleSize"], + DetachKeys: value["DetachKeys"], + Tty: value["Tty"], + Env: value["Env"], + Cmd: value["Cmd"], + Privileged: value["Privileged"], + User: value["User"], + WorkingDir: value["WorkingDir"], + }; } - diff --git a/src/clients/docker/models/ExecInspectResponse.ts b/src/clients/docker/models/ExecInspectResponse.ts index e059da2aa1..c26609da66 100644 --- a/src/clients/docker/models/ExecInspectResponse.ts +++ b/src/clients/docker/models/ExecInspectResponse.ts @@ -2,152 +2,156 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ProcessConfig } from './ProcessConfig'; +import { mapValues } from "../runtime"; +import type { ProcessConfig } from "./ProcessConfig"; import { - ProcessConfigFromJSON, - ProcessConfigFromJSONTyped, - ProcessConfigToJSON, - ProcessConfigToJSONTyped, -} from './ProcessConfig'; + ProcessConfigFromJSON, + ProcessConfigFromJSONTyped, + ProcessConfigToJSON, + ProcessConfigToJSONTyped, +} from "./ProcessConfig"; /** - * + * * @export * @interface ExecInspectResponse */ export interface ExecInspectResponse { - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - CanRemove?: boolean; - /** - * - * @type {string} - * @memberof ExecInspectResponse - */ - DetachKeys?: string; - /** - * - * @type {string} - * @memberof ExecInspectResponse - */ - ID?: string; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - Running?: boolean; - /** - * - * @type {number} - * @memberof ExecInspectResponse - */ - ExitCode?: number; - /** - * - * @type {ProcessConfig} - * @memberof ExecInspectResponse - */ - ProcessConfig?: ProcessConfig; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - OpenStdin?: boolean; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - OpenStderr?: boolean; - /** - * - * @type {boolean} - * @memberof ExecInspectResponse - */ - OpenStdout?: boolean; - /** - * - * @type {string} - * @memberof ExecInspectResponse - */ - ContainerID?: string; - /** - * The system process ID for the exec process. - * @type {number} - * @memberof ExecInspectResponse - */ - Pid?: number; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + CanRemove?: boolean; + /** + * + * @type {string} + * @memberof ExecInspectResponse + */ + DetachKeys?: string; + /** + * + * @type {string} + * @memberof ExecInspectResponse + */ + ID?: string; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + Running?: boolean; + /** + * + * @type {number} + * @memberof ExecInspectResponse + */ + ExitCode?: number; + /** + * + * @type {ProcessConfig} + * @memberof ExecInspectResponse + */ + ProcessConfig?: ProcessConfig; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + OpenStdin?: boolean; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + OpenStderr?: boolean; + /** + * + * @type {boolean} + * @memberof ExecInspectResponse + */ + OpenStdout?: boolean; + /** + * + * @type {string} + * @memberof ExecInspectResponse + */ + ContainerID?: string; + /** + * The system process ID for the exec process. + * @type {number} + * @memberof ExecInspectResponse + */ + Pid?: number; } /** * Check if a given object implements the ExecInspectResponse interface. */ export function instanceOfExecInspectResponse(value: object): value is ExecInspectResponse { - return true; + return true; } export function ExecInspectResponseFromJSON(json: any): ExecInspectResponse { - return ExecInspectResponseFromJSONTyped(json, false); + return ExecInspectResponseFromJSONTyped(json, false); } -export function ExecInspectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecInspectResponse { - if (json == null) { - return json; - } - return { - - 'CanRemove': json['CanRemove'] == null ? undefined : json['CanRemove'], - 'DetachKeys': json['DetachKeys'] == null ? undefined : json['DetachKeys'], - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Running': json['Running'] == null ? undefined : json['Running'], - 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], - 'ProcessConfig': json['ProcessConfig'] == null ? undefined : ProcessConfigFromJSON(json['ProcessConfig']), - 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], - 'OpenStderr': json['OpenStderr'] == null ? undefined : json['OpenStderr'], - 'OpenStdout': json['OpenStdout'] == null ? undefined : json['OpenStdout'], - 'ContainerID': json['ContainerID'] == null ? undefined : json['ContainerID'], - 'Pid': json['Pid'] == null ? undefined : json['Pid'], - }; +export function ExecInspectResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExecInspectResponse { + if (json == null) { + return json; + } + return { + CanRemove: json["CanRemove"] == null ? undefined : json["CanRemove"], + DetachKeys: json["DetachKeys"] == null ? undefined : json["DetachKeys"], + ID: json["ID"] == null ? undefined : json["ID"], + Running: json["Running"] == null ? undefined : json["Running"], + ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], + ProcessConfig: + json["ProcessConfig"] == null ? undefined : ProcessConfigFromJSON(json["ProcessConfig"]), + OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], + OpenStderr: json["OpenStderr"] == null ? undefined : json["OpenStderr"], + OpenStdout: json["OpenStdout"] == null ? undefined : json["OpenStdout"], + ContainerID: json["ContainerID"] == null ? undefined : json["ContainerID"], + Pid: json["Pid"] == null ? undefined : json["Pid"], + }; } export function ExecInspectResponseToJSON(json: any): ExecInspectResponse { - return ExecInspectResponseToJSONTyped(json, false); + return ExecInspectResponseToJSONTyped(json, false); } -export function ExecInspectResponseToJSONTyped(value?: ExecInspectResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExecInspectResponseToJSONTyped( + value?: ExecInspectResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CanRemove': value['CanRemove'], - 'DetachKeys': value['DetachKeys'], - 'ID': value['ID'], - 'Running': value['Running'], - 'ExitCode': value['ExitCode'], - 'ProcessConfig': ProcessConfigToJSON(value['ProcessConfig']), - 'OpenStdin': value['OpenStdin'], - 'OpenStderr': value['OpenStderr'], - 'OpenStdout': value['OpenStdout'], - 'ContainerID': value['ContainerID'], - 'Pid': value['Pid'], - }; + return { + CanRemove: value["CanRemove"], + DetachKeys: value["DetachKeys"], + ID: value["ID"], + Running: value["Running"], + ExitCode: value["ExitCode"], + ProcessConfig: ProcessConfigToJSON(value["ProcessConfig"]), + OpenStdin: value["OpenStdin"], + OpenStderr: value["OpenStderr"], + OpenStdout: value["OpenStdout"], + ContainerID: value["ContainerID"], + Pid: value["Pid"], + }; } - diff --git a/src/clients/docker/models/ExecStartConfig.ts b/src/clients/docker/models/ExecStartConfig.ts index fea0b305ed..119bc71c01 100644 --- a/src/clients/docker/models/ExecStartConfig.ts +++ b/src/clients/docker/models/ExecStartConfig.ts @@ -2,80 +2,83 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ExecStartConfig */ export interface ExecStartConfig { - /** - * Detach from the command. - * @type {boolean} - * @memberof ExecStartConfig - */ - Detach?: boolean; - /** - * Allocate a pseudo-TTY. - * @type {boolean} - * @memberof ExecStartConfig - */ - Tty?: boolean; - /** - * Initial console size, as an `[height, width]` array. - * @type {Array} - * @memberof ExecStartConfig - */ - ConsoleSize?: Array | null; + /** + * Detach from the command. + * @type {boolean} + * @memberof ExecStartConfig + */ + Detach?: boolean; + /** + * Allocate a pseudo-TTY. + * @type {boolean} + * @memberof ExecStartConfig + */ + Tty?: boolean; + /** + * Initial console size, as an `[height, width]` array. + * @type {Array} + * @memberof ExecStartConfig + */ + ConsoleSize?: Array | null; } /** * Check if a given object implements the ExecStartConfig interface. */ export function instanceOfExecStartConfig(value: object): value is ExecStartConfig { - return true; + return true; } export function ExecStartConfigFromJSON(json: any): ExecStartConfig { - return ExecStartConfigFromJSONTyped(json, false); + return ExecStartConfigFromJSONTyped(json, false); } -export function ExecStartConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecStartConfig { - if (json == null) { - return json; - } - return { - - 'Detach': json['Detach'] == null ? undefined : json['Detach'], - 'Tty': json['Tty'] == null ? undefined : json['Tty'], - 'ConsoleSize': json['ConsoleSize'] == null ? undefined : json['ConsoleSize'], - }; +export function ExecStartConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExecStartConfig { + if (json == null) { + return json; + } + return { + Detach: json["Detach"] == null ? undefined : json["Detach"], + Tty: json["Tty"] == null ? undefined : json["Tty"], + ConsoleSize: json["ConsoleSize"] == null ? undefined : json["ConsoleSize"], + }; } export function ExecStartConfigToJSON(json: any): ExecStartConfig { - return ExecStartConfigToJSONTyped(json, false); + return ExecStartConfigToJSONTyped(json, false); } -export function ExecStartConfigToJSONTyped(value?: ExecStartConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExecStartConfigToJSONTyped( + value?: ExecStartConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Detach': value['Detach'], - 'Tty': value['Tty'], - 'ConsoleSize': value['ConsoleSize'], - }; + return { + Detach: value["Detach"], + Tty: value["Tty"], + ConsoleSize: value["ConsoleSize"], + }; } - diff --git a/src/clients/docker/models/FilesystemChange.ts b/src/clients/docker/models/FilesystemChange.ts index 6195434d56..a9077d7e36 100644 --- a/src/clients/docker/models/FilesystemChange.ts +++ b/src/clients/docker/models/FilesystemChange.ts @@ -2,86 +2,87 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ChangeType } from './ChangeType'; +import { mapValues } from "../runtime"; +import type { ChangeType } from "./ChangeType"; import { - ChangeTypeFromJSON, - ChangeTypeFromJSONTyped, - ChangeTypeToJSON, - ChangeTypeToJSONTyped, -} from './ChangeType'; + ChangeTypeFromJSON, + ChangeTypeFromJSONTyped, + ChangeTypeToJSON, + ChangeTypeToJSONTyped, +} from "./ChangeType"; /** * Change in the container's filesystem. - * + * * @export * @interface FilesystemChange */ export interface FilesystemChange { - /** - * Path to file or directory that has changed. - * - * @type {string} - * @memberof FilesystemChange - */ - Path: string; - /** - * - * @type {ChangeType} - * @memberof FilesystemChange - */ - Kind: ChangeType; + /** + * Path to file or directory that has changed. + * + * @type {string} + * @memberof FilesystemChange + */ + Path: string; + /** + * + * @type {ChangeType} + * @memberof FilesystemChange + */ + Kind: ChangeType; } - - /** * Check if a given object implements the FilesystemChange interface. */ export function instanceOfFilesystemChange(value: object): value is FilesystemChange { - if (!('Path' in value) || value['Path'] === undefined) return false; - if (!('Kind' in value) || value['Kind'] === undefined) return false; - return true; + if (!("Path" in value) || value["Path"] === undefined) return false; + if (!("Kind" in value) || value["Kind"] === undefined) return false; + return true; } export function FilesystemChangeFromJSON(json: any): FilesystemChange { - return FilesystemChangeFromJSONTyped(json, false); + return FilesystemChangeFromJSONTyped(json, false); } -export function FilesystemChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FilesystemChange { - if (json == null) { - return json; - } - return { - - 'Path': json['Path'], - 'Kind': ChangeTypeFromJSON(json['Kind']), - }; +export function FilesystemChangeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FilesystemChange { + if (json == null) { + return json; + } + return { + Path: json["Path"], + Kind: ChangeTypeFromJSON(json["Kind"]), + }; } export function FilesystemChangeToJSON(json: any): FilesystemChange { - return FilesystemChangeToJSONTyped(json, false); + return FilesystemChangeToJSONTyped(json, false); } -export function FilesystemChangeToJSONTyped(value?: FilesystemChange | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FilesystemChangeToJSONTyped( + value?: FilesystemChange | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Path': value['Path'], - 'Kind': ChangeTypeToJSON(value['Kind']), - }; + return { + Path: value["Path"], + Kind: ChangeTypeToJSON(value["Kind"]), + }; } - diff --git a/src/clients/docker/models/GenericResourcesInner.ts b/src/clients/docker/models/GenericResourcesInner.ts index 1ce3354a5a..391577924d 100644 --- a/src/clients/docker/models/GenericResourcesInner.ts +++ b/src/clients/docker/models/GenericResourcesInner.ts @@ -2,87 +2,98 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GenericResourcesInnerNamedResourceSpec } from './GenericResourcesInnerNamedResourceSpec'; +import { mapValues } from "../runtime"; +import type { GenericResourcesInnerNamedResourceSpec } from "./GenericResourcesInnerNamedResourceSpec"; import { - GenericResourcesInnerNamedResourceSpecFromJSON, - GenericResourcesInnerNamedResourceSpecFromJSONTyped, - GenericResourcesInnerNamedResourceSpecToJSON, - GenericResourcesInnerNamedResourceSpecToJSONTyped, -} from './GenericResourcesInnerNamedResourceSpec'; -import type { GenericResourcesInnerDiscreteResourceSpec } from './GenericResourcesInnerDiscreteResourceSpec'; + GenericResourcesInnerNamedResourceSpecFromJSON, + GenericResourcesInnerNamedResourceSpecFromJSONTyped, + GenericResourcesInnerNamedResourceSpecToJSON, + GenericResourcesInnerNamedResourceSpecToJSONTyped, +} from "./GenericResourcesInnerNamedResourceSpec"; +import type { GenericResourcesInnerDiscreteResourceSpec } from "./GenericResourcesInnerDiscreteResourceSpec"; import { - GenericResourcesInnerDiscreteResourceSpecFromJSON, - GenericResourcesInnerDiscreteResourceSpecFromJSONTyped, - GenericResourcesInnerDiscreteResourceSpecToJSON, - GenericResourcesInnerDiscreteResourceSpecToJSONTyped, -} from './GenericResourcesInnerDiscreteResourceSpec'; + GenericResourcesInnerDiscreteResourceSpecFromJSON, + GenericResourcesInnerDiscreteResourceSpecFromJSONTyped, + GenericResourcesInnerDiscreteResourceSpecToJSON, + GenericResourcesInnerDiscreteResourceSpecToJSONTyped, +} from "./GenericResourcesInnerDiscreteResourceSpec"; /** - * + * * @export * @interface GenericResourcesInner */ export interface GenericResourcesInner { - /** - * - * @type {GenericResourcesInnerNamedResourceSpec} - * @memberof GenericResourcesInner - */ - NamedResourceSpec?: GenericResourcesInnerNamedResourceSpec; - /** - * - * @type {GenericResourcesInnerDiscreteResourceSpec} - * @memberof GenericResourcesInner - */ - DiscreteResourceSpec?: GenericResourcesInnerDiscreteResourceSpec; + /** + * + * @type {GenericResourcesInnerNamedResourceSpec} + * @memberof GenericResourcesInner + */ + NamedResourceSpec?: GenericResourcesInnerNamedResourceSpec; + /** + * + * @type {GenericResourcesInnerDiscreteResourceSpec} + * @memberof GenericResourcesInner + */ + DiscreteResourceSpec?: GenericResourcesInnerDiscreteResourceSpec; } /** * Check if a given object implements the GenericResourcesInner interface. */ export function instanceOfGenericResourcesInner(value: object): value is GenericResourcesInner { - return true; + return true; } export function GenericResourcesInnerFromJSON(json: any): GenericResourcesInner { - return GenericResourcesInnerFromJSONTyped(json, false); + return GenericResourcesInnerFromJSONTyped(json, false); } -export function GenericResourcesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericResourcesInner { - if (json == null) { - return json; - } - return { - - 'NamedResourceSpec': json['NamedResourceSpec'] == null ? undefined : GenericResourcesInnerNamedResourceSpecFromJSON(json['NamedResourceSpec']), - 'DiscreteResourceSpec': json['DiscreteResourceSpec'] == null ? undefined : GenericResourcesInnerDiscreteResourceSpecFromJSON(json['DiscreteResourceSpec']), - }; +export function GenericResourcesInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GenericResourcesInner { + if (json == null) { + return json; + } + return { + NamedResourceSpec: + json["NamedResourceSpec"] == null + ? undefined + : GenericResourcesInnerNamedResourceSpecFromJSON(json["NamedResourceSpec"]), + DiscreteResourceSpec: + json["DiscreteResourceSpec"] == null + ? undefined + : GenericResourcesInnerDiscreteResourceSpecFromJSON(json["DiscreteResourceSpec"]), + }; } export function GenericResourcesInnerToJSON(json: any): GenericResourcesInner { - return GenericResourcesInnerToJSONTyped(json, false); + return GenericResourcesInnerToJSONTyped(json, false); } -export function GenericResourcesInnerToJSONTyped(value?: GenericResourcesInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GenericResourcesInnerToJSONTyped( + value?: GenericResourcesInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NamedResourceSpec': GenericResourcesInnerNamedResourceSpecToJSON(value['NamedResourceSpec']), - 'DiscreteResourceSpec': GenericResourcesInnerDiscreteResourceSpecToJSON(value['DiscreteResourceSpec']), - }; + return { + NamedResourceSpec: GenericResourcesInnerNamedResourceSpecToJSON(value["NamedResourceSpec"]), + DiscreteResourceSpec: GenericResourcesInnerDiscreteResourceSpecToJSON( + value["DiscreteResourceSpec"], + ), + }; } - diff --git a/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts b/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts index 5f42624d7d..0c57712ccb 100644 --- a/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts +++ b/src/clients/docker/models/GenericResourcesInnerDiscreteResourceSpec.ts @@ -2,72 +2,81 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface GenericResourcesInnerDiscreteResourceSpec */ export interface GenericResourcesInnerDiscreteResourceSpec { - /** - * - * @type {string} - * @memberof GenericResourcesInnerDiscreteResourceSpec - */ - Kind?: string; - /** - * - * @type {number} - * @memberof GenericResourcesInnerDiscreteResourceSpec - */ - Value?: number; + /** + * + * @type {string} + * @memberof GenericResourcesInnerDiscreteResourceSpec + */ + Kind?: string; + /** + * + * @type {number} + * @memberof GenericResourcesInnerDiscreteResourceSpec + */ + Value?: number; } /** * Check if a given object implements the GenericResourcesInnerDiscreteResourceSpec interface. */ -export function instanceOfGenericResourcesInnerDiscreteResourceSpec(value: object): value is GenericResourcesInnerDiscreteResourceSpec { - return true; +export function instanceOfGenericResourcesInnerDiscreteResourceSpec( + value: object, +): value is GenericResourcesInnerDiscreteResourceSpec { + return true; } -export function GenericResourcesInnerDiscreteResourceSpecFromJSON(json: any): GenericResourcesInnerDiscreteResourceSpec { - return GenericResourcesInnerDiscreteResourceSpecFromJSONTyped(json, false); +export function GenericResourcesInnerDiscreteResourceSpecFromJSON( + json: any, +): GenericResourcesInnerDiscreteResourceSpec { + return GenericResourcesInnerDiscreteResourceSpecFromJSONTyped(json, false); } -export function GenericResourcesInnerDiscreteResourceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericResourcesInnerDiscreteResourceSpec { - if (json == null) { - return json; - } - return { - - 'Kind': json['Kind'] == null ? undefined : json['Kind'], - 'Value': json['Value'] == null ? undefined : json['Value'], - }; +export function GenericResourcesInnerDiscreteResourceSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GenericResourcesInnerDiscreteResourceSpec { + if (json == null) { + return json; + } + return { + Kind: json["Kind"] == null ? undefined : json["Kind"], + Value: json["Value"] == null ? undefined : json["Value"], + }; } -export function GenericResourcesInnerDiscreteResourceSpecToJSON(json: any): GenericResourcesInnerDiscreteResourceSpec { - return GenericResourcesInnerDiscreteResourceSpecToJSONTyped(json, false); +export function GenericResourcesInnerDiscreteResourceSpecToJSON( + json: any, +): GenericResourcesInnerDiscreteResourceSpec { + return GenericResourcesInnerDiscreteResourceSpecToJSONTyped(json, false); } -export function GenericResourcesInnerDiscreteResourceSpecToJSONTyped(value?: GenericResourcesInnerDiscreteResourceSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GenericResourcesInnerDiscreteResourceSpecToJSONTyped( + value?: GenericResourcesInnerDiscreteResourceSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Kind': value['Kind'], - 'Value': value['Value'], - }; + return { + Kind: value["Kind"], + Value: value["Value"], + }; } - diff --git a/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts b/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts index 02abe21434..d1042e75ee 100644 --- a/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts +++ b/src/clients/docker/models/GenericResourcesInnerNamedResourceSpec.ts @@ -2,72 +2,81 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface GenericResourcesInnerNamedResourceSpec */ export interface GenericResourcesInnerNamedResourceSpec { - /** - * - * @type {string} - * @memberof GenericResourcesInnerNamedResourceSpec - */ - Kind?: string; - /** - * - * @type {string} - * @memberof GenericResourcesInnerNamedResourceSpec - */ - Value?: string; + /** + * + * @type {string} + * @memberof GenericResourcesInnerNamedResourceSpec + */ + Kind?: string; + /** + * + * @type {string} + * @memberof GenericResourcesInnerNamedResourceSpec + */ + Value?: string; } /** * Check if a given object implements the GenericResourcesInnerNamedResourceSpec interface. */ -export function instanceOfGenericResourcesInnerNamedResourceSpec(value: object): value is GenericResourcesInnerNamedResourceSpec { - return true; +export function instanceOfGenericResourcesInnerNamedResourceSpec( + value: object, +): value is GenericResourcesInnerNamedResourceSpec { + return true; } -export function GenericResourcesInnerNamedResourceSpecFromJSON(json: any): GenericResourcesInnerNamedResourceSpec { - return GenericResourcesInnerNamedResourceSpecFromJSONTyped(json, false); +export function GenericResourcesInnerNamedResourceSpecFromJSON( + json: any, +): GenericResourcesInnerNamedResourceSpec { + return GenericResourcesInnerNamedResourceSpecFromJSONTyped(json, false); } -export function GenericResourcesInnerNamedResourceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenericResourcesInnerNamedResourceSpec { - if (json == null) { - return json; - } - return { - - 'Kind': json['Kind'] == null ? undefined : json['Kind'], - 'Value': json['Value'] == null ? undefined : json['Value'], - }; +export function GenericResourcesInnerNamedResourceSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GenericResourcesInnerNamedResourceSpec { + if (json == null) { + return json; + } + return { + Kind: json["Kind"] == null ? undefined : json["Kind"], + Value: json["Value"] == null ? undefined : json["Value"], + }; } -export function GenericResourcesInnerNamedResourceSpecToJSON(json: any): GenericResourcesInnerNamedResourceSpec { - return GenericResourcesInnerNamedResourceSpecToJSONTyped(json, false); +export function GenericResourcesInnerNamedResourceSpecToJSON( + json: any, +): GenericResourcesInnerNamedResourceSpec { + return GenericResourcesInnerNamedResourceSpecToJSONTyped(json, false); } -export function GenericResourcesInnerNamedResourceSpecToJSONTyped(value?: GenericResourcesInnerNamedResourceSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GenericResourcesInnerNamedResourceSpecToJSONTyped( + value?: GenericResourcesInnerNamedResourceSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Kind': value['Kind'], - 'Value': value['Value'], - }; + return { + Kind: value["Kind"], + Value: value["Value"], + }; } - diff --git a/src/clients/docker/models/GraphDriverData.ts b/src/clients/docker/models/GraphDriverData.ts index cce1b1f166..2a6c7567f7 100644 --- a/src/clients/docker/models/GraphDriverData.ts +++ b/src/clients/docker/models/GraphDriverData.ts @@ -2,80 +2,83 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Information about the storage driver used to store the container's and * image's filesystem. - * + * * @export * @interface GraphDriverData */ export interface GraphDriverData { - /** - * Name of the storage driver. - * @type {string} - * @memberof GraphDriverData - */ - Name: string; - /** - * Low-level storage metadata, provided as key/value pairs. - * - * This information is driver-specific, and depends on the storage-driver - * in use, and should be used for informational purposes only. - * - * @type {{ [key: string]: string; }} - * @memberof GraphDriverData - */ - Data: { [key: string]: string; }; + /** + * Name of the storage driver. + * @type {string} + * @memberof GraphDriverData + */ + Name: string; + /** + * Low-level storage metadata, provided as key/value pairs. + * + * This information is driver-specific, and depends on the storage-driver + * in use, and should be used for informational purposes only. + * + * @type {{ [key: string]: string; }} + * @memberof GraphDriverData + */ + Data: { [key: string]: string }; } /** * Check if a given object implements the GraphDriverData interface. */ export function instanceOfGraphDriverData(value: object): value is GraphDriverData { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Data' in value) || value['Data'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Data" in value) || value["Data"] === undefined) return false; + return true; } export function GraphDriverDataFromJSON(json: any): GraphDriverData { - return GraphDriverDataFromJSONTyped(json, false); + return GraphDriverDataFromJSONTyped(json, false); } -export function GraphDriverDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GraphDriverData { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Data': json['Data'], - }; +export function GraphDriverDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GraphDriverData { + if (json == null) { + return json; + } + return { + Name: json["Name"], + Data: json["Data"], + }; } export function GraphDriverDataToJSON(json: any): GraphDriverData { - return GraphDriverDataToJSONTyped(json, false); + return GraphDriverDataToJSONTyped(json, false); } -export function GraphDriverDataToJSONTyped(value?: GraphDriverData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GraphDriverDataToJSONTyped( + value?: GraphDriverData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Data': value['Data'], - }; + return { + Name: value["Name"], + Data: value["Data"], + }; } - diff --git a/src/clients/docker/models/Health.ts b/src/clients/docker/models/Health.ts index e13a05ceda..dd30c58fdc 100644 --- a/src/clients/docker/models/Health.ts +++ b/src/clients/docker/models/Health.ts @@ -2,108 +2,109 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { HealthcheckResult } from './HealthcheckResult'; +import { mapValues } from "../runtime"; +import type { HealthcheckResult } from "./HealthcheckResult"; import { - HealthcheckResultFromJSON, - HealthcheckResultFromJSONTyped, - HealthcheckResultToJSON, - HealthcheckResultToJSONTyped, -} from './HealthcheckResult'; + HealthcheckResultFromJSON, + HealthcheckResultFromJSONTyped, + HealthcheckResultToJSON, + HealthcheckResultToJSONTyped, +} from "./HealthcheckResult"; /** * Health stores information about the container's healthcheck results. - * + * * @export * @interface Health */ export interface Health { - /** - * Status is one of `none`, `starting`, `healthy` or `unhealthy` - * - * - "none" Indicates there is no healthcheck - * - "starting" Starting indicates that the container is not yet ready - * - "healthy" Healthy indicates that the container is running correctly - * - "unhealthy" Unhealthy indicates that the container has a problem - * - * @type {string} - * @memberof Health - */ - Status?: HealthStatusEnum; - /** - * FailingStreak is the number of consecutive failures - * @type {number} - * @memberof Health - */ - FailingStreak?: number; - /** - * Log contains the last few results (oldest first) - * - * @type {Array} - * @memberof Health - */ - Log?: Array; + /** + * Status is one of `none`, `starting`, `healthy` or `unhealthy` + * + * - "none" Indicates there is no healthcheck + * - "starting" Starting indicates that the container is not yet ready + * - "healthy" Healthy indicates that the container is running correctly + * - "unhealthy" Unhealthy indicates that the container has a problem + * + * @type {string} + * @memberof Health + */ + Status?: HealthStatusEnum; + /** + * FailingStreak is the number of consecutive failures + * @type {number} + * @memberof Health + */ + FailingStreak?: number; + /** + * Log contains the last few results (oldest first) + * + * @type {Array} + * @memberof Health + */ + Log?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum HealthStatusEnum { - None = 'none', - Starting = 'starting', - Healthy = 'healthy', - Unhealthy = 'unhealthy' + None = "none", + Starting = "starting", + Healthy = "healthy", + Unhealthy = "unhealthy", } - /** * Check if a given object implements the Health interface. */ export function instanceOfHealth(value: object): value is Health { - return true; + return true; } export function HealthFromJSON(json: any): Health { - return HealthFromJSONTyped(json, false); + return HealthFromJSONTyped(json, false); } export function HealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): Health { - if (json == null) { - return json; - } - return { - - 'Status': json['Status'] == null ? undefined : json['Status'], - 'FailingStreak': json['FailingStreak'] == null ? undefined : json['FailingStreak'], - 'Log': json['Log'] == null ? undefined : ((json['Log'] as Array).map(HealthcheckResultFromJSON)), - }; + if (json == null) { + return json; + } + return { + Status: json["Status"] == null ? undefined : json["Status"], + FailingStreak: json["FailingStreak"] == null ? undefined : json["FailingStreak"], + Log: + json["Log"] == null ? undefined : (json["Log"] as Array).map(HealthcheckResultFromJSON), + }; } export function HealthToJSON(json: any): Health { - return HealthToJSONTyped(json, false); + return HealthToJSONTyped(json, false); } -export function HealthToJSONTyped(value?: Health | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthToJSONTyped( + value?: Health | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Status': value['Status'], - 'FailingStreak': value['FailingStreak'], - 'Log': value['Log'] == null ? undefined : ((value['Log'] as Array).map(HealthcheckResultToJSON)), - }; + return { + Status: value["Status"], + FailingStreak: value["FailingStreak"], + Log: + value["Log"] == null ? undefined : (value["Log"] as Array).map(HealthcheckResultToJSON), + }; } - diff --git a/src/clients/docker/models/HealthConfig.ts b/src/clients/docker/models/HealthConfig.ts index e8d229d066..0b5cf45631 100644 --- a/src/clients/docker/models/HealthConfig.ts +++ b/src/clients/docker/models/HealthConfig.ts @@ -2,111 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * A test to perform to check that the container is healthy. * @export * @interface HealthConfig */ export interface HealthConfig { - /** - * The test to perform. Possible values are: - * - * - `[]` inherit healthcheck from image or parent image - * - `["NONE"]` disable healthcheck - * - `["CMD", args...]` exec arguments directly - * - `["CMD-SHELL", command]` run command with system's default shell - * - * @type {Array} - * @memberof HealthConfig - */ - Test?: Array; - /** - * The time to wait between checks in nanoseconds. It should be 0 or at - * least 1000000 (1 ms). 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - Interval?: number; - /** - * The time to wait before considering the check to have hung. It should - * be 0 or at least 1000000 (1 ms). 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - Timeout?: number; - /** - * The number of consecutive failures needed to consider a container as - * unhealthy. 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - Retries?: number; - /** - * Start period for the container to initialize before starting - * health-retries countdown in nanoseconds. It should be 0 or at least - * 1000000 (1 ms). 0 means inherit. - * - * @type {number} - * @memberof HealthConfig - */ - StartPeriod?: number; + /** + * The test to perform. Possible values are: + * + * - `[]` inherit healthcheck from image or parent image + * - `["NONE"]` disable healthcheck + * - `["CMD", args...]` exec arguments directly + * - `["CMD-SHELL", command]` run command with system's default shell + * + * @type {Array} + * @memberof HealthConfig + */ + Test?: Array; + /** + * The time to wait between checks in nanoseconds. It should be 0 or at + * least 1000000 (1 ms). 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + Interval?: number; + /** + * The time to wait before considering the check to have hung. It should + * be 0 or at least 1000000 (1 ms). 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + Timeout?: number; + /** + * The number of consecutive failures needed to consider a container as + * unhealthy. 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + Retries?: number; + /** + * Start period for the container to initialize before starting + * health-retries countdown in nanoseconds. It should be 0 or at least + * 1000000 (1 ms). 0 means inherit. + * + * @type {number} + * @memberof HealthConfig + */ + StartPeriod?: number; } /** * Check if a given object implements the HealthConfig interface. */ export function instanceOfHealthConfig(value: object): value is HealthConfig { - return true; + return true; } export function HealthConfigFromJSON(json: any): HealthConfig { - return HealthConfigFromJSONTyped(json, false); + return HealthConfigFromJSONTyped(json, false); } export function HealthConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthConfig { - if (json == null) { - return json; - } - return { - - 'Test': json['Test'] == null ? undefined : json['Test'], - 'Interval': json['Interval'] == null ? undefined : json['Interval'], - 'Timeout': json['Timeout'] == null ? undefined : json['Timeout'], - 'Retries': json['Retries'] == null ? undefined : json['Retries'], - 'StartPeriod': json['StartPeriod'] == null ? undefined : json['StartPeriod'], - }; + if (json == null) { + return json; + } + return { + Test: json["Test"] == null ? undefined : json["Test"], + Interval: json["Interval"] == null ? undefined : json["Interval"], + Timeout: json["Timeout"] == null ? undefined : json["Timeout"], + Retries: json["Retries"] == null ? undefined : json["Retries"], + StartPeriod: json["StartPeriod"] == null ? undefined : json["StartPeriod"], + }; } export function HealthConfigToJSON(json: any): HealthConfig { - return HealthConfigToJSONTyped(json, false); + return HealthConfigToJSONTyped(json, false); } -export function HealthConfigToJSONTyped(value?: HealthConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthConfigToJSONTyped( + value?: HealthConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Test': value['Test'], - 'Interval': value['Interval'], - 'Timeout': value['Timeout'], - 'Retries': value['Retries'], - 'StartPeriod': value['StartPeriod'], - }; + return { + Test: value["Test"], + Interval: value["Interval"], + Timeout: value["Timeout"], + Retries: value["Retries"], + StartPeriod: value["StartPeriod"], + }; } - diff --git a/src/clients/docker/models/HealthcheckResult.ts b/src/clients/docker/models/HealthcheckResult.ts index c8d8d6b5a6..4758d8b769 100644 --- a/src/clients/docker/models/HealthcheckResult.ts +++ b/src/clients/docker/models/HealthcheckResult.ts @@ -2,99 +2,102 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * HealthcheckResult stores information about a single run of a healthcheck probe - * + * * @export * @interface HealthcheckResult */ export interface HealthcheckResult { - /** - * Date and time at which this check started in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {Date} - * @memberof HealthcheckResult - */ - Start?: Date; - /** - * Date and time at which this check ended in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof HealthcheckResult - */ - End?: string; - /** - * ExitCode meanings: - * - * - `0` healthy - * - `1` unhealthy - * - `2` reserved (considered unhealthy) - * - other values: error running probe - * - * @type {number} - * @memberof HealthcheckResult - */ - ExitCode?: number; - /** - * Output from last check - * @type {string} - * @memberof HealthcheckResult - */ - Output?: string; + /** + * Date and time at which this check started in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {Date} + * @memberof HealthcheckResult + */ + Start?: Date; + /** + * Date and time at which this check ended in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof HealthcheckResult + */ + End?: string; + /** + * ExitCode meanings: + * + * - `0` healthy + * - `1` unhealthy + * - `2` reserved (considered unhealthy) + * - other values: error running probe + * + * @type {number} + * @memberof HealthcheckResult + */ + ExitCode?: number; + /** + * Output from last check + * @type {string} + * @memberof HealthcheckResult + */ + Output?: string; } /** * Check if a given object implements the HealthcheckResult interface. */ export function instanceOfHealthcheckResult(value: object): value is HealthcheckResult { - return true; + return true; } export function HealthcheckResultFromJSON(json: any): HealthcheckResult { - return HealthcheckResultFromJSONTyped(json, false); + return HealthcheckResultFromJSONTyped(json, false); } -export function HealthcheckResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthcheckResult { - if (json == null) { - return json; - } - return { - - 'Start': json['Start'] == null ? undefined : (new Date(json['Start'])), - 'End': json['End'] == null ? undefined : json['End'], - 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], - 'Output': json['Output'] == null ? undefined : json['Output'], - }; +export function HealthcheckResultFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): HealthcheckResult { + if (json == null) { + return json; + } + return { + Start: json["Start"] == null ? undefined : new Date(json["Start"]), + End: json["End"] == null ? undefined : json["End"], + ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], + Output: json["Output"] == null ? undefined : json["Output"], + }; } export function HealthcheckResultToJSON(json: any): HealthcheckResult { - return HealthcheckResultToJSONTyped(json, false); + return HealthcheckResultToJSONTyped(json, false); } -export function HealthcheckResultToJSONTyped(value?: HealthcheckResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthcheckResultToJSONTyped( + value?: HealthcheckResult | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Start': value['Start'] == null ? undefined : ((value['Start']).toISOString()), - 'End': value['End'], - 'ExitCode': value['ExitCode'], - 'Output': value['Output'], - }; + return { + Start: value["Start"] == null ? undefined : value["Start"].toISOString(), + End: value["End"], + ExitCode: value["ExitCode"], + Output: value["Output"], + }; } - diff --git a/src/clients/docker/models/HistoryResponseItem.ts b/src/clients/docker/models/HistoryResponseItem.ts index e34ad07c7f..ee5870e445 100644 --- a/src/clients/docker/models/HistoryResponseItem.ts +++ b/src/clients/docker/models/HistoryResponseItem.ts @@ -2,110 +2,113 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * individual image layer information in response to ImageHistory operation * @export * @interface HistoryResponseItem */ export interface HistoryResponseItem { - /** - * - * @type {string} - * @memberof HistoryResponseItem - */ - Id: string; - /** - * - * @type {number} - * @memberof HistoryResponseItem - */ - Created: number; - /** - * - * @type {string} - * @memberof HistoryResponseItem - */ - CreatedBy: string; - /** - * - * @type {Array} - * @memberof HistoryResponseItem - */ - Tags: Array; - /** - * - * @type {number} - * @memberof HistoryResponseItem - */ - Size: number; - /** - * - * @type {string} - * @memberof HistoryResponseItem - */ - Comment: string; + /** + * + * @type {string} + * @memberof HistoryResponseItem + */ + Id: string; + /** + * + * @type {number} + * @memberof HistoryResponseItem + */ + Created: number; + /** + * + * @type {string} + * @memberof HistoryResponseItem + */ + CreatedBy: string; + /** + * + * @type {Array} + * @memberof HistoryResponseItem + */ + Tags: Array; + /** + * + * @type {number} + * @memberof HistoryResponseItem + */ + Size: number; + /** + * + * @type {string} + * @memberof HistoryResponseItem + */ + Comment: string; } /** * Check if a given object implements the HistoryResponseItem interface. */ export function instanceOfHistoryResponseItem(value: object): value is HistoryResponseItem { - if (!('Id' in value) || value['Id'] === undefined) return false; - if (!('Created' in value) || value['Created'] === undefined) return false; - if (!('CreatedBy' in value) || value['CreatedBy'] === undefined) return false; - if (!('Tags' in value) || value['Tags'] === undefined) return false; - if (!('Size' in value) || value['Size'] === undefined) return false; - if (!('Comment' in value) || value['Comment'] === undefined) return false; - return true; + if (!("Id" in value) || value["Id"] === undefined) return false; + if (!("Created" in value) || value["Created"] === undefined) return false; + if (!("CreatedBy" in value) || value["CreatedBy"] === undefined) return false; + if (!("Tags" in value) || value["Tags"] === undefined) return false; + if (!("Size" in value) || value["Size"] === undefined) return false; + if (!("Comment" in value) || value["Comment"] === undefined) return false; + return true; } export function HistoryResponseItemFromJSON(json: any): HistoryResponseItem { - return HistoryResponseItemFromJSONTyped(json, false); + return HistoryResponseItemFromJSONTyped(json, false); } -export function HistoryResponseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): HistoryResponseItem { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'], - 'Created': json['Created'], - 'CreatedBy': json['CreatedBy'], - 'Tags': json['Tags'], - 'Size': json['Size'], - 'Comment': json['Comment'], - }; +export function HistoryResponseItemFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): HistoryResponseItem { + if (json == null) { + return json; + } + return { + Id: json["Id"], + Created: json["Created"], + CreatedBy: json["CreatedBy"], + Tags: json["Tags"], + Size: json["Size"], + Comment: json["Comment"], + }; } export function HistoryResponseItemToJSON(json: any): HistoryResponseItem { - return HistoryResponseItemToJSONTyped(json, false); + return HistoryResponseItemToJSONTyped(json, false); } -export function HistoryResponseItemToJSONTyped(value?: HistoryResponseItem | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HistoryResponseItemToJSONTyped( + value?: HistoryResponseItem | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'Created': value['Created'], - 'CreatedBy': value['CreatedBy'], - 'Tags': value['Tags'], - 'Size': value['Size'], - 'Comment': value['Comment'], - }; + return { + Id: value["Id"], + Created: value["Created"], + CreatedBy: value["CreatedBy"], + Tags: value["Tags"], + Size: value["Size"], + Comment: value["Comment"], + }; } - diff --git a/src/clients/docker/models/HostConfig.ts b/src/clients/docker/models/HostConfig.ts index 4516f38cb8..e9ffc1b6a4 100644 --- a/src/clients/docker/models/HostConfig.ts +++ b/src/clients/docker/models/HostConfig.ts @@ -2,80 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; -import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from './ResourcesUlimitsInner'; -import type { PortBinding } from './PortBinding'; +import { mapValues } from "../runtime"; +import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; import { - PortBindingFromJSON, - PortBindingFromJSONTyped, - PortBindingToJSON, - PortBindingToJSONTyped, -} from './PortBinding'; -import type { ThrottleDevice } from './ThrottleDevice'; + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from "./ResourcesUlimitsInner"; +import type { PortBinding } from "./PortBinding"; import { - ThrottleDeviceFromJSON, - ThrottleDeviceFromJSONTyped, - ThrottleDeviceToJSON, - ThrottleDeviceToJSONTyped, -} from './ThrottleDevice'; -import type { DeviceMapping } from './DeviceMapping'; + PortBindingFromJSON, + PortBindingFromJSONTyped, + PortBindingToJSON, + PortBindingToJSONTyped, +} from "./PortBinding"; +import type { ThrottleDevice } from "./ThrottleDevice"; import { - DeviceMappingFromJSON, - DeviceMappingFromJSONTyped, - DeviceMappingToJSON, - DeviceMappingToJSONTyped, -} from './DeviceMapping'; -import type { Mount } from './Mount'; + ThrottleDeviceFromJSON, + ThrottleDeviceFromJSONTyped, + ThrottleDeviceToJSON, + ThrottleDeviceToJSONTyped, +} from "./ThrottleDevice"; +import type { DeviceMapping } from "./DeviceMapping"; import { - MountFromJSON, - MountFromJSONTyped, - MountToJSON, - MountToJSONTyped, -} from './Mount'; -import type { HostConfigAllOfLogConfig } from './HostConfigAllOfLogConfig'; + DeviceMappingFromJSON, + DeviceMappingFromJSONTyped, + DeviceMappingToJSON, + DeviceMappingToJSONTyped, +} from "./DeviceMapping"; +import type { Mount } from "./Mount"; +import { MountFromJSON, MountFromJSONTyped, MountToJSON, MountToJSONTyped } from "./Mount"; +import type { HostConfigAllOfLogConfig } from "./HostConfigAllOfLogConfig"; import { - HostConfigAllOfLogConfigFromJSON, - HostConfigAllOfLogConfigFromJSONTyped, - HostConfigAllOfLogConfigToJSON, - HostConfigAllOfLogConfigToJSONTyped, -} from './HostConfigAllOfLogConfig'; -import type { RestartPolicy } from './RestartPolicy'; + HostConfigAllOfLogConfigFromJSON, + HostConfigAllOfLogConfigFromJSONTyped, + HostConfigAllOfLogConfigToJSON, + HostConfigAllOfLogConfigToJSONTyped, +} from "./HostConfigAllOfLogConfig"; +import type { RestartPolicy } from "./RestartPolicy"; import { - RestartPolicyFromJSON, - RestartPolicyFromJSONTyped, - RestartPolicyToJSON, - RestartPolicyToJSONTyped, -} from './RestartPolicy'; -import type { DeviceRequest } from './DeviceRequest'; + RestartPolicyFromJSON, + RestartPolicyFromJSONTyped, + RestartPolicyToJSON, + RestartPolicyToJSONTyped, +} from "./RestartPolicy"; +import type { DeviceRequest } from "./DeviceRequest"; import { - DeviceRequestFromJSON, - DeviceRequestFromJSONTyped, - DeviceRequestToJSON, - DeviceRequestToJSONTyped, -} from './DeviceRequest'; -import type { ResourcesBlkioWeightDeviceInner } from './ResourcesBlkioWeightDeviceInner'; + DeviceRequestFromJSON, + DeviceRequestFromJSONTyped, + DeviceRequestToJSON, + DeviceRequestToJSONTyped, +} from "./DeviceRequest"; +import type { ResourcesBlkioWeightDeviceInner } from "./ResourcesBlkioWeightDeviceInner"; import { - ResourcesBlkioWeightDeviceInnerFromJSON, - ResourcesBlkioWeightDeviceInnerFromJSONTyped, - ResourcesBlkioWeightDeviceInnerToJSON, - ResourcesBlkioWeightDeviceInnerToJSONTyped, -} from './ResourcesBlkioWeightDeviceInner'; + ResourcesBlkioWeightDeviceInnerFromJSON, + ResourcesBlkioWeightDeviceInnerFromJSONTyped, + ResourcesBlkioWeightDeviceInnerToJSON, + ResourcesBlkioWeightDeviceInnerToJSONTyped, +} from "./ResourcesBlkioWeightDeviceInner"; /** * Container configuration that depends on the host we are running on @@ -83,810 +78,859 @@ import { * @interface HostConfig */ export interface HostConfig { - /** - * An integer value representing this container's relative CPU weight - * versus other containers. - * - * @type {number} - * @memberof HostConfig - */ - CpuShares?: number; - /** - * Memory limit in bytes. - * @type {number} - * @memberof HostConfig - */ - Memory?: number; - /** - * Path to `cgroups` under which the container's `cgroup` is created. If - * the path is not absolute, the path is considered to be relative to the - * `cgroups` path of the init process. Cgroups are created if they do not - * already exist. - * - * @type {string} - * @memberof HostConfig - */ - CgroupParent?: string; - /** - * Block IO weight (relative weight). - * @type {number} - * @memberof HostConfig - */ - BlkioWeight?: number; - /** - * Block IO weight (relative device weight) in the form: - * - * ``` - * [{"Path": "device_path", "Weight": weight}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioWeightDevice?: Array; - /** - * Limit read rate (bytes per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceReadBps?: Array; - /** - * Limit write rate (bytes per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceWriteBps?: Array; - /** - * Limit read rate (IO per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceReadIOps?: Array; - /** - * Limit write rate (IO per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - BlkioDeviceWriteIOps?: Array; - /** - * The length of a CPU period in microseconds. - * @type {number} - * @memberof HostConfig - */ - CpuPeriod?: number; - /** - * Microseconds of CPU time that the container can get in a CPU period. - * - * @type {number} - * @memberof HostConfig - */ - CpuQuota?: number; - /** - * The length of a CPU real-time period in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof HostConfig - */ - CpuRealtimePeriod?: number; - /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof HostConfig - */ - CpuRealtimeRuntime?: number; - /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`). - * - * @type {string} - * @memberof HostConfig - */ - CpusetCpus?: string; - /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only - * effective on NUMA systems. - * - * @type {string} - * @memberof HostConfig - */ - CpusetMems?: string; - /** - * A list of devices to add to the container. - * @type {Array} - * @memberof HostConfig - */ - Devices?: Array; - /** - * a list of cgroup rules to apply to the container - * @type {Array} - * @memberof HostConfig - */ - DeviceCgroupRules?: Array; - /** - * A list of requests for devices to be sent to device drivers. - * - * @type {Array} - * @memberof HostConfig - */ - DeviceRequests?: Array; - /** - * Hard limit for kernel TCP buffer memory (in bytes). Depending on the - * OCI runtime in use, this option may be ignored. It is no longer supported - * by the default (runc) runtime. - * - * This field is omitted when empty. - * - * @type {number} - * @memberof HostConfig - */ - KernelMemoryTCP?: number; - /** - * Memory soft limit in bytes. - * @type {number} - * @memberof HostConfig - */ - MemoryReservation?: number; - /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited - * swap. - * - * @type {number} - * @memberof HostConfig - */ - MemorySwap?: number; - /** - * Tune a container's memory swappiness behavior. Accepts an integer - * between 0 and 100. - * - * @type {number} - * @memberof HostConfig - */ - MemorySwappiness?: number; - /** - * CPU quota in units of 10-9 CPUs. - * @type {number} - * @memberof HostConfig - */ - NanoCpus?: number; - /** - * Disable OOM Killer for the container. - * @type {boolean} - * @memberof HostConfig - */ - OomKillDisable?: boolean; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof HostConfig - */ - Init?: boolean | null; - /** - * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` - * to not change. - * - * @type {number} - * @memberof HostConfig - */ - PidsLimit?: number | null; - /** - * A list of resource limits to set in the container. For example: - * - * ``` - * {"Name": "nofile", "Soft": 1024, "Hard": 2048} - * ``` - * - * @type {Array} - * @memberof HostConfig - */ - Ulimits?: Array; - /** - * The number of usable CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof HostConfig - */ - CpuCount?: number; - /** - * The usable percentage of the available CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof HostConfig - */ - CpuPercent?: number; - /** - * Maximum IOps for the container system drive (Windows only) - * @type {number} - * @memberof HostConfig - */ - IOMaximumIOps?: number; - /** - * Maximum IO in bytes per second for the container system drive - * (Windows only). - * - * @type {number} - * @memberof HostConfig - */ - IOMaximumBandwidth?: number; - /** - * A list of volume bindings for this container. Each volume binding - * is a string in one of these forms: - * - * - `host-src:container-dest[:options]` to bind-mount a host path - * into the container. Both `host-src`, and `container-dest` must - * be an _absolute_ path. - * - `volume-name:container-dest[:options]` to bind-mount a volume - * managed by a volume driver into the container. `container-dest` - * must be an _absolute_ path. - * - * `options` is an optional, comma-delimited list of: - * - * - `nocopy` disables automatic copying of data from the container - * path to the volume. The `nocopy` flag only applies to named volumes. - * - `[ro|rw]` mounts a volume read-only or read-write, respectively. - * If omitted or set to `rw`, volumes are mounted read-write. - * - `[z|Z]` applies SELinux labels to allow or deny multiple containers - * to read and write to the same volume. - * - `z`: a _shared_ content label is applied to the content. This - * label indicates that multiple containers can share the volume - * content, for both reading and writing. - * - `Z`: a _private unshared_ label is applied to the content. - * This label indicates that only the current container can use - * a private volume. Labeling systems such as SELinux require - * proper labels to be placed on volume content that is mounted - * into a container. Without a label, the security system can - * prevent a container's processes from using the content. By - * default, the labels set by the host operating system are not - * modified. - * - `[[r]shared|[r]slave|[r]private]` specifies mount - * [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). - * This only applies to bind-mounted volumes, not internal volumes - * or named volumes. Mount propagation requires the source mount - * point (the location where the source directory is mounted in the - * host operating system) to have the correct propagation properties. - * For shared volumes, the source mount point must be set to `shared`. - * For slave volumes, the mount must be set to either `shared` or - * `slave`. - * - * @type {Array} - * @memberof HostConfig - */ - Binds?: Array; - /** - * Path to a file where the container ID is written - * @type {string} - * @memberof HostConfig - */ - ContainerIDFile?: string; - /** - * - * @type {HostConfigAllOfLogConfig} - * @memberof HostConfig - */ - LogConfig?: HostConfigAllOfLogConfig; - /** - * Network mode to use for this container. Supported standard values - * are: `bridge`, `host`, `none`, and `container:`. Any - * other value is taken as a custom network's name to which this - * container should connect to. - * - * @type {string} - * @memberof HostConfig - */ - NetworkMode?: string; - /** - * PortMap describes the mapping of container ports to host ports, using the - * container's port-number and protocol as key in the format `/`, - * for example, `80/udp`. - * - * If a container's port is mapped for multiple protocols, separate entries - * are added to the mapping table. - * - * @type {{ [key: string]: Array | null; }} - * @memberof HostConfig - */ - PortBindings?: { [key: string]: Array | null; }; - /** - * - * @type {RestartPolicy} - * @memberof HostConfig - */ - RestartPolicy?: RestartPolicy; - /** - * Automatically remove the container when the container's process - * exits. This has no effect if `RestartPolicy` is set. - * - * @type {boolean} - * @memberof HostConfig - */ - AutoRemove?: boolean; - /** - * Driver that this container uses to mount volumes. - * @type {string} - * @memberof HostConfig - */ - VolumeDriver?: string; - /** - * A list of volumes to inherit from another container, specified in - * the form `[:]`. - * - * @type {Array} - * @memberof HostConfig - */ - VolumesFrom?: Array; - /** - * Specification for mounts to be added to the container. - * - * @type {Array} - * @memberof HostConfig - */ - Mounts?: Array; - /** - * Initial console size, as an `[height, width]` array. - * - * @type {Array} - * @memberof HostConfig - */ - ConsoleSize?: Array | null; - /** - * Arbitrary non-identifying metadata attached to container and - * provided to the runtime when the container is started. - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - Annotations?: { [key: string]: string; }; - /** - * A list of kernel capabilities to add to the container. Conflicts - * with option 'Capabilities'. - * - * @type {Array} - * @memberof HostConfig - */ - CapAdd?: Array; - /** - * A list of kernel capabilities to drop from the container. Conflicts - * with option 'Capabilities'. - * - * @type {Array} - * @memberof HostConfig - */ - CapDrop?: Array; - /** - * cgroup namespace mode for the container. Possible values are: - * - * - `"private"`: the container runs in its own private cgroup namespace - * - `"host"`: use the host system's cgroup namespace - * - * If not specified, the daemon default is used, which can either be `"private"` - * or `"host"`, depending on daemon version, kernel support and configuration. - * - * @type {string} - * @memberof HostConfig - */ - CgroupnsMode?: HostConfigCgroupnsModeEnum; - /** - * A list of DNS servers for the container to use. - * @type {Array} - * @memberof HostConfig - */ - Dns?: Array; - /** - * A list of DNS options. - * @type {Array} - * @memberof HostConfig - */ - DnsOptions?: Array; - /** - * A list of DNS search domains. - * @type {Array} - * @memberof HostConfig - */ - DnsSearch?: Array; - /** - * A list of hostnames/IP mappings to add to the container's `/etc/hosts` - * file. Specified in the form `["hostname:IP"]`. - * - * @type {Array} - * @memberof HostConfig - */ - ExtraHosts?: Array; - /** - * A list of additional groups that the container process will run as. - * - * @type {Array} - * @memberof HostConfig - */ - GroupAdd?: Array; - /** - * IPC sharing mode for the container. Possible values are: - * - * - `"none"`: own private IPC namespace, with /dev/shm not mounted - * - `"private"`: own private IPC namespace - * - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers - * - `"container:"`: join another (shareable) container's IPC namespace - * - `"host"`: use the host system's IPC namespace - * - * If not specified, daemon default is used, which can either be `"private"` - * or `"shareable"`, depending on daemon version and configuration. - * - * @type {string} - * @memberof HostConfig - */ - IpcMode?: string; - /** - * Cgroup to use for the container. - * @type {string} - * @memberof HostConfig - */ - Cgroup?: string; - /** - * A list of links for the container in the form `container_name:alias`. - * - * @type {Array} - * @memberof HostConfig - */ - Links?: Array; - /** - * An integer value containing the score given to the container in - * order to tune OOM killer preferences. - * - * @type {number} - * @memberof HostConfig - */ - OomScoreAdj?: number; - /** - * Set the PID (Process) Namespace mode for the container. It can be - * either: - * - * - `"container:"`: joins another container's PID namespace - * - `"host"`: use the host's PID namespace inside the container - * - * @type {string} - * @memberof HostConfig - */ - PidMode?: string; - /** - * Gives the container full access to the host. - * @type {boolean} - * @memberof HostConfig - */ - Privileged?: boolean; - /** - * Allocates an ephemeral host port for all of a container's - * exposed ports. - * - * Ports are de-allocated when the container stops and allocated when - * the container starts. The allocated port might be changed when - * restarting the container. - * - * The port is selected from the ephemeral port range that depends on - * the kernel. For example, on Linux the range is defined by - * `/proc/sys/net/ipv4/ip_local_port_range`. - * - * @type {boolean} - * @memberof HostConfig - */ - PublishAllPorts?: boolean; - /** - * Mount the container's root filesystem as read only. - * @type {boolean} - * @memberof HostConfig - */ - ReadonlyRootfs?: boolean; - /** - * A list of string values to customize labels for MLS systems, such - * as SELinux. - * - * @type {Array} - * @memberof HostConfig - */ - SecurityOpt?: Array; - /** - * Storage driver options for this container, in the form `{"size": "120G"}`. - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - StorageOpt?: { [key: string]: string; }; - /** - * A map of container directories which should be replaced by tmpfs - * mounts, and their corresponding mount options. For example: - * - * ``` - * { "/run": "rw,noexec,nosuid,size=65536k" } - * ``` - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - Tmpfs?: { [key: string]: string; }; - /** - * UTS namespace to use for the container. - * @type {string} - * @memberof HostConfig - */ - UTSMode?: string; - /** - * Sets the usernamespace mode for the container when usernamespace - * remapping option is enabled. - * - * @type {string} - * @memberof HostConfig - */ - UsernsMode?: string; - /** - * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. - * - * @type {number} - * @memberof HostConfig - */ - ShmSize?: number; - /** - * A list of kernel parameters (sysctls) to set in the container. - * For example: - * - * ``` - * {"net.ipv4.ip_forward": "1"} - * ``` - * - * @type {{ [key: string]: string; }} - * @memberof HostConfig - */ - Sysctls?: { [key: string]: string; }; - /** - * Runtime to use with this container. - * @type {string} - * @memberof HostConfig - */ - Runtime?: string; - /** - * Isolation technology of the container. (Windows only) - * - * @type {string} - * @memberof HostConfig - */ - Isolation?: HostConfigIsolationEnum; - /** - * The list of paths to be masked inside the container (this overrides - * the default set of paths). - * - * @type {Array} - * @memberof HostConfig - */ - MaskedPaths?: Array; - /** - * The list of paths to be set as read-only inside the container - * (this overrides the default set of paths). - * - * @type {Array} - * @memberof HostConfig - */ - ReadonlyPaths?: Array; + /** + * An integer value representing this container's relative CPU weight + * versus other containers. + * + * @type {number} + * @memberof HostConfig + */ + CpuShares?: number; + /** + * Memory limit in bytes. + * @type {number} + * @memberof HostConfig + */ + Memory?: number; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If + * the path is not absolute, the path is considered to be relative to the + * `cgroups` path of the init process. Cgroups are created if they do not + * already exist. + * + * @type {string} + * @memberof HostConfig + */ + CgroupParent?: string; + /** + * Block IO weight (relative weight). + * @type {number} + * @memberof HostConfig + */ + BlkioWeight?: number; + /** + * Block IO weight (relative device weight) in the form: + * + * ``` + * [{"Path": "device_path", "Weight": weight}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioWeightDevice?: Array; + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceReadBps?: Array; + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceWriteBps?: Array; + /** + * Limit read rate (IO per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceReadIOps?: Array; + /** + * Limit write rate (IO per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + BlkioDeviceWriteIOps?: Array; + /** + * The length of a CPU period in microseconds. + * @type {number} + * @memberof HostConfig + */ + CpuPeriod?: number; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @type {number} + * @memberof HostConfig + */ + CpuQuota?: number; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof HostConfig + */ + CpuRealtimePeriod?: number; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof HostConfig + */ + CpuRealtimeRuntime?: number; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * + * @type {string} + * @memberof HostConfig + */ + CpusetCpus?: string; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + * effective on NUMA systems. + * + * @type {string} + * @memberof HostConfig + */ + CpusetMems?: string; + /** + * A list of devices to add to the container. + * @type {Array} + * @memberof HostConfig + */ + Devices?: Array; + /** + * a list of cgroup rules to apply to the container + * @type {Array} + * @memberof HostConfig + */ + DeviceCgroupRules?: Array; + /** + * A list of requests for devices to be sent to device drivers. + * + * @type {Array} + * @memberof HostConfig + */ + DeviceRequests?: Array; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + * OCI runtime in use, this option may be ignored. It is no longer supported + * by the default (runc) runtime. + * + * This field is omitted when empty. + * + * @type {number} + * @memberof HostConfig + */ + KernelMemoryTCP?: number; + /** + * Memory soft limit in bytes. + * @type {number} + * @memberof HostConfig + */ + MemoryReservation?: number; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + * swap. + * + * @type {number} + * @memberof HostConfig + */ + MemorySwap?: number; + /** + * Tune a container's memory swappiness behavior. Accepts an integer + * between 0 and 100. + * + * @type {number} + * @memberof HostConfig + */ + MemorySwappiness?: number; + /** + * CPU quota in units of 10-9 CPUs. + * @type {number} + * @memberof HostConfig + */ + NanoCpus?: number; + /** + * Disable OOM Killer for the container. + * @type {boolean} + * @memberof HostConfig + */ + OomKillDisable?: boolean; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof HostConfig + */ + Init?: boolean | null; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + * to not change. + * + * @type {number} + * @memberof HostConfig + */ + PidsLimit?: number | null; + /** + * A list of resource limits to set in the container. For example: + * + * ``` + * {"Name": "nofile", "Soft": 1024, "Hard": 2048} + * ``` + * + * @type {Array} + * @memberof HostConfig + */ + Ulimits?: Array; + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof HostConfig + */ + CpuCount?: number; + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof HostConfig + */ + CpuPercent?: number; + /** + * Maximum IOps for the container system drive (Windows only) + * @type {number} + * @memberof HostConfig + */ + IOMaximumIOps?: number; + /** + * Maximum IO in bytes per second for the container system drive + * (Windows only). + * + * @type {number} + * @memberof HostConfig + */ + IOMaximumBandwidth?: number; + /** + * A list of volume bindings for this container. Each volume binding + * is a string in one of these forms: + * + * - `host-src:container-dest[:options]` to bind-mount a host path + * into the container. Both `host-src`, and `container-dest` must + * be an _absolute_ path. + * - `volume-name:container-dest[:options]` to bind-mount a volume + * managed by a volume driver into the container. `container-dest` + * must be an _absolute_ path. + * + * `options` is an optional, comma-delimited list of: + * + * - `nocopy` disables automatic copying of data from the container + * path to the volume. The `nocopy` flag only applies to named volumes. + * - `[ro|rw]` mounts a volume read-only or read-write, respectively. + * If omitted or set to `rw`, volumes are mounted read-write. + * - `[z|Z]` applies SELinux labels to allow or deny multiple containers + * to read and write to the same volume. + * - `z`: a _shared_ content label is applied to the content. This + * label indicates that multiple containers can share the volume + * content, for both reading and writing. + * - `Z`: a _private unshared_ label is applied to the content. + * This label indicates that only the current container can use + * a private volume. Labeling systems such as SELinux require + * proper labels to be placed on volume content that is mounted + * into a container. Without a label, the security system can + * prevent a container's processes from using the content. By + * default, the labels set by the host operating system are not + * modified. + * - `[[r]shared|[r]slave|[r]private]` specifies mount + * [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + * This only applies to bind-mounted volumes, not internal volumes + * or named volumes. Mount propagation requires the source mount + * point (the location where the source directory is mounted in the + * host operating system) to have the correct propagation properties. + * For shared volumes, the source mount point must be set to `shared`. + * For slave volumes, the mount must be set to either `shared` or + * `slave`. + * + * @type {Array} + * @memberof HostConfig + */ + Binds?: Array; + /** + * Path to a file where the container ID is written + * @type {string} + * @memberof HostConfig + */ + ContainerIDFile?: string; + /** + * + * @type {HostConfigAllOfLogConfig} + * @memberof HostConfig + */ + LogConfig?: HostConfigAllOfLogConfig; + /** + * Network mode to use for this container. Supported standard values + * are: `bridge`, `host`, `none`, and `container:`. Any + * other value is taken as a custom network's name to which this + * container should connect to. + * + * @type {string} + * @memberof HostConfig + */ + NetworkMode?: string; + /** + * PortMap describes the mapping of container ports to host ports, using the + * container's port-number and protocol as key in the format `/`, + * for example, `80/udp`. + * + * If a container's port is mapped for multiple protocols, separate entries + * are added to the mapping table. + * + * @type {{ [key: string]: Array | null; }} + * @memberof HostConfig + */ + PortBindings?: { [key: string]: Array | null }; + /** + * + * @type {RestartPolicy} + * @memberof HostConfig + */ + RestartPolicy?: RestartPolicy; + /** + * Automatically remove the container when the container's process + * exits. This has no effect if `RestartPolicy` is set. + * + * @type {boolean} + * @memberof HostConfig + */ + AutoRemove?: boolean; + /** + * Driver that this container uses to mount volumes. + * @type {string} + * @memberof HostConfig + */ + VolumeDriver?: string; + /** + * A list of volumes to inherit from another container, specified in + * the form `[:]`. + * + * @type {Array} + * @memberof HostConfig + */ + VolumesFrom?: Array; + /** + * Specification for mounts to be added to the container. + * + * @type {Array} + * @memberof HostConfig + */ + Mounts?: Array; + /** + * Initial console size, as an `[height, width]` array. + * + * @type {Array} + * @memberof HostConfig + */ + ConsoleSize?: Array | null; + /** + * Arbitrary non-identifying metadata attached to container and + * provided to the runtime when the container is started. + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + Annotations?: { [key: string]: string }; + /** + * A list of kernel capabilities to add to the container. Conflicts + * with option 'Capabilities'. + * + * @type {Array} + * @memberof HostConfig + */ + CapAdd?: Array; + /** + * A list of kernel capabilities to drop from the container. Conflicts + * with option 'Capabilities'. + * + * @type {Array} + * @memberof HostConfig + */ + CapDrop?: Array; + /** + * cgroup namespace mode for the container. Possible values are: + * + * - `"private"`: the container runs in its own private cgroup namespace + * - `"host"`: use the host system's cgroup namespace + * + * If not specified, the daemon default is used, which can either be `"private"` + * or `"host"`, depending on daemon version, kernel support and configuration. + * + * @type {string} + * @memberof HostConfig + */ + CgroupnsMode?: HostConfigCgroupnsModeEnum; + /** + * A list of DNS servers for the container to use. + * @type {Array} + * @memberof HostConfig + */ + Dns?: Array; + /** + * A list of DNS options. + * @type {Array} + * @memberof HostConfig + */ + DnsOptions?: Array; + /** + * A list of DNS search domains. + * @type {Array} + * @memberof HostConfig + */ + DnsSearch?: Array; + /** + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` + * file. Specified in the form `["hostname:IP"]`. + * + * @type {Array} + * @memberof HostConfig + */ + ExtraHosts?: Array; + /** + * A list of additional groups that the container process will run as. + * + * @type {Array} + * @memberof HostConfig + */ + GroupAdd?: Array; + /** + * IPC sharing mode for the container. Possible values are: + * + * - `"none"`: own private IPC namespace, with /dev/shm not mounted + * - `"private"`: own private IPC namespace + * - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + * - `"container:"`: join another (shareable) container's IPC namespace + * - `"host"`: use the host system's IPC namespace + * + * If not specified, daemon default is used, which can either be `"private"` + * or `"shareable"`, depending on daemon version and configuration. + * + * @type {string} + * @memberof HostConfig + */ + IpcMode?: string; + /** + * Cgroup to use for the container. + * @type {string} + * @memberof HostConfig + */ + Cgroup?: string; + /** + * A list of links for the container in the form `container_name:alias`. + * + * @type {Array} + * @memberof HostConfig + */ + Links?: Array; + /** + * An integer value containing the score given to the container in + * order to tune OOM killer preferences. + * + * @type {number} + * @memberof HostConfig + */ + OomScoreAdj?: number; + /** + * Set the PID (Process) Namespace mode for the container. It can be + * either: + * + * - `"container:"`: joins another container's PID namespace + * - `"host"`: use the host's PID namespace inside the container + * + * @type {string} + * @memberof HostConfig + */ + PidMode?: string; + /** + * Gives the container full access to the host. + * @type {boolean} + * @memberof HostConfig + */ + Privileged?: boolean; + /** + * Allocates an ephemeral host port for all of a container's + * exposed ports. + * + * Ports are de-allocated when the container stops and allocated when + * the container starts. The allocated port might be changed when + * restarting the container. + * + * The port is selected from the ephemeral port range that depends on + * the kernel. For example, on Linux the range is defined by + * `/proc/sys/net/ipv4/ip_local_port_range`. + * + * @type {boolean} + * @memberof HostConfig + */ + PublishAllPorts?: boolean; + /** + * Mount the container's root filesystem as read only. + * @type {boolean} + * @memberof HostConfig + */ + ReadonlyRootfs?: boolean; + /** + * A list of string values to customize labels for MLS systems, such + * as SELinux. + * + * @type {Array} + * @memberof HostConfig + */ + SecurityOpt?: Array; + /** + * Storage driver options for this container, in the form `{"size": "120G"}`. + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + StorageOpt?: { [key: string]: string }; + /** + * A map of container directories which should be replaced by tmpfs + * mounts, and their corresponding mount options. For example: + * + * ``` + * { "/run": "rw,noexec,nosuid,size=65536k" } + * ``` + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + Tmpfs?: { [key: string]: string }; + /** + * UTS namespace to use for the container. + * @type {string} + * @memberof HostConfig + */ + UTSMode?: string; + /** + * Sets the usernamespace mode for the container when usernamespace + * remapping option is enabled. + * + * @type {string} + * @memberof HostConfig + */ + UsernsMode?: string; + /** + * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + * + * @type {number} + * @memberof HostConfig + */ + ShmSize?: number; + /** + * A list of kernel parameters (sysctls) to set in the container. + * For example: + * + * ``` + * {"net.ipv4.ip_forward": "1"} + * ``` + * + * @type {{ [key: string]: string; }} + * @memberof HostConfig + */ + Sysctls?: { [key: string]: string }; + /** + * Runtime to use with this container. + * @type {string} + * @memberof HostConfig + */ + Runtime?: string; + /** + * Isolation technology of the container. (Windows only) + * + * @type {string} + * @memberof HostConfig + */ + Isolation?: HostConfigIsolationEnum; + /** + * The list of paths to be masked inside the container (this overrides + * the default set of paths). + * + * @type {Array} + * @memberof HostConfig + */ + MaskedPaths?: Array; + /** + * The list of paths to be set as read-only inside the container + * (this overrides the default set of paths). + * + * @type {Array} + * @memberof HostConfig + */ + ReadonlyPaths?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum HostConfigCgroupnsModeEnum { - Private = 'private', - Host = 'host' + Private = "private", + Host = "host", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum HostConfigIsolationEnum { - Default = 'default', - Process = 'process', - Hyperv = 'hyperv' + Default = "default", + Process = "process", + Hyperv = "hyperv", } - /** * Check if a given object implements the HostConfig interface. */ export function instanceOfHostConfig(value: object): value is HostConfig { - return true; + return true; } export function HostConfigFromJSON(json: any): HostConfig { - return HostConfigFromJSONTyped(json, false); + return HostConfigFromJSONTyped(json, false); } export function HostConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): HostConfig { - if (json == null) { - return json; - } - return { - - 'CpuShares': json['CpuShares'] == null ? undefined : json['CpuShares'], - 'Memory': json['Memory'] == null ? undefined : json['Memory'], - 'CgroupParent': json['CgroupParent'] == null ? undefined : json['CgroupParent'], - 'BlkioWeight': json['BlkioWeight'] == null ? undefined : json['BlkioWeight'], - 'BlkioWeightDevice': json['BlkioWeightDevice'] == null ? undefined : ((json['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON)), - 'BlkioDeviceReadBps': json['BlkioDeviceReadBps'] == null ? undefined : ((json['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceWriteBps': json['BlkioDeviceWriteBps'] == null ? undefined : ((json['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceReadIOps': json['BlkioDeviceReadIOps'] == null ? undefined : ((json['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceWriteIOps': json['BlkioDeviceWriteIOps'] == null ? undefined : ((json['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceFromJSON)), - 'CpuPeriod': json['CpuPeriod'] == null ? undefined : json['CpuPeriod'], - 'CpuQuota': json['CpuQuota'] == null ? undefined : json['CpuQuota'], - 'CpuRealtimePeriod': json['CpuRealtimePeriod'] == null ? undefined : json['CpuRealtimePeriod'], - 'CpuRealtimeRuntime': json['CpuRealtimeRuntime'] == null ? undefined : json['CpuRealtimeRuntime'], - 'CpusetCpus': json['CpusetCpus'] == null ? undefined : json['CpusetCpus'], - 'CpusetMems': json['CpusetMems'] == null ? undefined : json['CpusetMems'], - 'Devices': json['Devices'] == null ? undefined : ((json['Devices'] as Array).map(DeviceMappingFromJSON)), - 'DeviceCgroupRules': json['DeviceCgroupRules'] == null ? undefined : json['DeviceCgroupRules'], - 'DeviceRequests': json['DeviceRequests'] == null ? undefined : ((json['DeviceRequests'] as Array).map(DeviceRequestFromJSON)), - 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], - 'MemoryReservation': json['MemoryReservation'] == null ? undefined : json['MemoryReservation'], - 'MemorySwap': json['MemorySwap'] == null ? undefined : json['MemorySwap'], - 'MemorySwappiness': json['MemorySwappiness'] == null ? undefined : json['MemorySwappiness'], - 'NanoCpus': json['NanoCpus'] == null ? undefined : json['NanoCpus'], - 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], - 'Init': json['Init'] == null ? undefined : json['Init'], - 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], - 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), - 'CpuCount': json['CpuCount'] == null ? undefined : json['CpuCount'], - 'CpuPercent': json['CpuPercent'] == null ? undefined : json['CpuPercent'], - 'IOMaximumIOps': json['IOMaximumIOps'] == null ? undefined : json['IOMaximumIOps'], - 'IOMaximumBandwidth': json['IOMaximumBandwidth'] == null ? undefined : json['IOMaximumBandwidth'], - 'Binds': json['Binds'] == null ? undefined : json['Binds'], - 'ContainerIDFile': json['ContainerIDFile'] == null ? undefined : json['ContainerIDFile'], - 'LogConfig': json['LogConfig'] == null ? undefined : HostConfigAllOfLogConfigFromJSON(json['LogConfig']), - 'NetworkMode': json['NetworkMode'] == null ? undefined : json['NetworkMode'], - 'PortBindings': json['PortBindings'] == null ? undefined : json['PortBindings'], - 'RestartPolicy': json['RestartPolicy'] == null ? undefined : RestartPolicyFromJSON(json['RestartPolicy']), - 'AutoRemove': json['AutoRemove'] == null ? undefined : json['AutoRemove'], - 'VolumeDriver': json['VolumeDriver'] == null ? undefined : json['VolumeDriver'], - 'VolumesFrom': json['VolumesFrom'] == null ? undefined : json['VolumesFrom'], - 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountFromJSON)), - 'ConsoleSize': json['ConsoleSize'] == null ? undefined : json['ConsoleSize'], - 'Annotations': json['Annotations'] == null ? undefined : json['Annotations'], - 'CapAdd': json['CapAdd'] == null ? undefined : json['CapAdd'], - 'CapDrop': json['CapDrop'] == null ? undefined : json['CapDrop'], - 'CgroupnsMode': json['CgroupnsMode'] == null ? undefined : json['CgroupnsMode'], - 'Dns': json['Dns'] == null ? undefined : json['Dns'], - 'DnsOptions': json['DnsOptions'] == null ? undefined : json['DnsOptions'], - 'DnsSearch': json['DnsSearch'] == null ? undefined : json['DnsSearch'], - 'ExtraHosts': json['ExtraHosts'] == null ? undefined : json['ExtraHosts'], - 'GroupAdd': json['GroupAdd'] == null ? undefined : json['GroupAdd'], - 'IpcMode': json['IpcMode'] == null ? undefined : json['IpcMode'], - 'Cgroup': json['Cgroup'] == null ? undefined : json['Cgroup'], - 'Links': json['Links'] == null ? undefined : json['Links'], - 'OomScoreAdj': json['OomScoreAdj'] == null ? undefined : json['OomScoreAdj'], - 'PidMode': json['PidMode'] == null ? undefined : json['PidMode'], - 'Privileged': json['Privileged'] == null ? undefined : json['Privileged'], - 'PublishAllPorts': json['PublishAllPorts'] == null ? undefined : json['PublishAllPorts'], - 'ReadonlyRootfs': json['ReadonlyRootfs'] == null ? undefined : json['ReadonlyRootfs'], - 'SecurityOpt': json['SecurityOpt'] == null ? undefined : json['SecurityOpt'], - 'StorageOpt': json['StorageOpt'] == null ? undefined : json['StorageOpt'], - 'Tmpfs': json['Tmpfs'] == null ? undefined : json['Tmpfs'], - 'UTSMode': json['UTSMode'] == null ? undefined : json['UTSMode'], - 'UsernsMode': json['UsernsMode'] == null ? undefined : json['UsernsMode'], - 'ShmSize': json['ShmSize'] == null ? undefined : json['ShmSize'], - 'Sysctls': json['Sysctls'] == null ? undefined : json['Sysctls'], - 'Runtime': json['Runtime'] == null ? undefined : json['Runtime'], - 'Isolation': json['Isolation'] == null ? undefined : json['Isolation'], - 'MaskedPaths': json['MaskedPaths'] == null ? undefined : json['MaskedPaths'], - 'ReadonlyPaths': json['ReadonlyPaths'] == null ? undefined : json['ReadonlyPaths'], - }; + if (json == null) { + return json; + } + return { + CpuShares: json["CpuShares"] == null ? undefined : json["CpuShares"], + Memory: json["Memory"] == null ? undefined : json["Memory"], + CgroupParent: json["CgroupParent"] == null ? undefined : json["CgroupParent"], + BlkioWeight: json["BlkioWeight"] == null ? undefined : json["BlkioWeight"], + BlkioWeightDevice: + json["BlkioWeightDevice"] == null + ? undefined + : (json["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON), + BlkioDeviceReadBps: + json["BlkioDeviceReadBps"] == null + ? undefined + : (json["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceWriteBps: + json["BlkioDeviceWriteBps"] == null + ? undefined + : (json["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceReadIOps: + json["BlkioDeviceReadIOps"] == null + ? undefined + : (json["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceWriteIOps: + json["BlkioDeviceWriteIOps"] == null + ? undefined + : (json["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceFromJSON), + CpuPeriod: json["CpuPeriod"] == null ? undefined : json["CpuPeriod"], + CpuQuota: json["CpuQuota"] == null ? undefined : json["CpuQuota"], + CpuRealtimePeriod: json["CpuRealtimePeriod"] == null ? undefined : json["CpuRealtimePeriod"], + CpuRealtimeRuntime: json["CpuRealtimeRuntime"] == null ? undefined : json["CpuRealtimeRuntime"], + CpusetCpus: json["CpusetCpus"] == null ? undefined : json["CpusetCpus"], + CpusetMems: json["CpusetMems"] == null ? undefined : json["CpusetMems"], + Devices: + json["Devices"] == null + ? undefined + : (json["Devices"] as Array).map(DeviceMappingFromJSON), + DeviceCgroupRules: json["DeviceCgroupRules"] == null ? undefined : json["DeviceCgroupRules"], + DeviceRequests: + json["DeviceRequests"] == null + ? undefined + : (json["DeviceRequests"] as Array).map(DeviceRequestFromJSON), + KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], + MemoryReservation: json["MemoryReservation"] == null ? undefined : json["MemoryReservation"], + MemorySwap: json["MemorySwap"] == null ? undefined : json["MemorySwap"], + MemorySwappiness: json["MemorySwappiness"] == null ? undefined : json["MemorySwappiness"], + NanoCpus: json["NanoCpus"] == null ? undefined : json["NanoCpus"], + OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], + Init: json["Init"] == null ? undefined : json["Init"], + PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], + Ulimits: + json["Ulimits"] == null + ? undefined + : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), + CpuCount: json["CpuCount"] == null ? undefined : json["CpuCount"], + CpuPercent: json["CpuPercent"] == null ? undefined : json["CpuPercent"], + IOMaximumIOps: json["IOMaximumIOps"] == null ? undefined : json["IOMaximumIOps"], + IOMaximumBandwidth: json["IOMaximumBandwidth"] == null ? undefined : json["IOMaximumBandwidth"], + Binds: json["Binds"] == null ? undefined : json["Binds"], + ContainerIDFile: json["ContainerIDFile"] == null ? undefined : json["ContainerIDFile"], + LogConfig: + json["LogConfig"] == null ? undefined : HostConfigAllOfLogConfigFromJSON(json["LogConfig"]), + NetworkMode: json["NetworkMode"] == null ? undefined : json["NetworkMode"], + PortBindings: json["PortBindings"] == null ? undefined : json["PortBindings"], + RestartPolicy: + json["RestartPolicy"] == null ? undefined : RestartPolicyFromJSON(json["RestartPolicy"]), + AutoRemove: json["AutoRemove"] == null ? undefined : json["AutoRemove"], + VolumeDriver: json["VolumeDriver"] == null ? undefined : json["VolumeDriver"], + VolumesFrom: json["VolumesFrom"] == null ? undefined : json["VolumesFrom"], + Mounts: json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountFromJSON), + ConsoleSize: json["ConsoleSize"] == null ? undefined : json["ConsoleSize"], + Annotations: json["Annotations"] == null ? undefined : json["Annotations"], + CapAdd: json["CapAdd"] == null ? undefined : json["CapAdd"], + CapDrop: json["CapDrop"] == null ? undefined : json["CapDrop"], + CgroupnsMode: json["CgroupnsMode"] == null ? undefined : json["CgroupnsMode"], + Dns: json["Dns"] == null ? undefined : json["Dns"], + DnsOptions: json["DnsOptions"] == null ? undefined : json["DnsOptions"], + DnsSearch: json["DnsSearch"] == null ? undefined : json["DnsSearch"], + ExtraHosts: json["ExtraHosts"] == null ? undefined : json["ExtraHosts"], + GroupAdd: json["GroupAdd"] == null ? undefined : json["GroupAdd"], + IpcMode: json["IpcMode"] == null ? undefined : json["IpcMode"], + Cgroup: json["Cgroup"] == null ? undefined : json["Cgroup"], + Links: json["Links"] == null ? undefined : json["Links"], + OomScoreAdj: json["OomScoreAdj"] == null ? undefined : json["OomScoreAdj"], + PidMode: json["PidMode"] == null ? undefined : json["PidMode"], + Privileged: json["Privileged"] == null ? undefined : json["Privileged"], + PublishAllPorts: json["PublishAllPorts"] == null ? undefined : json["PublishAllPorts"], + ReadonlyRootfs: json["ReadonlyRootfs"] == null ? undefined : json["ReadonlyRootfs"], + SecurityOpt: json["SecurityOpt"] == null ? undefined : json["SecurityOpt"], + StorageOpt: json["StorageOpt"] == null ? undefined : json["StorageOpt"], + Tmpfs: json["Tmpfs"] == null ? undefined : json["Tmpfs"], + UTSMode: json["UTSMode"] == null ? undefined : json["UTSMode"], + UsernsMode: json["UsernsMode"] == null ? undefined : json["UsernsMode"], + ShmSize: json["ShmSize"] == null ? undefined : json["ShmSize"], + Sysctls: json["Sysctls"] == null ? undefined : json["Sysctls"], + Runtime: json["Runtime"] == null ? undefined : json["Runtime"], + Isolation: json["Isolation"] == null ? undefined : json["Isolation"], + MaskedPaths: json["MaskedPaths"] == null ? undefined : json["MaskedPaths"], + ReadonlyPaths: json["ReadonlyPaths"] == null ? undefined : json["ReadonlyPaths"], + }; } export function HostConfigToJSON(json: any): HostConfig { - return HostConfigToJSONTyped(json, false); + return HostConfigToJSONTyped(json, false); } -export function HostConfigToJSONTyped(value?: HostConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HostConfigToJSONTyped( + value?: HostConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CpuShares': value['CpuShares'], - 'Memory': value['Memory'], - 'CgroupParent': value['CgroupParent'], - 'BlkioWeight': value['BlkioWeight'], - 'BlkioWeightDevice': value['BlkioWeightDevice'] == null ? undefined : ((value['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON)), - 'BlkioDeviceReadBps': value['BlkioDeviceReadBps'] == null ? undefined : ((value['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceWriteBps': value['BlkioDeviceWriteBps'] == null ? undefined : ((value['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceReadIOps': value['BlkioDeviceReadIOps'] == null ? undefined : ((value['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceWriteIOps': value['BlkioDeviceWriteIOps'] == null ? undefined : ((value['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceToJSON)), - 'CpuPeriod': value['CpuPeriod'], - 'CpuQuota': value['CpuQuota'], - 'CpuRealtimePeriod': value['CpuRealtimePeriod'], - 'CpuRealtimeRuntime': value['CpuRealtimeRuntime'], - 'CpusetCpus': value['CpusetCpus'], - 'CpusetMems': value['CpusetMems'], - 'Devices': value['Devices'] == null ? undefined : ((value['Devices'] as Array).map(DeviceMappingToJSON)), - 'DeviceCgroupRules': value['DeviceCgroupRules'], - 'DeviceRequests': value['DeviceRequests'] == null ? undefined : ((value['DeviceRequests'] as Array).map(DeviceRequestToJSON)), - 'KernelMemoryTCP': value['KernelMemoryTCP'], - 'MemoryReservation': value['MemoryReservation'], - 'MemorySwap': value['MemorySwap'], - 'MemorySwappiness': value['MemorySwappiness'], - 'NanoCpus': value['NanoCpus'], - 'OomKillDisable': value['OomKillDisable'], - 'Init': value['Init'], - 'PidsLimit': value['PidsLimit'], - 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), - 'CpuCount': value['CpuCount'], - 'CpuPercent': value['CpuPercent'], - 'IOMaximumIOps': value['IOMaximumIOps'], - 'IOMaximumBandwidth': value['IOMaximumBandwidth'], - 'Binds': value['Binds'], - 'ContainerIDFile': value['ContainerIDFile'], - 'LogConfig': HostConfigAllOfLogConfigToJSON(value['LogConfig']), - 'NetworkMode': value['NetworkMode'], - 'PortBindings': value['PortBindings'], - 'RestartPolicy': RestartPolicyToJSON(value['RestartPolicy']), - 'AutoRemove': value['AutoRemove'], - 'VolumeDriver': value['VolumeDriver'], - 'VolumesFrom': value['VolumesFrom'], - 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountToJSON)), - 'ConsoleSize': value['ConsoleSize'], - 'Annotations': value['Annotations'], - 'CapAdd': value['CapAdd'], - 'CapDrop': value['CapDrop'], - 'CgroupnsMode': value['CgroupnsMode'], - 'Dns': value['Dns'], - 'DnsOptions': value['DnsOptions'], - 'DnsSearch': value['DnsSearch'], - 'ExtraHosts': value['ExtraHosts'], - 'GroupAdd': value['GroupAdd'], - 'IpcMode': value['IpcMode'], - 'Cgroup': value['Cgroup'], - 'Links': value['Links'], - 'OomScoreAdj': value['OomScoreAdj'], - 'PidMode': value['PidMode'], - 'Privileged': value['Privileged'], - 'PublishAllPorts': value['PublishAllPorts'], - 'ReadonlyRootfs': value['ReadonlyRootfs'], - 'SecurityOpt': value['SecurityOpt'], - 'StorageOpt': value['StorageOpt'], - 'Tmpfs': value['Tmpfs'], - 'UTSMode': value['UTSMode'], - 'UsernsMode': value['UsernsMode'], - 'ShmSize': value['ShmSize'], - 'Sysctls': value['Sysctls'], - 'Runtime': value['Runtime'], - 'Isolation': value['Isolation'], - 'MaskedPaths': value['MaskedPaths'], - 'ReadonlyPaths': value['ReadonlyPaths'], - }; + return { + CpuShares: value["CpuShares"], + Memory: value["Memory"], + CgroupParent: value["CgroupParent"], + BlkioWeight: value["BlkioWeight"], + BlkioWeightDevice: + value["BlkioWeightDevice"] == null + ? undefined + : (value["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON), + BlkioDeviceReadBps: + value["BlkioDeviceReadBps"] == null + ? undefined + : (value["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceWriteBps: + value["BlkioDeviceWriteBps"] == null + ? undefined + : (value["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceReadIOps: + value["BlkioDeviceReadIOps"] == null + ? undefined + : (value["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceWriteIOps: + value["BlkioDeviceWriteIOps"] == null + ? undefined + : (value["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceToJSON), + CpuPeriod: value["CpuPeriod"], + CpuQuota: value["CpuQuota"], + CpuRealtimePeriod: value["CpuRealtimePeriod"], + CpuRealtimeRuntime: value["CpuRealtimeRuntime"], + CpusetCpus: value["CpusetCpus"], + CpusetMems: value["CpusetMems"], + Devices: + value["Devices"] == null + ? undefined + : (value["Devices"] as Array).map(DeviceMappingToJSON), + DeviceCgroupRules: value["DeviceCgroupRules"], + DeviceRequests: + value["DeviceRequests"] == null + ? undefined + : (value["DeviceRequests"] as Array).map(DeviceRequestToJSON), + KernelMemoryTCP: value["KernelMemoryTCP"], + MemoryReservation: value["MemoryReservation"], + MemorySwap: value["MemorySwap"], + MemorySwappiness: value["MemorySwappiness"], + NanoCpus: value["NanoCpus"], + OomKillDisable: value["OomKillDisable"], + Init: value["Init"], + PidsLimit: value["PidsLimit"], + Ulimits: + value["Ulimits"] == null + ? undefined + : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), + CpuCount: value["CpuCount"], + CpuPercent: value["CpuPercent"], + IOMaximumIOps: value["IOMaximumIOps"], + IOMaximumBandwidth: value["IOMaximumBandwidth"], + Binds: value["Binds"], + ContainerIDFile: value["ContainerIDFile"], + LogConfig: HostConfigAllOfLogConfigToJSON(value["LogConfig"]), + NetworkMode: value["NetworkMode"], + PortBindings: value["PortBindings"], + RestartPolicy: RestartPolicyToJSON(value["RestartPolicy"]), + AutoRemove: value["AutoRemove"], + VolumeDriver: value["VolumeDriver"], + VolumesFrom: value["VolumesFrom"], + Mounts: value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountToJSON), + ConsoleSize: value["ConsoleSize"], + Annotations: value["Annotations"], + CapAdd: value["CapAdd"], + CapDrop: value["CapDrop"], + CgroupnsMode: value["CgroupnsMode"], + Dns: value["Dns"], + DnsOptions: value["DnsOptions"], + DnsSearch: value["DnsSearch"], + ExtraHosts: value["ExtraHosts"], + GroupAdd: value["GroupAdd"], + IpcMode: value["IpcMode"], + Cgroup: value["Cgroup"], + Links: value["Links"], + OomScoreAdj: value["OomScoreAdj"], + PidMode: value["PidMode"], + Privileged: value["Privileged"], + PublishAllPorts: value["PublishAllPorts"], + ReadonlyRootfs: value["ReadonlyRootfs"], + SecurityOpt: value["SecurityOpt"], + StorageOpt: value["StorageOpt"], + Tmpfs: value["Tmpfs"], + UTSMode: value["UTSMode"], + UsernsMode: value["UsernsMode"], + ShmSize: value["ShmSize"], + Sysctls: value["Sysctls"], + Runtime: value["Runtime"], + Isolation: value["Isolation"], + MaskedPaths: value["MaskedPaths"], + ReadonlyPaths: value["ReadonlyPaths"], + }; } - diff --git a/src/clients/docker/models/HostConfigAllOfLogConfig.ts b/src/clients/docker/models/HostConfigAllOfLogConfig.ts index 844c28ab28..2920abb0cd 100644 --- a/src/clients/docker/models/HostConfigAllOfLogConfig.ts +++ b/src/clients/docker/models/HostConfigAllOfLogConfig.ts @@ -2,89 +2,93 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The logging configuration for this container * @export * @interface HostConfigAllOfLogConfig */ export interface HostConfigAllOfLogConfig { - /** - * - * @type {string} - * @memberof HostConfigAllOfLogConfig - */ - Type?: HostConfigAllOfLogConfigTypeEnum; - /** - * - * @type {{ [key: string]: string; }} - * @memberof HostConfigAllOfLogConfig - */ - Config?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof HostConfigAllOfLogConfig + */ + Type?: HostConfigAllOfLogConfigTypeEnum; + /** + * + * @type {{ [key: string]: string; }} + * @memberof HostConfigAllOfLogConfig + */ + Config?: { [key: string]: string }; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum HostConfigAllOfLogConfigTypeEnum { - JsonFile = 'json-file', - Syslog = 'syslog', - Journald = 'journald', - Gelf = 'gelf', - Fluentd = 'fluentd', - Awslogs = 'awslogs', - Splunk = 'splunk', - Etwlogs = 'etwlogs', - None = 'none' + JsonFile = "json-file", + Syslog = "syslog", + Journald = "journald", + Gelf = "gelf", + Fluentd = "fluentd", + Awslogs = "awslogs", + Splunk = "splunk", + Etwlogs = "etwlogs", + None = "none", } - /** * Check if a given object implements the HostConfigAllOfLogConfig interface. */ -export function instanceOfHostConfigAllOfLogConfig(value: object): value is HostConfigAllOfLogConfig { - return true; +export function instanceOfHostConfigAllOfLogConfig( + value: object, +): value is HostConfigAllOfLogConfig { + return true; } export function HostConfigAllOfLogConfigFromJSON(json: any): HostConfigAllOfLogConfig { - return HostConfigAllOfLogConfigFromJSONTyped(json, false); + return HostConfigAllOfLogConfigFromJSONTyped(json, false); } -export function HostConfigAllOfLogConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): HostConfigAllOfLogConfig { - if (json == null) { - return json; - } - return { - - 'Type': json['Type'] == null ? undefined : json['Type'], - 'Config': json['Config'] == null ? undefined : json['Config'], - }; +export function HostConfigAllOfLogConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): HostConfigAllOfLogConfig { + if (json == null) { + return json; + } + return { + Type: json["Type"] == null ? undefined : json["Type"], + Config: json["Config"] == null ? undefined : json["Config"], + }; } export function HostConfigAllOfLogConfigToJSON(json: any): HostConfigAllOfLogConfig { - return HostConfigAllOfLogConfigToJSONTyped(json, false); + return HostConfigAllOfLogConfigToJSONTyped(json, false); } -export function HostConfigAllOfLogConfigToJSONTyped(value?: HostConfigAllOfLogConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HostConfigAllOfLogConfigToJSONTyped( + value?: HostConfigAllOfLogConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Type': value['Type'], - 'Config': value['Config'], - }; + return { + Type: value["Type"], + Config: value["Config"], + }; } - diff --git a/src/clients/docker/models/IPAM.ts b/src/clients/docker/models/IPAM.ts index 3d2d006e18..48a23340c4 100644 --- a/src/clients/docker/models/IPAM.ts +++ b/src/clients/docker/models/IPAM.ts @@ -2,93 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { IPAMConfig } from './IPAMConfig'; +import { mapValues } from "../runtime"; +import type { IPAMConfig } from "./IPAMConfig"; import { - IPAMConfigFromJSON, - IPAMConfigFromJSONTyped, - IPAMConfigToJSON, - IPAMConfigToJSONTyped, -} from './IPAMConfig'; + IPAMConfigFromJSON, + IPAMConfigFromJSONTyped, + IPAMConfigToJSON, + IPAMConfigToJSONTyped, +} from "./IPAMConfig"; /** - * + * * @export * @interface IPAM */ export interface IPAM { - /** - * Name of the IPAM driver to use. - * @type {string} - * @memberof IPAM - */ - Driver?: string; - /** - * List of IPAM configuration options, specified as a map: - * - * ``` - * {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } - * ``` - * - * @type {Array} - * @memberof IPAM - */ - Config?: Array; - /** - * Driver-specific options, specified as a map. - * @type {{ [key: string]: string; }} - * @memberof IPAM - */ - Options?: { [key: string]: string; }; + /** + * Name of the IPAM driver to use. + * @type {string} + * @memberof IPAM + */ + Driver?: string; + /** + * List of IPAM configuration options, specified as a map: + * + * ``` + * {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + * ``` + * + * @type {Array} + * @memberof IPAM + */ + Config?: Array; + /** + * Driver-specific options, specified as a map. + * @type {{ [key: string]: string; }} + * @memberof IPAM + */ + Options?: { [key: string]: string }; } /** * Check if a given object implements the IPAM interface. */ export function instanceOfIPAM(value: object): value is IPAM { - return true; + return true; } export function IPAMFromJSON(json: any): IPAM { - return IPAMFromJSONTyped(json, false); + return IPAMFromJSONTyped(json, false); } export function IPAMFromJSONTyped(json: any, ignoreDiscriminator: boolean): IPAM { - if (json == null) { - return json; - } - return { - - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'Config': json['Config'] == null ? undefined : ((json['Config'] as Array).map(IPAMConfigFromJSON)), - 'Options': json['Options'] == null ? undefined : json['Options'], - }; + if (json == null) { + return json; + } + return { + Driver: json["Driver"] == null ? undefined : json["Driver"], + Config: + json["Config"] == null ? undefined : (json["Config"] as Array).map(IPAMConfigFromJSON), + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function IPAMToJSON(json: any): IPAM { - return IPAMToJSONTyped(json, false); + return IPAMToJSONTyped(json, false); } export function IPAMToJSONTyped(value?: IPAM | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'Driver': value['Driver'], - 'Config': value['Config'] == null ? undefined : ((value['Config'] as Array).map(IPAMConfigToJSON)), - 'Options': value['Options'], - }; + return { + Driver: value["Driver"], + Config: + value["Config"] == null ? undefined : (value["Config"] as Array).map(IPAMConfigToJSON), + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/IPAMConfig.ts b/src/clients/docker/models/IPAMConfig.ts index dbd2370381..33baf95761 100644 --- a/src/clients/docker/models/IPAMConfig.ts +++ b/src/clients/docker/models/IPAMConfig.ts @@ -2,88 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface IPAMConfig */ export interface IPAMConfig { - /** - * - * @type {string} - * @memberof IPAMConfig - */ - Subnet?: string; - /** - * - * @type {string} - * @memberof IPAMConfig - */ - IPRange?: string; - /** - * - * @type {string} - * @memberof IPAMConfig - */ - Gateway?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof IPAMConfig - */ - AuxiliaryAddresses?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof IPAMConfig + */ + Subnet?: string; + /** + * + * @type {string} + * @memberof IPAMConfig + */ + IPRange?: string; + /** + * + * @type {string} + * @memberof IPAMConfig + */ + Gateway?: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof IPAMConfig + */ + AuxiliaryAddresses?: { [key: string]: string }; } /** * Check if a given object implements the IPAMConfig interface. */ export function instanceOfIPAMConfig(value: object): value is IPAMConfig { - return true; + return true; } export function IPAMConfigFromJSON(json: any): IPAMConfig { - return IPAMConfigFromJSONTyped(json, false); + return IPAMConfigFromJSONTyped(json, false); } export function IPAMConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): IPAMConfig { - if (json == null) { - return json; - } - return { - - 'Subnet': json['Subnet'] == null ? undefined : json['Subnet'], - 'IPRange': json['IPRange'] == null ? undefined : json['IPRange'], - 'Gateway': json['Gateway'] == null ? undefined : json['Gateway'], - 'AuxiliaryAddresses': json['AuxiliaryAddresses'] == null ? undefined : json['AuxiliaryAddresses'], - }; + if (json == null) { + return json; + } + return { + Subnet: json["Subnet"] == null ? undefined : json["Subnet"], + IPRange: json["IPRange"] == null ? undefined : json["IPRange"], + Gateway: json["Gateway"] == null ? undefined : json["Gateway"], + AuxiliaryAddresses: json["AuxiliaryAddresses"] == null ? undefined : json["AuxiliaryAddresses"], + }; } export function IPAMConfigToJSON(json: any): IPAMConfig { - return IPAMConfigToJSONTyped(json, false); + return IPAMConfigToJSONTyped(json, false); } -export function IPAMConfigToJSONTyped(value?: IPAMConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function IPAMConfigToJSONTyped( + value?: IPAMConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Subnet': value['Subnet'], - 'IPRange': value['IPRange'], - 'Gateway': value['Gateway'], - 'AuxiliaryAddresses': value['AuxiliaryAddresses'], - }; + return { + Subnet: value["Subnet"], + IPRange: value["IPRange"], + Gateway: value["Gateway"], + AuxiliaryAddresses: value["AuxiliaryAddresses"], + }; } - diff --git a/src/clients/docker/models/IdResponse.ts b/src/clients/docker/models/IdResponse.ts index 3ead8659ec..9e5940198c 100644 --- a/src/clients/docker/models/IdResponse.ts +++ b/src/clients/docker/models/IdResponse.ts @@ -2,65 +2,65 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Response to an API call that returns just an Id * @export * @interface IdResponse */ export interface IdResponse { - /** - * The id of the newly created object. - * @type {string} - * @memberof IdResponse - */ - Id: string; + /** + * The id of the newly created object. + * @type {string} + * @memberof IdResponse + */ + Id: string; } /** * Check if a given object implements the IdResponse interface. */ export function instanceOfIdResponse(value: object): value is IdResponse { - if (!('Id' in value) || value['Id'] === undefined) return false; - return true; + if (!("Id" in value) || value["Id"] === undefined) return false; + return true; } export function IdResponseFromJSON(json: any): IdResponse { - return IdResponseFromJSONTyped(json, false); + return IdResponseFromJSONTyped(json, false); } export function IdResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdResponse { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'], - }; + if (json == null) { + return json; + } + return { + Id: json["Id"], + }; } export function IdResponseToJSON(json: any): IdResponse { - return IdResponseToJSONTyped(json, false); + return IdResponseToJSONTyped(json, false); } -export function IdResponseToJSONTyped(value?: IdResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function IdResponseToJSONTyped( + value?: IdResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - }; + return { + Id: value["Id"], + }; } - diff --git a/src/clients/docker/models/ImageConfig.ts b/src/clients/docker/models/ImageConfig.ts index 8bbda29312..05ba313a0a 100644 --- a/src/clients/docker/models/ImageConfig.ts +++ b/src/clients/docker/models/ImageConfig.ts @@ -2,344 +2,345 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { HealthConfig } from './HealthConfig'; +import { mapValues } from "../runtime"; +import type { HealthConfig } from "./HealthConfig"; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from './HealthConfig'; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from "./HealthConfig"; /** * Configuration of the image. These fields are used as defaults * when starting a container from the image. - * + * * @export * @interface ImageConfig */ export interface ImageConfig { - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - *


- * - * > **Note**: this field is always empty and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - Hostname?: string; - /** - * The domain name to use for the container. - * - *


- * - * > **Note**: this field is always empty and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - Domainname?: string; - /** - * The user that commands are run as inside the container. - * @type {string} - * @memberof ImageConfig - */ - User?: string; - /** - * Whether to attach to `stdin`. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - AttachStdin?: boolean; - /** - * Whether to attach to `stdout`. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - AttachStdout?: boolean; - /** - * Whether to attach to `stderr`. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - AttachStderr?: boolean; - /** - * An object mapping ports to an empty object in the form: - * - * `{"/": {}}` - * - * @type {{ [key: string]: object; }} - * @memberof ImageConfig - */ - ExposedPorts?: { [key: string]: object; } | null; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - Tty?: boolean; - /** - * Open `stdin` - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - OpenStdin?: boolean; - /** - * Close `stdin` after one attached client disconnects. - * - *


- * - * > **Note**: this field is always false and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - StdinOnce?: boolean; - /** - * A list of environment variables to set inside the container in the - * form `["VAR=value", ...]`. A variable without `=` is removed from the - * environment, rather than to have an empty value. - * - * @type {Array} - * @memberof ImageConfig - */ - Env?: Array; - /** - * Command to run specified as a string or an array of strings. - * - * @type {Array} - * @memberof ImageConfig - */ - Cmd?: Array; - /** - * - * @type {HealthConfig} - * @memberof ImageConfig - */ - Healthcheck?: HealthConfig; - /** - * Command is already escaped (Windows only) - * @type {boolean} - * @memberof ImageConfig - */ - ArgsEscaped?: boolean | null; - /** - * The name (or reference) of the image to use when creating the container, - * or which was used when the container was created. - * - *


- * - * > **Note**: this field is always empty and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - Image?: string; - /** - * An object mapping mount point paths inside the container to empty - * objects. - * - * @type {{ [key: string]: object; }} - * @memberof ImageConfig - */ - Volumes?: { [key: string]: object; }; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof ImageConfig - */ - WorkingDir?: string; - /** - * The entry point for the container as a string or an array of strings. - * - * If the array consists of exactly one empty string (`[""]`) then the - * entry point is reset to system default (i.e., the entry point used by - * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - * - * @type {Array} - * @memberof ImageConfig - */ - Entrypoint?: Array; - /** - * Disable networking for the container. - * - *


- * - * > **Note**: this field is always omitted and must not be used. - * - * @type {boolean} - * @memberof ImageConfig - */ - NetworkDisabled?: boolean | null; - /** - * MAC address of the container. - * - *


- * - * > **Note**: this field is always omitted and must not be used. - * - * @type {string} - * @memberof ImageConfig - */ - MacAddress?: string | null; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @type {Array} - * @memberof ImageConfig - */ - OnBuild?: Array | null; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ImageConfig - */ - Labels?: { [key: string]: string; }; - /** - * Signal to stop a container as a string or unsigned integer. - * - * @type {string} - * @memberof ImageConfig - */ - StopSignal?: string | null; - /** - * Timeout to stop a container in seconds. - * - *


- * - * > **Note**: this field is always omitted and must not be used. - * - * @type {number} - * @memberof ImageConfig - */ - StopTimeout?: number | null; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @type {Array} - * @memberof ImageConfig - */ - Shell?: Array | null; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + *


+ * + * > **Note**: this field is always empty and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + Hostname?: string; + /** + * The domain name to use for the container. + * + *


+ * + * > **Note**: this field is always empty and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + Domainname?: string; + /** + * The user that commands are run as inside the container. + * @type {string} + * @memberof ImageConfig + */ + User?: string; + /** + * Whether to attach to `stdin`. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + AttachStdin?: boolean; + /** + * Whether to attach to `stdout`. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + AttachStdout?: boolean; + /** + * Whether to attach to `stderr`. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + AttachStderr?: boolean; + /** + * An object mapping ports to an empty object in the form: + * + * `{"/": {}}` + * + * @type {{ [key: string]: object; }} + * @memberof ImageConfig + */ + ExposedPorts?: { [key: string]: object } | null; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + Tty?: boolean; + /** + * Open `stdin` + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + OpenStdin?: boolean; + /** + * Close `stdin` after one attached client disconnects. + * + *


+ * + * > **Note**: this field is always false and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + StdinOnce?: boolean; + /** + * A list of environment variables to set inside the container in the + * form `["VAR=value", ...]`. A variable without `=` is removed from the + * environment, rather than to have an empty value. + * + * @type {Array} + * @memberof ImageConfig + */ + Env?: Array; + /** + * Command to run specified as a string or an array of strings. + * + * @type {Array} + * @memberof ImageConfig + */ + Cmd?: Array; + /** + * + * @type {HealthConfig} + * @memberof ImageConfig + */ + Healthcheck?: HealthConfig; + /** + * Command is already escaped (Windows only) + * @type {boolean} + * @memberof ImageConfig + */ + ArgsEscaped?: boolean | null; + /** + * The name (or reference) of the image to use when creating the container, + * or which was used when the container was created. + * + *


+ * + * > **Note**: this field is always empty and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + Image?: string; + /** + * An object mapping mount point paths inside the container to empty + * objects. + * + * @type {{ [key: string]: object; }} + * @memberof ImageConfig + */ + Volumes?: { [key: string]: object }; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof ImageConfig + */ + WorkingDir?: string; + /** + * The entry point for the container as a string or an array of strings. + * + * If the array consists of exactly one empty string (`[""]`) then the + * entry point is reset to system default (i.e., the entry point used by + * docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + * + * @type {Array} + * @memberof ImageConfig + */ + Entrypoint?: Array; + /** + * Disable networking for the container. + * + *


+ * + * > **Note**: this field is always omitted and must not be used. + * + * @type {boolean} + * @memberof ImageConfig + */ + NetworkDisabled?: boolean | null; + /** + * MAC address of the container. + * + *


+ * + * > **Note**: this field is always omitted and must not be used. + * + * @type {string} + * @memberof ImageConfig + */ + MacAddress?: string | null; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @type {Array} + * @memberof ImageConfig + */ + OnBuild?: Array | null; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ImageConfig + */ + Labels?: { [key: string]: string }; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @type {string} + * @memberof ImageConfig + */ + StopSignal?: string | null; + /** + * Timeout to stop a container in seconds. + * + *


+ * + * > **Note**: this field is always omitted and must not be used. + * + * @type {number} + * @memberof ImageConfig + */ + StopTimeout?: number | null; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @type {Array} + * @memberof ImageConfig + */ + Shell?: Array | null; } /** * Check if a given object implements the ImageConfig interface. */ export function instanceOfImageConfig(value: object): value is ImageConfig { - return true; + return true; } export function ImageConfigFromJSON(json: any): ImageConfig { - return ImageConfigFromJSONTyped(json, false); + return ImageConfigFromJSONTyped(json, false); } export function ImageConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageConfig { - if (json == null) { - return json; - } - return { - - 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], - 'Domainname': json['Domainname'] == null ? undefined : json['Domainname'], - 'User': json['User'] == null ? undefined : json['User'], - 'AttachStdin': json['AttachStdin'] == null ? undefined : json['AttachStdin'], - 'AttachStdout': json['AttachStdout'] == null ? undefined : json['AttachStdout'], - 'AttachStderr': json['AttachStderr'] == null ? undefined : json['AttachStderr'], - 'ExposedPorts': json['ExposedPorts'] == null ? undefined : json['ExposedPorts'], - 'Tty': json['Tty'] == null ? undefined : json['Tty'], - 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], - 'StdinOnce': json['StdinOnce'] == null ? undefined : json['StdinOnce'], - 'Env': json['Env'] == null ? undefined : json['Env'], - 'Cmd': json['Cmd'] == null ? undefined : json['Cmd'], - 'Healthcheck': json['Healthcheck'] == null ? undefined : HealthConfigFromJSON(json['Healthcheck']), - 'ArgsEscaped': json['ArgsEscaped'] == null ? undefined : json['ArgsEscaped'], - 'Image': json['Image'] == null ? undefined : json['Image'], - 'Volumes': json['Volumes'] == null ? undefined : json['Volumes'], - 'WorkingDir': json['WorkingDir'] == null ? undefined : json['WorkingDir'], - 'Entrypoint': json['Entrypoint'] == null ? undefined : json['Entrypoint'], - 'NetworkDisabled': json['NetworkDisabled'] == null ? undefined : json['NetworkDisabled'], - 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], - 'OnBuild': json['OnBuild'] == null ? undefined : json['OnBuild'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], - 'StopTimeout': json['StopTimeout'] == null ? undefined : json['StopTimeout'], - 'Shell': json['Shell'] == null ? undefined : json['Shell'], - }; + if (json == null) { + return json; + } + return { + Hostname: json["Hostname"] == null ? undefined : json["Hostname"], + Domainname: json["Domainname"] == null ? undefined : json["Domainname"], + User: json["User"] == null ? undefined : json["User"], + AttachStdin: json["AttachStdin"] == null ? undefined : json["AttachStdin"], + AttachStdout: json["AttachStdout"] == null ? undefined : json["AttachStdout"], + AttachStderr: json["AttachStderr"] == null ? undefined : json["AttachStderr"], + ExposedPorts: json["ExposedPorts"] == null ? undefined : json["ExposedPorts"], + Tty: json["Tty"] == null ? undefined : json["Tty"], + OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], + StdinOnce: json["StdinOnce"] == null ? undefined : json["StdinOnce"], + Env: json["Env"] == null ? undefined : json["Env"], + Cmd: json["Cmd"] == null ? undefined : json["Cmd"], + Healthcheck: + json["Healthcheck"] == null ? undefined : HealthConfigFromJSON(json["Healthcheck"]), + ArgsEscaped: json["ArgsEscaped"] == null ? undefined : json["ArgsEscaped"], + Image: json["Image"] == null ? undefined : json["Image"], + Volumes: json["Volumes"] == null ? undefined : json["Volumes"], + WorkingDir: json["WorkingDir"] == null ? undefined : json["WorkingDir"], + Entrypoint: json["Entrypoint"] == null ? undefined : json["Entrypoint"], + NetworkDisabled: json["NetworkDisabled"] == null ? undefined : json["NetworkDisabled"], + MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], + OnBuild: json["OnBuild"] == null ? undefined : json["OnBuild"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], + StopTimeout: json["StopTimeout"] == null ? undefined : json["StopTimeout"], + Shell: json["Shell"] == null ? undefined : json["Shell"], + }; } export function ImageConfigToJSON(json: any): ImageConfig { - return ImageConfigToJSONTyped(json, false); + return ImageConfigToJSONTyped(json, false); } -export function ImageConfigToJSONTyped(value?: ImageConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageConfigToJSONTyped( + value?: ImageConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Hostname': value['Hostname'], - 'Domainname': value['Domainname'], - 'User': value['User'], - 'AttachStdin': value['AttachStdin'], - 'AttachStdout': value['AttachStdout'], - 'AttachStderr': value['AttachStderr'], - 'ExposedPorts': value['ExposedPorts'], - 'Tty': value['Tty'], - 'OpenStdin': value['OpenStdin'], - 'StdinOnce': value['StdinOnce'], - 'Env': value['Env'], - 'Cmd': value['Cmd'], - 'Healthcheck': HealthConfigToJSON(value['Healthcheck']), - 'ArgsEscaped': value['ArgsEscaped'], - 'Image': value['Image'], - 'Volumes': value['Volumes'], - 'WorkingDir': value['WorkingDir'], - 'Entrypoint': value['Entrypoint'], - 'NetworkDisabled': value['NetworkDisabled'], - 'MacAddress': value['MacAddress'], - 'OnBuild': value['OnBuild'], - 'Labels': value['Labels'], - 'StopSignal': value['StopSignal'], - 'StopTimeout': value['StopTimeout'], - 'Shell': value['Shell'], - }; + return { + Hostname: value["Hostname"], + Domainname: value["Domainname"], + User: value["User"], + AttachStdin: value["AttachStdin"], + AttachStdout: value["AttachStdout"], + AttachStderr: value["AttachStderr"], + ExposedPorts: value["ExposedPorts"], + Tty: value["Tty"], + OpenStdin: value["OpenStdin"], + StdinOnce: value["StdinOnce"], + Env: value["Env"], + Cmd: value["Cmd"], + Healthcheck: HealthConfigToJSON(value["Healthcheck"]), + ArgsEscaped: value["ArgsEscaped"], + Image: value["Image"], + Volumes: value["Volumes"], + WorkingDir: value["WorkingDir"], + Entrypoint: value["Entrypoint"], + NetworkDisabled: value["NetworkDisabled"], + MacAddress: value["MacAddress"], + OnBuild: value["OnBuild"], + Labels: value["Labels"], + StopSignal: value["StopSignal"], + StopTimeout: value["StopTimeout"], + Shell: value["Shell"], + }; } - diff --git a/src/clients/docker/models/ImageDeleteResponseItem.ts b/src/clients/docker/models/ImageDeleteResponseItem.ts index 8728653249..2dcf716e63 100644 --- a/src/clients/docker/models/ImageDeleteResponseItem.ts +++ b/src/clients/docker/models/ImageDeleteResponseItem.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ImageDeleteResponseItem */ export interface ImageDeleteResponseItem { - /** - * The image ID of an image that was untagged - * @type {string} - * @memberof ImageDeleteResponseItem - */ - Untagged?: string; - /** - * The image ID of an image that was deleted - * @type {string} - * @memberof ImageDeleteResponseItem - */ - Deleted?: string; + /** + * The image ID of an image that was untagged + * @type {string} + * @memberof ImageDeleteResponseItem + */ + Untagged?: string; + /** + * The image ID of an image that was deleted + * @type {string} + * @memberof ImageDeleteResponseItem + */ + Deleted?: string; } /** * Check if a given object implements the ImageDeleteResponseItem interface. */ export function instanceOfImageDeleteResponseItem(value: object): value is ImageDeleteResponseItem { - return true; + return true; } export function ImageDeleteResponseItemFromJSON(json: any): ImageDeleteResponseItem { - return ImageDeleteResponseItemFromJSONTyped(json, false); + return ImageDeleteResponseItemFromJSONTyped(json, false); } -export function ImageDeleteResponseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageDeleteResponseItem { - if (json == null) { - return json; - } - return { - - 'Untagged': json['Untagged'] == null ? undefined : json['Untagged'], - 'Deleted': json['Deleted'] == null ? undefined : json['Deleted'], - }; +export function ImageDeleteResponseItemFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ImageDeleteResponseItem { + if (json == null) { + return json; + } + return { + Untagged: json["Untagged"] == null ? undefined : json["Untagged"], + Deleted: json["Deleted"] == null ? undefined : json["Deleted"], + }; } export function ImageDeleteResponseItemToJSON(json: any): ImageDeleteResponseItem { - return ImageDeleteResponseItemToJSONTyped(json, false); + return ImageDeleteResponseItemToJSONTyped(json, false); } -export function ImageDeleteResponseItemToJSONTyped(value?: ImageDeleteResponseItem | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageDeleteResponseItemToJSONTyped( + value?: ImageDeleteResponseItem | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Untagged': value['Untagged'], - 'Deleted': value['Deleted'], - }; + return { + Untagged: value["Untagged"], + Deleted: value["Deleted"], + }; } - diff --git a/src/clients/docker/models/ImageID.ts b/src/clients/docker/models/ImageID.ts index 8fd5272ebf..b2d2548a21 100644 --- a/src/clients/docker/models/ImageID.ts +++ b/src/clients/docker/models/ImageID.ts @@ -2,64 +2,64 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Image ID or Digest * @export * @interface ImageID */ export interface ImageID { - /** - * - * @type {string} - * @memberof ImageID - */ - ID?: string; + /** + * + * @type {string} + * @memberof ImageID + */ + ID?: string; } /** * Check if a given object implements the ImageID interface. */ export function instanceOfImageID(value: object): value is ImageID { - return true; + return true; } export function ImageIDFromJSON(json: any): ImageID { - return ImageIDFromJSONTyped(json, false); + return ImageIDFromJSONTyped(json, false); } export function ImageIDFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageID { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + }; } export function ImageIDToJSON(json: any): ImageID { - return ImageIDToJSONTyped(json, false); + return ImageIDToJSONTyped(json, false); } -export function ImageIDToJSONTyped(value?: ImageID | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageIDToJSONTyped( + value?: ImageID | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - }; + return { + ID: value["ID"], + }; } - diff --git a/src/clients/docker/models/ImageInspect.ts b/src/clients/docker/models/ImageInspect.ts index daa911dd94..212b30c198 100644 --- a/src/clients/docker/models/ImageInspect.ts +++ b/src/clients/docker/models/ImageInspect.ts @@ -2,305 +2,309 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ContainerConfig } from './ContainerConfig'; +import { mapValues } from "../runtime"; +import type { ContainerConfig } from "./ContainerConfig"; import { - ContainerConfigFromJSON, - ContainerConfigFromJSONTyped, - ContainerConfigToJSON, - ContainerConfigToJSONTyped, -} from './ContainerConfig'; -import type { ImageConfig } from './ImageConfig'; + ContainerConfigFromJSON, + ContainerConfigFromJSONTyped, + ContainerConfigToJSON, + ContainerConfigToJSONTyped, +} from "./ContainerConfig"; +import type { ImageConfig } from "./ImageConfig"; import { - ImageConfigFromJSON, - ImageConfigFromJSONTyped, - ImageConfigToJSON, - ImageConfigToJSONTyped, -} from './ImageConfig'; -import type { ImageInspectMetadata } from './ImageInspectMetadata'; + ImageConfigFromJSON, + ImageConfigFromJSONTyped, + ImageConfigToJSON, + ImageConfigToJSONTyped, +} from "./ImageConfig"; +import type { ImageInspectMetadata } from "./ImageInspectMetadata"; import { - ImageInspectMetadataFromJSON, - ImageInspectMetadataFromJSONTyped, - ImageInspectMetadataToJSON, - ImageInspectMetadataToJSONTyped, -} from './ImageInspectMetadata'; -import type { ImageInspectRootFS } from './ImageInspectRootFS'; + ImageInspectMetadataFromJSON, + ImageInspectMetadataFromJSONTyped, + ImageInspectMetadataToJSON, + ImageInspectMetadataToJSONTyped, +} from "./ImageInspectMetadata"; +import type { ImageInspectRootFS } from "./ImageInspectRootFS"; import { - ImageInspectRootFSFromJSON, - ImageInspectRootFSFromJSONTyped, - ImageInspectRootFSToJSON, - ImageInspectRootFSToJSONTyped, -} from './ImageInspectRootFS'; -import type { GraphDriverData } from './GraphDriverData'; + ImageInspectRootFSFromJSON, + ImageInspectRootFSFromJSONTyped, + ImageInspectRootFSToJSON, + ImageInspectRootFSToJSONTyped, +} from "./ImageInspectRootFS"; +import type { GraphDriverData } from "./GraphDriverData"; import { - GraphDriverDataFromJSON, - GraphDriverDataFromJSONTyped, - GraphDriverDataToJSON, - GraphDriverDataToJSONTyped, -} from './GraphDriverData'; + GraphDriverDataFromJSON, + GraphDriverDataFromJSONTyped, + GraphDriverDataToJSON, + GraphDriverDataToJSONTyped, +} from "./GraphDriverData"; /** * Information about an image in the local image cache. - * + * * @export * @interface ImageInspect */ export interface ImageInspect { - /** - * ID is the content-addressable ID of an image. - * - * This identifier is a content-addressable digest calculated from the - * image's configuration (which includes the digests of layers used by - * the image). - * - * Note that this digest differs from the `RepoDigests` below, which - * holds digests of image manifests that reference the image. - * - * @type {string} - * @memberof ImageInspect - */ - Id?: string; - /** - * List of image names/tags in the local image cache that reference this - * image. - * - * Multiple image tags can refer to the same image, and this list may be - * empty if no tags reference the image, in which case the image is - * "untagged", in which case it can still be referenced by its ID. - * - * @type {Array} - * @memberof ImageInspect - */ - RepoTags?: Array; - /** - * List of content-addressable digests of locally available image manifests - * that the image is referenced from. Multiple manifests can refer to the - * same image. - * - * These digests are usually only available if the image was either pulled - * from a registry, or if the image was pushed to a registry, which is when - * the manifest is generated and its digest calculated. - * - * @type {Array} - * @memberof ImageInspect - */ - RepoDigests?: Array; - /** - * ID of the parent image. - * - * Depending on how the image was created, this field may be empty and - * is only set for images that were built/created locally. This field - * is empty if the image was pulled from an image registry. - * - * @type {string} - * @memberof ImageInspect - */ - Parent?: string; - /** - * Optional message that was set when committing or importing the image. - * - * @type {string} - * @memberof ImageInspect - */ - Comment?: string; - /** - * Date and time at which the image was created, formatted in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof ImageInspect - */ - Created?: string; - /** - * The ID of the container that was used to create the image. - * - * Depending on how the image was created, this field may be empty. - * - * @type {string} - * @memberof ImageInspect - */ - Container?: string; - /** - * - * @type {ContainerConfig} - * @memberof ImageInspect - */ - ContainerConfig?: ContainerConfig; - /** - * The version of Docker that was used to build the image. - * - * Depending on how the image was created, this field may be empty. - * - * @type {string} - * @memberof ImageInspect - */ - DockerVersion?: string; - /** - * Name of the author that was specified when committing the image, or as - * specified through MAINTAINER (deprecated) in the Dockerfile. - * - * @type {string} - * @memberof ImageInspect - */ - Author?: string; - /** - * - * @type {ImageConfig} - * @memberof ImageInspect - */ - Config?: ImageConfig; - /** - * Hardware CPU architecture that the image runs on. - * - * @type {string} - * @memberof ImageInspect - */ - Architecture?: string; - /** - * CPU architecture variant (presently ARM-only). - * - * @type {string} - * @memberof ImageInspect - */ - Variant?: string | null; - /** - * Operating System the image is built to run on. - * - * @type {string} - * @memberof ImageInspect - */ - Os?: string; - /** - * Operating System version the image is built to run on (especially - * for Windows). - * - * @type {string} - * @memberof ImageInspect - */ - OsVersion?: string | null; - /** - * Total size of the image including all layers it is composed of. - * - * @type {number} - * @memberof ImageInspect - */ - Size?: number; - /** - * Total size of the image including all layers it is composed of. - * - * In versions of Docker before v1.10, this field was calculated from - * the image itself and all of its parent images. Images are now stored - * self-contained, and no longer use a parent-chain, making this field - * an equivalent of the Size field. - * - * > **Deprecated**: this field is kept for backward compatibility, but - * > will be removed in API v1.44. - * - * @type {number} - * @memberof ImageInspect - */ - VirtualSize?: number; - /** - * - * @type {GraphDriverData} - * @memberof ImageInspect - */ - GraphDriver?: GraphDriverData; - /** - * - * @type {ImageInspectRootFS} - * @memberof ImageInspect - */ - RootFS?: ImageInspectRootFS; - /** - * - * @type {ImageInspectMetadata} - * @memberof ImageInspect - */ - Metadata?: ImageInspectMetadata; + /** + * ID is the content-addressable ID of an image. + * + * This identifier is a content-addressable digest calculated from the + * image's configuration (which includes the digests of layers used by + * the image). + * + * Note that this digest differs from the `RepoDigests` below, which + * holds digests of image manifests that reference the image. + * + * @type {string} + * @memberof ImageInspect + */ + Id?: string; + /** + * List of image names/tags in the local image cache that reference this + * image. + * + * Multiple image tags can refer to the same image, and this list may be + * empty if no tags reference the image, in which case the image is + * "untagged", in which case it can still be referenced by its ID. + * + * @type {Array} + * @memberof ImageInspect + */ + RepoTags?: Array; + /** + * List of content-addressable digests of locally available image manifests + * that the image is referenced from. Multiple manifests can refer to the + * same image. + * + * These digests are usually only available if the image was either pulled + * from a registry, or if the image was pushed to a registry, which is when + * the manifest is generated and its digest calculated. + * + * @type {Array} + * @memberof ImageInspect + */ + RepoDigests?: Array; + /** + * ID of the parent image. + * + * Depending on how the image was created, this field may be empty and + * is only set for images that were built/created locally. This field + * is empty if the image was pulled from an image registry. + * + * @type {string} + * @memberof ImageInspect + */ + Parent?: string; + /** + * Optional message that was set when committing or importing the image. + * + * @type {string} + * @memberof ImageInspect + */ + Comment?: string; + /** + * Date and time at which the image was created, formatted in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof ImageInspect + */ + Created?: string; + /** + * The ID of the container that was used to create the image. + * + * Depending on how the image was created, this field may be empty. + * + * @type {string} + * @memberof ImageInspect + */ + Container?: string; + /** + * + * @type {ContainerConfig} + * @memberof ImageInspect + */ + ContainerConfig?: ContainerConfig; + /** + * The version of Docker that was used to build the image. + * + * Depending on how the image was created, this field may be empty. + * + * @type {string} + * @memberof ImageInspect + */ + DockerVersion?: string; + /** + * Name of the author that was specified when committing the image, or as + * specified through MAINTAINER (deprecated) in the Dockerfile. + * + * @type {string} + * @memberof ImageInspect + */ + Author?: string; + /** + * + * @type {ImageConfig} + * @memberof ImageInspect + */ + Config?: ImageConfig; + /** + * Hardware CPU architecture that the image runs on. + * + * @type {string} + * @memberof ImageInspect + */ + Architecture?: string; + /** + * CPU architecture variant (presently ARM-only). + * + * @type {string} + * @memberof ImageInspect + */ + Variant?: string | null; + /** + * Operating System the image is built to run on. + * + * @type {string} + * @memberof ImageInspect + */ + Os?: string; + /** + * Operating System version the image is built to run on (especially + * for Windows). + * + * @type {string} + * @memberof ImageInspect + */ + OsVersion?: string | null; + /** + * Total size of the image including all layers it is composed of. + * + * @type {number} + * @memberof ImageInspect + */ + Size?: number; + /** + * Total size of the image including all layers it is composed of. + * + * In versions of Docker before v1.10, this field was calculated from + * the image itself and all of its parent images. Images are now stored + * self-contained, and no longer use a parent-chain, making this field + * an equivalent of the Size field. + * + * > **Deprecated**: this field is kept for backward compatibility, but + * > will be removed in API v1.44. + * + * @type {number} + * @memberof ImageInspect + */ + VirtualSize?: number; + /** + * + * @type {GraphDriverData} + * @memberof ImageInspect + */ + GraphDriver?: GraphDriverData; + /** + * + * @type {ImageInspectRootFS} + * @memberof ImageInspect + */ + RootFS?: ImageInspectRootFS; + /** + * + * @type {ImageInspectMetadata} + * @memberof ImageInspect + */ + Metadata?: ImageInspectMetadata; } /** * Check if a given object implements the ImageInspect interface. */ export function instanceOfImageInspect(value: object): value is ImageInspect { - return true; + return true; } export function ImageInspectFromJSON(json: any): ImageInspect { - return ImageInspectFromJSONTyped(json, false); + return ImageInspectFromJSONTyped(json, false); } export function ImageInspectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageInspect { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'] == null ? undefined : json['Id'], - 'RepoTags': json['RepoTags'] == null ? undefined : json['RepoTags'], - 'RepoDigests': json['RepoDigests'] == null ? undefined : json['RepoDigests'], - 'Parent': json['Parent'] == null ? undefined : json['Parent'], - 'Comment': json['Comment'] == null ? undefined : json['Comment'], - 'Created': json['Created'] == null ? undefined : json['Created'], - 'Container': json['Container'] == null ? undefined : json['Container'], - 'ContainerConfig': json['ContainerConfig'] == null ? undefined : ContainerConfigFromJSON(json['ContainerConfig']), - 'DockerVersion': json['DockerVersion'] == null ? undefined : json['DockerVersion'], - 'Author': json['Author'] == null ? undefined : json['Author'], - 'Config': json['Config'] == null ? undefined : ImageConfigFromJSON(json['Config']), - 'Architecture': json['Architecture'] == null ? undefined : json['Architecture'], - 'Variant': json['Variant'] == null ? undefined : json['Variant'], - 'Os': json['Os'] == null ? undefined : json['Os'], - 'OsVersion': json['OsVersion'] == null ? undefined : json['OsVersion'], - 'Size': json['Size'] == null ? undefined : json['Size'], - 'VirtualSize': json['VirtualSize'] == null ? undefined : json['VirtualSize'], - 'GraphDriver': json['GraphDriver'] == null ? undefined : GraphDriverDataFromJSON(json['GraphDriver']), - 'RootFS': json['RootFS'] == null ? undefined : ImageInspectRootFSFromJSON(json['RootFS']), - 'Metadata': json['Metadata'] == null ? undefined : ImageInspectMetadataFromJSON(json['Metadata']), - }; + if (json == null) { + return json; + } + return { + Id: json["Id"] == null ? undefined : json["Id"], + RepoTags: json["RepoTags"] == null ? undefined : json["RepoTags"], + RepoDigests: json["RepoDigests"] == null ? undefined : json["RepoDigests"], + Parent: json["Parent"] == null ? undefined : json["Parent"], + Comment: json["Comment"] == null ? undefined : json["Comment"], + Created: json["Created"] == null ? undefined : json["Created"], + Container: json["Container"] == null ? undefined : json["Container"], + ContainerConfig: + json["ContainerConfig"] == null + ? undefined + : ContainerConfigFromJSON(json["ContainerConfig"]), + DockerVersion: json["DockerVersion"] == null ? undefined : json["DockerVersion"], + Author: json["Author"] == null ? undefined : json["Author"], + Config: json["Config"] == null ? undefined : ImageConfigFromJSON(json["Config"]), + Architecture: json["Architecture"] == null ? undefined : json["Architecture"], + Variant: json["Variant"] == null ? undefined : json["Variant"], + Os: json["Os"] == null ? undefined : json["Os"], + OsVersion: json["OsVersion"] == null ? undefined : json["OsVersion"], + Size: json["Size"] == null ? undefined : json["Size"], + VirtualSize: json["VirtualSize"] == null ? undefined : json["VirtualSize"], + GraphDriver: + json["GraphDriver"] == null ? undefined : GraphDriverDataFromJSON(json["GraphDriver"]), + RootFS: json["RootFS"] == null ? undefined : ImageInspectRootFSFromJSON(json["RootFS"]), + Metadata: json["Metadata"] == null ? undefined : ImageInspectMetadataFromJSON(json["Metadata"]), + }; } export function ImageInspectToJSON(json: any): ImageInspect { - return ImageInspectToJSONTyped(json, false); + return ImageInspectToJSONTyped(json, false); } -export function ImageInspectToJSONTyped(value?: ImageInspect | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageInspectToJSONTyped( + value?: ImageInspect | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'RepoTags': value['RepoTags'], - 'RepoDigests': value['RepoDigests'], - 'Parent': value['Parent'], - 'Comment': value['Comment'], - 'Created': value['Created'], - 'Container': value['Container'], - 'ContainerConfig': ContainerConfigToJSON(value['ContainerConfig']), - 'DockerVersion': value['DockerVersion'], - 'Author': value['Author'], - 'Config': ImageConfigToJSON(value['Config']), - 'Architecture': value['Architecture'], - 'Variant': value['Variant'], - 'Os': value['Os'], - 'OsVersion': value['OsVersion'], - 'Size': value['Size'], - 'VirtualSize': value['VirtualSize'], - 'GraphDriver': GraphDriverDataToJSON(value['GraphDriver']), - 'RootFS': ImageInspectRootFSToJSON(value['RootFS']), - 'Metadata': ImageInspectMetadataToJSON(value['Metadata']), - }; + return { + Id: value["Id"], + RepoTags: value["RepoTags"], + RepoDigests: value["RepoDigests"], + Parent: value["Parent"], + Comment: value["Comment"], + Created: value["Created"], + Container: value["Container"], + ContainerConfig: ContainerConfigToJSON(value["ContainerConfig"]), + DockerVersion: value["DockerVersion"], + Author: value["Author"], + Config: ImageConfigToJSON(value["Config"]), + Architecture: value["Architecture"], + Variant: value["Variant"], + Os: value["Os"], + OsVersion: value["OsVersion"], + Size: value["Size"], + VirtualSize: value["VirtualSize"], + GraphDriver: GraphDriverDataToJSON(value["GraphDriver"]), + RootFS: ImageInspectRootFSToJSON(value["RootFS"]), + Metadata: ImageInspectMetadataToJSON(value["Metadata"]), + }; } - diff --git a/src/clients/docker/models/ImageInspectMetadata.ts b/src/clients/docker/models/ImageInspectMetadata.ts index c7e3e12e93..13284cf576 100644 --- a/src/clients/docker/models/ImageInspectMetadata.ts +++ b/src/clients/docker/models/ImageInspectMetadata.ts @@ -2,71 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Additional metadata of the image in the local cache. This information * is local to the daemon, and not part of the image itself. - * + * * @export * @interface ImageInspectMetadata */ export interface ImageInspectMetadata { - /** - * Date and time at which the image was last tagged in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * This information is only available if the image was tagged locally, - * and omitted otherwise. - * - * @type {string} - * @memberof ImageInspectMetadata - */ - LastTagTime?: string | null; + /** + * Date and time at which the image was last tagged in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * This information is only available if the image was tagged locally, + * and omitted otherwise. + * + * @type {string} + * @memberof ImageInspectMetadata + */ + LastTagTime?: string | null; } /** * Check if a given object implements the ImageInspectMetadata interface. */ export function instanceOfImageInspectMetadata(value: object): value is ImageInspectMetadata { - return true; + return true; } export function ImageInspectMetadataFromJSON(json: any): ImageInspectMetadata { - return ImageInspectMetadataFromJSONTyped(json, false); + return ImageInspectMetadataFromJSONTyped(json, false); } -export function ImageInspectMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageInspectMetadata { - if (json == null) { - return json; - } - return { - - 'LastTagTime': json['LastTagTime'] == null ? undefined : json['LastTagTime'], - }; +export function ImageInspectMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ImageInspectMetadata { + if (json == null) { + return json; + } + return { + LastTagTime: json["LastTagTime"] == null ? undefined : json["LastTagTime"], + }; } export function ImageInspectMetadataToJSON(json: any): ImageInspectMetadata { - return ImageInspectMetadataToJSONTyped(json, false); + return ImageInspectMetadataToJSONTyped(json, false); } -export function ImageInspectMetadataToJSONTyped(value?: ImageInspectMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageInspectMetadataToJSONTyped( + value?: ImageInspectMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'LastTagTime': value['LastTagTime'], - }; + return { + LastTagTime: value["LastTagTime"], + }; } - diff --git a/src/clients/docker/models/ImageInspectRootFS.ts b/src/clients/docker/models/ImageInspectRootFS.ts index e9061ddb50..d5fc658fd1 100644 --- a/src/clients/docker/models/ImageInspectRootFS.ts +++ b/src/clients/docker/models/ImageInspectRootFS.ts @@ -2,74 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Information about the image's RootFS, including the layer IDs. - * + * * @export * @interface ImageInspectRootFS */ export interface ImageInspectRootFS { - /** - * - * @type {string} - * @memberof ImageInspectRootFS - */ - Type: string; - /** - * - * @type {Array} - * @memberof ImageInspectRootFS - */ - Layers?: Array; + /** + * + * @type {string} + * @memberof ImageInspectRootFS + */ + Type: string; + /** + * + * @type {Array} + * @memberof ImageInspectRootFS + */ + Layers?: Array; } /** * Check if a given object implements the ImageInspectRootFS interface. */ export function instanceOfImageInspectRootFS(value: object): value is ImageInspectRootFS { - if (!('Type' in value) || value['Type'] === undefined) return false; - return true; + if (!("Type" in value) || value["Type"] === undefined) return false; + return true; } export function ImageInspectRootFSFromJSON(json: any): ImageInspectRootFS { - return ImageInspectRootFSFromJSONTyped(json, false); + return ImageInspectRootFSFromJSONTyped(json, false); } -export function ImageInspectRootFSFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageInspectRootFS { - if (json == null) { - return json; - } - return { - - 'Type': json['Type'], - 'Layers': json['Layers'] == null ? undefined : json['Layers'], - }; +export function ImageInspectRootFSFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ImageInspectRootFS { + if (json == null) { + return json; + } + return { + Type: json["Type"], + Layers: json["Layers"] == null ? undefined : json["Layers"], + }; } export function ImageInspectRootFSToJSON(json: any): ImageInspectRootFS { - return ImageInspectRootFSToJSONTyped(json, false); + return ImageInspectRootFSToJSONTyped(json, false); } -export function ImageInspectRootFSToJSONTyped(value?: ImageInspectRootFS | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageInspectRootFSToJSONTyped( + value?: ImageInspectRootFS | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Type': value['Type'], - 'Layers': value['Layers'], - }; + return { + Type: value["Type"], + Layers: value["Layers"], + }; } - diff --git a/src/clients/docker/models/ImagePruneResponse.ts b/src/clients/docker/models/ImagePruneResponse.ts index 77e7cedd8b..0c5d9c8f54 100644 --- a/src/clients/docker/models/ImagePruneResponse.ts +++ b/src/clients/docker/models/ImagePruneResponse.ts @@ -2,80 +2,89 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ImageDeleteResponseItem } from './ImageDeleteResponseItem'; +import { mapValues } from "../runtime"; +import type { ImageDeleteResponseItem } from "./ImageDeleteResponseItem"; import { - ImageDeleteResponseItemFromJSON, - ImageDeleteResponseItemFromJSONTyped, - ImageDeleteResponseItemToJSON, - ImageDeleteResponseItemToJSONTyped, -} from './ImageDeleteResponseItem'; + ImageDeleteResponseItemFromJSON, + ImageDeleteResponseItemFromJSONTyped, + ImageDeleteResponseItemToJSON, + ImageDeleteResponseItemToJSONTyped, +} from "./ImageDeleteResponseItem"; /** - * + * * @export * @interface ImagePruneResponse */ export interface ImagePruneResponse { - /** - * Images that were deleted - * @type {Array} - * @memberof ImagePruneResponse - */ - ImagesDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof ImagePruneResponse - */ - SpaceReclaimed?: number; + /** + * Images that were deleted + * @type {Array} + * @memberof ImagePruneResponse + */ + ImagesDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof ImagePruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the ImagePruneResponse interface. */ export function instanceOfImagePruneResponse(value: object): value is ImagePruneResponse { - return true; + return true; } export function ImagePruneResponseFromJSON(json: any): ImagePruneResponse { - return ImagePruneResponseFromJSONTyped(json, false); + return ImagePruneResponseFromJSONTyped(json, false); } -export function ImagePruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImagePruneResponse { - if (json == null) { - return json; - } - return { - - 'ImagesDeleted': json['ImagesDeleted'] == null ? undefined : ((json['ImagesDeleted'] as Array).map(ImageDeleteResponseItemFromJSON)), - 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], - }; +export function ImagePruneResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ImagePruneResponse { + if (json == null) { + return json; + } + return { + ImagesDeleted: + json["ImagesDeleted"] == null + ? undefined + : (json["ImagesDeleted"] as Array).map(ImageDeleteResponseItemFromJSON), + SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], + }; } export function ImagePruneResponseToJSON(json: any): ImagePruneResponse { - return ImagePruneResponseToJSONTyped(json, false); + return ImagePruneResponseToJSONTyped(json, false); } -export function ImagePruneResponseToJSONTyped(value?: ImagePruneResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImagePruneResponseToJSONTyped( + value?: ImagePruneResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ImagesDeleted': value['ImagesDeleted'] == null ? undefined : ((value['ImagesDeleted'] as Array).map(ImageDeleteResponseItemToJSON)), - 'SpaceReclaimed': value['SpaceReclaimed'], - }; + return { + ImagesDeleted: + value["ImagesDeleted"] == null + ? undefined + : (value["ImagesDeleted"] as Array).map(ImageDeleteResponseItemToJSON), + SpaceReclaimed: value["SpaceReclaimed"], + }; } - diff --git a/src/clients/docker/models/ImageSearchResponseItem.ts b/src/clients/docker/models/ImageSearchResponseItem.ts index 568565d594..f8403c36a0 100644 --- a/src/clients/docker/models/ImageSearchResponseItem.ts +++ b/src/clients/docker/models/ImageSearchResponseItem.ts @@ -2,96 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ImageSearchResponseItem */ export interface ImageSearchResponseItem { - /** - * - * @type {string} - * @memberof ImageSearchResponseItem - */ - description?: string; - /** - * - * @type {boolean} - * @memberof ImageSearchResponseItem - */ - is_official?: boolean; - /** - * - * @type {boolean} - * @memberof ImageSearchResponseItem - */ - is_automated?: boolean; - /** - * - * @type {string} - * @memberof ImageSearchResponseItem - */ - name?: string; - /** - * - * @type {number} - * @memberof ImageSearchResponseItem - */ - star_count?: number; + /** + * + * @type {string} + * @memberof ImageSearchResponseItem + */ + description?: string; + /** + * + * @type {boolean} + * @memberof ImageSearchResponseItem + */ + is_official?: boolean; + /** + * + * @type {boolean} + * @memberof ImageSearchResponseItem + */ + is_automated?: boolean; + /** + * + * @type {string} + * @memberof ImageSearchResponseItem + */ + name?: string; + /** + * + * @type {number} + * @memberof ImageSearchResponseItem + */ + star_count?: number; } /** * Check if a given object implements the ImageSearchResponseItem interface. */ export function instanceOfImageSearchResponseItem(value: object): value is ImageSearchResponseItem { - return true; + return true; } export function ImageSearchResponseItemFromJSON(json: any): ImageSearchResponseItem { - return ImageSearchResponseItemFromJSONTyped(json, false); + return ImageSearchResponseItemFromJSONTyped(json, false); } -export function ImageSearchResponseItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageSearchResponseItem { - if (json == null) { - return json; - } - return { - - 'description': json['description'] == null ? undefined : json['description'], - 'is_official': json['is_official'] == null ? undefined : json['is_official'], - 'is_automated': json['is_automated'] == null ? undefined : json['is_automated'], - 'name': json['name'] == null ? undefined : json['name'], - 'star_count': json['star_count'] == null ? undefined : json['star_count'], - }; +export function ImageSearchResponseItemFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ImageSearchResponseItem { + if (json == null) { + return json; + } + return { + description: json["description"] == null ? undefined : json["description"], + is_official: json["is_official"] == null ? undefined : json["is_official"], + is_automated: json["is_automated"] == null ? undefined : json["is_automated"], + name: json["name"] == null ? undefined : json["name"], + star_count: json["star_count"] == null ? undefined : json["star_count"], + }; } export function ImageSearchResponseItemToJSON(json: any): ImageSearchResponseItem { - return ImageSearchResponseItemToJSONTyped(json, false); + return ImageSearchResponseItemToJSONTyped(json, false); } -export function ImageSearchResponseItemToJSONTyped(value?: ImageSearchResponseItem | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageSearchResponseItemToJSONTyped( + value?: ImageSearchResponseItem | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'description': value['description'], - 'is_official': value['is_official'], - 'is_automated': value['is_automated'], - 'name': value['name'], - 'star_count': value['star_count'], - }; + return { + description: value["description"], + is_official: value["is_official"], + is_automated: value["is_automated"], + name: value["name"], + star_count: value["star_count"], + }; } - diff --git a/src/clients/docker/models/ImageSummary.ts b/src/clients/docker/models/ImageSummary.ts index 5b6afea0db..af3b43db88 100644 --- a/src/clients/docker/models/ImageSummary.ts +++ b/src/clients/docker/models/ImageSummary.ts @@ -2,191 +2,191 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ImageSummary */ export interface ImageSummary { - /** - * ID is the content-addressable ID of an image. - * - * This identifier is a content-addressable digest calculated from the - * image's configuration (which includes the digests of layers used by - * the image). - * - * Note that this digest differs from the `RepoDigests` below, which - * holds digests of image manifests that reference the image. - * - * @type {string} - * @memberof ImageSummary - */ - Id: string; - /** - * ID of the parent image. - * - * Depending on how the image was created, this field may be empty and - * is only set for images that were built/created locally. This field - * is empty if the image was pulled from an image registry. - * - * @type {string} - * @memberof ImageSummary - */ - ParentId: string; - /** - * List of image names/tags in the local image cache that reference this - * image. - * - * Multiple image tags can refer to the same image, and this list may be - * empty if no tags reference the image, in which case the image is - * "untagged", in which case it can still be referenced by its ID. - * - * @type {Array} - * @memberof ImageSummary - */ - RepoTags: Array; - /** - * List of content-addressable digests of locally available image manifests - * that the image is referenced from. Multiple manifests can refer to the - * same image. - * - * These digests are usually only available if the image was either pulled - * from a registry, or if the image was pushed to a registry, which is when - * the manifest is generated and its digest calculated. - * - * @type {Array} - * @memberof ImageSummary - */ - RepoDigests: Array; - /** - * Date and time at which the image was created as a Unix timestamp - * (number of seconds since EPOCH). - * - * @type {number} - * @memberof ImageSummary - */ - Created: number; - /** - * Total size of the image including all layers it is composed of. - * - * @type {number} - * @memberof ImageSummary - */ - Size: number; - /** - * Total size of image layers that are shared between this image and other - * images. - * - * This size is not calculated by default. `-1` indicates that the value - * has not been set / calculated. - * - * @type {number} - * @memberof ImageSummary - */ - SharedSize: number; - /** - * Total size of the image including all layers it is composed of. - * - * In versions of Docker before v1.10, this field was calculated from - * the image itself and all of its parent images. Images are now stored - * self-contained, and no longer use a parent-chain, making this field - * an equivalent of the Size field. - * - * Deprecated: this field is kept for backward compatibility, and will be removed in API v1.44. - * @type {number} - * @memberof ImageSummary - */ - VirtualSize?: number; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ImageSummary - */ - Labels: { [key: string]: string; }; - /** - * Number of containers using this image. Includes both stopped and running - * containers. - * - * This size is not calculated by default, and depends on which API endpoint - * is used. `-1` indicates that the value has not been set / calculated. - * - * @type {number} - * @memberof ImageSummary - */ - Containers: number; + /** + * ID is the content-addressable ID of an image. + * + * This identifier is a content-addressable digest calculated from the + * image's configuration (which includes the digests of layers used by + * the image). + * + * Note that this digest differs from the `RepoDigests` below, which + * holds digests of image manifests that reference the image. + * + * @type {string} + * @memberof ImageSummary + */ + Id: string; + /** + * ID of the parent image. + * + * Depending on how the image was created, this field may be empty and + * is only set for images that were built/created locally. This field + * is empty if the image was pulled from an image registry. + * + * @type {string} + * @memberof ImageSummary + */ + ParentId: string; + /** + * List of image names/tags in the local image cache that reference this + * image. + * + * Multiple image tags can refer to the same image, and this list may be + * empty if no tags reference the image, in which case the image is + * "untagged", in which case it can still be referenced by its ID. + * + * @type {Array} + * @memberof ImageSummary + */ + RepoTags: Array; + /** + * List of content-addressable digests of locally available image manifests + * that the image is referenced from. Multiple manifests can refer to the + * same image. + * + * These digests are usually only available if the image was either pulled + * from a registry, or if the image was pushed to a registry, which is when + * the manifest is generated and its digest calculated. + * + * @type {Array} + * @memberof ImageSummary + */ + RepoDigests: Array; + /** + * Date and time at which the image was created as a Unix timestamp + * (number of seconds since EPOCH). + * + * @type {number} + * @memberof ImageSummary + */ + Created: number; + /** + * Total size of the image including all layers it is composed of. + * + * @type {number} + * @memberof ImageSummary + */ + Size: number; + /** + * Total size of image layers that are shared between this image and other + * images. + * + * This size is not calculated by default. `-1` indicates that the value + * has not been set / calculated. + * + * @type {number} + * @memberof ImageSummary + */ + SharedSize: number; + /** + * Total size of the image including all layers it is composed of. + * + * In versions of Docker before v1.10, this field was calculated from + * the image itself and all of its parent images. Images are now stored + * self-contained, and no longer use a parent-chain, making this field + * an equivalent of the Size field. + * + * Deprecated: this field is kept for backward compatibility, and will be removed in API v1.44. + * @type {number} + * @memberof ImageSummary + */ + VirtualSize?: number; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ImageSummary + */ + Labels: { [key: string]: string }; + /** + * Number of containers using this image. Includes both stopped and running + * containers. + * + * This size is not calculated by default, and depends on which API endpoint + * is used. `-1` indicates that the value has not been set / calculated. + * + * @type {number} + * @memberof ImageSummary + */ + Containers: number; } /** * Check if a given object implements the ImageSummary interface. */ export function instanceOfImageSummary(value: object): value is ImageSummary { - if (!('Id' in value) || value['Id'] === undefined) return false; - if (!('ParentId' in value) || value['ParentId'] === undefined) return false; - if (!('RepoTags' in value) || value['RepoTags'] === undefined) return false; - if (!('RepoDigests' in value) || value['RepoDigests'] === undefined) return false; - if (!('Created' in value) || value['Created'] === undefined) return false; - if (!('Size' in value) || value['Size'] === undefined) return false; - if (!('SharedSize' in value) || value['SharedSize'] === undefined) return false; - if (!('Labels' in value) || value['Labels'] === undefined) return false; - if (!('Containers' in value) || value['Containers'] === undefined) return false; - return true; + if (!("Id" in value) || value["Id"] === undefined) return false; + if (!("ParentId" in value) || value["ParentId"] === undefined) return false; + if (!("RepoTags" in value) || value["RepoTags"] === undefined) return false; + if (!("RepoDigests" in value) || value["RepoDigests"] === undefined) return false; + if (!("Created" in value) || value["Created"] === undefined) return false; + if (!("Size" in value) || value["Size"] === undefined) return false; + if (!("SharedSize" in value) || value["SharedSize"] === undefined) return false; + if (!("Labels" in value) || value["Labels"] === undefined) return false; + if (!("Containers" in value) || value["Containers"] === undefined) return false; + return true; } export function ImageSummaryFromJSON(json: any): ImageSummary { - return ImageSummaryFromJSONTyped(json, false); + return ImageSummaryFromJSONTyped(json, false); } export function ImageSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageSummary { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'], - 'ParentId': json['ParentId'], - 'RepoTags': json['RepoTags'], - 'RepoDigests': json['RepoDigests'], - 'Created': json['Created'], - 'Size': json['Size'], - 'SharedSize': json['SharedSize'], - 'VirtualSize': json['VirtualSize'] == null ? undefined : json['VirtualSize'], - 'Labels': json['Labels'], - 'Containers': json['Containers'], - }; + if (json == null) { + return json; + } + return { + Id: json["Id"], + ParentId: json["ParentId"], + RepoTags: json["RepoTags"], + RepoDigests: json["RepoDigests"], + Created: json["Created"], + Size: json["Size"], + SharedSize: json["SharedSize"], + VirtualSize: json["VirtualSize"] == null ? undefined : json["VirtualSize"], + Labels: json["Labels"], + Containers: json["Containers"], + }; } export function ImageSummaryToJSON(json: any): ImageSummary { - return ImageSummaryToJSONTyped(json, false); + return ImageSummaryToJSONTyped(json, false); } -export function ImageSummaryToJSONTyped(value?: ImageSummary | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ImageSummaryToJSONTyped( + value?: ImageSummary | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'ParentId': value['ParentId'], - 'RepoTags': value['RepoTags'], - 'RepoDigests': value['RepoDigests'], - 'Created': value['Created'], - 'Size': value['Size'], - 'SharedSize': value['SharedSize'], - 'VirtualSize': value['VirtualSize'], - 'Labels': value['Labels'], - 'Containers': value['Containers'], - }; + return { + Id: value["Id"], + ParentId: value["ParentId"], + RepoTags: value["RepoTags"], + RepoDigests: value["RepoDigests"], + Created: value["Created"], + Size: value["Size"], + SharedSize: value["SharedSize"], + VirtualSize: value["VirtualSize"], + Labels: value["Labels"], + Containers: value["Containers"], + }; } - diff --git a/src/clients/docker/models/IndexInfo.ts b/src/clients/docker/models/IndexInfo.ts index dd38ef78e3..79aa3ac893 100644 --- a/src/clients/docker/models/IndexInfo.ts +++ b/src/clients/docker/models/IndexInfo.ts @@ -2,103 +2,103 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * IndexInfo contains information about a registry. * @export * @interface IndexInfo */ export interface IndexInfo { - /** - * Name of the registry, such as "docker.io". - * - * @type {string} - * @memberof IndexInfo - */ - Name?: string; - /** - * List of mirrors, expressed as URIs. - * - * @type {Array} - * @memberof IndexInfo - */ - Mirrors?: Array; - /** - * Indicates if the registry is part of the list of insecure - * registries. - * - * If `false`, the registry is insecure. Insecure registries accept - * un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from - * unknown CAs) communication. - * - * > **Warning**: Insecure registries can be useful when running a local - * > registry. However, because its use creates security vulnerabilities - * > it should ONLY be enabled for testing purposes. For increased - * > security, users should add their CA to their system's list of - * > trusted CAs instead of enabling this option. - * - * @type {boolean} - * @memberof IndexInfo - */ - Secure?: boolean; - /** - * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) - * - * @type {boolean} - * @memberof IndexInfo - */ - Official?: boolean; + /** + * Name of the registry, such as "docker.io". + * + * @type {string} + * @memberof IndexInfo + */ + Name?: string; + /** + * List of mirrors, expressed as URIs. + * + * @type {Array} + * @memberof IndexInfo + */ + Mirrors?: Array; + /** + * Indicates if the registry is part of the list of insecure + * registries. + * + * If `false`, the registry is insecure. Insecure registries accept + * un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + * unknown CAs) communication. + * + * > **Warning**: Insecure registries can be useful when running a local + * > registry. However, because its use creates security vulnerabilities + * > it should ONLY be enabled for testing purposes. For increased + * > security, users should add their CA to their system's list of + * > trusted CAs instead of enabling this option. + * + * @type {boolean} + * @memberof IndexInfo + */ + Secure?: boolean; + /** + * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + * + * @type {boolean} + * @memberof IndexInfo + */ + Official?: boolean; } /** * Check if a given object implements the IndexInfo interface. */ export function instanceOfIndexInfo(value: object): value is IndexInfo { - return true; + return true; } export function IndexInfoFromJSON(json: any): IndexInfo { - return IndexInfoFromJSONTyped(json, false); + return IndexInfoFromJSONTyped(json, false); } export function IndexInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): IndexInfo { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Mirrors': json['Mirrors'] == null ? undefined : json['Mirrors'], - 'Secure': json['Secure'] == null ? undefined : json['Secure'], - 'Official': json['Official'] == null ? undefined : json['Official'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Mirrors: json["Mirrors"] == null ? undefined : json["Mirrors"], + Secure: json["Secure"] == null ? undefined : json["Secure"], + Official: json["Official"] == null ? undefined : json["Official"], + }; } export function IndexInfoToJSON(json: any): IndexInfo { - return IndexInfoToJSONTyped(json, false); + return IndexInfoToJSONTyped(json, false); } -export function IndexInfoToJSONTyped(value?: IndexInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function IndexInfoToJSONTyped( + value?: IndexInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Mirrors': value['Mirrors'], - 'Secure': value['Secure'], - 'Official': value['Official'], - }; + return { + Name: value["Name"], + Mirrors: value["Mirrors"], + Secure: value["Secure"], + Official: value["Official"], + }; } - diff --git a/src/clients/docker/models/JoinTokens.ts b/src/clients/docker/models/JoinTokens.ts index 8fc76d760d..853d36f203 100644 --- a/src/clients/docker/models/JoinTokens.ts +++ b/src/clients/docker/models/JoinTokens.ts @@ -2,75 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * JoinTokens contains the tokens workers and managers need to join the swarm. - * + * * @export * @interface JoinTokens */ export interface JoinTokens { - /** - * The token workers can use to join the swarm. - * - * @type {string} - * @memberof JoinTokens - */ - Worker?: string; - /** - * The token managers can use to join the swarm. - * - * @type {string} - * @memberof JoinTokens - */ - Manager?: string; + /** + * The token workers can use to join the swarm. + * + * @type {string} + * @memberof JoinTokens + */ + Worker?: string; + /** + * The token managers can use to join the swarm. + * + * @type {string} + * @memberof JoinTokens + */ + Manager?: string; } /** * Check if a given object implements the JoinTokens interface. */ export function instanceOfJoinTokens(value: object): value is JoinTokens { - return true; + return true; } export function JoinTokensFromJSON(json: any): JoinTokens { - return JoinTokensFromJSONTyped(json, false); + return JoinTokensFromJSONTyped(json, false); } export function JoinTokensFromJSONTyped(json: any, ignoreDiscriminator: boolean): JoinTokens { - if (json == null) { - return json; - } - return { - - 'Worker': json['Worker'] == null ? undefined : json['Worker'], - 'Manager': json['Manager'] == null ? undefined : json['Manager'], - }; + if (json == null) { + return json; + } + return { + Worker: json["Worker"] == null ? undefined : json["Worker"], + Manager: json["Manager"] == null ? undefined : json["Manager"], + }; } export function JoinTokensToJSON(json: any): JoinTokens { - return JoinTokensToJSONTyped(json, false); + return JoinTokensToJSONTyped(json, false); } -export function JoinTokensToJSONTyped(value?: JoinTokens | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JoinTokensToJSONTyped( + value?: JoinTokens | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Worker': value['Worker'], - 'Manager': value['Manager'], - }; + return { + Worker: value["Worker"], + Manager: value["Manager"], + }; } - diff --git a/src/clients/docker/models/Limit.ts b/src/clients/docker/models/Limit.ts index 2a8e1597ae..7f454a0f22 100644 --- a/src/clients/docker/models/Limit.ts +++ b/src/clients/docker/models/Limit.ts @@ -2,82 +2,79 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * An object describing a limit on resources which can be requested by a task. - * + * * @export * @interface Limit */ export interface Limit { - /** - * - * @type {number} - * @memberof Limit - */ - NanoCPUs?: number; - /** - * - * @type {number} - * @memberof Limit - */ - MemoryBytes?: number; - /** - * Limits the maximum number of PIDs in the container. Set `0` for unlimited. - * - * @type {number} - * @memberof Limit - */ - Pids?: number; + /** + * + * @type {number} + * @memberof Limit + */ + NanoCPUs?: number; + /** + * + * @type {number} + * @memberof Limit + */ + MemoryBytes?: number; + /** + * Limits the maximum number of PIDs in the container. Set `0` for unlimited. + * + * @type {number} + * @memberof Limit + */ + Pids?: number; } /** * Check if a given object implements the Limit interface. */ export function instanceOfLimit(value: object): value is Limit { - return true; + return true; } export function LimitFromJSON(json: any): Limit { - return LimitFromJSONTyped(json, false); + return LimitFromJSONTyped(json, false); } export function LimitFromJSONTyped(json: any, ignoreDiscriminator: boolean): Limit { - if (json == null) { - return json; - } - return { - - 'NanoCPUs': json['NanoCPUs'] == null ? undefined : json['NanoCPUs'], - 'MemoryBytes': json['MemoryBytes'] == null ? undefined : json['MemoryBytes'], - 'Pids': json['Pids'] == null ? undefined : json['Pids'], - }; + if (json == null) { + return json; + } + return { + NanoCPUs: json["NanoCPUs"] == null ? undefined : json["NanoCPUs"], + MemoryBytes: json["MemoryBytes"] == null ? undefined : json["MemoryBytes"], + Pids: json["Pids"] == null ? undefined : json["Pids"], + }; } export function LimitToJSON(json: any): Limit { - return LimitToJSONTyped(json, false); + return LimitToJSONTyped(json, false); } export function LimitToJSONTyped(value?: Limit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'NanoCPUs': value['NanoCPUs'], - 'MemoryBytes': value['MemoryBytes'], - 'Pids': value['Pids'], - }; + return { + NanoCPUs: value["NanoCPUs"], + MemoryBytes: value["MemoryBytes"], + Pids: value["Pids"], + }; } - diff --git a/src/clients/docker/models/LocalNodeState.ts b/src/clients/docker/models/LocalNodeState.ts index f3300b5827..45431d6591 100644 --- a/src/clients/docker/models/LocalNodeState.ts +++ b/src/clients/docker/models/LocalNodeState.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,39 +18,43 @@ * @enum {string} */ export enum LocalNodeState { - Empty = '', - Inactive = 'inactive', - Pending = 'pending', - Active = 'active', - Error = 'error', - Locked = 'locked' + Empty = "", + Inactive = "inactive", + Pending = "pending", + Active = "active", + Error = "error", + Locked = "locked", } - export function instanceOfLocalNodeState(value: any): boolean { - for (const key in LocalNodeState) { - if (Object.prototype.hasOwnProperty.call(LocalNodeState, key)) { - if (LocalNodeState[key as keyof typeof LocalNodeState] === value) { - return true; - } - } + for (const key in LocalNodeState) { + if (Object.prototype.hasOwnProperty.call(LocalNodeState, key)) { + if (LocalNodeState[key as keyof typeof LocalNodeState] === value) { + return true; + } } - return false; + } + return false; } export function LocalNodeStateFromJSON(json: any): LocalNodeState { - return LocalNodeStateFromJSONTyped(json, false); + return LocalNodeStateFromJSONTyped(json, false); } -export function LocalNodeStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocalNodeState { - return json as LocalNodeState; +export function LocalNodeStateFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): LocalNodeState { + return json as LocalNodeState; } export function LocalNodeStateToJSON(value?: LocalNodeState | null): any { - return value as any; + return value as any; } -export function LocalNodeStateToJSONTyped(value: any, ignoreDiscriminator: boolean): LocalNodeState { - return value as LocalNodeState; +export function LocalNodeStateToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): LocalNodeState { + return value as LocalNodeState; } - diff --git a/src/clients/docker/models/ManagerStatus.ts b/src/clients/docker/models/ManagerStatus.ts index 4de210d3d6..48ded2104d 100644 --- a/src/clients/docker/models/ManagerStatus.ts +++ b/src/clients/docker/models/ManagerStatus.ts @@ -2,95 +2,94 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Reachability } from './Reachability'; +import { mapValues } from "../runtime"; +import type { Reachability } from "./Reachability"; import { - ReachabilityFromJSON, - ReachabilityFromJSONTyped, - ReachabilityToJSON, - ReachabilityToJSONTyped, -} from './Reachability'; + ReachabilityFromJSON, + ReachabilityFromJSONTyped, + ReachabilityToJSON, + ReachabilityToJSONTyped, +} from "./Reachability"; /** * ManagerStatus represents the status of a manager. - * + * * It provides the current status of a node's manager component, if the node * is a manager. - * + * * @export * @interface ManagerStatus */ export interface ManagerStatus { - /** - * - * @type {boolean} - * @memberof ManagerStatus - */ - Leader?: boolean; - /** - * - * @type {Reachability} - * @memberof ManagerStatus - */ - Reachability?: Reachability; - /** - * The IP address and port at which the manager is reachable. - * - * @type {string} - * @memberof ManagerStatus - */ - Addr?: string; + /** + * + * @type {boolean} + * @memberof ManagerStatus + */ + Leader?: boolean; + /** + * + * @type {Reachability} + * @memberof ManagerStatus + */ + Reachability?: Reachability; + /** + * The IP address and port at which the manager is reachable. + * + * @type {string} + * @memberof ManagerStatus + */ + Addr?: string; } - - /** * Check if a given object implements the ManagerStatus interface. */ export function instanceOfManagerStatus(value: object): value is ManagerStatus { - return true; + return true; } export function ManagerStatusFromJSON(json: any): ManagerStatus { - return ManagerStatusFromJSONTyped(json, false); + return ManagerStatusFromJSONTyped(json, false); } export function ManagerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagerStatus { - if (json == null) { - return json; - } - return { - - 'Leader': json['Leader'] == null ? undefined : json['Leader'], - 'Reachability': json['Reachability'] == null ? undefined : ReachabilityFromJSON(json['Reachability']), - 'Addr': json['Addr'] == null ? undefined : json['Addr'], - }; + if (json == null) { + return json; + } + return { + Leader: json["Leader"] == null ? undefined : json["Leader"], + Reachability: + json["Reachability"] == null ? undefined : ReachabilityFromJSON(json["Reachability"]), + Addr: json["Addr"] == null ? undefined : json["Addr"], + }; } export function ManagerStatusToJSON(json: any): ManagerStatus { - return ManagerStatusToJSONTyped(json, false); + return ManagerStatusToJSONTyped(json, false); } -export function ManagerStatusToJSONTyped(value?: ManagerStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ManagerStatusToJSONTyped( + value?: ManagerStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Leader': value['Leader'], - 'Reachability': ReachabilityToJSON(value['Reachability']), - 'Addr': value['Addr'], - }; + return { + Leader: value["Leader"], + Reachability: ReachabilityToJSON(value["Reachability"]), + Addr: value["Addr"], + }; } - diff --git a/src/clients/docker/models/Mount.ts b/src/clients/docker/models/Mount.ts index f873505a16..0ad122aec4 100644 --- a/src/clients/docker/models/Mount.ts +++ b/src/clients/docker/models/Mount.ts @@ -2,162 +2,161 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { MountVolumeOptions } from './MountVolumeOptions'; +import { mapValues } from "../runtime"; +import type { MountVolumeOptions } from "./MountVolumeOptions"; import { - MountVolumeOptionsFromJSON, - MountVolumeOptionsFromJSONTyped, - MountVolumeOptionsToJSON, - MountVolumeOptionsToJSONTyped, -} from './MountVolumeOptions'; -import type { MountTmpfsOptions } from './MountTmpfsOptions'; + MountVolumeOptionsFromJSON, + MountVolumeOptionsFromJSONTyped, + MountVolumeOptionsToJSON, + MountVolumeOptionsToJSONTyped, +} from "./MountVolumeOptions"; +import type { MountTmpfsOptions } from "./MountTmpfsOptions"; import { - MountTmpfsOptionsFromJSON, - MountTmpfsOptionsFromJSONTyped, - MountTmpfsOptionsToJSON, - MountTmpfsOptionsToJSONTyped, -} from './MountTmpfsOptions'; -import type { MountBindOptions } from './MountBindOptions'; + MountTmpfsOptionsFromJSON, + MountTmpfsOptionsFromJSONTyped, + MountTmpfsOptionsToJSON, + MountTmpfsOptionsToJSONTyped, +} from "./MountTmpfsOptions"; +import type { MountBindOptions } from "./MountBindOptions"; import { - MountBindOptionsFromJSON, - MountBindOptionsFromJSONTyped, - MountBindOptionsToJSON, - MountBindOptionsToJSONTyped, -} from './MountBindOptions'; + MountBindOptionsFromJSON, + MountBindOptionsFromJSONTyped, + MountBindOptionsToJSON, + MountBindOptionsToJSONTyped, +} from "./MountBindOptions"; /** - * + * * @export * @interface Mount */ export interface Mount { - /** - * Container path. - * @type {string} - * @memberof Mount - */ - Target?: string; - /** - * Mount source (e.g. a volume name, a host path). - * @type {string} - * @memberof Mount - */ - Source?: string; - /** - * The mount type. Available types: - * - * - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - * - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - * - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - * - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. - * - `cluster` a Swarm cluster volume - * - * @type {string} - * @memberof Mount - */ - Type?: MountTypeEnum; - /** - * Whether the mount should be read-only. - * @type {boolean} - * @memberof Mount - */ - ReadOnly?: boolean; - /** - * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. - * @type {string} - * @memberof Mount - */ - Consistency?: string; - /** - * - * @type {MountBindOptions} - * @memberof Mount - */ - BindOptions?: MountBindOptions; - /** - * - * @type {MountVolumeOptions} - * @memberof Mount - */ - VolumeOptions?: MountVolumeOptions; - /** - * - * @type {MountTmpfsOptions} - * @memberof Mount - */ - TmpfsOptions?: MountTmpfsOptions; + /** + * Container path. + * @type {string} + * @memberof Mount + */ + Target?: string; + /** + * Mount source (e.g. a volume name, a host path). + * @type {string} + * @memberof Mount + */ + Source?: string; + /** + * The mount type. Available types: + * + * - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + * - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + * - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + * - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + * - `cluster` a Swarm cluster volume + * + * @type {string} + * @memberof Mount + */ + Type?: MountTypeEnum; + /** + * Whether the mount should be read-only. + * @type {boolean} + * @memberof Mount + */ + ReadOnly?: boolean; + /** + * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + * @type {string} + * @memberof Mount + */ + Consistency?: string; + /** + * + * @type {MountBindOptions} + * @memberof Mount + */ + BindOptions?: MountBindOptions; + /** + * + * @type {MountVolumeOptions} + * @memberof Mount + */ + VolumeOptions?: MountVolumeOptions; + /** + * + * @type {MountTmpfsOptions} + * @memberof Mount + */ + TmpfsOptions?: MountTmpfsOptions; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum MountTypeEnum { - Bind = 'bind', - Volume = 'volume', - Tmpfs = 'tmpfs', - Npipe = 'npipe', - Cluster = 'cluster' + Bind = "bind", + Volume = "volume", + Tmpfs = "tmpfs", + Npipe = "npipe", + Cluster = "cluster", } - /** * Check if a given object implements the Mount interface. */ export function instanceOfMount(value: object): value is Mount { - return true; + return true; } export function MountFromJSON(json: any): Mount { - return MountFromJSONTyped(json, false); + return MountFromJSONTyped(json, false); } export function MountFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mount { - if (json == null) { - return json; - } - return { - - 'Target': json['Target'] == null ? undefined : json['Target'], - 'Source': json['Source'] == null ? undefined : json['Source'], - 'Type': json['Type'] == null ? undefined : json['Type'], - 'ReadOnly': json['ReadOnly'] == null ? undefined : json['ReadOnly'], - 'Consistency': json['Consistency'] == null ? undefined : json['Consistency'], - 'BindOptions': json['BindOptions'] == null ? undefined : MountBindOptionsFromJSON(json['BindOptions']), - 'VolumeOptions': json['VolumeOptions'] == null ? undefined : MountVolumeOptionsFromJSON(json['VolumeOptions']), - 'TmpfsOptions': json['TmpfsOptions'] == null ? undefined : MountTmpfsOptionsFromJSON(json['TmpfsOptions']), - }; + if (json == null) { + return json; + } + return { + Target: json["Target"] == null ? undefined : json["Target"], + Source: json["Source"] == null ? undefined : json["Source"], + Type: json["Type"] == null ? undefined : json["Type"], + ReadOnly: json["ReadOnly"] == null ? undefined : json["ReadOnly"], + Consistency: json["Consistency"] == null ? undefined : json["Consistency"], + BindOptions: + json["BindOptions"] == null ? undefined : MountBindOptionsFromJSON(json["BindOptions"]), + VolumeOptions: + json["VolumeOptions"] == null ? undefined : MountVolumeOptionsFromJSON(json["VolumeOptions"]), + TmpfsOptions: + json["TmpfsOptions"] == null ? undefined : MountTmpfsOptionsFromJSON(json["TmpfsOptions"]), + }; } export function MountToJSON(json: any): Mount { - return MountToJSONTyped(json, false); + return MountToJSONTyped(json, false); } export function MountToJSONTyped(value?: Mount | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'Target': value['Target'], - 'Source': value['Source'], - 'Type': value['Type'], - 'ReadOnly': value['ReadOnly'], - 'Consistency': value['Consistency'], - 'BindOptions': MountBindOptionsToJSON(value['BindOptions']), - 'VolumeOptions': MountVolumeOptionsToJSON(value['VolumeOptions']), - 'TmpfsOptions': MountTmpfsOptionsToJSON(value['TmpfsOptions']), - }; + return { + Target: value["Target"], + Source: value["Source"], + Type: value["Type"], + ReadOnly: value["ReadOnly"], + Consistency: value["Consistency"], + BindOptions: MountBindOptionsToJSON(value["BindOptions"]), + VolumeOptions: MountVolumeOptionsToJSON(value["VolumeOptions"]), + TmpfsOptions: MountTmpfsOptionsToJSON(value["TmpfsOptions"]), + }; } - diff --git a/src/clients/docker/models/MountBindOptions.ts b/src/clients/docker/models/MountBindOptions.ts index df1c58bf8a..bb37dfa5f9 100644 --- a/src/clients/docker/models/MountBindOptions.ts +++ b/src/clients/docker/models/MountBindOptions.ts @@ -2,94 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Optional configuration for the `bind` type. * @export * @interface MountBindOptions */ export interface MountBindOptions { - /** - * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. - * @type {string} - * @memberof MountBindOptions - */ - Propagation?: MountBindOptionsPropagationEnum; - /** - * Disable recursive bind mount. - * @type {boolean} - * @memberof MountBindOptions - */ - NonRecursive?: boolean; - /** - * Create mount point on host if missing - * @type {boolean} - * @memberof MountBindOptions - */ - CreateMountpoint?: boolean; + /** + * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + * @type {string} + * @memberof MountBindOptions + */ + Propagation?: MountBindOptionsPropagationEnum; + /** + * Disable recursive bind mount. + * @type {boolean} + * @memberof MountBindOptions + */ + NonRecursive?: boolean; + /** + * Create mount point on host if missing + * @type {boolean} + * @memberof MountBindOptions + */ + CreateMountpoint?: boolean; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum MountBindOptionsPropagationEnum { - Private = 'private', - Rprivate = 'rprivate', - Shared = 'shared', - Rshared = 'rshared', - Slave = 'slave', - Rslave = 'rslave' + Private = "private", + Rprivate = "rprivate", + Shared = "shared", + Rshared = "rshared", + Slave = "slave", + Rslave = "rslave", } - /** * Check if a given object implements the MountBindOptions interface. */ export function instanceOfMountBindOptions(value: object): value is MountBindOptions { - return true; + return true; } export function MountBindOptionsFromJSON(json: any): MountBindOptions { - return MountBindOptionsFromJSONTyped(json, false); + return MountBindOptionsFromJSONTyped(json, false); } -export function MountBindOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountBindOptions { - if (json == null) { - return json; - } - return { - - 'Propagation': json['Propagation'] == null ? undefined : json['Propagation'], - 'NonRecursive': json['NonRecursive'] == null ? undefined : json['NonRecursive'], - 'CreateMountpoint': json['CreateMountpoint'] == null ? undefined : json['CreateMountpoint'], - }; +export function MountBindOptionsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): MountBindOptions { + if (json == null) { + return json; + } + return { + Propagation: json["Propagation"] == null ? undefined : json["Propagation"], + NonRecursive: json["NonRecursive"] == null ? undefined : json["NonRecursive"], + CreateMountpoint: json["CreateMountpoint"] == null ? undefined : json["CreateMountpoint"], + }; } export function MountBindOptionsToJSON(json: any): MountBindOptions { - return MountBindOptionsToJSONTyped(json, false); + return MountBindOptionsToJSONTyped(json, false); } -export function MountBindOptionsToJSONTyped(value?: MountBindOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MountBindOptionsToJSONTyped( + value?: MountBindOptions | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Propagation': value['Propagation'], - 'NonRecursive': value['NonRecursive'], - 'CreateMountpoint': value['CreateMountpoint'], - }; + return { + Propagation: value["Propagation"], + NonRecursive: value["NonRecursive"], + CreateMountpoint: value["CreateMountpoint"], + }; } - diff --git a/src/clients/docker/models/MountPoint.ts b/src/clients/docker/models/MountPoint.ts index 73f5c7ee9b..b6d89111b6 100644 --- a/src/clients/docker/models/MountPoint.ts +++ b/src/clients/docker/models/MountPoint.ts @@ -2,161 +2,160 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * MountPoint represents a mount point configuration inside the container. * This is used for reporting the mountpoints in use by a container. - * + * * @export * @interface MountPoint */ export interface MountPoint { - /** - * The mount type: - * - * - `bind` a mount of a file or directory from the host into the container. - * - `volume` a docker volume with the given `Name`. - * - `tmpfs` a `tmpfs`. - * - `npipe` a named pipe from the host into the container. - * - `cluster` a Swarm cluster volume - * - * @type {string} - * @memberof MountPoint - */ - Type?: MountPointTypeEnum; - /** - * Name is the name reference to the underlying data defined by `Source` - * e.g., the volume name. - * - * @type {string} - * @memberof MountPoint - */ - Name?: string; - /** - * Source location of the mount. - * - * For volumes, this contains the storage location of the volume (within - * `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains - * the source (host) part of the bind-mount. For `tmpfs` mount points, this - * field is empty. - * - * @type {string} - * @memberof MountPoint - */ - Source?: string; - /** - * Destination is the path relative to the container root (`/`) where - * the `Source` is mounted inside the container. - * - * @type {string} - * @memberof MountPoint - */ - Destination?: string; - /** - * Driver is the volume driver used to create the volume (if it is a volume). - * - * @type {string} - * @memberof MountPoint - */ - Driver?: string; - /** - * Mode is a comma separated list of options supplied by the user when - * creating the bind/volume mount. - * - * The default is platform-specific (`"z"` on Linux, empty on Windows). - * - * @type {string} - * @memberof MountPoint - */ - Mode?: string; - /** - * Whether the mount is mounted writable (read-write). - * - * @type {boolean} - * @memberof MountPoint - */ - RW?: boolean; - /** - * Propagation describes how mounts are propagated from the host into the - * mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) - * for details. This field is not used on Windows. - * - * @type {string} - * @memberof MountPoint - */ - Propagation?: string; + /** + * The mount type: + * + * - `bind` a mount of a file or directory from the host into the container. + * - `volume` a docker volume with the given `Name`. + * - `tmpfs` a `tmpfs`. + * - `npipe` a named pipe from the host into the container. + * - `cluster` a Swarm cluster volume + * + * @type {string} + * @memberof MountPoint + */ + Type?: MountPointTypeEnum; + /** + * Name is the name reference to the underlying data defined by `Source` + * e.g., the volume name. + * + * @type {string} + * @memberof MountPoint + */ + Name?: string; + /** + * Source location of the mount. + * + * For volumes, this contains the storage location of the volume (within + * `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + * the source (host) part of the bind-mount. For `tmpfs` mount points, this + * field is empty. + * + * @type {string} + * @memberof MountPoint + */ + Source?: string; + /** + * Destination is the path relative to the container root (`/`) where + * the `Source` is mounted inside the container. + * + * @type {string} + * @memberof MountPoint + */ + Destination?: string; + /** + * Driver is the volume driver used to create the volume (if it is a volume). + * + * @type {string} + * @memberof MountPoint + */ + Driver?: string; + /** + * Mode is a comma separated list of options supplied by the user when + * creating the bind/volume mount. + * + * The default is platform-specific (`"z"` on Linux, empty on Windows). + * + * @type {string} + * @memberof MountPoint + */ + Mode?: string; + /** + * Whether the mount is mounted writable (read-write). + * + * @type {boolean} + * @memberof MountPoint + */ + RW?: boolean; + /** + * Propagation describes how mounts are propagated from the host into the + * mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + * for details. This field is not used on Windows. + * + * @type {string} + * @memberof MountPoint + */ + Propagation?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum MountPointTypeEnum { - Bind = 'bind', - Volume = 'volume', - Tmpfs = 'tmpfs', - Npipe = 'npipe', - Cluster = 'cluster' + Bind = "bind", + Volume = "volume", + Tmpfs = "tmpfs", + Npipe = "npipe", + Cluster = "cluster", } - /** * Check if a given object implements the MountPoint interface. */ export function instanceOfMountPoint(value: object): value is MountPoint { - return true; + return true; } export function MountPointFromJSON(json: any): MountPoint { - return MountPointFromJSONTyped(json, false); + return MountPointFromJSONTyped(json, false); } export function MountPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountPoint { - if (json == null) { - return json; - } - return { - - 'Type': json['Type'] == null ? undefined : json['Type'], - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Source': json['Source'] == null ? undefined : json['Source'], - 'Destination': json['Destination'] == null ? undefined : json['Destination'], - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'Mode': json['Mode'] == null ? undefined : json['Mode'], - 'RW': json['RW'] == null ? undefined : json['RW'], - 'Propagation': json['Propagation'] == null ? undefined : json['Propagation'], - }; + if (json == null) { + return json; + } + return { + Type: json["Type"] == null ? undefined : json["Type"], + Name: json["Name"] == null ? undefined : json["Name"], + Source: json["Source"] == null ? undefined : json["Source"], + Destination: json["Destination"] == null ? undefined : json["Destination"], + Driver: json["Driver"] == null ? undefined : json["Driver"], + Mode: json["Mode"] == null ? undefined : json["Mode"], + RW: json["RW"] == null ? undefined : json["RW"], + Propagation: json["Propagation"] == null ? undefined : json["Propagation"], + }; } export function MountPointToJSON(json: any): MountPoint { - return MountPointToJSONTyped(json, false); + return MountPointToJSONTyped(json, false); } -export function MountPointToJSONTyped(value?: MountPoint | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MountPointToJSONTyped( + value?: MountPoint | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Type': value['Type'], - 'Name': value['Name'], - 'Source': value['Source'], - 'Destination': value['Destination'], - 'Driver': value['Driver'], - 'Mode': value['Mode'], - 'RW': value['RW'], - 'Propagation': value['Propagation'], - }; + return { + Type: value["Type"], + Name: value["Name"], + Source: value["Source"], + Destination: value["Destination"], + Driver: value["Driver"], + Mode: value["Mode"], + RW: value["RW"], + Propagation: value["Propagation"], + }; } - diff --git a/src/clients/docker/models/MountTmpfsOptions.ts b/src/clients/docker/models/MountTmpfsOptions.ts index e6008dfb7f..bdb85238c3 100644 --- a/src/clients/docker/models/MountTmpfsOptions.ts +++ b/src/clients/docker/models/MountTmpfsOptions.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Optional configuration for the `tmpfs` type. * @export * @interface MountTmpfsOptions */ export interface MountTmpfsOptions { - /** - * The size for the tmpfs mount in bytes. - * @type {number} - * @memberof MountTmpfsOptions - */ - SizeBytes?: number; - /** - * The permission mode for the tmpfs mount in an integer. - * @type {number} - * @memberof MountTmpfsOptions - */ - Mode?: number; + /** + * The size for the tmpfs mount in bytes. + * @type {number} + * @memberof MountTmpfsOptions + */ + SizeBytes?: number; + /** + * The permission mode for the tmpfs mount in an integer. + * @type {number} + * @memberof MountTmpfsOptions + */ + Mode?: number; } /** * Check if a given object implements the MountTmpfsOptions interface. */ export function instanceOfMountTmpfsOptions(value: object): value is MountTmpfsOptions { - return true; + return true; } export function MountTmpfsOptionsFromJSON(json: any): MountTmpfsOptions { - return MountTmpfsOptionsFromJSONTyped(json, false); + return MountTmpfsOptionsFromJSONTyped(json, false); } -export function MountTmpfsOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountTmpfsOptions { - if (json == null) { - return json; - } - return { - - 'SizeBytes': json['SizeBytes'] == null ? undefined : json['SizeBytes'], - 'Mode': json['Mode'] == null ? undefined : json['Mode'], - }; +export function MountTmpfsOptionsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): MountTmpfsOptions { + if (json == null) { + return json; + } + return { + SizeBytes: json["SizeBytes"] == null ? undefined : json["SizeBytes"], + Mode: json["Mode"] == null ? undefined : json["Mode"], + }; } export function MountTmpfsOptionsToJSON(json: any): MountTmpfsOptions { - return MountTmpfsOptionsToJSONTyped(json, false); + return MountTmpfsOptionsToJSONTyped(json, false); } -export function MountTmpfsOptionsToJSONTyped(value?: MountTmpfsOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MountTmpfsOptionsToJSONTyped( + value?: MountTmpfsOptions | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'SizeBytes': value['SizeBytes'], - 'Mode': value['Mode'], - }; + return { + SizeBytes: value["SizeBytes"], + Mode: value["Mode"], + }; } - diff --git a/src/clients/docker/models/MountVolumeOptions.ts b/src/clients/docker/models/MountVolumeOptions.ts index d75b01790b..38823ee6ae 100644 --- a/src/clients/docker/models/MountVolumeOptions.ts +++ b/src/clients/docker/models/MountVolumeOptions.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { MountVolumeOptionsDriverConfig } from './MountVolumeOptionsDriverConfig'; +import { mapValues } from "../runtime"; +import type { MountVolumeOptionsDriverConfig } from "./MountVolumeOptionsDriverConfig"; import { - MountVolumeOptionsDriverConfigFromJSON, - MountVolumeOptionsDriverConfigFromJSONTyped, - MountVolumeOptionsDriverConfigToJSON, - MountVolumeOptionsDriverConfigToJSONTyped, -} from './MountVolumeOptionsDriverConfig'; + MountVolumeOptionsDriverConfigFromJSON, + MountVolumeOptionsDriverConfigFromJSONTyped, + MountVolumeOptionsDriverConfigToJSON, + MountVolumeOptionsDriverConfigToJSONTyped, +} from "./MountVolumeOptionsDriverConfig"; /** * Optional configuration for the `volume` type. @@ -27,63 +27,69 @@ import { * @interface MountVolumeOptions */ export interface MountVolumeOptions { - /** - * Populate volume with data from the target. - * @type {boolean} - * @memberof MountVolumeOptions - */ - NoCopy?: boolean; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof MountVolumeOptions - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {MountVolumeOptionsDriverConfig} - * @memberof MountVolumeOptions - */ - DriverConfig?: MountVolumeOptionsDriverConfig; + /** + * Populate volume with data from the target. + * @type {boolean} + * @memberof MountVolumeOptions + */ + NoCopy?: boolean; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof MountVolumeOptions + */ + Labels?: { [key: string]: string }; + /** + * + * @type {MountVolumeOptionsDriverConfig} + * @memberof MountVolumeOptions + */ + DriverConfig?: MountVolumeOptionsDriverConfig; } /** * Check if a given object implements the MountVolumeOptions interface. */ export function instanceOfMountVolumeOptions(value: object): value is MountVolumeOptions { - return true; + return true; } export function MountVolumeOptionsFromJSON(json: any): MountVolumeOptions { - return MountVolumeOptionsFromJSONTyped(json, false); + return MountVolumeOptionsFromJSONTyped(json, false); } -export function MountVolumeOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountVolumeOptions { - if (json == null) { - return json; - } - return { - - 'NoCopy': json['NoCopy'] == null ? undefined : json['NoCopy'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'DriverConfig': json['DriverConfig'] == null ? undefined : MountVolumeOptionsDriverConfigFromJSON(json['DriverConfig']), - }; +export function MountVolumeOptionsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): MountVolumeOptions { + if (json == null) { + return json; + } + return { + NoCopy: json["NoCopy"] == null ? undefined : json["NoCopy"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + DriverConfig: + json["DriverConfig"] == null + ? undefined + : MountVolumeOptionsDriverConfigFromJSON(json["DriverConfig"]), + }; } export function MountVolumeOptionsToJSON(json: any): MountVolumeOptions { - return MountVolumeOptionsToJSONTyped(json, false); + return MountVolumeOptionsToJSONTyped(json, false); } -export function MountVolumeOptionsToJSONTyped(value?: MountVolumeOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MountVolumeOptionsToJSONTyped( + value?: MountVolumeOptions | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NoCopy': value['NoCopy'], - 'Labels': value['Labels'], - 'DriverConfig': MountVolumeOptionsDriverConfigToJSON(value['DriverConfig']), - }; + return { + NoCopy: value["NoCopy"], + Labels: value["Labels"], + DriverConfig: MountVolumeOptionsDriverConfigToJSON(value["DriverConfig"]), + }; } - diff --git a/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts b/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts index 5aab53b18c..b29eec9649 100644 --- a/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts +++ b/src/clients/docker/models/MountVolumeOptionsDriverConfig.ts @@ -2,72 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Map of driver specific options * @export * @interface MountVolumeOptionsDriverConfig */ export interface MountVolumeOptionsDriverConfig { - /** - * Name of the driver to use to create the volume. - * @type {string} - * @memberof MountVolumeOptionsDriverConfig - */ - Name?: string; - /** - * key/value map of driver specific options. - * @type {{ [key: string]: string; }} - * @memberof MountVolumeOptionsDriverConfig - */ - Options?: { [key: string]: string; }; + /** + * Name of the driver to use to create the volume. + * @type {string} + * @memberof MountVolumeOptionsDriverConfig + */ + Name?: string; + /** + * key/value map of driver specific options. + * @type {{ [key: string]: string; }} + * @memberof MountVolumeOptionsDriverConfig + */ + Options?: { [key: string]: string }; } /** * Check if a given object implements the MountVolumeOptionsDriverConfig interface. */ -export function instanceOfMountVolumeOptionsDriverConfig(value: object): value is MountVolumeOptionsDriverConfig { - return true; +export function instanceOfMountVolumeOptionsDriverConfig( + value: object, +): value is MountVolumeOptionsDriverConfig { + return true; } export function MountVolumeOptionsDriverConfigFromJSON(json: any): MountVolumeOptionsDriverConfig { - return MountVolumeOptionsDriverConfigFromJSONTyped(json, false); + return MountVolumeOptionsDriverConfigFromJSONTyped(json, false); } -export function MountVolumeOptionsDriverConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): MountVolumeOptionsDriverConfig { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Options': json['Options'] == null ? undefined : json['Options'], - }; +export function MountVolumeOptionsDriverConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): MountVolumeOptionsDriverConfig { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function MountVolumeOptionsDriverConfigToJSON(json: any): MountVolumeOptionsDriverConfig { - return MountVolumeOptionsDriverConfigToJSONTyped(json, false); + return MountVolumeOptionsDriverConfigToJSONTyped(json, false); } -export function MountVolumeOptionsDriverConfigToJSONTyped(value?: MountVolumeOptionsDriverConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MountVolumeOptionsDriverConfigToJSONTyped( + value?: MountVolumeOptionsDriverConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Options': value['Options'], - }; + return { + Name: value["Name"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/Network.ts b/src/clients/docker/models/Network.ts index 5ecaa00c62..a9a44a0974 100644 --- a/src/clients/docker/models/Network.ts +++ b/src/clients/docker/models/Network.ts @@ -2,235 +2,237 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { IPAM } from './IPAM'; -import { - IPAMFromJSON, - IPAMFromJSONTyped, - IPAMToJSON, - IPAMToJSONTyped, -} from './IPAM'; -import type { PeerInfo } from './PeerInfo'; +import { mapValues } from "../runtime"; +import type { IPAM } from "./IPAM"; +import { IPAMFromJSON, IPAMFromJSONTyped, IPAMToJSON, IPAMToJSONTyped } from "./IPAM"; +import type { PeerInfo } from "./PeerInfo"; import { - PeerInfoFromJSON, - PeerInfoFromJSONTyped, - PeerInfoToJSON, - PeerInfoToJSONTyped, -} from './PeerInfo'; -import type { ConfigReference } from './ConfigReference'; + PeerInfoFromJSON, + PeerInfoFromJSONTyped, + PeerInfoToJSON, + PeerInfoToJSONTyped, +} from "./PeerInfo"; +import type { ConfigReference } from "./ConfigReference"; import { - ConfigReferenceFromJSON, - ConfigReferenceFromJSONTyped, - ConfigReferenceToJSON, - ConfigReferenceToJSONTyped, -} from './ConfigReference'; -import type { NetworkContainer } from './NetworkContainer'; + ConfigReferenceFromJSON, + ConfigReferenceFromJSONTyped, + ConfigReferenceToJSON, + ConfigReferenceToJSONTyped, +} from "./ConfigReference"; +import type { NetworkContainer } from "./NetworkContainer"; import { - NetworkContainerFromJSON, - NetworkContainerFromJSONTyped, - NetworkContainerToJSON, - NetworkContainerToJSONTyped, -} from './NetworkContainer'; + NetworkContainerFromJSON, + NetworkContainerFromJSONTyped, + NetworkContainerToJSON, + NetworkContainerToJSONTyped, +} from "./NetworkContainer"; /** - * + * * @export * @interface Network */ export interface Network { - /** - * Name of the network. - * - * @type {string} - * @memberof Network - */ - Name?: string; - /** - * ID that uniquely identifies a network on a single machine. - * - * @type {string} - * @memberof Network - */ - Id?: string; - /** - * Date and time at which the network was created in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Network - */ - Created?: string; - /** - * The level at which the network exists (e.g. `swarm` for cluster-wide - * or `local` for machine level) - * - * @type {string} - * @memberof Network - */ - Scope?: string; - /** - * The name of the driver used to create the network (e.g. `bridge`, - * `overlay`). - * - * @type {string} - * @memberof Network - */ - Driver?: string; - /** - * Whether the network was created with IPv6 enabled. - * - * @type {boolean} - * @memberof Network - */ - EnableIPv6?: boolean; - /** - * - * @type {IPAM} - * @memberof Network - */ - IPAM?: IPAM; - /** - * Whether the network is created to only allow internal networking - * connectivity. - * - * @type {boolean} - * @memberof Network - */ - Internal?: boolean; - /** - * Whether a global / swarm scope network is manually attachable by regular - * containers from workers in swarm mode. - * - * @type {boolean} - * @memberof Network - */ - Attachable?: boolean; - /** - * Whether the network is providing the routing-mesh for the swarm cluster. - * - * @type {boolean} - * @memberof Network - */ - Ingress?: boolean; - /** - * - * @type {ConfigReference} - * @memberof Network - */ - ConfigFrom?: ConfigReference; - /** - * Whether the network is a config-only network. Config-only networks are - * placeholder networks for network configurations to be used by other - * networks. Config-only networks cannot be used directly to run containers - * or services. - * - * @type {boolean} - * @memberof Network - */ - ConfigOnly?: boolean; - /** - * Contains endpoints attached to the network. - * - * @type {{ [key: string]: NetworkContainer; }} - * @memberof Network - */ - Containers?: { [key: string]: NetworkContainer; }; - /** - * Network-specific options uses when creating the network. - * - * @type {{ [key: string]: string; }} - * @memberof Network - */ - Options?: { [key: string]: string; }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Network - */ - Labels?: { [key: string]: string; }; - /** - * List of peer nodes for an overlay network. This field is only present - * for overlay networks, and omitted for other network types. - * - * @type {Array} - * @memberof Network - */ - Peers?: Array | null; + /** + * Name of the network. + * + * @type {string} + * @memberof Network + */ + Name?: string; + /** + * ID that uniquely identifies a network on a single machine. + * + * @type {string} + * @memberof Network + */ + Id?: string; + /** + * Date and time at which the network was created in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Network + */ + Created?: string; + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + * or `local` for machine level) + * + * @type {string} + * @memberof Network + */ + Scope?: string; + /** + * The name of the driver used to create the network (e.g. `bridge`, + * `overlay`). + * + * @type {string} + * @memberof Network + */ + Driver?: string; + /** + * Whether the network was created with IPv6 enabled. + * + * @type {boolean} + * @memberof Network + */ + EnableIPv6?: boolean; + /** + * + * @type {IPAM} + * @memberof Network + */ + IPAM?: IPAM; + /** + * Whether the network is created to only allow internal networking + * connectivity. + * + * @type {boolean} + * @memberof Network + */ + Internal?: boolean; + /** + * Whether a global / swarm scope network is manually attachable by regular + * containers from workers in swarm mode. + * + * @type {boolean} + * @memberof Network + */ + Attachable?: boolean; + /** + * Whether the network is providing the routing-mesh for the swarm cluster. + * + * @type {boolean} + * @memberof Network + */ + Ingress?: boolean; + /** + * + * @type {ConfigReference} + * @memberof Network + */ + ConfigFrom?: ConfigReference; + /** + * Whether the network is a config-only network. Config-only networks are + * placeholder networks for network configurations to be used by other + * networks. Config-only networks cannot be used directly to run containers + * or services. + * + * @type {boolean} + * @memberof Network + */ + ConfigOnly?: boolean; + /** + * Contains endpoints attached to the network. + * + * @type {{ [key: string]: NetworkContainer; }} + * @memberof Network + */ + Containers?: { [key: string]: NetworkContainer }; + /** + * Network-specific options uses when creating the network. + * + * @type {{ [key: string]: string; }} + * @memberof Network + */ + Options?: { [key: string]: string }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof Network + */ + Labels?: { [key: string]: string }; + /** + * List of peer nodes for an overlay network. This field is only present + * for overlay networks, and omitted for other network types. + * + * @type {Array} + * @memberof Network + */ + Peers?: Array | null; } /** * Check if a given object implements the Network interface. */ export function instanceOfNetwork(value: object): value is Network { - return true; + return true; } export function NetworkFromJSON(json: any): Network { - return NetworkFromJSONTyped(json, false); + return NetworkFromJSONTyped(json, false); } export function NetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Network { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Id': json['Id'] == null ? undefined : json['Id'], - 'Created': json['Created'] == null ? undefined : json['Created'], - 'Scope': json['Scope'] == null ? undefined : json['Scope'], - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'EnableIPv6': json['EnableIPv6'] == null ? undefined : json['EnableIPv6'], - 'IPAM': json['IPAM'] == null ? undefined : IPAMFromJSON(json['IPAM']), - 'Internal': json['Internal'] == null ? undefined : json['Internal'], - 'Attachable': json['Attachable'] == null ? undefined : json['Attachable'], - 'Ingress': json['Ingress'] == null ? undefined : json['Ingress'], - 'ConfigFrom': json['ConfigFrom'] == null ? undefined : ConfigReferenceFromJSON(json['ConfigFrom']), - 'ConfigOnly': json['ConfigOnly'] == null ? undefined : json['ConfigOnly'], - 'Containers': json['Containers'] == null ? undefined : (mapValues(json['Containers'], NetworkContainerFromJSON)), - 'Options': json['Options'] == null ? undefined : json['Options'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Peers': json['Peers'] == null ? undefined : ((json['Peers'] as Array).map(PeerInfoFromJSON)), - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Id: json["Id"] == null ? undefined : json["Id"], + Created: json["Created"] == null ? undefined : json["Created"], + Scope: json["Scope"] == null ? undefined : json["Scope"], + Driver: json["Driver"] == null ? undefined : json["Driver"], + EnableIPv6: json["EnableIPv6"] == null ? undefined : json["EnableIPv6"], + IPAM: json["IPAM"] == null ? undefined : IPAMFromJSON(json["IPAM"]), + Internal: json["Internal"] == null ? undefined : json["Internal"], + Attachable: json["Attachable"] == null ? undefined : json["Attachable"], + Ingress: json["Ingress"] == null ? undefined : json["Ingress"], + ConfigFrom: + json["ConfigFrom"] == null ? undefined : ConfigReferenceFromJSON(json["ConfigFrom"]), + ConfigOnly: json["ConfigOnly"] == null ? undefined : json["ConfigOnly"], + Containers: + json["Containers"] == null + ? undefined + : mapValues(json["Containers"], NetworkContainerFromJSON), + Options: json["Options"] == null ? undefined : json["Options"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Peers: json["Peers"] == null ? undefined : (json["Peers"] as Array).map(PeerInfoFromJSON), + }; } export function NetworkToJSON(json: any): Network { - return NetworkToJSONTyped(json, false); + return NetworkToJSONTyped(json, false); } -export function NetworkToJSONTyped(value?: Network | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkToJSONTyped( + value?: Network | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Id': value['Id'], - 'Created': value['Created'], - 'Scope': value['Scope'], - 'Driver': value['Driver'], - 'EnableIPv6': value['EnableIPv6'], - 'IPAM': IPAMToJSON(value['IPAM']), - 'Internal': value['Internal'], - 'Attachable': value['Attachable'], - 'Ingress': value['Ingress'], - 'ConfigFrom': ConfigReferenceToJSON(value['ConfigFrom']), - 'ConfigOnly': value['ConfigOnly'], - 'Containers': value['Containers'] == null ? undefined : (mapValues(value['Containers'], NetworkContainerToJSON)), - 'Options': value['Options'], - 'Labels': value['Labels'], - 'Peers': value['Peers'] == null ? undefined : ((value['Peers'] as Array).map(PeerInfoToJSON)), - }; + return { + Name: value["Name"], + Id: value["Id"], + Created: value["Created"], + Scope: value["Scope"], + Driver: value["Driver"], + EnableIPv6: value["EnableIPv6"], + IPAM: IPAMToJSON(value["IPAM"]), + Internal: value["Internal"], + Attachable: value["Attachable"], + Ingress: value["Ingress"], + ConfigFrom: ConfigReferenceToJSON(value["ConfigFrom"]), + ConfigOnly: value["ConfigOnly"], + Containers: + value["Containers"] == null + ? undefined + : mapValues(value["Containers"], NetworkContainerToJSON), + Options: value["Options"], + Labels: value["Labels"], + Peers: value["Peers"] == null ? undefined : (value["Peers"] as Array).map(PeerInfoToJSON), + }; } - diff --git a/src/clients/docker/models/NetworkAttachmentConfig.ts b/src/clients/docker/models/NetworkAttachmentConfig.ts index 40de3a4080..d0065fa840 100644 --- a/src/clients/docker/models/NetworkAttachmentConfig.ts +++ b/src/clients/docker/models/NetworkAttachmentConfig.ts @@ -2,84 +2,87 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Specifies how a service should be attached to a particular network. - * + * * @export * @interface NetworkAttachmentConfig */ export interface NetworkAttachmentConfig { - /** - * The target network for attachment. Must be a network name or ID. - * - * @type {string} - * @memberof NetworkAttachmentConfig - */ - Target?: string; - /** - * Discoverable alternate names for the service on this network. - * - * @type {Array} - * @memberof NetworkAttachmentConfig - */ - Aliases?: Array; - /** - * Driver attachment options for the network target. - * - * @type {{ [key: string]: string; }} - * @memberof NetworkAttachmentConfig - */ - DriverOpts?: { [key: string]: string; }; + /** + * The target network for attachment. Must be a network name or ID. + * + * @type {string} + * @memberof NetworkAttachmentConfig + */ + Target?: string; + /** + * Discoverable alternate names for the service on this network. + * + * @type {Array} + * @memberof NetworkAttachmentConfig + */ + Aliases?: Array; + /** + * Driver attachment options for the network target. + * + * @type {{ [key: string]: string; }} + * @memberof NetworkAttachmentConfig + */ + DriverOpts?: { [key: string]: string }; } /** * Check if a given object implements the NetworkAttachmentConfig interface. */ export function instanceOfNetworkAttachmentConfig(value: object): value is NetworkAttachmentConfig { - return true; + return true; } export function NetworkAttachmentConfigFromJSON(json: any): NetworkAttachmentConfig { - return NetworkAttachmentConfigFromJSONTyped(json, false); + return NetworkAttachmentConfigFromJSONTyped(json, false); } -export function NetworkAttachmentConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkAttachmentConfig { - if (json == null) { - return json; - } - return { - - 'Target': json['Target'] == null ? undefined : json['Target'], - 'Aliases': json['Aliases'] == null ? undefined : json['Aliases'], - 'DriverOpts': json['DriverOpts'] == null ? undefined : json['DriverOpts'], - }; +export function NetworkAttachmentConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkAttachmentConfig { + if (json == null) { + return json; + } + return { + Target: json["Target"] == null ? undefined : json["Target"], + Aliases: json["Aliases"] == null ? undefined : json["Aliases"], + DriverOpts: json["DriverOpts"] == null ? undefined : json["DriverOpts"], + }; } export function NetworkAttachmentConfigToJSON(json: any): NetworkAttachmentConfig { - return NetworkAttachmentConfigToJSONTyped(json, false); + return NetworkAttachmentConfigToJSONTyped(json, false); } -export function NetworkAttachmentConfigToJSONTyped(value?: NetworkAttachmentConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkAttachmentConfigToJSONTyped( + value?: NetworkAttachmentConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Target': value['Target'], - 'Aliases': value['Aliases'], - 'DriverOpts': value['DriverOpts'], - }; + return { + Target: value["Target"], + Aliases: value["Aliases"], + DriverOpts: value["DriverOpts"], + }; } - diff --git a/src/clients/docker/models/NetworkConnectRequest.ts b/src/clients/docker/models/NetworkConnectRequest.ts index 076f92f69a..3d89b4ad5e 100644 --- a/src/clients/docker/models/NetworkConnectRequest.ts +++ b/src/clients/docker/models/NetworkConnectRequest.ts @@ -2,80 +2,84 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EndpointSettings } from './EndpointSettings'; +import { mapValues } from "../runtime"; +import type { EndpointSettings } from "./EndpointSettings"; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from './EndpointSettings'; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from "./EndpointSettings"; /** - * + * * @export * @interface NetworkConnectRequest */ export interface NetworkConnectRequest { - /** - * The ID or name of the container to connect to the network. - * @type {string} - * @memberof NetworkConnectRequest - */ - Container?: string; - /** - * - * @type {EndpointSettings} - * @memberof NetworkConnectRequest - */ - EndpointConfig?: EndpointSettings; + /** + * The ID or name of the container to connect to the network. + * @type {string} + * @memberof NetworkConnectRequest + */ + Container?: string; + /** + * + * @type {EndpointSettings} + * @memberof NetworkConnectRequest + */ + EndpointConfig?: EndpointSettings; } /** * Check if a given object implements the NetworkConnectRequest interface. */ export function instanceOfNetworkConnectRequest(value: object): value is NetworkConnectRequest { - return true; + return true; } export function NetworkConnectRequestFromJSON(json: any): NetworkConnectRequest { - return NetworkConnectRequestFromJSONTyped(json, false); + return NetworkConnectRequestFromJSONTyped(json, false); } -export function NetworkConnectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkConnectRequest { - if (json == null) { - return json; - } - return { - - 'Container': json['Container'] == null ? undefined : json['Container'], - 'EndpointConfig': json['EndpointConfig'] == null ? undefined : EndpointSettingsFromJSON(json['EndpointConfig']), - }; +export function NetworkConnectRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkConnectRequest { + if (json == null) { + return json; + } + return { + Container: json["Container"] == null ? undefined : json["Container"], + EndpointConfig: + json["EndpointConfig"] == null ? undefined : EndpointSettingsFromJSON(json["EndpointConfig"]), + }; } export function NetworkConnectRequestToJSON(json: any): NetworkConnectRequest { - return NetworkConnectRequestToJSONTyped(json, false); + return NetworkConnectRequestToJSONTyped(json, false); } -export function NetworkConnectRequestToJSONTyped(value?: NetworkConnectRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkConnectRequestToJSONTyped( + value?: NetworkConnectRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Container': value['Container'], - 'EndpointConfig': EndpointSettingsToJSON(value['EndpointConfig']), - }; + return { + Container: value["Container"], + EndpointConfig: EndpointSettingsToJSON(value["EndpointConfig"]), + }; } - diff --git a/src/clients/docker/models/NetworkContainer.ts b/src/clients/docker/models/NetworkContainer.ts index 3d055a7c0e..4dae4fb3f3 100644 --- a/src/clients/docker/models/NetworkContainer.ts +++ b/src/clients/docker/models/NetworkContainer.ts @@ -2,96 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface NetworkContainer */ export interface NetworkContainer { - /** - * - * @type {string} - * @memberof NetworkContainer - */ - Name?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - EndpointID?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - MacAddress?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - IPv4Address?: string; - /** - * - * @type {string} - * @memberof NetworkContainer - */ - IPv6Address?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + Name?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + EndpointID?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + MacAddress?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + IPv4Address?: string; + /** + * + * @type {string} + * @memberof NetworkContainer + */ + IPv6Address?: string; } /** * Check if a given object implements the NetworkContainer interface. */ export function instanceOfNetworkContainer(value: object): value is NetworkContainer { - return true; + return true; } export function NetworkContainerFromJSON(json: any): NetworkContainer { - return NetworkContainerFromJSONTyped(json, false); + return NetworkContainerFromJSONTyped(json, false); } -export function NetworkContainerFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkContainer { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'EndpointID': json['EndpointID'] == null ? undefined : json['EndpointID'], - 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], - 'IPv4Address': json['IPv4Address'] == null ? undefined : json['IPv4Address'], - 'IPv6Address': json['IPv6Address'] == null ? undefined : json['IPv6Address'], - }; +export function NetworkContainerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkContainer { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + EndpointID: json["EndpointID"] == null ? undefined : json["EndpointID"], + MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], + IPv4Address: json["IPv4Address"] == null ? undefined : json["IPv4Address"], + IPv6Address: json["IPv6Address"] == null ? undefined : json["IPv6Address"], + }; } export function NetworkContainerToJSON(json: any): NetworkContainer { - return NetworkContainerToJSONTyped(json, false); + return NetworkContainerToJSONTyped(json, false); } -export function NetworkContainerToJSONTyped(value?: NetworkContainer | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkContainerToJSONTyped( + value?: NetworkContainer | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'EndpointID': value['EndpointID'], - 'MacAddress': value['MacAddress'], - 'IPv4Address': value['IPv4Address'], - 'IPv6Address': value['IPv6Address'], - }; + return { + Name: value["Name"], + EndpointID: value["EndpointID"], + MacAddress: value["MacAddress"], + IPv4Address: value["IPv4Address"], + IPv6Address: value["IPv6Address"], + }; } - diff --git a/src/clients/docker/models/NetworkCreateRequest.ts b/src/clients/docker/models/NetworkCreateRequest.ts index cbc93ddebc..8d00e73b58 100644 --- a/src/clients/docker/models/NetworkCreateRequest.ts +++ b/src/clients/docker/models/NetworkCreateRequest.ts @@ -2,193 +2,192 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { IPAM } from './IPAM'; -import { - IPAMFromJSON, - IPAMFromJSONTyped, - IPAMToJSON, - IPAMToJSONTyped, -} from './IPAM'; -import type { ConfigReference } from './ConfigReference'; +import { mapValues } from "../runtime"; +import type { IPAM } from "./IPAM"; +import { IPAMFromJSON, IPAMFromJSONTyped, IPAMToJSON, IPAMToJSONTyped } from "./IPAM"; +import type { ConfigReference } from "./ConfigReference"; import { - ConfigReferenceFromJSON, - ConfigReferenceFromJSONTyped, - ConfigReferenceToJSON, - ConfigReferenceToJSONTyped, -} from './ConfigReference'; + ConfigReferenceFromJSON, + ConfigReferenceFromJSONTyped, + ConfigReferenceToJSON, + ConfigReferenceToJSONTyped, +} from "./ConfigReference"; /** - * + * * @export * @interface NetworkCreateRequest */ export interface NetworkCreateRequest { - /** - * The network's name. - * @type {string} - * @memberof NetworkCreateRequest - */ - Name: string; - /** - * Check for networks with duplicate names. Since Network is - * primarily keyed based on a random ID and not on the name, and - * network name is strictly a user-friendly alias to the network - * which is uniquely identified using ID, there is no guaranteed - * way to check for duplicates. CheckDuplicate is there to provide - * a best effort checking of any networks which has the same name - * but it is not guaranteed to catch all name collisions. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - CheckDuplicate?: boolean; - /** - * Name of the network driver plugin to use. - * @type {string} - * @memberof NetworkCreateRequest - */ - Driver?: string; - /** - * The level at which the network exists (e.g. `swarm` for cluster-wide - * or `local` for machine level). - * - * @type {string} - * @memberof NetworkCreateRequest - */ - Scope?: string; - /** - * Restrict external access to the network. - * @type {boolean} - * @memberof NetworkCreateRequest - */ - Internal?: boolean; - /** - * Globally scoped network is manually attachable by regular - * containers from workers in swarm mode. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - Attachable?: boolean; - /** - * Ingress network is the network which provides the routing-mesh - * in swarm mode. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - Ingress?: boolean; - /** - * Creates a config-only network. Config-only networks are placeholder - * networks for network configurations to be used by other networks. - * Config-only networks cannot be used directly to run containers - * or services. - * - * @type {boolean} - * @memberof NetworkCreateRequest - */ - ConfigOnly?: boolean; - /** - * - * @type {ConfigReference} - * @memberof NetworkCreateRequest - */ - ConfigFrom?: ConfigReference; - /** - * - * @type {IPAM} - * @memberof NetworkCreateRequest - */ - IPAM?: IPAM; - /** - * Enable IPv6 on the network. - * @type {boolean} - * @memberof NetworkCreateRequest - */ - EnableIPv6?: boolean; - /** - * Network specific options to be used by the drivers. - * @type {{ [key: string]: string; }} - * @memberof NetworkCreateRequest - */ - Options?: { [key: string]: string; }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof NetworkCreateRequest - */ - Labels?: { [key: string]: string; }; + /** + * The network's name. + * @type {string} + * @memberof NetworkCreateRequest + */ + Name: string; + /** + * Check for networks with duplicate names. Since Network is + * primarily keyed based on a random ID and not on the name, and + * network name is strictly a user-friendly alias to the network + * which is uniquely identified using ID, there is no guaranteed + * way to check for duplicates. CheckDuplicate is there to provide + * a best effort checking of any networks which has the same name + * but it is not guaranteed to catch all name collisions. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + CheckDuplicate?: boolean; + /** + * Name of the network driver plugin to use. + * @type {string} + * @memberof NetworkCreateRequest + */ + Driver?: string; + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + * or `local` for machine level). + * + * @type {string} + * @memberof NetworkCreateRequest + */ + Scope?: string; + /** + * Restrict external access to the network. + * @type {boolean} + * @memberof NetworkCreateRequest + */ + Internal?: boolean; + /** + * Globally scoped network is manually attachable by regular + * containers from workers in swarm mode. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + Attachable?: boolean; + /** + * Ingress network is the network which provides the routing-mesh + * in swarm mode. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + Ingress?: boolean; + /** + * Creates a config-only network. Config-only networks are placeholder + * networks for network configurations to be used by other networks. + * Config-only networks cannot be used directly to run containers + * or services. + * + * @type {boolean} + * @memberof NetworkCreateRequest + */ + ConfigOnly?: boolean; + /** + * + * @type {ConfigReference} + * @memberof NetworkCreateRequest + */ + ConfigFrom?: ConfigReference; + /** + * + * @type {IPAM} + * @memberof NetworkCreateRequest + */ + IPAM?: IPAM; + /** + * Enable IPv6 on the network. + * @type {boolean} + * @memberof NetworkCreateRequest + */ + EnableIPv6?: boolean; + /** + * Network specific options to be used by the drivers. + * @type {{ [key: string]: string; }} + * @memberof NetworkCreateRequest + */ + Options?: { [key: string]: string }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof NetworkCreateRequest + */ + Labels?: { [key: string]: string }; } /** * Check if a given object implements the NetworkCreateRequest interface. */ export function instanceOfNetworkCreateRequest(value: object): value is NetworkCreateRequest { - if (!('Name' in value) || value['Name'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + return true; } export function NetworkCreateRequestFromJSON(json: any): NetworkCreateRequest { - return NetworkCreateRequestFromJSONTyped(json, false); + return NetworkCreateRequestFromJSONTyped(json, false); } -export function NetworkCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkCreateRequest { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'CheckDuplicate': json['CheckDuplicate'] == null ? undefined : json['CheckDuplicate'], - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'Scope': json['Scope'] == null ? undefined : json['Scope'], - 'Internal': json['Internal'] == null ? undefined : json['Internal'], - 'Attachable': json['Attachable'] == null ? undefined : json['Attachable'], - 'Ingress': json['Ingress'] == null ? undefined : json['Ingress'], - 'ConfigOnly': json['ConfigOnly'] == null ? undefined : json['ConfigOnly'], - 'ConfigFrom': json['ConfigFrom'] == null ? undefined : ConfigReferenceFromJSON(json['ConfigFrom']), - 'IPAM': json['IPAM'] == null ? undefined : IPAMFromJSON(json['IPAM']), - 'EnableIPv6': json['EnableIPv6'] == null ? undefined : json['EnableIPv6'], - 'Options': json['Options'] == null ? undefined : json['Options'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - }; +export function NetworkCreateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkCreateRequest { + if (json == null) { + return json; + } + return { + Name: json["Name"], + CheckDuplicate: json["CheckDuplicate"] == null ? undefined : json["CheckDuplicate"], + Driver: json["Driver"] == null ? undefined : json["Driver"], + Scope: json["Scope"] == null ? undefined : json["Scope"], + Internal: json["Internal"] == null ? undefined : json["Internal"], + Attachable: json["Attachable"] == null ? undefined : json["Attachable"], + Ingress: json["Ingress"] == null ? undefined : json["Ingress"], + ConfigOnly: json["ConfigOnly"] == null ? undefined : json["ConfigOnly"], + ConfigFrom: + json["ConfigFrom"] == null ? undefined : ConfigReferenceFromJSON(json["ConfigFrom"]), + IPAM: json["IPAM"] == null ? undefined : IPAMFromJSON(json["IPAM"]), + EnableIPv6: json["EnableIPv6"] == null ? undefined : json["EnableIPv6"], + Options: json["Options"] == null ? undefined : json["Options"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + }; } export function NetworkCreateRequestToJSON(json: any): NetworkCreateRequest { - return NetworkCreateRequestToJSONTyped(json, false); + return NetworkCreateRequestToJSONTyped(json, false); } -export function NetworkCreateRequestToJSONTyped(value?: NetworkCreateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkCreateRequestToJSONTyped( + value?: NetworkCreateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'CheckDuplicate': value['CheckDuplicate'], - 'Driver': value['Driver'], - 'Scope': value['Scope'], - 'Internal': value['Internal'], - 'Attachable': value['Attachable'], - 'Ingress': value['Ingress'], - 'ConfigOnly': value['ConfigOnly'], - 'ConfigFrom': ConfigReferenceToJSON(value['ConfigFrom']), - 'IPAM': IPAMToJSON(value['IPAM']), - 'EnableIPv6': value['EnableIPv6'], - 'Options': value['Options'], - 'Labels': value['Labels'], - }; + return { + Name: value["Name"], + CheckDuplicate: value["CheckDuplicate"], + Driver: value["Driver"], + Scope: value["Scope"], + Internal: value["Internal"], + Attachable: value["Attachable"], + Ingress: value["Ingress"], + ConfigOnly: value["ConfigOnly"], + ConfigFrom: ConfigReferenceToJSON(value["ConfigFrom"]), + IPAM: IPAMToJSON(value["IPAM"]), + EnableIPv6: value["EnableIPv6"], + Options: value["Options"], + Labels: value["Labels"], + }; } - diff --git a/src/clients/docker/models/NetworkCreateResponse.ts b/src/clients/docker/models/NetworkCreateResponse.ts index 620fcdde45..d5fe14fb85 100644 --- a/src/clients/docker/models/NetworkCreateResponse.ts +++ b/src/clients/docker/models/NetworkCreateResponse.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface NetworkCreateResponse */ export interface NetworkCreateResponse { - /** - * The ID of the created network. - * @type {string} - * @memberof NetworkCreateResponse - */ - Id?: string; - /** - * - * @type {string} - * @memberof NetworkCreateResponse - */ - Warning?: string; + /** + * The ID of the created network. + * @type {string} + * @memberof NetworkCreateResponse + */ + Id?: string; + /** + * + * @type {string} + * @memberof NetworkCreateResponse + */ + Warning?: string; } /** * Check if a given object implements the NetworkCreateResponse interface. */ export function instanceOfNetworkCreateResponse(value: object): value is NetworkCreateResponse { - return true; + return true; } export function NetworkCreateResponseFromJSON(json: any): NetworkCreateResponse { - return NetworkCreateResponseFromJSONTyped(json, false); + return NetworkCreateResponseFromJSONTyped(json, false); } -export function NetworkCreateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkCreateResponse { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'] == null ? undefined : json['Id'], - 'Warning': json['Warning'] == null ? undefined : json['Warning'], - }; +export function NetworkCreateResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkCreateResponse { + if (json == null) { + return json; + } + return { + Id: json["Id"] == null ? undefined : json["Id"], + Warning: json["Warning"] == null ? undefined : json["Warning"], + }; } export function NetworkCreateResponseToJSON(json: any): NetworkCreateResponse { - return NetworkCreateResponseToJSONTyped(json, false); + return NetworkCreateResponseToJSONTyped(json, false); } -export function NetworkCreateResponseToJSONTyped(value?: NetworkCreateResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkCreateResponseToJSONTyped( + value?: NetworkCreateResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'Warning': value['Warning'], - }; + return { + Id: value["Id"], + Warning: value["Warning"], + }; } - diff --git a/src/clients/docker/models/NetworkDisconnectRequest.ts b/src/clients/docker/models/NetworkDisconnectRequest.ts index d412bface8..beda891bf3 100644 --- a/src/clients/docker/models/NetworkDisconnectRequest.ts +++ b/src/clients/docker/models/NetworkDisconnectRequest.ts @@ -2,74 +2,79 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface NetworkDisconnectRequest */ export interface NetworkDisconnectRequest { - /** - * The ID or name of the container to disconnect from the network. - * - * @type {string} - * @memberof NetworkDisconnectRequest - */ - Container?: string; - /** - * Force the container to disconnect from the network. - * - * @type {boolean} - * @memberof NetworkDisconnectRequest - */ - Force?: boolean; + /** + * The ID or name of the container to disconnect from the network. + * + * @type {string} + * @memberof NetworkDisconnectRequest + */ + Container?: string; + /** + * Force the container to disconnect from the network. + * + * @type {boolean} + * @memberof NetworkDisconnectRequest + */ + Force?: boolean; } /** * Check if a given object implements the NetworkDisconnectRequest interface. */ -export function instanceOfNetworkDisconnectRequest(value: object): value is NetworkDisconnectRequest { - return true; +export function instanceOfNetworkDisconnectRequest( + value: object, +): value is NetworkDisconnectRequest { + return true; } export function NetworkDisconnectRequestFromJSON(json: any): NetworkDisconnectRequest { - return NetworkDisconnectRequestFromJSONTyped(json, false); + return NetworkDisconnectRequestFromJSONTyped(json, false); } -export function NetworkDisconnectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkDisconnectRequest { - if (json == null) { - return json; - } - return { - - 'Container': json['Container'] == null ? undefined : json['Container'], - 'Force': json['Force'] == null ? undefined : json['Force'], - }; +export function NetworkDisconnectRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkDisconnectRequest { + if (json == null) { + return json; + } + return { + Container: json["Container"] == null ? undefined : json["Container"], + Force: json["Force"] == null ? undefined : json["Force"], + }; } export function NetworkDisconnectRequestToJSON(json: any): NetworkDisconnectRequest { - return NetworkDisconnectRequestToJSONTyped(json, false); + return NetworkDisconnectRequestToJSONTyped(json, false); } -export function NetworkDisconnectRequestToJSONTyped(value?: NetworkDisconnectRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkDisconnectRequestToJSONTyped( + value?: NetworkDisconnectRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Container': value['Container'], - 'Force': value['Force'], - }; + return { + Container: value["Container"], + Force: value["Force"], + }; } - diff --git a/src/clients/docker/models/NetworkPruneResponse.ts b/src/clients/docker/models/NetworkPruneResponse.ts index 3423d03748..5210e325ec 100644 --- a/src/clients/docker/models/NetworkPruneResponse.ts +++ b/src/clients/docker/models/NetworkPruneResponse.ts @@ -2,64 +2,67 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface NetworkPruneResponse */ export interface NetworkPruneResponse { - /** - * Networks that were deleted - * @type {Array} - * @memberof NetworkPruneResponse - */ - NetworksDeleted?: Array; + /** + * Networks that were deleted + * @type {Array} + * @memberof NetworkPruneResponse + */ + NetworksDeleted?: Array; } /** * Check if a given object implements the NetworkPruneResponse interface. */ export function instanceOfNetworkPruneResponse(value: object): value is NetworkPruneResponse { - return true; + return true; } export function NetworkPruneResponseFromJSON(json: any): NetworkPruneResponse { - return NetworkPruneResponseFromJSONTyped(json, false); + return NetworkPruneResponseFromJSONTyped(json, false); } -export function NetworkPruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkPruneResponse { - if (json == null) { - return json; - } - return { - - 'NetworksDeleted': json['NetworksDeleted'] == null ? undefined : json['NetworksDeleted'], - }; +export function NetworkPruneResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkPruneResponse { + if (json == null) { + return json; + } + return { + NetworksDeleted: json["NetworksDeleted"] == null ? undefined : json["NetworksDeleted"], + }; } export function NetworkPruneResponseToJSON(json: any): NetworkPruneResponse { - return NetworkPruneResponseToJSONTyped(json, false); + return NetworkPruneResponseToJSONTyped(json, false); } -export function NetworkPruneResponseToJSONTyped(value?: NetworkPruneResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkPruneResponseToJSONTyped( + value?: NetworkPruneResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NetworksDeleted': value['NetworksDeleted'], - }; + return { + NetworksDeleted: value["NetworksDeleted"], + }; } - diff --git a/src/clients/docker/models/NetworkSettings.ts b/src/clients/docker/models/NetworkSettings.ts index 3770d62aae..cfb2a3c1ee 100644 --- a/src/clients/docker/models/NetworkSettings.ts +++ b/src/clients/docker/models/NetworkSettings.ts @@ -2,38 +2,38 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PortBinding } from './PortBinding'; +import { mapValues } from "../runtime"; +import type { PortBinding } from "./PortBinding"; import { - PortBindingFromJSON, - PortBindingFromJSONTyped, - PortBindingToJSON, - PortBindingToJSONTyped, -} from './PortBinding'; -import type { Address } from './Address'; + PortBindingFromJSON, + PortBindingFromJSONTyped, + PortBindingToJSON, + PortBindingToJSONTyped, +} from "./PortBinding"; +import type { Address } from "./Address"; import { - AddressFromJSON, - AddressFromJSONTyped, - AddressToJSON, - AddressToJSONTyped, -} from './Address'; -import type { EndpointSettings } from './EndpointSettings'; + AddressFromJSON, + AddressFromJSONTyped, + AddressToJSON, + AddressToJSONTyped, +} from "./Address"; +import type { EndpointSettings } from "./EndpointSettings"; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from './EndpointSettings'; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from "./EndpointSettings"; /** * NetworkSettings exposes the network settings in the API @@ -41,263 +41,283 @@ import { * @interface NetworkSettings */ export interface NetworkSettings { - /** - * Name of the network's bridge (for example, `docker0`). - * @type {string} - * @memberof NetworkSettings - */ - Bridge?: string; - /** - * SandboxID uniquely represents a container's network stack. - * @type {string} - * @memberof NetworkSettings - */ - SandboxID?: string; - /** - * Indicates if hairpin NAT should be enabled on the virtual interface. - * - * @type {boolean} - * @memberof NetworkSettings - */ - HairpinMode?: boolean; - /** - * IPv6 unicast address using the link-local prefix. - * @type {string} - * @memberof NetworkSettings - */ - LinkLocalIPv6Address?: string; - /** - * Prefix length of the IPv6 unicast address. - * @type {number} - * @memberof NetworkSettings - */ - LinkLocalIPv6PrefixLen?: number; - /** - * PortMap describes the mapping of container ports to host ports, using the - * container's port-number and protocol as key in the format `/`, - * for example, `80/udp`. - * - * If a container's port is mapped for multiple protocols, separate entries - * are added to the mapping table. - * - * @type {{ [key: string]: Array | null; }} - * @memberof NetworkSettings - */ - Ports?: { [key: string]: Array | null; }; - /** - * SandboxKey identifies the sandbox - * @type {string} - * @memberof NetworkSettings - */ - SandboxKey?: string; - /** - * - * @type {Array
} - * @memberof NetworkSettings - */ - SecondaryIPAddresses?: Array
| null; - /** - * - * @type {Array
} - * @memberof NetworkSettings - */ - SecondaryIPv6Addresses?: Array
| null; - /** - * EndpointID uniquely represents a service endpoint in a Sandbox. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - EndpointID?: string; - /** - * Gateway address for the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - Gateway?: string; - /** - * Global IPv6 address for the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - GlobalIPv6Address?: string; - /** - * Mask length of the global IPv6 address. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {number} - * @memberof NetworkSettings - */ - GlobalIPv6PrefixLen?: number; - /** - * IPv4 address for the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - IPAddress?: string; - /** - * Mask length of the IPv4 address. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {number} - * @memberof NetworkSettings - */ - IPPrefixLen?: number; - /** - * IPv6 gateway address for this network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - IPv6Gateway?: string; - /** - * MAC address for the container on the default "bridge" network. - * - *


- * - * > **Deprecated**: This field is only propagated when attached to the - * > default "bridge" network. Use the information from the "bridge" - * > network inside the `Networks` map instead, which contains the same - * > information. This field was deprecated in Docker 1.9 and is scheduled - * > to be removed in Docker 17.12.0 - * - * @type {string} - * @memberof NetworkSettings - */ - MacAddress?: string; - /** - * Information about all networks that the container is connected to. - * - * @type {{ [key: string]: EndpointSettings; }} - * @memberof NetworkSettings - */ - Networks?: { [key: string]: EndpointSettings; }; + /** + * Name of the network's bridge (for example, `docker0`). + * @type {string} + * @memberof NetworkSettings + */ + Bridge?: string; + /** + * SandboxID uniquely represents a container's network stack. + * @type {string} + * @memberof NetworkSettings + */ + SandboxID?: string; + /** + * Indicates if hairpin NAT should be enabled on the virtual interface. + * + * @type {boolean} + * @memberof NetworkSettings + */ + HairpinMode?: boolean; + /** + * IPv6 unicast address using the link-local prefix. + * @type {string} + * @memberof NetworkSettings + */ + LinkLocalIPv6Address?: string; + /** + * Prefix length of the IPv6 unicast address. + * @type {number} + * @memberof NetworkSettings + */ + LinkLocalIPv6PrefixLen?: number; + /** + * PortMap describes the mapping of container ports to host ports, using the + * container's port-number and protocol as key in the format `/`, + * for example, `80/udp`. + * + * If a container's port is mapped for multiple protocols, separate entries + * are added to the mapping table. + * + * @type {{ [key: string]: Array | null; }} + * @memberof NetworkSettings + */ + Ports?: { [key: string]: Array | null }; + /** + * SandboxKey identifies the sandbox + * @type {string} + * @memberof NetworkSettings + */ + SandboxKey?: string; + /** + * + * @type {Array
} + * @memberof NetworkSettings + */ + SecondaryIPAddresses?: Array
| null; + /** + * + * @type {Array
} + * @memberof NetworkSettings + */ + SecondaryIPv6Addresses?: Array
| null; + /** + * EndpointID uniquely represents a service endpoint in a Sandbox. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + EndpointID?: string; + /** + * Gateway address for the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + Gateway?: string; + /** + * Global IPv6 address for the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + GlobalIPv6Address?: string; + /** + * Mask length of the global IPv6 address. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {number} + * @memberof NetworkSettings + */ + GlobalIPv6PrefixLen?: number; + /** + * IPv4 address for the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + IPAddress?: string; + /** + * Mask length of the IPv4 address. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {number} + * @memberof NetworkSettings + */ + IPPrefixLen?: number; + /** + * IPv6 gateway address for this network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + IPv6Gateway?: string; + /** + * MAC address for the container on the default "bridge" network. + * + *


+ * + * > **Deprecated**: This field is only propagated when attached to the + * > default "bridge" network. Use the information from the "bridge" + * > network inside the `Networks` map instead, which contains the same + * > information. This field was deprecated in Docker 1.9 and is scheduled + * > to be removed in Docker 17.12.0 + * + * @type {string} + * @memberof NetworkSettings + */ + MacAddress?: string; + /** + * Information about all networks that the container is connected to. + * + * @type {{ [key: string]: EndpointSettings; }} + * @memberof NetworkSettings + */ + Networks?: { [key: string]: EndpointSettings }; } /** * Check if a given object implements the NetworkSettings interface. */ export function instanceOfNetworkSettings(value: object): value is NetworkSettings { - return true; + return true; } export function NetworkSettingsFromJSON(json: any): NetworkSettings { - return NetworkSettingsFromJSONTyped(json, false); + return NetworkSettingsFromJSONTyped(json, false); } -export function NetworkSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkSettings { - if (json == null) { - return json; - } - return { - - 'Bridge': json['Bridge'] == null ? undefined : json['Bridge'], - 'SandboxID': json['SandboxID'] == null ? undefined : json['SandboxID'], - 'HairpinMode': json['HairpinMode'] == null ? undefined : json['HairpinMode'], - 'LinkLocalIPv6Address': json['LinkLocalIPv6Address'] == null ? undefined : json['LinkLocalIPv6Address'], - 'LinkLocalIPv6PrefixLen': json['LinkLocalIPv6PrefixLen'] == null ? undefined : json['LinkLocalIPv6PrefixLen'], - 'Ports': json['Ports'] == null ? undefined : json['Ports'], - 'SandboxKey': json['SandboxKey'] == null ? undefined : json['SandboxKey'], - 'SecondaryIPAddresses': json['SecondaryIPAddresses'] == null ? undefined : ((json['SecondaryIPAddresses'] as Array).map(AddressFromJSON)), - 'SecondaryIPv6Addresses': json['SecondaryIPv6Addresses'] == null ? undefined : ((json['SecondaryIPv6Addresses'] as Array).map(AddressFromJSON)), - 'EndpointID': json['EndpointID'] == null ? undefined : json['EndpointID'], - 'Gateway': json['Gateway'] == null ? undefined : json['Gateway'], - 'GlobalIPv6Address': json['GlobalIPv6Address'] == null ? undefined : json['GlobalIPv6Address'], - 'GlobalIPv6PrefixLen': json['GlobalIPv6PrefixLen'] == null ? undefined : json['GlobalIPv6PrefixLen'], - 'IPAddress': json['IPAddress'] == null ? undefined : json['IPAddress'], - 'IPPrefixLen': json['IPPrefixLen'] == null ? undefined : json['IPPrefixLen'], - 'IPv6Gateway': json['IPv6Gateway'] == null ? undefined : json['IPv6Gateway'], - 'MacAddress': json['MacAddress'] == null ? undefined : json['MacAddress'], - 'Networks': json['Networks'] == null ? undefined : (mapValues(json['Networks'], EndpointSettingsFromJSON)), - }; +export function NetworkSettingsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkSettings { + if (json == null) { + return json; + } + return { + Bridge: json["Bridge"] == null ? undefined : json["Bridge"], + SandboxID: json["SandboxID"] == null ? undefined : json["SandboxID"], + HairpinMode: json["HairpinMode"] == null ? undefined : json["HairpinMode"], + LinkLocalIPv6Address: + json["LinkLocalIPv6Address"] == null ? undefined : json["LinkLocalIPv6Address"], + LinkLocalIPv6PrefixLen: + json["LinkLocalIPv6PrefixLen"] == null ? undefined : json["LinkLocalIPv6PrefixLen"], + Ports: json["Ports"] == null ? undefined : json["Ports"], + SandboxKey: json["SandboxKey"] == null ? undefined : json["SandboxKey"], + SecondaryIPAddresses: + json["SecondaryIPAddresses"] == null + ? undefined + : (json["SecondaryIPAddresses"] as Array).map(AddressFromJSON), + SecondaryIPv6Addresses: + json["SecondaryIPv6Addresses"] == null + ? undefined + : (json["SecondaryIPv6Addresses"] as Array).map(AddressFromJSON), + EndpointID: json["EndpointID"] == null ? undefined : json["EndpointID"], + Gateway: json["Gateway"] == null ? undefined : json["Gateway"], + GlobalIPv6Address: json["GlobalIPv6Address"] == null ? undefined : json["GlobalIPv6Address"], + GlobalIPv6PrefixLen: + json["GlobalIPv6PrefixLen"] == null ? undefined : json["GlobalIPv6PrefixLen"], + IPAddress: json["IPAddress"] == null ? undefined : json["IPAddress"], + IPPrefixLen: json["IPPrefixLen"] == null ? undefined : json["IPPrefixLen"], + IPv6Gateway: json["IPv6Gateway"] == null ? undefined : json["IPv6Gateway"], + MacAddress: json["MacAddress"] == null ? undefined : json["MacAddress"], + Networks: + json["Networks"] == null ? undefined : mapValues(json["Networks"], EndpointSettingsFromJSON), + }; } export function NetworkSettingsToJSON(json: any): NetworkSettings { - return NetworkSettingsToJSONTyped(json, false); + return NetworkSettingsToJSONTyped(json, false); } -export function NetworkSettingsToJSONTyped(value?: NetworkSettings | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkSettingsToJSONTyped( + value?: NetworkSettings | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Bridge': value['Bridge'], - 'SandboxID': value['SandboxID'], - 'HairpinMode': value['HairpinMode'], - 'LinkLocalIPv6Address': value['LinkLocalIPv6Address'], - 'LinkLocalIPv6PrefixLen': value['LinkLocalIPv6PrefixLen'], - 'Ports': value['Ports'], - 'SandboxKey': value['SandboxKey'], - 'SecondaryIPAddresses': value['SecondaryIPAddresses'] == null ? undefined : ((value['SecondaryIPAddresses'] as Array).map(AddressToJSON)), - 'SecondaryIPv6Addresses': value['SecondaryIPv6Addresses'] == null ? undefined : ((value['SecondaryIPv6Addresses'] as Array).map(AddressToJSON)), - 'EndpointID': value['EndpointID'], - 'Gateway': value['Gateway'], - 'GlobalIPv6Address': value['GlobalIPv6Address'], - 'GlobalIPv6PrefixLen': value['GlobalIPv6PrefixLen'], - 'IPAddress': value['IPAddress'], - 'IPPrefixLen': value['IPPrefixLen'], - 'IPv6Gateway': value['IPv6Gateway'], - 'MacAddress': value['MacAddress'], - 'Networks': value['Networks'] == null ? undefined : (mapValues(value['Networks'], EndpointSettingsToJSON)), - }; + return { + Bridge: value["Bridge"], + SandboxID: value["SandboxID"], + HairpinMode: value["HairpinMode"], + LinkLocalIPv6Address: value["LinkLocalIPv6Address"], + LinkLocalIPv6PrefixLen: value["LinkLocalIPv6PrefixLen"], + Ports: value["Ports"], + SandboxKey: value["SandboxKey"], + SecondaryIPAddresses: + value["SecondaryIPAddresses"] == null + ? undefined + : (value["SecondaryIPAddresses"] as Array).map(AddressToJSON), + SecondaryIPv6Addresses: + value["SecondaryIPv6Addresses"] == null + ? undefined + : (value["SecondaryIPv6Addresses"] as Array).map(AddressToJSON), + EndpointID: value["EndpointID"], + Gateway: value["Gateway"], + GlobalIPv6Address: value["GlobalIPv6Address"], + GlobalIPv6PrefixLen: value["GlobalIPv6PrefixLen"], + IPAddress: value["IPAddress"], + IPPrefixLen: value["IPPrefixLen"], + IPv6Gateway: value["IPv6Gateway"], + MacAddress: value["MacAddress"], + Networks: + value["Networks"] == null ? undefined : mapValues(value["Networks"], EndpointSettingsToJSON), + }; } - diff --git a/src/clients/docker/models/NetworkingConfig.ts b/src/clients/docker/models/NetworkingConfig.ts index 957708513d..d5afd00598 100644 --- a/src/clients/docker/models/NetworkingConfig.ts +++ b/src/clients/docker/models/NetworkingConfig.ts @@ -2,77 +2,86 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EndpointSettings } from './EndpointSettings'; +import { mapValues } from "../runtime"; +import type { EndpointSettings } from "./EndpointSettings"; import { - EndpointSettingsFromJSON, - EndpointSettingsFromJSONTyped, - EndpointSettingsToJSON, - EndpointSettingsToJSONTyped, -} from './EndpointSettings'; + EndpointSettingsFromJSON, + EndpointSettingsFromJSONTyped, + EndpointSettingsToJSON, + EndpointSettingsToJSONTyped, +} from "./EndpointSettings"; /** * 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. - * + * * @export * @interface NetworkingConfig */ export interface NetworkingConfig { - /** - * A mapping of network name to endpoint configuration for that network. - * - * @type {{ [key: string]: EndpointSettings; }} - * @memberof NetworkingConfig - */ - EndpointsConfig?: { [key: string]: EndpointSettings; }; + /** + * A mapping of network name to endpoint configuration for that network. + * + * @type {{ [key: string]: EndpointSettings; }} + * @memberof NetworkingConfig + */ + EndpointsConfig?: { [key: string]: EndpointSettings }; } /** * Check if a given object implements the NetworkingConfig interface. */ export function instanceOfNetworkingConfig(value: object): value is NetworkingConfig { - return true; + return true; } export function NetworkingConfigFromJSON(json: any): NetworkingConfig { - return NetworkingConfigFromJSONTyped(json, false); + return NetworkingConfigFromJSONTyped(json, false); } -export function NetworkingConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): NetworkingConfig { - if (json == null) { - return json; - } - return { - - 'EndpointsConfig': json['EndpointsConfig'] == null ? undefined : (mapValues(json['EndpointsConfig'], EndpointSettingsFromJSON)), - }; +export function NetworkingConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NetworkingConfig { + if (json == null) { + return json; + } + return { + EndpointsConfig: + json["EndpointsConfig"] == null + ? undefined + : mapValues(json["EndpointsConfig"], EndpointSettingsFromJSON), + }; } export function NetworkingConfigToJSON(json: any): NetworkingConfig { - return NetworkingConfigToJSONTyped(json, false); + return NetworkingConfigToJSONTyped(json, false); } -export function NetworkingConfigToJSONTyped(value?: NetworkingConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NetworkingConfigToJSONTyped( + value?: NetworkingConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'EndpointsConfig': value['EndpointsConfig'] == null ? undefined : (mapValues(value['EndpointsConfig'], EndpointSettingsToJSON)), - }; + return { + EndpointsConfig: + value["EndpointsConfig"] == null + ? undefined + : mapValues(value["EndpointsConfig"], EndpointSettingsToJSON), + }; } - diff --git a/src/clients/docker/models/Node.ts b/src/clients/docker/models/Node.ts index 8c413fa05c..f88651c29b 100644 --- a/src/clients/docker/models/Node.ts +++ b/src/clients/docker/models/Node.ts @@ -2,160 +2,159 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { NodeDescription } from './NodeDescription'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { NodeDescription } from "./NodeDescription"; import { - NodeDescriptionFromJSON, - NodeDescriptionFromJSONTyped, - NodeDescriptionToJSON, - NodeDescriptionToJSONTyped, -} from './NodeDescription'; -import type { ManagerStatus } from './ManagerStatus'; + NodeDescriptionFromJSON, + NodeDescriptionFromJSONTyped, + NodeDescriptionToJSON, + NodeDescriptionToJSONTyped, +} from "./NodeDescription"; +import type { ManagerStatus } from "./ManagerStatus"; import { - ManagerStatusFromJSON, - ManagerStatusFromJSONTyped, - ManagerStatusToJSON, - ManagerStatusToJSONTyped, -} from './ManagerStatus'; -import type { NodeSpec } from './NodeSpec'; + ManagerStatusFromJSON, + ManagerStatusFromJSONTyped, + ManagerStatusToJSON, + ManagerStatusToJSONTyped, +} from "./ManagerStatus"; +import type { NodeSpec } from "./NodeSpec"; import { - NodeSpecFromJSON, - NodeSpecFromJSONTyped, - NodeSpecToJSON, - NodeSpecToJSONTyped, -} from './NodeSpec'; -import type { NodeStatus } from './NodeStatus'; + NodeSpecFromJSON, + NodeSpecFromJSONTyped, + NodeSpecToJSON, + NodeSpecToJSONTyped, +} from "./NodeSpec"; +import type { NodeStatus } from "./NodeStatus"; import { - NodeStatusFromJSON, - NodeStatusFromJSONTyped, - NodeStatusToJSON, - NodeStatusToJSONTyped, -} from './NodeStatus'; + NodeStatusFromJSON, + NodeStatusFromJSONTyped, + NodeStatusToJSON, + NodeStatusToJSONTyped, +} from "./NodeStatus"; /** - * + * * @export * @interface Node */ export interface Node { - /** - * - * @type {string} - * @memberof Node - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Node - */ - Version?: ObjectVersion; - /** - * Date and time at which the node was added to the swarm in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Node - */ - CreatedAt?: string; - /** - * Date and time at which the node was last updated in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Node - */ - UpdatedAt?: string; - /** - * - * @type {NodeSpec} - * @memberof Node - */ - Spec?: NodeSpec; - /** - * - * @type {NodeDescription} - * @memberof Node - */ - Description?: NodeDescription; - /** - * - * @type {NodeStatus} - * @memberof Node - */ - Status?: NodeStatus; - /** - * - * @type {ManagerStatus} - * @memberof Node - */ - ManagerStatus?: ManagerStatus | null; + /** + * + * @type {string} + * @memberof Node + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Node + */ + Version?: ObjectVersion; + /** + * Date and time at which the node was added to the swarm in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Node + */ + CreatedAt?: string; + /** + * Date and time at which the node was last updated in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Node + */ + UpdatedAt?: string; + /** + * + * @type {NodeSpec} + * @memberof Node + */ + Spec?: NodeSpec; + /** + * + * @type {NodeDescription} + * @memberof Node + */ + Description?: NodeDescription; + /** + * + * @type {NodeStatus} + * @memberof Node + */ + Status?: NodeStatus; + /** + * + * @type {ManagerStatus} + * @memberof Node + */ + ManagerStatus?: ManagerStatus | null; } /** * Check if a given object implements the Node interface. */ export function instanceOfNode(value: object): value is Node { - return true; + return true; } export function NodeFromJSON(json: any): Node { - return NodeFromJSONTyped(json, false); + return NodeFromJSONTyped(json, false); } export function NodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Node { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : NodeSpecFromJSON(json['Spec']), - 'Description': json['Description'] == null ? undefined : NodeDescriptionFromJSON(json['Description']), - 'Status': json['Status'] == null ? undefined : NodeStatusFromJSON(json['Status']), - 'ManagerStatus': json['ManagerStatus'] == null ? undefined : ManagerStatusFromJSON(json['ManagerStatus']), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : NodeSpecFromJSON(json["Spec"]), + Description: + json["Description"] == null ? undefined : NodeDescriptionFromJSON(json["Description"]), + Status: json["Status"] == null ? undefined : NodeStatusFromJSON(json["Status"]), + ManagerStatus: + json["ManagerStatus"] == null ? undefined : ManagerStatusFromJSON(json["ManagerStatus"]), + }; } export function NodeToJSON(json: any): Node { - return NodeToJSONTyped(json, false); + return NodeToJSONTyped(json, false); } export function NodeToJSONTyped(value?: Node | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': NodeSpecToJSON(value['Spec']), - 'Description': NodeDescriptionToJSON(value['Description']), - 'Status': NodeStatusToJSON(value['Status']), - 'ManagerStatus': ManagerStatusToJSON(value['ManagerStatus']), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: NodeSpecToJSON(value["Spec"]), + Description: NodeDescriptionToJSON(value["Description"]), + Status: NodeStatusToJSON(value["Status"]), + ManagerStatus: ManagerStatusToJSON(value["ManagerStatus"]), + }; } - diff --git a/src/clients/docker/models/NodeDescription.ts b/src/clients/docker/models/NodeDescription.ts index d808df8a79..e730e86f96 100644 --- a/src/clients/docker/models/NodeDescription.ts +++ b/src/clients/docker/models/NodeDescription.ts @@ -2,127 +2,130 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceObject } from './ResourceObject'; +import { mapValues } from "../runtime"; +import type { ResourceObject } from "./ResourceObject"; import { - ResourceObjectFromJSON, - ResourceObjectFromJSONTyped, - ResourceObjectToJSON, - ResourceObjectToJSONTyped, -} from './ResourceObject'; -import type { Platform } from './Platform'; + ResourceObjectFromJSON, + ResourceObjectFromJSONTyped, + ResourceObjectToJSON, + ResourceObjectToJSONTyped, +} from "./ResourceObject"; +import type { Platform } from "./Platform"; import { - PlatformFromJSON, - PlatformFromJSONTyped, - PlatformToJSON, - PlatformToJSONTyped, -} from './Platform'; -import type { TLSInfo } from './TLSInfo'; + PlatformFromJSON, + PlatformFromJSONTyped, + PlatformToJSON, + PlatformToJSONTyped, +} from "./Platform"; +import type { TLSInfo } from "./TLSInfo"; import { - TLSInfoFromJSON, - TLSInfoFromJSONTyped, - TLSInfoToJSON, - TLSInfoToJSONTyped, -} from './TLSInfo'; -import type { EngineDescription } from './EngineDescription'; + TLSInfoFromJSON, + TLSInfoFromJSONTyped, + TLSInfoToJSON, + TLSInfoToJSONTyped, +} from "./TLSInfo"; +import type { EngineDescription } from "./EngineDescription"; import { - EngineDescriptionFromJSON, - EngineDescriptionFromJSONTyped, - EngineDescriptionToJSON, - EngineDescriptionToJSONTyped, -} from './EngineDescription'; + EngineDescriptionFromJSON, + EngineDescriptionFromJSONTyped, + EngineDescriptionToJSON, + EngineDescriptionToJSONTyped, +} from "./EngineDescription"; /** * NodeDescription encapsulates the properties of the Node as reported by the * agent. - * + * * @export * @interface NodeDescription */ export interface NodeDescription { - /** - * - * @type {string} - * @memberof NodeDescription - */ - Hostname?: string; - /** - * - * @type {Platform} - * @memberof NodeDescription - */ - Platform?: Platform; - /** - * - * @type {ResourceObject} - * @memberof NodeDescription - */ - Resources?: ResourceObject; - /** - * - * @type {EngineDescription} - * @memberof NodeDescription - */ - Engine?: EngineDescription; - /** - * - * @type {TLSInfo} - * @memberof NodeDescription - */ - TLSInfo?: TLSInfo; + /** + * + * @type {string} + * @memberof NodeDescription + */ + Hostname?: string; + /** + * + * @type {Platform} + * @memberof NodeDescription + */ + Platform?: Platform; + /** + * + * @type {ResourceObject} + * @memberof NodeDescription + */ + Resources?: ResourceObject; + /** + * + * @type {EngineDescription} + * @memberof NodeDescription + */ + Engine?: EngineDescription; + /** + * + * @type {TLSInfo} + * @memberof NodeDescription + */ + TLSInfo?: TLSInfo; } /** * Check if a given object implements the NodeDescription interface. */ export function instanceOfNodeDescription(value: object): value is NodeDescription { - return true; + return true; } export function NodeDescriptionFromJSON(json: any): NodeDescription { - return NodeDescriptionFromJSONTyped(json, false); + return NodeDescriptionFromJSONTyped(json, false); } -export function NodeDescriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeDescription { - if (json == null) { - return json; - } - return { - - 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], - 'Platform': json['Platform'] == null ? undefined : PlatformFromJSON(json['Platform']), - 'Resources': json['Resources'] == null ? undefined : ResourceObjectFromJSON(json['Resources']), - 'Engine': json['Engine'] == null ? undefined : EngineDescriptionFromJSON(json['Engine']), - 'TLSInfo': json['TLSInfo'] == null ? undefined : TLSInfoFromJSON(json['TLSInfo']), - }; +export function NodeDescriptionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): NodeDescription { + if (json == null) { + return json; + } + return { + Hostname: json["Hostname"] == null ? undefined : json["Hostname"], + Platform: json["Platform"] == null ? undefined : PlatformFromJSON(json["Platform"]), + Resources: json["Resources"] == null ? undefined : ResourceObjectFromJSON(json["Resources"]), + Engine: json["Engine"] == null ? undefined : EngineDescriptionFromJSON(json["Engine"]), + TLSInfo: json["TLSInfo"] == null ? undefined : TLSInfoFromJSON(json["TLSInfo"]), + }; } export function NodeDescriptionToJSON(json: any): NodeDescription { - return NodeDescriptionToJSONTyped(json, false); + return NodeDescriptionToJSONTyped(json, false); } -export function NodeDescriptionToJSONTyped(value?: NodeDescription | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NodeDescriptionToJSONTyped( + value?: NodeDescription | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Hostname': value['Hostname'], - 'Platform': PlatformToJSON(value['Platform']), - 'Resources': ResourceObjectToJSON(value['Resources']), - 'Engine': EngineDescriptionToJSON(value['Engine']), - 'TLSInfo': TLSInfoToJSON(value['TLSInfo']), - }; + return { + Hostname: value["Hostname"], + Platform: PlatformToJSON(value["Platform"]), + Resources: ResourceObjectToJSON(value["Resources"]), + Engine: EngineDescriptionToJSON(value["Engine"]), + TLSInfo: TLSInfoToJSON(value["TLSInfo"]), + }; } - diff --git a/src/clients/docker/models/NodeSpec.ts b/src/clients/docker/models/NodeSpec.ts index d6cc89234f..23d32250d8 100644 --- a/src/clients/docker/models/NodeSpec.ts +++ b/src/clients/docker/models/NodeSpec.ts @@ -2,107 +2,106 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface NodeSpec */ export interface NodeSpec { - /** - * Name for the node. - * @type {string} - * @memberof NodeSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof NodeSpec - */ - Labels?: { [key: string]: string; }; - /** - * Role of the node. - * @type {string} - * @memberof NodeSpec - */ - Role?: NodeSpecRoleEnum; - /** - * Availability of the node. - * @type {string} - * @memberof NodeSpec - */ - Availability?: NodeSpecAvailabilityEnum; + /** + * Name for the node. + * @type {string} + * @memberof NodeSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof NodeSpec + */ + Labels?: { [key: string]: string }; + /** + * Role of the node. + * @type {string} + * @memberof NodeSpec + */ + Role?: NodeSpecRoleEnum; + /** + * Availability of the node. + * @type {string} + * @memberof NodeSpec + */ + Availability?: NodeSpecAvailabilityEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum NodeSpecRoleEnum { - Worker = 'worker', - Manager = 'manager' + Worker = "worker", + Manager = "manager", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum NodeSpecAvailabilityEnum { - Active = 'active', - Pause = 'pause', - Drain = 'drain' + Active = "active", + Pause = "pause", + Drain = "drain", } - /** * Check if a given object implements the NodeSpec interface. */ export function instanceOfNodeSpec(value: object): value is NodeSpec { - return true; + return true; } export function NodeSpecFromJSON(json: any): NodeSpec { - return NodeSpecFromJSONTyped(json, false); + return NodeSpecFromJSONTyped(json, false); } export function NodeSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeSpec { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Role': json['Role'] == null ? undefined : json['Role'], - 'Availability': json['Availability'] == null ? undefined : json['Availability'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Role: json["Role"] == null ? undefined : json["Role"], + Availability: json["Availability"] == null ? undefined : json["Availability"], + }; } export function NodeSpecToJSON(json: any): NodeSpec { - return NodeSpecToJSONTyped(json, false); + return NodeSpecToJSONTyped(json, false); } -export function NodeSpecToJSONTyped(value?: NodeSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NodeSpecToJSONTyped( + value?: NodeSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Role': value['Role'], - 'Availability': value['Availability'], - }; + return { + Name: value["Name"], + Labels: value["Labels"], + Role: value["Role"], + Availability: value["Availability"], + }; } - diff --git a/src/clients/docker/models/NodeState.ts b/src/clients/docker/models/NodeState.ts index 4fbdf9d820..8186326b78 100644 --- a/src/clients/docker/models/NodeState.ts +++ b/src/clients/docker/models/NodeState.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,37 +18,35 @@ * @enum {string} */ export enum NodeState { - Unknown = 'unknown', - Down = 'down', - Ready = 'ready', - Disconnected = 'disconnected' + Unknown = "unknown", + Down = "down", + Ready = "ready", + Disconnected = "disconnected", } - export function instanceOfNodeState(value: any): boolean { - for (const key in NodeState) { - if (Object.prototype.hasOwnProperty.call(NodeState, key)) { - if (NodeState[key as keyof typeof NodeState] === value) { - return true; - } - } + for (const key in NodeState) { + if (Object.prototype.hasOwnProperty.call(NodeState, key)) { + if (NodeState[key as keyof typeof NodeState] === value) { + return true; + } } - return false; + } + return false; } export function NodeStateFromJSON(json: any): NodeState { - return NodeStateFromJSONTyped(json, false); + return NodeStateFromJSONTyped(json, false); } export function NodeStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeState { - return json as NodeState; + return json as NodeState; } export function NodeStateToJSON(value?: NodeState | null): any { - return value as any; + return value as any; } export function NodeStateToJSONTyped(value: any, ignoreDiscriminator: boolean): NodeState { - return value as NodeState; + return value as NodeState; } - diff --git a/src/clients/docker/models/NodeStatus.ts b/src/clients/docker/models/NodeStatus.ts index f7d9797b69..687ac84c56 100644 --- a/src/clients/docker/models/NodeStatus.ts +++ b/src/clients/docker/models/NodeStatus.ts @@ -2,93 +2,91 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { NodeState } from './NodeState'; +import { mapValues } from "../runtime"; +import type { NodeState } from "./NodeState"; import { - NodeStateFromJSON, - NodeStateFromJSONTyped, - NodeStateToJSON, - NodeStateToJSONTyped, -} from './NodeState'; + NodeStateFromJSON, + NodeStateFromJSONTyped, + NodeStateToJSON, + NodeStateToJSONTyped, +} from "./NodeState"; /** * NodeStatus represents the status of a node. - * + * * It provides the current status of the node, as seen by the manager. - * + * * @export * @interface NodeStatus */ export interface NodeStatus { - /** - * - * @type {NodeState} - * @memberof NodeStatus - */ - State?: NodeState; - /** - * - * @type {string} - * @memberof NodeStatus - */ - Message?: string; - /** - * IP address of the node. - * @type {string} - * @memberof NodeStatus - */ - Addr?: string; + /** + * + * @type {NodeState} + * @memberof NodeStatus + */ + State?: NodeState; + /** + * + * @type {string} + * @memberof NodeStatus + */ + Message?: string; + /** + * IP address of the node. + * @type {string} + * @memberof NodeStatus + */ + Addr?: string; } - - /** * Check if a given object implements the NodeStatus interface. */ export function instanceOfNodeStatus(value: object): value is NodeStatus { - return true; + return true; } export function NodeStatusFromJSON(json: any): NodeStatus { - return NodeStatusFromJSONTyped(json, false); + return NodeStatusFromJSONTyped(json, false); } export function NodeStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): NodeStatus { - if (json == null) { - return json; - } - return { - - 'State': json['State'] == null ? undefined : NodeStateFromJSON(json['State']), - 'Message': json['Message'] == null ? undefined : json['Message'], - 'Addr': json['Addr'] == null ? undefined : json['Addr'], - }; + if (json == null) { + return json; + } + return { + State: json["State"] == null ? undefined : NodeStateFromJSON(json["State"]), + Message: json["Message"] == null ? undefined : json["Message"], + Addr: json["Addr"] == null ? undefined : json["Addr"], + }; } export function NodeStatusToJSON(json: any): NodeStatus { - return NodeStatusToJSONTyped(json, false); + return NodeStatusToJSONTyped(json, false); } -export function NodeStatusToJSONTyped(value?: NodeStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function NodeStatusToJSONTyped( + value?: NodeStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'State': NodeStateToJSON(value['State']), - 'Message': value['Message'], - 'Addr': value['Addr'], - }; + return { + State: NodeStateToJSON(value["State"]), + Message: value["Message"], + Addr: value["Addr"], + }; } - diff --git a/src/clients/docker/models/OCIDescriptor.ts b/src/clients/docker/models/OCIDescriptor.ts index 0a51f55123..5d59063105 100644 --- a/src/clients/docker/models/OCIDescriptor.ts +++ b/src/clients/docker/models/OCIDescriptor.ts @@ -2,85 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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). - * + * * @export * @interface OCIDescriptor */ export interface OCIDescriptor { - /** - * The media type of the object this schema refers to. - * - * @type {string} - * @memberof OCIDescriptor - */ - mediaType?: string; - /** - * The digest of the targeted content. - * - * @type {string} - * @memberof OCIDescriptor - */ - digest?: string; - /** - * The size in bytes of the blob. - * - * @type {number} - * @memberof OCIDescriptor - */ - size?: number; + /** + * The media type of the object this schema refers to. + * + * @type {string} + * @memberof OCIDescriptor + */ + mediaType?: string; + /** + * The digest of the targeted content. + * + * @type {string} + * @memberof OCIDescriptor + */ + digest?: string; + /** + * The size in bytes of the blob. + * + * @type {number} + * @memberof OCIDescriptor + */ + size?: number; } /** * Check if a given object implements the OCIDescriptor interface. */ export function instanceOfOCIDescriptor(value: object): value is OCIDescriptor { - return true; + return true; } export function OCIDescriptorFromJSON(json: any): OCIDescriptor { - return OCIDescriptorFromJSONTyped(json, false); + return OCIDescriptorFromJSONTyped(json, false); } export function OCIDescriptorFromJSONTyped(json: any, ignoreDiscriminator: boolean): OCIDescriptor { - if (json == null) { - return json; - } - return { - - 'mediaType': json['mediaType'] == null ? undefined : json['mediaType'], - 'digest': json['digest'] == null ? undefined : json['digest'], - 'size': json['size'] == null ? undefined : json['size'], - }; + if (json == null) { + return json; + } + return { + mediaType: json["mediaType"] == null ? undefined : json["mediaType"], + digest: json["digest"] == null ? undefined : json["digest"], + size: json["size"] == null ? undefined : json["size"], + }; } export function OCIDescriptorToJSON(json: any): OCIDescriptor { - return OCIDescriptorToJSONTyped(json, false); + return OCIDescriptorToJSONTyped(json, false); } -export function OCIDescriptorToJSONTyped(value?: OCIDescriptor | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function OCIDescriptorToJSONTyped( + value?: OCIDescriptor | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'mediaType': value['mediaType'], - 'digest': value['digest'], - 'size': value['size'], - }; + return { + mediaType: value["mediaType"], + digest: value["digest"], + size: value["size"], + }; } - diff --git a/src/clients/docker/models/OCIPlatform.ts b/src/clients/docker/models/OCIPlatform.ts index dc0af78e6c..b3e4108e0d 100644 --- a/src/clients/docker/models/OCIPlatform.ts +++ b/src/clients/docker/models/OCIPlatform.ts @@ -2,106 +2,106 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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). - * + * * @export * @interface OCIPlatform */ export interface OCIPlatform { - /** - * The CPU architecture, for example `amd64` or `ppc64`. - * - * @type {string} - * @memberof OCIPlatform - */ - architecture?: string; - /** - * The operating system, for example `linux` or `windows`. - * - * @type {string} - * @memberof OCIPlatform - */ - os?: string; - /** - * Optional field specifying the operating system version, for example on - * Windows `10.0.19041.1165`. - * - * @type {string} - * @memberof OCIPlatform - */ - os_version?: string; - /** - * Optional field specifying an array of strings, each listing a required - * OS feature (for example on Windows `win32k`). - * - * @type {Array} - * @memberof OCIPlatform - */ - os_features?: Array; - /** - * Optional field specifying a variant of the CPU, for example `v7` to - * specify ARMv7 when architecture is `arm`. - * - * @type {string} - * @memberof OCIPlatform - */ - variant?: string; + /** + * The CPU architecture, for example `amd64` or `ppc64`. + * + * @type {string} + * @memberof OCIPlatform + */ + architecture?: string; + /** + * The operating system, for example `linux` or `windows`. + * + * @type {string} + * @memberof OCIPlatform + */ + os?: string; + /** + * Optional field specifying the operating system version, for example on + * Windows `10.0.19041.1165`. + * + * @type {string} + * @memberof OCIPlatform + */ + os_version?: string; + /** + * Optional field specifying an array of strings, each listing a required + * OS feature (for example on Windows `win32k`). + * + * @type {Array} + * @memberof OCIPlatform + */ + os_features?: Array; + /** + * Optional field specifying a variant of the CPU, for example `v7` to + * specify ARMv7 when architecture is `arm`. + * + * @type {string} + * @memberof OCIPlatform + */ + variant?: string; } /** * Check if a given object implements the OCIPlatform interface. */ export function instanceOfOCIPlatform(value: object): value is OCIPlatform { - return true; + return true; } export function OCIPlatformFromJSON(json: any): OCIPlatform { - return OCIPlatformFromJSONTyped(json, false); + return OCIPlatformFromJSONTyped(json, false); } export function OCIPlatformFromJSONTyped(json: any, ignoreDiscriminator: boolean): OCIPlatform { - if (json == null) { - return json; - } - return { - - 'architecture': json['architecture'] == null ? undefined : json['architecture'], - 'os': json['os'] == null ? undefined : json['os'], - 'os_version': json['os.version'] == null ? undefined : json['os.version'], - 'os_features': json['os.features'] == null ? undefined : json['os.features'], - 'variant': json['variant'] == null ? undefined : json['variant'], - }; + if (json == null) { + return json; + } + return { + architecture: json["architecture"] == null ? undefined : json["architecture"], + os: json["os"] == null ? undefined : json["os"], + os_version: json["os.version"] == null ? undefined : json["os.version"], + os_features: json["os.features"] == null ? undefined : json["os.features"], + variant: json["variant"] == null ? undefined : json["variant"], + }; } export function OCIPlatformToJSON(json: any): OCIPlatform { - return OCIPlatformToJSONTyped(json, false); + return OCIPlatformToJSONTyped(json, false); } -export function OCIPlatformToJSONTyped(value?: OCIPlatform | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function OCIPlatformToJSONTyped( + value?: OCIPlatform | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'architecture': value['architecture'], - 'os': value['os'], - 'os.version': value['os_version'], - 'os.features': value['os_features'], - 'variant': value['variant'], - }; + return { + architecture: value["architecture"], + os: value["os"], + "os.version": value["os_version"], + "os.features": value["os_features"], + variant: value["variant"], + }; } - diff --git a/src/clients/docker/models/ObjectVersion.ts b/src/clients/docker/models/ObjectVersion.ts index 0786143c5e..64f1193fab 100644 --- a/src/clients/docker/models/ObjectVersion.ts +++ b/src/clients/docker/models/ObjectVersion.ts @@ -2,74 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface ObjectVersion */ export interface ObjectVersion { - /** - * - * @type {number} - * @memberof ObjectVersion - */ - _Index?: number; + /** + * + * @type {number} + * @memberof ObjectVersion + */ + _Index?: number; } /** * Check if a given object implements the ObjectVersion interface. */ export function instanceOfObjectVersion(value: object): value is ObjectVersion { - return true; + return true; } export function ObjectVersionFromJSON(json: any): ObjectVersion { - return ObjectVersionFromJSONTyped(json, false); + return ObjectVersionFromJSONTyped(json, false); } export function ObjectVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectVersion { - if (json == null) { - return json; - } - return { - - '_Index': json['Index'] == null ? undefined : json['Index'], - }; + if (json == null) { + return json; + } + return { + _Index: json["Index"] == null ? undefined : json["Index"], + }; } export function ObjectVersionToJSON(json: any): ObjectVersion { - return ObjectVersionToJSONTyped(json, false); + return ObjectVersionToJSONTyped(json, false); } -export function ObjectVersionToJSONTyped(value?: ObjectVersion | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectVersionToJSONTyped( + value?: ObjectVersion | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Index': value['_Index'], - }; + return { + Index: value["_Index"], + }; } - diff --git a/src/clients/docker/models/PeerInfo.ts b/src/clients/docker/models/PeerInfo.ts index 37e394c513..9daf499334 100644 --- a/src/clients/docker/models/PeerInfo.ts +++ b/src/clients/docker/models/PeerInfo.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * PeerInfo represents one peer of an overlay network. - * + * * @export * @interface PeerInfo */ export interface PeerInfo { - /** - * ID of the peer-node in the Swarm cluster. - * @type {string} - * @memberof PeerInfo - */ - Name?: string; - /** - * IP-address of the peer-node in the Swarm cluster. - * @type {string} - * @memberof PeerInfo - */ - IP?: string; + /** + * ID of the peer-node in the Swarm cluster. + * @type {string} + * @memberof PeerInfo + */ + Name?: string; + /** + * IP-address of the peer-node in the Swarm cluster. + * @type {string} + * @memberof PeerInfo + */ + IP?: string; } /** * Check if a given object implements the PeerInfo interface. */ export function instanceOfPeerInfo(value: object): value is PeerInfo { - return true; + return true; } export function PeerInfoFromJSON(json: any): PeerInfo { - return PeerInfoFromJSONTyped(json, false); + return PeerInfoFromJSONTyped(json, false); } export function PeerInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PeerInfo { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'IP': json['IP'] == null ? undefined : json['IP'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + IP: json["IP"] == null ? undefined : json["IP"], + }; } export function PeerInfoToJSON(json: any): PeerInfo { - return PeerInfoToJSONTyped(json, false); + return PeerInfoToJSONTyped(json, false); } -export function PeerInfoToJSONTyped(value?: PeerInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PeerInfoToJSONTyped( + value?: PeerInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'IP': value['IP'], - }; + return { + Name: value["Name"], + IP: value["IP"], + }; } - diff --git a/src/clients/docker/models/PeerNode.ts b/src/clients/docker/models/PeerNode.ts index 6d472b00e3..2a65002c63 100644 --- a/src/clients/docker/models/PeerNode.ts +++ b/src/clients/docker/models/PeerNode.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Represents a peer-node in the swarm * @export * @interface PeerNode */ export interface PeerNode { - /** - * Unique identifier of for this node in the swarm. - * @type {string} - * @memberof PeerNode - */ - NodeID?: string; - /** - * IP address and ports at which this node can be reached. - * - * @type {string} - * @memberof PeerNode - */ - Addr?: string; + /** + * Unique identifier of for this node in the swarm. + * @type {string} + * @memberof PeerNode + */ + NodeID?: string; + /** + * IP address and ports at which this node can be reached. + * + * @type {string} + * @memberof PeerNode + */ + Addr?: string; } /** * Check if a given object implements the PeerNode interface. */ export function instanceOfPeerNode(value: object): value is PeerNode { - return true; + return true; } export function PeerNodeFromJSON(json: any): PeerNode { - return PeerNodeFromJSONTyped(json, false); + return PeerNodeFromJSONTyped(json, false); } export function PeerNodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PeerNode { - if (json == null) { - return json; - } - return { - - 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], - 'Addr': json['Addr'] == null ? undefined : json['Addr'], - }; + if (json == null) { + return json; + } + return { + NodeID: json["NodeID"] == null ? undefined : json["NodeID"], + Addr: json["Addr"] == null ? undefined : json["Addr"], + }; } export function PeerNodeToJSON(json: any): PeerNode { - return PeerNodeToJSONTyped(json, false); + return PeerNodeToJSONTyped(json, false); } -export function PeerNodeToJSONTyped(value?: PeerNode | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PeerNodeToJSONTyped( + value?: PeerNode | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NodeID': value['NodeID'], - 'Addr': value['Addr'], - }; + return { + NodeID: value["NodeID"], + Addr: value["Addr"], + }; } - diff --git a/src/clients/docker/models/Platform.ts b/src/clients/docker/models/Platform.ts index 0b67fada77..fa71b2810d 100644 --- a/src/clients/docker/models/Platform.ts +++ b/src/clients/docker/models/Platform.ts @@ -2,76 +2,76 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Platform represents the platform (Arch/OS). - * + * * @export * @interface Platform */ export interface Platform { - /** - * Architecture represents the hardware architecture (for example, - * `x86_64`). - * - * @type {string} - * @memberof Platform - */ - Architecture?: string; - /** - * OS represents the Operating System (for example, `linux` or `windows`). - * - * @type {string} - * @memberof Platform - */ - OS?: string; + /** + * Architecture represents the hardware architecture (for example, + * `x86_64`). + * + * @type {string} + * @memberof Platform + */ + Architecture?: string; + /** + * OS represents the Operating System (for example, `linux` or `windows`). + * + * @type {string} + * @memberof Platform + */ + OS?: string; } /** * Check if a given object implements the Platform interface. */ export function instanceOfPlatform(value: object): value is Platform { - return true; + return true; } export function PlatformFromJSON(json: any): Platform { - return PlatformFromJSONTyped(json, false); + return PlatformFromJSONTyped(json, false); } export function PlatformFromJSONTyped(json: any, ignoreDiscriminator: boolean): Platform { - if (json == null) { - return json; - } - return { - - 'Architecture': json['Architecture'] == null ? undefined : json['Architecture'], - 'OS': json['OS'] == null ? undefined : json['OS'], - }; + if (json == null) { + return json; + } + return { + Architecture: json["Architecture"] == null ? undefined : json["Architecture"], + OS: json["OS"] == null ? undefined : json["OS"], + }; } export function PlatformToJSON(json: any): Platform { - return PlatformToJSONTyped(json, false); + return PlatformToJSONTyped(json, false); } -export function PlatformToJSONTyped(value?: Platform | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PlatformToJSONTyped( + value?: Platform | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Architecture': value['Architecture'], - 'OS': value['OS'], - }; + return { + Architecture: value["Architecture"], + OS: value["OS"], + }; } - diff --git a/src/clients/docker/models/Plugin.ts b/src/clients/docker/models/Plugin.ts index 054f7b8de5..c51b1e01bb 100644 --- a/src/clients/docker/models/Plugin.ts +++ b/src/clients/docker/models/Plugin.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginConfig } from './PluginConfig'; +import { mapValues } from "../runtime"; +import type { PluginConfig } from "./PluginConfig"; import { - PluginConfigFromJSON, - PluginConfigFromJSONTyped, - PluginConfigToJSON, - PluginConfigToJSONTyped, -} from './PluginConfig'; -import type { PluginSettings } from './PluginSettings'; + PluginConfigFromJSON, + PluginConfigFromJSONTyped, + PluginConfigToJSON, + PluginConfigToJSONTyped, +} from "./PluginConfig"; +import type { PluginSettings } from "./PluginSettings"; import { - PluginSettingsFromJSON, - PluginSettingsFromJSONTyped, - PluginSettingsToJSON, - PluginSettingsToJSONTyped, -} from './PluginSettings'; + PluginSettingsFromJSON, + PluginSettingsFromJSONTyped, + PluginSettingsToJSON, + PluginSettingsToJSONTyped, +} from "./PluginSettings"; /** * A plugin for the Engine API @@ -34,91 +34,91 @@ import { * @interface Plugin */ export interface Plugin { - /** - * - * @type {string} - * @memberof Plugin - */ - Id?: string; - /** - * - * @type {string} - * @memberof Plugin - */ - Name: string; - /** - * True if the plugin is running. False if the plugin is not running, only installed. - * @type {boolean} - * @memberof Plugin - */ - Enabled: boolean; - /** - * - * @type {PluginSettings} - * @memberof Plugin - */ - Settings: PluginSettings; - /** - * plugin remote reference used to push/pull the plugin - * @type {string} - * @memberof Plugin - */ - PluginReference?: string; - /** - * - * @type {PluginConfig} - * @memberof Plugin - */ - Config: PluginConfig; + /** + * + * @type {string} + * @memberof Plugin + */ + Id?: string; + /** + * + * @type {string} + * @memberof Plugin + */ + Name: string; + /** + * True if the plugin is running. False if the plugin is not running, only installed. + * @type {boolean} + * @memberof Plugin + */ + Enabled: boolean; + /** + * + * @type {PluginSettings} + * @memberof Plugin + */ + Settings: PluginSettings; + /** + * plugin remote reference used to push/pull the plugin + * @type {string} + * @memberof Plugin + */ + PluginReference?: string; + /** + * + * @type {PluginConfig} + * @memberof Plugin + */ + Config: PluginConfig; } /** * Check if a given object implements the Plugin interface. */ export function instanceOfPlugin(value: object): value is Plugin { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Enabled' in value) || value['Enabled'] === undefined) return false; - if (!('Settings' in value) || value['Settings'] === undefined) return false; - if (!('Config' in value) || value['Config'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Enabled" in value) || value["Enabled"] === undefined) return false; + if (!("Settings" in value) || value["Settings"] === undefined) return false; + if (!("Config" in value) || value["Config"] === undefined) return false; + return true; } export function PluginFromJSON(json: any): Plugin { - return PluginFromJSONTyped(json, false); + return PluginFromJSONTyped(json, false); } export function PluginFromJSONTyped(json: any, ignoreDiscriminator: boolean): Plugin { - if (json == null) { - return json; - } - return { - - 'Id': json['Id'] == null ? undefined : json['Id'], - 'Name': json['Name'], - 'Enabled': json['Enabled'], - 'Settings': PluginSettingsFromJSON(json['Settings']), - 'PluginReference': json['PluginReference'] == null ? undefined : json['PluginReference'], - 'Config': PluginConfigFromJSON(json['Config']), - }; + if (json == null) { + return json; + } + return { + Id: json["Id"] == null ? undefined : json["Id"], + Name: json["Name"], + Enabled: json["Enabled"], + Settings: PluginSettingsFromJSON(json["Settings"]), + PluginReference: json["PluginReference"] == null ? undefined : json["PluginReference"], + Config: PluginConfigFromJSON(json["Config"]), + }; } export function PluginToJSON(json: any): Plugin { - return PluginToJSONTyped(json, false); + return PluginToJSONTyped(json, false); } -export function PluginToJSONTyped(value?: Plugin | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginToJSONTyped( + value?: Plugin | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Id': value['Id'], - 'Name': value['Name'], - 'Enabled': value['Enabled'], - 'Settings': PluginSettingsToJSON(value['Settings']), - 'PluginReference': value['PluginReference'], - 'Config': PluginConfigToJSON(value['Config']), - }; + return { + Id: value["Id"], + Name: value["Name"], + Enabled: value["Enabled"], + Settings: PluginSettingsToJSON(value["Settings"]), + PluginReference: value["PluginReference"], + Config: PluginConfigToJSON(value["Config"]), + }; } - diff --git a/src/clients/docker/models/PluginConfig.ts b/src/clients/docker/models/PluginConfig.ts index 3346471445..f852d7c140 100644 --- a/src/clients/docker/models/PluginConfig.ts +++ b/src/clients/docker/models/PluginConfig.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginEnv } from './PluginEnv'; +import { mapValues } from "../runtime"; +import type { PluginEnv } from "./PluginEnv"; import { - PluginEnvFromJSON, - PluginEnvFromJSONTyped, - PluginEnvToJSON, - PluginEnvToJSONTyped, -} from './PluginEnv'; -import type { PluginConfigLinux } from './PluginConfigLinux'; + PluginEnvFromJSON, + PluginEnvFromJSONTyped, + PluginEnvToJSON, + PluginEnvToJSONTyped, +} from "./PluginEnv"; +import type { PluginConfigLinux } from "./PluginConfigLinux"; import { - PluginConfigLinuxFromJSON, - PluginConfigLinuxFromJSONTyped, - PluginConfigLinuxToJSON, - PluginConfigLinuxToJSONTyped, -} from './PluginConfigLinux'; -import type { PluginConfigArgs } from './PluginConfigArgs'; + PluginConfigLinuxFromJSON, + PluginConfigLinuxFromJSONTyped, + PluginConfigLinuxToJSON, + PluginConfigLinuxToJSONTyped, +} from "./PluginConfigLinux"; +import type { PluginConfigArgs } from "./PluginConfigArgs"; import { - PluginConfigArgsFromJSON, - PluginConfigArgsFromJSONTyped, - PluginConfigArgsToJSON, - PluginConfigArgsToJSONTyped, -} from './PluginConfigArgs'; -import type { PluginConfigRootfs } from './PluginConfigRootfs'; + PluginConfigArgsFromJSON, + PluginConfigArgsFromJSONTyped, + PluginConfigArgsToJSON, + PluginConfigArgsToJSONTyped, +} from "./PluginConfigArgs"; +import type { PluginConfigRootfs } from "./PluginConfigRootfs"; import { - PluginConfigRootfsFromJSON, - PluginConfigRootfsFromJSONTyped, - PluginConfigRootfsToJSON, - PluginConfigRootfsToJSONTyped, -} from './PluginConfigRootfs'; -import type { PluginConfigNetwork } from './PluginConfigNetwork'; + PluginConfigRootfsFromJSON, + PluginConfigRootfsFromJSONTyped, + PluginConfigRootfsToJSON, + PluginConfigRootfsToJSONTyped, +} from "./PluginConfigRootfs"; +import type { PluginConfigNetwork } from "./PluginConfigNetwork"; import { - PluginConfigNetworkFromJSON, - PluginConfigNetworkFromJSONTyped, - PluginConfigNetworkToJSON, - PluginConfigNetworkToJSONTyped, -} from './PluginConfigNetwork'; -import type { PluginConfigInterface } from './PluginConfigInterface'; + PluginConfigNetworkFromJSON, + PluginConfigNetworkFromJSONTyped, + PluginConfigNetworkToJSON, + PluginConfigNetworkToJSONTyped, +} from "./PluginConfigNetwork"; +import type { PluginConfigInterface } from "./PluginConfigInterface"; import { - PluginConfigInterfaceFromJSON, - PluginConfigInterfaceFromJSONTyped, - PluginConfigInterfaceToJSON, - PluginConfigInterfaceToJSONTyped, -} from './PluginConfigInterface'; -import type { PluginConfigUser } from './PluginConfigUser'; + PluginConfigInterfaceFromJSON, + PluginConfigInterfaceFromJSONTyped, + PluginConfigInterfaceToJSON, + PluginConfigInterfaceToJSONTyped, +} from "./PluginConfigInterface"; +import type { PluginConfigUser } from "./PluginConfigUser"; import { - PluginConfigUserFromJSON, - PluginConfigUserFromJSONTyped, - PluginConfigUserToJSON, - PluginConfigUserToJSONTyped, -} from './PluginConfigUser'; -import type { PluginMount } from './PluginMount'; + PluginConfigUserFromJSON, + PluginConfigUserFromJSONTyped, + PluginConfigUserToJSON, + PluginConfigUserToJSONTyped, +} from "./PluginConfigUser"; +import type { PluginMount } from "./PluginMount"; import { - PluginMountFromJSON, - PluginMountFromJSONTyped, - PluginMountToJSON, - PluginMountToJSONTyped, -} from './PluginMount'; + PluginMountFromJSON, + PluginMountFromJSONTyped, + PluginMountToJSON, + PluginMountToJSONTyped, +} from "./PluginMount"; /** * The config of a plugin. @@ -76,180 +76,180 @@ import { * @interface PluginConfig */ export interface PluginConfig { - /** - * Docker Version used to create the plugin - * @type {string} - * @memberof PluginConfig - */ - DockerVersion?: string; - /** - * - * @type {string} - * @memberof PluginConfig - */ - Description: string; - /** - * - * @type {string} - * @memberof PluginConfig - */ - Documentation: string; - /** - * - * @type {PluginConfigInterface} - * @memberof PluginConfig - */ - Interface: PluginConfigInterface; - /** - * - * @type {Array} - * @memberof PluginConfig - */ - Entrypoint: Array; - /** - * - * @type {string} - * @memberof PluginConfig - */ - WorkDir: string; - /** - * - * @type {PluginConfigUser} - * @memberof PluginConfig - */ - User?: PluginConfigUser; - /** - * - * @type {PluginConfigNetwork} - * @memberof PluginConfig - */ - Network: PluginConfigNetwork; - /** - * - * @type {PluginConfigLinux} - * @memberof PluginConfig - */ - Linux: PluginConfigLinux; - /** - * - * @type {string} - * @memberof PluginConfig - */ - PropagatedMount: string; - /** - * - * @type {boolean} - * @memberof PluginConfig - */ - IpcHost: boolean; - /** - * - * @type {boolean} - * @memberof PluginConfig - */ - PidHost: boolean; - /** - * - * @type {Array} - * @memberof PluginConfig - */ - Mounts: Array; - /** - * - * @type {Array} - * @memberof PluginConfig - */ - Env: Array; - /** - * - * @type {PluginConfigArgs} - * @memberof PluginConfig - */ - Args: PluginConfigArgs; - /** - * - * @type {PluginConfigRootfs} - * @memberof PluginConfig - */ - rootfs?: PluginConfigRootfs; + /** + * Docker Version used to create the plugin + * @type {string} + * @memberof PluginConfig + */ + DockerVersion?: string; + /** + * + * @type {string} + * @memberof PluginConfig + */ + Description: string; + /** + * + * @type {string} + * @memberof PluginConfig + */ + Documentation: string; + /** + * + * @type {PluginConfigInterface} + * @memberof PluginConfig + */ + Interface: PluginConfigInterface; + /** + * + * @type {Array} + * @memberof PluginConfig + */ + Entrypoint: Array; + /** + * + * @type {string} + * @memberof PluginConfig + */ + WorkDir: string; + /** + * + * @type {PluginConfigUser} + * @memberof PluginConfig + */ + User?: PluginConfigUser; + /** + * + * @type {PluginConfigNetwork} + * @memberof PluginConfig + */ + Network: PluginConfigNetwork; + /** + * + * @type {PluginConfigLinux} + * @memberof PluginConfig + */ + Linux: PluginConfigLinux; + /** + * + * @type {string} + * @memberof PluginConfig + */ + PropagatedMount: string; + /** + * + * @type {boolean} + * @memberof PluginConfig + */ + IpcHost: boolean; + /** + * + * @type {boolean} + * @memberof PluginConfig + */ + PidHost: boolean; + /** + * + * @type {Array} + * @memberof PluginConfig + */ + Mounts: Array; + /** + * + * @type {Array} + * @memberof PluginConfig + */ + Env: Array; + /** + * + * @type {PluginConfigArgs} + * @memberof PluginConfig + */ + Args: PluginConfigArgs; + /** + * + * @type {PluginConfigRootfs} + * @memberof PluginConfig + */ + rootfs?: PluginConfigRootfs; } /** * Check if a given object implements the PluginConfig interface. */ export function instanceOfPluginConfig(value: object): value is PluginConfig { - if (!('Description' in value) || value['Description'] === undefined) return false; - if (!('Documentation' in value) || value['Documentation'] === undefined) return false; - if (!('Interface' in value) || value['Interface'] === undefined) return false; - if (!('Entrypoint' in value) || value['Entrypoint'] === undefined) return false; - if (!('WorkDir' in value) || value['WorkDir'] === undefined) return false; - if (!('Network' in value) || value['Network'] === undefined) return false; - if (!('Linux' in value) || value['Linux'] === undefined) return false; - if (!('PropagatedMount' in value) || value['PropagatedMount'] === undefined) return false; - if (!('IpcHost' in value) || value['IpcHost'] === undefined) return false; - if (!('PidHost' in value) || value['PidHost'] === undefined) return false; - if (!('Mounts' in value) || value['Mounts'] === undefined) return false; - if (!('Env' in value) || value['Env'] === undefined) return false; - if (!('Args' in value) || value['Args'] === undefined) return false; - return true; + if (!("Description" in value) || value["Description"] === undefined) return false; + if (!("Documentation" in value) || value["Documentation"] === undefined) return false; + if (!("Interface" in value) || value["Interface"] === undefined) return false; + if (!("Entrypoint" in value) || value["Entrypoint"] === undefined) return false; + if (!("WorkDir" in value) || value["WorkDir"] === undefined) return false; + if (!("Network" in value) || value["Network"] === undefined) return false; + if (!("Linux" in value) || value["Linux"] === undefined) return false; + if (!("PropagatedMount" in value) || value["PropagatedMount"] === undefined) return false; + if (!("IpcHost" in value) || value["IpcHost"] === undefined) return false; + if (!("PidHost" in value) || value["PidHost"] === undefined) return false; + if (!("Mounts" in value) || value["Mounts"] === undefined) return false; + if (!("Env" in value) || value["Env"] === undefined) return false; + if (!("Args" in value) || value["Args"] === undefined) return false; + return true; } export function PluginConfigFromJSON(json: any): PluginConfig { - return PluginConfigFromJSONTyped(json, false); + return PluginConfigFromJSONTyped(json, false); } export function PluginConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfig { - if (json == null) { - return json; - } - return { - - 'DockerVersion': json['DockerVersion'] == null ? undefined : json['DockerVersion'], - 'Description': json['Description'], - 'Documentation': json['Documentation'], - 'Interface': PluginConfigInterfaceFromJSON(json['Interface']), - 'Entrypoint': json['Entrypoint'], - 'WorkDir': json['WorkDir'], - 'User': json['User'] == null ? undefined : PluginConfigUserFromJSON(json['User']), - 'Network': PluginConfigNetworkFromJSON(json['Network']), - 'Linux': PluginConfigLinuxFromJSON(json['Linux']), - 'PropagatedMount': json['PropagatedMount'], - 'IpcHost': json['IpcHost'], - 'PidHost': json['PidHost'], - 'Mounts': ((json['Mounts'] as Array).map(PluginMountFromJSON)), - 'Env': ((json['Env'] as Array).map(PluginEnvFromJSON)), - 'Args': PluginConfigArgsFromJSON(json['Args']), - 'rootfs': json['rootfs'] == null ? undefined : PluginConfigRootfsFromJSON(json['rootfs']), - }; + if (json == null) { + return json; + } + return { + DockerVersion: json["DockerVersion"] == null ? undefined : json["DockerVersion"], + Description: json["Description"], + Documentation: json["Documentation"], + Interface: PluginConfigInterfaceFromJSON(json["Interface"]), + Entrypoint: json["Entrypoint"], + WorkDir: json["WorkDir"], + User: json["User"] == null ? undefined : PluginConfigUserFromJSON(json["User"]), + Network: PluginConfigNetworkFromJSON(json["Network"]), + Linux: PluginConfigLinuxFromJSON(json["Linux"]), + PropagatedMount: json["PropagatedMount"], + IpcHost: json["IpcHost"], + PidHost: json["PidHost"], + Mounts: (json["Mounts"] as Array).map(PluginMountFromJSON), + Env: (json["Env"] as Array).map(PluginEnvFromJSON), + Args: PluginConfigArgsFromJSON(json["Args"]), + rootfs: json["rootfs"] == null ? undefined : PluginConfigRootfsFromJSON(json["rootfs"]), + }; } export function PluginConfigToJSON(json: any): PluginConfig { - return PluginConfigToJSONTyped(json, false); + return PluginConfigToJSONTyped(json, false); } -export function PluginConfigToJSONTyped(value?: PluginConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigToJSONTyped( + value?: PluginConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'DockerVersion': value['DockerVersion'], - 'Description': value['Description'], - 'Documentation': value['Documentation'], - 'Interface': PluginConfigInterfaceToJSON(value['Interface']), - 'Entrypoint': value['Entrypoint'], - 'WorkDir': value['WorkDir'], - 'User': PluginConfigUserToJSON(value['User']), - 'Network': PluginConfigNetworkToJSON(value['Network']), - 'Linux': PluginConfigLinuxToJSON(value['Linux']), - 'PropagatedMount': value['PropagatedMount'], - 'IpcHost': value['IpcHost'], - 'PidHost': value['PidHost'], - 'Mounts': ((value['Mounts'] as Array).map(PluginMountToJSON)), - 'Env': ((value['Env'] as Array).map(PluginEnvToJSON)), - 'Args': PluginConfigArgsToJSON(value['Args']), - 'rootfs': PluginConfigRootfsToJSON(value['rootfs']), - }; + return { + DockerVersion: value["DockerVersion"], + Description: value["Description"], + Documentation: value["Documentation"], + Interface: PluginConfigInterfaceToJSON(value["Interface"]), + Entrypoint: value["Entrypoint"], + WorkDir: value["WorkDir"], + User: PluginConfigUserToJSON(value["User"]), + Network: PluginConfigNetworkToJSON(value["Network"]), + Linux: PluginConfigLinuxToJSON(value["Linux"]), + PropagatedMount: value["PropagatedMount"], + IpcHost: value["IpcHost"], + PidHost: value["PidHost"], + Mounts: (value["Mounts"] as Array).map(PluginMountToJSON), + Env: (value["Env"] as Array).map(PluginEnvToJSON), + Args: PluginConfigArgsToJSON(value["Args"]), + rootfs: PluginConfigRootfsToJSON(value["rootfs"]), + }; } - diff --git a/src/clients/docker/models/PluginConfigArgs.ts b/src/clients/docker/models/PluginConfigArgs.ts index 26c76eb981..39708fd71f 100644 --- a/src/clients/docker/models/PluginConfigArgs.ts +++ b/src/clients/docker/models/PluginConfigArgs.ts @@ -2,92 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginConfigArgs */ export interface PluginConfigArgs { - /** - * - * @type {string} - * @memberof PluginConfigArgs - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginConfigArgs - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginConfigArgs - */ - Settable: Array; - /** - * - * @type {Array} - * @memberof PluginConfigArgs - */ - Value: Array; + /** + * + * @type {string} + * @memberof PluginConfigArgs + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginConfigArgs + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginConfigArgs + */ + Settable: Array; + /** + * + * @type {Array} + * @memberof PluginConfigArgs + */ + Value: Array; } /** * Check if a given object implements the PluginConfigArgs interface. */ export function instanceOfPluginConfigArgs(value: object): value is PluginConfigArgs { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Description' in value) || value['Description'] === undefined) return false; - if (!('Settable' in value) || value['Settable'] === undefined) return false; - if (!('Value' in value) || value['Value'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Description" in value) || value["Description"] === undefined) return false; + if (!("Settable" in value) || value["Settable"] === undefined) return false; + if (!("Value" in value) || value["Value"] === undefined) return false; + return true; } export function PluginConfigArgsFromJSON(json: any): PluginConfigArgs { - return PluginConfigArgsFromJSONTyped(json, false); + return PluginConfigArgsFromJSONTyped(json, false); } -export function PluginConfigArgsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigArgs { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Description': json['Description'], - 'Settable': json['Settable'], - 'Value': json['Value'], - }; +export function PluginConfigArgsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginConfigArgs { + if (json == null) { + return json; + } + return { + Name: json["Name"], + Description: json["Description"], + Settable: json["Settable"], + Value: json["Value"], + }; } export function PluginConfigArgsToJSON(json: any): PluginConfigArgs { - return PluginConfigArgsToJSONTyped(json, false); + return PluginConfigArgsToJSONTyped(json, false); } -export function PluginConfigArgsToJSONTyped(value?: PluginConfigArgs | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigArgsToJSONTyped( + value?: PluginConfigArgs | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Description': value['Description'], - 'Settable': value['Settable'], - 'Value': value['Value'], - }; + return { + Name: value["Name"], + Description: value["Description"], + Settable: value["Settable"], + Value: value["Value"], + }; } - diff --git a/src/clients/docker/models/PluginConfigInterface.ts b/src/clients/docker/models/PluginConfigInterface.ts index f733af1a69..4ac6febf90 100644 --- a/src/clients/docker/models/PluginConfigInterface.ts +++ b/src/clients/docker/models/PluginConfigInterface.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginInterfaceType } from './PluginInterfaceType'; +import { mapValues } from "../runtime"; +import type { PluginInterfaceType } from "./PluginInterfaceType"; import { - PluginInterfaceTypeFromJSON, - PluginInterfaceTypeFromJSONTyped, - PluginInterfaceTypeToJSON, - PluginInterfaceTypeToJSONTyped, -} from './PluginInterfaceType'; + PluginInterfaceTypeFromJSON, + PluginInterfaceTypeFromJSONTyped, + PluginInterfaceTypeToJSON, + PluginInterfaceTypeToJSONTyped, +} from "./PluginInterfaceType"; /** * The interface between Docker and the plugin @@ -27,75 +27,77 @@ import { * @interface PluginConfigInterface */ export interface PluginConfigInterface { - /** - * - * @type {Array} - * @memberof PluginConfigInterface - */ - Types: Array; - /** - * - * @type {string} - * @memberof PluginConfigInterface - */ - Socket: string; - /** - * Protocol to use for clients connecting to the plugin. - * @type {string} - * @memberof PluginConfigInterface - */ - ProtocolScheme?: PluginConfigInterfaceProtocolSchemeEnum; + /** + * + * @type {Array} + * @memberof PluginConfigInterface + */ + Types: Array; + /** + * + * @type {string} + * @memberof PluginConfigInterface + */ + Socket: string; + /** + * Protocol to use for clients connecting to the plugin. + * @type {string} + * @memberof PluginConfigInterface + */ + ProtocolScheme?: PluginConfigInterfaceProtocolSchemeEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PluginConfigInterfaceProtocolSchemeEnum { - Empty = '', - MobyPluginsHttpV1 = 'moby.plugins.http/v1' + Empty = "", + MobyPluginsHttpV1 = "moby.plugins.http/v1", } - /** * Check if a given object implements the PluginConfigInterface interface. */ export function instanceOfPluginConfigInterface(value: object): value is PluginConfigInterface { - if (!('Types' in value) || value['Types'] === undefined) return false; - if (!('Socket' in value) || value['Socket'] === undefined) return false; - return true; + if (!("Types" in value) || value["Types"] === undefined) return false; + if (!("Socket" in value) || value["Socket"] === undefined) return false; + return true; } export function PluginConfigInterfaceFromJSON(json: any): PluginConfigInterface { - return PluginConfigInterfaceFromJSONTyped(json, false); + return PluginConfigInterfaceFromJSONTyped(json, false); } -export function PluginConfigInterfaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigInterface { - if (json == null) { - return json; - } - return { - - 'Types': ((json['Types'] as Array).map(PluginInterfaceTypeFromJSON)), - 'Socket': json['Socket'], - 'ProtocolScheme': json['ProtocolScheme'] == null ? undefined : json['ProtocolScheme'], - }; +export function PluginConfigInterfaceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginConfigInterface { + if (json == null) { + return json; + } + return { + Types: (json["Types"] as Array).map(PluginInterfaceTypeFromJSON), + Socket: json["Socket"], + ProtocolScheme: json["ProtocolScheme"] == null ? undefined : json["ProtocolScheme"], + }; } export function PluginConfigInterfaceToJSON(json: any): PluginConfigInterface { - return PluginConfigInterfaceToJSONTyped(json, false); + return PluginConfigInterfaceToJSONTyped(json, false); } -export function PluginConfigInterfaceToJSONTyped(value?: PluginConfigInterface | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigInterfaceToJSONTyped( + value?: PluginConfigInterface | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Types': ((value['Types'] as Array).map(PluginInterfaceTypeToJSON)), - 'Socket': value['Socket'], - 'ProtocolScheme': value['ProtocolScheme'], - }; + return { + Types: (value["Types"] as Array).map(PluginInterfaceTypeToJSON), + Socket: value["Socket"], + ProtocolScheme: value["ProtocolScheme"], + }; } - diff --git a/src/clients/docker/models/PluginConfigLinux.ts b/src/clients/docker/models/PluginConfigLinux.ts index 74d226fb89..9a005baea8 100644 --- a/src/clients/docker/models/PluginConfigLinux.ts +++ b/src/clients/docker/models/PluginConfigLinux.ts @@ -2,91 +2,94 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginDevice } from './PluginDevice'; +import { mapValues } from "../runtime"; +import type { PluginDevice } from "./PluginDevice"; import { - PluginDeviceFromJSON, - PluginDeviceFromJSONTyped, - PluginDeviceToJSON, - PluginDeviceToJSONTyped, -} from './PluginDevice'; + PluginDeviceFromJSON, + PluginDeviceFromJSONTyped, + PluginDeviceToJSON, + PluginDeviceToJSONTyped, +} from "./PluginDevice"; /** - * + * * @export * @interface PluginConfigLinux */ export interface PluginConfigLinux { - /** - * - * @type {Array} - * @memberof PluginConfigLinux - */ - Capabilities: Array; - /** - * - * @type {boolean} - * @memberof PluginConfigLinux - */ - AllowAllDevices: boolean; - /** - * - * @type {Array} - * @memberof PluginConfigLinux - */ - Devices: Array; + /** + * + * @type {Array} + * @memberof PluginConfigLinux + */ + Capabilities: Array; + /** + * + * @type {boolean} + * @memberof PluginConfigLinux + */ + AllowAllDevices: boolean; + /** + * + * @type {Array} + * @memberof PluginConfigLinux + */ + Devices: Array; } /** * Check if a given object implements the PluginConfigLinux interface. */ export function instanceOfPluginConfigLinux(value: object): value is PluginConfigLinux { - if (!('Capabilities' in value) || value['Capabilities'] === undefined) return false; - if (!('AllowAllDevices' in value) || value['AllowAllDevices'] === undefined) return false; - if (!('Devices' in value) || value['Devices'] === undefined) return false; - return true; + if (!("Capabilities" in value) || value["Capabilities"] === undefined) return false; + if (!("AllowAllDevices" in value) || value["AllowAllDevices"] === undefined) return false; + if (!("Devices" in value) || value["Devices"] === undefined) return false; + return true; } export function PluginConfigLinuxFromJSON(json: any): PluginConfigLinux { - return PluginConfigLinuxFromJSONTyped(json, false); + return PluginConfigLinuxFromJSONTyped(json, false); } -export function PluginConfigLinuxFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigLinux { - if (json == null) { - return json; - } - return { - - 'Capabilities': json['Capabilities'], - 'AllowAllDevices': json['AllowAllDevices'], - 'Devices': ((json['Devices'] as Array).map(PluginDeviceFromJSON)), - }; +export function PluginConfigLinuxFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginConfigLinux { + if (json == null) { + return json; + } + return { + Capabilities: json["Capabilities"], + AllowAllDevices: json["AllowAllDevices"], + Devices: (json["Devices"] as Array).map(PluginDeviceFromJSON), + }; } export function PluginConfigLinuxToJSON(json: any): PluginConfigLinux { - return PluginConfigLinuxToJSONTyped(json, false); + return PluginConfigLinuxToJSONTyped(json, false); } -export function PluginConfigLinuxToJSONTyped(value?: PluginConfigLinux | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigLinuxToJSONTyped( + value?: PluginConfigLinux | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Capabilities': value['Capabilities'], - 'AllowAllDevices': value['AllowAllDevices'], - 'Devices': ((value['Devices'] as Array).map(PluginDeviceToJSON)), - }; + return { + Capabilities: value["Capabilities"], + AllowAllDevices: value["AllowAllDevices"], + Devices: (value["Devices"] as Array).map(PluginDeviceToJSON), + }; } - diff --git a/src/clients/docker/models/PluginConfigNetwork.ts b/src/clients/docker/models/PluginConfigNetwork.ts index d1c03bf401..f41a4ccc67 100644 --- a/src/clients/docker/models/PluginConfigNetwork.ts +++ b/src/clients/docker/models/PluginConfigNetwork.ts @@ -2,65 +2,68 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginConfigNetwork */ export interface PluginConfigNetwork { - /** - * - * @type {string} - * @memberof PluginConfigNetwork - */ - Type: string; + /** + * + * @type {string} + * @memberof PluginConfigNetwork + */ + Type: string; } /** * Check if a given object implements the PluginConfigNetwork interface. */ export function instanceOfPluginConfigNetwork(value: object): value is PluginConfigNetwork { - if (!('Type' in value) || value['Type'] === undefined) return false; - return true; + if (!("Type" in value) || value["Type"] === undefined) return false; + return true; } export function PluginConfigNetworkFromJSON(json: any): PluginConfigNetwork { - return PluginConfigNetworkFromJSONTyped(json, false); + return PluginConfigNetworkFromJSONTyped(json, false); } -export function PluginConfigNetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigNetwork { - if (json == null) { - return json; - } - return { - - 'Type': json['Type'], - }; +export function PluginConfigNetworkFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginConfigNetwork { + if (json == null) { + return json; + } + return { + Type: json["Type"], + }; } export function PluginConfigNetworkToJSON(json: any): PluginConfigNetwork { - return PluginConfigNetworkToJSONTyped(json, false); + return PluginConfigNetworkToJSONTyped(json, false); } -export function PluginConfigNetworkToJSONTyped(value?: PluginConfigNetwork | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigNetworkToJSONTyped( + value?: PluginConfigNetwork | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Type': value['Type'], - }; + return { + Type: value["Type"], + }; } - diff --git a/src/clients/docker/models/PluginConfigRootfs.ts b/src/clients/docker/models/PluginConfigRootfs.ts index abc6cb4fbc..1d02d0c634 100644 --- a/src/clients/docker/models/PluginConfigRootfs.ts +++ b/src/clients/docker/models/PluginConfigRootfs.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginConfigRootfs */ export interface PluginConfigRootfs { - /** - * - * @type {string} - * @memberof PluginConfigRootfs - */ - type?: string; - /** - * - * @type {Array} - * @memberof PluginConfigRootfs - */ - diff_ids?: Array; + /** + * + * @type {string} + * @memberof PluginConfigRootfs + */ + type?: string; + /** + * + * @type {Array} + * @memberof PluginConfigRootfs + */ + diff_ids?: Array; } /** * Check if a given object implements the PluginConfigRootfs interface. */ export function instanceOfPluginConfigRootfs(value: object): value is PluginConfigRootfs { - return true; + return true; } export function PluginConfigRootfsFromJSON(json: any): PluginConfigRootfs { - return PluginConfigRootfsFromJSONTyped(json, false); + return PluginConfigRootfsFromJSONTyped(json, false); } -export function PluginConfigRootfsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigRootfs { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'diff_ids': json['diff_ids'] == null ? undefined : json['diff_ids'], - }; +export function PluginConfigRootfsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginConfigRootfs { + if (json == null) { + return json; + } + return { + type: json["type"] == null ? undefined : json["type"], + diff_ids: json["diff_ids"] == null ? undefined : json["diff_ids"], + }; } export function PluginConfigRootfsToJSON(json: any): PluginConfigRootfs { - return PluginConfigRootfsToJSONTyped(json, false); + return PluginConfigRootfsToJSONTyped(json, false); } -export function PluginConfigRootfsToJSONTyped(value?: PluginConfigRootfs | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigRootfsToJSONTyped( + value?: PluginConfigRootfs | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'diff_ids': value['diff_ids'], - }; + return { + type: value["type"], + diff_ids: value["diff_ids"], + }; } - diff --git a/src/clients/docker/models/PluginConfigUser.ts b/src/clients/docker/models/PluginConfigUser.ts index a83f205bb0..529cd2314f 100644 --- a/src/clients/docker/models/PluginConfigUser.ts +++ b/src/clients/docker/models/PluginConfigUser.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginConfigUser */ export interface PluginConfigUser { - /** - * - * @type {number} - * @memberof PluginConfigUser - */ - UID?: number; - /** - * - * @type {number} - * @memberof PluginConfigUser - */ - GID?: number; + /** + * + * @type {number} + * @memberof PluginConfigUser + */ + UID?: number; + /** + * + * @type {number} + * @memberof PluginConfigUser + */ + GID?: number; } /** * Check if a given object implements the PluginConfigUser interface. */ export function instanceOfPluginConfigUser(value: object): value is PluginConfigUser { - return true; + return true; } export function PluginConfigUserFromJSON(json: any): PluginConfigUser { - return PluginConfigUserFromJSONTyped(json, false); + return PluginConfigUserFromJSONTyped(json, false); } -export function PluginConfigUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginConfigUser { - if (json == null) { - return json; - } - return { - - 'UID': json['UID'] == null ? undefined : json['UID'], - 'GID': json['GID'] == null ? undefined : json['GID'], - }; +export function PluginConfigUserFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginConfigUser { + if (json == null) { + return json; + } + return { + UID: json["UID"] == null ? undefined : json["UID"], + GID: json["GID"] == null ? undefined : json["GID"], + }; } export function PluginConfigUserToJSON(json: any): PluginConfigUser { - return PluginConfigUserToJSONTyped(json, false); + return PluginConfigUserToJSONTyped(json, false); } -export function PluginConfigUserToJSONTyped(value?: PluginConfigUser | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginConfigUserToJSONTyped( + value?: PluginConfigUser | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'UID': value['UID'], - 'GID': value['GID'], - }; + return { + UID: value["UID"], + GID: value["GID"], + }; } - diff --git a/src/clients/docker/models/PluginDevice.ts b/src/clients/docker/models/PluginDevice.ts index 8cdbbabd00..617cfc3276 100644 --- a/src/clients/docker/models/PluginDevice.ts +++ b/src/clients/docker/models/PluginDevice.ts @@ -2,92 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginDevice */ export interface PluginDevice { - /** - * - * @type {string} - * @memberof PluginDevice - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginDevice - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginDevice - */ - Settable: Array; - /** - * - * @type {string} - * @memberof PluginDevice - */ - Path: string; + /** + * + * @type {string} + * @memberof PluginDevice + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginDevice + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginDevice + */ + Settable: Array; + /** + * + * @type {string} + * @memberof PluginDevice + */ + Path: string; } /** * Check if a given object implements the PluginDevice interface. */ export function instanceOfPluginDevice(value: object): value is PluginDevice { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Description' in value) || value['Description'] === undefined) return false; - if (!('Settable' in value) || value['Settable'] === undefined) return false; - if (!('Path' in value) || value['Path'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Description" in value) || value["Description"] === undefined) return false; + if (!("Settable" in value) || value["Settable"] === undefined) return false; + if (!("Path" in value) || value["Path"] === undefined) return false; + return true; } export function PluginDeviceFromJSON(json: any): PluginDevice { - return PluginDeviceFromJSONTyped(json, false); + return PluginDeviceFromJSONTyped(json, false); } export function PluginDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginDevice { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Description': json['Description'], - 'Settable': json['Settable'], - 'Path': json['Path'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"], + Description: json["Description"], + Settable: json["Settable"], + Path: json["Path"], + }; } export function PluginDeviceToJSON(json: any): PluginDevice { - return PluginDeviceToJSONTyped(json, false); + return PluginDeviceToJSONTyped(json, false); } -export function PluginDeviceToJSONTyped(value?: PluginDevice | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginDeviceToJSONTyped( + value?: PluginDevice | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Description': value['Description'], - 'Settable': value['Settable'], - 'Path': value['Path'], - }; + return { + Name: value["Name"], + Description: value["Description"], + Settable: value["Settable"], + Path: value["Path"], + }; } - diff --git a/src/clients/docker/models/PluginEnv.ts b/src/clients/docker/models/PluginEnv.ts index ada7327d22..9e1f65a4ca 100644 --- a/src/clients/docker/models/PluginEnv.ts +++ b/src/clients/docker/models/PluginEnv.ts @@ -2,92 +2,92 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginEnv */ export interface PluginEnv { - /** - * - * @type {string} - * @memberof PluginEnv - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginEnv - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginEnv - */ - Settable: Array; - /** - * - * @type {string} - * @memberof PluginEnv - */ - Value: string; + /** + * + * @type {string} + * @memberof PluginEnv + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginEnv + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginEnv + */ + Settable: Array; + /** + * + * @type {string} + * @memberof PluginEnv + */ + Value: string; } /** * Check if a given object implements the PluginEnv interface. */ export function instanceOfPluginEnv(value: object): value is PluginEnv { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Description' in value) || value['Description'] === undefined) return false; - if (!('Settable' in value) || value['Settable'] === undefined) return false; - if (!('Value' in value) || value['Value'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Description" in value) || value["Description"] === undefined) return false; + if (!("Settable" in value) || value["Settable"] === undefined) return false; + if (!("Value" in value) || value["Value"] === undefined) return false; + return true; } export function PluginEnvFromJSON(json: any): PluginEnv { - return PluginEnvFromJSONTyped(json, false); + return PluginEnvFromJSONTyped(json, false); } export function PluginEnvFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginEnv { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Description': json['Description'], - 'Settable': json['Settable'], - 'Value': json['Value'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"], + Description: json["Description"], + Settable: json["Settable"], + Value: json["Value"], + }; } export function PluginEnvToJSON(json: any): PluginEnv { - return PluginEnvToJSONTyped(json, false); + return PluginEnvToJSONTyped(json, false); } -export function PluginEnvToJSONTyped(value?: PluginEnv | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginEnvToJSONTyped( + value?: PluginEnv | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Description': value['Description'], - 'Settable': value['Settable'], - 'Value': value['Value'], - }; + return { + Name: value["Name"], + Description: value["Description"], + Settable: value["Settable"], + Value: value["Value"], + }; } - diff --git a/src/clients/docker/models/PluginInterfaceType.ts b/src/clients/docker/models/PluginInterfaceType.ts index 924576f0f0..b38bc06f5a 100644 --- a/src/clients/docker/models/PluginInterfaceType.ts +++ b/src/clients/docker/models/PluginInterfaceType.ts @@ -2,83 +2,86 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginInterfaceType */ export interface PluginInterfaceType { - /** - * - * @type {string} - * @memberof PluginInterfaceType - */ - Prefix: string; - /** - * - * @type {string} - * @memberof PluginInterfaceType - */ - Capability: string; - /** - * - * @type {string} - * @memberof PluginInterfaceType - */ - Version: string; + /** + * + * @type {string} + * @memberof PluginInterfaceType + */ + Prefix: string; + /** + * + * @type {string} + * @memberof PluginInterfaceType + */ + Capability: string; + /** + * + * @type {string} + * @memberof PluginInterfaceType + */ + Version: string; } /** * Check if a given object implements the PluginInterfaceType interface. */ export function instanceOfPluginInterfaceType(value: object): value is PluginInterfaceType { - if (!('Prefix' in value) || value['Prefix'] === undefined) return false; - if (!('Capability' in value) || value['Capability'] === undefined) return false; - if (!('Version' in value) || value['Version'] === undefined) return false; - return true; + if (!("Prefix" in value) || value["Prefix"] === undefined) return false; + if (!("Capability" in value) || value["Capability"] === undefined) return false; + if (!("Version" in value) || value["Version"] === undefined) return false; + return true; } export function PluginInterfaceTypeFromJSON(json: any): PluginInterfaceType { - return PluginInterfaceTypeFromJSONTyped(json, false); + return PluginInterfaceTypeFromJSONTyped(json, false); } -export function PluginInterfaceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginInterfaceType { - if (json == null) { - return json; - } - return { - - 'Prefix': json['Prefix'], - 'Capability': json['Capability'], - 'Version': json['Version'], - }; +export function PluginInterfaceTypeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginInterfaceType { + if (json == null) { + return json; + } + return { + Prefix: json["Prefix"], + Capability: json["Capability"], + Version: json["Version"], + }; } export function PluginInterfaceTypeToJSON(json: any): PluginInterfaceType { - return PluginInterfaceTypeToJSONTyped(json, false); + return PluginInterfaceTypeToJSONTyped(json, false); } -export function PluginInterfaceTypeToJSONTyped(value?: PluginInterfaceType | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginInterfaceTypeToJSONTyped( + value?: PluginInterfaceType | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Prefix': value['Prefix'], - 'Capability': value['Capability'], - 'Version': value['Version'], - }; + return { + Prefix: value["Prefix"], + Capability: value["Capability"], + Version: value["Version"], + }; } - diff --git a/src/clients/docker/models/PluginMount.ts b/src/clients/docker/models/PluginMount.ts index c4e2e8f66b..c1044f6124 100644 --- a/src/clients/docker/models/PluginMount.ts +++ b/src/clients/docker/models/PluginMount.ts @@ -2,119 +2,119 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PluginMount */ export interface PluginMount { - /** - * - * @type {string} - * @memberof PluginMount - */ - Name: string; - /** - * - * @type {string} - * @memberof PluginMount - */ - Description: string; - /** - * - * @type {Array} - * @memberof PluginMount - */ - Settable: Array; - /** - * - * @type {string} - * @memberof PluginMount - */ - Source: string; - /** - * - * @type {string} - * @memberof PluginMount - */ - Destination: string; - /** - * - * @type {string} - * @memberof PluginMount - */ - Type: string; - /** - * - * @type {Array} - * @memberof PluginMount - */ - Options: Array; + /** + * + * @type {string} + * @memberof PluginMount + */ + Name: string; + /** + * + * @type {string} + * @memberof PluginMount + */ + Description: string; + /** + * + * @type {Array} + * @memberof PluginMount + */ + Settable: Array; + /** + * + * @type {string} + * @memberof PluginMount + */ + Source: string; + /** + * + * @type {string} + * @memberof PluginMount + */ + Destination: string; + /** + * + * @type {string} + * @memberof PluginMount + */ + Type: string; + /** + * + * @type {Array} + * @memberof PluginMount + */ + Options: Array; } /** * Check if a given object implements the PluginMount interface. */ export function instanceOfPluginMount(value: object): value is PluginMount { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Description' in value) || value['Description'] === undefined) return false; - if (!('Settable' in value) || value['Settable'] === undefined) return false; - if (!('Source' in value) || value['Source'] === undefined) return false; - if (!('Destination' in value) || value['Destination'] === undefined) return false; - if (!('Type' in value) || value['Type'] === undefined) return false; - if (!('Options' in value) || value['Options'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Description" in value) || value["Description"] === undefined) return false; + if (!("Settable" in value) || value["Settable"] === undefined) return false; + if (!("Source" in value) || value["Source"] === undefined) return false; + if (!("Destination" in value) || value["Destination"] === undefined) return false; + if (!("Type" in value) || value["Type"] === undefined) return false; + if (!("Options" in value) || value["Options"] === undefined) return false; + return true; } export function PluginMountFromJSON(json: any): PluginMount { - return PluginMountFromJSONTyped(json, false); + return PluginMountFromJSONTyped(json, false); } export function PluginMountFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginMount { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Description': json['Description'], - 'Settable': json['Settable'], - 'Source': json['Source'], - 'Destination': json['Destination'], - 'Type': json['Type'], - 'Options': json['Options'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"], + Description: json["Description"], + Settable: json["Settable"], + Source: json["Source"], + Destination: json["Destination"], + Type: json["Type"], + Options: json["Options"], + }; } export function PluginMountToJSON(json: any): PluginMount { - return PluginMountToJSONTyped(json, false); + return PluginMountToJSONTyped(json, false); } -export function PluginMountToJSONTyped(value?: PluginMount | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginMountToJSONTyped( + value?: PluginMount | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Description': value['Description'], - 'Settable': value['Settable'], - 'Source': value['Source'], - 'Destination': value['Destination'], - 'Type': value['Type'], - 'Options': value['Options'], - }; + return { + Name: value["Name"], + Description: value["Description"], + Settable: value["Settable"], + Source: value["Source"], + Destination: value["Destination"], + Type: value["Type"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/PluginPrivilege.ts b/src/clients/docker/models/PluginPrivilege.ts index c3198292e8..bfe24810bd 100644 --- a/src/clients/docker/models/PluginPrivilege.ts +++ b/src/clients/docker/models/PluginPrivilege.ts @@ -2,82 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Describes a permission the user has to accept upon installing * the plugin. - * + * * @export * @interface PluginPrivilege */ export interface PluginPrivilege { - /** - * - * @type {string} - * @memberof PluginPrivilege - */ - Name?: string; - /** - * - * @type {string} - * @memberof PluginPrivilege - */ - Description?: string; - /** - * - * @type {Array} - * @memberof PluginPrivilege - */ - Value?: Array; + /** + * + * @type {string} + * @memberof PluginPrivilege + */ + Name?: string; + /** + * + * @type {string} + * @memberof PluginPrivilege + */ + Description?: string; + /** + * + * @type {Array} + * @memberof PluginPrivilege + */ + Value?: Array; } /** * Check if a given object implements the PluginPrivilege interface. */ export function instanceOfPluginPrivilege(value: object): value is PluginPrivilege { - return true; + return true; } export function PluginPrivilegeFromJSON(json: any): PluginPrivilege { - return PluginPrivilegeFromJSONTyped(json, false); + return PluginPrivilegeFromJSONTyped(json, false); } -export function PluginPrivilegeFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginPrivilege { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Description': json['Description'] == null ? undefined : json['Description'], - 'Value': json['Value'] == null ? undefined : json['Value'], - }; +export function PluginPrivilegeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginPrivilege { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Description: json["Description"] == null ? undefined : json["Description"], + Value: json["Value"] == null ? undefined : json["Value"], + }; } export function PluginPrivilegeToJSON(json: any): PluginPrivilege { - return PluginPrivilegeToJSONTyped(json, false); + return PluginPrivilegeToJSONTyped(json, false); } -export function PluginPrivilegeToJSONTyped(value?: PluginPrivilege | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginPrivilegeToJSONTyped( + value?: PluginPrivilege | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Description': value['Description'], - 'Value': value['Value'], - }; + return { + Name: value["Name"], + Description: value["Description"], + Value: value["Value"], + }; } - diff --git a/src/clients/docker/models/PluginSettings.ts b/src/clients/docker/models/PluginSettings.ts index af539702b9..448cd02048 100644 --- a/src/clients/docker/models/PluginSettings.ts +++ b/src/clients/docker/models/PluginSettings.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginDevice } from './PluginDevice'; +import { mapValues } from "../runtime"; +import type { PluginDevice } from "./PluginDevice"; import { - PluginDeviceFromJSON, - PluginDeviceFromJSONTyped, - PluginDeviceToJSON, - PluginDeviceToJSONTyped, -} from './PluginDevice'; -import type { PluginMount } from './PluginMount'; + PluginDeviceFromJSON, + PluginDeviceFromJSONTyped, + PluginDeviceToJSON, + PluginDeviceToJSONTyped, +} from "./PluginDevice"; +import type { PluginMount } from "./PluginMount"; import { - PluginMountFromJSON, - PluginMountFromJSONTyped, - PluginMountToJSON, - PluginMountToJSONTyped, -} from './PluginMount'; + PluginMountFromJSON, + PluginMountFromJSONTyped, + PluginMountToJSON, + PluginMountToJSONTyped, +} from "./PluginMount"; /** * Settings that can be modified by users. @@ -34,75 +34,78 @@ import { * @interface PluginSettings */ export interface PluginSettings { - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Mounts: Array; - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Env: Array; - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Args: Array; - /** - * - * @type {Array} - * @memberof PluginSettings - */ - Devices: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Mounts: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Env: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Args: Array; + /** + * + * @type {Array} + * @memberof PluginSettings + */ + Devices: Array; } /** * Check if a given object implements the PluginSettings interface. */ export function instanceOfPluginSettings(value: object): value is PluginSettings { - if (!('Mounts' in value) || value['Mounts'] === undefined) return false; - if (!('Env' in value) || value['Env'] === undefined) return false; - if (!('Args' in value) || value['Args'] === undefined) return false; - if (!('Devices' in value) || value['Devices'] === undefined) return false; - return true; + if (!("Mounts" in value) || value["Mounts"] === undefined) return false; + if (!("Env" in value) || value["Env"] === undefined) return false; + if (!("Args" in value) || value["Args"] === undefined) return false; + if (!("Devices" in value) || value["Devices"] === undefined) return false; + return true; } export function PluginSettingsFromJSON(json: any): PluginSettings { - return PluginSettingsFromJSONTyped(json, false); + return PluginSettingsFromJSONTyped(json, false); } -export function PluginSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginSettings { - if (json == null) { - return json; - } - return { - - 'Mounts': ((json['Mounts'] as Array).map(PluginMountFromJSON)), - 'Env': json['Env'], - 'Args': json['Args'], - 'Devices': ((json['Devices'] as Array).map(PluginDeviceFromJSON)), - }; +export function PluginSettingsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PluginSettings { + if (json == null) { + return json; + } + return { + Mounts: (json["Mounts"] as Array).map(PluginMountFromJSON), + Env: json["Env"], + Args: json["Args"], + Devices: (json["Devices"] as Array).map(PluginDeviceFromJSON), + }; } export function PluginSettingsToJSON(json: any): PluginSettings { - return PluginSettingsToJSONTyped(json, false); + return PluginSettingsToJSONTyped(json, false); } -export function PluginSettingsToJSONTyped(value?: PluginSettings | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginSettingsToJSONTyped( + value?: PluginSettings | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Mounts': ((value['Mounts'] as Array).map(PluginMountToJSON)), - 'Env': value['Env'], - 'Args': value['Args'], - 'Devices': ((value['Devices'] as Array).map(PluginDeviceToJSON)), - }; + return { + Mounts: (value["Mounts"] as Array).map(PluginMountToJSON), + Env: value["Env"], + Args: value["Args"], + Devices: (value["Devices"] as Array).map(PluginDeviceToJSON), + }; } - diff --git a/src/clients/docker/models/PluginsInfo.ts b/src/clients/docker/models/PluginsInfo.ts index 46acb583ad..1ab7c57b45 100644 --- a/src/clients/docker/models/PluginsInfo.ts +++ b/src/clients/docker/models/PluginsInfo.ts @@ -2,95 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface PluginsInfo */ export interface PluginsInfo { - /** - * Names of available volume-drivers, and network-driver plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Volume?: Array; - /** - * Names of available network-drivers, and network-driver plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Network?: Array; - /** - * Names of available authorization plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Authorization?: Array; - /** - * Names of available logging-drivers, and logging-driver plugins. - * @type {Array} - * @memberof PluginsInfo - */ - Log?: Array; + /** + * Names of available volume-drivers, and network-driver plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Volume?: Array; + /** + * Names of available network-drivers, and network-driver plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Network?: Array; + /** + * Names of available authorization plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Authorization?: Array; + /** + * Names of available logging-drivers, and logging-driver plugins. + * @type {Array} + * @memberof PluginsInfo + */ + Log?: Array; } /** * Check if a given object implements the PluginsInfo interface. */ export function instanceOfPluginsInfo(value: object): value is PluginsInfo { - return true; + return true; } export function PluginsInfoFromJSON(json: any): PluginsInfo { - return PluginsInfoFromJSONTyped(json, false); + return PluginsInfoFromJSONTyped(json, false); } export function PluginsInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PluginsInfo { - if (json == null) { - return json; - } - return { - - 'Volume': json['Volume'] == null ? undefined : json['Volume'], - 'Network': json['Network'] == null ? undefined : json['Network'], - 'Authorization': json['Authorization'] == null ? undefined : json['Authorization'], - 'Log': json['Log'] == null ? undefined : json['Log'], - }; + if (json == null) { + return json; + } + return { + Volume: json["Volume"] == null ? undefined : json["Volume"], + Network: json["Network"] == null ? undefined : json["Network"], + Authorization: json["Authorization"] == null ? undefined : json["Authorization"], + Log: json["Log"] == null ? undefined : json["Log"], + }; } export function PluginsInfoToJSON(json: any): PluginsInfo { - return PluginsInfoToJSONTyped(json, false); + return PluginsInfoToJSONTyped(json, false); } -export function PluginsInfoToJSONTyped(value?: PluginsInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PluginsInfoToJSONTyped( + value?: PluginsInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Volume': value['Volume'], - 'Network': value['Network'], - 'Authorization': value['Authorization'], - 'Log': value['Log'], - }; + return { + Volume: value["Volume"], + Network: value["Network"], + Authorization: value["Authorization"], + Log: value["Log"], + }; } - diff --git a/src/clients/docker/models/Port.ts b/src/clients/docker/models/Port.ts index f371338221..6af7c6fc8e 100644 --- a/src/clients/docker/models/Port.ts +++ b/src/clients/docker/models/Port.ts @@ -2,101 +2,97 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * An open port on a container * @export * @interface Port */ export interface Port { - /** - * Host IP address that the container's port is mapped to - * @type {string} - * @memberof Port - */ - IP?: string; - /** - * Port on the container - * @type {number} - * @memberof Port - */ - PrivatePort: number; - /** - * Port exposed on the host - * @type {number} - * @memberof Port - */ - PublicPort?: number; - /** - * - * @type {string} - * @memberof Port - */ - Type: PortTypeEnum; + /** + * Host IP address that the container's port is mapped to + * @type {string} + * @memberof Port + */ + IP?: string; + /** + * Port on the container + * @type {number} + * @memberof Port + */ + PrivatePort: number; + /** + * Port exposed on the host + * @type {number} + * @memberof Port + */ + PublicPort?: number; + /** + * + * @type {string} + * @memberof Port + */ + Type: PortTypeEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PortTypeEnum { - Tcp = 'tcp', - Udp = 'udp', - Sctp = 'sctp' + Tcp = "tcp", + Udp = "udp", + Sctp = "sctp", } - /** * Check if a given object implements the Port interface. */ export function instanceOfPort(value: object): value is Port { - if (!('PrivatePort' in value) || value['PrivatePort'] === undefined) return false; - if (!('Type' in value) || value['Type'] === undefined) return false; - return true; + if (!("PrivatePort" in value) || value["PrivatePort"] === undefined) return false; + if (!("Type" in value) || value["Type"] === undefined) return false; + return true; } export function PortFromJSON(json: any): Port { - return PortFromJSONTyped(json, false); + return PortFromJSONTyped(json, false); } export function PortFromJSONTyped(json: any, ignoreDiscriminator: boolean): Port { - if (json == null) { - return json; - } - return { - - 'IP': json['IP'] == null ? undefined : json['IP'], - 'PrivatePort': json['PrivatePort'], - 'PublicPort': json['PublicPort'] == null ? undefined : json['PublicPort'], - 'Type': json['Type'], - }; + if (json == null) { + return json; + } + return { + IP: json["IP"] == null ? undefined : json["IP"], + PrivatePort: json["PrivatePort"], + PublicPort: json["PublicPort"] == null ? undefined : json["PublicPort"], + Type: json["Type"], + }; } export function PortToJSON(json: any): Port { - return PortToJSONTyped(json, false); + return PortToJSONTyped(json, false); } export function PortToJSONTyped(value?: Port | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'IP': value['IP'], - 'PrivatePort': value['PrivatePort'], - 'PublicPort': value['PublicPort'], - 'Type': value['Type'], - }; + return { + IP: value["IP"], + PrivatePort: value["PrivatePort"], + PublicPort: value["PublicPort"], + Type: value["Type"], + }; } - diff --git a/src/clients/docker/models/PortBinding.ts b/src/clients/docker/models/PortBinding.ts index 4afd88fb3e..a7072a6a48 100644 --- a/src/clients/docker/models/PortBinding.ts +++ b/src/clients/docker/models/PortBinding.ts @@ -2,74 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * PortBinding represents a binding between a host IP address and a host * port. - * + * * @export * @interface PortBinding */ export interface PortBinding { - /** - * Host IP address that the container's port is mapped to. - * @type {string} - * @memberof PortBinding - */ - HostIp?: string; - /** - * Host port number that the container's port is mapped to. - * @type {string} - * @memberof PortBinding - */ - HostPort?: string; + /** + * Host IP address that the container's port is mapped to. + * @type {string} + * @memberof PortBinding + */ + HostIp?: string; + /** + * Host port number that the container's port is mapped to. + * @type {string} + * @memberof PortBinding + */ + HostPort?: string; } /** * Check if a given object implements the PortBinding interface. */ export function instanceOfPortBinding(value: object): value is PortBinding { - return true; + return true; } export function PortBindingFromJSON(json: any): PortBinding { - return PortBindingFromJSONTyped(json, false); + return PortBindingFromJSONTyped(json, false); } export function PortBindingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PortBinding { - if (json == null) { - return json; - } - return { - - 'HostIp': json['HostIp'] == null ? undefined : json['HostIp'], - 'HostPort': json['HostPort'] == null ? undefined : json['HostPort'], - }; + if (json == null) { + return json; + } + return { + HostIp: json["HostIp"] == null ? undefined : json["HostIp"], + HostPort: json["HostPort"] == null ? undefined : json["HostPort"], + }; } export function PortBindingToJSON(json: any): PortBinding { - return PortBindingToJSONTyped(json, false); + return PortBindingToJSONTyped(json, false); } -export function PortBindingToJSONTyped(value?: PortBinding | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PortBindingToJSONTyped( + value?: PortBinding | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'HostIp': value['HostIp'], - 'HostPort': value['HostPort'], - }; + return { + HostIp: value["HostIp"], + HostPort: value["HostPort"], + }; } - diff --git a/src/clients/docker/models/ProcessConfig.ts b/src/clients/docker/models/ProcessConfig.ts index fd779374f3..041528b3b1 100644 --- a/src/clients/docker/models/ProcessConfig.ts +++ b/src/clients/docker/models/ProcessConfig.ts @@ -2,96 +2,96 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProcessConfig */ export interface ProcessConfig { - /** - * - * @type {boolean} - * @memberof ProcessConfig - */ - privileged?: boolean; - /** - * - * @type {string} - * @memberof ProcessConfig - */ - user?: string; - /** - * - * @type {boolean} - * @memberof ProcessConfig - */ - tty?: boolean; - /** - * - * @type {string} - * @memberof ProcessConfig - */ - entrypoint?: string; - /** - * - * @type {Array} - * @memberof ProcessConfig - */ - arguments?: Array; + /** + * + * @type {boolean} + * @memberof ProcessConfig + */ + privileged?: boolean; + /** + * + * @type {string} + * @memberof ProcessConfig + */ + user?: string; + /** + * + * @type {boolean} + * @memberof ProcessConfig + */ + tty?: boolean; + /** + * + * @type {string} + * @memberof ProcessConfig + */ + entrypoint?: string; + /** + * + * @type {Array} + * @memberof ProcessConfig + */ + arguments?: Array; } /** * Check if a given object implements the ProcessConfig interface. */ export function instanceOfProcessConfig(value: object): value is ProcessConfig { - return true; + return true; } export function ProcessConfigFromJSON(json: any): ProcessConfig { - return ProcessConfigFromJSONTyped(json, false); + return ProcessConfigFromJSONTyped(json, false); } export function ProcessConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProcessConfig { - if (json == null) { - return json; - } - return { - - 'privileged': json['privileged'] == null ? undefined : json['privileged'], - 'user': json['user'] == null ? undefined : json['user'], - 'tty': json['tty'] == null ? undefined : json['tty'], - 'entrypoint': json['entrypoint'] == null ? undefined : json['entrypoint'], - 'arguments': json['arguments'] == null ? undefined : json['arguments'], - }; + if (json == null) { + return json; + } + return { + privileged: json["privileged"] == null ? undefined : json["privileged"], + user: json["user"] == null ? undefined : json["user"], + tty: json["tty"] == null ? undefined : json["tty"], + entrypoint: json["entrypoint"] == null ? undefined : json["entrypoint"], + arguments: json["arguments"] == null ? undefined : json["arguments"], + }; } export function ProcessConfigToJSON(json: any): ProcessConfig { - return ProcessConfigToJSONTyped(json, false); + return ProcessConfigToJSONTyped(json, false); } -export function ProcessConfigToJSONTyped(value?: ProcessConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProcessConfigToJSONTyped( + value?: ProcessConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'privileged': value['privileged'], - 'user': value['user'], - 'tty': value['tty'], - 'entrypoint': value['entrypoint'], - 'arguments': value['arguments'], - }; + return { + privileged: value["privileged"], + user: value["user"], + tty: value["tty"], + entrypoint: value["entrypoint"], + arguments: value["arguments"], + }; } - diff --git a/src/clients/docker/models/ProgressDetail.ts b/src/clients/docker/models/ProgressDetail.ts index c0322d3939..7dcb1e60f6 100644 --- a/src/clients/docker/models/ProgressDetail.ts +++ b/src/clients/docker/models/ProgressDetail.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProgressDetail */ export interface ProgressDetail { - /** - * - * @type {number} - * @memberof ProgressDetail - */ - current?: number; - /** - * - * @type {number} - * @memberof ProgressDetail - */ - total?: number; + /** + * + * @type {number} + * @memberof ProgressDetail + */ + current?: number; + /** + * + * @type {number} + * @memberof ProgressDetail + */ + total?: number; } /** * Check if a given object implements the ProgressDetail interface. */ export function instanceOfProgressDetail(value: object): value is ProgressDetail { - return true; + return true; } export function ProgressDetailFromJSON(json: any): ProgressDetail { - return ProgressDetailFromJSONTyped(json, false); + return ProgressDetailFromJSONTyped(json, false); } -export function ProgressDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProgressDetail { - if (json == null) { - return json; - } - return { - - 'current': json['current'] == null ? undefined : json['current'], - 'total': json['total'] == null ? undefined : json['total'], - }; +export function ProgressDetailFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProgressDetail { + if (json == null) { + return json; + } + return { + current: json["current"] == null ? undefined : json["current"], + total: json["total"] == null ? undefined : json["total"], + }; } export function ProgressDetailToJSON(json: any): ProgressDetail { - return ProgressDetailToJSONTyped(json, false); + return ProgressDetailToJSONTyped(json, false); } -export function ProgressDetailToJSONTyped(value?: ProgressDetail | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProgressDetailToJSONTyped( + value?: ProgressDetail | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'current': value['current'], - 'total': value['total'], - }; + return { + current: value["current"], + total: value["total"], + }; } - diff --git a/src/clients/docker/models/PushImageInfo.ts b/src/clients/docker/models/PushImageInfo.ts index e7a52399e9..0708f631b6 100644 --- a/src/clients/docker/models/PushImageInfo.ts +++ b/src/clients/docker/models/PushImageInfo.ts @@ -2,96 +2,97 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ProgressDetail } from './ProgressDetail'; +import { mapValues } from "../runtime"; +import type { ProgressDetail } from "./ProgressDetail"; import { - ProgressDetailFromJSON, - ProgressDetailFromJSONTyped, - ProgressDetailToJSON, - ProgressDetailToJSONTyped, -} from './ProgressDetail'; + ProgressDetailFromJSON, + ProgressDetailFromJSONTyped, + ProgressDetailToJSON, + ProgressDetailToJSONTyped, +} from "./ProgressDetail"; /** - * + * * @export * @interface PushImageInfo */ export interface PushImageInfo { - /** - * - * @type {string} - * @memberof PushImageInfo - */ - error?: string; - /** - * - * @type {string} - * @memberof PushImageInfo - */ - status?: string; - /** - * - * @type {string} - * @memberof PushImageInfo - */ - progress?: string; - /** - * - * @type {ProgressDetail} - * @memberof PushImageInfo - */ - progressDetail?: ProgressDetail; + /** + * + * @type {string} + * @memberof PushImageInfo + */ + error?: string; + /** + * + * @type {string} + * @memberof PushImageInfo + */ + status?: string; + /** + * + * @type {string} + * @memberof PushImageInfo + */ + progress?: string; + /** + * + * @type {ProgressDetail} + * @memberof PushImageInfo + */ + progressDetail?: ProgressDetail; } /** * Check if a given object implements the PushImageInfo interface. */ export function instanceOfPushImageInfo(value: object): value is PushImageInfo { - return true; + return true; } export function PushImageInfoFromJSON(json: any): PushImageInfo { - return PushImageInfoFromJSONTyped(json, false); + return PushImageInfoFromJSONTyped(json, false); } export function PushImageInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushImageInfo { - if (json == null) { - return json; - } - return { - - 'error': json['error'] == null ? undefined : json['error'], - 'status': json['status'] == null ? undefined : json['status'], - 'progress': json['progress'] == null ? undefined : json['progress'], - 'progressDetail': json['progressDetail'] == null ? undefined : ProgressDetailFromJSON(json['progressDetail']), - }; + if (json == null) { + return json; + } + return { + error: json["error"] == null ? undefined : json["error"], + status: json["status"] == null ? undefined : json["status"], + progress: json["progress"] == null ? undefined : json["progress"], + progressDetail: + json["progressDetail"] == null ? undefined : ProgressDetailFromJSON(json["progressDetail"]), + }; } export function PushImageInfoToJSON(json: any): PushImageInfo { - return PushImageInfoToJSONTyped(json, false); + return PushImageInfoToJSONTyped(json, false); } -export function PushImageInfoToJSONTyped(value?: PushImageInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PushImageInfoToJSONTyped( + value?: PushImageInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error': value['error'], - 'status': value['status'], - 'progress': value['progress'], - 'progressDetail': ProgressDetailToJSON(value['progressDetail']), - }; + return { + error: value["error"], + status: value["status"], + progress: value["progress"], + progressDetail: ProgressDetailToJSON(value["progressDetail"]), + }; } - diff --git a/src/clients/docker/models/Reachability.ts b/src/clients/docker/models/Reachability.ts index 11ba3e627a..efc930087a 100644 --- a/src/clients/docker/models/Reachability.ts +++ b/src/clients/docker/models/Reachability.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,36 +18,34 @@ * @enum {string} */ export enum Reachability { - Unknown = 'unknown', - Unreachable = 'unreachable', - Reachable = 'reachable' + Unknown = "unknown", + Unreachable = "unreachable", + Reachable = "reachable", } - export function instanceOfReachability(value: any): boolean { - for (const key in Reachability) { - if (Object.prototype.hasOwnProperty.call(Reachability, key)) { - if (Reachability[key as keyof typeof Reachability] === value) { - return true; - } - } + for (const key in Reachability) { + if (Object.prototype.hasOwnProperty.call(Reachability, key)) { + if (Reachability[key as keyof typeof Reachability] === value) { + return true; + } } - return false; + } + return false; } export function ReachabilityFromJSON(json: any): Reachability { - return ReachabilityFromJSONTyped(json, false); + return ReachabilityFromJSONTyped(json, false); } export function ReachabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Reachability { - return json as Reachability; + return json as Reachability; } export function ReachabilityToJSON(value?: Reachability | null): any { - return value as any; + return value as any; } export function ReachabilityToJSONTyped(value: any, ignoreDiscriminator: boolean): Reachability { - return value as Reachability; + return value as Reachability; } - diff --git a/src/clients/docker/models/RegistryServiceConfig.ts b/src/clients/docker/models/RegistryServiceConfig.ts index 32055f63b5..19e6720b67 100644 --- a/src/clients/docker/models/RegistryServiceConfig.ts +++ b/src/clients/docker/models/RegistryServiceConfig.ts @@ -2,171 +2,183 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { IndexInfo } from './IndexInfo'; +import { mapValues } from "../runtime"; +import type { IndexInfo } from "./IndexInfo"; import { - IndexInfoFromJSON, - IndexInfoFromJSONTyped, - IndexInfoToJSON, - IndexInfoToJSONTyped, -} from './IndexInfo'; + IndexInfoFromJSON, + IndexInfoFromJSONTyped, + IndexInfoToJSON, + IndexInfoToJSONTyped, +} from "./IndexInfo"; /** * RegistryServiceConfig stores daemon registry services configuration. - * + * * @export * @interface RegistryServiceConfig */ export interface RegistryServiceConfig { - /** - * List of IP ranges to which nondistributable artifacts can be pushed, - * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). - * - * Some images (for example, Windows base images) contain artifacts - * whose distribution is restricted by license. When these images are - * pushed to a registry, restricted artifacts are not included. - * - * This configuration override this behavior, and enables the daemon to - * push nondistributable artifacts to all registries whose resolved IP - * address is within the subnet described by the CIDR syntax. - * - * This option is useful when pushing images containing - * nondistributable artifacts to a registry on an air-gapped network so - * hosts on that network can pull the images without connecting to - * another server. - * - * > **Warning**: Nondistributable artifacts typically have restrictions - * > on how and where they can be distributed and shared. Only use this - * > feature to push artifacts to private registries and ensure that you - * > are in compliance with any terms that cover redistributing - * > nondistributable artifacts. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - AllowNondistributableArtifactsCIDRs?: Array; - /** - * List of registry hostnames to which nondistributable artifacts can be - * pushed, using the format `[:]` or `[:]`. - * - * Some images (for example, Windows base images) contain artifacts - * whose distribution is restricted by license. When these images are - * pushed to a registry, restricted artifacts are not included. - * - * This configuration override this behavior for the specified - * registries. - * - * This option is useful when pushing images containing - * nondistributable artifacts to a registry on an air-gapped network so - * hosts on that network can pull the images without connecting to - * another server. - * - * > **Warning**: Nondistributable artifacts typically have restrictions - * > on how and where they can be distributed and shared. Only use this - * > feature to push artifacts to private registries and ensure that you - * > are in compliance with any terms that cover redistributing - * > nondistributable artifacts. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - AllowNondistributableArtifactsHostnames?: Array; - /** - * List of IP ranges of insecure registries, using the CIDR syntax - * ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries - * accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates - * from unknown CAs) communication. - * - * By default, local registries (`127.0.0.0/8`) are configured as - * insecure. All other registries are secure. Communicating with an - * insecure registry is not possible if the daemon assumes that registry - * is secure. - * - * This configuration override this behavior, insecure communication with - * registries whose resolved IP address is within the subnet described by - * the CIDR syntax. - * - * Registries can also be marked insecure by hostname. Those registries - * are listed under `IndexConfigs` and have their `Secure` field set to - * `false`. - * - * > **Warning**: Using this option can be useful when running a local - * > registry, but introduces security vulnerabilities. This option - * > should therefore ONLY be used for testing purposes. For increased - * > security, users should add their CA to their system's list of trusted - * > CAs instead of enabling this option. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - InsecureRegistryCIDRs?: Array; - /** - * - * @type {{ [key: string]: IndexInfo; }} - * @memberof RegistryServiceConfig - */ - IndexConfigs?: { [key: string]: IndexInfo; }; - /** - * List of registry URLs that act as a mirror for the official - * (`docker.io`) registry. - * - * @type {Array} - * @memberof RegistryServiceConfig - */ - Mirrors?: Array; + /** + * List of IP ranges to which nondistributable artifacts can be pushed, + * using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + * + * Some images (for example, Windows base images) contain artifacts + * whose distribution is restricted by license. When these images are + * pushed to a registry, restricted artifacts are not included. + * + * This configuration override this behavior, and enables the daemon to + * push nondistributable artifacts to all registries whose resolved IP + * address is within the subnet described by the CIDR syntax. + * + * This option is useful when pushing images containing + * nondistributable artifacts to a registry on an air-gapped network so + * hosts on that network can pull the images without connecting to + * another server. + * + * > **Warning**: Nondistributable artifacts typically have restrictions + * > on how and where they can be distributed and shared. Only use this + * > feature to push artifacts to private registries and ensure that you + * > are in compliance with any terms that cover redistributing + * > nondistributable artifacts. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + AllowNondistributableArtifactsCIDRs?: Array; + /** + * List of registry hostnames to which nondistributable artifacts can be + * pushed, using the format `[:]` or `[:]`. + * + * Some images (for example, Windows base images) contain artifacts + * whose distribution is restricted by license. When these images are + * pushed to a registry, restricted artifacts are not included. + * + * This configuration override this behavior for the specified + * registries. + * + * This option is useful when pushing images containing + * nondistributable artifacts to a registry on an air-gapped network so + * hosts on that network can pull the images without connecting to + * another server. + * + * > **Warning**: Nondistributable artifacts typically have restrictions + * > on how and where they can be distributed and shared. Only use this + * > feature to push artifacts to private registries and ensure that you + * > are in compliance with any terms that cover redistributing + * > nondistributable artifacts. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + AllowNondistributableArtifactsHostnames?: Array; + /** + * List of IP ranges of insecure registries, using the CIDR syntax + * ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + * accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + * from unknown CAs) communication. + * + * By default, local registries (`127.0.0.0/8`) are configured as + * insecure. All other registries are secure. Communicating with an + * insecure registry is not possible if the daemon assumes that registry + * is secure. + * + * This configuration override this behavior, insecure communication with + * registries whose resolved IP address is within the subnet described by + * the CIDR syntax. + * + * Registries can also be marked insecure by hostname. Those registries + * are listed under `IndexConfigs` and have their `Secure` field set to + * `false`. + * + * > **Warning**: Using this option can be useful when running a local + * > registry, but introduces security vulnerabilities. This option + * > should therefore ONLY be used for testing purposes. For increased + * > security, users should add their CA to their system's list of trusted + * > CAs instead of enabling this option. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + InsecureRegistryCIDRs?: Array; + /** + * + * @type {{ [key: string]: IndexInfo; }} + * @memberof RegistryServiceConfig + */ + IndexConfigs?: { [key: string]: IndexInfo }; + /** + * List of registry URLs that act as a mirror for the official + * (`docker.io`) registry. + * + * @type {Array} + * @memberof RegistryServiceConfig + */ + Mirrors?: Array; } /** * Check if a given object implements the RegistryServiceConfig interface. */ export function instanceOfRegistryServiceConfig(value: object): value is RegistryServiceConfig { - return true; + return true; } export function RegistryServiceConfigFromJSON(json: any): RegistryServiceConfig { - return RegistryServiceConfigFromJSONTyped(json, false); + return RegistryServiceConfigFromJSONTyped(json, false); } -export function RegistryServiceConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegistryServiceConfig { - if (json == null) { - return json; - } - return { - - 'AllowNondistributableArtifactsCIDRs': json['AllowNondistributableArtifactsCIDRs'] == null ? undefined : json['AllowNondistributableArtifactsCIDRs'], - 'AllowNondistributableArtifactsHostnames': json['AllowNondistributableArtifactsHostnames'] == null ? undefined : json['AllowNondistributableArtifactsHostnames'], - 'InsecureRegistryCIDRs': json['InsecureRegistryCIDRs'] == null ? undefined : json['InsecureRegistryCIDRs'], - 'IndexConfigs': json['IndexConfigs'] == null ? undefined : (mapValues(json['IndexConfigs'], IndexInfoFromJSON)), - 'Mirrors': json['Mirrors'] == null ? undefined : json['Mirrors'], - }; +export function RegistryServiceConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RegistryServiceConfig { + if (json == null) { + return json; + } + return { + AllowNondistributableArtifactsCIDRs: + json["AllowNondistributableArtifactsCIDRs"] == null + ? undefined + : json["AllowNondistributableArtifactsCIDRs"], + AllowNondistributableArtifactsHostnames: + json["AllowNondistributableArtifactsHostnames"] == null + ? undefined + : json["AllowNondistributableArtifactsHostnames"], + InsecureRegistryCIDRs: + json["InsecureRegistryCIDRs"] == null ? undefined : json["InsecureRegistryCIDRs"], + IndexConfigs: + json["IndexConfigs"] == null ? undefined : mapValues(json["IndexConfigs"], IndexInfoFromJSON), + Mirrors: json["Mirrors"] == null ? undefined : json["Mirrors"], + }; } export function RegistryServiceConfigToJSON(json: any): RegistryServiceConfig { - return RegistryServiceConfigToJSONTyped(json, false); + return RegistryServiceConfigToJSONTyped(json, false); } -export function RegistryServiceConfigToJSONTyped(value?: RegistryServiceConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RegistryServiceConfigToJSONTyped( + value?: RegistryServiceConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'AllowNondistributableArtifactsCIDRs': value['AllowNondistributableArtifactsCIDRs'], - 'AllowNondistributableArtifactsHostnames': value['AllowNondistributableArtifactsHostnames'], - 'InsecureRegistryCIDRs': value['InsecureRegistryCIDRs'], - 'IndexConfigs': value['IndexConfigs'] == null ? undefined : (mapValues(value['IndexConfigs'], IndexInfoToJSON)), - 'Mirrors': value['Mirrors'], - }; + return { + AllowNondistributableArtifactsCIDRs: value["AllowNondistributableArtifactsCIDRs"], + AllowNondistributableArtifactsHostnames: value["AllowNondistributableArtifactsHostnames"], + InsecureRegistryCIDRs: value["InsecureRegistryCIDRs"], + IndexConfigs: + value["IndexConfigs"] == null ? undefined : mapValues(value["IndexConfigs"], IndexInfoToJSON), + Mirrors: value["Mirrors"], + }; } - diff --git a/src/clients/docker/models/ResourceObject.ts b/src/clients/docker/models/ResourceObject.ts index ca7d925edb..9101b3af38 100644 --- a/src/clients/docker/models/ResourceObject.ts +++ b/src/clients/docker/models/ResourceObject.ts @@ -2,92 +2,101 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GenericResourcesInner } from './GenericResourcesInner'; +import { mapValues } from "../runtime"; +import type { GenericResourcesInner } from "./GenericResourcesInner"; import { - GenericResourcesInnerFromJSON, - GenericResourcesInnerFromJSONTyped, - GenericResourcesInnerToJSON, - GenericResourcesInnerToJSONTyped, -} from './GenericResourcesInner'; + GenericResourcesInnerFromJSON, + GenericResourcesInnerFromJSONTyped, + GenericResourcesInnerToJSON, + GenericResourcesInnerToJSONTyped, +} from "./GenericResourcesInner"; /** * An object describing the resources which can be advertised by a node and * requested by a task. - * + * * @export * @interface ResourceObject */ export interface ResourceObject { - /** - * - * @type {number} - * @memberof ResourceObject - */ - NanoCPUs?: number; - /** - * - * @type {number} - * @memberof ResourceObject - */ - MemoryBytes?: number; - /** - * User-defined resources can be either Integer resources (e.g, `SSD=3`) or - * String resources (e.g, `GPU=UUID1`). - * - * @type {Array} - * @memberof ResourceObject - */ - GenericResources?: Array; + /** + * + * @type {number} + * @memberof ResourceObject + */ + NanoCPUs?: number; + /** + * + * @type {number} + * @memberof ResourceObject + */ + MemoryBytes?: number; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + * String resources (e.g, `GPU=UUID1`). + * + * @type {Array} + * @memberof ResourceObject + */ + GenericResources?: Array; } /** * Check if a given object implements the ResourceObject interface. */ export function instanceOfResourceObject(value: object): value is ResourceObject { - return true; + return true; } export function ResourceObjectFromJSON(json: any): ResourceObject { - return ResourceObjectFromJSONTyped(json, false); + return ResourceObjectFromJSONTyped(json, false); } -export function ResourceObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceObject { - if (json == null) { - return json; - } - return { - - 'NanoCPUs': json['NanoCPUs'] == null ? undefined : json['NanoCPUs'], - 'MemoryBytes': json['MemoryBytes'] == null ? undefined : json['MemoryBytes'], - 'GenericResources': json['GenericResources'] == null ? undefined : ((json['GenericResources'] as Array).map(GenericResourcesInnerFromJSON)), - }; +export function ResourceObjectFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResourceObject { + if (json == null) { + return json; + } + return { + NanoCPUs: json["NanoCPUs"] == null ? undefined : json["NanoCPUs"], + MemoryBytes: json["MemoryBytes"] == null ? undefined : json["MemoryBytes"], + GenericResources: + json["GenericResources"] == null + ? undefined + : (json["GenericResources"] as Array).map(GenericResourcesInnerFromJSON), + }; } export function ResourceObjectToJSON(json: any): ResourceObject { - return ResourceObjectToJSONTyped(json, false); + return ResourceObjectToJSONTyped(json, false); } -export function ResourceObjectToJSONTyped(value?: ResourceObject | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourceObjectToJSONTyped( + value?: ResourceObject | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NanoCPUs': value['NanoCPUs'], - 'MemoryBytes': value['MemoryBytes'], - 'GenericResources': value['GenericResources'] == null ? undefined : ((value['GenericResources'] as Array).map(GenericResourcesInnerToJSON)), - }; + return { + NanoCPUs: value["NanoCPUs"], + MemoryBytes: value["MemoryBytes"], + GenericResources: + value["GenericResources"] == null + ? undefined + : (value["GenericResources"] as Array).map(GenericResourcesInnerToJSON), + }; } - diff --git a/src/clients/docker/models/Resources.ts b/src/clients/docker/models/Resources.ts index 486bf9031d..dfd651d319 100644 --- a/src/clients/docker/models/Resources.ts +++ b/src/clients/docker/models/Resources.ts @@ -2,52 +2,52 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; +import { mapValues } from "../runtime"; +import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from './ResourcesUlimitsInner'; -import type { ThrottleDevice } from './ThrottleDevice'; + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from "./ResourcesUlimitsInner"; +import type { ThrottleDevice } from "./ThrottleDevice"; import { - ThrottleDeviceFromJSON, - ThrottleDeviceFromJSONTyped, - ThrottleDeviceToJSON, - ThrottleDeviceToJSONTyped, -} from './ThrottleDevice'; -import type { DeviceMapping } from './DeviceMapping'; + ThrottleDeviceFromJSON, + ThrottleDeviceFromJSONTyped, + ThrottleDeviceToJSON, + ThrottleDeviceToJSONTyped, +} from "./ThrottleDevice"; +import type { DeviceMapping } from "./DeviceMapping"; import { - DeviceMappingFromJSON, - DeviceMappingFromJSONTyped, - DeviceMappingToJSON, - DeviceMappingToJSONTyped, -} from './DeviceMapping'; -import type { DeviceRequest } from './DeviceRequest'; + DeviceMappingFromJSON, + DeviceMappingFromJSONTyped, + DeviceMappingToJSON, + DeviceMappingToJSONTyped, +} from "./DeviceMapping"; +import type { DeviceRequest } from "./DeviceRequest"; import { - DeviceRequestFromJSON, - DeviceRequestFromJSONTyped, - DeviceRequestToJSON, - DeviceRequestToJSONTyped, -} from './DeviceRequest'; -import type { ResourcesBlkioWeightDeviceInner } from './ResourcesBlkioWeightDeviceInner'; + DeviceRequestFromJSON, + DeviceRequestFromJSONTyped, + DeviceRequestToJSON, + DeviceRequestToJSONTyped, +} from "./DeviceRequest"; +import type { ResourcesBlkioWeightDeviceInner } from "./ResourcesBlkioWeightDeviceInner"; import { - ResourcesBlkioWeightDeviceInnerFromJSON, - ResourcesBlkioWeightDeviceInnerFromJSONTyped, - ResourcesBlkioWeightDeviceInnerToJSON, - ResourcesBlkioWeightDeviceInnerToJSONTyped, -} from './ResourcesBlkioWeightDeviceInner'; + ResourcesBlkioWeightDeviceInnerFromJSON, + ResourcesBlkioWeightDeviceInnerFromJSONTyped, + ResourcesBlkioWeightDeviceInnerToJSON, + ResourcesBlkioWeightDeviceInnerToJSONTyped, +} from "./ResourcesBlkioWeightDeviceInner"; /** * A container's resources (cgroups config, ulimits, etc) @@ -55,358 +55,406 @@ import { * @interface Resources */ export interface Resources { - /** - * An integer value representing this container's relative CPU weight - * versus other containers. - * - * @type {number} - * @memberof Resources - */ - CpuShares?: number; - /** - * Memory limit in bytes. - * @type {number} - * @memberof Resources - */ - Memory?: number; - /** - * Path to `cgroups` under which the container's `cgroup` is created. If - * the path is not absolute, the path is considered to be relative to the - * `cgroups` path of the init process. Cgroups are created if they do not - * already exist. - * - * @type {string} - * @memberof Resources - */ - CgroupParent?: string; - /** - * Block IO weight (relative weight). - * @type {number} - * @memberof Resources - */ - BlkioWeight?: number; - /** - * Block IO weight (relative device weight) in the form: - * - * ``` - * [{"Path": "device_path", "Weight": weight}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioWeightDevice?: Array; - /** - * Limit read rate (bytes per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceReadBps?: Array; - /** - * Limit write rate (bytes per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceWriteBps?: Array; - /** - * Limit read rate (IO per second) from a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceReadIOps?: Array; - /** - * Limit write rate (IO per second) to a device, in the form: - * - * ``` - * [{"Path": "device_path", "Rate": rate}] - * ``` - * - * @type {Array} - * @memberof Resources - */ - BlkioDeviceWriteIOps?: Array; - /** - * The length of a CPU period in microseconds. - * @type {number} - * @memberof Resources - */ - CpuPeriod?: number; - /** - * Microseconds of CPU time that the container can get in a CPU period. - * - * @type {number} - * @memberof Resources - */ - CpuQuota?: number; - /** - * The length of a CPU real-time period in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof Resources - */ - CpuRealtimePeriod?: number; - /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to - * allocate no time allocated to real-time tasks. - * - * @type {number} - * @memberof Resources - */ - CpuRealtimeRuntime?: number; - /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`). - * - * @type {string} - * @memberof Resources - */ - CpusetCpus?: string; - /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only - * effective on NUMA systems. - * - * @type {string} - * @memberof Resources - */ - CpusetMems?: string; - /** - * A list of devices to add to the container. - * @type {Array} - * @memberof Resources - */ - Devices?: Array; - /** - * a list of cgroup rules to apply to the container - * @type {Array} - * @memberof Resources - */ - DeviceCgroupRules?: Array; - /** - * A list of requests for devices to be sent to device drivers. - * - * @type {Array} - * @memberof Resources - */ - DeviceRequests?: Array; - /** - * Hard limit for kernel TCP buffer memory (in bytes). Depending on the - * OCI runtime in use, this option may be ignored. It is no longer supported - * by the default (runc) runtime. - * - * This field is omitted when empty. - * - * @type {number} - * @memberof Resources - */ - KernelMemoryTCP?: number; - /** - * Memory soft limit in bytes. - * @type {number} - * @memberof Resources - */ - MemoryReservation?: number; - /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited - * swap. - * - * @type {number} - * @memberof Resources - */ - MemorySwap?: number; - /** - * Tune a container's memory swappiness behavior. Accepts an integer - * between 0 and 100. - * - * @type {number} - * @memberof Resources - */ - MemorySwappiness?: number; - /** - * CPU quota in units of 10-9 CPUs. - * @type {number} - * @memberof Resources - */ - NanoCpus?: number; - /** - * Disable OOM Killer for the container. - * @type {boolean} - * @memberof Resources - */ - OomKillDisable?: boolean; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof Resources - */ - Init?: boolean | null; - /** - * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` - * to not change. - * - * @type {number} - * @memberof Resources - */ - PidsLimit?: number | null; - /** - * A list of resource limits to set in the container. For example: - * - * ``` - * {"Name": "nofile", "Soft": 1024, "Hard": 2048} - * ``` - * - * @type {Array} - * @memberof Resources - */ - Ulimits?: Array; - /** - * The number of usable CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof Resources - */ - CpuCount?: number; - /** - * The usable percentage of the available CPUs (Windows only). - * - * On Windows Server containers, the processor resource controls are - * mutually exclusive. The order of precedence is `CPUCount` first, then - * `CPUShares`, and `CPUPercent` last. - * - * @type {number} - * @memberof Resources - */ - CpuPercent?: number; - /** - * Maximum IOps for the container system drive (Windows only) - * @type {number} - * @memberof Resources - */ - IOMaximumIOps?: number; - /** - * Maximum IO in bytes per second for the container system drive - * (Windows only). - * - * @type {number} - * @memberof Resources - */ - IOMaximumBandwidth?: number; + /** + * An integer value representing this container's relative CPU weight + * versus other containers. + * + * @type {number} + * @memberof Resources + */ + CpuShares?: number; + /** + * Memory limit in bytes. + * @type {number} + * @memberof Resources + */ + Memory?: number; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If + * the path is not absolute, the path is considered to be relative to the + * `cgroups` path of the init process. Cgroups are created if they do not + * already exist. + * + * @type {string} + * @memberof Resources + */ + CgroupParent?: string; + /** + * Block IO weight (relative weight). + * @type {number} + * @memberof Resources + */ + BlkioWeight?: number; + /** + * Block IO weight (relative device weight) in the form: + * + * ``` + * [{"Path": "device_path", "Weight": weight}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioWeightDevice?: Array; + /** + * Limit read rate (bytes per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceReadBps?: Array; + /** + * Limit write rate (bytes per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceWriteBps?: Array; + /** + * Limit read rate (IO per second) from a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceReadIOps?: Array; + /** + * Limit write rate (IO per second) to a device, in the form: + * + * ``` + * [{"Path": "device_path", "Rate": rate}] + * ``` + * + * @type {Array} + * @memberof Resources + */ + BlkioDeviceWriteIOps?: Array; + /** + * The length of a CPU period in microseconds. + * @type {number} + * @memberof Resources + */ + CpuPeriod?: number; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @type {number} + * @memberof Resources + */ + CpuQuota?: number; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof Resources + */ + CpuRealtimePeriod?: number; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to + * allocate no time allocated to real-time tasks. + * + * @type {number} + * @memberof Resources + */ + CpuRealtimeRuntime?: number; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * + * @type {string} + * @memberof Resources + */ + CpusetCpus?: string; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + * effective on NUMA systems. + * + * @type {string} + * @memberof Resources + */ + CpusetMems?: string; + /** + * A list of devices to add to the container. + * @type {Array} + * @memberof Resources + */ + Devices?: Array; + /** + * a list of cgroup rules to apply to the container + * @type {Array} + * @memberof Resources + */ + DeviceCgroupRules?: Array; + /** + * A list of requests for devices to be sent to device drivers. + * + * @type {Array} + * @memberof Resources + */ + DeviceRequests?: Array; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + * OCI runtime in use, this option may be ignored. It is no longer supported + * by the default (runc) runtime. + * + * This field is omitted when empty. + * + * @type {number} + * @memberof Resources + */ + KernelMemoryTCP?: number; + /** + * Memory soft limit in bytes. + * @type {number} + * @memberof Resources + */ + MemoryReservation?: number; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + * swap. + * + * @type {number} + * @memberof Resources + */ + MemorySwap?: number; + /** + * Tune a container's memory swappiness behavior. Accepts an integer + * between 0 and 100. + * + * @type {number} + * @memberof Resources + */ + MemorySwappiness?: number; + /** + * CPU quota in units of 10-9 CPUs. + * @type {number} + * @memberof Resources + */ + NanoCpus?: number; + /** + * Disable OOM Killer for the container. + * @type {boolean} + * @memberof Resources + */ + OomKillDisable?: boolean; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof Resources + */ + Init?: boolean | null; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + * to not change. + * + * @type {number} + * @memberof Resources + */ + PidsLimit?: number | null; + /** + * A list of resource limits to set in the container. For example: + * + * ``` + * {"Name": "nofile", "Soft": 1024, "Hard": 2048} + * ``` + * + * @type {Array} + * @memberof Resources + */ + Ulimits?: Array; + /** + * The number of usable CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof Resources + */ + CpuCount?: number; + /** + * The usable percentage of the available CPUs (Windows only). + * + * On Windows Server containers, the processor resource controls are + * mutually exclusive. The order of precedence is `CPUCount` first, then + * `CPUShares`, and `CPUPercent` last. + * + * @type {number} + * @memberof Resources + */ + CpuPercent?: number; + /** + * Maximum IOps for the container system drive (Windows only) + * @type {number} + * @memberof Resources + */ + IOMaximumIOps?: number; + /** + * Maximum IO in bytes per second for the container system drive + * (Windows only). + * + * @type {number} + * @memberof Resources + */ + IOMaximumBandwidth?: number; } /** * Check if a given object implements the Resources interface. */ export function instanceOfResources(value: object): value is Resources { - return true; + return true; } export function ResourcesFromJSON(json: any): Resources { - return ResourcesFromJSONTyped(json, false); + return ResourcesFromJSONTyped(json, false); } export function ResourcesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Resources { - if (json == null) { - return json; - } - return { - - 'CpuShares': json['CpuShares'] == null ? undefined : json['CpuShares'], - 'Memory': json['Memory'] == null ? undefined : json['Memory'], - 'CgroupParent': json['CgroupParent'] == null ? undefined : json['CgroupParent'], - 'BlkioWeight': json['BlkioWeight'] == null ? undefined : json['BlkioWeight'], - 'BlkioWeightDevice': json['BlkioWeightDevice'] == null ? undefined : ((json['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON)), - 'BlkioDeviceReadBps': json['BlkioDeviceReadBps'] == null ? undefined : ((json['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceWriteBps': json['BlkioDeviceWriteBps'] == null ? undefined : ((json['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceReadIOps': json['BlkioDeviceReadIOps'] == null ? undefined : ((json['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceFromJSON)), - 'BlkioDeviceWriteIOps': json['BlkioDeviceWriteIOps'] == null ? undefined : ((json['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceFromJSON)), - 'CpuPeriod': json['CpuPeriod'] == null ? undefined : json['CpuPeriod'], - 'CpuQuota': json['CpuQuota'] == null ? undefined : json['CpuQuota'], - 'CpuRealtimePeriod': json['CpuRealtimePeriod'] == null ? undefined : json['CpuRealtimePeriod'], - 'CpuRealtimeRuntime': json['CpuRealtimeRuntime'] == null ? undefined : json['CpuRealtimeRuntime'], - 'CpusetCpus': json['CpusetCpus'] == null ? undefined : json['CpusetCpus'], - 'CpusetMems': json['CpusetMems'] == null ? undefined : json['CpusetMems'], - 'Devices': json['Devices'] == null ? undefined : ((json['Devices'] as Array).map(DeviceMappingFromJSON)), - 'DeviceCgroupRules': json['DeviceCgroupRules'] == null ? undefined : json['DeviceCgroupRules'], - 'DeviceRequests': json['DeviceRequests'] == null ? undefined : ((json['DeviceRequests'] as Array).map(DeviceRequestFromJSON)), - 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], - 'MemoryReservation': json['MemoryReservation'] == null ? undefined : json['MemoryReservation'], - 'MemorySwap': json['MemorySwap'] == null ? undefined : json['MemorySwap'], - 'MemorySwappiness': json['MemorySwappiness'] == null ? undefined : json['MemorySwappiness'], - 'NanoCpus': json['NanoCpus'] == null ? undefined : json['NanoCpus'], - 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], - 'Init': json['Init'] == null ? undefined : json['Init'], - 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], - 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), - 'CpuCount': json['CpuCount'] == null ? undefined : json['CpuCount'], - 'CpuPercent': json['CpuPercent'] == null ? undefined : json['CpuPercent'], - 'IOMaximumIOps': json['IOMaximumIOps'] == null ? undefined : json['IOMaximumIOps'], - 'IOMaximumBandwidth': json['IOMaximumBandwidth'] == null ? undefined : json['IOMaximumBandwidth'], - }; + if (json == null) { + return json; + } + return { + CpuShares: json["CpuShares"] == null ? undefined : json["CpuShares"], + Memory: json["Memory"] == null ? undefined : json["Memory"], + CgroupParent: json["CgroupParent"] == null ? undefined : json["CgroupParent"], + BlkioWeight: json["BlkioWeight"] == null ? undefined : json["BlkioWeight"], + BlkioWeightDevice: + json["BlkioWeightDevice"] == null + ? undefined + : (json["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerFromJSON), + BlkioDeviceReadBps: + json["BlkioDeviceReadBps"] == null + ? undefined + : (json["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceWriteBps: + json["BlkioDeviceWriteBps"] == null + ? undefined + : (json["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceReadIOps: + json["BlkioDeviceReadIOps"] == null + ? undefined + : (json["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceFromJSON), + BlkioDeviceWriteIOps: + json["BlkioDeviceWriteIOps"] == null + ? undefined + : (json["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceFromJSON), + CpuPeriod: json["CpuPeriod"] == null ? undefined : json["CpuPeriod"], + CpuQuota: json["CpuQuota"] == null ? undefined : json["CpuQuota"], + CpuRealtimePeriod: json["CpuRealtimePeriod"] == null ? undefined : json["CpuRealtimePeriod"], + CpuRealtimeRuntime: json["CpuRealtimeRuntime"] == null ? undefined : json["CpuRealtimeRuntime"], + CpusetCpus: json["CpusetCpus"] == null ? undefined : json["CpusetCpus"], + CpusetMems: json["CpusetMems"] == null ? undefined : json["CpusetMems"], + Devices: + json["Devices"] == null + ? undefined + : (json["Devices"] as Array).map(DeviceMappingFromJSON), + DeviceCgroupRules: json["DeviceCgroupRules"] == null ? undefined : json["DeviceCgroupRules"], + DeviceRequests: + json["DeviceRequests"] == null + ? undefined + : (json["DeviceRequests"] as Array).map(DeviceRequestFromJSON), + KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], + MemoryReservation: json["MemoryReservation"] == null ? undefined : json["MemoryReservation"], + MemorySwap: json["MemorySwap"] == null ? undefined : json["MemorySwap"], + MemorySwappiness: json["MemorySwappiness"] == null ? undefined : json["MemorySwappiness"], + NanoCpus: json["NanoCpus"] == null ? undefined : json["NanoCpus"], + OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], + Init: json["Init"] == null ? undefined : json["Init"], + PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], + Ulimits: + json["Ulimits"] == null + ? undefined + : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), + CpuCount: json["CpuCount"] == null ? undefined : json["CpuCount"], + CpuPercent: json["CpuPercent"] == null ? undefined : json["CpuPercent"], + IOMaximumIOps: json["IOMaximumIOps"] == null ? undefined : json["IOMaximumIOps"], + IOMaximumBandwidth: json["IOMaximumBandwidth"] == null ? undefined : json["IOMaximumBandwidth"], + }; } export function ResourcesToJSON(json: any): Resources { - return ResourcesToJSONTyped(json, false); + return ResourcesToJSONTyped(json, false); } -export function ResourcesToJSONTyped(value?: Resources | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourcesToJSONTyped( + value?: Resources | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CpuShares': value['CpuShares'], - 'Memory': value['Memory'], - 'CgroupParent': value['CgroupParent'], - 'BlkioWeight': value['BlkioWeight'], - 'BlkioWeightDevice': value['BlkioWeightDevice'] == null ? undefined : ((value['BlkioWeightDevice'] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON)), - 'BlkioDeviceReadBps': value['BlkioDeviceReadBps'] == null ? undefined : ((value['BlkioDeviceReadBps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceWriteBps': value['BlkioDeviceWriteBps'] == null ? undefined : ((value['BlkioDeviceWriteBps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceReadIOps': value['BlkioDeviceReadIOps'] == null ? undefined : ((value['BlkioDeviceReadIOps'] as Array).map(ThrottleDeviceToJSON)), - 'BlkioDeviceWriteIOps': value['BlkioDeviceWriteIOps'] == null ? undefined : ((value['BlkioDeviceWriteIOps'] as Array).map(ThrottleDeviceToJSON)), - 'CpuPeriod': value['CpuPeriod'], - 'CpuQuota': value['CpuQuota'], - 'CpuRealtimePeriod': value['CpuRealtimePeriod'], - 'CpuRealtimeRuntime': value['CpuRealtimeRuntime'], - 'CpusetCpus': value['CpusetCpus'], - 'CpusetMems': value['CpusetMems'], - 'Devices': value['Devices'] == null ? undefined : ((value['Devices'] as Array).map(DeviceMappingToJSON)), - 'DeviceCgroupRules': value['DeviceCgroupRules'], - 'DeviceRequests': value['DeviceRequests'] == null ? undefined : ((value['DeviceRequests'] as Array).map(DeviceRequestToJSON)), - 'KernelMemoryTCP': value['KernelMemoryTCP'], - 'MemoryReservation': value['MemoryReservation'], - 'MemorySwap': value['MemorySwap'], - 'MemorySwappiness': value['MemorySwappiness'], - 'NanoCpus': value['NanoCpus'], - 'OomKillDisable': value['OomKillDisable'], - 'Init': value['Init'], - 'PidsLimit': value['PidsLimit'], - 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), - 'CpuCount': value['CpuCount'], - 'CpuPercent': value['CpuPercent'], - 'IOMaximumIOps': value['IOMaximumIOps'], - 'IOMaximumBandwidth': value['IOMaximumBandwidth'], - }; + return { + CpuShares: value["CpuShares"], + Memory: value["Memory"], + CgroupParent: value["CgroupParent"], + BlkioWeight: value["BlkioWeight"], + BlkioWeightDevice: + value["BlkioWeightDevice"] == null + ? undefined + : (value["BlkioWeightDevice"] as Array).map(ResourcesBlkioWeightDeviceInnerToJSON), + BlkioDeviceReadBps: + value["BlkioDeviceReadBps"] == null + ? undefined + : (value["BlkioDeviceReadBps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceWriteBps: + value["BlkioDeviceWriteBps"] == null + ? undefined + : (value["BlkioDeviceWriteBps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceReadIOps: + value["BlkioDeviceReadIOps"] == null + ? undefined + : (value["BlkioDeviceReadIOps"] as Array).map(ThrottleDeviceToJSON), + BlkioDeviceWriteIOps: + value["BlkioDeviceWriteIOps"] == null + ? undefined + : (value["BlkioDeviceWriteIOps"] as Array).map(ThrottleDeviceToJSON), + CpuPeriod: value["CpuPeriod"], + CpuQuota: value["CpuQuota"], + CpuRealtimePeriod: value["CpuRealtimePeriod"], + CpuRealtimeRuntime: value["CpuRealtimeRuntime"], + CpusetCpus: value["CpusetCpus"], + CpusetMems: value["CpusetMems"], + Devices: + value["Devices"] == null + ? undefined + : (value["Devices"] as Array).map(DeviceMappingToJSON), + DeviceCgroupRules: value["DeviceCgroupRules"], + DeviceRequests: + value["DeviceRequests"] == null + ? undefined + : (value["DeviceRequests"] as Array).map(DeviceRequestToJSON), + KernelMemoryTCP: value["KernelMemoryTCP"], + MemoryReservation: value["MemoryReservation"], + MemorySwap: value["MemorySwap"], + MemorySwappiness: value["MemorySwappiness"], + NanoCpus: value["NanoCpus"], + OomKillDisable: value["OomKillDisable"], + Init: value["Init"], + PidsLimit: value["PidsLimit"], + Ulimits: + value["Ulimits"] == null + ? undefined + : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), + CpuCount: value["CpuCount"], + CpuPercent: value["CpuPercent"], + IOMaximumIOps: value["IOMaximumIOps"], + IOMaximumBandwidth: value["IOMaximumBandwidth"], + }; } - diff --git a/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts b/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts index 4b84a6e74d..92fb121b3f 100644 --- a/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts +++ b/src/clients/docker/models/ResourcesBlkioWeightDeviceInner.ts @@ -2,72 +2,79 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ResourcesBlkioWeightDeviceInner */ export interface ResourcesBlkioWeightDeviceInner { - /** - * - * @type {string} - * @memberof ResourcesBlkioWeightDeviceInner - */ - Path?: string; - /** - * - * @type {number} - * @memberof ResourcesBlkioWeightDeviceInner - */ - Weight?: number; + /** + * + * @type {string} + * @memberof ResourcesBlkioWeightDeviceInner + */ + Path?: string; + /** + * + * @type {number} + * @memberof ResourcesBlkioWeightDeviceInner + */ + Weight?: number; } /** * Check if a given object implements the ResourcesBlkioWeightDeviceInner interface. */ -export function instanceOfResourcesBlkioWeightDeviceInner(value: object): value is ResourcesBlkioWeightDeviceInner { - return true; +export function instanceOfResourcesBlkioWeightDeviceInner( + value: object, +): value is ResourcesBlkioWeightDeviceInner { + return true; } -export function ResourcesBlkioWeightDeviceInnerFromJSON(json: any): ResourcesBlkioWeightDeviceInner { - return ResourcesBlkioWeightDeviceInnerFromJSONTyped(json, false); +export function ResourcesBlkioWeightDeviceInnerFromJSON( + json: any, +): ResourcesBlkioWeightDeviceInner { + return ResourcesBlkioWeightDeviceInnerFromJSONTyped(json, false); } -export function ResourcesBlkioWeightDeviceInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourcesBlkioWeightDeviceInner { - if (json == null) { - return json; - } - return { - - 'Path': json['Path'] == null ? undefined : json['Path'], - 'Weight': json['Weight'] == null ? undefined : json['Weight'], - }; +export function ResourcesBlkioWeightDeviceInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResourcesBlkioWeightDeviceInner { + if (json == null) { + return json; + } + return { + Path: json["Path"] == null ? undefined : json["Path"], + Weight: json["Weight"] == null ? undefined : json["Weight"], + }; } export function ResourcesBlkioWeightDeviceInnerToJSON(json: any): ResourcesBlkioWeightDeviceInner { - return ResourcesBlkioWeightDeviceInnerToJSONTyped(json, false); + return ResourcesBlkioWeightDeviceInnerToJSONTyped(json, false); } -export function ResourcesBlkioWeightDeviceInnerToJSONTyped(value?: ResourcesBlkioWeightDeviceInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourcesBlkioWeightDeviceInnerToJSONTyped( + value?: ResourcesBlkioWeightDeviceInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Path': value['Path'], - 'Weight': value['Weight'], - }; + return { + Path: value["Path"], + Weight: value["Weight"], + }; } - diff --git a/src/clients/docker/models/ResourcesUlimitsInner.ts b/src/clients/docker/models/ResourcesUlimitsInner.ts index 15ae5acd0a..4bba13c868 100644 --- a/src/clients/docker/models/ResourcesUlimitsInner.ts +++ b/src/clients/docker/models/ResourcesUlimitsInner.ts @@ -2,80 +2,83 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ResourcesUlimitsInner */ export interface ResourcesUlimitsInner { - /** - * Name of ulimit - * @type {string} - * @memberof ResourcesUlimitsInner - */ - Name?: string; - /** - * Soft limit - * @type {number} - * @memberof ResourcesUlimitsInner - */ - Soft?: number; - /** - * Hard limit - * @type {number} - * @memberof ResourcesUlimitsInner - */ - Hard?: number; + /** + * Name of ulimit + * @type {string} + * @memberof ResourcesUlimitsInner + */ + Name?: string; + /** + * Soft limit + * @type {number} + * @memberof ResourcesUlimitsInner + */ + Soft?: number; + /** + * Hard limit + * @type {number} + * @memberof ResourcesUlimitsInner + */ + Hard?: number; } /** * Check if a given object implements the ResourcesUlimitsInner interface. */ export function instanceOfResourcesUlimitsInner(value: object): value is ResourcesUlimitsInner { - return true; + return true; } export function ResourcesUlimitsInnerFromJSON(json: any): ResourcesUlimitsInner { - return ResourcesUlimitsInnerFromJSONTyped(json, false); + return ResourcesUlimitsInnerFromJSONTyped(json, false); } -export function ResourcesUlimitsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourcesUlimitsInner { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Soft': json['Soft'] == null ? undefined : json['Soft'], - 'Hard': json['Hard'] == null ? undefined : json['Hard'], - }; +export function ResourcesUlimitsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResourcesUlimitsInner { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Soft: json["Soft"] == null ? undefined : json["Soft"], + Hard: json["Hard"] == null ? undefined : json["Hard"], + }; } export function ResourcesUlimitsInnerToJSON(json: any): ResourcesUlimitsInner { - return ResourcesUlimitsInnerToJSONTyped(json, false); + return ResourcesUlimitsInnerToJSONTyped(json, false); } -export function ResourcesUlimitsInnerToJSONTyped(value?: ResourcesUlimitsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourcesUlimitsInnerToJSONTyped( + value?: ResourcesUlimitsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Soft': value['Soft'], - 'Hard': value['Hard'], - }; + return { + Name: value["Name"], + Soft: value["Soft"], + Hard: value["Hard"], + }; } - diff --git a/src/clients/docker/models/RestartPolicy.ts b/src/clients/docker/models/RestartPolicy.ts index 9ba8d7691b..3df8150253 100644 --- a/src/clients/docker/models/RestartPolicy.ts +++ b/src/clients/docker/models/RestartPolicy.ts @@ -2,96 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface RestartPolicy */ export interface RestartPolicy { - /** - * - Empty string means not to restart - * - `no` Do not automatically restart - * - `always` Always restart - * - `unless-stopped` Restart always except when the user has manually stopped the container - * - `on-failure` Restart only when the container exit code is non-zero - * - * @type {string} - * @memberof RestartPolicy - */ - Name?: RestartPolicyNameEnum; - /** - * If `on-failure` is used, the number of times to retry before giving up. - * - * @type {number} - * @memberof RestartPolicy - */ - MaximumRetryCount?: number; + /** + * - Empty string means not to restart + * - `no` Do not automatically restart + * - `always` Always restart + * - `unless-stopped` Restart always except when the user has manually stopped the container + * - `on-failure` Restart only when the container exit code is non-zero + * + * @type {string} + * @memberof RestartPolicy + */ + Name?: RestartPolicyNameEnum; + /** + * If `on-failure` is used, the number of times to retry before giving up. + * + * @type {number} + * @memberof RestartPolicy + */ + MaximumRetryCount?: number; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum RestartPolicyNameEnum { - Empty = '', - No = 'no', - Always = 'always', - UnlessStopped = 'unless-stopped', - OnFailure = 'on-failure' + Empty = "", + No = "no", + Always = "always", + UnlessStopped = "unless-stopped", + OnFailure = "on-failure", } - /** * Check if a given object implements the RestartPolicy interface. */ export function instanceOfRestartPolicy(value: object): value is RestartPolicy { - return true; + return true; } export function RestartPolicyFromJSON(json: any): RestartPolicy { - return RestartPolicyFromJSONTyped(json, false); + return RestartPolicyFromJSONTyped(json, false); } export function RestartPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): RestartPolicy { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'MaximumRetryCount': json['MaximumRetryCount'] == null ? undefined : json['MaximumRetryCount'], - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + MaximumRetryCount: json["MaximumRetryCount"] == null ? undefined : json["MaximumRetryCount"], + }; } export function RestartPolicyToJSON(json: any): RestartPolicy { - return RestartPolicyToJSONTyped(json, false); + return RestartPolicyToJSONTyped(json, false); } -export function RestartPolicyToJSONTyped(value?: RestartPolicy | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RestartPolicyToJSONTyped( + value?: RestartPolicy | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'MaximumRetryCount': value['MaximumRetryCount'], - }; + return { + Name: value["Name"], + MaximumRetryCount: value["MaximumRetryCount"], + }; } - diff --git a/src/clients/docker/models/Runtime.ts b/src/clients/docker/models/Runtime.ts index 4c36e43c60..f23e60d2ee 100644 --- a/src/clients/docker/models/Runtime.ts +++ b/src/clients/docker/models/Runtime.ts @@ -2,83 +2,83 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface Runtime */ export interface Runtime { - /** - * Name and, optional, path, of the OCI executable binary. - * - * If the path is omitted, the daemon searches the host's `$PATH` for the - * binary and uses the first result. - * - * @type {string} - * @memberof Runtime - */ - path?: string; - /** - * List of command-line arguments to pass to the runtime when invoked. - * - * @type {Array} - * @memberof Runtime - */ - runtimeArgs?: Array | null; + /** + * Name and, optional, path, of the OCI executable binary. + * + * If the path is omitted, the daemon searches the host's `$PATH` for the + * binary and uses the first result. + * + * @type {string} + * @memberof Runtime + */ + path?: string; + /** + * List of command-line arguments to pass to the runtime when invoked. + * + * @type {Array} + * @memberof Runtime + */ + runtimeArgs?: Array | null; } /** * Check if a given object implements the Runtime interface. */ export function instanceOfRuntime(value: object): value is Runtime { - return true; + return true; } export function RuntimeFromJSON(json: any): Runtime { - return RuntimeFromJSONTyped(json, false); + return RuntimeFromJSONTyped(json, false); } export function RuntimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Runtime { - if (json == null) { - return json; - } - return { - - 'path': json['path'] == null ? undefined : json['path'], - 'runtimeArgs': json['runtimeArgs'] == null ? undefined : json['runtimeArgs'], - }; + if (json == null) { + return json; + } + return { + path: json["path"] == null ? undefined : json["path"], + runtimeArgs: json["runtimeArgs"] == null ? undefined : json["runtimeArgs"], + }; } export function RuntimeToJSON(json: any): Runtime { - return RuntimeToJSONTyped(json, false); + return RuntimeToJSONTyped(json, false); } -export function RuntimeToJSONTyped(value?: Runtime | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RuntimeToJSONTyped( + value?: Runtime | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'runtimeArgs': value['runtimeArgs'], - }; + return { + path: value["path"], + runtimeArgs: value["runtimeArgs"], + }; } - diff --git a/src/clients/docker/models/Secret.ts b/src/clients/docker/models/Secret.ts index dbd9a866e7..8b9b1a72c8 100644 --- a/src/clients/docker/models/Secret.ts +++ b/src/clients/docker/models/Secret.ts @@ -2,111 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { SecretSpec } from './SecretSpec'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { SecretSpec } from "./SecretSpec"; import { - SecretSpecFromJSON, - SecretSpecFromJSONTyped, - SecretSpecToJSON, - SecretSpecToJSONTyped, -} from './SecretSpec'; + SecretSpecFromJSON, + SecretSpecFromJSONTyped, + SecretSpecToJSON, + SecretSpecToJSONTyped, +} from "./SecretSpec"; /** - * + * * @export * @interface Secret */ export interface Secret { - /** - * - * @type {string} - * @memberof Secret - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Secret - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Secret - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Secret - */ - UpdatedAt?: string; - /** - * - * @type {SecretSpec} - * @memberof Secret - */ - Spec?: SecretSpec; + /** + * + * @type {string} + * @memberof Secret + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Secret + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Secret + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Secret + */ + UpdatedAt?: string; + /** + * + * @type {SecretSpec} + * @memberof Secret + */ + Spec?: SecretSpec; } /** * Check if a given object implements the Secret interface. */ export function instanceOfSecret(value: object): value is Secret { - return true; + return true; } export function SecretFromJSON(json: any): Secret { - return SecretFromJSONTyped(json, false); + return SecretFromJSONTyped(json, false); } export function SecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): Secret { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : SecretSpecFromJSON(json['Spec']), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : SecretSpecFromJSON(json["Spec"]), + }; } export function SecretToJSON(json: any): Secret { - return SecretToJSONTyped(json, false); + return SecretToJSONTyped(json, false); } -export function SecretToJSONTyped(value?: Secret | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SecretToJSONTyped( + value?: Secret | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': SecretSpecToJSON(value['Spec']), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: SecretSpecToJSON(value["Spec"]), + }; } - diff --git a/src/clients/docker/models/SecretCreateRequest.ts b/src/clients/docker/models/SecretCreateRequest.ts index 89c46102d2..b0bfb2b3fa 100644 --- a/src/clients/docker/models/SecretCreateRequest.ts +++ b/src/clients/docker/models/SecretCreateRequest.ts @@ -2,109 +2,107 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Driver } from './Driver'; -import { - DriverFromJSON, - DriverFromJSONTyped, - DriverToJSON, - DriverToJSONTyped, -} from './Driver'; +import { mapValues } from "../runtime"; +import type { Driver } from "./Driver"; +import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; /** - * + * * @export * @interface SecretCreateRequest */ export interface SecretCreateRequest { - /** - * User-defined name of the secret. - * @type {string} - * @memberof SecretCreateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof SecretCreateRequest - */ - Labels?: { [key: string]: string; }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. - * - * This field is only used to _create_ a secret, and is not returned by - * other endpoints. - * - * @type {string} - * @memberof SecretCreateRequest - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof SecretCreateRequest - */ - Driver?: Driver; - /** - * - * @type {Driver} - * @memberof SecretCreateRequest - */ - Templating?: Driver; + /** + * User-defined name of the secret. + * @type {string} + * @memberof SecretCreateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof SecretCreateRequest + */ + Labels?: { [key: string]: string }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * data to store as secret. + * + * This field is only used to _create_ a secret, and is not returned by + * other endpoints. + * + * @type {string} + * @memberof SecretCreateRequest + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof SecretCreateRequest + */ + Driver?: Driver; + /** + * + * @type {Driver} + * @memberof SecretCreateRequest + */ + Templating?: Driver; } /** * Check if a given object implements the SecretCreateRequest interface. */ export function instanceOfSecretCreateRequest(value: object): value is SecretCreateRequest { - return true; + return true; } export function SecretCreateRequestFromJSON(json: any): SecretCreateRequest { - return SecretCreateRequestFromJSONTyped(json, false); + return SecretCreateRequestFromJSONTyped(json, false); } -export function SecretCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretCreateRequest { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Data': json['Data'] == null ? undefined : json['Data'], - 'Driver': json['Driver'] == null ? undefined : DriverFromJSON(json['Driver']), - 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), - }; +export function SecretCreateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SecretCreateRequest { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Data: json["Data"] == null ? undefined : json["Data"], + Driver: json["Driver"] == null ? undefined : DriverFromJSON(json["Driver"]), + Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), + }; } export function SecretCreateRequestToJSON(json: any): SecretCreateRequest { - return SecretCreateRequestToJSONTyped(json, false); + return SecretCreateRequestToJSONTyped(json, false); } -export function SecretCreateRequestToJSONTyped(value?: SecretCreateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SecretCreateRequestToJSONTyped( + value?: SecretCreateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Data': value['Data'], - 'Driver': DriverToJSON(value['Driver']), - 'Templating': DriverToJSON(value['Templating']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + Data: value["Data"], + Driver: DriverToJSON(value["Driver"]), + Templating: DriverToJSON(value["Templating"]), + }; } - diff --git a/src/clients/docker/models/SecretSpec.ts b/src/clients/docker/models/SecretSpec.ts index 540b76f551..cae65d57ea 100644 --- a/src/clients/docker/models/SecretSpec.ts +++ b/src/clients/docker/models/SecretSpec.ts @@ -2,109 +2,104 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Driver } from './Driver'; -import { - DriverFromJSON, - DriverFromJSONTyped, - DriverToJSON, - DriverToJSONTyped, -} from './Driver'; +import { mapValues } from "../runtime"; +import type { Driver } from "./Driver"; +import { DriverFromJSON, DriverFromJSONTyped, DriverToJSON, DriverToJSONTyped } from "./Driver"; /** - * + * * @export * @interface SecretSpec */ export interface SecretSpec { - /** - * User-defined name of the secret. - * @type {string} - * @memberof SecretSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof SecretSpec - */ - Labels?: { [key: string]: string; }; - /** - * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) - * data to store as secret. - * - * This field is only used to _create_ a secret, and is not returned by - * other endpoints. - * - * @type {string} - * @memberof SecretSpec - */ - Data?: string; - /** - * - * @type {Driver} - * @memberof SecretSpec - */ - Driver?: Driver; - /** - * - * @type {Driver} - * @memberof SecretSpec - */ - Templating?: Driver; + /** + * User-defined name of the secret. + * @type {string} + * @memberof SecretSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof SecretSpec + */ + Labels?: { [key: string]: string }; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + * data to store as secret. + * + * This field is only used to _create_ a secret, and is not returned by + * other endpoints. + * + * @type {string} + * @memberof SecretSpec + */ + Data?: string; + /** + * + * @type {Driver} + * @memberof SecretSpec + */ + Driver?: Driver; + /** + * + * @type {Driver} + * @memberof SecretSpec + */ + Templating?: Driver; } /** * Check if a given object implements the SecretSpec interface. */ export function instanceOfSecretSpec(value: object): value is SecretSpec { - return true; + return true; } export function SecretSpecFromJSON(json: any): SecretSpec { - return SecretSpecFromJSONTyped(json, false); + return SecretSpecFromJSONTyped(json, false); } export function SecretSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSpec { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Data': json['Data'] == null ? undefined : json['Data'], - 'Driver': json['Driver'] == null ? undefined : DriverFromJSON(json['Driver']), - 'Templating': json['Templating'] == null ? undefined : DriverFromJSON(json['Templating']), - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Data: json["Data"] == null ? undefined : json["Data"], + Driver: json["Driver"] == null ? undefined : DriverFromJSON(json["Driver"]), + Templating: json["Templating"] == null ? undefined : DriverFromJSON(json["Templating"]), + }; } export function SecretSpecToJSON(json: any): SecretSpec { - return SecretSpecToJSONTyped(json, false); + return SecretSpecToJSONTyped(json, false); } -export function SecretSpecToJSONTyped(value?: SecretSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SecretSpecToJSONTyped( + value?: SecretSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Data': value['Data'], - 'Driver': DriverToJSON(value['Driver']), - 'Templating': DriverToJSON(value['Templating']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + Data: value["Data"], + Driver: DriverToJSON(value["Driver"]), + Templating: DriverToJSON(value["Templating"]), + }; } - diff --git a/src/clients/docker/models/Service.ts b/src/clients/docker/models/Service.ts index 09450e8ba5..8f612abbb3 100644 --- a/src/clients/docker/models/Service.ts +++ b/src/clients/docker/models/Service.ts @@ -2,171 +2,175 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { ServiceServiceStatus } from './ServiceServiceStatus'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { ServiceServiceStatus } from "./ServiceServiceStatus"; import { - ServiceServiceStatusFromJSON, - ServiceServiceStatusFromJSONTyped, - ServiceServiceStatusToJSON, - ServiceServiceStatusToJSONTyped, -} from './ServiceServiceStatus'; -import type { ServiceJobStatus } from './ServiceJobStatus'; + ServiceServiceStatusFromJSON, + ServiceServiceStatusFromJSONTyped, + ServiceServiceStatusToJSON, + ServiceServiceStatusToJSONTyped, +} from "./ServiceServiceStatus"; +import type { ServiceJobStatus } from "./ServiceJobStatus"; import { - ServiceJobStatusFromJSON, - ServiceJobStatusFromJSONTyped, - ServiceJobStatusToJSON, - ServiceJobStatusToJSONTyped, -} from './ServiceJobStatus'; -import type { ServiceSpec } from './ServiceSpec'; + ServiceJobStatusFromJSON, + ServiceJobStatusFromJSONTyped, + ServiceJobStatusToJSON, + ServiceJobStatusToJSONTyped, +} from "./ServiceJobStatus"; +import type { ServiceSpec } from "./ServiceSpec"; import { - ServiceSpecFromJSON, - ServiceSpecFromJSONTyped, - ServiceSpecToJSON, - ServiceSpecToJSONTyped, -} from './ServiceSpec'; -import type { ServiceUpdateStatus } from './ServiceUpdateStatus'; + ServiceSpecFromJSON, + ServiceSpecFromJSONTyped, + ServiceSpecToJSON, + ServiceSpecToJSONTyped, +} from "./ServiceSpec"; +import type { ServiceUpdateStatus } from "./ServiceUpdateStatus"; import { - ServiceUpdateStatusFromJSON, - ServiceUpdateStatusFromJSONTyped, - ServiceUpdateStatusToJSON, - ServiceUpdateStatusToJSONTyped, -} from './ServiceUpdateStatus'; -import type { ServiceEndpoint } from './ServiceEndpoint'; + ServiceUpdateStatusFromJSON, + ServiceUpdateStatusFromJSONTyped, + ServiceUpdateStatusToJSON, + ServiceUpdateStatusToJSONTyped, +} from "./ServiceUpdateStatus"; +import type { ServiceEndpoint } from "./ServiceEndpoint"; import { - ServiceEndpointFromJSON, - ServiceEndpointFromJSONTyped, - ServiceEndpointToJSON, - ServiceEndpointToJSONTyped, -} from './ServiceEndpoint'; + ServiceEndpointFromJSON, + ServiceEndpointFromJSONTyped, + ServiceEndpointToJSON, + ServiceEndpointToJSONTyped, +} from "./ServiceEndpoint"; /** - * + * * @export * @interface Service */ export interface Service { - /** - * - * @type {string} - * @memberof Service - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Service - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Service - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Service - */ - UpdatedAt?: string; - /** - * - * @type {ServiceSpec} - * @memberof Service - */ - Spec?: ServiceSpec; - /** - * - * @type {ServiceEndpoint} - * @memberof Service - */ - Endpoint?: ServiceEndpoint; - /** - * - * @type {ServiceUpdateStatus} - * @memberof Service - */ - UpdateStatus?: ServiceUpdateStatus; - /** - * - * @type {ServiceServiceStatus} - * @memberof Service - */ - ServiceStatus?: ServiceServiceStatus; - /** - * - * @type {ServiceJobStatus} - * @memberof Service - */ - JobStatus?: ServiceJobStatus; + /** + * + * @type {string} + * @memberof Service + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Service + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Service + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Service + */ + UpdatedAt?: string; + /** + * + * @type {ServiceSpec} + * @memberof Service + */ + Spec?: ServiceSpec; + /** + * + * @type {ServiceEndpoint} + * @memberof Service + */ + Endpoint?: ServiceEndpoint; + /** + * + * @type {ServiceUpdateStatus} + * @memberof Service + */ + UpdateStatus?: ServiceUpdateStatus; + /** + * + * @type {ServiceServiceStatus} + * @memberof Service + */ + ServiceStatus?: ServiceServiceStatus; + /** + * + * @type {ServiceJobStatus} + * @memberof Service + */ + JobStatus?: ServiceJobStatus; } /** * Check if a given object implements the Service interface. */ export function instanceOfService(value: object): value is Service { - return true; + return true; } export function ServiceFromJSON(json: any): Service { - return ServiceFromJSONTyped(json, false); + return ServiceFromJSONTyped(json, false); } export function ServiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Service { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : ServiceSpecFromJSON(json['Spec']), - 'Endpoint': json['Endpoint'] == null ? undefined : ServiceEndpointFromJSON(json['Endpoint']), - 'UpdateStatus': json['UpdateStatus'] == null ? undefined : ServiceUpdateStatusFromJSON(json['UpdateStatus']), - 'ServiceStatus': json['ServiceStatus'] == null ? undefined : ServiceServiceStatusFromJSON(json['ServiceStatus']), - 'JobStatus': json['JobStatus'] == null ? undefined : ServiceJobStatusFromJSON(json['JobStatus']), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : ServiceSpecFromJSON(json["Spec"]), + Endpoint: json["Endpoint"] == null ? undefined : ServiceEndpointFromJSON(json["Endpoint"]), + UpdateStatus: + json["UpdateStatus"] == null ? undefined : ServiceUpdateStatusFromJSON(json["UpdateStatus"]), + ServiceStatus: + json["ServiceStatus"] == null + ? undefined + : ServiceServiceStatusFromJSON(json["ServiceStatus"]), + JobStatus: json["JobStatus"] == null ? undefined : ServiceJobStatusFromJSON(json["JobStatus"]), + }; } export function ServiceToJSON(json: any): Service { - return ServiceToJSONTyped(json, false); + return ServiceToJSONTyped(json, false); } -export function ServiceToJSONTyped(value?: Service | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceToJSONTyped( + value?: Service | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': ServiceSpecToJSON(value['Spec']), - 'Endpoint': ServiceEndpointToJSON(value['Endpoint']), - 'UpdateStatus': ServiceUpdateStatusToJSON(value['UpdateStatus']), - 'ServiceStatus': ServiceServiceStatusToJSON(value['ServiceStatus']), - 'JobStatus': ServiceJobStatusToJSON(value['JobStatus']), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: ServiceSpecToJSON(value["Spec"]), + Endpoint: ServiceEndpointToJSON(value["Endpoint"]), + UpdateStatus: ServiceUpdateStatusToJSON(value["UpdateStatus"]), + ServiceStatus: ServiceServiceStatusToJSON(value["ServiceStatus"]), + JobStatus: ServiceJobStatusToJSON(value["JobStatus"]), + }; } - diff --git a/src/clients/docker/models/ServiceCreateRequest.ts b/src/clients/docker/models/ServiceCreateRequest.ts index 39cdec6965..ded156f72c 100644 --- a/src/clients/docker/models/ServiceCreateRequest.ts +++ b/src/clients/docker/models/ServiceCreateRequest.ts @@ -2,163 +2,179 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; +import { mapValues } from "../runtime"; +import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from './NetworkAttachmentConfig'; -import type { ServiceSpecRollbackConfig } from './ServiceSpecRollbackConfig'; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from "./NetworkAttachmentConfig"; +import type { ServiceSpecRollbackConfig } from "./ServiceSpecRollbackConfig"; import { - ServiceSpecRollbackConfigFromJSON, - ServiceSpecRollbackConfigFromJSONTyped, - ServiceSpecRollbackConfigToJSON, - ServiceSpecRollbackConfigToJSONTyped, -} from './ServiceSpecRollbackConfig'; -import type { ServiceSpecUpdateConfig } from './ServiceSpecUpdateConfig'; + ServiceSpecRollbackConfigFromJSON, + ServiceSpecRollbackConfigFromJSONTyped, + ServiceSpecRollbackConfigToJSON, + ServiceSpecRollbackConfigToJSONTyped, +} from "./ServiceSpecRollbackConfig"; +import type { ServiceSpecUpdateConfig } from "./ServiceSpecUpdateConfig"; import { - ServiceSpecUpdateConfigFromJSON, - ServiceSpecUpdateConfigFromJSONTyped, - ServiceSpecUpdateConfigToJSON, - ServiceSpecUpdateConfigToJSONTyped, -} from './ServiceSpecUpdateConfig'; -import type { EndpointSpec } from './EndpointSpec'; + ServiceSpecUpdateConfigFromJSON, + ServiceSpecUpdateConfigFromJSONTyped, + ServiceSpecUpdateConfigToJSON, + ServiceSpecUpdateConfigToJSONTyped, +} from "./ServiceSpecUpdateConfig"; +import type { EndpointSpec } from "./EndpointSpec"; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from './EndpointSpec'; -import type { TaskSpec } from './TaskSpec'; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from "./EndpointSpec"; +import type { TaskSpec } from "./TaskSpec"; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from './TaskSpec'; -import type { ServiceSpecMode } from './ServiceSpecMode'; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from "./TaskSpec"; +import type { ServiceSpecMode } from "./ServiceSpecMode"; import { - ServiceSpecModeFromJSON, - ServiceSpecModeFromJSONTyped, - ServiceSpecModeToJSON, - ServiceSpecModeToJSONTyped, -} from './ServiceSpecMode'; + ServiceSpecModeFromJSON, + ServiceSpecModeFromJSONTyped, + ServiceSpecModeToJSON, + ServiceSpecModeToJSONTyped, +} from "./ServiceSpecMode"; /** - * + * * @export * @interface ServiceCreateRequest */ export interface ServiceCreateRequest { - /** - * Name of the service. - * @type {string} - * @memberof ServiceCreateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ServiceCreateRequest - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {TaskSpec} - * @memberof ServiceCreateRequest - */ - TaskTemplate?: TaskSpec; - /** - * - * @type {ServiceSpecMode} - * @memberof ServiceCreateRequest - */ - Mode?: ServiceSpecMode; - /** - * - * @type {ServiceSpecUpdateConfig} - * @memberof ServiceCreateRequest - */ - UpdateConfig?: ServiceSpecUpdateConfig; - /** - * - * @type {ServiceSpecRollbackConfig} - * @memberof ServiceCreateRequest - */ - RollbackConfig?: ServiceSpecRollbackConfig; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof ServiceCreateRequest - */ - Networks?: Array; - /** - * - * @type {EndpointSpec} - * @memberof ServiceCreateRequest - */ - EndpointSpec?: EndpointSpec; + /** + * Name of the service. + * @type {string} + * @memberof ServiceCreateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ServiceCreateRequest + */ + Labels?: { [key: string]: string }; + /** + * + * @type {TaskSpec} + * @memberof ServiceCreateRequest + */ + TaskTemplate?: TaskSpec; + /** + * + * @type {ServiceSpecMode} + * @memberof ServiceCreateRequest + */ + Mode?: ServiceSpecMode; + /** + * + * @type {ServiceSpecUpdateConfig} + * @memberof ServiceCreateRequest + */ + UpdateConfig?: ServiceSpecUpdateConfig; + /** + * + * @type {ServiceSpecRollbackConfig} + * @memberof ServiceCreateRequest + */ + RollbackConfig?: ServiceSpecRollbackConfig; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof ServiceCreateRequest + */ + Networks?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceCreateRequest + */ + EndpointSpec?: EndpointSpec; } /** * Check if a given object implements the ServiceCreateRequest interface. */ export function instanceOfServiceCreateRequest(value: object): value is ServiceCreateRequest { - return true; + return true; } export function ServiceCreateRequestFromJSON(json: any): ServiceCreateRequest { - return ServiceCreateRequestFromJSONTyped(json, false); + return ServiceCreateRequestFromJSONTyped(json, false); } -export function ServiceCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceCreateRequest { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'TaskTemplate': json['TaskTemplate'] == null ? undefined : TaskSpecFromJSON(json['TaskTemplate']), - 'Mode': json['Mode'] == null ? undefined : ServiceSpecModeFromJSON(json['Mode']), - 'UpdateConfig': json['UpdateConfig'] == null ? undefined : ServiceSpecUpdateConfigFromJSON(json['UpdateConfig']), - 'RollbackConfig': json['RollbackConfig'] == null ? undefined : ServiceSpecRollbackConfigFromJSON(json['RollbackConfig']), - 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), - 'EndpointSpec': json['EndpointSpec'] == null ? undefined : EndpointSpecFromJSON(json['EndpointSpec']), - }; +export function ServiceCreateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceCreateRequest { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + TaskTemplate: json["TaskTemplate"] == null ? undefined : TaskSpecFromJSON(json["TaskTemplate"]), + Mode: json["Mode"] == null ? undefined : ServiceSpecModeFromJSON(json["Mode"]), + UpdateConfig: + json["UpdateConfig"] == null + ? undefined + : ServiceSpecUpdateConfigFromJSON(json["UpdateConfig"]), + RollbackConfig: + json["RollbackConfig"] == null + ? undefined + : ServiceSpecRollbackConfigFromJSON(json["RollbackConfig"]), + Networks: + json["Networks"] == null + ? undefined + : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), + EndpointSpec: + json["EndpointSpec"] == null ? undefined : EndpointSpecFromJSON(json["EndpointSpec"]), + }; } export function ServiceCreateRequestToJSON(json: any): ServiceCreateRequest { - return ServiceCreateRequestToJSONTyped(json, false); + return ServiceCreateRequestToJSONTyped(json, false); } -export function ServiceCreateRequestToJSONTyped(value?: ServiceCreateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceCreateRequestToJSONTyped( + value?: ServiceCreateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'TaskTemplate': TaskSpecToJSON(value['TaskTemplate']), - 'Mode': ServiceSpecModeToJSON(value['Mode']), - 'UpdateConfig': ServiceSpecUpdateConfigToJSON(value['UpdateConfig']), - 'RollbackConfig': ServiceSpecRollbackConfigToJSON(value['RollbackConfig']), - 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), - 'EndpointSpec': EndpointSpecToJSON(value['EndpointSpec']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + TaskTemplate: TaskSpecToJSON(value["TaskTemplate"]), + Mode: ServiceSpecModeToJSON(value["Mode"]), + UpdateConfig: ServiceSpecUpdateConfigToJSON(value["UpdateConfig"]), + RollbackConfig: ServiceSpecRollbackConfigToJSON(value["RollbackConfig"]), + Networks: + value["Networks"] == null + ? undefined + : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), + EndpointSpec: EndpointSpecToJSON(value["EndpointSpec"]), + }; } - diff --git a/src/clients/docker/models/ServiceCreateResponse.ts b/src/clients/docker/models/ServiceCreateResponse.ts index 8501d0fc25..3428a971a4 100644 --- a/src/clients/docker/models/ServiceCreateResponse.ts +++ b/src/clients/docker/models/ServiceCreateResponse.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ServiceCreateResponse */ export interface ServiceCreateResponse { - /** - * The ID of the created service. - * @type {string} - * @memberof ServiceCreateResponse - */ - ID?: string; - /** - * Optional warning message - * @type {string} - * @memberof ServiceCreateResponse - */ - Warning?: string; + /** + * The ID of the created service. + * @type {string} + * @memberof ServiceCreateResponse + */ + ID?: string; + /** + * Optional warning message + * @type {string} + * @memberof ServiceCreateResponse + */ + Warning?: string; } /** * Check if a given object implements the ServiceCreateResponse interface. */ export function instanceOfServiceCreateResponse(value: object): value is ServiceCreateResponse { - return true; + return true; } export function ServiceCreateResponseFromJSON(json: any): ServiceCreateResponse { - return ServiceCreateResponseFromJSONTyped(json, false); + return ServiceCreateResponseFromJSONTyped(json, false); } -export function ServiceCreateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceCreateResponse { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Warning': json['Warning'] == null ? undefined : json['Warning'], - }; +export function ServiceCreateResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceCreateResponse { + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Warning: json["Warning"] == null ? undefined : json["Warning"], + }; } export function ServiceCreateResponseToJSON(json: any): ServiceCreateResponse { - return ServiceCreateResponseToJSONTyped(json, false); + return ServiceCreateResponseToJSONTyped(json, false); } -export function ServiceCreateResponseToJSONTyped(value?: ServiceCreateResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceCreateResponseToJSONTyped( + value?: ServiceCreateResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Warning': value['Warning'], - }; + return { + ID: value["ID"], + Warning: value["Warning"], + }; } - diff --git a/src/clients/docker/models/ServiceEndpoint.ts b/src/clients/docker/models/ServiceEndpoint.ts index 74f653d2ac..b568bd65d0 100644 --- a/src/clients/docker/models/ServiceEndpoint.ts +++ b/src/clients/docker/models/ServiceEndpoint.ts @@ -2,102 +2,117 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ServiceEndpointVirtualIPsInner } from './ServiceEndpointVirtualIPsInner'; +import { mapValues } from "../runtime"; +import type { ServiceEndpointVirtualIPsInner } from "./ServiceEndpointVirtualIPsInner"; import { - ServiceEndpointVirtualIPsInnerFromJSON, - ServiceEndpointVirtualIPsInnerFromJSONTyped, - ServiceEndpointVirtualIPsInnerToJSON, - ServiceEndpointVirtualIPsInnerToJSONTyped, -} from './ServiceEndpointVirtualIPsInner'; -import type { EndpointSpec } from './EndpointSpec'; + ServiceEndpointVirtualIPsInnerFromJSON, + ServiceEndpointVirtualIPsInnerFromJSONTyped, + ServiceEndpointVirtualIPsInnerToJSON, + ServiceEndpointVirtualIPsInnerToJSONTyped, +} from "./ServiceEndpointVirtualIPsInner"; +import type { EndpointSpec } from "./EndpointSpec"; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from './EndpointSpec'; -import type { EndpointPortConfig } from './EndpointPortConfig'; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from "./EndpointSpec"; +import type { EndpointPortConfig } from "./EndpointPortConfig"; import { - EndpointPortConfigFromJSON, - EndpointPortConfigFromJSONTyped, - EndpointPortConfigToJSON, - EndpointPortConfigToJSONTyped, -} from './EndpointPortConfig'; + EndpointPortConfigFromJSON, + EndpointPortConfigFromJSONTyped, + EndpointPortConfigToJSON, + EndpointPortConfigToJSONTyped, +} from "./EndpointPortConfig"; /** - * + * * @export * @interface ServiceEndpoint */ export interface ServiceEndpoint { - /** - * - * @type {EndpointSpec} - * @memberof ServiceEndpoint - */ - Spec?: EndpointSpec; - /** - * - * @type {Array} - * @memberof ServiceEndpoint - */ - Ports?: Array; - /** - * - * @type {Array} - * @memberof ServiceEndpoint - */ - VirtualIPs?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceEndpoint + */ + Spec?: EndpointSpec; + /** + * + * @type {Array} + * @memberof ServiceEndpoint + */ + Ports?: Array; + /** + * + * @type {Array} + * @memberof ServiceEndpoint + */ + VirtualIPs?: Array; } /** * Check if a given object implements the ServiceEndpoint interface. */ export function instanceOfServiceEndpoint(value: object): value is ServiceEndpoint { - return true; + return true; } export function ServiceEndpointFromJSON(json: any): ServiceEndpoint { - return ServiceEndpointFromJSONTyped(json, false); + return ServiceEndpointFromJSONTyped(json, false); } -export function ServiceEndpointFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpoint { - if (json == null) { - return json; - } - return { - - 'Spec': json['Spec'] == null ? undefined : EndpointSpecFromJSON(json['Spec']), - 'Ports': json['Ports'] == null ? undefined : ((json['Ports'] as Array).map(EndpointPortConfigFromJSON)), - 'VirtualIPs': json['VirtualIPs'] == null ? undefined : ((json['VirtualIPs'] as Array).map(ServiceEndpointVirtualIPsInnerFromJSON)), - }; +export function ServiceEndpointFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceEndpoint { + if (json == null) { + return json; + } + return { + Spec: json["Spec"] == null ? undefined : EndpointSpecFromJSON(json["Spec"]), + Ports: + json["Ports"] == null + ? undefined + : (json["Ports"] as Array).map(EndpointPortConfigFromJSON), + VirtualIPs: + json["VirtualIPs"] == null + ? undefined + : (json["VirtualIPs"] as Array).map(ServiceEndpointVirtualIPsInnerFromJSON), + }; } export function ServiceEndpointToJSON(json: any): ServiceEndpoint { - return ServiceEndpointToJSONTyped(json, false); + return ServiceEndpointToJSONTyped(json, false); } -export function ServiceEndpointToJSONTyped(value?: ServiceEndpoint | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceEndpointToJSONTyped( + value?: ServiceEndpoint | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Spec': EndpointSpecToJSON(value['Spec']), - 'Ports': value['Ports'] == null ? undefined : ((value['Ports'] as Array).map(EndpointPortConfigToJSON)), - 'VirtualIPs': value['VirtualIPs'] == null ? undefined : ((value['VirtualIPs'] as Array).map(ServiceEndpointVirtualIPsInnerToJSON)), - }; + return { + Spec: EndpointSpecToJSON(value["Spec"]), + Ports: + value["Ports"] == null + ? undefined + : (value["Ports"] as Array).map(EndpointPortConfigToJSON), + VirtualIPs: + value["VirtualIPs"] == null + ? undefined + : (value["VirtualIPs"] as Array).map(ServiceEndpointVirtualIPsInnerToJSON), + }; } - diff --git a/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts b/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts index a2cebab250..d2e6581ca5 100644 --- a/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts +++ b/src/clients/docker/models/ServiceEndpointVirtualIPsInner.ts @@ -2,72 +2,77 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ServiceEndpointVirtualIPsInner */ export interface ServiceEndpointVirtualIPsInner { - /** - * - * @type {string} - * @memberof ServiceEndpointVirtualIPsInner - */ - NetworkID?: string; - /** - * - * @type {string} - * @memberof ServiceEndpointVirtualIPsInner - */ - Addr?: string; + /** + * + * @type {string} + * @memberof ServiceEndpointVirtualIPsInner + */ + NetworkID?: string; + /** + * + * @type {string} + * @memberof ServiceEndpointVirtualIPsInner + */ + Addr?: string; } /** * Check if a given object implements the ServiceEndpointVirtualIPsInner interface. */ -export function instanceOfServiceEndpointVirtualIPsInner(value: object): value is ServiceEndpointVirtualIPsInner { - return true; +export function instanceOfServiceEndpointVirtualIPsInner( + value: object, +): value is ServiceEndpointVirtualIPsInner { + return true; } export function ServiceEndpointVirtualIPsInnerFromJSON(json: any): ServiceEndpointVirtualIPsInner { - return ServiceEndpointVirtualIPsInnerFromJSONTyped(json, false); + return ServiceEndpointVirtualIPsInnerFromJSONTyped(json, false); } -export function ServiceEndpointVirtualIPsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceEndpointVirtualIPsInner { - if (json == null) { - return json; - } - return { - - 'NetworkID': json['NetworkID'] == null ? undefined : json['NetworkID'], - 'Addr': json['Addr'] == null ? undefined : json['Addr'], - }; +export function ServiceEndpointVirtualIPsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceEndpointVirtualIPsInner { + if (json == null) { + return json; + } + return { + NetworkID: json["NetworkID"] == null ? undefined : json["NetworkID"], + Addr: json["Addr"] == null ? undefined : json["Addr"], + }; } export function ServiceEndpointVirtualIPsInnerToJSON(json: any): ServiceEndpointVirtualIPsInner { - return ServiceEndpointVirtualIPsInnerToJSONTyped(json, false); + return ServiceEndpointVirtualIPsInnerToJSONTyped(json, false); } -export function ServiceEndpointVirtualIPsInnerToJSONTyped(value?: ServiceEndpointVirtualIPsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceEndpointVirtualIPsInnerToJSONTyped( + value?: ServiceEndpointVirtualIPsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NetworkID': value['NetworkID'], - 'Addr': value['Addr'], - }; + return { + NetworkID: value["NetworkID"], + Addr: value["Addr"], + }; } - diff --git a/src/clients/docker/models/ServiceJobStatus.ts b/src/clients/docker/models/ServiceJobStatus.ts index 8d026edb1c..aa12481449 100644 --- a/src/clients/docker/models/ServiceJobStatus.ts +++ b/src/clients/docker/models/ServiceJobStatus.ts @@ -2,86 +2,90 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ObjectVersion } from './ObjectVersion'; +import { mapValues } from "../runtime"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; /** * 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. - * + * * @export * @interface ServiceJobStatus */ export interface ServiceJobStatus { - /** - * - * @type {ObjectVersion} - * @memberof ServiceJobStatus - */ - JobIteration?: ObjectVersion; - /** - * The last time, as observed by the server, that this job was - * started. - * - * @type {string} - * @memberof ServiceJobStatus - */ - LastExecution?: string; + /** + * + * @type {ObjectVersion} + * @memberof ServiceJobStatus + */ + JobIteration?: ObjectVersion; + /** + * The last time, as observed by the server, that this job was + * started. + * + * @type {string} + * @memberof ServiceJobStatus + */ + LastExecution?: string; } /** * Check if a given object implements the ServiceJobStatus interface. */ export function instanceOfServiceJobStatus(value: object): value is ServiceJobStatus { - return true; + return true; } export function ServiceJobStatusFromJSON(json: any): ServiceJobStatus { - return ServiceJobStatusFromJSONTyped(json, false); + return ServiceJobStatusFromJSONTyped(json, false); } -export function ServiceJobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceJobStatus { - if (json == null) { - return json; - } - return { - - 'JobIteration': json['JobIteration'] == null ? undefined : ObjectVersionFromJSON(json['JobIteration']), - 'LastExecution': json['LastExecution'] == null ? undefined : json['LastExecution'], - }; +export function ServiceJobStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceJobStatus { + if (json == null) { + return json; + } + return { + JobIteration: + json["JobIteration"] == null ? undefined : ObjectVersionFromJSON(json["JobIteration"]), + LastExecution: json["LastExecution"] == null ? undefined : json["LastExecution"], + }; } export function ServiceJobStatusToJSON(json: any): ServiceJobStatus { - return ServiceJobStatusToJSONTyped(json, false); + return ServiceJobStatusToJSONTyped(json, false); } -export function ServiceJobStatusToJSONTyped(value?: ServiceJobStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceJobStatusToJSONTyped( + value?: ServiceJobStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'JobIteration': ObjectVersionToJSON(value['JobIteration']), - 'LastExecution': value['LastExecution'], - }; + return { + JobIteration: ObjectVersionToJSON(value["JobIteration"]), + LastExecution: value["LastExecution"], + }; } - diff --git a/src/clients/docker/models/ServiceServiceStatus.ts b/src/clients/docker/models/ServiceServiceStatus.ts index 414fdb9171..3db4ad2d2b 100644 --- a/src/clients/docker/models/ServiceServiceStatus.ts +++ b/src/clients/docker/models/ServiceServiceStatus.ts @@ -2,92 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of the service's tasks. Provided only when requested as * part of a ServiceList operation. - * + * * @export * @interface ServiceServiceStatus */ export interface ServiceServiceStatus { - /** - * The number of tasks for the service currently in the Running state. - * - * @type {number} - * @memberof ServiceServiceStatus - */ - RunningTasks?: number; - /** - * The number of tasks for the service desired to be running. - * For replicated services, this is the replica count from the - * service spec. For global services, this is computed by taking - * count of all tasks for the service with a Desired State other - * than Shutdown. - * - * @type {number} - * @memberof ServiceServiceStatus - */ - DesiredTasks?: number; - /** - * The number of tasks for a job that are in the Completed state. - * This field must be cross-referenced with the service type, as the - * value of 0 may mean the service is not in a job mode, or it may - * mean the job-mode service has no tasks yet Completed. - * - * @type {number} - * @memberof ServiceServiceStatus - */ - CompletedTasks?: number; + /** + * The number of tasks for the service currently in the Running state. + * + * @type {number} + * @memberof ServiceServiceStatus + */ + RunningTasks?: number; + /** + * The number of tasks for the service desired to be running. + * For replicated services, this is the replica count from the + * service spec. For global services, this is computed by taking + * count of all tasks for the service with a Desired State other + * than Shutdown. + * + * @type {number} + * @memberof ServiceServiceStatus + */ + DesiredTasks?: number; + /** + * The number of tasks for a job that are in the Completed state. + * This field must be cross-referenced with the service type, as the + * value of 0 may mean the service is not in a job mode, or it may + * mean the job-mode service has no tasks yet Completed. + * + * @type {number} + * @memberof ServiceServiceStatus + */ + CompletedTasks?: number; } /** * Check if a given object implements the ServiceServiceStatus interface. */ export function instanceOfServiceServiceStatus(value: object): value is ServiceServiceStatus { - return true; + return true; } export function ServiceServiceStatusFromJSON(json: any): ServiceServiceStatus { - return ServiceServiceStatusFromJSONTyped(json, false); + return ServiceServiceStatusFromJSONTyped(json, false); } -export function ServiceServiceStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceServiceStatus { - if (json == null) { - return json; - } - return { - - 'RunningTasks': json['RunningTasks'] == null ? undefined : json['RunningTasks'], - 'DesiredTasks': json['DesiredTasks'] == null ? undefined : json['DesiredTasks'], - 'CompletedTasks': json['CompletedTasks'] == null ? undefined : json['CompletedTasks'], - }; +export function ServiceServiceStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceServiceStatus { + if (json == null) { + return json; + } + return { + RunningTasks: json["RunningTasks"] == null ? undefined : json["RunningTasks"], + DesiredTasks: json["DesiredTasks"] == null ? undefined : json["DesiredTasks"], + CompletedTasks: json["CompletedTasks"] == null ? undefined : json["CompletedTasks"], + }; } export function ServiceServiceStatusToJSON(json: any): ServiceServiceStatus { - return ServiceServiceStatusToJSONTyped(json, false); + return ServiceServiceStatusToJSONTyped(json, false); } -export function ServiceServiceStatusToJSONTyped(value?: ServiceServiceStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceServiceStatusToJSONTyped( + value?: ServiceServiceStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'RunningTasks': value['RunningTasks'], - 'DesiredTasks': value['DesiredTasks'], - 'CompletedTasks': value['CompletedTasks'], - }; + return { + RunningTasks: value["RunningTasks"], + DesiredTasks: value["DesiredTasks"], + CompletedTasks: value["CompletedTasks"], + }; } - diff --git a/src/clients/docker/models/ServiceSpec.ts b/src/clients/docker/models/ServiceSpec.ts index dc9ff5c789..89dbc2faca 100644 --- a/src/clients/docker/models/ServiceSpec.ts +++ b/src/clients/docker/models/ServiceSpec.ts @@ -2,59 +2,59 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; +import { mapValues } from "../runtime"; +import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from './NetworkAttachmentConfig'; -import type { ServiceSpecRollbackConfig } from './ServiceSpecRollbackConfig'; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from "./NetworkAttachmentConfig"; +import type { ServiceSpecRollbackConfig } from "./ServiceSpecRollbackConfig"; import { - ServiceSpecRollbackConfigFromJSON, - ServiceSpecRollbackConfigFromJSONTyped, - ServiceSpecRollbackConfigToJSON, - ServiceSpecRollbackConfigToJSONTyped, -} from './ServiceSpecRollbackConfig'; -import type { ServiceSpecUpdateConfig } from './ServiceSpecUpdateConfig'; + ServiceSpecRollbackConfigFromJSON, + ServiceSpecRollbackConfigFromJSONTyped, + ServiceSpecRollbackConfigToJSON, + ServiceSpecRollbackConfigToJSONTyped, +} from "./ServiceSpecRollbackConfig"; +import type { ServiceSpecUpdateConfig } from "./ServiceSpecUpdateConfig"; import { - ServiceSpecUpdateConfigFromJSON, - ServiceSpecUpdateConfigFromJSONTyped, - ServiceSpecUpdateConfigToJSON, - ServiceSpecUpdateConfigToJSONTyped, -} from './ServiceSpecUpdateConfig'; -import type { EndpointSpec } from './EndpointSpec'; + ServiceSpecUpdateConfigFromJSON, + ServiceSpecUpdateConfigFromJSONTyped, + ServiceSpecUpdateConfigToJSON, + ServiceSpecUpdateConfigToJSONTyped, +} from "./ServiceSpecUpdateConfig"; +import type { EndpointSpec } from "./EndpointSpec"; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from './EndpointSpec'; -import type { TaskSpec } from './TaskSpec'; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from "./EndpointSpec"; +import type { TaskSpec } from "./TaskSpec"; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from './TaskSpec'; -import type { ServiceSpecMode } from './ServiceSpecMode'; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from "./TaskSpec"; +import type { ServiceSpecMode } from "./ServiceSpecMode"; import { - ServiceSpecModeFromJSON, - ServiceSpecModeFromJSONTyped, - ServiceSpecModeToJSON, - ServiceSpecModeToJSONTyped, -} from './ServiceSpecMode'; + ServiceSpecModeFromJSON, + ServiceSpecModeFromJSONTyped, + ServiceSpecModeToJSON, + ServiceSpecModeToJSONTyped, +} from "./ServiceSpecMode"; /** * User modifiable configuration for a service. @@ -62,103 +62,116 @@ import { * @interface ServiceSpec */ export interface ServiceSpec { - /** - * Name of the service. - * @type {string} - * @memberof ServiceSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ServiceSpec - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {TaskSpec} - * @memberof ServiceSpec - */ - TaskTemplate?: TaskSpec; - /** - * - * @type {ServiceSpecMode} - * @memberof ServiceSpec - */ - Mode?: ServiceSpecMode; - /** - * - * @type {ServiceSpecUpdateConfig} - * @memberof ServiceSpec - */ - UpdateConfig?: ServiceSpecUpdateConfig; - /** - * - * @type {ServiceSpecRollbackConfig} - * @memberof ServiceSpec - */ - RollbackConfig?: ServiceSpecRollbackConfig; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof ServiceSpec - */ - Networks?: Array; - /** - * - * @type {EndpointSpec} - * @memberof ServiceSpec - */ - EndpointSpec?: EndpointSpec; + /** + * Name of the service. + * @type {string} + * @memberof ServiceSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ServiceSpec + */ + Labels?: { [key: string]: string }; + /** + * + * @type {TaskSpec} + * @memberof ServiceSpec + */ + TaskTemplate?: TaskSpec; + /** + * + * @type {ServiceSpecMode} + * @memberof ServiceSpec + */ + Mode?: ServiceSpecMode; + /** + * + * @type {ServiceSpecUpdateConfig} + * @memberof ServiceSpec + */ + UpdateConfig?: ServiceSpecUpdateConfig; + /** + * + * @type {ServiceSpecRollbackConfig} + * @memberof ServiceSpec + */ + RollbackConfig?: ServiceSpecRollbackConfig; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof ServiceSpec + */ + Networks?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceSpec + */ + EndpointSpec?: EndpointSpec; } /** * Check if a given object implements the ServiceSpec interface. */ export function instanceOfServiceSpec(value: object): value is ServiceSpec { - return true; + return true; } export function ServiceSpecFromJSON(json: any): ServiceSpec { - return ServiceSpecFromJSONTyped(json, false); + return ServiceSpecFromJSONTyped(json, false); } export function ServiceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpec { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'TaskTemplate': json['TaskTemplate'] == null ? undefined : TaskSpecFromJSON(json['TaskTemplate']), - 'Mode': json['Mode'] == null ? undefined : ServiceSpecModeFromJSON(json['Mode']), - 'UpdateConfig': json['UpdateConfig'] == null ? undefined : ServiceSpecUpdateConfigFromJSON(json['UpdateConfig']), - 'RollbackConfig': json['RollbackConfig'] == null ? undefined : ServiceSpecRollbackConfigFromJSON(json['RollbackConfig']), - 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), - 'EndpointSpec': json['EndpointSpec'] == null ? undefined : EndpointSpecFromJSON(json['EndpointSpec']), - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + TaskTemplate: json["TaskTemplate"] == null ? undefined : TaskSpecFromJSON(json["TaskTemplate"]), + Mode: json["Mode"] == null ? undefined : ServiceSpecModeFromJSON(json["Mode"]), + UpdateConfig: + json["UpdateConfig"] == null + ? undefined + : ServiceSpecUpdateConfigFromJSON(json["UpdateConfig"]), + RollbackConfig: + json["RollbackConfig"] == null + ? undefined + : ServiceSpecRollbackConfigFromJSON(json["RollbackConfig"]), + Networks: + json["Networks"] == null + ? undefined + : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), + EndpointSpec: + json["EndpointSpec"] == null ? undefined : EndpointSpecFromJSON(json["EndpointSpec"]), + }; } export function ServiceSpecToJSON(json: any): ServiceSpec { - return ServiceSpecToJSONTyped(json, false); + return ServiceSpecToJSONTyped(json, false); } -export function ServiceSpecToJSONTyped(value?: ServiceSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceSpecToJSONTyped( + value?: ServiceSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'TaskTemplate': TaskSpecToJSON(value['TaskTemplate']), - 'Mode': ServiceSpecModeToJSON(value['Mode']), - 'UpdateConfig': ServiceSpecUpdateConfigToJSON(value['UpdateConfig']), - 'RollbackConfig': ServiceSpecRollbackConfigToJSON(value['RollbackConfig']), - 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), - 'EndpointSpec': EndpointSpecToJSON(value['EndpointSpec']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + TaskTemplate: TaskSpecToJSON(value["TaskTemplate"]), + Mode: ServiceSpecModeToJSON(value["Mode"]), + UpdateConfig: ServiceSpecUpdateConfigToJSON(value["UpdateConfig"]), + RollbackConfig: ServiceSpecRollbackConfigToJSON(value["RollbackConfig"]), + Networks: + value["Networks"] == null + ? undefined + : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), + EndpointSpec: EndpointSpecToJSON(value["EndpointSpec"]), + }; } - diff --git a/src/clients/docker/models/ServiceSpecMode.ts b/src/clients/docker/models/ServiceSpecMode.ts index d292b7f5d7..e42c5f97ce 100644 --- a/src/clients/docker/models/ServiceSpecMode.ts +++ b/src/clients/docker/models/ServiceSpecMode.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ServiceSpecModeReplicated } from './ServiceSpecModeReplicated'; +import { mapValues } from "../runtime"; +import type { ServiceSpecModeReplicated } from "./ServiceSpecModeReplicated"; import { - ServiceSpecModeReplicatedFromJSON, - ServiceSpecModeReplicatedFromJSONTyped, - ServiceSpecModeReplicatedToJSON, - ServiceSpecModeReplicatedToJSONTyped, -} from './ServiceSpecModeReplicated'; -import type { ServiceSpecModeReplicatedJob } from './ServiceSpecModeReplicatedJob'; + ServiceSpecModeReplicatedFromJSON, + ServiceSpecModeReplicatedFromJSONTyped, + ServiceSpecModeReplicatedToJSON, + ServiceSpecModeReplicatedToJSONTyped, +} from "./ServiceSpecModeReplicated"; +import type { ServiceSpecModeReplicatedJob } from "./ServiceSpecModeReplicatedJob"; import { - ServiceSpecModeReplicatedJobFromJSON, - ServiceSpecModeReplicatedJobFromJSONTyped, - ServiceSpecModeReplicatedJobToJSON, - ServiceSpecModeReplicatedJobToJSONTyped, -} from './ServiceSpecModeReplicatedJob'; + ServiceSpecModeReplicatedJobFromJSON, + ServiceSpecModeReplicatedJobFromJSONTyped, + ServiceSpecModeReplicatedJobToJSON, + ServiceSpecModeReplicatedJobToJSONTyped, +} from "./ServiceSpecModeReplicatedJob"; /** * Scheduling mode for the service. @@ -34,73 +34,82 @@ import { * @interface ServiceSpecMode */ export interface ServiceSpecMode { - /** - * - * @type {ServiceSpecModeReplicated} - * @memberof ServiceSpecMode - */ - Replicated?: ServiceSpecModeReplicated; - /** - * - * @type {object} - * @memberof ServiceSpecMode - */ - Global?: object; - /** - * - * @type {ServiceSpecModeReplicatedJob} - * @memberof ServiceSpecMode - */ - ReplicatedJob?: ServiceSpecModeReplicatedJob; - /** - * The mode used for services which run a task to the completed state - * on each valid node. - * - * @type {object} - * @memberof ServiceSpecMode - */ - GlobalJob?: object; + /** + * + * @type {ServiceSpecModeReplicated} + * @memberof ServiceSpecMode + */ + Replicated?: ServiceSpecModeReplicated; + /** + * + * @type {object} + * @memberof ServiceSpecMode + */ + Global?: object; + /** + * + * @type {ServiceSpecModeReplicatedJob} + * @memberof ServiceSpecMode + */ + ReplicatedJob?: ServiceSpecModeReplicatedJob; + /** + * The mode used for services which run a task to the completed state + * on each valid node. + * + * @type {object} + * @memberof ServiceSpecMode + */ + GlobalJob?: object; } /** * Check if a given object implements the ServiceSpecMode interface. */ export function instanceOfServiceSpecMode(value: object): value is ServiceSpecMode { - return true; + return true; } export function ServiceSpecModeFromJSON(json: any): ServiceSpecMode { - return ServiceSpecModeFromJSONTyped(json, false); + return ServiceSpecModeFromJSONTyped(json, false); } -export function ServiceSpecModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecMode { - if (json == null) { - return json; - } - return { - - 'Replicated': json['Replicated'] == null ? undefined : ServiceSpecModeReplicatedFromJSON(json['Replicated']), - 'Global': json['Global'] == null ? undefined : json['Global'], - 'ReplicatedJob': json['ReplicatedJob'] == null ? undefined : ServiceSpecModeReplicatedJobFromJSON(json['ReplicatedJob']), - 'GlobalJob': json['GlobalJob'] == null ? undefined : json['GlobalJob'], - }; +export function ServiceSpecModeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceSpecMode { + if (json == null) { + return json; + } + return { + Replicated: + json["Replicated"] == null + ? undefined + : ServiceSpecModeReplicatedFromJSON(json["Replicated"]), + Global: json["Global"] == null ? undefined : json["Global"], + ReplicatedJob: + json["ReplicatedJob"] == null + ? undefined + : ServiceSpecModeReplicatedJobFromJSON(json["ReplicatedJob"]), + GlobalJob: json["GlobalJob"] == null ? undefined : json["GlobalJob"], + }; } export function ServiceSpecModeToJSON(json: any): ServiceSpecMode { - return ServiceSpecModeToJSONTyped(json, false); + return ServiceSpecModeToJSONTyped(json, false); } -export function ServiceSpecModeToJSONTyped(value?: ServiceSpecMode | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceSpecModeToJSONTyped( + value?: ServiceSpecMode | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Replicated': ServiceSpecModeReplicatedToJSON(value['Replicated']), - 'Global': value['Global'], - 'ReplicatedJob': ServiceSpecModeReplicatedJobToJSON(value['ReplicatedJob']), - 'GlobalJob': value['GlobalJob'], - }; + return { + Replicated: ServiceSpecModeReplicatedToJSON(value["Replicated"]), + Global: value["Global"], + ReplicatedJob: ServiceSpecModeReplicatedJobToJSON(value["ReplicatedJob"]), + GlobalJob: value["GlobalJob"], + }; } - diff --git a/src/clients/docker/models/ServiceSpecModeReplicated.ts b/src/clients/docker/models/ServiceSpecModeReplicated.ts index 5dacd7221b..d69e32f1b7 100644 --- a/src/clients/docker/models/ServiceSpecModeReplicated.ts +++ b/src/clients/docker/models/ServiceSpecModeReplicated.ts @@ -2,64 +2,69 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ServiceSpecModeReplicated */ export interface ServiceSpecModeReplicated { - /** - * - * @type {number} - * @memberof ServiceSpecModeReplicated - */ - Replicas?: number; + /** + * + * @type {number} + * @memberof ServiceSpecModeReplicated + */ + Replicas?: number; } /** * Check if a given object implements the ServiceSpecModeReplicated interface. */ -export function instanceOfServiceSpecModeReplicated(value: object): value is ServiceSpecModeReplicated { - return true; +export function instanceOfServiceSpecModeReplicated( + value: object, +): value is ServiceSpecModeReplicated { + return true; } export function ServiceSpecModeReplicatedFromJSON(json: any): ServiceSpecModeReplicated { - return ServiceSpecModeReplicatedFromJSONTyped(json, false); + return ServiceSpecModeReplicatedFromJSONTyped(json, false); } -export function ServiceSpecModeReplicatedFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecModeReplicated { - if (json == null) { - return json; - } - return { - - 'Replicas': json['Replicas'] == null ? undefined : json['Replicas'], - }; +export function ServiceSpecModeReplicatedFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceSpecModeReplicated { + if (json == null) { + return json; + } + return { + Replicas: json["Replicas"] == null ? undefined : json["Replicas"], + }; } export function ServiceSpecModeReplicatedToJSON(json: any): ServiceSpecModeReplicated { - return ServiceSpecModeReplicatedToJSONTyped(json, false); + return ServiceSpecModeReplicatedToJSONTyped(json, false); } -export function ServiceSpecModeReplicatedToJSONTyped(value?: ServiceSpecModeReplicated | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceSpecModeReplicatedToJSONTyped( + value?: ServiceSpecModeReplicated | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Replicas': value['Replicas'], - }; + return { + Replicas: value["Replicas"], + }; } - diff --git a/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts b/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts index 25dc0b0d3b..28bfe71d24 100644 --- a/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts +++ b/src/clients/docker/models/ServiceSpecModeReplicatedJob.ts @@ -2,77 +2,82 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The mode used for services with a finite number of tasks that run * to a completed state. - * + * * @export * @interface ServiceSpecModeReplicatedJob */ export interface ServiceSpecModeReplicatedJob { - /** - * The maximum number of replicas to run simultaneously. - * - * @type {number} - * @memberof ServiceSpecModeReplicatedJob - */ - MaxConcurrent?: number; - /** - * The total number of replicas desired to reach the Completed - * state. If unset, will default to the value of `MaxConcurrent` - * - * @type {number} - * @memberof ServiceSpecModeReplicatedJob - */ - TotalCompletions?: number; + /** + * The maximum number of replicas to run simultaneously. + * + * @type {number} + * @memberof ServiceSpecModeReplicatedJob + */ + MaxConcurrent?: number; + /** + * The total number of replicas desired to reach the Completed + * state. If unset, will default to the value of `MaxConcurrent` + * + * @type {number} + * @memberof ServiceSpecModeReplicatedJob + */ + TotalCompletions?: number; } /** * Check if a given object implements the ServiceSpecModeReplicatedJob interface. */ -export function instanceOfServiceSpecModeReplicatedJob(value: object): value is ServiceSpecModeReplicatedJob { - return true; +export function instanceOfServiceSpecModeReplicatedJob( + value: object, +): value is ServiceSpecModeReplicatedJob { + return true; } export function ServiceSpecModeReplicatedJobFromJSON(json: any): ServiceSpecModeReplicatedJob { - return ServiceSpecModeReplicatedJobFromJSONTyped(json, false); + return ServiceSpecModeReplicatedJobFromJSONTyped(json, false); } -export function ServiceSpecModeReplicatedJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecModeReplicatedJob { - if (json == null) { - return json; - } - return { - - 'MaxConcurrent': json['MaxConcurrent'] == null ? undefined : json['MaxConcurrent'], - 'TotalCompletions': json['TotalCompletions'] == null ? undefined : json['TotalCompletions'], - }; +export function ServiceSpecModeReplicatedJobFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceSpecModeReplicatedJob { + if (json == null) { + return json; + } + return { + MaxConcurrent: json["MaxConcurrent"] == null ? undefined : json["MaxConcurrent"], + TotalCompletions: json["TotalCompletions"] == null ? undefined : json["TotalCompletions"], + }; } export function ServiceSpecModeReplicatedJobToJSON(json: any): ServiceSpecModeReplicatedJob { - return ServiceSpecModeReplicatedJobToJSONTyped(json, false); + return ServiceSpecModeReplicatedJobToJSONTyped(json, false); } -export function ServiceSpecModeReplicatedJobToJSONTyped(value?: ServiceSpecModeReplicatedJob | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceSpecModeReplicatedJobToJSONTyped( + value?: ServiceSpecModeReplicatedJob | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'MaxConcurrent': value['MaxConcurrent'], - 'TotalCompletions': value['TotalCompletions'], - }; + return { + MaxConcurrent: value["MaxConcurrent"], + TotalCompletions: value["TotalCompletions"], + }; } - diff --git a/src/clients/docker/models/ServiceSpecRollbackConfig.ts b/src/clients/docker/models/ServiceSpecRollbackConfig.ts index d1f2f58cdb..43c1923fab 100644 --- a/src/clients/docker/models/ServiceSpecRollbackConfig.ts +++ b/src/clients/docker/models/ServiceSpecRollbackConfig.ts @@ -2,135 +2,139 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Specification for the rollback strategy of the service. * @export * @interface ServiceSpecRollbackConfig */ export interface ServiceSpecRollbackConfig { - /** - * Maximum number of tasks to be rolled back in one iteration (0 means - * unlimited parallelism). - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - Parallelism?: number; - /** - * Amount of time between rollback iterations, in nanoseconds. - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - Delay?: number; - /** - * Action to take if an rolled back task fails to run, or stops - * running during the rollback. - * - * @type {string} - * @memberof ServiceSpecRollbackConfig - */ - FailureAction?: ServiceSpecRollbackConfigFailureActionEnum; - /** - * Amount of time to monitor each rolled back task for failures, in - * nanoseconds. - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - Monitor?: number; - /** - * The fraction of tasks that may fail during a rollback before the - * failure action is invoked, specified as a floating point number - * between 0 and 1. - * - * @type {number} - * @memberof ServiceSpecRollbackConfig - */ - MaxFailureRatio?: number; - /** - * The order of operations when rolling back a task. Either the old - * task is shut down before the new task is started, or the new task - * is started before the old task is shut down. - * - * @type {string} - * @memberof ServiceSpecRollbackConfig - */ - Order?: ServiceSpecRollbackConfigOrderEnum; + /** + * Maximum number of tasks to be rolled back in one iteration (0 means + * unlimited parallelism). + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + Parallelism?: number; + /** + * Amount of time between rollback iterations, in nanoseconds. + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + Delay?: number; + /** + * Action to take if an rolled back task fails to run, or stops + * running during the rollback. + * + * @type {string} + * @memberof ServiceSpecRollbackConfig + */ + FailureAction?: ServiceSpecRollbackConfigFailureActionEnum; + /** + * Amount of time to monitor each rolled back task for failures, in + * nanoseconds. + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + Monitor?: number; + /** + * The fraction of tasks that may fail during a rollback before the + * failure action is invoked, specified as a floating point number + * between 0 and 1. + * + * @type {number} + * @memberof ServiceSpecRollbackConfig + */ + MaxFailureRatio?: number; + /** + * The order of operations when rolling back a task. Either the old + * task is shut down before the new task is started, or the new task + * is started before the old task is shut down. + * + * @type {string} + * @memberof ServiceSpecRollbackConfig + */ + Order?: ServiceSpecRollbackConfigOrderEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ServiceSpecRollbackConfigFailureActionEnum { - Continue = 'continue', - Pause = 'pause' + Continue = "continue", + Pause = "pause", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ServiceSpecRollbackConfigOrderEnum { - StopFirst = 'stop-first', - StartFirst = 'start-first' + StopFirst = "stop-first", + StartFirst = "start-first", } - /** * Check if a given object implements the ServiceSpecRollbackConfig interface. */ -export function instanceOfServiceSpecRollbackConfig(value: object): value is ServiceSpecRollbackConfig { - return true; +export function instanceOfServiceSpecRollbackConfig( + value: object, +): value is ServiceSpecRollbackConfig { + return true; } export function ServiceSpecRollbackConfigFromJSON(json: any): ServiceSpecRollbackConfig { - return ServiceSpecRollbackConfigFromJSONTyped(json, false); + return ServiceSpecRollbackConfigFromJSONTyped(json, false); } -export function ServiceSpecRollbackConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecRollbackConfig { - if (json == null) { - return json; - } - return { - - 'Parallelism': json['Parallelism'] == null ? undefined : json['Parallelism'], - 'Delay': json['Delay'] == null ? undefined : json['Delay'], - 'FailureAction': json['FailureAction'] == null ? undefined : json['FailureAction'], - 'Monitor': json['Monitor'] == null ? undefined : json['Monitor'], - 'MaxFailureRatio': json['MaxFailureRatio'] == null ? undefined : json['MaxFailureRatio'], - 'Order': json['Order'] == null ? undefined : json['Order'], - }; +export function ServiceSpecRollbackConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceSpecRollbackConfig { + if (json == null) { + return json; + } + return { + Parallelism: json["Parallelism"] == null ? undefined : json["Parallelism"], + Delay: json["Delay"] == null ? undefined : json["Delay"], + FailureAction: json["FailureAction"] == null ? undefined : json["FailureAction"], + Monitor: json["Monitor"] == null ? undefined : json["Monitor"], + MaxFailureRatio: json["MaxFailureRatio"] == null ? undefined : json["MaxFailureRatio"], + Order: json["Order"] == null ? undefined : json["Order"], + }; } export function ServiceSpecRollbackConfigToJSON(json: any): ServiceSpecRollbackConfig { - return ServiceSpecRollbackConfigToJSONTyped(json, false); + return ServiceSpecRollbackConfigToJSONTyped(json, false); } -export function ServiceSpecRollbackConfigToJSONTyped(value?: ServiceSpecRollbackConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceSpecRollbackConfigToJSONTyped( + value?: ServiceSpecRollbackConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Parallelism': value['Parallelism'], - 'Delay': value['Delay'], - 'FailureAction': value['FailureAction'], - 'Monitor': value['Monitor'], - 'MaxFailureRatio': value['MaxFailureRatio'], - 'Order': value['Order'], - }; + return { + Parallelism: value["Parallelism"], + Delay: value["Delay"], + FailureAction: value["FailureAction"], + Monitor: value["Monitor"], + MaxFailureRatio: value["MaxFailureRatio"], + Order: value["Order"], + }; } - diff --git a/src/clients/docker/models/ServiceSpecUpdateConfig.ts b/src/clients/docker/models/ServiceSpecUpdateConfig.ts index 4dcdf4d909..71b4526c73 100644 --- a/src/clients/docker/models/ServiceSpecUpdateConfig.ts +++ b/src/clients/docker/models/ServiceSpecUpdateConfig.ts @@ -2,135 +2,137 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Specification for the update strategy of the service. * @export * @interface ServiceSpecUpdateConfig */ export interface ServiceSpecUpdateConfig { - /** - * Maximum number of tasks to be updated in one iteration (0 means - * unlimited parallelism). - * - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - Parallelism?: number; - /** - * Amount of time between updates, in nanoseconds. - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - Delay?: number; - /** - * Action to take if an updated task fails to run, or stops running - * during the update. - * - * @type {string} - * @memberof ServiceSpecUpdateConfig - */ - FailureAction?: ServiceSpecUpdateConfigFailureActionEnum; - /** - * Amount of time to monitor each updated task for failures, in - * nanoseconds. - * - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - Monitor?: number; - /** - * The fraction of tasks that may fail during an update before the - * failure action is invoked, specified as a floating point number - * between 0 and 1. - * - * @type {number} - * @memberof ServiceSpecUpdateConfig - */ - MaxFailureRatio?: number; - /** - * The order of operations when rolling out an updated task. Either - * the old task is shut down before the new task is started, or the - * new task is started before the old task is shut down. - * - * @type {string} - * @memberof ServiceSpecUpdateConfig - */ - Order?: ServiceSpecUpdateConfigOrderEnum; + /** + * Maximum number of tasks to be updated in one iteration (0 means + * unlimited parallelism). + * + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + Parallelism?: number; + /** + * Amount of time between updates, in nanoseconds. + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + Delay?: number; + /** + * Action to take if an updated task fails to run, or stops running + * during the update. + * + * @type {string} + * @memberof ServiceSpecUpdateConfig + */ + FailureAction?: ServiceSpecUpdateConfigFailureActionEnum; + /** + * Amount of time to monitor each updated task for failures, in + * nanoseconds. + * + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + Monitor?: number; + /** + * The fraction of tasks that may fail during an update before the + * failure action is invoked, specified as a floating point number + * between 0 and 1. + * + * @type {number} + * @memberof ServiceSpecUpdateConfig + */ + MaxFailureRatio?: number; + /** + * The order of operations when rolling out an updated task. Either + * the old task is shut down before the new task is started, or the + * new task is started before the old task is shut down. + * + * @type {string} + * @memberof ServiceSpecUpdateConfig + */ + Order?: ServiceSpecUpdateConfigOrderEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ServiceSpecUpdateConfigFailureActionEnum { - Continue = 'continue', - Pause = 'pause', - Rollback = 'rollback' + Continue = "continue", + Pause = "pause", + Rollback = "rollback", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ServiceSpecUpdateConfigOrderEnum { - StopFirst = 'stop-first', - StartFirst = 'start-first' + StopFirst = "stop-first", + StartFirst = "start-first", } - /** * Check if a given object implements the ServiceSpecUpdateConfig interface. */ export function instanceOfServiceSpecUpdateConfig(value: object): value is ServiceSpecUpdateConfig { - return true; + return true; } export function ServiceSpecUpdateConfigFromJSON(json: any): ServiceSpecUpdateConfig { - return ServiceSpecUpdateConfigFromJSONTyped(json, false); + return ServiceSpecUpdateConfigFromJSONTyped(json, false); } -export function ServiceSpecUpdateConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceSpecUpdateConfig { - if (json == null) { - return json; - } - return { - - 'Parallelism': json['Parallelism'] == null ? undefined : json['Parallelism'], - 'Delay': json['Delay'] == null ? undefined : json['Delay'], - 'FailureAction': json['FailureAction'] == null ? undefined : json['FailureAction'], - 'Monitor': json['Monitor'] == null ? undefined : json['Monitor'], - 'MaxFailureRatio': json['MaxFailureRatio'] == null ? undefined : json['MaxFailureRatio'], - 'Order': json['Order'] == null ? undefined : json['Order'], - }; +export function ServiceSpecUpdateConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceSpecUpdateConfig { + if (json == null) { + return json; + } + return { + Parallelism: json["Parallelism"] == null ? undefined : json["Parallelism"], + Delay: json["Delay"] == null ? undefined : json["Delay"], + FailureAction: json["FailureAction"] == null ? undefined : json["FailureAction"], + Monitor: json["Monitor"] == null ? undefined : json["Monitor"], + MaxFailureRatio: json["MaxFailureRatio"] == null ? undefined : json["MaxFailureRatio"], + Order: json["Order"] == null ? undefined : json["Order"], + }; } export function ServiceSpecUpdateConfigToJSON(json: any): ServiceSpecUpdateConfig { - return ServiceSpecUpdateConfigToJSONTyped(json, false); + return ServiceSpecUpdateConfigToJSONTyped(json, false); } -export function ServiceSpecUpdateConfigToJSONTyped(value?: ServiceSpecUpdateConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceSpecUpdateConfigToJSONTyped( + value?: ServiceSpecUpdateConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Parallelism': value['Parallelism'], - 'Delay': value['Delay'], - 'FailureAction': value['FailureAction'], - 'Monitor': value['Monitor'], - 'MaxFailureRatio': value['MaxFailureRatio'], - 'Order': value['Order'], - }; + return { + Parallelism: value["Parallelism"], + Delay: value["Delay"], + FailureAction: value["FailureAction"], + Monitor: value["Monitor"], + MaxFailureRatio: value["MaxFailureRatio"], + Order: value["Order"], + }; } - diff --git a/src/clients/docker/models/ServiceUpdateRequest.ts b/src/clients/docker/models/ServiceUpdateRequest.ts index b5dd07093a..26ac5e62c9 100644 --- a/src/clients/docker/models/ServiceUpdateRequest.ts +++ b/src/clients/docker/models/ServiceUpdateRequest.ts @@ -2,163 +2,179 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; +import { mapValues } from "../runtime"; +import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from './NetworkAttachmentConfig'; -import type { ServiceSpecRollbackConfig } from './ServiceSpecRollbackConfig'; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from "./NetworkAttachmentConfig"; +import type { ServiceSpecRollbackConfig } from "./ServiceSpecRollbackConfig"; import { - ServiceSpecRollbackConfigFromJSON, - ServiceSpecRollbackConfigFromJSONTyped, - ServiceSpecRollbackConfigToJSON, - ServiceSpecRollbackConfigToJSONTyped, -} from './ServiceSpecRollbackConfig'; -import type { ServiceSpecUpdateConfig } from './ServiceSpecUpdateConfig'; + ServiceSpecRollbackConfigFromJSON, + ServiceSpecRollbackConfigFromJSONTyped, + ServiceSpecRollbackConfigToJSON, + ServiceSpecRollbackConfigToJSONTyped, +} from "./ServiceSpecRollbackConfig"; +import type { ServiceSpecUpdateConfig } from "./ServiceSpecUpdateConfig"; import { - ServiceSpecUpdateConfigFromJSON, - ServiceSpecUpdateConfigFromJSONTyped, - ServiceSpecUpdateConfigToJSON, - ServiceSpecUpdateConfigToJSONTyped, -} from './ServiceSpecUpdateConfig'; -import type { EndpointSpec } from './EndpointSpec'; + ServiceSpecUpdateConfigFromJSON, + ServiceSpecUpdateConfigFromJSONTyped, + ServiceSpecUpdateConfigToJSON, + ServiceSpecUpdateConfigToJSONTyped, +} from "./ServiceSpecUpdateConfig"; +import type { EndpointSpec } from "./EndpointSpec"; import { - EndpointSpecFromJSON, - EndpointSpecFromJSONTyped, - EndpointSpecToJSON, - EndpointSpecToJSONTyped, -} from './EndpointSpec'; -import type { TaskSpec } from './TaskSpec'; + EndpointSpecFromJSON, + EndpointSpecFromJSONTyped, + EndpointSpecToJSON, + EndpointSpecToJSONTyped, +} from "./EndpointSpec"; +import type { TaskSpec } from "./TaskSpec"; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from './TaskSpec'; -import type { ServiceSpecMode } from './ServiceSpecMode'; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from "./TaskSpec"; +import type { ServiceSpecMode } from "./ServiceSpecMode"; import { - ServiceSpecModeFromJSON, - ServiceSpecModeFromJSONTyped, - ServiceSpecModeToJSON, - ServiceSpecModeToJSONTyped, -} from './ServiceSpecMode'; + ServiceSpecModeFromJSON, + ServiceSpecModeFromJSONTyped, + ServiceSpecModeToJSON, + ServiceSpecModeToJSONTyped, +} from "./ServiceSpecMode"; /** - * + * * @export * @interface ServiceUpdateRequest */ export interface ServiceUpdateRequest { - /** - * Name of the service. - * @type {string} - * @memberof ServiceUpdateRequest - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof ServiceUpdateRequest - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {TaskSpec} - * @memberof ServiceUpdateRequest - */ - TaskTemplate?: TaskSpec; - /** - * - * @type {ServiceSpecMode} - * @memberof ServiceUpdateRequest - */ - Mode?: ServiceSpecMode; - /** - * - * @type {ServiceSpecUpdateConfig} - * @memberof ServiceUpdateRequest - */ - UpdateConfig?: ServiceSpecUpdateConfig; - /** - * - * @type {ServiceSpecRollbackConfig} - * @memberof ServiceUpdateRequest - */ - RollbackConfig?: ServiceSpecRollbackConfig; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof ServiceUpdateRequest - */ - Networks?: Array; - /** - * - * @type {EndpointSpec} - * @memberof ServiceUpdateRequest - */ - EndpointSpec?: EndpointSpec; + /** + * Name of the service. + * @type {string} + * @memberof ServiceUpdateRequest + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof ServiceUpdateRequest + */ + Labels?: { [key: string]: string }; + /** + * + * @type {TaskSpec} + * @memberof ServiceUpdateRequest + */ + TaskTemplate?: TaskSpec; + /** + * + * @type {ServiceSpecMode} + * @memberof ServiceUpdateRequest + */ + Mode?: ServiceSpecMode; + /** + * + * @type {ServiceSpecUpdateConfig} + * @memberof ServiceUpdateRequest + */ + UpdateConfig?: ServiceSpecUpdateConfig; + /** + * + * @type {ServiceSpecRollbackConfig} + * @memberof ServiceUpdateRequest + */ + RollbackConfig?: ServiceSpecRollbackConfig; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof ServiceUpdateRequest + */ + Networks?: Array; + /** + * + * @type {EndpointSpec} + * @memberof ServiceUpdateRequest + */ + EndpointSpec?: EndpointSpec; } /** * Check if a given object implements the ServiceUpdateRequest interface. */ export function instanceOfServiceUpdateRequest(value: object): value is ServiceUpdateRequest { - return true; + return true; } export function ServiceUpdateRequestFromJSON(json: any): ServiceUpdateRequest { - return ServiceUpdateRequestFromJSONTyped(json, false); + return ServiceUpdateRequestFromJSONTyped(json, false); } -export function ServiceUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceUpdateRequest { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'TaskTemplate': json['TaskTemplate'] == null ? undefined : TaskSpecFromJSON(json['TaskTemplate']), - 'Mode': json['Mode'] == null ? undefined : ServiceSpecModeFromJSON(json['Mode']), - 'UpdateConfig': json['UpdateConfig'] == null ? undefined : ServiceSpecUpdateConfigFromJSON(json['UpdateConfig']), - 'RollbackConfig': json['RollbackConfig'] == null ? undefined : ServiceSpecRollbackConfigFromJSON(json['RollbackConfig']), - 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), - 'EndpointSpec': json['EndpointSpec'] == null ? undefined : EndpointSpecFromJSON(json['EndpointSpec']), - }; +export function ServiceUpdateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceUpdateRequest { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + TaskTemplate: json["TaskTemplate"] == null ? undefined : TaskSpecFromJSON(json["TaskTemplate"]), + Mode: json["Mode"] == null ? undefined : ServiceSpecModeFromJSON(json["Mode"]), + UpdateConfig: + json["UpdateConfig"] == null + ? undefined + : ServiceSpecUpdateConfigFromJSON(json["UpdateConfig"]), + RollbackConfig: + json["RollbackConfig"] == null + ? undefined + : ServiceSpecRollbackConfigFromJSON(json["RollbackConfig"]), + Networks: + json["Networks"] == null + ? undefined + : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), + EndpointSpec: + json["EndpointSpec"] == null ? undefined : EndpointSpecFromJSON(json["EndpointSpec"]), + }; } export function ServiceUpdateRequestToJSON(json: any): ServiceUpdateRequest { - return ServiceUpdateRequestToJSONTyped(json, false); + return ServiceUpdateRequestToJSONTyped(json, false); } -export function ServiceUpdateRequestToJSONTyped(value?: ServiceUpdateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceUpdateRequestToJSONTyped( + value?: ServiceUpdateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'TaskTemplate': TaskSpecToJSON(value['TaskTemplate']), - 'Mode': ServiceSpecModeToJSON(value['Mode']), - 'UpdateConfig': ServiceSpecUpdateConfigToJSON(value['UpdateConfig']), - 'RollbackConfig': ServiceSpecRollbackConfigToJSON(value['RollbackConfig']), - 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), - 'EndpointSpec': EndpointSpecToJSON(value['EndpointSpec']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + TaskTemplate: TaskSpecToJSON(value["TaskTemplate"]), + Mode: ServiceSpecModeToJSON(value["Mode"]), + UpdateConfig: ServiceSpecUpdateConfigToJSON(value["UpdateConfig"]), + RollbackConfig: ServiceSpecRollbackConfigToJSON(value["RollbackConfig"]), + Networks: + value["Networks"] == null + ? undefined + : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), + EndpointSpec: EndpointSpecToJSON(value["EndpointSpec"]), + }; } - diff --git a/src/clients/docker/models/ServiceUpdateResponse.ts b/src/clients/docker/models/ServiceUpdateResponse.ts index e80e379d55..e5bb2325f2 100644 --- a/src/clients/docker/models/ServiceUpdateResponse.ts +++ b/src/clients/docker/models/ServiceUpdateResponse.ts @@ -2,64 +2,67 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ServiceUpdateResponse */ export interface ServiceUpdateResponse { - /** - * Optional warning messages - * @type {Array} - * @memberof ServiceUpdateResponse - */ - Warnings?: Array; + /** + * Optional warning messages + * @type {Array} + * @memberof ServiceUpdateResponse + */ + Warnings?: Array; } /** * Check if a given object implements the ServiceUpdateResponse interface. */ export function instanceOfServiceUpdateResponse(value: object): value is ServiceUpdateResponse { - return true; + return true; } export function ServiceUpdateResponseFromJSON(json: any): ServiceUpdateResponse { - return ServiceUpdateResponseFromJSONTyped(json, false); + return ServiceUpdateResponseFromJSONTyped(json, false); } -export function ServiceUpdateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceUpdateResponse { - if (json == null) { - return json; - } - return { - - 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], - }; +export function ServiceUpdateResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceUpdateResponse { + if (json == null) { + return json; + } + return { + Warnings: json["Warnings"] == null ? undefined : json["Warnings"], + }; } export function ServiceUpdateResponseToJSON(json: any): ServiceUpdateResponse { - return ServiceUpdateResponseToJSONTyped(json, false); + return ServiceUpdateResponseToJSONTyped(json, false); } -export function ServiceUpdateResponseToJSONTyped(value?: ServiceUpdateResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceUpdateResponseToJSONTyped( + value?: ServiceUpdateResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Warnings': value['Warnings'], - }; + return { + Warnings: value["Warnings"], + }; } - diff --git a/src/clients/docker/models/ServiceUpdateStatus.ts b/src/clients/docker/models/ServiceUpdateStatus.ts index b25edb822d..ccb4ac3091 100644 --- a/src/clients/docker/models/ServiceUpdateStatus.ts +++ b/src/clients/docker/models/ServiceUpdateStatus.ts @@ -2,99 +2,101 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of a service update. * @export * @interface ServiceUpdateStatus */ export interface ServiceUpdateStatus { - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - State?: ServiceUpdateStatusStateEnum; - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - StartedAt?: string; - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - CompletedAt?: string; - /** - * - * @type {string} - * @memberof ServiceUpdateStatus - */ - Message?: string; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + State?: ServiceUpdateStatusStateEnum; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + StartedAt?: string; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + CompletedAt?: string; + /** + * + * @type {string} + * @memberof ServiceUpdateStatus + */ + Message?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ServiceUpdateStatusStateEnum { - Updating = 'updating', - Paused = 'paused', - Completed = 'completed' + Updating = "updating", + Paused = "paused", + Completed = "completed", } - /** * Check if a given object implements the ServiceUpdateStatus interface. */ export function instanceOfServiceUpdateStatus(value: object): value is ServiceUpdateStatus { - return true; + return true; } export function ServiceUpdateStatusFromJSON(json: any): ServiceUpdateStatus { - return ServiceUpdateStatusFromJSONTyped(json, false); + return ServiceUpdateStatusFromJSONTyped(json, false); } -export function ServiceUpdateStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServiceUpdateStatus { - if (json == null) { - return json; - } - return { - - 'State': json['State'] == null ? undefined : json['State'], - 'StartedAt': json['StartedAt'] == null ? undefined : json['StartedAt'], - 'CompletedAt': json['CompletedAt'] == null ? undefined : json['CompletedAt'], - 'Message': json['Message'] == null ? undefined : json['Message'], - }; +export function ServiceUpdateStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ServiceUpdateStatus { + if (json == null) { + return json; + } + return { + State: json["State"] == null ? undefined : json["State"], + StartedAt: json["StartedAt"] == null ? undefined : json["StartedAt"], + CompletedAt: json["CompletedAt"] == null ? undefined : json["CompletedAt"], + Message: json["Message"] == null ? undefined : json["Message"], + }; } export function ServiceUpdateStatusToJSON(json: any): ServiceUpdateStatus { - return ServiceUpdateStatusToJSONTyped(json, false); + return ServiceUpdateStatusToJSONTyped(json, false); } -export function ServiceUpdateStatusToJSONTyped(value?: ServiceUpdateStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ServiceUpdateStatusToJSONTyped( + value?: ServiceUpdateStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'State': value['State'], - 'StartedAt': value['StartedAt'], - 'CompletedAt': value['CompletedAt'], - 'Message': value['Message'], - }; + return { + State: value["State"], + StartedAt: value["StartedAt"], + CompletedAt: value["CompletedAt"], + Message: value["Message"], + }; } - diff --git a/src/clients/docker/models/Swarm.ts b/src/clients/docker/models/Swarm.ts index accd7cb342..922934a0c4 100644 --- a/src/clients/docker/models/Swarm.ts +++ b/src/clients/docker/models/Swarm.ts @@ -2,185 +2,183 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { JoinTokens } from './JoinTokens'; +import { mapValues } from "../runtime"; +import type { JoinTokens } from "./JoinTokens"; import { - JoinTokensFromJSON, - JoinTokensFromJSONTyped, - JoinTokensToJSON, - JoinTokensToJSONTyped, -} from './JoinTokens'; -import type { ObjectVersion } from './ObjectVersion'; + JoinTokensFromJSON, + JoinTokensFromJSONTyped, + JoinTokensToJSON, + JoinTokensToJSONTyped, +} from "./JoinTokens"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { TLSInfo } from './TLSInfo'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { TLSInfo } from "./TLSInfo"; import { - TLSInfoFromJSON, - TLSInfoFromJSONTyped, - TLSInfoToJSON, - TLSInfoToJSONTyped, -} from './TLSInfo'; -import type { SwarmSpec } from './SwarmSpec'; + TLSInfoFromJSON, + TLSInfoFromJSONTyped, + TLSInfoToJSON, + TLSInfoToJSONTyped, +} from "./TLSInfo"; +import type { SwarmSpec } from "./SwarmSpec"; import { - SwarmSpecFromJSON, - SwarmSpecFromJSONTyped, - SwarmSpecToJSON, - SwarmSpecToJSONTyped, -} from './SwarmSpec'; + SwarmSpecFromJSON, + SwarmSpecFromJSONTyped, + SwarmSpecToJSON, + SwarmSpecToJSONTyped, +} from "./SwarmSpec"; /** - * + * * @export * @interface Swarm */ export interface Swarm { - /** - * The ID of the swarm. - * @type {string} - * @memberof Swarm - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Swarm - */ - Version?: ObjectVersion; - /** - * Date and time at which the swarm was initialised in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Swarm - */ - CreatedAt?: string; - /** - * Date and time at which the swarm was last updated in - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. - * - * @type {string} - * @memberof Swarm - */ - UpdatedAt?: string; - /** - * - * @type {SwarmSpec} - * @memberof Swarm - */ - Spec?: SwarmSpec; - /** - * - * @type {TLSInfo} - * @memberof Swarm - */ - TLSInfo?: TLSInfo; - /** - * Whether there is currently a root CA rotation in progress for the swarm - * - * @type {boolean} - * @memberof Swarm - */ - RootRotationInProgress?: boolean; - /** - * DataPathPort specifies the data path port number for data traffic. - * Acceptable port range is 1024 to 49151. - * If no port is set or is set to 0, the default port (4789) is used. - * - * @type {number} - * @memberof Swarm - */ - DataPathPort?: number; - /** - * Default Address Pool specifies default subnet pools for global scope - * networks. - * - * @type {Array} - * @memberof Swarm - */ - DefaultAddrPool?: Array; - /** - * SubnetSize specifies the subnet size of the networks created from the - * default subnet pool. - * - * @type {number} - * @memberof Swarm - */ - SubnetSize?: number; - /** - * - * @type {JoinTokens} - * @memberof Swarm - */ - JoinTokens?: JoinTokens; + /** + * The ID of the swarm. + * @type {string} + * @memberof Swarm + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Swarm + */ + Version?: ObjectVersion; + /** + * Date and time at which the swarm was initialised in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Swarm + */ + CreatedAt?: string; + /** + * Date and time at which the swarm was last updated in + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * + * @type {string} + * @memberof Swarm + */ + UpdatedAt?: string; + /** + * + * @type {SwarmSpec} + * @memberof Swarm + */ + Spec?: SwarmSpec; + /** + * + * @type {TLSInfo} + * @memberof Swarm + */ + TLSInfo?: TLSInfo; + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @type {boolean} + * @memberof Swarm + */ + RootRotationInProgress?: boolean; + /** + * DataPathPort specifies the data path port number for data traffic. + * Acceptable port range is 1024 to 49151. + * If no port is set or is set to 0, the default port (4789) is used. + * + * @type {number} + * @memberof Swarm + */ + DataPathPort?: number; + /** + * Default Address Pool specifies default subnet pools for global scope + * networks. + * + * @type {Array} + * @memberof Swarm + */ + DefaultAddrPool?: Array; + /** + * SubnetSize specifies the subnet size of the networks created from the + * default subnet pool. + * + * @type {number} + * @memberof Swarm + */ + SubnetSize?: number; + /** + * + * @type {JoinTokens} + * @memberof Swarm + */ + JoinTokens?: JoinTokens; } /** * Check if a given object implements the Swarm interface. */ export function instanceOfSwarm(value: object): value is Swarm { - return true; + return true; } export function SwarmFromJSON(json: any): Swarm { - return SwarmFromJSONTyped(json, false); + return SwarmFromJSONTyped(json, false); } export function SwarmFromJSONTyped(json: any, ignoreDiscriminator: boolean): Swarm { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Spec': json['Spec'] == null ? undefined : SwarmSpecFromJSON(json['Spec']), - 'TLSInfo': json['TLSInfo'] == null ? undefined : TLSInfoFromJSON(json['TLSInfo']), - 'RootRotationInProgress': json['RootRotationInProgress'] == null ? undefined : json['RootRotationInProgress'], - 'DataPathPort': json['DataPathPort'] == null ? undefined : json['DataPathPort'], - 'DefaultAddrPool': json['DefaultAddrPool'] == null ? undefined : json['DefaultAddrPool'], - 'SubnetSize': json['SubnetSize'] == null ? undefined : json['SubnetSize'], - 'JoinTokens': json['JoinTokens'] == null ? undefined : JoinTokensFromJSON(json['JoinTokens']), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Spec: json["Spec"] == null ? undefined : SwarmSpecFromJSON(json["Spec"]), + TLSInfo: json["TLSInfo"] == null ? undefined : TLSInfoFromJSON(json["TLSInfo"]), + RootRotationInProgress: + json["RootRotationInProgress"] == null ? undefined : json["RootRotationInProgress"], + DataPathPort: json["DataPathPort"] == null ? undefined : json["DataPathPort"], + DefaultAddrPool: json["DefaultAddrPool"] == null ? undefined : json["DefaultAddrPool"], + SubnetSize: json["SubnetSize"] == null ? undefined : json["SubnetSize"], + JoinTokens: json["JoinTokens"] == null ? undefined : JoinTokensFromJSON(json["JoinTokens"]), + }; } export function SwarmToJSON(json: any): Swarm { - return SwarmToJSONTyped(json, false); + return SwarmToJSONTyped(json, false); } export function SwarmToJSONTyped(value?: Swarm | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Spec': SwarmSpecToJSON(value['Spec']), - 'TLSInfo': TLSInfoToJSON(value['TLSInfo']), - 'RootRotationInProgress': value['RootRotationInProgress'], - 'DataPathPort': value['DataPathPort'], - 'DefaultAddrPool': value['DefaultAddrPool'], - 'SubnetSize': value['SubnetSize'], - 'JoinTokens': JoinTokensToJSON(value['JoinTokens']), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Spec: SwarmSpecToJSON(value["Spec"]), + TLSInfo: TLSInfoToJSON(value["TLSInfo"]), + RootRotationInProgress: value["RootRotationInProgress"], + DataPathPort: value["DataPathPort"], + DefaultAddrPool: value["DefaultAddrPool"], + SubnetSize: value["SubnetSize"], + JoinTokens: JoinTokensToJSON(value["JoinTokens"]), + }; } - diff --git a/src/clients/docker/models/SwarmInfo.ts b/src/clients/docker/models/SwarmInfo.ts index adc27f05b1..ac23879ddb 100644 --- a/src/clients/docker/models/SwarmInfo.ts +++ b/src/clients/docker/models/SwarmInfo.ts @@ -2,156 +2,161 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ClusterInfo } from './ClusterInfo'; +import { mapValues } from "../runtime"; +import type { ClusterInfo } from "./ClusterInfo"; import { - ClusterInfoFromJSON, - ClusterInfoFromJSONTyped, - ClusterInfoToJSON, - ClusterInfoToJSONTyped, -} from './ClusterInfo'; -import type { PeerNode } from './PeerNode'; + ClusterInfoFromJSON, + ClusterInfoFromJSONTyped, + ClusterInfoToJSON, + ClusterInfoToJSONTyped, +} from "./ClusterInfo"; +import type { PeerNode } from "./PeerNode"; import { - PeerNodeFromJSON, - PeerNodeFromJSONTyped, - PeerNodeToJSON, - PeerNodeToJSONTyped, -} from './PeerNode'; -import type { LocalNodeState } from './LocalNodeState'; + PeerNodeFromJSON, + PeerNodeFromJSONTyped, + PeerNodeToJSON, + PeerNodeToJSONTyped, +} from "./PeerNode"; +import type { LocalNodeState } from "./LocalNodeState"; import { - LocalNodeStateFromJSON, - LocalNodeStateFromJSONTyped, - LocalNodeStateToJSON, - LocalNodeStateToJSONTyped, -} from './LocalNodeState'; + LocalNodeStateFromJSON, + LocalNodeStateFromJSONTyped, + LocalNodeStateToJSON, + LocalNodeStateToJSONTyped, +} from "./LocalNodeState"; /** * Represents generic information about swarm. - * + * * @export * @interface SwarmInfo */ export interface SwarmInfo { - /** - * Unique identifier of for this node in the swarm. - * @type {string} - * @memberof SwarmInfo - */ - NodeID?: string; - /** - * IP address at which this node can be reached by other nodes in the - * swarm. - * - * @type {string} - * @memberof SwarmInfo - */ - NodeAddr?: string; - /** - * - * @type {LocalNodeState} - * @memberof SwarmInfo - */ - LocalNodeState?: LocalNodeState; - /** - * - * @type {boolean} - * @memberof SwarmInfo - */ - ControlAvailable?: boolean; - /** - * - * @type {string} - * @memberof SwarmInfo - */ - Error?: string; - /** - * List of ID's and addresses of other managers in the swarm. - * - * @type {Array} - * @memberof SwarmInfo - */ - RemoteManagers?: Array | null; - /** - * Total number of nodes in the swarm. - * @type {number} - * @memberof SwarmInfo - */ - Nodes?: number | null; - /** - * Total number of managers in the swarm. - * @type {number} - * @memberof SwarmInfo - */ - Managers?: number | null; - /** - * - * @type {ClusterInfo} - * @memberof SwarmInfo - */ - Cluster?: ClusterInfo | null; + /** + * Unique identifier of for this node in the swarm. + * @type {string} + * @memberof SwarmInfo + */ + NodeID?: string; + /** + * IP address at which this node can be reached by other nodes in the + * swarm. + * + * @type {string} + * @memberof SwarmInfo + */ + NodeAddr?: string; + /** + * + * @type {LocalNodeState} + * @memberof SwarmInfo + */ + LocalNodeState?: LocalNodeState; + /** + * + * @type {boolean} + * @memberof SwarmInfo + */ + ControlAvailable?: boolean; + /** + * + * @type {string} + * @memberof SwarmInfo + */ + Error?: string; + /** + * List of ID's and addresses of other managers in the swarm. + * + * @type {Array} + * @memberof SwarmInfo + */ + RemoteManagers?: Array | null; + /** + * Total number of nodes in the swarm. + * @type {number} + * @memberof SwarmInfo + */ + Nodes?: number | null; + /** + * Total number of managers in the swarm. + * @type {number} + * @memberof SwarmInfo + */ + Managers?: number | null; + /** + * + * @type {ClusterInfo} + * @memberof SwarmInfo + */ + Cluster?: ClusterInfo | null; } - - /** * Check if a given object implements the SwarmInfo interface. */ export function instanceOfSwarmInfo(value: object): value is SwarmInfo { - return true; + return true; } export function SwarmInfoFromJSON(json: any): SwarmInfo { - return SwarmInfoFromJSONTyped(json, false); + return SwarmInfoFromJSONTyped(json, false); } export function SwarmInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmInfo { - if (json == null) { - return json; - } - return { - - 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], - 'NodeAddr': json['NodeAddr'] == null ? undefined : json['NodeAddr'], - 'LocalNodeState': json['LocalNodeState'] == null ? undefined : LocalNodeStateFromJSON(json['LocalNodeState']), - 'ControlAvailable': json['ControlAvailable'] == null ? undefined : json['ControlAvailable'], - 'Error': json['Error'] == null ? undefined : json['Error'], - 'RemoteManagers': json['RemoteManagers'] == null ? undefined : ((json['RemoteManagers'] as Array).map(PeerNodeFromJSON)), - 'Nodes': json['Nodes'] == null ? undefined : json['Nodes'], - 'Managers': json['Managers'] == null ? undefined : json['Managers'], - 'Cluster': json['Cluster'] == null ? undefined : ClusterInfoFromJSON(json['Cluster']), - }; + if (json == null) { + return json; + } + return { + NodeID: json["NodeID"] == null ? undefined : json["NodeID"], + NodeAddr: json["NodeAddr"] == null ? undefined : json["NodeAddr"], + LocalNodeState: + json["LocalNodeState"] == null ? undefined : LocalNodeStateFromJSON(json["LocalNodeState"]), + ControlAvailable: json["ControlAvailable"] == null ? undefined : json["ControlAvailable"], + Error: json["Error"] == null ? undefined : json["Error"], + RemoteManagers: + json["RemoteManagers"] == null + ? undefined + : (json["RemoteManagers"] as Array).map(PeerNodeFromJSON), + Nodes: json["Nodes"] == null ? undefined : json["Nodes"], + Managers: json["Managers"] == null ? undefined : json["Managers"], + Cluster: json["Cluster"] == null ? undefined : ClusterInfoFromJSON(json["Cluster"]), + }; } export function SwarmInfoToJSON(json: any): SwarmInfo { - return SwarmInfoToJSONTyped(json, false); + return SwarmInfoToJSONTyped(json, false); } -export function SwarmInfoToJSONTyped(value?: SwarmInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmInfoToJSONTyped( + value?: SwarmInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NodeID': value['NodeID'], - 'NodeAddr': value['NodeAddr'], - 'LocalNodeState': LocalNodeStateToJSON(value['LocalNodeState']), - 'ControlAvailable': value['ControlAvailable'], - 'Error': value['Error'], - 'RemoteManagers': value['RemoteManagers'] == null ? undefined : ((value['RemoteManagers'] as Array).map(PeerNodeToJSON)), - 'Nodes': value['Nodes'], - 'Managers': value['Managers'], - 'Cluster': ClusterInfoToJSON(value['Cluster']), - }; + return { + NodeID: value["NodeID"], + NodeAddr: value["NodeAddr"], + LocalNodeState: LocalNodeStateToJSON(value["LocalNodeState"]), + ControlAvailable: value["ControlAvailable"], + Error: value["Error"], + RemoteManagers: + value["RemoteManagers"] == null + ? undefined + : (value["RemoteManagers"] as Array).map(PeerNodeToJSON), + Nodes: value["Nodes"], + Managers: value["Managers"], + Cluster: ClusterInfoToJSON(value["Cluster"]), + }; } - diff --git a/src/clients/docker/models/SwarmInitRequest.ts b/src/clients/docker/models/SwarmInitRequest.ts index 4150150a55..7c09d8c63b 100644 --- a/src/clients/docker/models/SwarmInitRequest.ts +++ b/src/clients/docker/models/SwarmInitRequest.ts @@ -2,157 +2,160 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SwarmSpec } from './SwarmSpec'; +import { mapValues } from "../runtime"; +import type { SwarmSpec } from "./SwarmSpec"; import { - SwarmSpecFromJSON, - SwarmSpecFromJSONTyped, - SwarmSpecToJSON, - SwarmSpecToJSONTyped, -} from './SwarmSpec'; + SwarmSpecFromJSON, + SwarmSpecFromJSONTyped, + SwarmSpecToJSON, + SwarmSpecToJSONTyped, +} from "./SwarmSpec"; /** - * + * * @export * @interface SwarmInitRequest */ export interface SwarmInitRequest { - /** - * Listen address used for inter-manager communication, as well - * as determining the networking interface used for the VXLAN - * Tunnel Endpoint (VTEP). This can either be an address/port - * combination in the form `192.168.1.1:4567`, or an interface - * followed by a port number, like `eth0:4567`. If the port number - * is omitted, the default swarm listening port is used. - * - * @type {string} - * @memberof SwarmInitRequest - */ - ListenAddr?: string; - /** - * Externally reachable address advertised to other nodes. This - * can either be an address/port combination in the form - * `192.168.1.1:4567`, or an interface followed by a port number, - * like `eth0:4567`. If the port number is omitted, the port - * number from the listen address is used. If `AdvertiseAddr` is - * not specified, it will be automatically detected when possible. - * - * @type {string} - * @memberof SwarmInitRequest - */ - AdvertiseAddr?: string; - /** - * Address or interface to use for data path traffic (format: - * ``), for example, `192.168.1.1`, or an interface, - * like `eth0`. If `DataPathAddr` is unspecified, the same address - * as `AdvertiseAddr` is used. - * - * The `DataPathAddr` specifies the address that global scope - * network drivers will publish towards other nodes in order to - * reach the containers running on this node. Using this parameter - * it is possible to separate the container data traffic from the - * management traffic of the cluster. - * - * @type {string} - * @memberof SwarmInitRequest - */ - DataPathAddr?: string; - /** - * DataPathPort specifies the data path port number for data traffic. - * Acceptable port range is 1024 to 49151. - * if no port is set or is set to 0, default port 4789 will be used. - * - * @type {number} - * @memberof SwarmInitRequest - */ - DataPathPort?: number; - /** - * Default Address Pool specifies default subnet pools for global - * scope networks. - * - * @type {Array} - * @memberof SwarmInitRequest - */ - DefaultAddrPool?: Array; - /** - * Force creation of a new swarm. - * @type {boolean} - * @memberof SwarmInitRequest - */ - ForceNewCluster?: boolean; - /** - * SubnetSize specifies the subnet size of the networks created - * from the default subnet pool. - * - * @type {number} - * @memberof SwarmInitRequest - */ - SubnetSize?: number; - /** - * - * @type {SwarmSpec} - * @memberof SwarmInitRequest - */ - Spec?: SwarmSpec; + /** + * Listen address used for inter-manager communication, as well + * as determining the networking interface used for the VXLAN + * Tunnel Endpoint (VTEP). This can either be an address/port + * combination in the form `192.168.1.1:4567`, or an interface + * followed by a port number, like `eth0:4567`. If the port number + * is omitted, the default swarm listening port is used. + * + * @type {string} + * @memberof SwarmInitRequest + */ + ListenAddr?: string; + /** + * Externally reachable address advertised to other nodes. This + * can either be an address/port combination in the form + * `192.168.1.1:4567`, or an interface followed by a port number, + * like `eth0:4567`. If the port number is omitted, the port + * number from the listen address is used. If `AdvertiseAddr` is + * not specified, it will be automatically detected when possible. + * + * @type {string} + * @memberof SwarmInitRequest + */ + AdvertiseAddr?: string; + /** + * Address or interface to use for data path traffic (format: + * ``), for example, `192.168.1.1`, or an interface, + * like `eth0`. If `DataPathAddr` is unspecified, the same address + * as `AdvertiseAddr` is used. + * + * The `DataPathAddr` specifies the address that global scope + * network drivers will publish towards other nodes in order to + * reach the containers running on this node. Using this parameter + * it is possible to separate the container data traffic from the + * management traffic of the cluster. + * + * @type {string} + * @memberof SwarmInitRequest + */ + DataPathAddr?: string; + /** + * DataPathPort specifies the data path port number for data traffic. + * Acceptable port range is 1024 to 49151. + * if no port is set or is set to 0, default port 4789 will be used. + * + * @type {number} + * @memberof SwarmInitRequest + */ + DataPathPort?: number; + /** + * Default Address Pool specifies default subnet pools for global + * scope networks. + * + * @type {Array} + * @memberof SwarmInitRequest + */ + DefaultAddrPool?: Array; + /** + * Force creation of a new swarm. + * @type {boolean} + * @memberof SwarmInitRequest + */ + ForceNewCluster?: boolean; + /** + * SubnetSize specifies the subnet size of the networks created + * from the default subnet pool. + * + * @type {number} + * @memberof SwarmInitRequest + */ + SubnetSize?: number; + /** + * + * @type {SwarmSpec} + * @memberof SwarmInitRequest + */ + Spec?: SwarmSpec; } /** * Check if a given object implements the SwarmInitRequest interface. */ export function instanceOfSwarmInitRequest(value: object): value is SwarmInitRequest { - return true; + return true; } export function SwarmInitRequestFromJSON(json: any): SwarmInitRequest { - return SwarmInitRequestFromJSONTyped(json, false); + return SwarmInitRequestFromJSONTyped(json, false); } -export function SwarmInitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmInitRequest { - if (json == null) { - return json; - } - return { - - 'ListenAddr': json['ListenAddr'] == null ? undefined : json['ListenAddr'], - 'AdvertiseAddr': json['AdvertiseAddr'] == null ? undefined : json['AdvertiseAddr'], - 'DataPathAddr': json['DataPathAddr'] == null ? undefined : json['DataPathAddr'], - 'DataPathPort': json['DataPathPort'] == null ? undefined : json['DataPathPort'], - 'DefaultAddrPool': json['DefaultAddrPool'] == null ? undefined : json['DefaultAddrPool'], - 'ForceNewCluster': json['ForceNewCluster'] == null ? undefined : json['ForceNewCluster'], - 'SubnetSize': json['SubnetSize'] == null ? undefined : json['SubnetSize'], - 'Spec': json['Spec'] == null ? undefined : SwarmSpecFromJSON(json['Spec']), - }; +export function SwarmInitRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmInitRequest { + if (json == null) { + return json; + } + return { + ListenAddr: json["ListenAddr"] == null ? undefined : json["ListenAddr"], + AdvertiseAddr: json["AdvertiseAddr"] == null ? undefined : json["AdvertiseAddr"], + DataPathAddr: json["DataPathAddr"] == null ? undefined : json["DataPathAddr"], + DataPathPort: json["DataPathPort"] == null ? undefined : json["DataPathPort"], + DefaultAddrPool: json["DefaultAddrPool"] == null ? undefined : json["DefaultAddrPool"], + ForceNewCluster: json["ForceNewCluster"] == null ? undefined : json["ForceNewCluster"], + SubnetSize: json["SubnetSize"] == null ? undefined : json["SubnetSize"], + Spec: json["Spec"] == null ? undefined : SwarmSpecFromJSON(json["Spec"]), + }; } export function SwarmInitRequestToJSON(json: any): SwarmInitRequest { - return SwarmInitRequestToJSONTyped(json, false); + return SwarmInitRequestToJSONTyped(json, false); } -export function SwarmInitRequestToJSONTyped(value?: SwarmInitRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmInitRequestToJSONTyped( + value?: SwarmInitRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ListenAddr': value['ListenAddr'], - 'AdvertiseAddr': value['AdvertiseAddr'], - 'DataPathAddr': value['DataPathAddr'], - 'DataPathPort': value['DataPathPort'], - 'DefaultAddrPool': value['DefaultAddrPool'], - 'ForceNewCluster': value['ForceNewCluster'], - 'SubnetSize': value['SubnetSize'], - 'Spec': SwarmSpecToJSON(value['Spec']), - }; + return { + ListenAddr: value["ListenAddr"], + AdvertiseAddr: value["AdvertiseAddr"], + DataPathAddr: value["DataPathAddr"], + DataPathPort: value["DataPathPort"], + DefaultAddrPool: value["DefaultAddrPool"], + ForceNewCluster: value["ForceNewCluster"], + SubnetSize: value["SubnetSize"], + Spec: SwarmSpecToJSON(value["Spec"]), + }; } - diff --git a/src/clients/docker/models/SwarmJoinRequest.ts b/src/clients/docker/models/SwarmJoinRequest.ts index 272b1b5af8..2927c300e1 100644 --- a/src/clients/docker/models/SwarmJoinRequest.ts +++ b/src/clients/docker/models/SwarmJoinRequest.ts @@ -2,116 +2,119 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SwarmJoinRequest */ export interface SwarmJoinRequest { - /** - * Listen address used for inter-manager communication if the node - * gets promoted to manager, as well as determining the networking - * interface used for the VXLAN Tunnel Endpoint (VTEP). - * - * @type {string} - * @memberof SwarmJoinRequest - */ - ListenAddr?: string; - /** - * Externally reachable address advertised to other nodes. This - * can either be an address/port combination in the form - * `192.168.1.1:4567`, or an interface followed by a port number, - * like `eth0:4567`. If the port number is omitted, the port - * number from the listen address is used. If `AdvertiseAddr` is - * not specified, it will be automatically detected when possible. - * - * @type {string} - * @memberof SwarmJoinRequest - */ - AdvertiseAddr?: string; - /** - * Address or interface to use for data path traffic (format: - * ``), for example, `192.168.1.1`, or an interface, - * like `eth0`. If `DataPathAddr` is unspecified, the same address - * as `AdvertiseAddr` is used. - * - * The `DataPathAddr` specifies the address that global scope - * network drivers will publish towards other nodes in order to - * reach the containers running on this node. Using this parameter - * it is possible to separate the container data traffic from the - * management traffic of the cluster. - * - * @type {string} - * @memberof SwarmJoinRequest - */ - DataPathAddr?: string; - /** - * Addresses of manager nodes already participating in the swarm. - * - * @type {Array} - * @memberof SwarmJoinRequest - */ - RemoteAddrs?: Array; - /** - * Secret token for joining this swarm. - * @type {string} - * @memberof SwarmJoinRequest - */ - JoinToken?: string; + /** + * Listen address used for inter-manager communication if the node + * gets promoted to manager, as well as determining the networking + * interface used for the VXLAN Tunnel Endpoint (VTEP). + * + * @type {string} + * @memberof SwarmJoinRequest + */ + ListenAddr?: string; + /** + * Externally reachable address advertised to other nodes. This + * can either be an address/port combination in the form + * `192.168.1.1:4567`, or an interface followed by a port number, + * like `eth0:4567`. If the port number is omitted, the port + * number from the listen address is used. If `AdvertiseAddr` is + * not specified, it will be automatically detected when possible. + * + * @type {string} + * @memberof SwarmJoinRequest + */ + AdvertiseAddr?: string; + /** + * Address or interface to use for data path traffic (format: + * ``), for example, `192.168.1.1`, or an interface, + * like `eth0`. If `DataPathAddr` is unspecified, the same address + * as `AdvertiseAddr` is used. + * + * The `DataPathAddr` specifies the address that global scope + * network drivers will publish towards other nodes in order to + * reach the containers running on this node. Using this parameter + * it is possible to separate the container data traffic from the + * management traffic of the cluster. + * + * @type {string} + * @memberof SwarmJoinRequest + */ + DataPathAddr?: string; + /** + * Addresses of manager nodes already participating in the swarm. + * + * @type {Array} + * @memberof SwarmJoinRequest + */ + RemoteAddrs?: Array; + /** + * Secret token for joining this swarm. + * @type {string} + * @memberof SwarmJoinRequest + */ + JoinToken?: string; } /** * Check if a given object implements the SwarmJoinRequest interface. */ export function instanceOfSwarmJoinRequest(value: object): value is SwarmJoinRequest { - return true; + return true; } export function SwarmJoinRequestFromJSON(json: any): SwarmJoinRequest { - return SwarmJoinRequestFromJSONTyped(json, false); + return SwarmJoinRequestFromJSONTyped(json, false); } -export function SwarmJoinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmJoinRequest { - if (json == null) { - return json; - } - return { - - 'ListenAddr': json['ListenAddr'] == null ? undefined : json['ListenAddr'], - 'AdvertiseAddr': json['AdvertiseAddr'] == null ? undefined : json['AdvertiseAddr'], - 'DataPathAddr': json['DataPathAddr'] == null ? undefined : json['DataPathAddr'], - 'RemoteAddrs': json['RemoteAddrs'] == null ? undefined : json['RemoteAddrs'], - 'JoinToken': json['JoinToken'] == null ? undefined : json['JoinToken'], - }; +export function SwarmJoinRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmJoinRequest { + if (json == null) { + return json; + } + return { + ListenAddr: json["ListenAddr"] == null ? undefined : json["ListenAddr"], + AdvertiseAddr: json["AdvertiseAddr"] == null ? undefined : json["AdvertiseAddr"], + DataPathAddr: json["DataPathAddr"] == null ? undefined : json["DataPathAddr"], + RemoteAddrs: json["RemoteAddrs"] == null ? undefined : json["RemoteAddrs"], + JoinToken: json["JoinToken"] == null ? undefined : json["JoinToken"], + }; } export function SwarmJoinRequestToJSON(json: any): SwarmJoinRequest { - return SwarmJoinRequestToJSONTyped(json, false); + return SwarmJoinRequestToJSONTyped(json, false); } -export function SwarmJoinRequestToJSONTyped(value?: SwarmJoinRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmJoinRequestToJSONTyped( + value?: SwarmJoinRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ListenAddr': value['ListenAddr'], - 'AdvertiseAddr': value['AdvertiseAddr'], - 'DataPathAddr': value['DataPathAddr'], - 'RemoteAddrs': value['RemoteAddrs'], - 'JoinToken': value['JoinToken'], - }; + return { + ListenAddr: value["ListenAddr"], + AdvertiseAddr: value["AdvertiseAddr"], + DataPathAddr: value["DataPathAddr"], + RemoteAddrs: value["RemoteAddrs"], + JoinToken: value["JoinToken"], + }; } - diff --git a/src/clients/docker/models/SwarmSpec.ts b/src/clients/docker/models/SwarmSpec.ts index 56b6014945..60562ebdbe 100644 --- a/src/clients/docker/models/SwarmSpec.ts +++ b/src/clients/docker/models/SwarmSpec.ts @@ -2,59 +2,59 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SwarmSpecDispatcher } from './SwarmSpecDispatcher'; +import { mapValues } from "../runtime"; +import type { SwarmSpecDispatcher } from "./SwarmSpecDispatcher"; import { - SwarmSpecDispatcherFromJSON, - SwarmSpecDispatcherFromJSONTyped, - SwarmSpecDispatcherToJSON, - SwarmSpecDispatcherToJSONTyped, -} from './SwarmSpecDispatcher'; -import type { SwarmSpecOrchestration } from './SwarmSpecOrchestration'; + SwarmSpecDispatcherFromJSON, + SwarmSpecDispatcherFromJSONTyped, + SwarmSpecDispatcherToJSON, + SwarmSpecDispatcherToJSONTyped, +} from "./SwarmSpecDispatcher"; +import type { SwarmSpecOrchestration } from "./SwarmSpecOrchestration"; import { - SwarmSpecOrchestrationFromJSON, - SwarmSpecOrchestrationFromJSONTyped, - SwarmSpecOrchestrationToJSON, - SwarmSpecOrchestrationToJSONTyped, -} from './SwarmSpecOrchestration'; -import type { SwarmSpecCAConfig } from './SwarmSpecCAConfig'; + SwarmSpecOrchestrationFromJSON, + SwarmSpecOrchestrationFromJSONTyped, + SwarmSpecOrchestrationToJSON, + SwarmSpecOrchestrationToJSONTyped, +} from "./SwarmSpecOrchestration"; +import type { SwarmSpecCAConfig } from "./SwarmSpecCAConfig"; import { - SwarmSpecCAConfigFromJSON, - SwarmSpecCAConfigFromJSONTyped, - SwarmSpecCAConfigToJSON, - SwarmSpecCAConfigToJSONTyped, -} from './SwarmSpecCAConfig'; -import type { SwarmSpecTaskDefaults } from './SwarmSpecTaskDefaults'; + SwarmSpecCAConfigFromJSON, + SwarmSpecCAConfigFromJSONTyped, + SwarmSpecCAConfigToJSON, + SwarmSpecCAConfigToJSONTyped, +} from "./SwarmSpecCAConfig"; +import type { SwarmSpecTaskDefaults } from "./SwarmSpecTaskDefaults"; import { - SwarmSpecTaskDefaultsFromJSON, - SwarmSpecTaskDefaultsFromJSONTyped, - SwarmSpecTaskDefaultsToJSON, - SwarmSpecTaskDefaultsToJSONTyped, -} from './SwarmSpecTaskDefaults'; -import type { SwarmSpecRaft } from './SwarmSpecRaft'; + SwarmSpecTaskDefaultsFromJSON, + SwarmSpecTaskDefaultsFromJSONTyped, + SwarmSpecTaskDefaultsToJSON, + SwarmSpecTaskDefaultsToJSONTyped, +} from "./SwarmSpecTaskDefaults"; +import type { SwarmSpecRaft } from "./SwarmSpecRaft"; import { - SwarmSpecRaftFromJSON, - SwarmSpecRaftFromJSONTyped, - SwarmSpecRaftToJSON, - SwarmSpecRaftToJSONTyped, -} from './SwarmSpecRaft'; -import type { SwarmSpecEncryptionConfig } from './SwarmSpecEncryptionConfig'; + SwarmSpecRaftFromJSON, + SwarmSpecRaftFromJSONTyped, + SwarmSpecRaftToJSON, + SwarmSpecRaftToJSONTyped, +} from "./SwarmSpecRaft"; +import type { SwarmSpecEncryptionConfig } from "./SwarmSpecEncryptionConfig"; import { - SwarmSpecEncryptionConfigFromJSON, - SwarmSpecEncryptionConfigFromJSONTyped, - SwarmSpecEncryptionConfigToJSON, - SwarmSpecEncryptionConfigToJSONTyped, -} from './SwarmSpecEncryptionConfig'; + SwarmSpecEncryptionConfigFromJSON, + SwarmSpecEncryptionConfigFromJSONTyped, + SwarmSpecEncryptionConfigToJSON, + SwarmSpecEncryptionConfigToJSONTyped, +} from "./SwarmSpecEncryptionConfig"; /** * User modifiable swarm configuration. @@ -62,103 +62,113 @@ import { * @interface SwarmSpec */ export interface SwarmSpec { - /** - * Name of the swarm. - * @type {string} - * @memberof SwarmSpec - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof SwarmSpec - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {SwarmSpecOrchestration} - * @memberof SwarmSpec - */ - Orchestration?: SwarmSpecOrchestration | null; - /** - * - * @type {SwarmSpecRaft} - * @memberof SwarmSpec - */ - Raft?: SwarmSpecRaft; - /** - * - * @type {SwarmSpecDispatcher} - * @memberof SwarmSpec - */ - Dispatcher?: SwarmSpecDispatcher | null; - /** - * - * @type {SwarmSpecCAConfig} - * @memberof SwarmSpec - */ - CAConfig?: SwarmSpecCAConfig | null; - /** - * - * @type {SwarmSpecEncryptionConfig} - * @memberof SwarmSpec - */ - EncryptionConfig?: SwarmSpecEncryptionConfig; - /** - * - * @type {SwarmSpecTaskDefaults} - * @memberof SwarmSpec - */ - TaskDefaults?: SwarmSpecTaskDefaults; + /** + * Name of the swarm. + * @type {string} + * @memberof SwarmSpec + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof SwarmSpec + */ + Labels?: { [key: string]: string }; + /** + * + * @type {SwarmSpecOrchestration} + * @memberof SwarmSpec + */ + Orchestration?: SwarmSpecOrchestration | null; + /** + * + * @type {SwarmSpecRaft} + * @memberof SwarmSpec + */ + Raft?: SwarmSpecRaft; + /** + * + * @type {SwarmSpecDispatcher} + * @memberof SwarmSpec + */ + Dispatcher?: SwarmSpecDispatcher | null; + /** + * + * @type {SwarmSpecCAConfig} + * @memberof SwarmSpec + */ + CAConfig?: SwarmSpecCAConfig | null; + /** + * + * @type {SwarmSpecEncryptionConfig} + * @memberof SwarmSpec + */ + EncryptionConfig?: SwarmSpecEncryptionConfig; + /** + * + * @type {SwarmSpecTaskDefaults} + * @memberof SwarmSpec + */ + TaskDefaults?: SwarmSpecTaskDefaults; } /** * Check if a given object implements the SwarmSpec interface. */ export function instanceOfSwarmSpec(value: object): value is SwarmSpec { - return true; + return true; } export function SwarmSpecFromJSON(json: any): SwarmSpec { - return SwarmSpecFromJSONTyped(json, false); + return SwarmSpecFromJSONTyped(json, false); } export function SwarmSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpec { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Orchestration': json['Orchestration'] == null ? undefined : SwarmSpecOrchestrationFromJSON(json['Orchestration']), - 'Raft': json['Raft'] == null ? undefined : SwarmSpecRaftFromJSON(json['Raft']), - 'Dispatcher': json['Dispatcher'] == null ? undefined : SwarmSpecDispatcherFromJSON(json['Dispatcher']), - 'CAConfig': json['CAConfig'] == null ? undefined : SwarmSpecCAConfigFromJSON(json['CAConfig']), - 'EncryptionConfig': json['EncryptionConfig'] == null ? undefined : SwarmSpecEncryptionConfigFromJSON(json['EncryptionConfig']), - 'TaskDefaults': json['TaskDefaults'] == null ? undefined : SwarmSpecTaskDefaultsFromJSON(json['TaskDefaults']), - }; + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Orchestration: + json["Orchestration"] == null + ? undefined + : SwarmSpecOrchestrationFromJSON(json["Orchestration"]), + Raft: json["Raft"] == null ? undefined : SwarmSpecRaftFromJSON(json["Raft"]), + Dispatcher: + json["Dispatcher"] == null ? undefined : SwarmSpecDispatcherFromJSON(json["Dispatcher"]), + CAConfig: json["CAConfig"] == null ? undefined : SwarmSpecCAConfigFromJSON(json["CAConfig"]), + EncryptionConfig: + json["EncryptionConfig"] == null + ? undefined + : SwarmSpecEncryptionConfigFromJSON(json["EncryptionConfig"]), + TaskDefaults: + json["TaskDefaults"] == null + ? undefined + : SwarmSpecTaskDefaultsFromJSON(json["TaskDefaults"]), + }; } export function SwarmSpecToJSON(json: any): SwarmSpec { - return SwarmSpecToJSONTyped(json, false); + return SwarmSpecToJSONTyped(json, false); } -export function SwarmSpecToJSONTyped(value?: SwarmSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecToJSONTyped( + value?: SwarmSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Orchestration': SwarmSpecOrchestrationToJSON(value['Orchestration']), - 'Raft': SwarmSpecRaftToJSON(value['Raft']), - 'Dispatcher': SwarmSpecDispatcherToJSON(value['Dispatcher']), - 'CAConfig': SwarmSpecCAConfigToJSON(value['CAConfig']), - 'EncryptionConfig': SwarmSpecEncryptionConfigToJSON(value['EncryptionConfig']), - 'TaskDefaults': SwarmSpecTaskDefaultsToJSON(value['TaskDefaults']), - }; + return { + Name: value["Name"], + Labels: value["Labels"], + Orchestration: SwarmSpecOrchestrationToJSON(value["Orchestration"]), + Raft: SwarmSpecRaftToJSON(value["Raft"]), + Dispatcher: SwarmSpecDispatcherToJSON(value["Dispatcher"]), + CAConfig: SwarmSpecCAConfigToJSON(value["CAConfig"]), + EncryptionConfig: SwarmSpecEncryptionConfigToJSON(value["EncryptionConfig"]), + TaskDefaults: SwarmSpecTaskDefaultsToJSON(value["TaskDefaults"]), + }; } - diff --git a/src/clients/docker/models/SwarmSpecCAConfig.ts b/src/clients/docker/models/SwarmSpecCAConfig.ts index 0e2eede73b..fa009cfa96 100644 --- a/src/clients/docker/models/SwarmSpecCAConfig.ts +++ b/src/clients/docker/models/SwarmSpecCAConfig.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SwarmSpecCAConfigExternalCAsInner } from './SwarmSpecCAConfigExternalCAsInner'; +import { mapValues } from "../runtime"; +import type { SwarmSpecCAConfigExternalCAsInner } from "./SwarmSpecCAConfigExternalCAsInner"; import { - SwarmSpecCAConfigExternalCAsInnerFromJSON, - SwarmSpecCAConfigExternalCAsInnerFromJSONTyped, - SwarmSpecCAConfigExternalCAsInnerToJSON, - SwarmSpecCAConfigExternalCAsInnerToJSONTyped, -} from './SwarmSpecCAConfigExternalCAsInner'; + SwarmSpecCAConfigExternalCAsInnerFromJSON, + SwarmSpecCAConfigExternalCAsInnerFromJSONTyped, + SwarmSpecCAConfigExternalCAsInnerToJSON, + SwarmSpecCAConfigExternalCAsInnerToJSONTyped, +} from "./SwarmSpecCAConfigExternalCAsInner"; /** * CA configuration. @@ -27,88 +27,97 @@ import { * @interface SwarmSpecCAConfig */ export interface SwarmSpecCAConfig { - /** - * The duration node certificates are issued for. - * @type {number} - * @memberof SwarmSpecCAConfig - */ - NodeCertExpiry?: number; - /** - * Configuration for forwarding signing requests to an external - * certificate authority. - * - * @type {Array} - * @memberof SwarmSpecCAConfig - */ - ExternalCAs?: Array; - /** - * The desired signing CA certificate for all swarm node TLS leaf - * certificates, in PEM format. - * - * @type {string} - * @memberof SwarmSpecCAConfig - */ - SigningCACert?: string; - /** - * The desired signing CA key for all swarm node TLS leaf certificates, - * in PEM format. - * - * @type {string} - * @memberof SwarmSpecCAConfig - */ - SigningCAKey?: string; - /** - * An integer whose purpose is to force swarm to generate a new - * signing CA certificate and key, if none have been specified in - * `SigningCACert` and `SigningCAKey` - * - * @type {number} - * @memberof SwarmSpecCAConfig - */ - ForceRotate?: number; + /** + * The duration node certificates are issued for. + * @type {number} + * @memberof SwarmSpecCAConfig + */ + NodeCertExpiry?: number; + /** + * Configuration for forwarding signing requests to an external + * certificate authority. + * + * @type {Array} + * @memberof SwarmSpecCAConfig + */ + ExternalCAs?: Array; + /** + * The desired signing CA certificate for all swarm node TLS leaf + * certificates, in PEM format. + * + * @type {string} + * @memberof SwarmSpecCAConfig + */ + SigningCACert?: string; + /** + * The desired signing CA key for all swarm node TLS leaf certificates, + * in PEM format. + * + * @type {string} + * @memberof SwarmSpecCAConfig + */ + SigningCAKey?: string; + /** + * An integer whose purpose is to force swarm to generate a new + * signing CA certificate and key, if none have been specified in + * `SigningCACert` and `SigningCAKey` + * + * @type {number} + * @memberof SwarmSpecCAConfig + */ + ForceRotate?: number; } /** * Check if a given object implements the SwarmSpecCAConfig interface. */ export function instanceOfSwarmSpecCAConfig(value: object): value is SwarmSpecCAConfig { - return true; + return true; } export function SwarmSpecCAConfigFromJSON(json: any): SwarmSpecCAConfig { - return SwarmSpecCAConfigFromJSONTyped(json, false); + return SwarmSpecCAConfigFromJSONTyped(json, false); } -export function SwarmSpecCAConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecCAConfig { - if (json == null) { - return json; - } - return { - - 'NodeCertExpiry': json['NodeCertExpiry'] == null ? undefined : json['NodeCertExpiry'], - 'ExternalCAs': json['ExternalCAs'] == null ? undefined : ((json['ExternalCAs'] as Array).map(SwarmSpecCAConfigExternalCAsInnerFromJSON)), - 'SigningCACert': json['SigningCACert'] == null ? undefined : json['SigningCACert'], - 'SigningCAKey': json['SigningCAKey'] == null ? undefined : json['SigningCAKey'], - 'ForceRotate': json['ForceRotate'] == null ? undefined : json['ForceRotate'], - }; +export function SwarmSpecCAConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecCAConfig { + if (json == null) { + return json; + } + return { + NodeCertExpiry: json["NodeCertExpiry"] == null ? undefined : json["NodeCertExpiry"], + ExternalCAs: + json["ExternalCAs"] == null + ? undefined + : (json["ExternalCAs"] as Array).map(SwarmSpecCAConfigExternalCAsInnerFromJSON), + SigningCACert: json["SigningCACert"] == null ? undefined : json["SigningCACert"], + SigningCAKey: json["SigningCAKey"] == null ? undefined : json["SigningCAKey"], + ForceRotate: json["ForceRotate"] == null ? undefined : json["ForceRotate"], + }; } export function SwarmSpecCAConfigToJSON(json: any): SwarmSpecCAConfig { - return SwarmSpecCAConfigToJSONTyped(json, false); + return SwarmSpecCAConfigToJSONTyped(json, false); } -export function SwarmSpecCAConfigToJSONTyped(value?: SwarmSpecCAConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecCAConfigToJSONTyped( + value?: SwarmSpecCAConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'NodeCertExpiry': value['NodeCertExpiry'], - 'ExternalCAs': value['ExternalCAs'] == null ? undefined : ((value['ExternalCAs'] as Array).map(SwarmSpecCAConfigExternalCAsInnerToJSON)), - 'SigningCACert': value['SigningCACert'], - 'SigningCAKey': value['SigningCAKey'], - 'ForceRotate': value['ForceRotate'], - }; + return { + NodeCertExpiry: value["NodeCertExpiry"], + ExternalCAs: + value["ExternalCAs"] == null + ? undefined + : (value["ExternalCAs"] as Array).map(SwarmSpecCAConfigExternalCAsInnerToJSON), + SigningCACert: value["SigningCACert"], + SigningCAKey: value["SigningCAKey"], + ForceRotate: value["ForceRotate"], + }; } - diff --git a/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts b/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts index 6ee653408e..18becdd375 100644 --- a/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts +++ b/src/clients/docker/models/SwarmSpecCAConfigExternalCAsInner.ts @@ -2,105 +2,113 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SwarmSpecCAConfigExternalCAsInner */ export interface SwarmSpecCAConfigExternalCAsInner { - /** - * Protocol for communication with the external CA (currently - * only `cfssl` is supported). - * - * @type {string} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - Protocol?: SwarmSpecCAConfigExternalCAsInnerProtocolEnum; - /** - * URL where certificate signing requests should be sent. - * - * @type {string} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - URL?: string; - /** - * An object with key/value pairs that are interpreted as - * protocol-specific options for the external CA driver. - * - * @type {{ [key: string]: string; }} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - Options?: { [key: string]: string; }; - /** - * The root CA certificate (in PEM format) this external CA uses - * to issue TLS certificates (assumed to be to the current swarm - * root CA certificate if not provided). - * - * @type {string} - * @memberof SwarmSpecCAConfigExternalCAsInner - */ - CACert?: string; + /** + * Protocol for communication with the external CA (currently + * only `cfssl` is supported). + * + * @type {string} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + Protocol?: SwarmSpecCAConfigExternalCAsInnerProtocolEnum; + /** + * URL where certificate signing requests should be sent. + * + * @type {string} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + URL?: string; + /** + * An object with key/value pairs that are interpreted as + * protocol-specific options for the external CA driver. + * + * @type {{ [key: string]: string; }} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + Options?: { [key: string]: string }; + /** + * The root CA certificate (in PEM format) this external CA uses + * to issue TLS certificates (assumed to be to the current swarm + * root CA certificate if not provided). + * + * @type {string} + * @memberof SwarmSpecCAConfigExternalCAsInner + */ + CACert?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SwarmSpecCAConfigExternalCAsInnerProtocolEnum { - Cfssl = 'cfssl' + Cfssl = "cfssl", } - /** * Check if a given object implements the SwarmSpecCAConfigExternalCAsInner interface. */ -export function instanceOfSwarmSpecCAConfigExternalCAsInner(value: object): value is SwarmSpecCAConfigExternalCAsInner { - return true; +export function instanceOfSwarmSpecCAConfigExternalCAsInner( + value: object, +): value is SwarmSpecCAConfigExternalCAsInner { + return true; } -export function SwarmSpecCAConfigExternalCAsInnerFromJSON(json: any): SwarmSpecCAConfigExternalCAsInner { - return SwarmSpecCAConfigExternalCAsInnerFromJSONTyped(json, false); +export function SwarmSpecCAConfigExternalCAsInnerFromJSON( + json: any, +): SwarmSpecCAConfigExternalCAsInner { + return SwarmSpecCAConfigExternalCAsInnerFromJSONTyped(json, false); } -export function SwarmSpecCAConfigExternalCAsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecCAConfigExternalCAsInner { - if (json == null) { - return json; - } - return { - - 'Protocol': json['Protocol'] == null ? undefined : json['Protocol'], - 'URL': json['URL'] == null ? undefined : json['URL'], - 'Options': json['Options'] == null ? undefined : json['Options'], - 'CACert': json['CACert'] == null ? undefined : json['CACert'], - }; +export function SwarmSpecCAConfigExternalCAsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecCAConfigExternalCAsInner { + if (json == null) { + return json; + } + return { + Protocol: json["Protocol"] == null ? undefined : json["Protocol"], + URL: json["URL"] == null ? undefined : json["URL"], + Options: json["Options"] == null ? undefined : json["Options"], + CACert: json["CACert"] == null ? undefined : json["CACert"], + }; } -export function SwarmSpecCAConfigExternalCAsInnerToJSON(json: any): SwarmSpecCAConfigExternalCAsInner { - return SwarmSpecCAConfigExternalCAsInnerToJSONTyped(json, false); +export function SwarmSpecCAConfigExternalCAsInnerToJSON( + json: any, +): SwarmSpecCAConfigExternalCAsInner { + return SwarmSpecCAConfigExternalCAsInnerToJSONTyped(json, false); } -export function SwarmSpecCAConfigExternalCAsInnerToJSONTyped(value?: SwarmSpecCAConfigExternalCAsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecCAConfigExternalCAsInnerToJSONTyped( + value?: SwarmSpecCAConfigExternalCAsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Protocol': value['Protocol'], - 'URL': value['URL'], - 'Options': value['Options'], - 'CACert': value['CACert'], - }; + return { + Protocol: value["Protocol"], + URL: value["URL"], + Options: value["Options"], + CACert: value["CACert"], + }; } - diff --git a/src/clients/docker/models/SwarmSpecDispatcher.ts b/src/clients/docker/models/SwarmSpecDispatcher.ts index a2314d7682..bcbc8e9fa5 100644 --- a/src/clients/docker/models/SwarmSpecDispatcher.ts +++ b/src/clients/docker/models/SwarmSpecDispatcher.ts @@ -2,65 +2,68 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Dispatcher configuration. * @export * @interface SwarmSpecDispatcher */ export interface SwarmSpecDispatcher { - /** - * The delay for an agent to send a heartbeat to the dispatcher. - * - * @type {number} - * @memberof SwarmSpecDispatcher - */ - HeartbeatPeriod?: number; + /** + * The delay for an agent to send a heartbeat to the dispatcher. + * + * @type {number} + * @memberof SwarmSpecDispatcher + */ + HeartbeatPeriod?: number; } /** * Check if a given object implements the SwarmSpecDispatcher interface. */ export function instanceOfSwarmSpecDispatcher(value: object): value is SwarmSpecDispatcher { - return true; + return true; } export function SwarmSpecDispatcherFromJSON(json: any): SwarmSpecDispatcher { - return SwarmSpecDispatcherFromJSONTyped(json, false); + return SwarmSpecDispatcherFromJSONTyped(json, false); } -export function SwarmSpecDispatcherFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecDispatcher { - if (json == null) { - return json; - } - return { - - 'HeartbeatPeriod': json['HeartbeatPeriod'] == null ? undefined : json['HeartbeatPeriod'], - }; +export function SwarmSpecDispatcherFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecDispatcher { + if (json == null) { + return json; + } + return { + HeartbeatPeriod: json["HeartbeatPeriod"] == null ? undefined : json["HeartbeatPeriod"], + }; } export function SwarmSpecDispatcherToJSON(json: any): SwarmSpecDispatcher { - return SwarmSpecDispatcherToJSONTyped(json, false); + return SwarmSpecDispatcherToJSONTyped(json, false); } -export function SwarmSpecDispatcherToJSONTyped(value?: SwarmSpecDispatcher | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecDispatcherToJSONTyped( + value?: SwarmSpecDispatcher | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'HeartbeatPeriod': value['HeartbeatPeriod'], - }; + return { + HeartbeatPeriod: value["HeartbeatPeriod"], + }; } - diff --git a/src/clients/docker/models/SwarmSpecEncryptionConfig.ts b/src/clients/docker/models/SwarmSpecEncryptionConfig.ts index a0301bdc60..bc25caa4c8 100644 --- a/src/clients/docker/models/SwarmSpecEncryptionConfig.ts +++ b/src/clients/docker/models/SwarmSpecEncryptionConfig.ts @@ -2,66 +2,71 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Parameters related to encryption-at-rest. * @export * @interface SwarmSpecEncryptionConfig */ export interface SwarmSpecEncryptionConfig { - /** - * If set, generate a key and use it to lock data stored on the - * managers. - * - * @type {boolean} - * @memberof SwarmSpecEncryptionConfig - */ - AutoLockManagers?: boolean; + /** + * If set, generate a key and use it to lock data stored on the + * managers. + * + * @type {boolean} + * @memberof SwarmSpecEncryptionConfig + */ + AutoLockManagers?: boolean; } /** * Check if a given object implements the SwarmSpecEncryptionConfig interface. */ -export function instanceOfSwarmSpecEncryptionConfig(value: object): value is SwarmSpecEncryptionConfig { - return true; +export function instanceOfSwarmSpecEncryptionConfig( + value: object, +): value is SwarmSpecEncryptionConfig { + return true; } export function SwarmSpecEncryptionConfigFromJSON(json: any): SwarmSpecEncryptionConfig { - return SwarmSpecEncryptionConfigFromJSONTyped(json, false); + return SwarmSpecEncryptionConfigFromJSONTyped(json, false); } -export function SwarmSpecEncryptionConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecEncryptionConfig { - if (json == null) { - return json; - } - return { - - 'AutoLockManagers': json['AutoLockManagers'] == null ? undefined : json['AutoLockManagers'], - }; +export function SwarmSpecEncryptionConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecEncryptionConfig { + if (json == null) { + return json; + } + return { + AutoLockManagers: json["AutoLockManagers"] == null ? undefined : json["AutoLockManagers"], + }; } export function SwarmSpecEncryptionConfigToJSON(json: any): SwarmSpecEncryptionConfig { - return SwarmSpecEncryptionConfigToJSONTyped(json, false); + return SwarmSpecEncryptionConfigToJSONTyped(json, false); } -export function SwarmSpecEncryptionConfigToJSONTyped(value?: SwarmSpecEncryptionConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecEncryptionConfigToJSONTyped( + value?: SwarmSpecEncryptionConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'AutoLockManagers': value['AutoLockManagers'], - }; + return { + AutoLockManagers: value["AutoLockManagers"], + }; } - diff --git a/src/clients/docker/models/SwarmSpecOrchestration.ts b/src/clients/docker/models/SwarmSpecOrchestration.ts index ec9194bdc5..55a38da927 100644 --- a/src/clients/docker/models/SwarmSpecOrchestration.ts +++ b/src/clients/docker/models/SwarmSpecOrchestration.ts @@ -2,66 +2,70 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Orchestration configuration. * @export * @interface SwarmSpecOrchestration */ export interface SwarmSpecOrchestration { - /** - * The number of historic tasks to keep per instance or node. If - * negative, never remove completed or failed tasks. - * - * @type {number} - * @memberof SwarmSpecOrchestration - */ - TaskHistoryRetentionLimit?: number; + /** + * The number of historic tasks to keep per instance or node. If + * negative, never remove completed or failed tasks. + * + * @type {number} + * @memberof SwarmSpecOrchestration + */ + TaskHistoryRetentionLimit?: number; } /** * Check if a given object implements the SwarmSpecOrchestration interface. */ export function instanceOfSwarmSpecOrchestration(value: object): value is SwarmSpecOrchestration { - return true; + return true; } export function SwarmSpecOrchestrationFromJSON(json: any): SwarmSpecOrchestration { - return SwarmSpecOrchestrationFromJSONTyped(json, false); + return SwarmSpecOrchestrationFromJSONTyped(json, false); } -export function SwarmSpecOrchestrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecOrchestration { - if (json == null) { - return json; - } - return { - - 'TaskHistoryRetentionLimit': json['TaskHistoryRetentionLimit'] == null ? undefined : json['TaskHistoryRetentionLimit'], - }; +export function SwarmSpecOrchestrationFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecOrchestration { + if (json == null) { + return json; + } + return { + TaskHistoryRetentionLimit: + json["TaskHistoryRetentionLimit"] == null ? undefined : json["TaskHistoryRetentionLimit"], + }; } export function SwarmSpecOrchestrationToJSON(json: any): SwarmSpecOrchestration { - return SwarmSpecOrchestrationToJSONTyped(json, false); + return SwarmSpecOrchestrationToJSONTyped(json, false); } -export function SwarmSpecOrchestrationToJSONTyped(value?: SwarmSpecOrchestration | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecOrchestrationToJSONTyped( + value?: SwarmSpecOrchestration | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'TaskHistoryRetentionLimit': value['TaskHistoryRetentionLimit'], - }; + return { + TaskHistoryRetentionLimit: value["TaskHistoryRetentionLimit"], + }; } - diff --git a/src/clients/docker/models/SwarmSpecRaft.ts b/src/clients/docker/models/SwarmSpecRaft.ts index ffa7b1747d..8472c1e361 100644 --- a/src/clients/docker/models/SwarmSpecRaft.ts +++ b/src/clients/docker/models/SwarmSpecRaft.ts @@ -2,110 +2,111 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Raft configuration. * @export * @interface SwarmSpecRaft */ export interface SwarmSpecRaft { - /** - * The number of log entries between snapshots. - * @type {number} - * @memberof SwarmSpecRaft - */ - SnapshotInterval?: number; - /** - * The number of snapshots to keep beyond the current snapshot. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - KeepOldSnapshots?: number; - /** - * The number of log entries to keep around to sync up slow followers - * after a snapshot is created. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - LogEntriesForSlowFollowers?: number; - /** - * The number of ticks that a follower will wait for a message from - * the leader before becoming a candidate and starting an election. - * `ElectionTick` must be greater than `HeartbeatTick`. - * - * A tick currently defaults to one second, so these translate - * directly to seconds currently, but this is NOT guaranteed. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - ElectionTick?: number; - /** - * The number of ticks between heartbeats. Every HeartbeatTick ticks, - * the leader will send a heartbeat to the followers. - * - * A tick currently defaults to one second, so these translate - * directly to seconds currently, but this is NOT guaranteed. - * - * @type {number} - * @memberof SwarmSpecRaft - */ - HeartbeatTick?: number; + /** + * The number of log entries between snapshots. + * @type {number} + * @memberof SwarmSpecRaft + */ + SnapshotInterval?: number; + /** + * The number of snapshots to keep beyond the current snapshot. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + KeepOldSnapshots?: number; + /** + * The number of log entries to keep around to sync up slow followers + * after a snapshot is created. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + LogEntriesForSlowFollowers?: number; + /** + * The number of ticks that a follower will wait for a message from + * the leader before becoming a candidate and starting an election. + * `ElectionTick` must be greater than `HeartbeatTick`. + * + * A tick currently defaults to one second, so these translate + * directly to seconds currently, but this is NOT guaranteed. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + ElectionTick?: number; + /** + * The number of ticks between heartbeats. Every HeartbeatTick ticks, + * the leader will send a heartbeat to the followers. + * + * A tick currently defaults to one second, so these translate + * directly to seconds currently, but this is NOT guaranteed. + * + * @type {number} + * @memberof SwarmSpecRaft + */ + HeartbeatTick?: number; } /** * Check if a given object implements the SwarmSpecRaft interface. */ export function instanceOfSwarmSpecRaft(value: object): value is SwarmSpecRaft { - return true; + return true; } export function SwarmSpecRaftFromJSON(json: any): SwarmSpecRaft { - return SwarmSpecRaftFromJSONTyped(json, false); + return SwarmSpecRaftFromJSONTyped(json, false); } export function SwarmSpecRaftFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecRaft { - if (json == null) { - return json; - } - return { - - 'SnapshotInterval': json['SnapshotInterval'] == null ? undefined : json['SnapshotInterval'], - 'KeepOldSnapshots': json['KeepOldSnapshots'] == null ? undefined : json['KeepOldSnapshots'], - 'LogEntriesForSlowFollowers': json['LogEntriesForSlowFollowers'] == null ? undefined : json['LogEntriesForSlowFollowers'], - 'ElectionTick': json['ElectionTick'] == null ? undefined : json['ElectionTick'], - 'HeartbeatTick': json['HeartbeatTick'] == null ? undefined : json['HeartbeatTick'], - }; + if (json == null) { + return json; + } + return { + SnapshotInterval: json["SnapshotInterval"] == null ? undefined : json["SnapshotInterval"], + KeepOldSnapshots: json["KeepOldSnapshots"] == null ? undefined : json["KeepOldSnapshots"], + LogEntriesForSlowFollowers: + json["LogEntriesForSlowFollowers"] == null ? undefined : json["LogEntriesForSlowFollowers"], + ElectionTick: json["ElectionTick"] == null ? undefined : json["ElectionTick"], + HeartbeatTick: json["HeartbeatTick"] == null ? undefined : json["HeartbeatTick"], + }; } export function SwarmSpecRaftToJSON(json: any): SwarmSpecRaft { - return SwarmSpecRaftToJSONTyped(json, false); + return SwarmSpecRaftToJSONTyped(json, false); } -export function SwarmSpecRaftToJSONTyped(value?: SwarmSpecRaft | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecRaftToJSONTyped( + value?: SwarmSpecRaft | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'SnapshotInterval': value['SnapshotInterval'], - 'KeepOldSnapshots': value['KeepOldSnapshots'], - 'LogEntriesForSlowFollowers': value['LogEntriesForSlowFollowers'], - 'ElectionTick': value['ElectionTick'], - 'HeartbeatTick': value['HeartbeatTick'], - }; + return { + SnapshotInterval: value["SnapshotInterval"], + KeepOldSnapshots: value["KeepOldSnapshots"], + LogEntriesForSlowFollowers: value["LogEntriesForSlowFollowers"], + ElectionTick: value["ElectionTick"], + HeartbeatTick: value["HeartbeatTick"], + }; } - diff --git a/src/clients/docker/models/SwarmSpecTaskDefaults.ts b/src/clients/docker/models/SwarmSpecTaskDefaults.ts index 704a77dbcc..e4d030aaf6 100644 --- a/src/clients/docker/models/SwarmSpecTaskDefaults.ts +++ b/src/clients/docker/models/SwarmSpecTaskDefaults.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SwarmSpecTaskDefaultsLogDriver } from './SwarmSpecTaskDefaultsLogDriver'; +import { mapValues } from "../runtime"; +import type { SwarmSpecTaskDefaultsLogDriver } from "./SwarmSpecTaskDefaultsLogDriver"; import { - SwarmSpecTaskDefaultsLogDriverFromJSON, - SwarmSpecTaskDefaultsLogDriverFromJSONTyped, - SwarmSpecTaskDefaultsLogDriverToJSON, - SwarmSpecTaskDefaultsLogDriverToJSONTyped, -} from './SwarmSpecTaskDefaultsLogDriver'; + SwarmSpecTaskDefaultsLogDriverFromJSON, + SwarmSpecTaskDefaultsLogDriverFromJSONTyped, + SwarmSpecTaskDefaultsLogDriverToJSON, + SwarmSpecTaskDefaultsLogDriverToJSONTyped, +} from "./SwarmSpecTaskDefaultsLogDriver"; /** * Defaults for creating tasks in this cluster. @@ -27,47 +27,53 @@ import { * @interface SwarmSpecTaskDefaults */ export interface SwarmSpecTaskDefaults { - /** - * - * @type {SwarmSpecTaskDefaultsLogDriver} - * @memberof SwarmSpecTaskDefaults - */ - LogDriver?: SwarmSpecTaskDefaultsLogDriver; + /** + * + * @type {SwarmSpecTaskDefaultsLogDriver} + * @memberof SwarmSpecTaskDefaults + */ + LogDriver?: SwarmSpecTaskDefaultsLogDriver; } /** * Check if a given object implements the SwarmSpecTaskDefaults interface. */ export function instanceOfSwarmSpecTaskDefaults(value: object): value is SwarmSpecTaskDefaults { - return true; + return true; } export function SwarmSpecTaskDefaultsFromJSON(json: any): SwarmSpecTaskDefaults { - return SwarmSpecTaskDefaultsFromJSONTyped(json, false); + return SwarmSpecTaskDefaultsFromJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecTaskDefaults { - if (json == null) { - return json; - } - return { - - 'LogDriver': json['LogDriver'] == null ? undefined : SwarmSpecTaskDefaultsLogDriverFromJSON(json['LogDriver']), - }; +export function SwarmSpecTaskDefaultsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecTaskDefaults { + if (json == null) { + return json; + } + return { + LogDriver: + json["LogDriver"] == null + ? undefined + : SwarmSpecTaskDefaultsLogDriverFromJSON(json["LogDriver"]), + }; } export function SwarmSpecTaskDefaultsToJSON(json: any): SwarmSpecTaskDefaults { - return SwarmSpecTaskDefaultsToJSONTyped(json, false); + return SwarmSpecTaskDefaultsToJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsToJSONTyped(value?: SwarmSpecTaskDefaults | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecTaskDefaultsToJSONTyped( + value?: SwarmSpecTaskDefaults | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'LogDriver': SwarmSpecTaskDefaultsLogDriverToJSON(value['LogDriver']), - }; + return { + LogDriver: SwarmSpecTaskDefaultsLogDriverToJSON(value["LogDriver"]), + }; } - diff --git a/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts b/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts index 99ebf6a288..1817c4c14d 100644 --- a/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts +++ b/src/clients/docker/models/SwarmSpecTaskDefaultsLogDriver.ts @@ -2,80 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface SwarmSpecTaskDefaultsLogDriver */ export interface SwarmSpecTaskDefaultsLogDriver { - /** - * The log driver to use as a default for new tasks. - * - * @type {string} - * @memberof SwarmSpecTaskDefaultsLogDriver - */ - Name?: string; - /** - * Driver-specific options for the selected log driver, specified - * as key/value pairs. - * - * @type {{ [key: string]: string; }} - * @memberof SwarmSpecTaskDefaultsLogDriver - */ - Options?: { [key: string]: string; }; + /** + * The log driver to use as a default for new tasks. + * + * @type {string} + * @memberof SwarmSpecTaskDefaultsLogDriver + */ + Name?: string; + /** + * Driver-specific options for the selected log driver, specified + * as key/value pairs. + * + * @type {{ [key: string]: string; }} + * @memberof SwarmSpecTaskDefaultsLogDriver + */ + Options?: { [key: string]: string }; } /** * Check if a given object implements the SwarmSpecTaskDefaultsLogDriver interface. */ -export function instanceOfSwarmSpecTaskDefaultsLogDriver(value: object): value is SwarmSpecTaskDefaultsLogDriver { - return true; +export function instanceOfSwarmSpecTaskDefaultsLogDriver( + value: object, +): value is SwarmSpecTaskDefaultsLogDriver { + return true; } export function SwarmSpecTaskDefaultsLogDriverFromJSON(json: any): SwarmSpecTaskDefaultsLogDriver { - return SwarmSpecTaskDefaultsLogDriverFromJSONTyped(json, false); + return SwarmSpecTaskDefaultsLogDriverFromJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsLogDriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmSpecTaskDefaultsLogDriver { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Options': json['Options'] == null ? undefined : json['Options'], - }; +export function SwarmSpecTaskDefaultsLogDriverFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmSpecTaskDefaultsLogDriver { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function SwarmSpecTaskDefaultsLogDriverToJSON(json: any): SwarmSpecTaskDefaultsLogDriver { - return SwarmSpecTaskDefaultsLogDriverToJSONTyped(json, false); + return SwarmSpecTaskDefaultsLogDriverToJSONTyped(json, false); } -export function SwarmSpecTaskDefaultsLogDriverToJSONTyped(value?: SwarmSpecTaskDefaultsLogDriver | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmSpecTaskDefaultsLogDriverToJSONTyped( + value?: SwarmSpecTaskDefaultsLogDriver | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Options': value['Options'], - }; + return { + Name: value["Name"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/SwarmUnlockRequest.ts b/src/clients/docker/models/SwarmUnlockRequest.ts index c4b3e28de0..9c2d227a23 100644 --- a/src/clients/docker/models/SwarmUnlockRequest.ts +++ b/src/clients/docker/models/SwarmUnlockRequest.ts @@ -2,64 +2,67 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SwarmUnlockRequest */ export interface SwarmUnlockRequest { - /** - * The swarm's unlock key. - * @type {string} - * @memberof SwarmUnlockRequest - */ - UnlockKey?: string; + /** + * The swarm's unlock key. + * @type {string} + * @memberof SwarmUnlockRequest + */ + UnlockKey?: string; } /** * Check if a given object implements the SwarmUnlockRequest interface. */ export function instanceOfSwarmUnlockRequest(value: object): value is SwarmUnlockRequest { - return true; + return true; } export function SwarmUnlockRequestFromJSON(json: any): SwarmUnlockRequest { - return SwarmUnlockRequestFromJSONTyped(json, false); + return SwarmUnlockRequestFromJSONTyped(json, false); } -export function SwarmUnlockRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SwarmUnlockRequest { - if (json == null) { - return json; - } - return { - - 'UnlockKey': json['UnlockKey'] == null ? undefined : json['UnlockKey'], - }; +export function SwarmUnlockRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SwarmUnlockRequest { + if (json == null) { + return json; + } + return { + UnlockKey: json["UnlockKey"] == null ? undefined : json["UnlockKey"], + }; } export function SwarmUnlockRequestToJSON(json: any): SwarmUnlockRequest { - return SwarmUnlockRequestToJSONTyped(json, false); + return SwarmUnlockRequestToJSONTyped(json, false); } -export function SwarmUnlockRequestToJSONTyped(value?: SwarmUnlockRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SwarmUnlockRequestToJSONTyped( + value?: SwarmUnlockRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'UnlockKey': value['UnlockKey'], - }; + return { + UnlockKey: value["UnlockKey"], + }; } - diff --git a/src/clients/docker/models/SystemAuthResponse.ts b/src/clients/docker/models/SystemAuthResponse.ts index d3eb3611c4..b29d08e9c4 100644 --- a/src/clients/docker/models/SystemAuthResponse.ts +++ b/src/clients/docker/models/SystemAuthResponse.ts @@ -2,73 +2,76 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SystemAuthResponse */ export interface SystemAuthResponse { - /** - * The status of the authentication - * @type {string} - * @memberof SystemAuthResponse - */ - Status: string; - /** - * An opaque token used to authenticate a user after a successful login - * @type {string} - * @memberof SystemAuthResponse - */ - IdentityToken?: string; + /** + * The status of the authentication + * @type {string} + * @memberof SystemAuthResponse + */ + Status: string; + /** + * An opaque token used to authenticate a user after a successful login + * @type {string} + * @memberof SystemAuthResponse + */ + IdentityToken?: string; } /** * Check if a given object implements the SystemAuthResponse interface. */ export function instanceOfSystemAuthResponse(value: object): value is SystemAuthResponse { - if (!('Status' in value) || value['Status'] === undefined) return false; - return true; + if (!("Status" in value) || value["Status"] === undefined) return false; + return true; } export function SystemAuthResponseFromJSON(json: any): SystemAuthResponse { - return SystemAuthResponseFromJSONTyped(json, false); + return SystemAuthResponseFromJSONTyped(json, false); } -export function SystemAuthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemAuthResponse { - if (json == null) { - return json; - } - return { - - 'Status': json['Status'], - 'IdentityToken': json['IdentityToken'] == null ? undefined : json['IdentityToken'], - }; +export function SystemAuthResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SystemAuthResponse { + if (json == null) { + return json; + } + return { + Status: json["Status"], + IdentityToken: json["IdentityToken"] == null ? undefined : json["IdentityToken"], + }; } export function SystemAuthResponseToJSON(json: any): SystemAuthResponse { - return SystemAuthResponseToJSONTyped(json, false); + return SystemAuthResponseToJSONTyped(json, false); } -export function SystemAuthResponseToJSONTyped(value?: SystemAuthResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemAuthResponseToJSONTyped( + value?: SystemAuthResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Status': value['Status'], - 'IdentityToken': value['IdentityToken'], - }; + return { + Status: value["Status"], + IdentityToken: value["IdentityToken"], + }; } - diff --git a/src/clients/docker/models/SystemDataUsageResponse.ts b/src/clients/docker/models/SystemDataUsageResponse.ts index c9712c0beb..87f783e2e4 100644 --- a/src/clients/docker/models/SystemDataUsageResponse.ts +++ b/src/clients/docker/models/SystemDataUsageResponse.ts @@ -2,125 +2,139 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { BuildCache } from './BuildCache'; -import { - BuildCacheFromJSON, - BuildCacheFromJSONTyped, - BuildCacheToJSON, - BuildCacheToJSONTyped, -} from './BuildCache'; -import type { ImageSummary } from './ImageSummary'; +import { mapValues } from "../runtime"; +import type { BuildCache } from "./BuildCache"; import { - ImageSummaryFromJSON, - ImageSummaryFromJSONTyped, - ImageSummaryToJSON, - ImageSummaryToJSONTyped, -} from './ImageSummary'; -import type { Volume } from './Volume'; + BuildCacheFromJSON, + BuildCacheFromJSONTyped, + BuildCacheToJSON, + BuildCacheToJSONTyped, +} from "./BuildCache"; +import type { ImageSummary } from "./ImageSummary"; import { - VolumeFromJSON, - VolumeFromJSONTyped, - VolumeToJSON, - VolumeToJSONTyped, -} from './Volume'; -import type { ContainerSummary } from './ContainerSummary'; + ImageSummaryFromJSON, + ImageSummaryFromJSONTyped, + ImageSummaryToJSON, + ImageSummaryToJSONTyped, +} from "./ImageSummary"; +import type { Volume } from "./Volume"; +import { VolumeFromJSON, VolumeFromJSONTyped, VolumeToJSON, VolumeToJSONTyped } from "./Volume"; +import type { ContainerSummary } from "./ContainerSummary"; import { - ContainerSummaryFromJSON, - ContainerSummaryFromJSONTyped, - ContainerSummaryToJSON, - ContainerSummaryToJSONTyped, -} from './ContainerSummary'; + ContainerSummaryFromJSON, + ContainerSummaryFromJSONTyped, + ContainerSummaryToJSON, + ContainerSummaryToJSONTyped, +} from "./ContainerSummary"; /** - * + * * @export * @interface SystemDataUsageResponse */ export interface SystemDataUsageResponse { - /** - * - * @type {number} - * @memberof SystemDataUsageResponse - */ - LayersSize?: number; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - Images?: Array; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - Containers?: Array; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - Volumes?: Array; - /** - * - * @type {Array} - * @memberof SystemDataUsageResponse - */ - BuildCache?: Array; + /** + * + * @type {number} + * @memberof SystemDataUsageResponse + */ + LayersSize?: number; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + Images?: Array; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + Containers?: Array; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + Volumes?: Array; + /** + * + * @type {Array} + * @memberof SystemDataUsageResponse + */ + BuildCache?: Array; } /** * Check if a given object implements the SystemDataUsageResponse interface. */ export function instanceOfSystemDataUsageResponse(value: object): value is SystemDataUsageResponse { - return true; + return true; } export function SystemDataUsageResponseFromJSON(json: any): SystemDataUsageResponse { - return SystemDataUsageResponseFromJSONTyped(json, false); + return SystemDataUsageResponseFromJSONTyped(json, false); } -export function SystemDataUsageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemDataUsageResponse { - if (json == null) { - return json; - } - return { - - 'LayersSize': json['LayersSize'] == null ? undefined : json['LayersSize'], - 'Images': json['Images'] == null ? undefined : ((json['Images'] as Array).map(ImageSummaryFromJSON)), - 'Containers': json['Containers'] == null ? undefined : ((json['Containers'] as Array).map(ContainerSummaryFromJSON)), - 'Volumes': json['Volumes'] == null ? undefined : ((json['Volumes'] as Array).map(VolumeFromJSON)), - 'BuildCache': json['BuildCache'] == null ? undefined : ((json['BuildCache'] as Array).map(BuildCacheFromJSON)), - }; +export function SystemDataUsageResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SystemDataUsageResponse { + if (json == null) { + return json; + } + return { + LayersSize: json["LayersSize"] == null ? undefined : json["LayersSize"], + Images: + json["Images"] == null ? undefined : (json["Images"] as Array).map(ImageSummaryFromJSON), + Containers: + json["Containers"] == null + ? undefined + : (json["Containers"] as Array).map(ContainerSummaryFromJSON), + Volumes: + json["Volumes"] == null ? undefined : (json["Volumes"] as Array).map(VolumeFromJSON), + BuildCache: + json["BuildCache"] == null + ? undefined + : (json["BuildCache"] as Array).map(BuildCacheFromJSON), + }; } export function SystemDataUsageResponseToJSON(json: any): SystemDataUsageResponse { - return SystemDataUsageResponseToJSONTyped(json, false); + return SystemDataUsageResponseToJSONTyped(json, false); } -export function SystemDataUsageResponseToJSONTyped(value?: SystemDataUsageResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemDataUsageResponseToJSONTyped( + value?: SystemDataUsageResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'LayersSize': value['LayersSize'], - 'Images': value['Images'] == null ? undefined : ((value['Images'] as Array).map(ImageSummaryToJSON)), - 'Containers': value['Containers'] == null ? undefined : ((value['Containers'] as Array).map(ContainerSummaryToJSON)), - 'Volumes': value['Volumes'] == null ? undefined : ((value['Volumes'] as Array).map(VolumeToJSON)), - 'BuildCache': value['BuildCache'] == null ? undefined : ((value['BuildCache'] as Array).map(BuildCacheToJSON)), - }; + return { + LayersSize: value["LayersSize"], + Images: + value["Images"] == null ? undefined : (value["Images"] as Array).map(ImageSummaryToJSON), + Containers: + value["Containers"] == null + ? undefined + : (value["Containers"] as Array).map(ContainerSummaryToJSON), + Volumes: + value["Volumes"] == null ? undefined : (value["Volumes"] as Array).map(VolumeToJSON), + BuildCache: + value["BuildCache"] == null + ? undefined + : (value["BuildCache"] as Array).map(BuildCacheToJSON), + }; } - diff --git a/src/clients/docker/models/SystemInfo.ts b/src/clients/docker/models/SystemInfo.ts index d5ba41d8b7..aadd471db5 100644 --- a/src/clients/docker/models/SystemInfo.ts +++ b/src/clients/docker/models/SystemInfo.ts @@ -2,777 +2,791 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginsInfo } from './PluginsInfo'; -import { - PluginsInfoFromJSON, - PluginsInfoFromJSONTyped, - PluginsInfoToJSON, - PluginsInfoToJSONTyped, -} from './PluginsInfo'; -import type { GenericResourcesInner } from './GenericResourcesInner'; +import { mapValues } from "../runtime"; +import type { PluginsInfo } from "./PluginsInfo"; import { - GenericResourcesInnerFromJSON, - GenericResourcesInnerFromJSONTyped, - GenericResourcesInnerToJSON, - GenericResourcesInnerToJSONTyped, -} from './GenericResourcesInner'; -import type { Runtime } from './Runtime'; + PluginsInfoFromJSON, + PluginsInfoFromJSONTyped, + PluginsInfoToJSON, + PluginsInfoToJSONTyped, +} from "./PluginsInfo"; +import type { GenericResourcesInner } from "./GenericResourcesInner"; import { - RuntimeFromJSON, - RuntimeFromJSONTyped, - RuntimeToJSON, - RuntimeToJSONTyped, -} from './Runtime'; -import type { SystemInfoDefaultAddressPoolsInner } from './SystemInfoDefaultAddressPoolsInner'; + GenericResourcesInnerFromJSON, + GenericResourcesInnerFromJSONTyped, + GenericResourcesInnerToJSON, + GenericResourcesInnerToJSONTyped, +} from "./GenericResourcesInner"; +import type { Runtime } from "./Runtime"; import { - SystemInfoDefaultAddressPoolsInnerFromJSON, - SystemInfoDefaultAddressPoolsInnerFromJSONTyped, - SystemInfoDefaultAddressPoolsInnerToJSON, - SystemInfoDefaultAddressPoolsInnerToJSONTyped, -} from './SystemInfoDefaultAddressPoolsInner'; -import type { Commit } from './Commit'; + RuntimeFromJSON, + RuntimeFromJSONTyped, + RuntimeToJSON, + RuntimeToJSONTyped, +} from "./Runtime"; +import type { SystemInfoDefaultAddressPoolsInner } from "./SystemInfoDefaultAddressPoolsInner"; import { - CommitFromJSON, - CommitFromJSONTyped, - CommitToJSON, - CommitToJSONTyped, -} from './Commit'; -import type { RegistryServiceConfig } from './RegistryServiceConfig'; + SystemInfoDefaultAddressPoolsInnerFromJSON, + SystemInfoDefaultAddressPoolsInnerFromJSONTyped, + SystemInfoDefaultAddressPoolsInnerToJSON, + SystemInfoDefaultAddressPoolsInnerToJSONTyped, +} from "./SystemInfoDefaultAddressPoolsInner"; +import type { Commit } from "./Commit"; +import { CommitFromJSON, CommitFromJSONTyped, CommitToJSON, CommitToJSONTyped } from "./Commit"; +import type { RegistryServiceConfig } from "./RegistryServiceConfig"; import { - RegistryServiceConfigFromJSON, - RegistryServiceConfigFromJSONTyped, - RegistryServiceConfigToJSON, - RegistryServiceConfigToJSONTyped, -} from './RegistryServiceConfig'; -import type { SwarmInfo } from './SwarmInfo'; + RegistryServiceConfigFromJSON, + RegistryServiceConfigFromJSONTyped, + RegistryServiceConfigToJSON, + RegistryServiceConfigToJSONTyped, +} from "./RegistryServiceConfig"; +import type { SwarmInfo } from "./SwarmInfo"; import { - SwarmInfoFromJSON, - SwarmInfoFromJSONTyped, - SwarmInfoToJSON, - SwarmInfoToJSONTyped, -} from './SwarmInfo'; + SwarmInfoFromJSON, + SwarmInfoFromJSONTyped, + SwarmInfoToJSON, + SwarmInfoToJSONTyped, +} from "./SwarmInfo"; /** - * + * * @export * @interface SystemInfo */ export interface SystemInfo { - /** - * Unique identifier of the daemon. - * - *


- * - * > **Note**: The format of the ID itself is not part of the API, and - * > should not be considered stable. - * - * @type {string} - * @memberof SystemInfo - */ - ID?: string; - /** - * Total number of containers on the host. - * @type {number} - * @memberof SystemInfo - */ - Containers?: number; - /** - * Number of containers with status `"running"`. - * - * @type {number} - * @memberof SystemInfo - */ - ContainersRunning?: number; - /** - * Number of containers with status `"paused"`. - * - * @type {number} - * @memberof SystemInfo - */ - ContainersPaused?: number; - /** - * Number of containers with status `"stopped"`. - * - * @type {number} - * @memberof SystemInfo - */ - ContainersStopped?: number; - /** - * Total number of images on the host. - * - * Both _tagged_ and _untagged_ (dangling) images are counted. - * - * @type {number} - * @memberof SystemInfo - */ - Images?: number; - /** - * Name of the storage driver in use. - * @type {string} - * @memberof SystemInfo - */ - Driver?: string; - /** - * Information specific to the storage driver, provided as - * "label" / "value" pairs. - * - * This information is provided by the storage driver, and formatted - * in a way consistent with the output of `docker info` on the command - * line. - * - *


- * - * > **Note**: The information returned in this field, including the - * > formatting of values and labels, should not be considered stable, - * > and may change without notice. - * - * @type {Array>} - * @memberof SystemInfo - */ - DriverStatus?: Array>; - /** - * Root directory of persistent Docker state. - * - * Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` - * on Windows. - * - * @type {string} - * @memberof SystemInfo - */ - DockerRootDir?: string; - /** - * - * @type {PluginsInfo} - * @memberof SystemInfo - */ - Plugins?: PluginsInfo; - /** - * Indicates if the host has memory limit support enabled. - * @type {boolean} - * @memberof SystemInfo - */ - MemoryLimit?: boolean; - /** - * Indicates if the host has memory swap limit support enabled. - * @type {boolean} - * @memberof SystemInfo - */ - SwapLimit?: boolean; - /** - * Indicates if the host has kernel memory TCP limit support enabled. This - * field is omitted if not supported. - * - * Kernel memory TCP limits are not supported when using cgroups v2, which - * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. - * - * @type {boolean} - * @memberof SystemInfo - */ - KernelMemoryTCP?: boolean; - /** - * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by - * the host. - * - * @type {boolean} - * @memberof SystemInfo - */ - CpuCfsPeriod?: boolean; - /** - * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by - * the host. - * - * @type {boolean} - * @memberof SystemInfo - */ - CpuCfsQuota?: boolean; - /** - * Indicates if CPU Shares limiting is supported by the host. - * - * @type {boolean} - * @memberof SystemInfo - */ - CPUShares?: boolean; - /** - * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. - * - * See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) - * - * @type {boolean} - * @memberof SystemInfo - */ - CPUSet?: boolean; - /** - * Indicates if the host kernel has PID limit support enabled. - * @type {boolean} - * @memberof SystemInfo - */ - PidsLimit?: boolean; - /** - * Indicates if OOM killer disable is supported on the host. - * @type {boolean} - * @memberof SystemInfo - */ - OomKillDisable?: boolean; - /** - * Indicates IPv4 forwarding is enabled. - * @type {boolean} - * @memberof SystemInfo - */ - IPv4Forwarding?: boolean; - /** - * Indicates if `bridge-nf-call-iptables` is available on the host. - * @type {boolean} - * @memberof SystemInfo - */ - BridgeNfIptables?: boolean; - /** - * Indicates if `bridge-nf-call-ip6tables` is available on the host. - * @type {boolean} - * @memberof SystemInfo - */ - BridgeNfIp6tables?: boolean; - /** - * Indicates if the daemon is running in debug-mode / with debug-level - * logging enabled. - * - * @type {boolean} - * @memberof SystemInfo - */ - Debug?: boolean; - /** - * The total number of file Descriptors in use by the daemon process. - * - * This information is only returned if debug-mode is enabled. - * - * @type {number} - * @memberof SystemInfo - */ - NFd?: number; - /** - * The number of goroutines that currently exist. - * - * This information is only returned if debug-mode is enabled. - * - * @type {number} - * @memberof SystemInfo - */ - NGoroutines?: number; - /** - * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) - * format with nano-seconds. - * - * @type {string} - * @memberof SystemInfo - */ - SystemTime?: string; - /** - * The logging driver to use as a default for new containers. - * - * @type {string} - * @memberof SystemInfo - */ - LoggingDriver?: string; - /** - * The driver to use for managing cgroups. - * - * @type {string} - * @memberof SystemInfo - */ - CgroupDriver?: SystemInfoCgroupDriverEnum; - /** - * The version of the cgroup. - * - * @type {string} - * @memberof SystemInfo - */ - CgroupVersion?: SystemInfoCgroupVersionEnum; - /** - * Number of event listeners subscribed. - * @type {number} - * @memberof SystemInfo - */ - NEventsListener?: number; - /** - * Kernel version of the host. - * - * On Linux, this information obtained from `uname`. On Windows this - * information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ - * registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. - * - * @type {string} - * @memberof SystemInfo - */ - KernelVersion?: string; - /** - * Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" - * or "Windows Server 2016 Datacenter" - * - * @type {string} - * @memberof SystemInfo - */ - OperatingSystem?: string; - /** - * Version of the host's operating system - * - *


- * - * > **Note**: The information returned in this field, including its - * > very existence, and the formatting of values, should not be considered - * > stable, and may change without notice. - * - * @type {string} - * @memberof SystemInfo - */ - OSVersion?: string; - /** - * Generic type of the operating system of the host, as returned by the - * Go runtime (`GOOS`). - * - * Currently returned values are "linux" and "windows". A full list of - * possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). - * - * @type {string} - * @memberof SystemInfo - */ - OSType?: string; - /** - * Hardware architecture of the host, as returned by the Go runtime - * (`GOARCH`). - * - * A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). - * - * @type {string} - * @memberof SystemInfo - */ - Architecture?: string; - /** - * The number of logical CPUs usable by the daemon. - * - * The number of available CPUs is checked by querying the operating - * system when the daemon starts. Changes to operating system CPU - * allocation after the daemon is started are not reflected. - * - * @type {number} - * @memberof SystemInfo - */ - NCPU?: number; - /** - * Total amount of physical memory available on the host, in bytes. - * - * @type {number} - * @memberof SystemInfo - */ - MemTotal?: number; - /** - * Address / URL of the index server that is used for image search, - * and as a default for user authentication for Docker Hub and Docker Cloud. - * - * @type {string} - * @memberof SystemInfo - */ - IndexServerAddress?: string; - /** - * - * @type {RegistryServiceConfig} - * @memberof SystemInfo - */ - RegistryConfig?: RegistryServiceConfig | null; - /** - * User-defined resources can be either Integer resources (e.g, `SSD=3`) or - * String resources (e.g, `GPU=UUID1`). - * - * @type {Array} - * @memberof SystemInfo - */ - GenericResources?: Array; - /** - * HTTP-proxy configured for the daemon. This value is obtained from the - * [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. - * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL - * are masked in the API response. - * - * Containers do not automatically inherit this configuration. - * - * @type {string} - * @memberof SystemInfo - */ - HttpProxy?: string; - /** - * HTTPS-proxy configured for the daemon. This value is obtained from the - * [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. - * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL - * are masked in the API response. - * - * Containers do not automatically inherit this configuration. - * - * @type {string} - * @memberof SystemInfo - */ - HttpsProxy?: string; - /** - * Comma-separated list of domain extensions for which no proxy should be - * used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) - * environment variable. - * - * Containers do not automatically inherit this configuration. - * - * @type {string} - * @memberof SystemInfo - */ - NoProxy?: string; - /** - * Hostname of the host. - * @type {string} - * @memberof SystemInfo - */ - Name?: string; - /** - * User-defined labels (key/value metadata) as set on the daemon. - * - *


- * - * > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, - * > set through the daemon configuration, and _node_ labels, set from a - * > manager node in the Swarm. Node labels are not included in this - * > field. Node labels can be retrieved using the `/nodes/(id)` endpoint - * > on a manager node in the Swarm. - * - * @type {Array} - * @memberof SystemInfo - */ - Labels?: Array; - /** - * Indicates if experimental features are enabled on the daemon. - * - * @type {boolean} - * @memberof SystemInfo - */ - ExperimentalBuild?: boolean; - /** - * Version string of the daemon. - * - * @type {string} - * @memberof SystemInfo - */ - ServerVersion?: string; - /** - * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) - * runtimes configured on the daemon. Keys hold the "name" used to - * reference the runtime. - * - * The Docker daemon relies on an OCI compliant runtime (invoked via the - * `containerd` daemon) as its interface to the Linux kernel namespaces, - * cgroups, and SELinux. - * - * The default runtime is `runc`, and automatically configured. Additional - * runtimes can be configured by the user and will be listed here. - * - * @type {{ [key: string]: Runtime; }} - * @memberof SystemInfo - */ - Runtimes?: { [key: string]: Runtime; }; - /** - * Name of the default OCI runtime that is used when starting containers. - * - * The default can be overridden per-container at create time. - * - * @type {string} - * @memberof SystemInfo - */ - DefaultRuntime?: string; - /** - * - * @type {SwarmInfo} - * @memberof SystemInfo - */ - Swarm?: SwarmInfo; - /** - * Indicates if live restore is enabled. - * - * If enabled, containers are kept running when the daemon is shutdown - * or upon daemon start if running containers are detected. - * - * @type {boolean} - * @memberof SystemInfo - */ - LiveRestoreEnabled?: boolean; - /** - * Represents the isolation technology to use as a default for containers. - * The supported values are platform-specific. - * - * If no isolation value is specified on daemon start, on Windows client, - * the default is `hyperv`, and on Windows server, the default is `process`. - * - * This option is currently not used on other platforms. - * - * @type {string} - * @memberof SystemInfo - */ - Isolation?: SystemInfoIsolationEnum; - /** - * Name and, optional, path of the `docker-init` binary. - * - * If the path is omitted, the daemon searches the host's `$PATH` for the - * binary and uses the first result. - * - * @type {string} - * @memberof SystemInfo - */ - InitBinary?: string; - /** - * - * @type {Commit} - * @memberof SystemInfo - */ - ContainerdCommit?: Commit; - /** - * - * @type {Commit} - * @memberof SystemInfo - */ - RuncCommit?: Commit; - /** - * - * @type {Commit} - * @memberof SystemInfo - */ - InitCommit?: Commit; - /** - * List of security features that are enabled on the daemon, such as - * apparmor, seccomp, SELinux, user-namespaces (userns), rootless and - * no-new-privileges. - * - * Additional configuration options for each security feature may - * be present, and are included as a comma-separated list of key/value - * pairs. - * - * @type {Array} - * @memberof SystemInfo - */ - SecurityOptions?: Array; - /** - * Reports a summary of the product license on the daemon. - * - * If a commercial license has been applied to the daemon, information - * such as number of nodes, and expiration are included. - * - * @type {string} - * @memberof SystemInfo - */ - ProductLicense?: string; - /** - * List of custom default address pools for local networks, which can be - * specified in the daemon.json file or dockerd option. - * - * Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 - * 10.10.[0-255].0/24 address pools. - * - * @type {Array} - * @memberof SystemInfo - */ - DefaultAddressPools?: Array; - /** - * List of warnings / informational messages about missing features, or - * issues related to the daemon configuration. - * - * These messages can be printed by the client as information to the user. - * - * @type {Array} - * @memberof SystemInfo - */ - Warnings?: Array; + /** + * Unique identifier of the daemon. + * + *


+ * + * > **Note**: The format of the ID itself is not part of the API, and + * > should not be considered stable. + * + * @type {string} + * @memberof SystemInfo + */ + ID?: string; + /** + * Total number of containers on the host. + * @type {number} + * @memberof SystemInfo + */ + Containers?: number; + /** + * Number of containers with status `"running"`. + * + * @type {number} + * @memberof SystemInfo + */ + ContainersRunning?: number; + /** + * Number of containers with status `"paused"`. + * + * @type {number} + * @memberof SystemInfo + */ + ContainersPaused?: number; + /** + * Number of containers with status `"stopped"`. + * + * @type {number} + * @memberof SystemInfo + */ + ContainersStopped?: number; + /** + * Total number of images on the host. + * + * Both _tagged_ and _untagged_ (dangling) images are counted. + * + * @type {number} + * @memberof SystemInfo + */ + Images?: number; + /** + * Name of the storage driver in use. + * @type {string} + * @memberof SystemInfo + */ + Driver?: string; + /** + * Information specific to the storage driver, provided as + * "label" / "value" pairs. + * + * This information is provided by the storage driver, and formatted + * in a way consistent with the output of `docker info` on the command + * line. + * + *


+ * + * > **Note**: The information returned in this field, including the + * > formatting of values and labels, should not be considered stable, + * > and may change without notice. + * + * @type {Array>} + * @memberof SystemInfo + */ + DriverStatus?: Array>; + /** + * Root directory of persistent Docker state. + * + * Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + * on Windows. + * + * @type {string} + * @memberof SystemInfo + */ + DockerRootDir?: string; + /** + * + * @type {PluginsInfo} + * @memberof SystemInfo + */ + Plugins?: PluginsInfo; + /** + * Indicates if the host has memory limit support enabled. + * @type {boolean} + * @memberof SystemInfo + */ + MemoryLimit?: boolean; + /** + * Indicates if the host has memory swap limit support enabled. + * @type {boolean} + * @memberof SystemInfo + */ + SwapLimit?: boolean; + /** + * Indicates if the host has kernel memory TCP limit support enabled. This + * field is omitted if not supported. + * + * Kernel memory TCP limits are not supported when using cgroups v2, which + * does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + * + * @type {boolean} + * @memberof SystemInfo + */ + KernelMemoryTCP?: boolean; + /** + * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + * the host. + * + * @type {boolean} + * @memberof SystemInfo + */ + CpuCfsPeriod?: boolean; + /** + * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + * the host. + * + * @type {boolean} + * @memberof SystemInfo + */ + CpuCfsQuota?: boolean; + /** + * Indicates if CPU Shares limiting is supported by the host. + * + * @type {boolean} + * @memberof SystemInfo + */ + CPUShares?: boolean; + /** + * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + * + * See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + * + * @type {boolean} + * @memberof SystemInfo + */ + CPUSet?: boolean; + /** + * Indicates if the host kernel has PID limit support enabled. + * @type {boolean} + * @memberof SystemInfo + */ + PidsLimit?: boolean; + /** + * Indicates if OOM killer disable is supported on the host. + * @type {boolean} + * @memberof SystemInfo + */ + OomKillDisable?: boolean; + /** + * Indicates IPv4 forwarding is enabled. + * @type {boolean} + * @memberof SystemInfo + */ + IPv4Forwarding?: boolean; + /** + * Indicates if `bridge-nf-call-iptables` is available on the host. + * @type {boolean} + * @memberof SystemInfo + */ + BridgeNfIptables?: boolean; + /** + * Indicates if `bridge-nf-call-ip6tables` is available on the host. + * @type {boolean} + * @memberof SystemInfo + */ + BridgeNfIp6tables?: boolean; + /** + * Indicates if the daemon is running in debug-mode / with debug-level + * logging enabled. + * + * @type {boolean} + * @memberof SystemInfo + */ + Debug?: boolean; + /** + * The total number of file Descriptors in use by the daemon process. + * + * This information is only returned if debug-mode is enabled. + * + * @type {number} + * @memberof SystemInfo + */ + NFd?: number; + /** + * The number of goroutines that currently exist. + * + * This information is only returned if debug-mode is enabled. + * + * @type {number} + * @memberof SystemInfo + */ + NGoroutines?: number; + /** + * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + * format with nano-seconds. + * + * @type {string} + * @memberof SystemInfo + */ + SystemTime?: string; + /** + * The logging driver to use as a default for new containers. + * + * @type {string} + * @memberof SystemInfo + */ + LoggingDriver?: string; + /** + * The driver to use for managing cgroups. + * + * @type {string} + * @memberof SystemInfo + */ + CgroupDriver?: SystemInfoCgroupDriverEnum; + /** + * The version of the cgroup. + * + * @type {string} + * @memberof SystemInfo + */ + CgroupVersion?: SystemInfoCgroupVersionEnum; + /** + * Number of event listeners subscribed. + * @type {number} + * @memberof SystemInfo + */ + NEventsListener?: number; + /** + * Kernel version of the host. + * + * On Linux, this information obtained from `uname`. On Windows this + * information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + * registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + * + * @type {string} + * @memberof SystemInfo + */ + KernelVersion?: string; + /** + * Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" + * or "Windows Server 2016 Datacenter" + * + * @type {string} + * @memberof SystemInfo + */ + OperatingSystem?: string; + /** + * Version of the host's operating system + * + *


+ * + * > **Note**: The information returned in this field, including its + * > very existence, and the formatting of values, should not be considered + * > stable, and may change without notice. + * + * @type {string} + * @memberof SystemInfo + */ + OSVersion?: string; + /** + * Generic type of the operating system of the host, as returned by the + * Go runtime (`GOOS`). + * + * Currently returned values are "linux" and "windows". A full list of + * possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + * + * @type {string} + * @memberof SystemInfo + */ + OSType?: string; + /** + * Hardware architecture of the host, as returned by the Go runtime + * (`GOARCH`). + * + * A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + * + * @type {string} + * @memberof SystemInfo + */ + Architecture?: string; + /** + * The number of logical CPUs usable by the daemon. + * + * The number of available CPUs is checked by querying the operating + * system when the daemon starts. Changes to operating system CPU + * allocation after the daemon is started are not reflected. + * + * @type {number} + * @memberof SystemInfo + */ + NCPU?: number; + /** + * Total amount of physical memory available on the host, in bytes. + * + * @type {number} + * @memberof SystemInfo + */ + MemTotal?: number; + /** + * Address / URL of the index server that is used for image search, + * and as a default for user authentication for Docker Hub and Docker Cloud. + * + * @type {string} + * @memberof SystemInfo + */ + IndexServerAddress?: string; + /** + * + * @type {RegistryServiceConfig} + * @memberof SystemInfo + */ + RegistryConfig?: RegistryServiceConfig | null; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + * String resources (e.g, `GPU=UUID1`). + * + * @type {Array} + * @memberof SystemInfo + */ + GenericResources?: Array; + /** + * HTTP-proxy configured for the daemon. This value is obtained from the + * [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + * are masked in the API response. + * + * Containers do not automatically inherit this configuration. + * + * @type {string} + * @memberof SystemInfo + */ + HttpProxy?: string; + /** + * HTTPS-proxy configured for the daemon. This value is obtained from the + * [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + * Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + * are masked in the API response. + * + * Containers do not automatically inherit this configuration. + * + * @type {string} + * @memberof SystemInfo + */ + HttpsProxy?: string; + /** + * Comma-separated list of domain extensions for which no proxy should be + * used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + * environment variable. + * + * Containers do not automatically inherit this configuration. + * + * @type {string} + * @memberof SystemInfo + */ + NoProxy?: string; + /** + * Hostname of the host. + * @type {string} + * @memberof SystemInfo + */ + Name?: string; + /** + * User-defined labels (key/value metadata) as set on the daemon. + * + *


+ * + * > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + * > set through the daemon configuration, and _node_ labels, set from a + * > manager node in the Swarm. Node labels are not included in this + * > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + * > on a manager node in the Swarm. + * + * @type {Array} + * @memberof SystemInfo + */ + Labels?: Array; + /** + * Indicates if experimental features are enabled on the daemon. + * + * @type {boolean} + * @memberof SystemInfo + */ + ExperimentalBuild?: boolean; + /** + * Version string of the daemon. + * + * @type {string} + * @memberof SystemInfo + */ + ServerVersion?: string; + /** + * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + * runtimes configured on the daemon. Keys hold the "name" used to + * reference the runtime. + * + * The Docker daemon relies on an OCI compliant runtime (invoked via the + * `containerd` daemon) as its interface to the Linux kernel namespaces, + * cgroups, and SELinux. + * + * The default runtime is `runc`, and automatically configured. Additional + * runtimes can be configured by the user and will be listed here. + * + * @type {{ [key: string]: Runtime; }} + * @memberof SystemInfo + */ + Runtimes?: { [key: string]: Runtime }; + /** + * Name of the default OCI runtime that is used when starting containers. + * + * The default can be overridden per-container at create time. + * + * @type {string} + * @memberof SystemInfo + */ + DefaultRuntime?: string; + /** + * + * @type {SwarmInfo} + * @memberof SystemInfo + */ + Swarm?: SwarmInfo; + /** + * Indicates if live restore is enabled. + * + * If enabled, containers are kept running when the daemon is shutdown + * or upon daemon start if running containers are detected. + * + * @type {boolean} + * @memberof SystemInfo + */ + LiveRestoreEnabled?: boolean; + /** + * Represents the isolation technology to use as a default for containers. + * The supported values are platform-specific. + * + * If no isolation value is specified on daemon start, on Windows client, + * the default is `hyperv`, and on Windows server, the default is `process`. + * + * This option is currently not used on other platforms. + * + * @type {string} + * @memberof SystemInfo + */ + Isolation?: SystemInfoIsolationEnum; + /** + * Name and, optional, path of the `docker-init` binary. + * + * If the path is omitted, the daemon searches the host's `$PATH` for the + * binary and uses the first result. + * + * @type {string} + * @memberof SystemInfo + */ + InitBinary?: string; + /** + * + * @type {Commit} + * @memberof SystemInfo + */ + ContainerdCommit?: Commit; + /** + * + * @type {Commit} + * @memberof SystemInfo + */ + RuncCommit?: Commit; + /** + * + * @type {Commit} + * @memberof SystemInfo + */ + InitCommit?: Commit; + /** + * List of security features that are enabled on the daemon, such as + * apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + * no-new-privileges. + * + * Additional configuration options for each security feature may + * be present, and are included as a comma-separated list of key/value + * pairs. + * + * @type {Array} + * @memberof SystemInfo + */ + SecurityOptions?: Array; + /** + * Reports a summary of the product license on the daemon. + * + * If a commercial license has been applied to the daemon, information + * such as number of nodes, and expiration are included. + * + * @type {string} + * @memberof SystemInfo + */ + ProductLicense?: string; + /** + * List of custom default address pools for local networks, which can be + * specified in the daemon.json file or dockerd option. + * + * Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + * 10.10.[0-255].0/24 address pools. + * + * @type {Array} + * @memberof SystemInfo + */ + DefaultAddressPools?: Array; + /** + * List of warnings / informational messages about missing features, or + * issues related to the daemon configuration. + * + * These messages can be printed by the client as information to the user. + * + * @type {Array} + * @memberof SystemInfo + */ + Warnings?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SystemInfoCgroupDriverEnum { - Cgroupfs = 'cgroupfs', - Systemd = 'systemd', - None = 'none' + Cgroupfs = "cgroupfs", + Systemd = "systemd", + None = "none", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SystemInfoCgroupVersionEnum { - _1 = '1', - _2 = '2' + _1 = "1", + _2 = "2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SystemInfoIsolationEnum { - Default = 'default', - Hyperv = 'hyperv', - Process = 'process' + Default = "default", + Hyperv = "hyperv", + Process = "process", } - /** * Check if a given object implements the SystemInfo interface. */ export function instanceOfSystemInfo(value: object): value is SystemInfo { - return true; + return true; } export function SystemInfoFromJSON(json: any): SystemInfo { - return SystemInfoFromJSONTyped(json, false); + return SystemInfoFromJSONTyped(json, false); } export function SystemInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfo { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Containers': json['Containers'] == null ? undefined : json['Containers'], - 'ContainersRunning': json['ContainersRunning'] == null ? undefined : json['ContainersRunning'], - 'ContainersPaused': json['ContainersPaused'] == null ? undefined : json['ContainersPaused'], - 'ContainersStopped': json['ContainersStopped'] == null ? undefined : json['ContainersStopped'], - 'Images': json['Images'] == null ? undefined : json['Images'], - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'DriverStatus': json['DriverStatus'] == null ? undefined : json['DriverStatus'], - 'DockerRootDir': json['DockerRootDir'] == null ? undefined : json['DockerRootDir'], - 'Plugins': json['Plugins'] == null ? undefined : PluginsInfoFromJSON(json['Plugins']), - 'MemoryLimit': json['MemoryLimit'] == null ? undefined : json['MemoryLimit'], - 'SwapLimit': json['SwapLimit'] == null ? undefined : json['SwapLimit'], - 'KernelMemoryTCP': json['KernelMemoryTCP'] == null ? undefined : json['KernelMemoryTCP'], - 'CpuCfsPeriod': json['CpuCfsPeriod'] == null ? undefined : json['CpuCfsPeriod'], - 'CpuCfsQuota': json['CpuCfsQuota'] == null ? undefined : json['CpuCfsQuota'], - 'CPUShares': json['CPUShares'] == null ? undefined : json['CPUShares'], - 'CPUSet': json['CPUSet'] == null ? undefined : json['CPUSet'], - 'PidsLimit': json['PidsLimit'] == null ? undefined : json['PidsLimit'], - 'OomKillDisable': json['OomKillDisable'] == null ? undefined : json['OomKillDisable'], - 'IPv4Forwarding': json['IPv4Forwarding'] == null ? undefined : json['IPv4Forwarding'], - 'BridgeNfIptables': json['BridgeNfIptables'] == null ? undefined : json['BridgeNfIptables'], - 'BridgeNfIp6tables': json['BridgeNfIp6tables'] == null ? undefined : json['BridgeNfIp6tables'], - 'Debug': json['Debug'] == null ? undefined : json['Debug'], - 'NFd': json['NFd'] == null ? undefined : json['NFd'], - 'NGoroutines': json['NGoroutines'] == null ? undefined : json['NGoroutines'], - 'SystemTime': json['SystemTime'] == null ? undefined : json['SystemTime'], - 'LoggingDriver': json['LoggingDriver'] == null ? undefined : json['LoggingDriver'], - 'CgroupDriver': json['CgroupDriver'] == null ? undefined : json['CgroupDriver'], - 'CgroupVersion': json['CgroupVersion'] == null ? undefined : json['CgroupVersion'], - 'NEventsListener': json['NEventsListener'] == null ? undefined : json['NEventsListener'], - 'KernelVersion': json['KernelVersion'] == null ? undefined : json['KernelVersion'], - 'OperatingSystem': json['OperatingSystem'] == null ? undefined : json['OperatingSystem'], - 'OSVersion': json['OSVersion'] == null ? undefined : json['OSVersion'], - 'OSType': json['OSType'] == null ? undefined : json['OSType'], - 'Architecture': json['Architecture'] == null ? undefined : json['Architecture'], - 'NCPU': json['NCPU'] == null ? undefined : json['NCPU'], - 'MemTotal': json['MemTotal'] == null ? undefined : json['MemTotal'], - 'IndexServerAddress': json['IndexServerAddress'] == null ? undefined : json['IndexServerAddress'], - 'RegistryConfig': json['RegistryConfig'] == null ? undefined : RegistryServiceConfigFromJSON(json['RegistryConfig']), - 'GenericResources': json['GenericResources'] == null ? undefined : ((json['GenericResources'] as Array).map(GenericResourcesInnerFromJSON)), - 'HttpProxy': json['HttpProxy'] == null ? undefined : json['HttpProxy'], - 'HttpsProxy': json['HttpsProxy'] == null ? undefined : json['HttpsProxy'], - 'NoProxy': json['NoProxy'] == null ? undefined : json['NoProxy'], - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'ExperimentalBuild': json['ExperimentalBuild'] == null ? undefined : json['ExperimentalBuild'], - 'ServerVersion': json['ServerVersion'] == null ? undefined : json['ServerVersion'], - 'Runtimes': json['Runtimes'] == null ? undefined : (mapValues(json['Runtimes'], RuntimeFromJSON)), - 'DefaultRuntime': json['DefaultRuntime'] == null ? undefined : json['DefaultRuntime'], - 'Swarm': json['Swarm'] == null ? undefined : SwarmInfoFromJSON(json['Swarm']), - 'LiveRestoreEnabled': json['LiveRestoreEnabled'] == null ? undefined : json['LiveRestoreEnabled'], - 'Isolation': json['Isolation'] == null ? undefined : json['Isolation'], - 'InitBinary': json['InitBinary'] == null ? undefined : json['InitBinary'], - 'ContainerdCommit': json['ContainerdCommit'] == null ? undefined : CommitFromJSON(json['ContainerdCommit']), - 'RuncCommit': json['RuncCommit'] == null ? undefined : CommitFromJSON(json['RuncCommit']), - 'InitCommit': json['InitCommit'] == null ? undefined : CommitFromJSON(json['InitCommit']), - 'SecurityOptions': json['SecurityOptions'] == null ? undefined : json['SecurityOptions'], - 'ProductLicense': json['ProductLicense'] == null ? undefined : json['ProductLicense'], - 'DefaultAddressPools': json['DefaultAddressPools'] == null ? undefined : ((json['DefaultAddressPools'] as Array).map(SystemInfoDefaultAddressPoolsInnerFromJSON)), - 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Containers: json["Containers"] == null ? undefined : json["Containers"], + ContainersRunning: json["ContainersRunning"] == null ? undefined : json["ContainersRunning"], + ContainersPaused: json["ContainersPaused"] == null ? undefined : json["ContainersPaused"], + ContainersStopped: json["ContainersStopped"] == null ? undefined : json["ContainersStopped"], + Images: json["Images"] == null ? undefined : json["Images"], + Driver: json["Driver"] == null ? undefined : json["Driver"], + DriverStatus: json["DriverStatus"] == null ? undefined : json["DriverStatus"], + DockerRootDir: json["DockerRootDir"] == null ? undefined : json["DockerRootDir"], + Plugins: json["Plugins"] == null ? undefined : PluginsInfoFromJSON(json["Plugins"]), + MemoryLimit: json["MemoryLimit"] == null ? undefined : json["MemoryLimit"], + SwapLimit: json["SwapLimit"] == null ? undefined : json["SwapLimit"], + KernelMemoryTCP: json["KernelMemoryTCP"] == null ? undefined : json["KernelMemoryTCP"], + CpuCfsPeriod: json["CpuCfsPeriod"] == null ? undefined : json["CpuCfsPeriod"], + CpuCfsQuota: json["CpuCfsQuota"] == null ? undefined : json["CpuCfsQuota"], + CPUShares: json["CPUShares"] == null ? undefined : json["CPUShares"], + CPUSet: json["CPUSet"] == null ? undefined : json["CPUSet"], + PidsLimit: json["PidsLimit"] == null ? undefined : json["PidsLimit"], + OomKillDisable: json["OomKillDisable"] == null ? undefined : json["OomKillDisable"], + IPv4Forwarding: json["IPv4Forwarding"] == null ? undefined : json["IPv4Forwarding"], + BridgeNfIptables: json["BridgeNfIptables"] == null ? undefined : json["BridgeNfIptables"], + BridgeNfIp6tables: json["BridgeNfIp6tables"] == null ? undefined : json["BridgeNfIp6tables"], + Debug: json["Debug"] == null ? undefined : json["Debug"], + NFd: json["NFd"] == null ? undefined : json["NFd"], + NGoroutines: json["NGoroutines"] == null ? undefined : json["NGoroutines"], + SystemTime: json["SystemTime"] == null ? undefined : json["SystemTime"], + LoggingDriver: json["LoggingDriver"] == null ? undefined : json["LoggingDriver"], + CgroupDriver: json["CgroupDriver"] == null ? undefined : json["CgroupDriver"], + CgroupVersion: json["CgroupVersion"] == null ? undefined : json["CgroupVersion"], + NEventsListener: json["NEventsListener"] == null ? undefined : json["NEventsListener"], + KernelVersion: json["KernelVersion"] == null ? undefined : json["KernelVersion"], + OperatingSystem: json["OperatingSystem"] == null ? undefined : json["OperatingSystem"], + OSVersion: json["OSVersion"] == null ? undefined : json["OSVersion"], + OSType: json["OSType"] == null ? undefined : json["OSType"], + Architecture: json["Architecture"] == null ? undefined : json["Architecture"], + NCPU: json["NCPU"] == null ? undefined : json["NCPU"], + MemTotal: json["MemTotal"] == null ? undefined : json["MemTotal"], + IndexServerAddress: json["IndexServerAddress"] == null ? undefined : json["IndexServerAddress"], + RegistryConfig: + json["RegistryConfig"] == null + ? undefined + : RegistryServiceConfigFromJSON(json["RegistryConfig"]), + GenericResources: + json["GenericResources"] == null + ? undefined + : (json["GenericResources"] as Array).map(GenericResourcesInnerFromJSON), + HttpProxy: json["HttpProxy"] == null ? undefined : json["HttpProxy"], + HttpsProxy: json["HttpsProxy"] == null ? undefined : json["HttpsProxy"], + NoProxy: json["NoProxy"] == null ? undefined : json["NoProxy"], + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + ExperimentalBuild: json["ExperimentalBuild"] == null ? undefined : json["ExperimentalBuild"], + ServerVersion: json["ServerVersion"] == null ? undefined : json["ServerVersion"], + Runtimes: json["Runtimes"] == null ? undefined : mapValues(json["Runtimes"], RuntimeFromJSON), + DefaultRuntime: json["DefaultRuntime"] == null ? undefined : json["DefaultRuntime"], + Swarm: json["Swarm"] == null ? undefined : SwarmInfoFromJSON(json["Swarm"]), + LiveRestoreEnabled: json["LiveRestoreEnabled"] == null ? undefined : json["LiveRestoreEnabled"], + Isolation: json["Isolation"] == null ? undefined : json["Isolation"], + InitBinary: json["InitBinary"] == null ? undefined : json["InitBinary"], + ContainerdCommit: + json["ContainerdCommit"] == null ? undefined : CommitFromJSON(json["ContainerdCommit"]), + RuncCommit: json["RuncCommit"] == null ? undefined : CommitFromJSON(json["RuncCommit"]), + InitCommit: json["InitCommit"] == null ? undefined : CommitFromJSON(json["InitCommit"]), + SecurityOptions: json["SecurityOptions"] == null ? undefined : json["SecurityOptions"], + ProductLicense: json["ProductLicense"] == null ? undefined : json["ProductLicense"], + DefaultAddressPools: + json["DefaultAddressPools"] == null + ? undefined + : (json["DefaultAddressPools"] as Array).map( + SystemInfoDefaultAddressPoolsInnerFromJSON, + ), + Warnings: json["Warnings"] == null ? undefined : json["Warnings"], + }; } export function SystemInfoToJSON(json: any): SystemInfo { - return SystemInfoToJSONTyped(json, false); + return SystemInfoToJSONTyped(json, false); } -export function SystemInfoToJSONTyped(value?: SystemInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemInfoToJSONTyped( + value?: SystemInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Containers': value['Containers'], - 'ContainersRunning': value['ContainersRunning'], - 'ContainersPaused': value['ContainersPaused'], - 'ContainersStopped': value['ContainersStopped'], - 'Images': value['Images'], - 'Driver': value['Driver'], - 'DriverStatus': value['DriverStatus'], - 'DockerRootDir': value['DockerRootDir'], - 'Plugins': PluginsInfoToJSON(value['Plugins']), - 'MemoryLimit': value['MemoryLimit'], - 'SwapLimit': value['SwapLimit'], - 'KernelMemoryTCP': value['KernelMemoryTCP'], - 'CpuCfsPeriod': value['CpuCfsPeriod'], - 'CpuCfsQuota': value['CpuCfsQuota'], - 'CPUShares': value['CPUShares'], - 'CPUSet': value['CPUSet'], - 'PidsLimit': value['PidsLimit'], - 'OomKillDisable': value['OomKillDisable'], - 'IPv4Forwarding': value['IPv4Forwarding'], - 'BridgeNfIptables': value['BridgeNfIptables'], - 'BridgeNfIp6tables': value['BridgeNfIp6tables'], - 'Debug': value['Debug'], - 'NFd': value['NFd'], - 'NGoroutines': value['NGoroutines'], - 'SystemTime': value['SystemTime'], - 'LoggingDriver': value['LoggingDriver'], - 'CgroupDriver': value['CgroupDriver'], - 'CgroupVersion': value['CgroupVersion'], - 'NEventsListener': value['NEventsListener'], - 'KernelVersion': value['KernelVersion'], - 'OperatingSystem': value['OperatingSystem'], - 'OSVersion': value['OSVersion'], - 'OSType': value['OSType'], - 'Architecture': value['Architecture'], - 'NCPU': value['NCPU'], - 'MemTotal': value['MemTotal'], - 'IndexServerAddress': value['IndexServerAddress'], - 'RegistryConfig': RegistryServiceConfigToJSON(value['RegistryConfig']), - 'GenericResources': value['GenericResources'] == null ? undefined : ((value['GenericResources'] as Array).map(GenericResourcesInnerToJSON)), - 'HttpProxy': value['HttpProxy'], - 'HttpsProxy': value['HttpsProxy'], - 'NoProxy': value['NoProxy'], - 'Name': value['Name'], - 'Labels': value['Labels'], - 'ExperimentalBuild': value['ExperimentalBuild'], - 'ServerVersion': value['ServerVersion'], - 'Runtimes': value['Runtimes'] == null ? undefined : (mapValues(value['Runtimes'], RuntimeToJSON)), - 'DefaultRuntime': value['DefaultRuntime'], - 'Swarm': SwarmInfoToJSON(value['Swarm']), - 'LiveRestoreEnabled': value['LiveRestoreEnabled'], - 'Isolation': value['Isolation'], - 'InitBinary': value['InitBinary'], - 'ContainerdCommit': CommitToJSON(value['ContainerdCommit']), - 'RuncCommit': CommitToJSON(value['RuncCommit']), - 'InitCommit': CommitToJSON(value['InitCommit']), - 'SecurityOptions': value['SecurityOptions'], - 'ProductLicense': value['ProductLicense'], - 'DefaultAddressPools': value['DefaultAddressPools'] == null ? undefined : ((value['DefaultAddressPools'] as Array).map(SystemInfoDefaultAddressPoolsInnerToJSON)), - 'Warnings': value['Warnings'], - }; + return { + ID: value["ID"], + Containers: value["Containers"], + ContainersRunning: value["ContainersRunning"], + ContainersPaused: value["ContainersPaused"], + ContainersStopped: value["ContainersStopped"], + Images: value["Images"], + Driver: value["Driver"], + DriverStatus: value["DriverStatus"], + DockerRootDir: value["DockerRootDir"], + Plugins: PluginsInfoToJSON(value["Plugins"]), + MemoryLimit: value["MemoryLimit"], + SwapLimit: value["SwapLimit"], + KernelMemoryTCP: value["KernelMemoryTCP"], + CpuCfsPeriod: value["CpuCfsPeriod"], + CpuCfsQuota: value["CpuCfsQuota"], + CPUShares: value["CPUShares"], + CPUSet: value["CPUSet"], + PidsLimit: value["PidsLimit"], + OomKillDisable: value["OomKillDisable"], + IPv4Forwarding: value["IPv4Forwarding"], + BridgeNfIptables: value["BridgeNfIptables"], + BridgeNfIp6tables: value["BridgeNfIp6tables"], + Debug: value["Debug"], + NFd: value["NFd"], + NGoroutines: value["NGoroutines"], + SystemTime: value["SystemTime"], + LoggingDriver: value["LoggingDriver"], + CgroupDriver: value["CgroupDriver"], + CgroupVersion: value["CgroupVersion"], + NEventsListener: value["NEventsListener"], + KernelVersion: value["KernelVersion"], + OperatingSystem: value["OperatingSystem"], + OSVersion: value["OSVersion"], + OSType: value["OSType"], + Architecture: value["Architecture"], + NCPU: value["NCPU"], + MemTotal: value["MemTotal"], + IndexServerAddress: value["IndexServerAddress"], + RegistryConfig: RegistryServiceConfigToJSON(value["RegistryConfig"]), + GenericResources: + value["GenericResources"] == null + ? undefined + : (value["GenericResources"] as Array).map(GenericResourcesInnerToJSON), + HttpProxy: value["HttpProxy"], + HttpsProxy: value["HttpsProxy"], + NoProxy: value["NoProxy"], + Name: value["Name"], + Labels: value["Labels"], + ExperimentalBuild: value["ExperimentalBuild"], + ServerVersion: value["ServerVersion"], + Runtimes: value["Runtimes"] == null ? undefined : mapValues(value["Runtimes"], RuntimeToJSON), + DefaultRuntime: value["DefaultRuntime"], + Swarm: SwarmInfoToJSON(value["Swarm"]), + LiveRestoreEnabled: value["LiveRestoreEnabled"], + Isolation: value["Isolation"], + InitBinary: value["InitBinary"], + ContainerdCommit: CommitToJSON(value["ContainerdCommit"]), + RuncCommit: CommitToJSON(value["RuncCommit"]), + InitCommit: CommitToJSON(value["InitCommit"]), + SecurityOptions: value["SecurityOptions"], + ProductLicense: value["ProductLicense"], + DefaultAddressPools: + value["DefaultAddressPools"] == null + ? undefined + : (value["DefaultAddressPools"] as Array).map( + SystemInfoDefaultAddressPoolsInnerToJSON, + ), + Warnings: value["Warnings"], + }; } - diff --git a/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts b/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts index 35dba90485..90b5c89996 100644 --- a/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts +++ b/src/clients/docker/models/SystemInfoDefaultAddressPoolsInner.ts @@ -2,72 +2,81 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SystemInfoDefaultAddressPoolsInner */ export interface SystemInfoDefaultAddressPoolsInner { - /** - * The network address in CIDR format - * @type {string} - * @memberof SystemInfoDefaultAddressPoolsInner - */ - Base?: string; - /** - * The network pool size - * @type {number} - * @memberof SystemInfoDefaultAddressPoolsInner - */ - Size?: number; + /** + * The network address in CIDR format + * @type {string} + * @memberof SystemInfoDefaultAddressPoolsInner + */ + Base?: string; + /** + * The network pool size + * @type {number} + * @memberof SystemInfoDefaultAddressPoolsInner + */ + Size?: number; } /** * Check if a given object implements the SystemInfoDefaultAddressPoolsInner interface. */ -export function instanceOfSystemInfoDefaultAddressPoolsInner(value: object): value is SystemInfoDefaultAddressPoolsInner { - return true; +export function instanceOfSystemInfoDefaultAddressPoolsInner( + value: object, +): value is SystemInfoDefaultAddressPoolsInner { + return true; } -export function SystemInfoDefaultAddressPoolsInnerFromJSON(json: any): SystemInfoDefaultAddressPoolsInner { - return SystemInfoDefaultAddressPoolsInnerFromJSONTyped(json, false); +export function SystemInfoDefaultAddressPoolsInnerFromJSON( + json: any, +): SystemInfoDefaultAddressPoolsInner { + return SystemInfoDefaultAddressPoolsInnerFromJSONTyped(json, false); } -export function SystemInfoDefaultAddressPoolsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemInfoDefaultAddressPoolsInner { - if (json == null) { - return json; - } - return { - - 'Base': json['Base'] == null ? undefined : json['Base'], - 'Size': json['Size'] == null ? undefined : json['Size'], - }; +export function SystemInfoDefaultAddressPoolsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SystemInfoDefaultAddressPoolsInner { + if (json == null) { + return json; + } + return { + Base: json["Base"] == null ? undefined : json["Base"], + Size: json["Size"] == null ? undefined : json["Size"], + }; } -export function SystemInfoDefaultAddressPoolsInnerToJSON(json: any): SystemInfoDefaultAddressPoolsInner { - return SystemInfoDefaultAddressPoolsInnerToJSONTyped(json, false); +export function SystemInfoDefaultAddressPoolsInnerToJSON( + json: any, +): SystemInfoDefaultAddressPoolsInner { + return SystemInfoDefaultAddressPoolsInnerToJSONTyped(json, false); } -export function SystemInfoDefaultAddressPoolsInnerToJSONTyped(value?: SystemInfoDefaultAddressPoolsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemInfoDefaultAddressPoolsInnerToJSONTyped( + value?: SystemInfoDefaultAddressPoolsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Base': value['Base'], - 'Size': value['Size'], - }; + return { + Base: value["Base"], + Size: value["Size"], + }; } - diff --git a/src/clients/docker/models/SystemVersion.ts b/src/clients/docker/models/SystemVersion.ts index b2a5edcb4e..2b419248b6 100644 --- a/src/clients/docker/models/SystemVersion.ts +++ b/src/clients/docker/models/SystemVersion.ts @@ -2,183 +2,190 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SystemVersionPlatform } from './SystemVersionPlatform'; +import { mapValues } from "../runtime"; +import type { SystemVersionPlatform } from "./SystemVersionPlatform"; import { - SystemVersionPlatformFromJSON, - SystemVersionPlatformFromJSONTyped, - SystemVersionPlatformToJSON, - SystemVersionPlatformToJSONTyped, -} from './SystemVersionPlatform'; -import type { SystemVersionComponentsInner } from './SystemVersionComponentsInner'; + SystemVersionPlatformFromJSON, + SystemVersionPlatformFromJSONTyped, + SystemVersionPlatformToJSON, + SystemVersionPlatformToJSONTyped, +} from "./SystemVersionPlatform"; +import type { SystemVersionComponentsInner } from "./SystemVersionComponentsInner"; import { - SystemVersionComponentsInnerFromJSON, - SystemVersionComponentsInnerFromJSONTyped, - SystemVersionComponentsInnerToJSON, - SystemVersionComponentsInnerToJSONTyped, -} from './SystemVersionComponentsInner'; + SystemVersionComponentsInnerFromJSON, + SystemVersionComponentsInnerFromJSONTyped, + SystemVersionComponentsInnerToJSON, + SystemVersionComponentsInnerToJSONTyped, +} from "./SystemVersionComponentsInner"; /** * Response of Engine API: GET "/version" - * + * * @export * @interface SystemVersion */ export interface SystemVersion { - /** - * - * @type {SystemVersionPlatform} - * @memberof SystemVersion - */ - Platform?: SystemVersionPlatform; - /** - * Information about system components - * - * @type {Array} - * @memberof SystemVersion - */ - Components?: Array; - /** - * The version of the daemon - * @type {string} - * @memberof SystemVersion - */ - Version?: string; - /** - * The default (and highest) API version that is supported by the daemon - * - * @type {string} - * @memberof SystemVersion - */ - ApiVersion?: string; - /** - * The minimum API version that is supported by the daemon - * - * @type {string} - * @memberof SystemVersion - */ - MinAPIVersion?: string; - /** - * The Git commit of the source code that was used to build the daemon - * - * @type {string} - * @memberof SystemVersion - */ - GitCommit?: string; - /** - * The version Go used to compile the daemon, and the version of the Go - * runtime in use. - * - * @type {string} - * @memberof SystemVersion - */ - GoVersion?: string; - /** - * The operating system that the daemon is running on ("linux" or "windows") - * - * @type {string} - * @memberof SystemVersion - */ - Os?: string; - /** - * The architecture that the daemon is running on - * - * @type {string} - * @memberof SystemVersion - */ - Arch?: string; - /** - * The kernel version (`uname -r`) that the daemon is running on. - * - * This field is omitted when empty. - * - * @type {string} - * @memberof SystemVersion - */ - KernelVersion?: string; - /** - * Indicates if the daemon is started with experimental features enabled. - * - * This field is omitted when empty / false. - * - * @type {boolean} - * @memberof SystemVersion - */ - Experimental?: boolean; - /** - * The date and time that the daemon was compiled. - * - * @type {string} - * @memberof SystemVersion - */ - BuildTime?: string; + /** + * + * @type {SystemVersionPlatform} + * @memberof SystemVersion + */ + Platform?: SystemVersionPlatform; + /** + * Information about system components + * + * @type {Array} + * @memberof SystemVersion + */ + Components?: Array; + /** + * The version of the daemon + * @type {string} + * @memberof SystemVersion + */ + Version?: string; + /** + * The default (and highest) API version that is supported by the daemon + * + * @type {string} + * @memberof SystemVersion + */ + ApiVersion?: string; + /** + * The minimum API version that is supported by the daemon + * + * @type {string} + * @memberof SystemVersion + */ + MinAPIVersion?: string; + /** + * The Git commit of the source code that was used to build the daemon + * + * @type {string} + * @memberof SystemVersion + */ + GitCommit?: string; + /** + * The version Go used to compile the daemon, and the version of the Go + * runtime in use. + * + * @type {string} + * @memberof SystemVersion + */ + GoVersion?: string; + /** + * The operating system that the daemon is running on ("linux" or "windows") + * + * @type {string} + * @memberof SystemVersion + */ + Os?: string; + /** + * The architecture that the daemon is running on + * + * @type {string} + * @memberof SystemVersion + */ + Arch?: string; + /** + * The kernel version (`uname -r`) that the daemon is running on. + * + * This field is omitted when empty. + * + * @type {string} + * @memberof SystemVersion + */ + KernelVersion?: string; + /** + * Indicates if the daemon is started with experimental features enabled. + * + * This field is omitted when empty / false. + * + * @type {boolean} + * @memberof SystemVersion + */ + Experimental?: boolean; + /** + * The date and time that the daemon was compiled. + * + * @type {string} + * @memberof SystemVersion + */ + BuildTime?: string; } /** * Check if a given object implements the SystemVersion interface. */ export function instanceOfSystemVersion(value: object): value is SystemVersion { - return true; + return true; } export function SystemVersionFromJSON(json: any): SystemVersion { - return SystemVersionFromJSONTyped(json, false); + return SystemVersionFromJSONTyped(json, false); } export function SystemVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersion { - if (json == null) { - return json; - } - return { - - 'Platform': json['Platform'] == null ? undefined : SystemVersionPlatformFromJSON(json['Platform']), - 'Components': json['Components'] == null ? undefined : ((json['Components'] as Array).map(SystemVersionComponentsInnerFromJSON)), - 'Version': json['Version'] == null ? undefined : json['Version'], - 'ApiVersion': json['ApiVersion'] == null ? undefined : json['ApiVersion'], - 'MinAPIVersion': json['MinAPIVersion'] == null ? undefined : json['MinAPIVersion'], - 'GitCommit': json['GitCommit'] == null ? undefined : json['GitCommit'], - 'GoVersion': json['GoVersion'] == null ? undefined : json['GoVersion'], - 'Os': json['Os'] == null ? undefined : json['Os'], - 'Arch': json['Arch'] == null ? undefined : json['Arch'], - 'KernelVersion': json['KernelVersion'] == null ? undefined : json['KernelVersion'], - 'Experimental': json['Experimental'] == null ? undefined : json['Experimental'], - 'BuildTime': json['BuildTime'] == null ? undefined : json['BuildTime'], - }; + if (json == null) { + return json; + } + return { + Platform: + json["Platform"] == null ? undefined : SystemVersionPlatformFromJSON(json["Platform"]), + Components: + json["Components"] == null + ? undefined + : (json["Components"] as Array).map(SystemVersionComponentsInnerFromJSON), + Version: json["Version"] == null ? undefined : json["Version"], + ApiVersion: json["ApiVersion"] == null ? undefined : json["ApiVersion"], + MinAPIVersion: json["MinAPIVersion"] == null ? undefined : json["MinAPIVersion"], + GitCommit: json["GitCommit"] == null ? undefined : json["GitCommit"], + GoVersion: json["GoVersion"] == null ? undefined : json["GoVersion"], + Os: json["Os"] == null ? undefined : json["Os"], + Arch: json["Arch"] == null ? undefined : json["Arch"], + KernelVersion: json["KernelVersion"] == null ? undefined : json["KernelVersion"], + Experimental: json["Experimental"] == null ? undefined : json["Experimental"], + BuildTime: json["BuildTime"] == null ? undefined : json["BuildTime"], + }; } export function SystemVersionToJSON(json: any): SystemVersion { - return SystemVersionToJSONTyped(json, false); + return SystemVersionToJSONTyped(json, false); } -export function SystemVersionToJSONTyped(value?: SystemVersion | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemVersionToJSONTyped( + value?: SystemVersion | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Platform': SystemVersionPlatformToJSON(value['Platform']), - 'Components': value['Components'] == null ? undefined : ((value['Components'] as Array).map(SystemVersionComponentsInnerToJSON)), - 'Version': value['Version'], - 'ApiVersion': value['ApiVersion'], - 'MinAPIVersion': value['MinAPIVersion'], - 'GitCommit': value['GitCommit'], - 'GoVersion': value['GoVersion'], - 'Os': value['Os'], - 'Arch': value['Arch'], - 'KernelVersion': value['KernelVersion'], - 'Experimental': value['Experimental'], - 'BuildTime': value['BuildTime'], - }; + return { + Platform: SystemVersionPlatformToJSON(value["Platform"]), + Components: + value["Components"] == null + ? undefined + : (value["Components"] as Array).map(SystemVersionComponentsInnerToJSON), + Version: value["Version"], + ApiVersion: value["ApiVersion"], + MinAPIVersion: value["MinAPIVersion"], + GitCommit: value["GitCommit"], + GoVersion: value["GoVersion"], + Os: value["Os"], + Arch: value["Arch"], + KernelVersion: value["KernelVersion"], + Experimental: value["Experimental"], + BuildTime: value["BuildTime"], + }; } - diff --git a/src/clients/docker/models/SystemVersionComponentsInner.ts b/src/clients/docker/models/SystemVersionComponentsInner.ts index 2c4621f037..9b72e06f37 100644 --- a/src/clients/docker/models/SystemVersionComponentsInner.ts +++ b/src/clients/docker/models/SystemVersionComponentsInner.ts @@ -2,90 +2,95 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SystemVersionComponentsInner */ export interface SystemVersionComponentsInner { - /** - * Name of the component - * - * @type {string} - * @memberof SystemVersionComponentsInner - */ - Name: string; - /** - * Version of the component - * - * @type {string} - * @memberof SystemVersionComponentsInner - */ - Version: string; - /** - * Key/value pairs of strings with additional information about the - * component. These values are intended for informational purposes - * only, and their content is not defined, and not part of the API - * specification. - * - * These messages can be printed by the client as information to the user. - * - * @type {object} - * @memberof SystemVersionComponentsInner - */ - Details?: object | null; + /** + * Name of the component + * + * @type {string} + * @memberof SystemVersionComponentsInner + */ + Name: string; + /** + * Version of the component + * + * @type {string} + * @memberof SystemVersionComponentsInner + */ + Version: string; + /** + * Key/value pairs of strings with additional information about the + * component. These values are intended for informational purposes + * only, and their content is not defined, and not part of the API + * specification. + * + * These messages can be printed by the client as information to the user. + * + * @type {object} + * @memberof SystemVersionComponentsInner + */ + Details?: object | null; } /** * Check if a given object implements the SystemVersionComponentsInner interface. */ -export function instanceOfSystemVersionComponentsInner(value: object): value is SystemVersionComponentsInner { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Version' in value) || value['Version'] === undefined) return false; - return true; +export function instanceOfSystemVersionComponentsInner( + value: object, +): value is SystemVersionComponentsInner { + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Version" in value) || value["Version"] === undefined) return false; + return true; } export function SystemVersionComponentsInnerFromJSON(json: any): SystemVersionComponentsInner { - return SystemVersionComponentsInnerFromJSONTyped(json, false); + return SystemVersionComponentsInnerFromJSONTyped(json, false); } -export function SystemVersionComponentsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersionComponentsInner { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Version': json['Version'], - 'Details': json['Details'] == null ? undefined : json['Details'], - }; +export function SystemVersionComponentsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SystemVersionComponentsInner { + if (json == null) { + return json; + } + return { + Name: json["Name"], + Version: json["Version"], + Details: json["Details"] == null ? undefined : json["Details"], + }; } export function SystemVersionComponentsInnerToJSON(json: any): SystemVersionComponentsInner { - return SystemVersionComponentsInnerToJSONTyped(json, false); + return SystemVersionComponentsInnerToJSONTyped(json, false); } -export function SystemVersionComponentsInnerToJSONTyped(value?: SystemVersionComponentsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemVersionComponentsInnerToJSONTyped( + value?: SystemVersionComponentsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Version': value['Version'], - 'Details': value['Details'], - }; + return { + Name: value["Name"], + Version: value["Version"], + Details: value["Details"], + }; } - diff --git a/src/clients/docker/models/SystemVersionPlatform.ts b/src/clients/docker/models/SystemVersionPlatform.ts index 52d3b8bc68..91b2690408 100644 --- a/src/clients/docker/models/SystemVersionPlatform.ts +++ b/src/clients/docker/models/SystemVersionPlatform.ts @@ -2,65 +2,68 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SystemVersionPlatform */ export interface SystemVersionPlatform { - /** - * - * @type {string} - * @memberof SystemVersionPlatform - */ - Name: string; + /** + * + * @type {string} + * @memberof SystemVersionPlatform + */ + Name: string; } /** * Check if a given object implements the SystemVersionPlatform interface. */ export function instanceOfSystemVersionPlatform(value: object): value is SystemVersionPlatform { - if (!('Name' in value) || value['Name'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + return true; } export function SystemVersionPlatformFromJSON(json: any): SystemVersionPlatform { - return SystemVersionPlatformFromJSONTyped(json, false); + return SystemVersionPlatformFromJSONTyped(json, false); } -export function SystemVersionPlatformFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemVersionPlatform { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - }; +export function SystemVersionPlatformFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SystemVersionPlatform { + if (json == null) { + return json; + } + return { + Name: json["Name"], + }; } export function SystemVersionPlatformToJSON(json: any): SystemVersionPlatform { - return SystemVersionPlatformToJSONTyped(json, false); + return SystemVersionPlatformToJSONTyped(json, false); } -export function SystemVersionPlatformToJSONTyped(value?: SystemVersionPlatform | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SystemVersionPlatformToJSONTyped( + value?: SystemVersionPlatform | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - }; + return { + Name: value["Name"], + }; } - diff --git a/src/clients/docker/models/TLSInfo.ts b/src/clients/docker/models/TLSInfo.ts index f075ebe3c8..b7d87524eb 100644 --- a/src/clients/docker/models/TLSInfo.ts +++ b/src/clients/docker/models/TLSInfo.ts @@ -2,85 +2,86 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Information about the issuer of leaf TLS certificates and the trusted root * CA certificate. - * + * * @export * @interface TLSInfo */ export interface TLSInfo { - /** - * The root CA certificate(s) that are used to validate leaf TLS - * certificates. - * - * @type {string} - * @memberof TLSInfo - */ - TrustRoot?: string; - /** - * The base64-url-safe-encoded raw subject bytes of the issuer. - * @type {string} - * @memberof TLSInfo - */ - CertIssuerSubject?: string; - /** - * The base64-url-safe-encoded raw public key bytes of the issuer. - * - * @type {string} - * @memberof TLSInfo - */ - CertIssuerPublicKey?: string; + /** + * The root CA certificate(s) that are used to validate leaf TLS + * certificates. + * + * @type {string} + * @memberof TLSInfo + */ + TrustRoot?: string; + /** + * The base64-url-safe-encoded raw subject bytes of the issuer. + * @type {string} + * @memberof TLSInfo + */ + CertIssuerSubject?: string; + /** + * The base64-url-safe-encoded raw public key bytes of the issuer. + * + * @type {string} + * @memberof TLSInfo + */ + CertIssuerPublicKey?: string; } /** * Check if a given object implements the TLSInfo interface. */ export function instanceOfTLSInfo(value: object): value is TLSInfo { - return true; + return true; } export function TLSInfoFromJSON(json: any): TLSInfo { - return TLSInfoFromJSONTyped(json, false); + return TLSInfoFromJSONTyped(json, false); } export function TLSInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TLSInfo { - if (json == null) { - return json; - } - return { - - 'TrustRoot': json['TrustRoot'] == null ? undefined : json['TrustRoot'], - 'CertIssuerSubject': json['CertIssuerSubject'] == null ? undefined : json['CertIssuerSubject'], - 'CertIssuerPublicKey': json['CertIssuerPublicKey'] == null ? undefined : json['CertIssuerPublicKey'], - }; + if (json == null) { + return json; + } + return { + TrustRoot: json["TrustRoot"] == null ? undefined : json["TrustRoot"], + CertIssuerSubject: json["CertIssuerSubject"] == null ? undefined : json["CertIssuerSubject"], + CertIssuerPublicKey: + json["CertIssuerPublicKey"] == null ? undefined : json["CertIssuerPublicKey"], + }; } export function TLSInfoToJSON(json: any): TLSInfo { - return TLSInfoToJSONTyped(json, false); + return TLSInfoToJSONTyped(json, false); } -export function TLSInfoToJSONTyped(value?: TLSInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TLSInfoToJSONTyped( + value?: TLSInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'TrustRoot': value['TrustRoot'], - 'CertIssuerSubject': value['CertIssuerSubject'], - 'CertIssuerPublicKey': value['CertIssuerPublicKey'], - }; + return { + TrustRoot: value["TrustRoot"], + CertIssuerSubject: value["CertIssuerSubject"], + CertIssuerPublicKey: value["CertIssuerPublicKey"], + }; } - diff --git a/src/clients/docker/models/Task.ts b/src/clients/docker/models/Task.ts index f2a5afff43..fa40295735 100644 --- a/src/clients/docker/models/Task.ts +++ b/src/clients/docker/models/Task.ts @@ -2,208 +2,211 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GenericResourcesInner } from './GenericResourcesInner'; +import { mapValues } from "../runtime"; +import type { GenericResourcesInner } from "./GenericResourcesInner"; import { - GenericResourcesInnerFromJSON, - GenericResourcesInnerFromJSONTyped, - GenericResourcesInnerToJSON, - GenericResourcesInnerToJSONTyped, -} from './GenericResourcesInner'; -import type { ObjectVersion } from './ObjectVersion'; + GenericResourcesInnerFromJSON, + GenericResourcesInnerFromJSONTyped, + GenericResourcesInnerToJSON, + GenericResourcesInnerToJSONTyped, +} from "./GenericResourcesInner"; +import type { ObjectVersion } from "./ObjectVersion"; import { - ObjectVersionFromJSON, - ObjectVersionFromJSONTyped, - ObjectVersionToJSON, - ObjectVersionToJSONTyped, -} from './ObjectVersion'; -import type { TaskSpec } from './TaskSpec'; + ObjectVersionFromJSON, + ObjectVersionFromJSONTyped, + ObjectVersionToJSON, + ObjectVersionToJSONTyped, +} from "./ObjectVersion"; +import type { TaskSpec } from "./TaskSpec"; import { - TaskSpecFromJSON, - TaskSpecFromJSONTyped, - TaskSpecToJSON, - TaskSpecToJSONTyped, -} from './TaskSpec'; -import type { TaskStatus } from './TaskStatus'; + TaskSpecFromJSON, + TaskSpecFromJSONTyped, + TaskSpecToJSON, + TaskSpecToJSONTyped, +} from "./TaskSpec"; +import type { TaskStatus } from "./TaskStatus"; import { - TaskStatusFromJSON, - TaskStatusFromJSONTyped, - TaskStatusToJSON, - TaskStatusToJSONTyped, -} from './TaskStatus'; -import type { TaskState } from './TaskState'; + TaskStatusFromJSON, + TaskStatusFromJSONTyped, + TaskStatusToJSON, + TaskStatusToJSONTyped, +} from "./TaskStatus"; +import type { TaskState } from "./TaskState"; import { - TaskStateFromJSON, - TaskStateFromJSONTyped, - TaskStateToJSON, - TaskStateToJSONTyped, -} from './TaskState'; + TaskStateFromJSON, + TaskStateFromJSONTyped, + TaskStateToJSON, + TaskStateToJSONTyped, +} from "./TaskState"; /** - * + * * @export * @interface Task */ export interface Task { - /** - * The ID of the task. - * @type {string} - * @memberof Task - */ - ID?: string; - /** - * - * @type {ObjectVersion} - * @memberof Task - */ - Version?: ObjectVersion; - /** - * - * @type {string} - * @memberof Task - */ - CreatedAt?: string; - /** - * - * @type {string} - * @memberof Task - */ - UpdatedAt?: string; - /** - * Name of the task. - * @type {string} - * @memberof Task - */ - Name?: string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Task - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {TaskSpec} - * @memberof Task - */ - Spec?: TaskSpec; - /** - * The ID of the service this task is part of. - * @type {string} - * @memberof Task - */ - ServiceID?: string; - /** - * - * @type {number} - * @memberof Task - */ - Slot?: number; - /** - * The ID of the node that this task is on. - * @type {string} - * @memberof Task - */ - NodeID?: string; - /** - * User-defined resources can be either Integer resources (e.g, `SSD=3`) or - * String resources (e.g, `GPU=UUID1`). - * - * @type {Array} - * @memberof Task - */ - AssignedGenericResources?: Array; - /** - * - * @type {TaskStatus} - * @memberof Task - */ - Status?: TaskStatus; - /** - * - * @type {TaskState} - * @memberof Task - */ - DesiredState?: TaskState; - /** - * - * @type {ObjectVersion} - * @memberof Task - */ - JobIteration?: ObjectVersion; + /** + * The ID of the task. + * @type {string} + * @memberof Task + */ + ID?: string; + /** + * + * @type {ObjectVersion} + * @memberof Task + */ + Version?: ObjectVersion; + /** + * + * @type {string} + * @memberof Task + */ + CreatedAt?: string; + /** + * + * @type {string} + * @memberof Task + */ + UpdatedAt?: string; + /** + * Name of the task. + * @type {string} + * @memberof Task + */ + Name?: string; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof Task + */ + Labels?: { [key: string]: string }; + /** + * + * @type {TaskSpec} + * @memberof Task + */ + Spec?: TaskSpec; + /** + * The ID of the service this task is part of. + * @type {string} + * @memberof Task + */ + ServiceID?: string; + /** + * + * @type {number} + * @memberof Task + */ + Slot?: number; + /** + * The ID of the node that this task is on. + * @type {string} + * @memberof Task + */ + NodeID?: string; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + * String resources (e.g, `GPU=UUID1`). + * + * @type {Array} + * @memberof Task + */ + AssignedGenericResources?: Array; + /** + * + * @type {TaskStatus} + * @memberof Task + */ + Status?: TaskStatus; + /** + * + * @type {TaskState} + * @memberof Task + */ + DesiredState?: TaskState; + /** + * + * @type {ObjectVersion} + * @memberof Task + */ + JobIteration?: ObjectVersion; } - - /** * Check if a given object implements the Task interface. */ export function instanceOfTask(value: object): value is Task { - return true; + return true; } export function TaskFromJSON(json: any): Task { - return TaskFromJSONTyped(json, false); + return TaskFromJSONTyped(json, false); } export function TaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): Task { - if (json == null) { - return json; - } - return { - - 'ID': json['ID'] == null ? undefined : json['ID'], - 'Version': json['Version'] == null ? undefined : ObjectVersionFromJSON(json['Version']), - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'UpdatedAt': json['UpdatedAt'] == null ? undefined : json['UpdatedAt'], - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Spec': json['Spec'] == null ? undefined : TaskSpecFromJSON(json['Spec']), - 'ServiceID': json['ServiceID'] == null ? undefined : json['ServiceID'], - 'Slot': json['Slot'] == null ? undefined : json['Slot'], - 'NodeID': json['NodeID'] == null ? undefined : json['NodeID'], - 'AssignedGenericResources': json['AssignedGenericResources'] == null ? undefined : ((json['AssignedGenericResources'] as Array).map(GenericResourcesInnerFromJSON)), - 'Status': json['Status'] == null ? undefined : TaskStatusFromJSON(json['Status']), - 'DesiredState': json['DesiredState'] == null ? undefined : TaskStateFromJSON(json['DesiredState']), - 'JobIteration': json['JobIteration'] == null ? undefined : ObjectVersionFromJSON(json['JobIteration']), - }; + if (json == null) { + return json; + } + return { + ID: json["ID"] == null ? undefined : json["ID"], + Version: json["Version"] == null ? undefined : ObjectVersionFromJSON(json["Version"]), + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + UpdatedAt: json["UpdatedAt"] == null ? undefined : json["UpdatedAt"], + Name: json["Name"] == null ? undefined : json["Name"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Spec: json["Spec"] == null ? undefined : TaskSpecFromJSON(json["Spec"]), + ServiceID: json["ServiceID"] == null ? undefined : json["ServiceID"], + Slot: json["Slot"] == null ? undefined : json["Slot"], + NodeID: json["NodeID"] == null ? undefined : json["NodeID"], + AssignedGenericResources: + json["AssignedGenericResources"] == null + ? undefined + : (json["AssignedGenericResources"] as Array).map(GenericResourcesInnerFromJSON), + Status: json["Status"] == null ? undefined : TaskStatusFromJSON(json["Status"]), + DesiredState: + json["DesiredState"] == null ? undefined : TaskStateFromJSON(json["DesiredState"]), + JobIteration: + json["JobIteration"] == null ? undefined : ObjectVersionFromJSON(json["JobIteration"]), + }; } export function TaskToJSON(json: any): Task { - return TaskToJSONTyped(json, false); + return TaskToJSONTyped(json, false); } export function TaskToJSONTyped(value?: Task | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'ID': value['ID'], - 'Version': ObjectVersionToJSON(value['Version']), - 'CreatedAt': value['CreatedAt'], - 'UpdatedAt': value['UpdatedAt'], - 'Name': value['Name'], - 'Labels': value['Labels'], - 'Spec': TaskSpecToJSON(value['Spec']), - 'ServiceID': value['ServiceID'], - 'Slot': value['Slot'], - 'NodeID': value['NodeID'], - 'AssignedGenericResources': value['AssignedGenericResources'] == null ? undefined : ((value['AssignedGenericResources'] as Array).map(GenericResourcesInnerToJSON)), - 'Status': TaskStatusToJSON(value['Status']), - 'DesiredState': TaskStateToJSON(value['DesiredState']), - 'JobIteration': ObjectVersionToJSON(value['JobIteration']), - }; + return { + ID: value["ID"], + Version: ObjectVersionToJSON(value["Version"]), + CreatedAt: value["CreatedAt"], + UpdatedAt: value["UpdatedAt"], + Name: value["Name"], + Labels: value["Labels"], + Spec: TaskSpecToJSON(value["Spec"]), + ServiceID: value["ServiceID"], + Slot: value["Slot"], + NodeID: value["NodeID"], + AssignedGenericResources: + value["AssignedGenericResources"] == null + ? undefined + : (value["AssignedGenericResources"] as Array).map(GenericResourcesInnerToJSON), + Status: TaskStatusToJSON(value["Status"]), + DesiredState: TaskStateToJSON(value["DesiredState"]), + JobIteration: ObjectVersionToJSON(value["JobIteration"]), + }; } - diff --git a/src/clients/docker/models/TaskSpec.ts b/src/clients/docker/models/TaskSpec.ts index 968e7d6de1..1caea4c0fe 100644 --- a/src/clients/docker/models/TaskSpec.ts +++ b/src/clients/docker/models/TaskSpec.ts @@ -2,73 +2,73 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { NetworkAttachmentConfig } from './NetworkAttachmentConfig'; +import { mapValues } from "../runtime"; +import type { NetworkAttachmentConfig } from "./NetworkAttachmentConfig"; import { - NetworkAttachmentConfigFromJSON, - NetworkAttachmentConfigFromJSONTyped, - NetworkAttachmentConfigToJSON, - NetworkAttachmentConfigToJSONTyped, -} from './NetworkAttachmentConfig'; -import type { TaskSpecContainerSpec } from './TaskSpecContainerSpec'; + NetworkAttachmentConfigFromJSON, + NetworkAttachmentConfigFromJSONTyped, + NetworkAttachmentConfigToJSON, + NetworkAttachmentConfigToJSONTyped, +} from "./NetworkAttachmentConfig"; +import type { TaskSpecContainerSpec } from "./TaskSpecContainerSpec"; import { - TaskSpecContainerSpecFromJSON, - TaskSpecContainerSpecFromJSONTyped, - TaskSpecContainerSpecToJSON, - TaskSpecContainerSpecToJSONTyped, -} from './TaskSpecContainerSpec'; -import type { TaskSpecPluginSpec } from './TaskSpecPluginSpec'; + TaskSpecContainerSpecFromJSON, + TaskSpecContainerSpecFromJSONTyped, + TaskSpecContainerSpecToJSON, + TaskSpecContainerSpecToJSONTyped, +} from "./TaskSpecContainerSpec"; +import type { TaskSpecPluginSpec } from "./TaskSpecPluginSpec"; import { - TaskSpecPluginSpecFromJSON, - TaskSpecPluginSpecFromJSONTyped, - TaskSpecPluginSpecToJSON, - TaskSpecPluginSpecToJSONTyped, -} from './TaskSpecPluginSpec'; -import type { TaskSpecRestartPolicy } from './TaskSpecRestartPolicy'; + TaskSpecPluginSpecFromJSON, + TaskSpecPluginSpecFromJSONTyped, + TaskSpecPluginSpecToJSON, + TaskSpecPluginSpecToJSONTyped, +} from "./TaskSpecPluginSpec"; +import type { TaskSpecRestartPolicy } from "./TaskSpecRestartPolicy"; import { - TaskSpecRestartPolicyFromJSON, - TaskSpecRestartPolicyFromJSONTyped, - TaskSpecRestartPolicyToJSON, - TaskSpecRestartPolicyToJSONTyped, -} from './TaskSpecRestartPolicy'; -import type { TaskSpecResources } from './TaskSpecResources'; + TaskSpecRestartPolicyFromJSON, + TaskSpecRestartPolicyFromJSONTyped, + TaskSpecRestartPolicyToJSON, + TaskSpecRestartPolicyToJSONTyped, +} from "./TaskSpecRestartPolicy"; +import type { TaskSpecResources } from "./TaskSpecResources"; import { - TaskSpecResourcesFromJSON, - TaskSpecResourcesFromJSONTyped, - TaskSpecResourcesToJSON, - TaskSpecResourcesToJSONTyped, -} from './TaskSpecResources'; -import type { TaskSpecLogDriver } from './TaskSpecLogDriver'; + TaskSpecResourcesFromJSON, + TaskSpecResourcesFromJSONTyped, + TaskSpecResourcesToJSON, + TaskSpecResourcesToJSONTyped, +} from "./TaskSpecResources"; +import type { TaskSpecLogDriver } from "./TaskSpecLogDriver"; import { - TaskSpecLogDriverFromJSON, - TaskSpecLogDriverFromJSONTyped, - TaskSpecLogDriverToJSON, - TaskSpecLogDriverToJSONTyped, -} from './TaskSpecLogDriver'; -import type { TaskSpecNetworkAttachmentSpec } from './TaskSpecNetworkAttachmentSpec'; + TaskSpecLogDriverFromJSON, + TaskSpecLogDriverFromJSONTyped, + TaskSpecLogDriverToJSON, + TaskSpecLogDriverToJSONTyped, +} from "./TaskSpecLogDriver"; +import type { TaskSpecNetworkAttachmentSpec } from "./TaskSpecNetworkAttachmentSpec"; import { - TaskSpecNetworkAttachmentSpecFromJSON, - TaskSpecNetworkAttachmentSpecFromJSONTyped, - TaskSpecNetworkAttachmentSpecToJSON, - TaskSpecNetworkAttachmentSpecToJSONTyped, -} from './TaskSpecNetworkAttachmentSpec'; -import type { TaskSpecPlacement } from './TaskSpecPlacement'; + TaskSpecNetworkAttachmentSpecFromJSON, + TaskSpecNetworkAttachmentSpecFromJSONTyped, + TaskSpecNetworkAttachmentSpecToJSON, + TaskSpecNetworkAttachmentSpecToJSONTyped, +} from "./TaskSpecNetworkAttachmentSpec"; +import type { TaskSpecPlacement } from "./TaskSpecPlacement"; import { - TaskSpecPlacementFromJSON, - TaskSpecPlacementFromJSONTyped, - TaskSpecPlacementToJSON, - TaskSpecPlacementToJSONTyped, -} from './TaskSpecPlacement'; + TaskSpecPlacementFromJSON, + TaskSpecPlacementFromJSONTyped, + TaskSpecPlacementToJSON, + TaskSpecPlacementToJSONTyped, +} from "./TaskSpecPlacement"; /** * User modifiable task configuration. @@ -76,122 +76,138 @@ import { * @interface TaskSpec */ export interface TaskSpec { - /** - * - * @type {TaskSpecPluginSpec} - * @memberof TaskSpec - */ - PluginSpec?: TaskSpecPluginSpec; - /** - * - * @type {TaskSpecContainerSpec} - * @memberof TaskSpec - */ - ContainerSpec?: TaskSpecContainerSpec; - /** - * - * @type {TaskSpecNetworkAttachmentSpec} - * @memberof TaskSpec - */ - NetworkAttachmentSpec?: TaskSpecNetworkAttachmentSpec; - /** - * - * @type {TaskSpecResources} - * @memberof TaskSpec - */ - Resources?: TaskSpecResources; - /** - * - * @type {TaskSpecRestartPolicy} - * @memberof TaskSpec - */ - RestartPolicy?: TaskSpecRestartPolicy; - /** - * - * @type {TaskSpecPlacement} - * @memberof TaskSpec - */ - Placement?: TaskSpecPlacement; - /** - * A counter that triggers an update even if no relevant parameters have - * been changed. - * - * @type {number} - * @memberof TaskSpec - */ - ForceUpdate?: number; - /** - * Runtime is the type of runtime specified for the task executor. - * - * @type {string} - * @memberof TaskSpec - */ - Runtime?: string; - /** - * Specifies which networks the service should attach to. - * @type {Array} - * @memberof TaskSpec - */ - Networks?: Array; - /** - * - * @type {TaskSpecLogDriver} - * @memberof TaskSpec - */ - LogDriver?: TaskSpecLogDriver; + /** + * + * @type {TaskSpecPluginSpec} + * @memberof TaskSpec + */ + PluginSpec?: TaskSpecPluginSpec; + /** + * + * @type {TaskSpecContainerSpec} + * @memberof TaskSpec + */ + ContainerSpec?: TaskSpecContainerSpec; + /** + * + * @type {TaskSpecNetworkAttachmentSpec} + * @memberof TaskSpec + */ + NetworkAttachmentSpec?: TaskSpecNetworkAttachmentSpec; + /** + * + * @type {TaskSpecResources} + * @memberof TaskSpec + */ + Resources?: TaskSpecResources; + /** + * + * @type {TaskSpecRestartPolicy} + * @memberof TaskSpec + */ + RestartPolicy?: TaskSpecRestartPolicy; + /** + * + * @type {TaskSpecPlacement} + * @memberof TaskSpec + */ + Placement?: TaskSpecPlacement; + /** + * A counter that triggers an update even if no relevant parameters have + * been changed. + * + * @type {number} + * @memberof TaskSpec + */ + ForceUpdate?: number; + /** + * Runtime is the type of runtime specified for the task executor. + * + * @type {string} + * @memberof TaskSpec + */ + Runtime?: string; + /** + * Specifies which networks the service should attach to. + * @type {Array} + * @memberof TaskSpec + */ + Networks?: Array; + /** + * + * @type {TaskSpecLogDriver} + * @memberof TaskSpec + */ + LogDriver?: TaskSpecLogDriver; } /** * Check if a given object implements the TaskSpec interface. */ export function instanceOfTaskSpec(value: object): value is TaskSpec { - return true; + return true; } export function TaskSpecFromJSON(json: any): TaskSpec { - return TaskSpecFromJSONTyped(json, false); + return TaskSpecFromJSONTyped(json, false); } export function TaskSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpec { - if (json == null) { - return json; - } - return { - - 'PluginSpec': json['PluginSpec'] == null ? undefined : TaskSpecPluginSpecFromJSON(json['PluginSpec']), - 'ContainerSpec': json['ContainerSpec'] == null ? undefined : TaskSpecContainerSpecFromJSON(json['ContainerSpec']), - 'NetworkAttachmentSpec': json['NetworkAttachmentSpec'] == null ? undefined : TaskSpecNetworkAttachmentSpecFromJSON(json['NetworkAttachmentSpec']), - 'Resources': json['Resources'] == null ? undefined : TaskSpecResourcesFromJSON(json['Resources']), - 'RestartPolicy': json['RestartPolicy'] == null ? undefined : TaskSpecRestartPolicyFromJSON(json['RestartPolicy']), - 'Placement': json['Placement'] == null ? undefined : TaskSpecPlacementFromJSON(json['Placement']), - 'ForceUpdate': json['ForceUpdate'] == null ? undefined : json['ForceUpdate'], - 'Runtime': json['Runtime'] == null ? undefined : json['Runtime'], - 'Networks': json['Networks'] == null ? undefined : ((json['Networks'] as Array).map(NetworkAttachmentConfigFromJSON)), - 'LogDriver': json['LogDriver'] == null ? undefined : TaskSpecLogDriverFromJSON(json['LogDriver']), - }; + if (json == null) { + return json; + } + return { + PluginSpec: + json["PluginSpec"] == null ? undefined : TaskSpecPluginSpecFromJSON(json["PluginSpec"]), + ContainerSpec: + json["ContainerSpec"] == null + ? undefined + : TaskSpecContainerSpecFromJSON(json["ContainerSpec"]), + NetworkAttachmentSpec: + json["NetworkAttachmentSpec"] == null + ? undefined + : TaskSpecNetworkAttachmentSpecFromJSON(json["NetworkAttachmentSpec"]), + Resources: json["Resources"] == null ? undefined : TaskSpecResourcesFromJSON(json["Resources"]), + RestartPolicy: + json["RestartPolicy"] == null + ? undefined + : TaskSpecRestartPolicyFromJSON(json["RestartPolicy"]), + Placement: json["Placement"] == null ? undefined : TaskSpecPlacementFromJSON(json["Placement"]), + ForceUpdate: json["ForceUpdate"] == null ? undefined : json["ForceUpdate"], + Runtime: json["Runtime"] == null ? undefined : json["Runtime"], + Networks: + json["Networks"] == null + ? undefined + : (json["Networks"] as Array).map(NetworkAttachmentConfigFromJSON), + LogDriver: json["LogDriver"] == null ? undefined : TaskSpecLogDriverFromJSON(json["LogDriver"]), + }; } export function TaskSpecToJSON(json: any): TaskSpec { - return TaskSpecToJSONTyped(json, false); + return TaskSpecToJSONTyped(json, false); } -export function TaskSpecToJSONTyped(value?: TaskSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecToJSONTyped( + value?: TaskSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'PluginSpec': TaskSpecPluginSpecToJSON(value['PluginSpec']), - 'ContainerSpec': TaskSpecContainerSpecToJSON(value['ContainerSpec']), - 'NetworkAttachmentSpec': TaskSpecNetworkAttachmentSpecToJSON(value['NetworkAttachmentSpec']), - 'Resources': TaskSpecResourcesToJSON(value['Resources']), - 'RestartPolicy': TaskSpecRestartPolicyToJSON(value['RestartPolicy']), - 'Placement': TaskSpecPlacementToJSON(value['Placement']), - 'ForceUpdate': value['ForceUpdate'], - 'Runtime': value['Runtime'], - 'Networks': value['Networks'] == null ? undefined : ((value['Networks'] as Array).map(NetworkAttachmentConfigToJSON)), - 'LogDriver': TaskSpecLogDriverToJSON(value['LogDriver']), - }; + return { + PluginSpec: TaskSpecPluginSpecToJSON(value["PluginSpec"]), + ContainerSpec: TaskSpecContainerSpecToJSON(value["ContainerSpec"]), + NetworkAttachmentSpec: TaskSpecNetworkAttachmentSpecToJSON(value["NetworkAttachmentSpec"]), + Resources: TaskSpecResourcesToJSON(value["Resources"]), + RestartPolicy: TaskSpecRestartPolicyToJSON(value["RestartPolicy"]), + Placement: TaskSpecPlacementToJSON(value["Placement"]), + ForceUpdate: value["ForceUpdate"], + Runtime: value["Runtime"], + Networks: + value["Networks"] == null + ? undefined + : (value["Networks"] as Array).map(NetworkAttachmentConfigToJSON), + LogDriver: TaskSpecLogDriverToJSON(value["LogDriver"]), + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpec.ts b/src/clients/docker/models/TaskSpecContainerSpec.ts index 54d8d4095a..af312e868d 100644 --- a/src/clients/docker/models/TaskSpecContainerSpec.ts +++ b/src/clients/docker/models/TaskSpecContainerSpec.ts @@ -2,376 +2,398 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourcesUlimitsInner } from './ResourcesUlimitsInner'; -import { - ResourcesUlimitsInnerFromJSON, - ResourcesUlimitsInnerFromJSONTyped, - ResourcesUlimitsInnerToJSON, - ResourcesUlimitsInnerToJSONTyped, -} from './ResourcesUlimitsInner'; -import type { HealthConfig } from './HealthConfig'; +import { mapValues } from "../runtime"; +import type { ResourcesUlimitsInner } from "./ResourcesUlimitsInner"; import { - HealthConfigFromJSON, - HealthConfigFromJSONTyped, - HealthConfigToJSON, - HealthConfigToJSONTyped, -} from './HealthConfig'; -import type { Mount } from './Mount'; + ResourcesUlimitsInnerFromJSON, + ResourcesUlimitsInnerFromJSONTyped, + ResourcesUlimitsInnerToJSON, + ResourcesUlimitsInnerToJSONTyped, +} from "./ResourcesUlimitsInner"; +import type { HealthConfig } from "./HealthConfig"; import { - MountFromJSON, - MountFromJSONTyped, - MountToJSON, - MountToJSONTyped, -} from './Mount'; -import type { TaskSpecContainerSpecDNSConfig } from './TaskSpecContainerSpecDNSConfig'; + HealthConfigFromJSON, + HealthConfigFromJSONTyped, + HealthConfigToJSON, + HealthConfigToJSONTyped, +} from "./HealthConfig"; +import type { Mount } from "./Mount"; +import { MountFromJSON, MountFromJSONTyped, MountToJSON, MountToJSONTyped } from "./Mount"; +import type { TaskSpecContainerSpecDNSConfig } from "./TaskSpecContainerSpecDNSConfig"; import { - TaskSpecContainerSpecDNSConfigFromJSON, - TaskSpecContainerSpecDNSConfigFromJSONTyped, - TaskSpecContainerSpecDNSConfigToJSON, - TaskSpecContainerSpecDNSConfigToJSONTyped, -} from './TaskSpecContainerSpecDNSConfig'; -import type { TaskSpecContainerSpecPrivileges } from './TaskSpecContainerSpecPrivileges'; + TaskSpecContainerSpecDNSConfigFromJSON, + TaskSpecContainerSpecDNSConfigFromJSONTyped, + TaskSpecContainerSpecDNSConfigToJSON, + TaskSpecContainerSpecDNSConfigToJSONTyped, +} from "./TaskSpecContainerSpecDNSConfig"; +import type { TaskSpecContainerSpecPrivileges } from "./TaskSpecContainerSpecPrivileges"; import { - TaskSpecContainerSpecPrivilegesFromJSON, - TaskSpecContainerSpecPrivilegesFromJSONTyped, - TaskSpecContainerSpecPrivilegesToJSON, - TaskSpecContainerSpecPrivilegesToJSONTyped, -} from './TaskSpecContainerSpecPrivileges'; -import type { TaskSpecContainerSpecConfigsInner } from './TaskSpecContainerSpecConfigsInner'; + TaskSpecContainerSpecPrivilegesFromJSON, + TaskSpecContainerSpecPrivilegesFromJSONTyped, + TaskSpecContainerSpecPrivilegesToJSON, + TaskSpecContainerSpecPrivilegesToJSONTyped, +} from "./TaskSpecContainerSpecPrivileges"; +import type { TaskSpecContainerSpecConfigsInner } from "./TaskSpecContainerSpecConfigsInner"; import { - TaskSpecContainerSpecConfigsInnerFromJSON, - TaskSpecContainerSpecConfigsInnerFromJSONTyped, - TaskSpecContainerSpecConfigsInnerToJSON, - TaskSpecContainerSpecConfigsInnerToJSONTyped, -} from './TaskSpecContainerSpecConfigsInner'; -import type { TaskSpecContainerSpecSecretsInner } from './TaskSpecContainerSpecSecretsInner'; + TaskSpecContainerSpecConfigsInnerFromJSON, + TaskSpecContainerSpecConfigsInnerFromJSONTyped, + TaskSpecContainerSpecConfigsInnerToJSON, + TaskSpecContainerSpecConfigsInnerToJSONTyped, +} from "./TaskSpecContainerSpecConfigsInner"; +import type { TaskSpecContainerSpecSecretsInner } from "./TaskSpecContainerSpecSecretsInner"; import { - TaskSpecContainerSpecSecretsInnerFromJSON, - TaskSpecContainerSpecSecretsInnerFromJSONTyped, - TaskSpecContainerSpecSecretsInnerToJSON, - TaskSpecContainerSpecSecretsInnerToJSONTyped, -} from './TaskSpecContainerSpecSecretsInner'; + TaskSpecContainerSpecSecretsInnerFromJSON, + TaskSpecContainerSpecSecretsInnerFromJSONTyped, + TaskSpecContainerSpecSecretsInnerToJSON, + TaskSpecContainerSpecSecretsInnerToJSONTyped, +} from "./TaskSpecContainerSpecSecretsInner"; /** * 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`. - * + * * @export * @interface TaskSpecContainerSpec */ export interface TaskSpecContainerSpec { - /** - * The image name to use for the container - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Image?: string; - /** - * User-defined key/value data. - * @type {{ [key: string]: string; }} - * @memberof TaskSpecContainerSpec - */ - Labels?: { [key: string]: string; }; - /** - * The command to be run in the image. - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Command?: Array; - /** - * Arguments to the command. - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Args?: Array; - /** - * The hostname to use for the container, as a valid - * [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. - * - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Hostname?: string; - /** - * A list of environment variables in the form `VAR=value`. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Env?: Array; - /** - * The working directory for commands to run in. - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Dir?: string; - /** - * The user inside the container. - * @type {string} - * @memberof TaskSpecContainerSpec - */ - User?: string; - /** - * A list of additional groups that the container process will run as. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Groups?: Array; - /** - * - * @type {TaskSpecContainerSpecPrivileges} - * @memberof TaskSpecContainerSpec - */ - Privileges?: TaskSpecContainerSpecPrivileges; - /** - * Whether a pseudo-TTY should be allocated. - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - TTY?: boolean; - /** - * Open `stdin` - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - OpenStdin?: boolean; - /** - * Mount the container's root filesystem as read only. - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - ReadOnly?: boolean; - /** - * Specification for mounts to be added to containers created as part - * of the service. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Mounts?: Array; - /** - * Signal to stop the container. - * @type {string} - * @memberof TaskSpecContainerSpec - */ - StopSignal?: string; - /** - * Amount of time to wait for the container to terminate before - * forcefully killing it. - * - * @type {number} - * @memberof TaskSpecContainerSpec - */ - StopGracePeriod?: number; - /** - * - * @type {HealthConfig} - * @memberof TaskSpecContainerSpec - */ - HealthCheck?: HealthConfig; - /** - * A list of hostname/IP mappings to add to the container's `hosts` - * file. The format of extra hosts is specified in the - * [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) - * man page: - * - * IP_address canonical_hostname [aliases...] - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Hosts?: Array; - /** - * - * @type {TaskSpecContainerSpecDNSConfig} - * @memberof TaskSpecContainerSpec - */ - DNSConfig?: TaskSpecContainerSpecDNSConfig; - /** - * Secrets contains references to zero or more secrets that will be - * exposed to the service. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Secrets?: Array; - /** - * Configs contains references to zero or more configs that will be - * exposed to the service. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Configs?: Array; - /** - * Isolation technology of the containers running the service. - * (Windows only) - * - * @type {string} - * @memberof TaskSpecContainerSpec - */ - Isolation?: TaskSpecContainerSpecIsolationEnum; - /** - * Run an init inside the container that forwards signals and reaps - * processes. This field is omitted if empty, and the default (as - * configured on the daemon) is used. - * - * @type {boolean} - * @memberof TaskSpecContainerSpec - */ - Init?: boolean | null; - /** - * Set kernel namedspaced parameters (sysctls) in the container. - * The Sysctls option on services accepts the same sysctls as the - * are supported on containers. Note that while the same sysctls are - * supported, no guarantees or checks are made about their - * suitability for a clustered environment, and it's up to the user - * to determine whether a given sysctl will work properly in a - * Service. - * - * @type {{ [key: string]: string; }} - * @memberof TaskSpecContainerSpec - */ - Sysctls?: { [key: string]: string; }; - /** - * A list of kernel capabilities to add to the default set - * for the container. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - CapabilityAdd?: Array; - /** - * A list of kernel capabilities to drop from the default set - * for the container. - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - CapabilityDrop?: Array; - /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @type {Array} - * @memberof TaskSpecContainerSpec - */ - Ulimits?: Array; + /** + * The image name to use for the container + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Image?: string; + /** + * User-defined key/value data. + * @type {{ [key: string]: string; }} + * @memberof TaskSpecContainerSpec + */ + Labels?: { [key: string]: string }; + /** + * The command to be run in the image. + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Command?: Array; + /** + * Arguments to the command. + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Args?: Array; + /** + * The hostname to use for the container, as a valid + * [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + * + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Hostname?: string; + /** + * A list of environment variables in the form `VAR=value`. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Env?: Array; + /** + * The working directory for commands to run in. + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Dir?: string; + /** + * The user inside the container. + * @type {string} + * @memberof TaskSpecContainerSpec + */ + User?: string; + /** + * A list of additional groups that the container process will run as. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Groups?: Array; + /** + * + * @type {TaskSpecContainerSpecPrivileges} + * @memberof TaskSpecContainerSpec + */ + Privileges?: TaskSpecContainerSpecPrivileges; + /** + * Whether a pseudo-TTY should be allocated. + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + TTY?: boolean; + /** + * Open `stdin` + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + OpenStdin?: boolean; + /** + * Mount the container's root filesystem as read only. + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + ReadOnly?: boolean; + /** + * Specification for mounts to be added to containers created as part + * of the service. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Mounts?: Array; + /** + * Signal to stop the container. + * @type {string} + * @memberof TaskSpecContainerSpec + */ + StopSignal?: string; + /** + * Amount of time to wait for the container to terminate before + * forcefully killing it. + * + * @type {number} + * @memberof TaskSpecContainerSpec + */ + StopGracePeriod?: number; + /** + * + * @type {HealthConfig} + * @memberof TaskSpecContainerSpec + */ + HealthCheck?: HealthConfig; + /** + * A list of hostname/IP mappings to add to the container's `hosts` + * file. The format of extra hosts is specified in the + * [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + * man page: + * + * IP_address canonical_hostname [aliases...] + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Hosts?: Array; + /** + * + * @type {TaskSpecContainerSpecDNSConfig} + * @memberof TaskSpecContainerSpec + */ + DNSConfig?: TaskSpecContainerSpecDNSConfig; + /** + * Secrets contains references to zero or more secrets that will be + * exposed to the service. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Secrets?: Array; + /** + * Configs contains references to zero or more configs that will be + * exposed to the service. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Configs?: Array; + /** + * Isolation technology of the containers running the service. + * (Windows only) + * + * @type {string} + * @memberof TaskSpecContainerSpec + */ + Isolation?: TaskSpecContainerSpecIsolationEnum; + /** + * Run an init inside the container that forwards signals and reaps + * processes. This field is omitted if empty, and the default (as + * configured on the daemon) is used. + * + * @type {boolean} + * @memberof TaskSpecContainerSpec + */ + Init?: boolean | null; + /** + * Set kernel namedspaced parameters (sysctls) in the container. + * The Sysctls option on services accepts the same sysctls as the + * are supported on containers. Note that while the same sysctls are + * supported, no guarantees or checks are made about their + * suitability for a clustered environment, and it's up to the user + * to determine whether a given sysctl will work properly in a + * Service. + * + * @type {{ [key: string]: string; }} + * @memberof TaskSpecContainerSpec + */ + Sysctls?: { [key: string]: string }; + /** + * A list of kernel capabilities to add to the default set + * for the container. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + CapabilityAdd?: Array; + /** + * A list of kernel capabilities to drop from the default set + * for the container. + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + CapabilityDrop?: Array; + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @type {Array} + * @memberof TaskSpecContainerSpec + */ + Ulimits?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum TaskSpecContainerSpecIsolationEnum { - Default = 'default', - Process = 'process', - Hyperv = 'hyperv' + Default = "default", + Process = "process", + Hyperv = "hyperv", } - /** * Check if a given object implements the TaskSpecContainerSpec interface. */ export function instanceOfTaskSpecContainerSpec(value: object): value is TaskSpecContainerSpec { - return true; + return true; } export function TaskSpecContainerSpecFromJSON(json: any): TaskSpecContainerSpec { - return TaskSpecContainerSpecFromJSONTyped(json, false); + return TaskSpecContainerSpecFromJSONTyped(json, false); } -export function TaskSpecContainerSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpec { - if (json == null) { - return json; - } - return { - - 'Image': json['Image'] == null ? undefined : json['Image'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'Command': json['Command'] == null ? undefined : json['Command'], - 'Args': json['Args'] == null ? undefined : json['Args'], - 'Hostname': json['Hostname'] == null ? undefined : json['Hostname'], - 'Env': json['Env'] == null ? undefined : json['Env'], - 'Dir': json['Dir'] == null ? undefined : json['Dir'], - 'User': json['User'] == null ? undefined : json['User'], - 'Groups': json['Groups'] == null ? undefined : json['Groups'], - 'Privileges': json['Privileges'] == null ? undefined : TaskSpecContainerSpecPrivilegesFromJSON(json['Privileges']), - 'TTY': json['TTY'] == null ? undefined : json['TTY'], - 'OpenStdin': json['OpenStdin'] == null ? undefined : json['OpenStdin'], - 'ReadOnly': json['ReadOnly'] == null ? undefined : json['ReadOnly'], - 'Mounts': json['Mounts'] == null ? undefined : ((json['Mounts'] as Array).map(MountFromJSON)), - 'StopSignal': json['StopSignal'] == null ? undefined : json['StopSignal'], - 'StopGracePeriod': json['StopGracePeriod'] == null ? undefined : json['StopGracePeriod'], - 'HealthCheck': json['HealthCheck'] == null ? undefined : HealthConfigFromJSON(json['HealthCheck']), - 'Hosts': json['Hosts'] == null ? undefined : json['Hosts'], - 'DNSConfig': json['DNSConfig'] == null ? undefined : TaskSpecContainerSpecDNSConfigFromJSON(json['DNSConfig']), - 'Secrets': json['Secrets'] == null ? undefined : ((json['Secrets'] as Array).map(TaskSpecContainerSpecSecretsInnerFromJSON)), - 'Configs': json['Configs'] == null ? undefined : ((json['Configs'] as Array).map(TaskSpecContainerSpecConfigsInnerFromJSON)), - 'Isolation': json['Isolation'] == null ? undefined : json['Isolation'], - 'Init': json['Init'] == null ? undefined : json['Init'], - 'Sysctls': json['Sysctls'] == null ? undefined : json['Sysctls'], - 'CapabilityAdd': json['CapabilityAdd'] == null ? undefined : json['CapabilityAdd'], - 'CapabilityDrop': json['CapabilityDrop'] == null ? undefined : json['CapabilityDrop'], - 'Ulimits': json['Ulimits'] == null ? undefined : ((json['Ulimits'] as Array).map(ResourcesUlimitsInnerFromJSON)), - }; +export function TaskSpecContainerSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpec { + if (json == null) { + return json; + } + return { + Image: json["Image"] == null ? undefined : json["Image"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + Command: json["Command"] == null ? undefined : json["Command"], + Args: json["Args"] == null ? undefined : json["Args"], + Hostname: json["Hostname"] == null ? undefined : json["Hostname"], + Env: json["Env"] == null ? undefined : json["Env"], + Dir: json["Dir"] == null ? undefined : json["Dir"], + User: json["User"] == null ? undefined : json["User"], + Groups: json["Groups"] == null ? undefined : json["Groups"], + Privileges: + json["Privileges"] == null + ? undefined + : TaskSpecContainerSpecPrivilegesFromJSON(json["Privileges"]), + TTY: json["TTY"] == null ? undefined : json["TTY"], + OpenStdin: json["OpenStdin"] == null ? undefined : json["OpenStdin"], + ReadOnly: json["ReadOnly"] == null ? undefined : json["ReadOnly"], + Mounts: json["Mounts"] == null ? undefined : (json["Mounts"] as Array).map(MountFromJSON), + StopSignal: json["StopSignal"] == null ? undefined : json["StopSignal"], + StopGracePeriod: json["StopGracePeriod"] == null ? undefined : json["StopGracePeriod"], + HealthCheck: + json["HealthCheck"] == null ? undefined : HealthConfigFromJSON(json["HealthCheck"]), + Hosts: json["Hosts"] == null ? undefined : json["Hosts"], + DNSConfig: + json["DNSConfig"] == null + ? undefined + : TaskSpecContainerSpecDNSConfigFromJSON(json["DNSConfig"]), + Secrets: + json["Secrets"] == null + ? undefined + : (json["Secrets"] as Array).map(TaskSpecContainerSpecSecretsInnerFromJSON), + Configs: + json["Configs"] == null + ? undefined + : (json["Configs"] as Array).map(TaskSpecContainerSpecConfigsInnerFromJSON), + Isolation: json["Isolation"] == null ? undefined : json["Isolation"], + Init: json["Init"] == null ? undefined : json["Init"], + Sysctls: json["Sysctls"] == null ? undefined : json["Sysctls"], + CapabilityAdd: json["CapabilityAdd"] == null ? undefined : json["CapabilityAdd"], + CapabilityDrop: json["CapabilityDrop"] == null ? undefined : json["CapabilityDrop"], + Ulimits: + json["Ulimits"] == null + ? undefined + : (json["Ulimits"] as Array).map(ResourcesUlimitsInnerFromJSON), + }; } export function TaskSpecContainerSpecToJSON(json: any): TaskSpecContainerSpec { - return TaskSpecContainerSpecToJSONTyped(json, false); + return TaskSpecContainerSpecToJSONTyped(json, false); } -export function TaskSpecContainerSpecToJSONTyped(value?: TaskSpecContainerSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecToJSONTyped( + value?: TaskSpecContainerSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Image': value['Image'], - 'Labels': value['Labels'], - 'Command': value['Command'], - 'Args': value['Args'], - 'Hostname': value['Hostname'], - 'Env': value['Env'], - 'Dir': value['Dir'], - 'User': value['User'], - 'Groups': value['Groups'], - 'Privileges': TaskSpecContainerSpecPrivilegesToJSON(value['Privileges']), - 'TTY': value['TTY'], - 'OpenStdin': value['OpenStdin'], - 'ReadOnly': value['ReadOnly'], - 'Mounts': value['Mounts'] == null ? undefined : ((value['Mounts'] as Array).map(MountToJSON)), - 'StopSignal': value['StopSignal'], - 'StopGracePeriod': value['StopGracePeriod'], - 'HealthCheck': HealthConfigToJSON(value['HealthCheck']), - 'Hosts': value['Hosts'], - 'DNSConfig': TaskSpecContainerSpecDNSConfigToJSON(value['DNSConfig']), - 'Secrets': value['Secrets'] == null ? undefined : ((value['Secrets'] as Array).map(TaskSpecContainerSpecSecretsInnerToJSON)), - 'Configs': value['Configs'] == null ? undefined : ((value['Configs'] as Array).map(TaskSpecContainerSpecConfigsInnerToJSON)), - 'Isolation': value['Isolation'], - 'Init': value['Init'], - 'Sysctls': value['Sysctls'], - 'CapabilityAdd': value['CapabilityAdd'], - 'CapabilityDrop': value['CapabilityDrop'], - 'Ulimits': value['Ulimits'] == null ? undefined : ((value['Ulimits'] as Array).map(ResourcesUlimitsInnerToJSON)), - }; + return { + Image: value["Image"], + Labels: value["Labels"], + Command: value["Command"], + Args: value["Args"], + Hostname: value["Hostname"], + Env: value["Env"], + Dir: value["Dir"], + User: value["User"], + Groups: value["Groups"], + Privileges: TaskSpecContainerSpecPrivilegesToJSON(value["Privileges"]), + TTY: value["TTY"], + OpenStdin: value["OpenStdin"], + ReadOnly: value["ReadOnly"], + Mounts: value["Mounts"] == null ? undefined : (value["Mounts"] as Array).map(MountToJSON), + StopSignal: value["StopSignal"], + StopGracePeriod: value["StopGracePeriod"], + HealthCheck: HealthConfigToJSON(value["HealthCheck"]), + Hosts: value["Hosts"], + DNSConfig: TaskSpecContainerSpecDNSConfigToJSON(value["DNSConfig"]), + Secrets: + value["Secrets"] == null + ? undefined + : (value["Secrets"] as Array).map(TaskSpecContainerSpecSecretsInnerToJSON), + Configs: + value["Configs"] == null + ? undefined + : (value["Configs"] as Array).map(TaskSpecContainerSpecConfigsInnerToJSON), + Isolation: value["Isolation"], + Init: value["Init"], + Sysctls: value["Sysctls"], + CapabilityAdd: value["CapabilityAdd"], + CapabilityDrop: value["CapabilityDrop"], + Ulimits: + value["Ulimits"] == null + ? undefined + : (value["Ulimits"] as Array).map(ResourcesUlimitsInnerToJSON), + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts b/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts index 4f04bb363c..74126afc92 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecConfigsInner.ts @@ -2,108 +2,120 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TaskSpecContainerSpecConfigsInnerFile } from './TaskSpecContainerSpecConfigsInnerFile'; +import { mapValues } from "../runtime"; +import type { TaskSpecContainerSpecConfigsInnerFile } from "./TaskSpecContainerSpecConfigsInnerFile"; import { - TaskSpecContainerSpecConfigsInnerFileFromJSON, - TaskSpecContainerSpecConfigsInnerFileFromJSONTyped, - TaskSpecContainerSpecConfigsInnerFileToJSON, - TaskSpecContainerSpecConfigsInnerFileToJSONTyped, -} from './TaskSpecContainerSpecConfigsInnerFile'; + TaskSpecContainerSpecConfigsInnerFileFromJSON, + TaskSpecContainerSpecConfigsInnerFileFromJSONTyped, + TaskSpecContainerSpecConfigsInnerFileToJSON, + TaskSpecContainerSpecConfigsInnerFileToJSONTyped, +} from "./TaskSpecContainerSpecConfigsInnerFile"; /** - * + * * @export * @interface TaskSpecContainerSpecConfigsInner */ export interface TaskSpecContainerSpecConfigsInner { - /** - * - * @type {TaskSpecContainerSpecConfigsInnerFile} - * @memberof TaskSpecContainerSpecConfigsInner - */ - File?: TaskSpecContainerSpecConfigsInnerFile; - /** - * Runtime represents a target that is not mounted into the - * container but is used by the task - * - *


- * - * > **Note**: `Configs.File` and `Configs.Runtime` are mutually - * > exclusive - * - * @type {object} - * @memberof TaskSpecContainerSpecConfigsInner - */ - Runtime?: object; - /** - * ConfigID represents the ID of the specific config that we're - * referencing. - * - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInner - */ - ConfigID?: string; - /** - * ConfigName is the name of the config that this references, - * but this is just provided for lookup/display purposes. The - * config in the reference will be identified by its ID. - * - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInner - */ - ConfigName?: string; + /** + * + * @type {TaskSpecContainerSpecConfigsInnerFile} + * @memberof TaskSpecContainerSpecConfigsInner + */ + File?: TaskSpecContainerSpecConfigsInnerFile; + /** + * Runtime represents a target that is not mounted into the + * container but is used by the task + * + *


+ * + * > **Note**: `Configs.File` and `Configs.Runtime` are mutually + * > exclusive + * + * @type {object} + * @memberof TaskSpecContainerSpecConfigsInner + */ + Runtime?: object; + /** + * ConfigID represents the ID of the specific config that we're + * referencing. + * + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInner + */ + ConfigID?: string; + /** + * ConfigName is the name of the config that this references, + * but this is just provided for lookup/display purposes. The + * config in the reference will be identified by its ID. + * + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInner + */ + ConfigName?: string; } /** * Check if a given object implements the TaskSpecContainerSpecConfigsInner interface. */ -export function instanceOfTaskSpecContainerSpecConfigsInner(value: object): value is TaskSpecContainerSpecConfigsInner { - return true; +export function instanceOfTaskSpecContainerSpecConfigsInner( + value: object, +): value is TaskSpecContainerSpecConfigsInner { + return true; } -export function TaskSpecContainerSpecConfigsInnerFromJSON(json: any): TaskSpecContainerSpecConfigsInner { - return TaskSpecContainerSpecConfigsInnerFromJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerFromJSON( + json: any, +): TaskSpecContainerSpecConfigsInner { + return TaskSpecContainerSpecConfigsInnerFromJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecConfigsInner { - if (json == null) { - return json; - } - return { - - 'File': json['File'] == null ? undefined : TaskSpecContainerSpecConfigsInnerFileFromJSON(json['File']), - 'Runtime': json['Runtime'] == null ? undefined : json['Runtime'], - 'ConfigID': json['ConfigID'] == null ? undefined : json['ConfigID'], - 'ConfigName': json['ConfigName'] == null ? undefined : json['ConfigName'], - }; +export function TaskSpecContainerSpecConfigsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecConfigsInner { + if (json == null) { + return json; + } + return { + File: + json["File"] == null + ? undefined + : TaskSpecContainerSpecConfigsInnerFileFromJSON(json["File"]), + Runtime: json["Runtime"] == null ? undefined : json["Runtime"], + ConfigID: json["ConfigID"] == null ? undefined : json["ConfigID"], + ConfigName: json["ConfigName"] == null ? undefined : json["ConfigName"], + }; } -export function TaskSpecContainerSpecConfigsInnerToJSON(json: any): TaskSpecContainerSpecConfigsInner { - return TaskSpecContainerSpecConfigsInnerToJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerToJSON( + json: any, +): TaskSpecContainerSpecConfigsInner { + return TaskSpecContainerSpecConfigsInnerToJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerToJSONTyped(value?: TaskSpecContainerSpecConfigsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecConfigsInnerToJSONTyped( + value?: TaskSpecContainerSpecConfigsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'File': TaskSpecContainerSpecConfigsInnerFileToJSON(value['File']), - 'Runtime': value['Runtime'], - 'ConfigID': value['ConfigID'], - 'ConfigName': value['ConfigName'], - }; + return { + File: TaskSpecContainerSpecConfigsInnerFileToJSON(value["File"]), + Runtime: value["Runtime"], + ConfigID: value["ConfigID"], + ConfigName: value["ConfigName"], + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts b/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts index e95cd10357..22cc8fb1c4 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecConfigsInnerFile.ts @@ -2,94 +2,103 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * File represents a specific target that is backed by a file. - * + * *


- * + * * > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive - * + * * @export * @interface TaskSpecContainerSpecConfigsInnerFile */ export interface TaskSpecContainerSpecConfigsInnerFile { - /** - * Name represents the final filename in the filesystem. - * - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - Name?: string; - /** - * UID represents the file UID. - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - UID?: string; - /** - * GID represents the file GID. - * @type {string} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - GID?: string; - /** - * Mode represents the FileMode of the file. - * @type {number} - * @memberof TaskSpecContainerSpecConfigsInnerFile - */ - Mode?: number; + /** + * Name represents the final filename in the filesystem. + * + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + Name?: string; + /** + * UID represents the file UID. + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + UID?: string; + /** + * GID represents the file GID. + * @type {string} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + GID?: string; + /** + * Mode represents the FileMode of the file. + * @type {number} + * @memberof TaskSpecContainerSpecConfigsInnerFile + */ + Mode?: number; } /** * Check if a given object implements the TaskSpecContainerSpecConfigsInnerFile interface. */ -export function instanceOfTaskSpecContainerSpecConfigsInnerFile(value: object): value is TaskSpecContainerSpecConfigsInnerFile { - return true; +export function instanceOfTaskSpecContainerSpecConfigsInnerFile( + value: object, +): value is TaskSpecContainerSpecConfigsInnerFile { + return true; } -export function TaskSpecContainerSpecConfigsInnerFileFromJSON(json: any): TaskSpecContainerSpecConfigsInnerFile { - return TaskSpecContainerSpecConfigsInnerFileFromJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerFileFromJSON( + json: any, +): TaskSpecContainerSpecConfigsInnerFile { + return TaskSpecContainerSpecConfigsInnerFileFromJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecConfigsInnerFile { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'UID': json['UID'] == null ? undefined : json['UID'], - 'GID': json['GID'] == null ? undefined : json['GID'], - 'Mode': json['Mode'] == null ? undefined : json['Mode'], - }; +export function TaskSpecContainerSpecConfigsInnerFileFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecConfigsInnerFile { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + UID: json["UID"] == null ? undefined : json["UID"], + GID: json["GID"] == null ? undefined : json["GID"], + Mode: json["Mode"] == null ? undefined : json["Mode"], + }; } -export function TaskSpecContainerSpecConfigsInnerFileToJSON(json: any): TaskSpecContainerSpecConfigsInnerFile { - return TaskSpecContainerSpecConfigsInnerFileToJSONTyped(json, false); +export function TaskSpecContainerSpecConfigsInnerFileToJSON( + json: any, +): TaskSpecContainerSpecConfigsInnerFile { + return TaskSpecContainerSpecConfigsInnerFileToJSONTyped(json, false); } -export function TaskSpecContainerSpecConfigsInnerFileToJSONTyped(value?: TaskSpecContainerSpecConfigsInnerFile | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecConfigsInnerFileToJSONTyped( + value?: TaskSpecContainerSpecConfigsInnerFile | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'UID': value['UID'], - 'GID': value['GID'], - 'Mode': value['Mode'], - }; + return { + Name: value["Name"], + UID: value["UID"], + GID: value["GID"], + Mode: value["Mode"], + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts b/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts index 1b1f45f010..95cf9169fd 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecDNSConfig.ts @@ -2,84 +2,89 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Specification for DNS related configurations in resolver configuration * file (`resolv.conf`). - * + * * @export * @interface TaskSpecContainerSpecDNSConfig */ export interface TaskSpecContainerSpecDNSConfig { - /** - * The IP addresses of the name servers. - * @type {Array} - * @memberof TaskSpecContainerSpecDNSConfig - */ - Nameservers?: Array; - /** - * A search list for host-name lookup. - * @type {Array} - * @memberof TaskSpecContainerSpecDNSConfig - */ - Search?: Array; - /** - * A list of internal resolver variables to be modified (e.g., - * `debug`, `ndots:3`, etc.). - * - * @type {Array} - * @memberof TaskSpecContainerSpecDNSConfig - */ - Options?: Array; + /** + * The IP addresses of the name servers. + * @type {Array} + * @memberof TaskSpecContainerSpecDNSConfig + */ + Nameservers?: Array; + /** + * A search list for host-name lookup. + * @type {Array} + * @memberof TaskSpecContainerSpecDNSConfig + */ + Search?: Array; + /** + * A list of internal resolver variables to be modified (e.g., + * `debug`, `ndots:3`, etc.). + * + * @type {Array} + * @memberof TaskSpecContainerSpecDNSConfig + */ + Options?: Array; } /** * Check if a given object implements the TaskSpecContainerSpecDNSConfig interface. */ -export function instanceOfTaskSpecContainerSpecDNSConfig(value: object): value is TaskSpecContainerSpecDNSConfig { - return true; +export function instanceOfTaskSpecContainerSpecDNSConfig( + value: object, +): value is TaskSpecContainerSpecDNSConfig { + return true; } export function TaskSpecContainerSpecDNSConfigFromJSON(json: any): TaskSpecContainerSpecDNSConfig { - return TaskSpecContainerSpecDNSConfigFromJSONTyped(json, false); + return TaskSpecContainerSpecDNSConfigFromJSONTyped(json, false); } -export function TaskSpecContainerSpecDNSConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecDNSConfig { - if (json == null) { - return json; - } - return { - - 'Nameservers': json['Nameservers'] == null ? undefined : json['Nameservers'], - 'Search': json['Search'] == null ? undefined : json['Search'], - 'Options': json['Options'] == null ? undefined : json['Options'], - }; +export function TaskSpecContainerSpecDNSConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecDNSConfig { + if (json == null) { + return json; + } + return { + Nameservers: json["Nameservers"] == null ? undefined : json["Nameservers"], + Search: json["Search"] == null ? undefined : json["Search"], + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function TaskSpecContainerSpecDNSConfigToJSON(json: any): TaskSpecContainerSpecDNSConfig { - return TaskSpecContainerSpecDNSConfigToJSONTyped(json, false); + return TaskSpecContainerSpecDNSConfigToJSONTyped(json, false); } -export function TaskSpecContainerSpecDNSConfigToJSONTyped(value?: TaskSpecContainerSpecDNSConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecDNSConfigToJSONTyped( + value?: TaskSpecContainerSpecDNSConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Nameservers': value['Nameservers'], - 'Search': value['Search'], - 'Options': value['Options'], - }; + return { + Nameservers: value["Nameservers"], + Search: value["Search"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts b/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts index 11e8c91b77..0722278d47 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecPrivileges.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TaskSpecContainerSpecPrivilegesCredentialSpec } from './TaskSpecContainerSpecPrivilegesCredentialSpec'; +import { mapValues } from "../runtime"; +import type { TaskSpecContainerSpecPrivilegesCredentialSpec } from "./TaskSpecContainerSpecPrivilegesCredentialSpec"; import { - TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON, - TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped, - TaskSpecContainerSpecPrivilegesCredentialSpecToJSON, - TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped, -} from './TaskSpecContainerSpecPrivilegesCredentialSpec'; -import type { TaskSpecContainerSpecPrivilegesSELinuxContext } from './TaskSpecContainerSpecPrivilegesSELinuxContext'; + TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON, + TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped, + TaskSpecContainerSpecPrivilegesCredentialSpecToJSON, + TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped, +} from "./TaskSpecContainerSpecPrivilegesCredentialSpec"; +import type { TaskSpecContainerSpecPrivilegesSELinuxContext } from "./TaskSpecContainerSpecPrivilegesSELinuxContext"; import { - TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON, - TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped, - TaskSpecContainerSpecPrivilegesSELinuxContextToJSON, - TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped, -} from './TaskSpecContainerSpecPrivilegesSELinuxContext'; + TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON, + TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped, + TaskSpecContainerSpecPrivilegesSELinuxContextToJSON, + TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped, +} from "./TaskSpecContainerSpecPrivilegesSELinuxContext"; /** * Security options for the container @@ -34,55 +34,68 @@ import { * @interface TaskSpecContainerSpecPrivileges */ export interface TaskSpecContainerSpecPrivileges { - /** - * - * @type {TaskSpecContainerSpecPrivilegesCredentialSpec} - * @memberof TaskSpecContainerSpecPrivileges - */ - CredentialSpec?: TaskSpecContainerSpecPrivilegesCredentialSpec; - /** - * - * @type {TaskSpecContainerSpecPrivilegesSELinuxContext} - * @memberof TaskSpecContainerSpecPrivileges - */ - SELinuxContext?: TaskSpecContainerSpecPrivilegesSELinuxContext; + /** + * + * @type {TaskSpecContainerSpecPrivilegesCredentialSpec} + * @memberof TaskSpecContainerSpecPrivileges + */ + CredentialSpec?: TaskSpecContainerSpecPrivilegesCredentialSpec; + /** + * + * @type {TaskSpecContainerSpecPrivilegesSELinuxContext} + * @memberof TaskSpecContainerSpecPrivileges + */ + SELinuxContext?: TaskSpecContainerSpecPrivilegesSELinuxContext; } /** * Check if a given object implements the TaskSpecContainerSpecPrivileges interface. */ -export function instanceOfTaskSpecContainerSpecPrivileges(value: object): value is TaskSpecContainerSpecPrivileges { - return true; +export function instanceOfTaskSpecContainerSpecPrivileges( + value: object, +): value is TaskSpecContainerSpecPrivileges { + return true; } -export function TaskSpecContainerSpecPrivilegesFromJSON(json: any): TaskSpecContainerSpecPrivileges { - return TaskSpecContainerSpecPrivilegesFromJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesFromJSON( + json: any, +): TaskSpecContainerSpecPrivileges { + return TaskSpecContainerSpecPrivilegesFromJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecPrivileges { - if (json == null) { - return json; - } - return { - - 'CredentialSpec': json['CredentialSpec'] == null ? undefined : TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON(json['CredentialSpec']), - 'SELinuxContext': json['SELinuxContext'] == null ? undefined : TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON(json['SELinuxContext']), - }; +export function TaskSpecContainerSpecPrivilegesFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecPrivileges { + if (json == null) { + return json; + } + return { + CredentialSpec: + json["CredentialSpec"] == null + ? undefined + : TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON(json["CredentialSpec"]), + SELinuxContext: + json["SELinuxContext"] == null + ? undefined + : TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON(json["SELinuxContext"]), + }; } export function TaskSpecContainerSpecPrivilegesToJSON(json: any): TaskSpecContainerSpecPrivileges { - return TaskSpecContainerSpecPrivilegesToJSONTyped(json, false); + return TaskSpecContainerSpecPrivilegesToJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesToJSONTyped(value?: TaskSpecContainerSpecPrivileges | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecPrivilegesToJSONTyped( + value?: TaskSpecContainerSpecPrivileges | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'CredentialSpec': TaskSpecContainerSpecPrivilegesCredentialSpecToJSON(value['CredentialSpec']), - 'SELinuxContext': TaskSpecContainerSpecPrivilegesSELinuxContextToJSON(value['SELinuxContext']), - }; + return { + CredentialSpec: TaskSpecContainerSpecPrivilegesCredentialSpecToJSON(value["CredentialSpec"]), + SELinuxContext: TaskSpecContainerSpecPrivilegesSELinuxContextToJSON(value["SELinuxContext"]), + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts index d813be4c4c..b8a2d67b45 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesCredentialSpec.ts @@ -2,111 +2,120 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * CredentialSpec for managed service account (Windows only) * @export * @interface TaskSpecContainerSpecPrivilegesCredentialSpec */ export interface TaskSpecContainerSpecPrivilegesCredentialSpec { - /** - * Load credential spec from a Swarm Config with the given ID. - * The specified config must also be present in the Configs - * field with the Runtime property set. - * - *


- * - * - * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, - * > and `CredentialSpec.Config` are mutually exclusive. - * - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec - */ - Config?: string; - /** - * Load credential spec from this file. The file is read by - * the daemon, and must be present in the `CredentialSpecs` - * subdirectory in the docker data directory, which defaults - * to `C:\ProgramData\Docker\` on Windows. - * - * For example, specifying `spec.json` loads - * `C:\ProgramData\Docker\CredentialSpecs\spec.json`. - * - *


- * - * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, - * > and `CredentialSpec.Config` are mutually exclusive. - * - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec - */ - File?: string; - /** - * Load credential spec from this value in the Windows - * registry. The specified registry value must be located in: - * - * `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` - * - *


- * - * - * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, - * > and `CredentialSpec.Config` are mutually exclusive. - * - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec - */ - Registry?: string; + /** + * Load credential spec from a Swarm Config with the given ID. + * The specified config must also be present in the Configs + * field with the Runtime property set. + * + *


+ * + * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + * + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec + */ + Config?: string; + /** + * Load credential spec from this file. The file is read by + * the daemon, and must be present in the `CredentialSpecs` + * subdirectory in the docker data directory, which defaults + * to `C:\ProgramData\Docker\` on Windows. + * + * For example, specifying `spec.json` loads + * `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + * + *


+ * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + * + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec + */ + File?: string; + /** + * Load credential spec from this value in the Windows + * registry. The specified registry value must be located in: + * + * `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + * + *


+ * + * + * > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + * > and `CredentialSpec.Config` are mutually exclusive. + * + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesCredentialSpec + */ + Registry?: string; } /** * Check if a given object implements the TaskSpecContainerSpecPrivilegesCredentialSpec interface. */ -export function instanceOfTaskSpecContainerSpecPrivilegesCredentialSpec(value: object): value is TaskSpecContainerSpecPrivilegesCredentialSpec { - return true; +export function instanceOfTaskSpecContainerSpecPrivilegesCredentialSpec( + value: object, +): value is TaskSpecContainerSpecPrivilegesCredentialSpec { + return true; } -export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON(json: any): TaskSpecContainerSpecPrivilegesCredentialSpec { - return TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSON( + json: any, +): TaskSpecContainerSpecPrivilegesCredentialSpec { + return TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecPrivilegesCredentialSpec { - if (json == null) { - return json; - } - return { - - 'Config': json['Config'] == null ? undefined : json['Config'], - 'File': json['File'] == null ? undefined : json['File'], - 'Registry': json['Registry'] == null ? undefined : json['Registry'], - }; +export function TaskSpecContainerSpecPrivilegesCredentialSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecPrivilegesCredentialSpec { + if (json == null) { + return json; + } + return { + Config: json["Config"] == null ? undefined : json["Config"], + File: json["File"] == null ? undefined : json["File"], + Registry: json["Registry"] == null ? undefined : json["Registry"], + }; } -export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSON(json: any): TaskSpecContainerSpecPrivilegesCredentialSpec { - return TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSON( + json: any, +): TaskSpecContainerSpecPrivilegesCredentialSpec { + return TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped(value?: TaskSpecContainerSpecPrivilegesCredentialSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecPrivilegesCredentialSpecToJSONTyped( + value?: TaskSpecContainerSpecPrivilegesCredentialSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Config': value['Config'], - 'File': value['File'], - 'Registry': value['Registry'], - }; + return { + Config: value["Config"], + File: value["File"], + Registry: value["Registry"], + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts index 7da1e22368..38d3b218c7 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecPrivilegesSELinuxContext.ts @@ -2,96 +2,105 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * SELinux labels of the container * @export * @interface TaskSpecContainerSpecPrivilegesSELinuxContext */ export interface TaskSpecContainerSpecPrivilegesSELinuxContext { - /** - * Disable SELinux - * @type {boolean} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Disable?: boolean; - /** - * SELinux user label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - User?: string; - /** - * SELinux role label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Role?: string; - /** - * SELinux type label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Type?: string; - /** - * SELinux level label - * @type {string} - * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext - */ - Level?: string; + /** + * Disable SELinux + * @type {boolean} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Disable?: boolean; + /** + * SELinux user label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + User?: string; + /** + * SELinux role label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Role?: string; + /** + * SELinux type label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Type?: string; + /** + * SELinux level label + * @type {string} + * @memberof TaskSpecContainerSpecPrivilegesSELinuxContext + */ + Level?: string; } /** * Check if a given object implements the TaskSpecContainerSpecPrivilegesSELinuxContext interface. */ -export function instanceOfTaskSpecContainerSpecPrivilegesSELinuxContext(value: object): value is TaskSpecContainerSpecPrivilegesSELinuxContext { - return true; +export function instanceOfTaskSpecContainerSpecPrivilegesSELinuxContext( + value: object, +): value is TaskSpecContainerSpecPrivilegesSELinuxContext { + return true; } -export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON(json: any): TaskSpecContainerSpecPrivilegesSELinuxContext { - return TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSON( + json: any, +): TaskSpecContainerSpecPrivilegesSELinuxContext { + return TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecPrivilegesSELinuxContext { - if (json == null) { - return json; - } - return { - - 'Disable': json['Disable'] == null ? undefined : json['Disable'], - 'User': json['User'] == null ? undefined : json['User'], - 'Role': json['Role'] == null ? undefined : json['Role'], - 'Type': json['Type'] == null ? undefined : json['Type'], - 'Level': json['Level'] == null ? undefined : json['Level'], - }; +export function TaskSpecContainerSpecPrivilegesSELinuxContextFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecPrivilegesSELinuxContext { + if (json == null) { + return json; + } + return { + Disable: json["Disable"] == null ? undefined : json["Disable"], + User: json["User"] == null ? undefined : json["User"], + Role: json["Role"] == null ? undefined : json["Role"], + Type: json["Type"] == null ? undefined : json["Type"], + Level: json["Level"] == null ? undefined : json["Level"], + }; } -export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSON(json: any): TaskSpecContainerSpecPrivilegesSELinuxContext { - return TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped(json, false); +export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSON( + json: any, +): TaskSpecContainerSpecPrivilegesSELinuxContext { + return TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped(json, false); } -export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped(value?: TaskSpecContainerSpecPrivilegesSELinuxContext | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecPrivilegesSELinuxContextToJSONTyped( + value?: TaskSpecContainerSpecPrivilegesSELinuxContext | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Disable': value['Disable'], - 'User': value['User'], - 'Role': value['Role'], - 'Type': value['Type'], - 'Level': value['Level'], - }; + return { + Disable: value["Disable"], + User: value["User"], + Role: value["Role"], + Type: value["Type"], + Level: value["Level"], + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts b/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts index c582f3175c..6d41046585 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecSecretsInner.ts @@ -2,93 +2,105 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TaskSpecContainerSpecSecretsInnerFile } from './TaskSpecContainerSpecSecretsInnerFile'; +import { mapValues } from "../runtime"; +import type { TaskSpecContainerSpecSecretsInnerFile } from "./TaskSpecContainerSpecSecretsInnerFile"; import { - TaskSpecContainerSpecSecretsInnerFileFromJSON, - TaskSpecContainerSpecSecretsInnerFileFromJSONTyped, - TaskSpecContainerSpecSecretsInnerFileToJSON, - TaskSpecContainerSpecSecretsInnerFileToJSONTyped, -} from './TaskSpecContainerSpecSecretsInnerFile'; + TaskSpecContainerSpecSecretsInnerFileFromJSON, + TaskSpecContainerSpecSecretsInnerFileFromJSONTyped, + TaskSpecContainerSpecSecretsInnerFileToJSON, + TaskSpecContainerSpecSecretsInnerFileToJSONTyped, +} from "./TaskSpecContainerSpecSecretsInnerFile"; /** - * + * * @export * @interface TaskSpecContainerSpecSecretsInner */ export interface TaskSpecContainerSpecSecretsInner { - /** - * - * @type {TaskSpecContainerSpecSecretsInnerFile} - * @memberof TaskSpecContainerSpecSecretsInner - */ - File?: TaskSpecContainerSpecSecretsInnerFile; - /** - * SecretID represents the ID of the specific secret that we're - * referencing. - * - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInner - */ - SecretID?: string; - /** - * SecretName is the name of the secret that this references, - * but this is just provided for lookup/display purposes. The - * secret in the reference will be identified by its ID. - * - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInner - */ - SecretName?: string; + /** + * + * @type {TaskSpecContainerSpecSecretsInnerFile} + * @memberof TaskSpecContainerSpecSecretsInner + */ + File?: TaskSpecContainerSpecSecretsInnerFile; + /** + * SecretID represents the ID of the specific secret that we're + * referencing. + * + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInner + */ + SecretID?: string; + /** + * SecretName is the name of the secret that this references, + * but this is just provided for lookup/display purposes. The + * secret in the reference will be identified by its ID. + * + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInner + */ + SecretName?: string; } /** * Check if a given object implements the TaskSpecContainerSpecSecretsInner interface. */ -export function instanceOfTaskSpecContainerSpecSecretsInner(value: object): value is TaskSpecContainerSpecSecretsInner { - return true; +export function instanceOfTaskSpecContainerSpecSecretsInner( + value: object, +): value is TaskSpecContainerSpecSecretsInner { + return true; } -export function TaskSpecContainerSpecSecretsInnerFromJSON(json: any): TaskSpecContainerSpecSecretsInner { - return TaskSpecContainerSpecSecretsInnerFromJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerFromJSON( + json: any, +): TaskSpecContainerSpecSecretsInner { + return TaskSpecContainerSpecSecretsInnerFromJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecSecretsInner { - if (json == null) { - return json; - } - return { - - 'File': json['File'] == null ? undefined : TaskSpecContainerSpecSecretsInnerFileFromJSON(json['File']), - 'SecretID': json['SecretID'] == null ? undefined : json['SecretID'], - 'SecretName': json['SecretName'] == null ? undefined : json['SecretName'], - }; +export function TaskSpecContainerSpecSecretsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecSecretsInner { + if (json == null) { + return json; + } + return { + File: + json["File"] == null + ? undefined + : TaskSpecContainerSpecSecretsInnerFileFromJSON(json["File"]), + SecretID: json["SecretID"] == null ? undefined : json["SecretID"], + SecretName: json["SecretName"] == null ? undefined : json["SecretName"], + }; } -export function TaskSpecContainerSpecSecretsInnerToJSON(json: any): TaskSpecContainerSpecSecretsInner { - return TaskSpecContainerSpecSecretsInnerToJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerToJSON( + json: any, +): TaskSpecContainerSpecSecretsInner { + return TaskSpecContainerSpecSecretsInnerToJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerToJSONTyped(value?: TaskSpecContainerSpecSecretsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecSecretsInnerToJSONTyped( + value?: TaskSpecContainerSpecSecretsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'File': TaskSpecContainerSpecSecretsInnerFileToJSON(value['File']), - 'SecretID': value['SecretID'], - 'SecretName': value['SecretName'], - }; + return { + File: TaskSpecContainerSpecSecretsInnerFileToJSON(value["File"]), + SecretID: value["SecretID"], + SecretName: value["SecretName"], + }; } - diff --git a/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts b/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts index 8e34e5efe0..2db4e16aeb 100644 --- a/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts +++ b/src/clients/docker/models/TaskSpecContainerSpecSecretsInnerFile.ts @@ -2,90 +2,99 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * File represents a specific target that is backed by a file. - * + * * @export * @interface TaskSpecContainerSpecSecretsInnerFile */ export interface TaskSpecContainerSpecSecretsInnerFile { - /** - * Name represents the final filename in the filesystem. - * - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - Name?: string; - /** - * UID represents the file UID. - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - UID?: string; - /** - * GID represents the file GID. - * @type {string} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - GID?: string; - /** - * Mode represents the FileMode of the file. - * @type {number} - * @memberof TaskSpecContainerSpecSecretsInnerFile - */ - Mode?: number; + /** + * Name represents the final filename in the filesystem. + * + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + Name?: string; + /** + * UID represents the file UID. + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + UID?: string; + /** + * GID represents the file GID. + * @type {string} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + GID?: string; + /** + * Mode represents the FileMode of the file. + * @type {number} + * @memberof TaskSpecContainerSpecSecretsInnerFile + */ + Mode?: number; } /** * Check if a given object implements the TaskSpecContainerSpecSecretsInnerFile interface. */ -export function instanceOfTaskSpecContainerSpecSecretsInnerFile(value: object): value is TaskSpecContainerSpecSecretsInnerFile { - return true; +export function instanceOfTaskSpecContainerSpecSecretsInnerFile( + value: object, +): value is TaskSpecContainerSpecSecretsInnerFile { + return true; } -export function TaskSpecContainerSpecSecretsInnerFileFromJSON(json: any): TaskSpecContainerSpecSecretsInnerFile { - return TaskSpecContainerSpecSecretsInnerFileFromJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerFileFromJSON( + json: any, +): TaskSpecContainerSpecSecretsInnerFile { + return TaskSpecContainerSpecSecretsInnerFileFromJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecContainerSpecSecretsInnerFile { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'UID': json['UID'] == null ? undefined : json['UID'], - 'GID': json['GID'] == null ? undefined : json['GID'], - 'Mode': json['Mode'] == null ? undefined : json['Mode'], - }; +export function TaskSpecContainerSpecSecretsInnerFileFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecContainerSpecSecretsInnerFile { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + UID: json["UID"] == null ? undefined : json["UID"], + GID: json["GID"] == null ? undefined : json["GID"], + Mode: json["Mode"] == null ? undefined : json["Mode"], + }; } -export function TaskSpecContainerSpecSecretsInnerFileToJSON(json: any): TaskSpecContainerSpecSecretsInnerFile { - return TaskSpecContainerSpecSecretsInnerFileToJSONTyped(json, false); +export function TaskSpecContainerSpecSecretsInnerFileToJSON( + json: any, +): TaskSpecContainerSpecSecretsInnerFile { + return TaskSpecContainerSpecSecretsInnerFileToJSONTyped(json, false); } -export function TaskSpecContainerSpecSecretsInnerFileToJSONTyped(value?: TaskSpecContainerSpecSecretsInnerFile | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecContainerSpecSecretsInnerFileToJSONTyped( + value?: TaskSpecContainerSpecSecretsInnerFile | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'UID': value['UID'], - 'GID': value['GID'], - 'Mode': value['Mode'], - }; + return { + Name: value["Name"], + UID: value["UID"], + GID: value["GID"], + Mode: value["Mode"], + }; } - diff --git a/src/clients/docker/models/TaskSpecLogDriver.ts b/src/clients/docker/models/TaskSpecLogDriver.ts index accb6d702f..8c6c46a665 100644 --- a/src/clients/docker/models/TaskSpecLogDriver.ts +++ b/src/clients/docker/models/TaskSpecLogDriver.ts @@ -2,75 +2,78 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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. - * + * * @export * @interface TaskSpecLogDriver */ export interface TaskSpecLogDriver { - /** - * - * @type {string} - * @memberof TaskSpecLogDriver - */ - Name?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof TaskSpecLogDriver - */ - Options?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof TaskSpecLogDriver + */ + Name?: string; + /** + * + * @type {{ [key: string]: string; }} + * @memberof TaskSpecLogDriver + */ + Options?: { [key: string]: string }; } /** * Check if a given object implements the TaskSpecLogDriver interface. */ export function instanceOfTaskSpecLogDriver(value: object): value is TaskSpecLogDriver { - return true; + return true; } export function TaskSpecLogDriverFromJSON(json: any): TaskSpecLogDriver { - return TaskSpecLogDriverFromJSONTyped(json, false); + return TaskSpecLogDriverFromJSONTyped(json, false); } -export function TaskSpecLogDriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecLogDriver { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Options': json['Options'] == null ? undefined : json['Options'], - }; +export function TaskSpecLogDriverFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecLogDriver { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Options: json["Options"] == null ? undefined : json["Options"], + }; } export function TaskSpecLogDriverToJSON(json: any): TaskSpecLogDriver { - return TaskSpecLogDriverToJSONTyped(json, false); + return TaskSpecLogDriverToJSONTyped(json, false); } -export function TaskSpecLogDriverToJSONTyped(value?: TaskSpecLogDriver | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecLogDriverToJSONTyped( + value?: TaskSpecLogDriver | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Options': value['Options'], - }; + return { + Name: value["Name"], + Options: value["Options"], + }; } - diff --git a/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts b/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts index 67f704aad2..424c82be67 100644 --- a/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts +++ b/src/clients/docker/models/TaskSpecNetworkAttachmentSpec.ts @@ -2,73 +2,78 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * 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`. - * + * * @export * @interface TaskSpecNetworkAttachmentSpec */ export interface TaskSpecNetworkAttachmentSpec { - /** - * ID of the container represented by this task - * @type {string} - * @memberof TaskSpecNetworkAttachmentSpec - */ - ContainerID?: string; + /** + * ID of the container represented by this task + * @type {string} + * @memberof TaskSpecNetworkAttachmentSpec + */ + ContainerID?: string; } /** * Check if a given object implements the TaskSpecNetworkAttachmentSpec interface. */ -export function instanceOfTaskSpecNetworkAttachmentSpec(value: object): value is TaskSpecNetworkAttachmentSpec { - return true; +export function instanceOfTaskSpecNetworkAttachmentSpec( + value: object, +): value is TaskSpecNetworkAttachmentSpec { + return true; } export function TaskSpecNetworkAttachmentSpecFromJSON(json: any): TaskSpecNetworkAttachmentSpec { - return TaskSpecNetworkAttachmentSpecFromJSONTyped(json, false); + return TaskSpecNetworkAttachmentSpecFromJSONTyped(json, false); } -export function TaskSpecNetworkAttachmentSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecNetworkAttachmentSpec { - if (json == null) { - return json; - } - return { - - 'ContainerID': json['ContainerID'] == null ? undefined : json['ContainerID'], - }; +export function TaskSpecNetworkAttachmentSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecNetworkAttachmentSpec { + if (json == null) { + return json; + } + return { + ContainerID: json["ContainerID"] == null ? undefined : json["ContainerID"], + }; } export function TaskSpecNetworkAttachmentSpecToJSON(json: any): TaskSpecNetworkAttachmentSpec { - return TaskSpecNetworkAttachmentSpecToJSONTyped(json, false); + return TaskSpecNetworkAttachmentSpecToJSONTyped(json, false); } -export function TaskSpecNetworkAttachmentSpecToJSONTyped(value?: TaskSpecNetworkAttachmentSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecNetworkAttachmentSpecToJSONTyped( + value?: TaskSpecNetworkAttachmentSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ContainerID': value['ContainerID'], - }; + return { + ContainerID: value["ContainerID"], + }; } - diff --git a/src/clients/docker/models/TaskSpecPlacement.ts b/src/clients/docker/models/TaskSpecPlacement.ts index 6bcfd6c073..ac23be9940 100644 --- a/src/clients/docker/models/TaskSpecPlacement.ts +++ b/src/clients/docker/models/TaskSpecPlacement.ts @@ -2,131 +2,146 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TaskSpecPlacementPreferencesInner } from './TaskSpecPlacementPreferencesInner'; +import { mapValues } from "../runtime"; +import type { TaskSpecPlacementPreferencesInner } from "./TaskSpecPlacementPreferencesInner"; import { - TaskSpecPlacementPreferencesInnerFromJSON, - TaskSpecPlacementPreferencesInnerFromJSONTyped, - TaskSpecPlacementPreferencesInnerToJSON, - TaskSpecPlacementPreferencesInnerToJSONTyped, -} from './TaskSpecPlacementPreferencesInner'; -import type { Platform } from './Platform'; + TaskSpecPlacementPreferencesInnerFromJSON, + TaskSpecPlacementPreferencesInnerFromJSONTyped, + TaskSpecPlacementPreferencesInnerToJSON, + TaskSpecPlacementPreferencesInnerToJSONTyped, +} from "./TaskSpecPlacementPreferencesInner"; +import type { Platform } from "./Platform"; import { - PlatformFromJSON, - PlatformFromJSONTyped, - PlatformToJSON, - PlatformToJSONTyped, -} from './Platform'; + PlatformFromJSON, + PlatformFromJSONTyped, + PlatformToJSON, + PlatformToJSONTyped, +} from "./Platform"; /** - * + * * @export * @interface TaskSpecPlacement */ export interface TaskSpecPlacement { - /** - * An array of constraint expressions to limit the set of nodes where - * a task can be scheduled. Constraint expressions can either use a - * _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find - * nodes that satisfy every expression (AND match). Constraints can - * match node or Docker Engine labels as follows: - * - * node attribute | matches | example - * ---------------------|--------------------------------|----------------------------------------------- - * `node.id` | Node ID | `node.id==2ivku8v2gvtg4` - * `node.hostname` | Node hostname | `node.hostname!=node-2` - * `node.role` | Node role (`manager`/`worker`) | `node.role==manager` - * `node.platform.os` | Node operating system | `node.platform.os==windows` - * `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` - * `node.labels` | User-defined node labels | `node.labels.security==high` - * `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` - * - * `engine.labels` apply to Docker Engine labels like operating system, - * drivers, etc. Swarm administrators add `node.labels` for operational - * purposes by using the [`node update endpoint`](#operation/NodeUpdate). - * - * @type {Array} - * @memberof TaskSpecPlacement - */ - Constraints?: Array; - /** - * Preferences provide a way to make the scheduler aware of factors - * such as topology. They are provided in order from highest to - * lowest precedence. - * - * @type {Array} - * @memberof TaskSpecPlacement - */ - Preferences?: Array; - /** - * Maximum number of replicas for per node (default value is 0, which - * is unlimited) - * - * @type {number} - * @memberof TaskSpecPlacement - */ - MaxReplicas?: number; - /** - * Platforms stores all the platforms that the service's image can - * run on. This field is used in the platform filter for scheduling. - * If empty, then the platform filter is off, meaning there are no - * scheduling restrictions. - * - * @type {Array} - * @memberof TaskSpecPlacement - */ - Platforms?: Array; + /** + * An array of constraint expressions to limit the set of nodes where + * a task can be scheduled. Constraint expressions can either use a + * _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + * nodes that satisfy every expression (AND match). Constraints can + * match node or Docker Engine labels as follows: + * + * node attribute | matches | example + * ---------------------|--------------------------------|----------------------------------------------- + * `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + * `node.hostname` | Node hostname | `node.hostname!=node-2` + * `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + * `node.platform.os` | Node operating system | `node.platform.os==windows` + * `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + * `node.labels` | User-defined node labels | `node.labels.security==high` + * `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` + * + * `engine.labels` apply to Docker Engine labels like operating system, + * drivers, etc. Swarm administrators add `node.labels` for operational + * purposes by using the [`node update endpoint`](#operation/NodeUpdate). + * + * @type {Array} + * @memberof TaskSpecPlacement + */ + Constraints?: Array; + /** + * Preferences provide a way to make the scheduler aware of factors + * such as topology. They are provided in order from highest to + * lowest precedence. + * + * @type {Array} + * @memberof TaskSpecPlacement + */ + Preferences?: Array; + /** + * Maximum number of replicas for per node (default value is 0, which + * is unlimited) + * + * @type {number} + * @memberof TaskSpecPlacement + */ + MaxReplicas?: number; + /** + * Platforms stores all the platforms that the service's image can + * run on. This field is used in the platform filter for scheduling. + * If empty, then the platform filter is off, meaning there are no + * scheduling restrictions. + * + * @type {Array} + * @memberof TaskSpecPlacement + */ + Platforms?: Array; } /** * Check if a given object implements the TaskSpecPlacement interface. */ export function instanceOfTaskSpecPlacement(value: object): value is TaskSpecPlacement { - return true; + return true; } export function TaskSpecPlacementFromJSON(json: any): TaskSpecPlacement { - return TaskSpecPlacementFromJSONTyped(json, false); + return TaskSpecPlacementFromJSONTyped(json, false); } -export function TaskSpecPlacementFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPlacement { - if (json == null) { - return json; - } - return { - - 'Constraints': json['Constraints'] == null ? undefined : json['Constraints'], - 'Preferences': json['Preferences'] == null ? undefined : ((json['Preferences'] as Array).map(TaskSpecPlacementPreferencesInnerFromJSON)), - 'MaxReplicas': json['MaxReplicas'] == null ? undefined : json['MaxReplicas'], - 'Platforms': json['Platforms'] == null ? undefined : ((json['Platforms'] as Array).map(PlatformFromJSON)), - }; +export function TaskSpecPlacementFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecPlacement { + if (json == null) { + return json; + } + return { + Constraints: json["Constraints"] == null ? undefined : json["Constraints"], + Preferences: + json["Preferences"] == null + ? undefined + : (json["Preferences"] as Array).map(TaskSpecPlacementPreferencesInnerFromJSON), + MaxReplicas: json["MaxReplicas"] == null ? undefined : json["MaxReplicas"], + Platforms: + json["Platforms"] == null + ? undefined + : (json["Platforms"] as Array).map(PlatformFromJSON), + }; } export function TaskSpecPlacementToJSON(json: any): TaskSpecPlacement { - return TaskSpecPlacementToJSONTyped(json, false); + return TaskSpecPlacementToJSONTyped(json, false); } -export function TaskSpecPlacementToJSONTyped(value?: TaskSpecPlacement | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecPlacementToJSONTyped( + value?: TaskSpecPlacement | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Constraints': value['Constraints'], - 'Preferences': value['Preferences'] == null ? undefined : ((value['Preferences'] as Array).map(TaskSpecPlacementPreferencesInnerToJSON)), - 'MaxReplicas': value['MaxReplicas'], - 'Platforms': value['Platforms'] == null ? undefined : ((value['Platforms'] as Array).map(PlatformToJSON)), - }; + return { + Constraints: value["Constraints"], + Preferences: + value["Preferences"] == null + ? undefined + : (value["Preferences"] as Array).map(TaskSpecPlacementPreferencesInnerToJSON), + MaxReplicas: value["MaxReplicas"], + Platforms: + value["Platforms"] == null + ? undefined + : (value["Platforms"] as Array).map(PlatformToJSON), + }; } - diff --git a/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts b/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts index c6e8388bbf..5ba85bf8d8 100644 --- a/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts +++ b/src/clients/docker/models/TaskSpecPlacementPreferencesInner.ts @@ -2,72 +2,84 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TaskSpecPlacementPreferencesInnerSpread } from './TaskSpecPlacementPreferencesInnerSpread'; +import { mapValues } from "../runtime"; +import type { TaskSpecPlacementPreferencesInnerSpread } from "./TaskSpecPlacementPreferencesInnerSpread"; import { - TaskSpecPlacementPreferencesInnerSpreadFromJSON, - TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped, - TaskSpecPlacementPreferencesInnerSpreadToJSON, - TaskSpecPlacementPreferencesInnerSpreadToJSONTyped, -} from './TaskSpecPlacementPreferencesInnerSpread'; + TaskSpecPlacementPreferencesInnerSpreadFromJSON, + TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped, + TaskSpecPlacementPreferencesInnerSpreadToJSON, + TaskSpecPlacementPreferencesInnerSpreadToJSONTyped, +} from "./TaskSpecPlacementPreferencesInnerSpread"; /** - * + * * @export * @interface TaskSpecPlacementPreferencesInner */ export interface TaskSpecPlacementPreferencesInner { - /** - * - * @type {TaskSpecPlacementPreferencesInnerSpread} - * @memberof TaskSpecPlacementPreferencesInner - */ - Spread?: TaskSpecPlacementPreferencesInnerSpread; + /** + * + * @type {TaskSpecPlacementPreferencesInnerSpread} + * @memberof TaskSpecPlacementPreferencesInner + */ + Spread?: TaskSpecPlacementPreferencesInnerSpread; } /** * Check if a given object implements the TaskSpecPlacementPreferencesInner interface. */ -export function instanceOfTaskSpecPlacementPreferencesInner(value: object): value is TaskSpecPlacementPreferencesInner { - return true; +export function instanceOfTaskSpecPlacementPreferencesInner( + value: object, +): value is TaskSpecPlacementPreferencesInner { + return true; } -export function TaskSpecPlacementPreferencesInnerFromJSON(json: any): TaskSpecPlacementPreferencesInner { - return TaskSpecPlacementPreferencesInnerFromJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerFromJSON( + json: any, +): TaskSpecPlacementPreferencesInner { + return TaskSpecPlacementPreferencesInnerFromJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPlacementPreferencesInner { - if (json == null) { - return json; - } - return { - - 'Spread': json['Spread'] == null ? undefined : TaskSpecPlacementPreferencesInnerSpreadFromJSON(json['Spread']), - }; +export function TaskSpecPlacementPreferencesInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecPlacementPreferencesInner { + if (json == null) { + return json; + } + return { + Spread: + json["Spread"] == null + ? undefined + : TaskSpecPlacementPreferencesInnerSpreadFromJSON(json["Spread"]), + }; } -export function TaskSpecPlacementPreferencesInnerToJSON(json: any): TaskSpecPlacementPreferencesInner { - return TaskSpecPlacementPreferencesInnerToJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerToJSON( + json: any, +): TaskSpecPlacementPreferencesInner { + return TaskSpecPlacementPreferencesInnerToJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerToJSONTyped(value?: TaskSpecPlacementPreferencesInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecPlacementPreferencesInnerToJSONTyped( + value?: TaskSpecPlacementPreferencesInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Spread': TaskSpecPlacementPreferencesInnerSpreadToJSON(value['Spread']), - }; + return { + Spread: TaskSpecPlacementPreferencesInnerSpreadToJSON(value["Spread"]), + }; } - diff --git a/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts b/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts index b0867da291..b656178b18 100644 --- a/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts +++ b/src/clients/docker/models/TaskSpecPlacementPreferencesInnerSpread.ts @@ -2,65 +2,74 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface TaskSpecPlacementPreferencesInnerSpread */ export interface TaskSpecPlacementPreferencesInnerSpread { - /** - * label descriptor, such as `engine.labels.az`. - * - * @type {string} - * @memberof TaskSpecPlacementPreferencesInnerSpread - */ - SpreadDescriptor?: string; + /** + * label descriptor, such as `engine.labels.az`. + * + * @type {string} + * @memberof TaskSpecPlacementPreferencesInnerSpread + */ + SpreadDescriptor?: string; } /** * Check if a given object implements the TaskSpecPlacementPreferencesInnerSpread interface. */ -export function instanceOfTaskSpecPlacementPreferencesInnerSpread(value: object): value is TaskSpecPlacementPreferencesInnerSpread { - return true; +export function instanceOfTaskSpecPlacementPreferencesInnerSpread( + value: object, +): value is TaskSpecPlacementPreferencesInnerSpread { + return true; } -export function TaskSpecPlacementPreferencesInnerSpreadFromJSON(json: any): TaskSpecPlacementPreferencesInnerSpread { - return TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerSpreadFromJSON( + json: any, +): TaskSpecPlacementPreferencesInnerSpread { + return TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPlacementPreferencesInnerSpread { - if (json == null) { - return json; - } - return { - - 'SpreadDescriptor': json['SpreadDescriptor'] == null ? undefined : json['SpreadDescriptor'], - }; +export function TaskSpecPlacementPreferencesInnerSpreadFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecPlacementPreferencesInnerSpread { + if (json == null) { + return json; + } + return { + SpreadDescriptor: json["SpreadDescriptor"] == null ? undefined : json["SpreadDescriptor"], + }; } -export function TaskSpecPlacementPreferencesInnerSpreadToJSON(json: any): TaskSpecPlacementPreferencesInnerSpread { - return TaskSpecPlacementPreferencesInnerSpreadToJSONTyped(json, false); +export function TaskSpecPlacementPreferencesInnerSpreadToJSON( + json: any, +): TaskSpecPlacementPreferencesInnerSpread { + return TaskSpecPlacementPreferencesInnerSpreadToJSONTyped(json, false); } -export function TaskSpecPlacementPreferencesInnerSpreadToJSONTyped(value?: TaskSpecPlacementPreferencesInnerSpread | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecPlacementPreferencesInnerSpreadToJSONTyped( + value?: TaskSpecPlacementPreferencesInnerSpread | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'SpreadDescriptor': value['SpreadDescriptor'], - }; + return { + SpreadDescriptor: value["SpreadDescriptor"], + }; } - diff --git a/src/clients/docker/models/TaskSpecPluginSpec.ts b/src/clients/docker/models/TaskSpecPluginSpec.ts index 7071e9d3fc..51a7d3f587 100644 --- a/src/clients/docker/models/TaskSpecPluginSpec.ts +++ b/src/clients/docker/models/TaskSpecPluginSpec.ts @@ -2,104 +2,113 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PluginPrivilege } from './PluginPrivilege'; +import { mapValues } from "../runtime"; +import type { PluginPrivilege } from "./PluginPrivilege"; import { - PluginPrivilegeFromJSON, - PluginPrivilegeFromJSONTyped, - PluginPrivilegeToJSON, - PluginPrivilegeToJSONTyped, -} from './PluginPrivilege'; + PluginPrivilegeFromJSON, + PluginPrivilegeFromJSONTyped, + PluginPrivilegeToJSON, + PluginPrivilegeToJSONTyped, +} from "./PluginPrivilege"; /** * 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`. - * + * * @export * @interface TaskSpecPluginSpec */ export interface TaskSpecPluginSpec { - /** - * The name or 'alias' to use for the plugin. - * @type {string} - * @memberof TaskSpecPluginSpec - */ - Name?: string; - /** - * The plugin image reference to use. - * @type {string} - * @memberof TaskSpecPluginSpec - */ - Remote?: string; - /** - * Disable the plugin once scheduled. - * @type {boolean} - * @memberof TaskSpecPluginSpec - */ - Disabled?: boolean; - /** - * - * @type {Array} - * @memberof TaskSpecPluginSpec - */ - PluginPrivilege?: Array; + /** + * The name or 'alias' to use for the plugin. + * @type {string} + * @memberof TaskSpecPluginSpec + */ + Name?: string; + /** + * The plugin image reference to use. + * @type {string} + * @memberof TaskSpecPluginSpec + */ + Remote?: string; + /** + * Disable the plugin once scheduled. + * @type {boolean} + * @memberof TaskSpecPluginSpec + */ + Disabled?: boolean; + /** + * + * @type {Array} + * @memberof TaskSpecPluginSpec + */ + PluginPrivilege?: Array; } /** * Check if a given object implements the TaskSpecPluginSpec interface. */ export function instanceOfTaskSpecPluginSpec(value: object): value is TaskSpecPluginSpec { - return true; + return true; } export function TaskSpecPluginSpecFromJSON(json: any): TaskSpecPluginSpec { - return TaskSpecPluginSpecFromJSONTyped(json, false); + return TaskSpecPluginSpecFromJSONTyped(json, false); } -export function TaskSpecPluginSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecPluginSpec { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Remote': json['Remote'] == null ? undefined : json['Remote'], - 'Disabled': json['Disabled'] == null ? undefined : json['Disabled'], - 'PluginPrivilege': json['PluginPrivilege'] == null ? undefined : ((json['PluginPrivilege'] as Array).map(PluginPrivilegeFromJSON)), - }; +export function TaskSpecPluginSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecPluginSpec { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Remote: json["Remote"] == null ? undefined : json["Remote"], + Disabled: json["Disabled"] == null ? undefined : json["Disabled"], + PluginPrivilege: + json["PluginPrivilege"] == null + ? undefined + : (json["PluginPrivilege"] as Array).map(PluginPrivilegeFromJSON), + }; } export function TaskSpecPluginSpecToJSON(json: any): TaskSpecPluginSpec { - return TaskSpecPluginSpecToJSONTyped(json, false); + return TaskSpecPluginSpecToJSONTyped(json, false); } -export function TaskSpecPluginSpecToJSONTyped(value?: TaskSpecPluginSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecPluginSpecToJSONTyped( + value?: TaskSpecPluginSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Remote': value['Remote'], - 'Disabled': value['Disabled'], - 'PluginPrivilege': value['PluginPrivilege'] == null ? undefined : ((value['PluginPrivilege'] as Array).map(PluginPrivilegeToJSON)), - }; + return { + Name: value["Name"], + Remote: value["Remote"], + Disabled: value["Disabled"], + PluginPrivilege: + value["PluginPrivilege"] == null + ? undefined + : (value["PluginPrivilege"] as Array).map(PluginPrivilegeToJSON), + }; } - diff --git a/src/clients/docker/models/TaskSpecResources.ts b/src/clients/docker/models/TaskSpecResources.ts index 9e031e941c..0470a68444 100644 --- a/src/clients/docker/models/TaskSpecResources.ts +++ b/src/clients/docker/models/TaskSpecResources.ts @@ -2,89 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceObject } from './ResourceObject'; -import { - ResourceObjectFromJSON, - ResourceObjectFromJSONTyped, - ResourceObjectToJSON, - ResourceObjectToJSONTyped, -} from './ResourceObject'; -import type { Limit } from './Limit'; +import { mapValues } from "../runtime"; +import type { ResourceObject } from "./ResourceObject"; import { - LimitFromJSON, - LimitFromJSONTyped, - LimitToJSON, - LimitToJSONTyped, -} from './Limit'; + ResourceObjectFromJSON, + ResourceObjectFromJSONTyped, + ResourceObjectToJSON, + ResourceObjectToJSONTyped, +} from "./ResourceObject"; +import type { Limit } from "./Limit"; +import { LimitFromJSON, LimitFromJSONTyped, LimitToJSON, LimitToJSONTyped } from "./Limit"; /** * Resource requirements which apply to each individual container created * as part of the service. - * + * * @export * @interface TaskSpecResources */ export interface TaskSpecResources { - /** - * - * @type {Limit} - * @memberof TaskSpecResources - */ - Limits?: Limit; - /** - * - * @type {ResourceObject} - * @memberof TaskSpecResources - */ - Reservations?: ResourceObject; + /** + * + * @type {Limit} + * @memberof TaskSpecResources + */ + Limits?: Limit; + /** + * + * @type {ResourceObject} + * @memberof TaskSpecResources + */ + Reservations?: ResourceObject; } /** * Check if a given object implements the TaskSpecResources interface. */ export function instanceOfTaskSpecResources(value: object): value is TaskSpecResources { - return true; + return true; } export function TaskSpecResourcesFromJSON(json: any): TaskSpecResources { - return TaskSpecResourcesFromJSONTyped(json, false); + return TaskSpecResourcesFromJSONTyped(json, false); } -export function TaskSpecResourcesFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecResources { - if (json == null) { - return json; - } - return { - - 'Limits': json['Limits'] == null ? undefined : LimitFromJSON(json['Limits']), - 'Reservations': json['Reservations'] == null ? undefined : ResourceObjectFromJSON(json['Reservations']), - }; +export function TaskSpecResourcesFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecResources { + if (json == null) { + return json; + } + return { + Limits: json["Limits"] == null ? undefined : LimitFromJSON(json["Limits"]), + Reservations: + json["Reservations"] == null ? undefined : ResourceObjectFromJSON(json["Reservations"]), + }; } export function TaskSpecResourcesToJSON(json: any): TaskSpecResources { - return TaskSpecResourcesToJSONTyped(json, false); + return TaskSpecResourcesToJSONTyped(json, false); } -export function TaskSpecResourcesToJSONTyped(value?: TaskSpecResources | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecResourcesToJSONTyped( + value?: TaskSpecResources | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Limits': LimitToJSON(value['Limits']), - 'Reservations': ResourceObjectToJSON(value['Reservations']), - }; + return { + Limits: LimitToJSON(value["Limits"]), + Reservations: ResourceObjectToJSON(value["Reservations"]), + }; } - diff --git a/src/clients/docker/models/TaskSpecRestartPolicy.ts b/src/clients/docker/models/TaskSpecRestartPolicy.ts index 7971ba45b3..9eca8558b1 100644 --- a/src/clients/docker/models/TaskSpecRestartPolicy.ts +++ b/src/clients/docker/models/TaskSpecRestartPolicy.ts @@ -2,105 +2,107 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Specification for the restart policy which applies to containers * created as part of this service. - * + * * @export * @interface TaskSpecRestartPolicy */ export interface TaskSpecRestartPolicy { - /** - * Condition for restart. - * @type {string} - * @memberof TaskSpecRestartPolicy - */ - Condition?: TaskSpecRestartPolicyConditionEnum; - /** - * Delay between restart attempts. - * @type {number} - * @memberof TaskSpecRestartPolicy - */ - Delay?: number; - /** - * Maximum attempts to restart a given container before giving up - * (default value is 0, which is ignored). - * - * @type {number} - * @memberof TaskSpecRestartPolicy - */ - MaxAttempts?: number; - /** - * Windows is the time window used to evaluate the restart policy - * (default value is 0, which is unbounded). - * - * @type {number} - * @memberof TaskSpecRestartPolicy - */ - Window?: number; + /** + * Condition for restart. + * @type {string} + * @memberof TaskSpecRestartPolicy + */ + Condition?: TaskSpecRestartPolicyConditionEnum; + /** + * Delay between restart attempts. + * @type {number} + * @memberof TaskSpecRestartPolicy + */ + Delay?: number; + /** + * Maximum attempts to restart a given container before giving up + * (default value is 0, which is ignored). + * + * @type {number} + * @memberof TaskSpecRestartPolicy + */ + MaxAttempts?: number; + /** + * Windows is the time window used to evaluate the restart policy + * (default value is 0, which is unbounded). + * + * @type {number} + * @memberof TaskSpecRestartPolicy + */ + Window?: number; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum TaskSpecRestartPolicyConditionEnum { - None = 'none', - OnFailure = 'on-failure', - Any = 'any' + None = "none", + OnFailure = "on-failure", + Any = "any", } - /** * Check if a given object implements the TaskSpecRestartPolicy interface. */ export function instanceOfTaskSpecRestartPolicy(value: object): value is TaskSpecRestartPolicy { - return true; + return true; } export function TaskSpecRestartPolicyFromJSON(json: any): TaskSpecRestartPolicy { - return TaskSpecRestartPolicyFromJSONTyped(json, false); + return TaskSpecRestartPolicyFromJSONTyped(json, false); } -export function TaskSpecRestartPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskSpecRestartPolicy { - if (json == null) { - return json; - } - return { - - 'Condition': json['Condition'] == null ? undefined : json['Condition'], - 'Delay': json['Delay'] == null ? undefined : json['Delay'], - 'MaxAttempts': json['MaxAttempts'] == null ? undefined : json['MaxAttempts'], - 'Window': json['Window'] == null ? undefined : json['Window'], - }; +export function TaskSpecRestartPolicyFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskSpecRestartPolicy { + if (json == null) { + return json; + } + return { + Condition: json["Condition"] == null ? undefined : json["Condition"], + Delay: json["Delay"] == null ? undefined : json["Delay"], + MaxAttempts: json["MaxAttempts"] == null ? undefined : json["MaxAttempts"], + Window: json["Window"] == null ? undefined : json["Window"], + }; } export function TaskSpecRestartPolicyToJSON(json: any): TaskSpecRestartPolicy { - return TaskSpecRestartPolicyToJSONTyped(json, false); + return TaskSpecRestartPolicyToJSONTyped(json, false); } -export function TaskSpecRestartPolicyToJSONTyped(value?: TaskSpecRestartPolicy | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskSpecRestartPolicyToJSONTyped( + value?: TaskSpecRestartPolicy | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Condition': value['Condition'], - 'Delay': value['Delay'], - 'MaxAttempts': value['MaxAttempts'], - 'Window': value['Window'], - }; + return { + Condition: value["Condition"], + Delay: value["Delay"], + MaxAttempts: value["MaxAttempts"], + Window: value["Window"], + }; } - diff --git a/src/clients/docker/models/TaskState.ts b/src/clients/docker/models/TaskState.ts index 8d8e13370d..458a8e53f7 100644 --- a/src/clients/docker/models/TaskState.ts +++ b/src/clients/docker/models/TaskState.ts @@ -2,10 +2,10 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,53 +13,51 @@ */ /** - * + * * @export * @enum {string} */ export enum TaskState { - New = 'new', - Allocated = 'allocated', - Pending = 'pending', - Assigned = 'assigned', - Accepted = 'accepted', - Preparing = 'preparing', - Ready = 'ready', - Starting = 'starting', - Running = 'running', - Complete = 'complete', - Shutdown = 'shutdown', - Failed = 'failed', - Rejected = 'rejected', - Remove = 'remove', - Orphaned = 'orphaned' + New = "new", + Allocated = "allocated", + Pending = "pending", + Assigned = "assigned", + Accepted = "accepted", + Preparing = "preparing", + Ready = "ready", + Starting = "starting", + Running = "running", + Complete = "complete", + Shutdown = "shutdown", + Failed = "failed", + Rejected = "rejected", + Remove = "remove", + Orphaned = "orphaned", } - export function instanceOfTaskState(value: any): boolean { - for (const key in TaskState) { - if (Object.prototype.hasOwnProperty.call(TaskState, key)) { - if (TaskState[key as keyof typeof TaskState] === value) { - return true; - } - } + for (const key in TaskState) { + if (Object.prototype.hasOwnProperty.call(TaskState, key)) { + if (TaskState[key as keyof typeof TaskState] === value) { + return true; + } } - return false; + } + return false; } export function TaskStateFromJSON(json: any): TaskState { - return TaskStateFromJSONTyped(json, false); + return TaskStateFromJSONTyped(json, false); } export function TaskStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskState { - return json as TaskState; + return json as TaskState; } export function TaskStateToJSON(value?: TaskState | null): any { - return value as any; + return value as any; } export function TaskStateToJSONTyped(value: any, ignoreDiscriminator: boolean): TaskState { - return value as TaskState; + return value as TaskState; } - diff --git a/src/clients/docker/models/TaskStatus.ts b/src/clients/docker/models/TaskStatus.ts index 6c986ac716..8bddcbf091 100644 --- a/src/clients/docker/models/TaskStatus.ts +++ b/src/clients/docker/models/TaskStatus.ts @@ -2,113 +2,114 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TaskStatusContainerStatus } from './TaskStatusContainerStatus'; +import { mapValues } from "../runtime"; +import type { TaskStatusContainerStatus } from "./TaskStatusContainerStatus"; import { - TaskStatusContainerStatusFromJSON, - TaskStatusContainerStatusFromJSONTyped, - TaskStatusContainerStatusToJSON, - TaskStatusContainerStatusToJSONTyped, -} from './TaskStatusContainerStatus'; -import type { TaskState } from './TaskState'; + TaskStatusContainerStatusFromJSON, + TaskStatusContainerStatusFromJSONTyped, + TaskStatusContainerStatusToJSON, + TaskStatusContainerStatusToJSONTyped, +} from "./TaskStatusContainerStatus"; +import type { TaskState } from "./TaskState"; import { - TaskStateFromJSON, - TaskStateFromJSONTyped, - TaskStateToJSON, - TaskStateToJSONTyped, -} from './TaskState'; + TaskStateFromJSON, + TaskStateFromJSONTyped, + TaskStateToJSON, + TaskStateToJSONTyped, +} from "./TaskState"; /** - * + * * @export * @interface TaskStatus */ export interface TaskStatus { - /** - * - * @type {string} - * @memberof TaskStatus - */ - Timestamp?: string; - /** - * - * @type {TaskState} - * @memberof TaskStatus - */ - State?: TaskState; - /** - * - * @type {string} - * @memberof TaskStatus - */ - Message?: string; - /** - * - * @type {string} - * @memberof TaskStatus - */ - Err?: string; - /** - * - * @type {TaskStatusContainerStatus} - * @memberof TaskStatus - */ - ContainerStatus?: TaskStatusContainerStatus; + /** + * + * @type {string} + * @memberof TaskStatus + */ + Timestamp?: string; + /** + * + * @type {TaskState} + * @memberof TaskStatus + */ + State?: TaskState; + /** + * + * @type {string} + * @memberof TaskStatus + */ + Message?: string; + /** + * + * @type {string} + * @memberof TaskStatus + */ + Err?: string; + /** + * + * @type {TaskStatusContainerStatus} + * @memberof TaskStatus + */ + ContainerStatus?: TaskStatusContainerStatus; } - - /** * Check if a given object implements the TaskStatus interface. */ export function instanceOfTaskStatus(value: object): value is TaskStatus { - return true; + return true; } export function TaskStatusFromJSON(json: any): TaskStatus { - return TaskStatusFromJSONTyped(json, false); + return TaskStatusFromJSONTyped(json, false); } export function TaskStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskStatus { - if (json == null) { - return json; - } - return { - - 'Timestamp': json['Timestamp'] == null ? undefined : json['Timestamp'], - 'State': json['State'] == null ? undefined : TaskStateFromJSON(json['State']), - 'Message': json['Message'] == null ? undefined : json['Message'], - 'Err': json['Err'] == null ? undefined : json['Err'], - 'ContainerStatus': json['ContainerStatus'] == null ? undefined : TaskStatusContainerStatusFromJSON(json['ContainerStatus']), - }; + if (json == null) { + return json; + } + return { + Timestamp: json["Timestamp"] == null ? undefined : json["Timestamp"], + State: json["State"] == null ? undefined : TaskStateFromJSON(json["State"]), + Message: json["Message"] == null ? undefined : json["Message"], + Err: json["Err"] == null ? undefined : json["Err"], + ContainerStatus: + json["ContainerStatus"] == null + ? undefined + : TaskStatusContainerStatusFromJSON(json["ContainerStatus"]), + }; } export function TaskStatusToJSON(json: any): TaskStatus { - return TaskStatusToJSONTyped(json, false); + return TaskStatusToJSONTyped(json, false); } -export function TaskStatusToJSONTyped(value?: TaskStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskStatusToJSONTyped( + value?: TaskStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Timestamp': value['Timestamp'], - 'State': TaskStateToJSON(value['State']), - 'Message': value['Message'], - 'Err': value['Err'], - 'ContainerStatus': TaskStatusContainerStatusToJSON(value['ContainerStatus']), - }; + return { + Timestamp: value["Timestamp"], + State: TaskStateToJSON(value["State"]), + Message: value["Message"], + Err: value["Err"], + ContainerStatus: TaskStatusContainerStatusToJSON(value["ContainerStatus"]), + }; } - diff --git a/src/clients/docker/models/TaskStatusContainerStatus.ts b/src/clients/docker/models/TaskStatusContainerStatus.ts index ce3d36e22e..45587059ad 100644 --- a/src/clients/docker/models/TaskStatusContainerStatus.ts +++ b/src/clients/docker/models/TaskStatusContainerStatus.ts @@ -2,80 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface TaskStatusContainerStatus */ export interface TaskStatusContainerStatus { - /** - * - * @type {string} - * @memberof TaskStatusContainerStatus - */ - ContainerID?: string; - /** - * - * @type {number} - * @memberof TaskStatusContainerStatus - */ - PID?: number; - /** - * - * @type {number} - * @memberof TaskStatusContainerStatus - */ - ExitCode?: number; + /** + * + * @type {string} + * @memberof TaskStatusContainerStatus + */ + ContainerID?: string; + /** + * + * @type {number} + * @memberof TaskStatusContainerStatus + */ + PID?: number; + /** + * + * @type {number} + * @memberof TaskStatusContainerStatus + */ + ExitCode?: number; } /** * Check if a given object implements the TaskStatusContainerStatus interface. */ -export function instanceOfTaskStatusContainerStatus(value: object): value is TaskStatusContainerStatus { - return true; +export function instanceOfTaskStatusContainerStatus( + value: object, +): value is TaskStatusContainerStatus { + return true; } export function TaskStatusContainerStatusFromJSON(json: any): TaskStatusContainerStatus { - return TaskStatusContainerStatusFromJSONTyped(json, false); + return TaskStatusContainerStatusFromJSONTyped(json, false); } -export function TaskStatusContainerStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskStatusContainerStatus { - if (json == null) { - return json; - } - return { - - 'ContainerID': json['ContainerID'] == null ? undefined : json['ContainerID'], - 'PID': json['PID'] == null ? undefined : json['PID'], - 'ExitCode': json['ExitCode'] == null ? undefined : json['ExitCode'], - }; +export function TaskStatusContainerStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TaskStatusContainerStatus { + if (json == null) { + return json; + } + return { + ContainerID: json["ContainerID"] == null ? undefined : json["ContainerID"], + PID: json["PID"] == null ? undefined : json["PID"], + ExitCode: json["ExitCode"] == null ? undefined : json["ExitCode"], + }; } export function TaskStatusContainerStatusToJSON(json: any): TaskStatusContainerStatus { - return TaskStatusContainerStatusToJSONTyped(json, false); + return TaskStatusContainerStatusToJSONTyped(json, false); } -export function TaskStatusContainerStatusToJSONTyped(value?: TaskStatusContainerStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TaskStatusContainerStatusToJSONTyped( + value?: TaskStatusContainerStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ContainerID': value['ContainerID'], - 'PID': value['PID'], - 'ExitCode': value['ExitCode'], - }; + return { + ContainerID: value["ContainerID"], + PID: value["PID"], + ExitCode: value["ExitCode"], + }; } - diff --git a/src/clients/docker/models/ThrottleDevice.ts b/src/clients/docker/models/ThrottleDevice.ts index 1370e41ad5..6df3e5f307 100644 --- a/src/clients/docker/models/ThrottleDevice.ts +++ b/src/clients/docker/models/ThrottleDevice.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ThrottleDevice */ export interface ThrottleDevice { - /** - * Device path - * @type {string} - * @memberof ThrottleDevice - */ - Path?: string; - /** - * Rate - * @type {number} - * @memberof ThrottleDevice - */ - Rate?: number; + /** + * Device path + * @type {string} + * @memberof ThrottleDevice + */ + Path?: string; + /** + * Rate + * @type {number} + * @memberof ThrottleDevice + */ + Rate?: number; } /** * Check if a given object implements the ThrottleDevice interface. */ export function instanceOfThrottleDevice(value: object): value is ThrottleDevice { - return true; + return true; } export function ThrottleDeviceFromJSON(json: any): ThrottleDevice { - return ThrottleDeviceFromJSONTyped(json, false); + return ThrottleDeviceFromJSONTyped(json, false); } -export function ThrottleDeviceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ThrottleDevice { - if (json == null) { - return json; - } - return { - - 'Path': json['Path'] == null ? undefined : json['Path'], - 'Rate': json['Rate'] == null ? undefined : json['Rate'], - }; +export function ThrottleDeviceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ThrottleDevice { + if (json == null) { + return json; + } + return { + Path: json["Path"] == null ? undefined : json["Path"], + Rate: json["Rate"] == null ? undefined : json["Rate"], + }; } export function ThrottleDeviceToJSON(json: any): ThrottleDevice { - return ThrottleDeviceToJSONTyped(json, false); + return ThrottleDeviceToJSONTyped(json, false); } -export function ThrottleDeviceToJSONTyped(value?: ThrottleDevice | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ThrottleDeviceToJSONTyped( + value?: ThrottleDevice | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Path': value['Path'], - 'Rate': value['Rate'], - }; + return { + Path: value["Path"], + Rate: value["Rate"], + }; } - diff --git a/src/clients/docker/models/UnlockKeyResponse.ts b/src/clients/docker/models/UnlockKeyResponse.ts index 3e4bf22d32..1952e9002d 100644 --- a/src/clients/docker/models/UnlockKeyResponse.ts +++ b/src/clients/docker/models/UnlockKeyResponse.ts @@ -2,64 +2,67 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UnlockKeyResponse */ export interface UnlockKeyResponse { - /** - * The swarm's unlock key. - * @type {string} - * @memberof UnlockKeyResponse - */ - UnlockKey?: string; + /** + * The swarm's unlock key. + * @type {string} + * @memberof UnlockKeyResponse + */ + UnlockKey?: string; } /** * Check if a given object implements the UnlockKeyResponse interface. */ export function instanceOfUnlockKeyResponse(value: object): value is UnlockKeyResponse { - return true; + return true; } export function UnlockKeyResponseFromJSON(json: any): UnlockKeyResponse { - return UnlockKeyResponseFromJSONTyped(json, false); + return UnlockKeyResponseFromJSONTyped(json, false); } -export function UnlockKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnlockKeyResponse { - if (json == null) { - return json; - } - return { - - 'UnlockKey': json['UnlockKey'] == null ? undefined : json['UnlockKey'], - }; +export function UnlockKeyResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UnlockKeyResponse { + if (json == null) { + return json; + } + return { + UnlockKey: json["UnlockKey"] == null ? undefined : json["UnlockKey"], + }; } export function UnlockKeyResponseToJSON(json: any): UnlockKeyResponse { - return UnlockKeyResponseToJSONTyped(json, false); + return UnlockKeyResponseToJSONTyped(json, false); } -export function UnlockKeyResponseToJSONTyped(value?: UnlockKeyResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UnlockKeyResponseToJSONTyped( + value?: UnlockKeyResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'UnlockKey': value['UnlockKey'], - }; + return { + UnlockKey: value["UnlockKey"], + }; } - diff --git a/src/clients/docker/models/Volume.ts b/src/clients/docker/models/Volume.ts index 9427b79292..def19b9d8d 100644 --- a/src/clients/docker/models/Volume.ts +++ b/src/clients/docker/models/Volume.ts @@ -2,176 +2,176 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { VolumeUsageData } from './VolumeUsageData'; +import { mapValues } from "../runtime"; +import type { VolumeUsageData } from "./VolumeUsageData"; import { - VolumeUsageDataFromJSON, - VolumeUsageDataFromJSONTyped, - VolumeUsageDataToJSON, - VolumeUsageDataToJSONTyped, -} from './VolumeUsageData'; -import type { ClusterVolume } from './ClusterVolume'; + VolumeUsageDataFromJSON, + VolumeUsageDataFromJSONTyped, + VolumeUsageDataToJSON, + VolumeUsageDataToJSONTyped, +} from "./VolumeUsageData"; +import type { ClusterVolume } from "./ClusterVolume"; import { - ClusterVolumeFromJSON, - ClusterVolumeFromJSONTyped, - ClusterVolumeToJSON, - ClusterVolumeToJSONTyped, -} from './ClusterVolume'; + ClusterVolumeFromJSON, + ClusterVolumeFromJSONTyped, + ClusterVolumeToJSON, + ClusterVolumeToJSONTyped, +} from "./ClusterVolume"; /** - * + * * @export * @interface Volume */ export interface Volume { - /** - * Name of the volume. - * @type {string} - * @memberof Volume - */ - Name: string; - /** - * Name of the volume driver used by the volume. - * @type {string} - * @memberof Volume - */ - Driver: string; - /** - * Mount path of the volume on the host. - * @type {string} - * @memberof Volume - */ - Mountpoint: string; - /** - * Date/Time the volume was created. - * @type {string} - * @memberof Volume - */ - CreatedAt?: string; - /** - * Low-level details about the volume, provided by the volume driver. - * Details are returned as a map with key/value pairs: - * `{"key":"value","key2":"value2"}`. - * - * The `Status` field is optional, and is omitted if the volume driver - * does not support this feature. - * - * @type {{ [key: string]: object; }} - * @memberof Volume - */ - Status?: { [key: string]: object; }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Volume - */ - Labels: { [key: string]: string; }; - /** - * The level at which the volume exists. Either `global` for cluster-wide, - * or `local` for machine level. - * - * @type {string} - * @memberof Volume - */ - Scope: VolumeScopeEnum; - /** - * - * @type {ClusterVolume} - * @memberof Volume - */ - ClusterVolume?: ClusterVolume; - /** - * The driver specific options used when creating the volume. - * - * @type {{ [key: string]: string; }} - * @memberof Volume - */ - Options: { [key: string]: string; }; - /** - * - * @type {VolumeUsageData} - * @memberof Volume - */ - UsageData?: VolumeUsageData | null; + /** + * Name of the volume. + * @type {string} + * @memberof Volume + */ + Name: string; + /** + * Name of the volume driver used by the volume. + * @type {string} + * @memberof Volume + */ + Driver: string; + /** + * Mount path of the volume on the host. + * @type {string} + * @memberof Volume + */ + Mountpoint: string; + /** + * Date/Time the volume was created. + * @type {string} + * @memberof Volume + */ + CreatedAt?: string; + /** + * Low-level details about the volume, provided by the volume driver. + * Details are returned as a map with key/value pairs: + * `{"key":"value","key2":"value2"}`. + * + * The `Status` field is optional, and is omitted if the volume driver + * does not support this feature. + * + * @type {{ [key: string]: object; }} + * @memberof Volume + */ + Status?: { [key: string]: object }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof Volume + */ + Labels: { [key: string]: string }; + /** + * The level at which the volume exists. Either `global` for cluster-wide, + * or `local` for machine level. + * + * @type {string} + * @memberof Volume + */ + Scope: VolumeScopeEnum; + /** + * + * @type {ClusterVolume} + * @memberof Volume + */ + ClusterVolume?: ClusterVolume; + /** + * The driver specific options used when creating the volume. + * + * @type {{ [key: string]: string; }} + * @memberof Volume + */ + Options: { [key: string]: string }; + /** + * + * @type {VolumeUsageData} + * @memberof Volume + */ + UsageData?: VolumeUsageData | null; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum VolumeScopeEnum { - Local = 'local', - Global = 'global' + Local = "local", + Global = "global", } - /** * Check if a given object implements the Volume interface. */ export function instanceOfVolume(value: object): value is Volume { - if (!('Name' in value) || value['Name'] === undefined) return false; - if (!('Driver' in value) || value['Driver'] === undefined) return false; - if (!('Mountpoint' in value) || value['Mountpoint'] === undefined) return false; - if (!('Labels' in value) || value['Labels'] === undefined) return false; - if (!('Scope' in value) || value['Scope'] === undefined) return false; - if (!('Options' in value) || value['Options'] === undefined) return false; - return true; + if (!("Name" in value) || value["Name"] === undefined) return false; + if (!("Driver" in value) || value["Driver"] === undefined) return false; + if (!("Mountpoint" in value) || value["Mountpoint"] === undefined) return false; + if (!("Labels" in value) || value["Labels"] === undefined) return false; + if (!("Scope" in value) || value["Scope"] === undefined) return false; + if (!("Options" in value) || value["Options"] === undefined) return false; + return true; } export function VolumeFromJSON(json: any): Volume { - return VolumeFromJSONTyped(json, false); + return VolumeFromJSONTyped(json, false); } export function VolumeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Volume { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'], - 'Driver': json['Driver'], - 'Mountpoint': json['Mountpoint'], - 'CreatedAt': json['CreatedAt'] == null ? undefined : json['CreatedAt'], - 'Status': json['Status'] == null ? undefined : json['Status'], - 'Labels': json['Labels'], - 'Scope': json['Scope'], - 'ClusterVolume': json['ClusterVolume'] == null ? undefined : ClusterVolumeFromJSON(json['ClusterVolume']), - 'Options': json['Options'], - 'UsageData': json['UsageData'] == null ? undefined : VolumeUsageDataFromJSON(json['UsageData']), - }; + if (json == null) { + return json; + } + return { + Name: json["Name"], + Driver: json["Driver"], + Mountpoint: json["Mountpoint"], + CreatedAt: json["CreatedAt"] == null ? undefined : json["CreatedAt"], + Status: json["Status"] == null ? undefined : json["Status"], + Labels: json["Labels"], + Scope: json["Scope"], + ClusterVolume: + json["ClusterVolume"] == null ? undefined : ClusterVolumeFromJSON(json["ClusterVolume"]), + Options: json["Options"], + UsageData: json["UsageData"] == null ? undefined : VolumeUsageDataFromJSON(json["UsageData"]), + }; } export function VolumeToJSON(json: any): Volume { - return VolumeToJSONTyped(json, false); + return VolumeToJSONTyped(json, false); } -export function VolumeToJSONTyped(value?: Volume | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function VolumeToJSONTyped( + value?: Volume | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Driver': value['Driver'], - 'Mountpoint': value['Mountpoint'], - 'CreatedAt': value['CreatedAt'], - 'Status': value['Status'], - 'Labels': value['Labels'], - 'Scope': value['Scope'], - 'ClusterVolume': ClusterVolumeToJSON(value['ClusterVolume']), - 'Options': value['Options'], - 'UsageData': VolumeUsageDataToJSON(value['UsageData']), - }; + return { + Name: value["Name"], + Driver: value["Driver"], + Mountpoint: value["Mountpoint"], + CreatedAt: value["CreatedAt"], + Status: value["Status"], + Labels: value["Labels"], + Scope: value["Scope"], + ClusterVolume: ClusterVolumeToJSON(value["ClusterVolume"]), + Options: value["Options"], + UsageData: VolumeUsageDataToJSON(value["UsageData"]), + }; } - diff --git a/src/clients/docker/models/VolumeCreateOptions.ts b/src/clients/docker/models/VolumeCreateOptions.ts index dd5fac3f2a..c377032ba1 100644 --- a/src/clients/docker/models/VolumeCreateOptions.ts +++ b/src/clients/docker/models/VolumeCreateOptions.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ClusterVolumeSpec } from './ClusterVolumeSpec'; +import { mapValues } from "../runtime"; +import type { ClusterVolumeSpec } from "./ClusterVolumeSpec"; import { - ClusterVolumeSpecFromJSON, - ClusterVolumeSpecFromJSONTyped, - ClusterVolumeSpecToJSON, - ClusterVolumeSpecToJSONTyped, -} from './ClusterVolumeSpec'; + ClusterVolumeSpecFromJSON, + ClusterVolumeSpecFromJSONTyped, + ClusterVolumeSpecToJSON, + ClusterVolumeSpecToJSONTyped, +} from "./ClusterVolumeSpec"; /** * Volume configuration @@ -27,82 +27,88 @@ import { * @interface VolumeCreateOptions */ export interface VolumeCreateOptions { - /** - * The new volume's name. If not specified, Docker generates a name. - * - * @type {string} - * @memberof VolumeCreateOptions - */ - Name?: string; - /** - * Name of the volume driver to use. - * @type {string} - * @memberof VolumeCreateOptions - */ - Driver?: string; - /** - * A mapping of driver options and values. These options are - * passed directly to the driver and are driver specific. - * - * @type {{ [key: string]: string; }} - * @memberof VolumeCreateOptions - */ - DriverOpts?: { [key: string]: string; }; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof VolumeCreateOptions - */ - Labels?: { [key: string]: string; }; - /** - * - * @type {ClusterVolumeSpec} - * @memberof VolumeCreateOptions - */ - ClusterVolumeSpec?: ClusterVolumeSpec; + /** + * The new volume's name. If not specified, Docker generates a name. + * + * @type {string} + * @memberof VolumeCreateOptions + */ + Name?: string; + /** + * Name of the volume driver to use. + * @type {string} + * @memberof VolumeCreateOptions + */ + Driver?: string; + /** + * A mapping of driver options and values. These options are + * passed directly to the driver and are driver specific. + * + * @type {{ [key: string]: string; }} + * @memberof VolumeCreateOptions + */ + DriverOpts?: { [key: string]: string }; + /** + * User-defined key/value metadata. + * @type {{ [key: string]: string; }} + * @memberof VolumeCreateOptions + */ + Labels?: { [key: string]: string }; + /** + * + * @type {ClusterVolumeSpec} + * @memberof VolumeCreateOptions + */ + ClusterVolumeSpec?: ClusterVolumeSpec; } /** * Check if a given object implements the VolumeCreateOptions interface. */ export function instanceOfVolumeCreateOptions(value: object): value is VolumeCreateOptions { - return true; + return true; } export function VolumeCreateOptionsFromJSON(json: any): VolumeCreateOptions { - return VolumeCreateOptionsFromJSONTyped(json, false); + return VolumeCreateOptionsFromJSONTyped(json, false); } -export function VolumeCreateOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeCreateOptions { - if (json == null) { - return json; - } - return { - - 'Name': json['Name'] == null ? undefined : json['Name'], - 'Driver': json['Driver'] == null ? undefined : json['Driver'], - 'DriverOpts': json['DriverOpts'] == null ? undefined : json['DriverOpts'], - 'Labels': json['Labels'] == null ? undefined : json['Labels'], - 'ClusterVolumeSpec': json['ClusterVolumeSpec'] == null ? undefined : ClusterVolumeSpecFromJSON(json['ClusterVolumeSpec']), - }; +export function VolumeCreateOptionsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): VolumeCreateOptions { + if (json == null) { + return json; + } + return { + Name: json["Name"] == null ? undefined : json["Name"], + Driver: json["Driver"] == null ? undefined : json["Driver"], + DriverOpts: json["DriverOpts"] == null ? undefined : json["DriverOpts"], + Labels: json["Labels"] == null ? undefined : json["Labels"], + ClusterVolumeSpec: + json["ClusterVolumeSpec"] == null + ? undefined + : ClusterVolumeSpecFromJSON(json["ClusterVolumeSpec"]), + }; } export function VolumeCreateOptionsToJSON(json: any): VolumeCreateOptions { - return VolumeCreateOptionsToJSONTyped(json, false); + return VolumeCreateOptionsToJSONTyped(json, false); } -export function VolumeCreateOptionsToJSONTyped(value?: VolumeCreateOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function VolumeCreateOptionsToJSONTyped( + value?: VolumeCreateOptions | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Name': value['Name'], - 'Driver': value['Driver'], - 'DriverOpts': value['DriverOpts'], - 'Labels': value['Labels'], - 'ClusterVolumeSpec': ClusterVolumeSpecToJSON(value['ClusterVolumeSpec']), - }; + return { + Name: value["Name"], + Driver: value["Driver"], + DriverOpts: value["DriverOpts"], + Labels: value["Labels"], + ClusterVolumeSpec: ClusterVolumeSpecToJSON(value["ClusterVolumeSpec"]), + }; } - diff --git a/src/clients/docker/models/VolumeListResponse.ts b/src/clients/docker/models/VolumeListResponse.ts index d076b92855..c98ab2545c 100644 --- a/src/clients/docker/models/VolumeListResponse.ts +++ b/src/clients/docker/models/VolumeListResponse.ts @@ -2,24 +2,19 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Volume } from './Volume'; -import { - VolumeFromJSON, - VolumeFromJSONTyped, - VolumeToJSON, - VolumeToJSONTyped, -} from './Volume'; +import { mapValues } from "../runtime"; +import type { Volume } from "./Volume"; +import { VolumeFromJSON, VolumeFromJSONTyped, VolumeToJSON, VolumeToJSONTyped } from "./Volume"; /** * Volume list response @@ -27,56 +22,61 @@ import { * @interface VolumeListResponse */ export interface VolumeListResponse { - /** - * List of volumes - * @type {Array} - * @memberof VolumeListResponse - */ - Volumes?: Array; - /** - * Warnings that occurred when fetching the list of volumes. - * - * @type {Array} - * @memberof VolumeListResponse - */ - Warnings?: Array; + /** + * List of volumes + * @type {Array} + * @memberof VolumeListResponse + */ + Volumes?: Array; + /** + * Warnings that occurred when fetching the list of volumes. + * + * @type {Array} + * @memberof VolumeListResponse + */ + Warnings?: Array; } /** * Check if a given object implements the VolumeListResponse interface. */ export function instanceOfVolumeListResponse(value: object): value is VolumeListResponse { - return true; + return true; } export function VolumeListResponseFromJSON(json: any): VolumeListResponse { - return VolumeListResponseFromJSONTyped(json, false); + return VolumeListResponseFromJSONTyped(json, false); } -export function VolumeListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeListResponse { - if (json == null) { - return json; - } - return { - - 'Volumes': json['Volumes'] == null ? undefined : ((json['Volumes'] as Array).map(VolumeFromJSON)), - 'Warnings': json['Warnings'] == null ? undefined : json['Warnings'], - }; +export function VolumeListResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): VolumeListResponse { + if (json == null) { + return json; + } + return { + Volumes: + json["Volumes"] == null ? undefined : (json["Volumes"] as Array).map(VolumeFromJSON), + Warnings: json["Warnings"] == null ? undefined : json["Warnings"], + }; } export function VolumeListResponseToJSON(json: any): VolumeListResponse { - return VolumeListResponseToJSONTyped(json, false); + return VolumeListResponseToJSONTyped(json, false); } -export function VolumeListResponseToJSONTyped(value?: VolumeListResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function VolumeListResponseToJSONTyped( + value?: VolumeListResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Volumes': value['Volumes'] == null ? undefined : ((value['Volumes'] as Array).map(VolumeToJSON)), - 'Warnings': value['Warnings'], - }; + return { + Volumes: + value["Volumes"] == null ? undefined : (value["Volumes"] as Array).map(VolumeToJSON), + Warnings: value["Warnings"], + }; } - diff --git a/src/clients/docker/models/VolumePruneResponse.ts b/src/clients/docker/models/VolumePruneResponse.ts index 5aa44ef868..16d09ba44e 100644 --- a/src/clients/docker/models/VolumePruneResponse.ts +++ b/src/clients/docker/models/VolumePruneResponse.ts @@ -2,72 +2,75 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface VolumePruneResponse */ export interface VolumePruneResponse { - /** - * Volumes that were deleted - * @type {Array} - * @memberof VolumePruneResponse - */ - VolumesDeleted?: Array; - /** - * Disk space reclaimed in bytes - * @type {number} - * @memberof VolumePruneResponse - */ - SpaceReclaimed?: number; + /** + * Volumes that were deleted + * @type {Array} + * @memberof VolumePruneResponse + */ + VolumesDeleted?: Array; + /** + * Disk space reclaimed in bytes + * @type {number} + * @memberof VolumePruneResponse + */ + SpaceReclaimed?: number; } /** * Check if a given object implements the VolumePruneResponse interface. */ export function instanceOfVolumePruneResponse(value: object): value is VolumePruneResponse { - return true; + return true; } export function VolumePruneResponseFromJSON(json: any): VolumePruneResponse { - return VolumePruneResponseFromJSONTyped(json, false); + return VolumePruneResponseFromJSONTyped(json, false); } -export function VolumePruneResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumePruneResponse { - if (json == null) { - return json; - } - return { - - 'VolumesDeleted': json['VolumesDeleted'] == null ? undefined : json['VolumesDeleted'], - 'SpaceReclaimed': json['SpaceReclaimed'] == null ? undefined : json['SpaceReclaimed'], - }; +export function VolumePruneResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): VolumePruneResponse { + if (json == null) { + return json; + } + return { + VolumesDeleted: json["VolumesDeleted"] == null ? undefined : json["VolumesDeleted"], + SpaceReclaimed: json["SpaceReclaimed"] == null ? undefined : json["SpaceReclaimed"], + }; } export function VolumePruneResponseToJSON(json: any): VolumePruneResponse { - return VolumePruneResponseToJSONTyped(json, false); + return VolumePruneResponseToJSONTyped(json, false); } -export function VolumePruneResponseToJSONTyped(value?: VolumePruneResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function VolumePruneResponseToJSONTyped( + value?: VolumePruneResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'VolumesDeleted': value['VolumesDeleted'], - 'SpaceReclaimed': value['SpaceReclaimed'], - }; + return { + VolumesDeleted: value["VolumesDeleted"], + SpaceReclaimed: value["SpaceReclaimed"], + }; } - diff --git a/src/clients/docker/models/VolumeUpdateRequest.ts b/src/clients/docker/models/VolumeUpdateRequest.ts index 1f343025cc..ec92486595 100644 --- a/src/clients/docker/models/VolumeUpdateRequest.ts +++ b/src/clients/docker/models/VolumeUpdateRequest.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ClusterVolumeSpec } from './ClusterVolumeSpec'; +import { mapValues } from "../runtime"; +import type { ClusterVolumeSpec } from "./ClusterVolumeSpec"; import { - ClusterVolumeSpecFromJSON, - ClusterVolumeSpecFromJSONTyped, - ClusterVolumeSpecToJSON, - ClusterVolumeSpecToJSONTyped, -} from './ClusterVolumeSpec'; + ClusterVolumeSpecFromJSON, + ClusterVolumeSpecFromJSONTyped, + ClusterVolumeSpecToJSON, + ClusterVolumeSpecToJSONTyped, +} from "./ClusterVolumeSpec"; /** * Volume configuration @@ -27,47 +27,50 @@ import { * @interface VolumeUpdateRequest */ export interface VolumeUpdateRequest { - /** - * - * @type {ClusterVolumeSpec} - * @memberof VolumeUpdateRequest - */ - Spec?: ClusterVolumeSpec; + /** + * + * @type {ClusterVolumeSpec} + * @memberof VolumeUpdateRequest + */ + Spec?: ClusterVolumeSpec; } /** * Check if a given object implements the VolumeUpdateRequest interface. */ export function instanceOfVolumeUpdateRequest(value: object): value is VolumeUpdateRequest { - return true; + return true; } export function VolumeUpdateRequestFromJSON(json: any): VolumeUpdateRequest { - return VolumeUpdateRequestFromJSONTyped(json, false); + return VolumeUpdateRequestFromJSONTyped(json, false); } -export function VolumeUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeUpdateRequest { - if (json == null) { - return json; - } - return { - - 'Spec': json['Spec'] == null ? undefined : ClusterVolumeSpecFromJSON(json['Spec']), - }; +export function VolumeUpdateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): VolumeUpdateRequest { + if (json == null) { + return json; + } + return { + Spec: json["Spec"] == null ? undefined : ClusterVolumeSpecFromJSON(json["Spec"]), + }; } export function VolumeUpdateRequestToJSON(json: any): VolumeUpdateRequest { - return VolumeUpdateRequestToJSONTyped(json, false); + return VolumeUpdateRequestToJSONTyped(json, false); } -export function VolumeUpdateRequestToJSONTyped(value?: VolumeUpdateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function VolumeUpdateRequestToJSONTyped( + value?: VolumeUpdateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Spec': ClusterVolumeSpecToJSON(value['Spec']), - }; + return { + Spec: ClusterVolumeSpecToJSON(value["Spec"]), + }; } - diff --git a/src/clients/docker/models/VolumeUsageData.ts b/src/clients/docker/models/VolumeUsageData.ts index fb5ca83548..b58dfc7675 100644 --- a/src/clients/docker/models/VolumeUsageData.ts +++ b/src/clients/docker/models/VolumeUsageData.ts @@ -2,82 +2,85 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Usage details about the volume. This information is used by the * `GET /system/df` endpoint, and omitted in other endpoints. - * + * * @export * @interface VolumeUsageData */ export interface VolumeUsageData { - /** - * Amount of disk space used by the volume (in bytes). This information - * is only available for volumes created with the `"local"` volume - * driver. For volumes created with other volume drivers, this field - * is set to `-1` ("not available") - * - * @type {number} - * @memberof VolumeUsageData - */ - Size: number; - /** - * The number of containers referencing this volume. This field - * is set to `-1` if the reference-count is not available. - * - * @type {number} - * @memberof VolumeUsageData - */ - RefCount: number; + /** + * Amount of disk space used by the volume (in bytes). This information + * is only available for volumes created with the `"local"` volume + * driver. For volumes created with other volume drivers, this field + * is set to `-1` ("not available") + * + * @type {number} + * @memberof VolumeUsageData + */ + Size: number; + /** + * The number of containers referencing this volume. This field + * is set to `-1` if the reference-count is not available. + * + * @type {number} + * @memberof VolumeUsageData + */ + RefCount: number; } /** * Check if a given object implements the VolumeUsageData interface. */ export function instanceOfVolumeUsageData(value: object): value is VolumeUsageData { - if (!('Size' in value) || value['Size'] === undefined) return false; - if (!('RefCount' in value) || value['RefCount'] === undefined) return false; - return true; + if (!("Size" in value) || value["Size"] === undefined) return false; + if (!("RefCount" in value) || value["RefCount"] === undefined) return false; + return true; } export function VolumeUsageDataFromJSON(json: any): VolumeUsageData { - return VolumeUsageDataFromJSONTyped(json, false); + return VolumeUsageDataFromJSONTyped(json, false); } -export function VolumeUsageDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): VolumeUsageData { - if (json == null) { - return json; - } - return { - - 'Size': json['Size'], - 'RefCount': json['RefCount'], - }; +export function VolumeUsageDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): VolumeUsageData { + if (json == null) { + return json; + } + return { + Size: json["Size"], + RefCount: json["RefCount"], + }; } export function VolumeUsageDataToJSON(json: any): VolumeUsageData { - return VolumeUsageDataToJSONTyped(json, false); + return VolumeUsageDataToJSONTyped(json, false); } -export function VolumeUsageDataToJSONTyped(value?: VolumeUsageData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function VolumeUsageDataToJSONTyped( + value?: VolumeUsageData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'Size': value['Size'], - 'RefCount': value['RefCount'], - }; + return { + Size: value["Size"], + RefCount: value["RefCount"], + }; } - diff --git a/src/clients/docker/models/index.ts b/src/clients/docker/models/index.ts index ac9e7f4cda..88960486a5 100644 --- a/src/clients/docker/models/index.ts +++ b/src/clients/docker/models/index.ts @@ -1,208 +1,208 @@ /* tslint:disable */ /* eslint-disable */ -export * from './Address'; -export * from './AuthConfig'; -export * from './BuildCache'; -export * from './BuildInfo'; -export * from './BuildPruneResponse'; -export * from './ChangeType'; -export * from './ClusterInfo'; -export * from './ClusterVolume'; -export * from './ClusterVolumeInfo'; -export * from './ClusterVolumePublishStatusInner'; -export * from './ClusterVolumeSpec'; -export * from './ClusterVolumeSpecAccessMode'; -export * from './ClusterVolumeSpecAccessModeAccessibilityRequirements'; -export * from './ClusterVolumeSpecAccessModeCapacityRange'; -export * from './ClusterVolumeSpecAccessModeSecretsInner'; -export * from './Commit'; -export * from './Config'; -export * from './ConfigCreateRequest'; -export * from './ConfigReference'; -export * from './ConfigSpec'; -export * from './ContainerConfig'; -export * from './ContainerCreateRequest'; -export * from './ContainerCreateResponse'; -export * from './ContainerInspectResponse'; -export * from './ContainerPruneResponse'; -export * from './ContainerState'; -export * from './ContainerSummary'; -export * from './ContainerSummaryHostConfig'; -export * from './ContainerSummaryNetworkSettings'; -export * from './ContainerTopResponse'; -export * from './ContainerUpdateRequest'; -export * from './ContainerUpdateResponse'; -export * from './ContainerWaitExitError'; -export * from './ContainerWaitResponse'; -export * from './CreateImageInfo'; -export * from './DeviceMapping'; -export * from './DeviceRequest'; -export * from './DistributionInspect'; -export * from './Driver'; -export * from './EndpointIPAMConfig'; -export * from './EndpointPortConfig'; -export * from './EndpointSettings'; -export * from './EndpointSpec'; -export * from './EngineDescription'; -export * from './EngineDescriptionPluginsInner'; -export * from './ErrorDetail'; -export * from './ErrorResponse'; -export * from './EventActor'; -export * from './EventMessage'; -export * from './ExecConfig'; -export * from './ExecInspectResponse'; -export * from './ExecStartConfig'; -export * from './FilesystemChange'; -export * from './GenericResourcesInner'; -export * from './GenericResourcesInnerDiscreteResourceSpec'; -export * from './GenericResourcesInnerNamedResourceSpec'; -export * from './GraphDriverData'; -export * from './Health'; -export * from './HealthConfig'; -export * from './HealthcheckResult'; -export * from './HistoryResponseItem'; -export * from './HostConfig'; -export * from './HostConfigAllOfLogConfig'; -export * from './IPAM'; -export * from './IPAMConfig'; -export * from './IdResponse'; -export * from './ImageConfig'; -export * from './ImageDeleteResponseItem'; -export * from './ImageID'; -export * from './ImageInspect'; -export * from './ImageInspectMetadata'; -export * from './ImageInspectRootFS'; -export * from './ImagePruneResponse'; -export * from './ImageSearchResponseItem'; -export * from './ImageSummary'; -export * from './IndexInfo'; -export * from './JoinTokens'; -export * from './Limit'; -export * from './LocalNodeState'; -export * from './ManagerStatus'; -export * from './Mount'; -export * from './MountBindOptions'; -export * from './MountPoint'; -export * from './MountTmpfsOptions'; -export * from './MountVolumeOptions'; -export * from './MountVolumeOptionsDriverConfig'; -export * from './Network'; -export * from './NetworkAttachmentConfig'; -export * from './NetworkConnectRequest'; -export * from './NetworkContainer'; -export * from './NetworkCreateRequest'; -export * from './NetworkCreateResponse'; -export * from './NetworkDisconnectRequest'; -export * from './NetworkPruneResponse'; -export * from './NetworkSettings'; -export * from './NetworkingConfig'; -export * from './Node'; -export * from './NodeDescription'; -export * from './NodeSpec'; -export * from './NodeState'; -export * from './NodeStatus'; -export * from './OCIDescriptor'; -export * from './OCIPlatform'; -export * from './ObjectVersion'; -export * from './PeerInfo'; -export * from './PeerNode'; -export * from './Platform'; -export * from './Plugin'; -export * from './PluginConfig'; -export * from './PluginConfigArgs'; -export * from './PluginConfigInterface'; -export * from './PluginConfigLinux'; -export * from './PluginConfigNetwork'; -export * from './PluginConfigRootfs'; -export * from './PluginConfigUser'; -export * from './PluginDevice'; -export * from './PluginEnv'; -export * from './PluginInterfaceType'; -export * from './PluginMount'; -export * from './PluginPrivilege'; -export * from './PluginSettings'; -export * from './PluginsInfo'; -export * from './Port'; -export * from './PortBinding'; -export * from './ProcessConfig'; -export * from './ProgressDetail'; -export * from './PushImageInfo'; -export * from './Reachability'; -export * from './RegistryServiceConfig'; -export * from './ResourceObject'; -export * from './Resources'; -export * from './ResourcesBlkioWeightDeviceInner'; -export * from './ResourcesUlimitsInner'; -export * from './RestartPolicy'; -export * from './Runtime'; -export * from './Secret'; -export * from './SecretCreateRequest'; -export * from './SecretSpec'; -export * from './Service'; -export * from './ServiceCreateRequest'; -export * from './ServiceCreateResponse'; -export * from './ServiceEndpoint'; -export * from './ServiceEndpointVirtualIPsInner'; -export * from './ServiceJobStatus'; -export * from './ServiceServiceStatus'; -export * from './ServiceSpec'; -export * from './ServiceSpecMode'; -export * from './ServiceSpecModeReplicated'; -export * from './ServiceSpecModeReplicatedJob'; -export * from './ServiceSpecRollbackConfig'; -export * from './ServiceSpecUpdateConfig'; -export * from './ServiceUpdateRequest'; -export * from './ServiceUpdateResponse'; -export * from './ServiceUpdateStatus'; -export * from './Swarm'; -export * from './SwarmInfo'; -export * from './SwarmInitRequest'; -export * from './SwarmJoinRequest'; -export * from './SwarmSpec'; -export * from './SwarmSpecCAConfig'; -export * from './SwarmSpecCAConfigExternalCAsInner'; -export * from './SwarmSpecDispatcher'; -export * from './SwarmSpecEncryptionConfig'; -export * from './SwarmSpecOrchestration'; -export * from './SwarmSpecRaft'; -export * from './SwarmSpecTaskDefaults'; -export * from './SwarmSpecTaskDefaultsLogDriver'; -export * from './SwarmUnlockRequest'; -export * from './SystemAuthResponse'; -export * from './SystemDataUsageResponse'; -export * from './SystemInfo'; -export * from './SystemInfoDefaultAddressPoolsInner'; -export * from './SystemVersion'; -export * from './SystemVersionComponentsInner'; -export * from './SystemVersionPlatform'; -export * from './TLSInfo'; -export * from './Task'; -export * from './TaskSpec'; -export * from './TaskSpecContainerSpec'; -export * from './TaskSpecContainerSpecConfigsInner'; -export * from './TaskSpecContainerSpecConfigsInnerFile'; -export * from './TaskSpecContainerSpecDNSConfig'; -export * from './TaskSpecContainerSpecPrivileges'; -export * from './TaskSpecContainerSpecPrivilegesCredentialSpec'; -export * from './TaskSpecContainerSpecPrivilegesSELinuxContext'; -export * from './TaskSpecContainerSpecSecretsInner'; -export * from './TaskSpecContainerSpecSecretsInnerFile'; -export * from './TaskSpecLogDriver'; -export * from './TaskSpecNetworkAttachmentSpec'; -export * from './TaskSpecPlacement'; -export * from './TaskSpecPlacementPreferencesInner'; -export * from './TaskSpecPlacementPreferencesInnerSpread'; -export * from './TaskSpecPluginSpec'; -export * from './TaskSpecResources'; -export * from './TaskSpecRestartPolicy'; -export * from './TaskState'; -export * from './TaskStatus'; -export * from './TaskStatusContainerStatus'; -export * from './ThrottleDevice'; -export * from './UnlockKeyResponse'; -export * from './Volume'; -export * from './VolumeCreateOptions'; -export * from './VolumeListResponse'; -export * from './VolumePruneResponse'; -export * from './VolumeUpdateRequest'; -export * from './VolumeUsageData'; +export * from "./Address"; +export * from "./AuthConfig"; +export * from "./BuildCache"; +export * from "./BuildInfo"; +export * from "./BuildPruneResponse"; +export * from "./ChangeType"; +export * from "./ClusterInfo"; +export * from "./ClusterVolume"; +export * from "./ClusterVolumeInfo"; +export * from "./ClusterVolumePublishStatusInner"; +export * from "./ClusterVolumeSpec"; +export * from "./ClusterVolumeSpecAccessMode"; +export * from "./ClusterVolumeSpecAccessModeAccessibilityRequirements"; +export * from "./ClusterVolumeSpecAccessModeCapacityRange"; +export * from "./ClusterVolumeSpecAccessModeSecretsInner"; +export * from "./Commit"; +export * from "./Config"; +export * from "./ConfigCreateRequest"; +export * from "./ConfigReference"; +export * from "./ConfigSpec"; +export * from "./ContainerConfig"; +export * from "./ContainerCreateRequest"; +export * from "./ContainerCreateResponse"; +export * from "./ContainerInspectResponse"; +export * from "./ContainerPruneResponse"; +export * from "./ContainerState"; +export * from "./ContainerSummary"; +export * from "./ContainerSummaryHostConfig"; +export * from "./ContainerSummaryNetworkSettings"; +export * from "./ContainerTopResponse"; +export * from "./ContainerUpdateRequest"; +export * from "./ContainerUpdateResponse"; +export * from "./ContainerWaitExitError"; +export * from "./ContainerWaitResponse"; +export * from "./CreateImageInfo"; +export * from "./DeviceMapping"; +export * from "./DeviceRequest"; +export * from "./DistributionInspect"; +export * from "./Driver"; +export * from "./EndpointIPAMConfig"; +export * from "./EndpointPortConfig"; +export * from "./EndpointSettings"; +export * from "./EndpointSpec"; +export * from "./EngineDescription"; +export * from "./EngineDescriptionPluginsInner"; +export * from "./ErrorDetail"; +export * from "./ErrorResponse"; +export * from "./EventActor"; +export * from "./EventMessage"; +export * from "./ExecConfig"; +export * from "./ExecInspectResponse"; +export * from "./ExecStartConfig"; +export * from "./FilesystemChange"; +export * from "./GenericResourcesInner"; +export * from "./GenericResourcesInnerDiscreteResourceSpec"; +export * from "./GenericResourcesInnerNamedResourceSpec"; +export * from "./GraphDriverData"; +export * from "./Health"; +export * from "./HealthConfig"; +export * from "./HealthcheckResult"; +export * from "./HistoryResponseItem"; +export * from "./HostConfig"; +export * from "./HostConfigAllOfLogConfig"; +export * from "./IPAM"; +export * from "./IPAMConfig"; +export * from "./IdResponse"; +export * from "./ImageConfig"; +export * from "./ImageDeleteResponseItem"; +export * from "./ImageID"; +export * from "./ImageInspect"; +export * from "./ImageInspectMetadata"; +export * from "./ImageInspectRootFS"; +export * from "./ImagePruneResponse"; +export * from "./ImageSearchResponseItem"; +export * from "./ImageSummary"; +export * from "./IndexInfo"; +export * from "./JoinTokens"; +export * from "./Limit"; +export * from "./LocalNodeState"; +export * from "./ManagerStatus"; +export * from "./Mount"; +export * from "./MountBindOptions"; +export * from "./MountPoint"; +export * from "./MountTmpfsOptions"; +export * from "./MountVolumeOptions"; +export * from "./MountVolumeOptionsDriverConfig"; +export * from "./Network"; +export * from "./NetworkAttachmentConfig"; +export * from "./NetworkConnectRequest"; +export * from "./NetworkContainer"; +export * from "./NetworkCreateRequest"; +export * from "./NetworkCreateResponse"; +export * from "./NetworkDisconnectRequest"; +export * from "./NetworkPruneResponse"; +export * from "./NetworkSettings"; +export * from "./NetworkingConfig"; +export * from "./Node"; +export * from "./NodeDescription"; +export * from "./NodeSpec"; +export * from "./NodeState"; +export * from "./NodeStatus"; +export * from "./OCIDescriptor"; +export * from "./OCIPlatform"; +export * from "./ObjectVersion"; +export * from "./PeerInfo"; +export * from "./PeerNode"; +export * from "./Platform"; +export * from "./Plugin"; +export * from "./PluginConfig"; +export * from "./PluginConfigArgs"; +export * from "./PluginConfigInterface"; +export * from "./PluginConfigLinux"; +export * from "./PluginConfigNetwork"; +export * from "./PluginConfigRootfs"; +export * from "./PluginConfigUser"; +export * from "./PluginDevice"; +export * from "./PluginEnv"; +export * from "./PluginInterfaceType"; +export * from "./PluginMount"; +export * from "./PluginPrivilege"; +export * from "./PluginSettings"; +export * from "./PluginsInfo"; +export * from "./Port"; +export * from "./PortBinding"; +export * from "./ProcessConfig"; +export * from "./ProgressDetail"; +export * from "./PushImageInfo"; +export * from "./Reachability"; +export * from "./RegistryServiceConfig"; +export * from "./ResourceObject"; +export * from "./Resources"; +export * from "./ResourcesBlkioWeightDeviceInner"; +export * from "./ResourcesUlimitsInner"; +export * from "./RestartPolicy"; +export * from "./Runtime"; +export * from "./Secret"; +export * from "./SecretCreateRequest"; +export * from "./SecretSpec"; +export * from "./Service"; +export * from "./ServiceCreateRequest"; +export * from "./ServiceCreateResponse"; +export * from "./ServiceEndpoint"; +export * from "./ServiceEndpointVirtualIPsInner"; +export * from "./ServiceJobStatus"; +export * from "./ServiceServiceStatus"; +export * from "./ServiceSpec"; +export * from "./ServiceSpecMode"; +export * from "./ServiceSpecModeReplicated"; +export * from "./ServiceSpecModeReplicatedJob"; +export * from "./ServiceSpecRollbackConfig"; +export * from "./ServiceSpecUpdateConfig"; +export * from "./ServiceUpdateRequest"; +export * from "./ServiceUpdateResponse"; +export * from "./ServiceUpdateStatus"; +export * from "./Swarm"; +export * from "./SwarmInfo"; +export * from "./SwarmInitRequest"; +export * from "./SwarmJoinRequest"; +export * from "./SwarmSpec"; +export * from "./SwarmSpecCAConfig"; +export * from "./SwarmSpecCAConfigExternalCAsInner"; +export * from "./SwarmSpecDispatcher"; +export * from "./SwarmSpecEncryptionConfig"; +export * from "./SwarmSpecOrchestration"; +export * from "./SwarmSpecRaft"; +export * from "./SwarmSpecTaskDefaults"; +export * from "./SwarmSpecTaskDefaultsLogDriver"; +export * from "./SwarmUnlockRequest"; +export * from "./SystemAuthResponse"; +export * from "./SystemDataUsageResponse"; +export * from "./SystemInfo"; +export * from "./SystemInfoDefaultAddressPoolsInner"; +export * from "./SystemVersion"; +export * from "./SystemVersionComponentsInner"; +export * from "./SystemVersionPlatform"; +export * from "./TLSInfo"; +export * from "./Task"; +export * from "./TaskSpec"; +export * from "./TaskSpecContainerSpec"; +export * from "./TaskSpecContainerSpecConfigsInner"; +export * from "./TaskSpecContainerSpecConfigsInnerFile"; +export * from "./TaskSpecContainerSpecDNSConfig"; +export * from "./TaskSpecContainerSpecPrivileges"; +export * from "./TaskSpecContainerSpecPrivilegesCredentialSpec"; +export * from "./TaskSpecContainerSpecPrivilegesSELinuxContext"; +export * from "./TaskSpecContainerSpecSecretsInner"; +export * from "./TaskSpecContainerSpecSecretsInnerFile"; +export * from "./TaskSpecLogDriver"; +export * from "./TaskSpecNetworkAttachmentSpec"; +export * from "./TaskSpecPlacement"; +export * from "./TaskSpecPlacementPreferencesInner"; +export * from "./TaskSpecPlacementPreferencesInnerSpread"; +export * from "./TaskSpecPluginSpec"; +export * from "./TaskSpecResources"; +export * from "./TaskSpecRestartPolicy"; +export * from "./TaskState"; +export * from "./TaskStatus"; +export * from "./TaskStatusContainerStatus"; +export * from "./ThrottleDevice"; +export * from "./UnlockKeyResponse"; +export * from "./Volume"; +export * from "./VolumeCreateOptions"; +export * from "./VolumeListResponse"; +export * from "./VolumePruneResponse"; +export * from "./VolumeUpdateRequest"; +export * from "./VolumeUsageData"; diff --git a/src/clients/docker/runtime.ts b/src/clients/docker/runtime.ts index 68c9fe88ae..f41ded5b30 100644 --- a/src/clients/docker/runtime.ts +++ b/src/clients/docker/runtime.ts @@ -2,86 +2,88 @@ /* eslint-disable */ /** * Docker Engine API - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client\'s commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don\'t break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.43) is used. For example, calling `/info` is the same as calling `/v1.43/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.44 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "http://localhost/v1.44".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts b/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts index f5cd2ed778..6449b4d1ca 100644 --- a/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts +++ b/src/clients/flinkArtifacts/apis/FlinkArtifactsArtifactV1Api.ts @@ -5,15 +5,14 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ArtifactV1FlinkArtifact, ArtifactV1FlinkArtifactList, @@ -21,429 +20,526 @@ import type { CreateArtifactV1FlinkArtifactRequest, Failure, GetArtifactV1FlinkArtifact200Response, -} from '../models/index'; +} from "../models/index"; import { - ArtifactV1FlinkArtifactFromJSON, - ArtifactV1FlinkArtifactToJSON, - ArtifactV1FlinkArtifactListFromJSON, - ArtifactV1FlinkArtifactListToJSON, - CreateArtifactV1FlinkArtifact201ResponseFromJSON, - CreateArtifactV1FlinkArtifact201ResponseToJSON, - CreateArtifactV1FlinkArtifactRequestFromJSON, - CreateArtifactV1FlinkArtifactRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetArtifactV1FlinkArtifact200ResponseFromJSON, - GetArtifactV1FlinkArtifact200ResponseToJSON, -} from '../models/index'; + ArtifactV1FlinkArtifactFromJSON, + ArtifactV1FlinkArtifactToJSON, + ArtifactV1FlinkArtifactListFromJSON, + ArtifactV1FlinkArtifactListToJSON, + CreateArtifactV1FlinkArtifact201ResponseFromJSON, + CreateArtifactV1FlinkArtifact201ResponseToJSON, + CreateArtifactV1FlinkArtifactRequestFromJSON, + CreateArtifactV1FlinkArtifactRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetArtifactV1FlinkArtifact200ResponseFromJSON, + GetArtifactV1FlinkArtifact200ResponseToJSON, +} from "../models/index"; export interface CreateArtifactV1FlinkArtifactOperationRequest { - cloud: string; - region: string; - CreateArtifactV1FlinkArtifactRequest?: CreateArtifactV1FlinkArtifactRequest; + cloud: string; + region: string; + CreateArtifactV1FlinkArtifactRequest?: CreateArtifactV1FlinkArtifactRequest; } export interface DeleteArtifactV1FlinkArtifactRequest { - cloud: string; - region: string; - environment: string; - id: string; + cloud: string; + region: string; + environment: string; + id: string; } export interface GetArtifactV1FlinkArtifactRequest { - cloud: string; - region: string; - environment: string; - id: string; + cloud: string; + region: string; + environment: string; + id: string; } export interface ListArtifactV1FlinkArtifactsRequest { - cloud: string; - region: string; - environment: string; - page_size?: number; - page_token?: string; + cloud: string; + region: string; + environment: string; + page_size?: number; + page_token?: string; } export interface UpdateArtifactV1FlinkArtifactRequest { - cloud: string; - region: string; - environment: string; - id: string; - ArtifactV1FlinkArtifact?: Omit; + cloud: string; + region: string; + environment: string; + id: string; + ArtifactV1FlinkArtifact?: Omit; } /** - * + * */ export class FlinkArtifactsArtifactV1Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. + * Create a new Flink Artifact. + */ + async createArtifactV1FlinkArtifactRaw( + requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cloud"] == null) { + throw new runtime.RequiredError( + "cloud", + 'Required parameter "cloud" was null or undefined when calling createArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["region"] == null) { + throw new runtime.RequiredError( + "region", + 'Required parameter "region" was null or undefined when calling createArtifactV1FlinkArtifact().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["cloud"] != null) { + queryParameters["cloud"] = requestParameters["cloud"]; + } + + if (requestParameters["region"] != null) { + queryParameters["region"] = requestParameters["region"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } + + const response = await this.request( + { + path: `/artifact/v1/flink-artifacts`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateArtifactV1FlinkArtifactRequestToJSON( + requestParameters["CreateArtifactV1FlinkArtifactRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateArtifactV1FlinkArtifact201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. + * Create a new Flink Artifact. + */ + async createArtifactV1FlinkArtifact( + requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. + * Delete a Flink Artifact + */ + async deleteArtifactV1FlinkArtifactRaw( + requestParameters: DeleteArtifactV1FlinkArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cloud"] == null) { + throw new runtime.RequiredError( + "cloud", + 'Required parameter "cloud" was null or undefined when calling deleteArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["region"] == null) { + throw new runtime.RequiredError( + "region", + 'Required parameter "region" was null or undefined when calling deleteArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling deleteArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling deleteArtifactV1FlinkArtifact().', + ); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. - * Create a new Flink Artifact. - */ - async createArtifactV1FlinkArtifactRaw(requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cloud'] == null) { - throw new runtime.RequiredError( - 'cloud', - 'Required parameter "cloud" was null or undefined when calling createArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['region'] == null) { - throw new runtime.RequiredError( - 'region', - 'Required parameter "region" was null or undefined when calling createArtifactV1FlinkArtifact().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cloud'] != null) { - queryParameters['cloud'] = requestParameters['cloud']; - } - - if (requestParameters['region'] != null) { - queryParameters['region'] = requestParameters['region']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/artifact/v1/flink-artifacts`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateArtifactV1FlinkArtifactRequestToJSON(requestParameters['CreateArtifactV1FlinkArtifactRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateArtifactV1FlinkArtifact201ResponseFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a flink artifact. - * Create a new Flink Artifact. - */ - async createArtifactV1FlinkArtifact(requestParameters: CreateArtifactV1FlinkArtifactOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. - * Delete a Flink Artifact - */ - async deleteArtifactV1FlinkArtifactRaw(requestParameters: DeleteArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cloud'] == null) { - throw new runtime.RequiredError( - 'cloud', - 'Required parameter "cloud" was null or undefined when calling deleteArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['region'] == null) { - throw new runtime.RequiredError( - 'region', - 'Required parameter "region" was null or undefined when calling deleteArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling deleteArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteArtifactV1FlinkArtifact().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cloud'] != null) { - queryParameters['cloud'] = requestParameters['cloud']; - } - - if (requestParameters['region'] != null) { - queryParameters['region'] = requestParameters['region']; - } - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/artifact/v1/flink-artifacts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. - * Delete a Flink Artifact - */ - async deleteArtifactV1FlinkArtifact(requestParameters: DeleteArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. - * Read a Flink Artifact - */ - async getArtifactV1FlinkArtifactRaw(requestParameters: GetArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cloud'] == null) { - throw new runtime.RequiredError( - 'cloud', - 'Required parameter "cloud" was null or undefined when calling getArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['region'] == null) { - throw new runtime.RequiredError( - 'region', - 'Required parameter "region" was null or undefined when calling getArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling getArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getArtifactV1FlinkArtifact().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cloud'] != null) { - queryParameters['cloud'] = requestParameters['cloud']; - } - - if (requestParameters['region'] != null) { - queryParameters['region'] = requestParameters['region']; - } - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/artifact/v1/flink-artifacts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. - * Read a Flink Artifact - */ - async getArtifactV1FlinkArtifact(requestParameters: GetArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. - * List of Flink Artifacts - */ - async listArtifactV1FlinkArtifactsRaw(requestParameters: ListArtifactV1FlinkArtifactsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cloud'] == null) { - throw new runtime.RequiredError( - 'cloud', - 'Required parameter "cloud" was null or undefined when calling listArtifactV1FlinkArtifacts().' - ); - } - - if (requestParameters['region'] == null) { - throw new runtime.RequiredError( - 'region', - 'Required parameter "region" was null or undefined when calling listArtifactV1FlinkArtifacts().' - ); - } - - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling listArtifactV1FlinkArtifacts().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cloud'] != null) { - queryParameters['cloud'] = requestParameters['cloud']; - } - - if (requestParameters['region'] != null) { - queryParameters['region'] = requestParameters['region']; - } - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/artifact/v1/flink-artifacts`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactV1FlinkArtifactListFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. - * List of Flink Artifacts - */ - async listArtifactV1FlinkArtifacts(requestParameters: ListArtifactV1FlinkArtifactsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listArtifactV1FlinkArtifactsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. - * Update a Flink Artifact - */ - async updateArtifactV1FlinkArtifactRaw(requestParameters: UpdateArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cloud'] == null) { - throw new runtime.RequiredError( - 'cloud', - 'Required parameter "cloud" was null or undefined when calling updateArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['region'] == null) { - throw new runtime.RequiredError( - 'region', - 'Required parameter "region" was null or undefined when calling updateArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling updateArtifactV1FlinkArtifact().' - ); - } - - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateArtifactV1FlinkArtifact().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cloud'] != null) { - queryParameters['cloud'] = requestParameters['cloud']; - } - - if (requestParameters['region'] != null) { - queryParameters['region'] = requestParameters['region']; - } - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/artifact/v1/flink-artifacts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ArtifactV1FlinkArtifactToJSON(requestParameters['ArtifactV1FlinkArtifact']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. - * Update a Flink Artifact - */ - async updateArtifactV1FlinkArtifact(requestParameters: UpdateArtifactV1FlinkArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["cloud"] != null) { + queryParameters["cloud"] = requestParameters["cloud"]; + } + + if (requestParameters["region"] != null) { + queryParameters["region"] = requestParameters["region"]; + } + + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } + + const response = await this.request( + { + path: `/artifact/v1/flink-artifacts/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a flink artifact. + * Delete a Flink Artifact + */ + async deleteArtifactV1FlinkArtifact( + requestParameters: DeleteArtifactV1FlinkArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. + * Read a Flink Artifact + */ + async getArtifactV1FlinkArtifactRaw( + requestParameters: GetArtifactV1FlinkArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cloud"] == null) { + throw new runtime.RequiredError( + "cloud", + 'Required parameter "cloud" was null or undefined when calling getArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["region"] == null) { + throw new runtime.RequiredError( + "region", + 'Required parameter "region" was null or undefined when calling getArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling getArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling getArtifactV1FlinkArtifact().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["cloud"] != null) { + queryParameters["cloud"] = requestParameters["cloud"]; + } + + if (requestParameters["region"] != null) { + queryParameters["region"] = requestParameters["region"]; + } + + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } + + const response = await this.request( + { + path: `/artifact/v1/flink-artifacts/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a flink artifact. + * Read a Flink Artifact + */ + async getArtifactV1FlinkArtifact( + requestParameters: GetArtifactV1FlinkArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. + * List of Flink Artifacts + */ + async listArtifactV1FlinkArtifactsRaw( + requestParameters: ListArtifactV1FlinkArtifactsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cloud"] == null) { + throw new runtime.RequiredError( + "cloud", + 'Required parameter "cloud" was null or undefined when calling listArtifactV1FlinkArtifacts().', + ); + } + + if (requestParameters["region"] == null) { + throw new runtime.RequiredError( + "region", + 'Required parameter "region" was null or undefined when calling listArtifactV1FlinkArtifacts().', + ); + } + + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling listArtifactV1FlinkArtifacts().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["cloud"] != null) { + queryParameters["cloud"] = requestParameters["cloud"]; + } + + if (requestParameters["region"] != null) { + queryParameters["region"] = requestParameters["region"]; + } + + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; + } + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } + + const response = await this.request( + { + path: `/artifact/v1/flink-artifacts`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ArtifactV1FlinkArtifactListFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all flink artifacts. + * List of Flink Artifacts + */ + async listArtifactV1FlinkArtifacts( + requestParameters: ListArtifactV1FlinkArtifactsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listArtifactV1FlinkArtifactsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. + * Update a Flink Artifact + */ + async updateArtifactV1FlinkArtifactRaw( + requestParameters: UpdateArtifactV1FlinkArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cloud"] == null) { + throw new runtime.RequiredError( + "cloud", + 'Required parameter "cloud" was null or undefined when calling updateArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["region"] == null) { + throw new runtime.RequiredError( + "region", + 'Required parameter "region" was null or undefined when calling updateArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling updateArtifactV1FlinkArtifact().', + ); + } + + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling updateArtifactV1FlinkArtifact().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["cloud"] != null) { + queryParameters["cloud"] = requestParameters["cloud"]; + } + + if (requestParameters["region"] != null) { + queryParameters["region"] = requestParameters["region"]; + } + + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); } + const response = await this.request( + { + path: `/artifact/v1/flink-artifacts/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "PATCH", + headers: headerParameters, + query: queryParameters, + body: ArtifactV1FlinkArtifactToJSON(requestParameters["ArtifactV1FlinkArtifact"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetArtifactV1FlinkArtifact200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a flink artifact. + * Update a Flink Artifact + */ + async updateArtifactV1FlinkArtifact( + requestParameters: UpdateArtifactV1FlinkArtifactRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateArtifactV1FlinkArtifactRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts b/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts index 73278bb4b2..dcc2eb3943 100644 --- a/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts +++ b/src/clients/flinkArtifacts/apis/PresignedUrlsArtifactV1Api.ts @@ -5,70 +5,87 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { Failure, PresignedUploadUrlArtifactV1PresignedUrl200Response, PresignedUploadUrlArtifactV1PresignedUrlRequest, -} from '../models/index'; +} from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON, - PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON, - PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON, - PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON, + PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON, + PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON, + PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON, +} from "../models/index"; export interface PresignedUploadUrlArtifactV1PresignedUrlOperationRequest { - PresignedUploadUrlArtifactV1PresignedUrlRequest?: PresignedUploadUrlArtifactV1PresignedUrlRequest; + PresignedUploadUrlArtifactV1PresignedUrlRequest?: PresignedUploadUrlArtifactV1PresignedUrlRequest; } /** - * + * */ export class PresignedUrlsArtifactV1Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. + * Request a presigned upload URL for a new Flink Artifact. + */ + async presignedUploadUrlArtifactV1PresignedUrlRaw( + requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. - * Request a presigned upload URL for a new Flink Artifact. - */ - async presignedUploadUrlArtifactV1PresignedUrlRaw(requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + headerParameters["Content-Type"] = "application/json"; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/artifact/v1/presigned-upload-url`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON(requestParameters['PresignedUploadUrlArtifactV1PresignedUrlRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/artifact/v1/presigned-upload-url`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON( + requestParameters["PresignedUploadUrlArtifactV1PresignedUrlRequest"], + ), + }, + initOverrides, + ); - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. - * Request a presigned upload URL for a new Flink Artifact. - */ - async presignedUploadUrlArtifactV1PresignedUrl(requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.presignedUploadUrlArtifactV1PresignedUrlRaw(requestParameters, initOverrides); - return await response.value(); - } + return new runtime.JSONApiResponse(response, (jsonValue) => + PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON(jsonValue), + ); + } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Request a presigned upload URL to upload a Flink Artifact archive. + * Request a presigned upload URL for a new Flink Artifact. + */ + async presignedUploadUrlArtifactV1PresignedUrl( + requestParameters: PresignedUploadUrlArtifactV1PresignedUrlOperationRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.presignedUploadUrlArtifactV1PresignedUrlRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/src/clients/flinkArtifacts/apis/index.ts b/src/clients/flinkArtifacts/apis/index.ts index 41ea99d442..6c476c429a 100644 --- a/src/clients/flinkArtifacts/apis/index.ts +++ b/src/clients/flinkArtifacts/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from './FlinkArtifactsArtifactV1Api'; -export * from './PresignedUrlsArtifactV1Api'; +export * from "./FlinkArtifactsArtifactV1Api"; +export * from "./PresignedUrlsArtifactV1Api"; diff --git a/src/clients/flinkArtifacts/index.ts b/src/clients/flinkArtifacts/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/flinkArtifacts/index.ts +++ b/src/clients/flinkArtifacts/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts index 8d4dcf4740..7f5f957d0f 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifact.ts @@ -5,198 +5,209 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; +import { mapValues } from "../runtime"; +import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from './ArtifactV1FlinkArtifactVersion'; -import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from "./ArtifactV1FlinkArtifactVersion"; +import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from "./ArtifactV1FlinkArtifactMetadata"; /** * FlinkArtifact objects represent Flink Artifacts on Confluent Cloud. - * - * + * + * * ## The Flink Artifacts Model * * @export * @interface ArtifactV1FlinkArtifact */ export interface ArtifactV1FlinkArtifact { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - readonly api_version?: ArtifactV1FlinkArtifactApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - readonly kind?: ArtifactV1FlinkArtifactKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - readonly id?: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof ArtifactV1FlinkArtifact - */ - metadata?: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - region?: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - environment?: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - display_name?: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof ArtifactV1FlinkArtifact - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifact - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof ArtifactV1FlinkArtifact - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + readonly api_version?: ArtifactV1FlinkArtifactApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + readonly kind?: ArtifactV1FlinkArtifactKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + readonly id?: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof ArtifactV1FlinkArtifact + */ + metadata?: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + region?: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + environment?: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + display_name?: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof ArtifactV1FlinkArtifact + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifact + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof ArtifactV1FlinkArtifact + */ + versions?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1FlinkArtifactApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1FlinkArtifactKindEnum { - FlinkArtifact = 'FlinkArtifact' + FlinkArtifact = "FlinkArtifact", } - /** * Check if a given object implements the ArtifactV1FlinkArtifact interface. */ export function instanceOfArtifactV1FlinkArtifact(value: object): value is ArtifactV1FlinkArtifact { - return true; + return true; } export function ArtifactV1FlinkArtifactFromJSON(json: any): ArtifactV1FlinkArtifact { - return ArtifactV1FlinkArtifactFromJSONTyped(json, false); + return ArtifactV1FlinkArtifactFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifact { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), - 'cloud': json['cloud'] == null ? undefined : json['cloud'], - 'region': json['region'] == null ? undefined : json['region'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - '_class': json['class'] == null ? undefined : json['class'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'description': json['description'] == null ? undefined : json['description'], - 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], - 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], - 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), - }; +export function ArtifactV1FlinkArtifactFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifact { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null + ? undefined + : ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), + cloud: json["cloud"] == null ? undefined : json["cloud"], + region: json["region"] == null ? undefined : json["region"], + environment: json["environment"] == null ? undefined : json["environment"], + display_name: json["display_name"] == null ? undefined : json["display_name"], + _class: json["class"] == null ? undefined : json["class"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + description: json["description"] == null ? undefined : json["description"], + documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], + runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], + versions: + json["versions"] == null + ? undefined + : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), + }; } export function ArtifactV1FlinkArtifactToJSON(json: any): ArtifactV1FlinkArtifact { - return ArtifactV1FlinkArtifactToJSONTyped(json, false); + return ArtifactV1FlinkArtifactToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - 'display_name': value['display_name'], - 'class': value['_class'], - 'content_format': value['content_format'], - 'description': value['description'], - 'documentation_link': value['documentation_link'], - 'runtime_language': value['runtime_language'], - 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), - }; + return { + metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + display_name: value["display_name"], + class: value["_class"], + content_format: value["content_format"], + description: value["description"], + documentation_link: value["documentation_link"], + runtime_language: value["runtime_language"], + versions: + value["versions"] == null + ? undefined + : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts index 719327dfe0..6f40a5afbd 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactList.ts @@ -5,122 +5,132 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1FlinkArtifactListMetadata } from './ArtifactV1FlinkArtifactListMetadata'; +import { mapValues } from "../runtime"; +import type { ArtifactV1FlinkArtifactListMetadata } from "./ArtifactV1FlinkArtifactListMetadata"; import { - ArtifactV1FlinkArtifactListMetadataFromJSON, - ArtifactV1FlinkArtifactListMetadataFromJSONTyped, - ArtifactV1FlinkArtifactListMetadataToJSON, - ArtifactV1FlinkArtifactListMetadataToJSONTyped, -} from './ArtifactV1FlinkArtifactListMetadata'; -import type { ArtifactV1FlinkArtifactListDataInner } from './ArtifactV1FlinkArtifactListDataInner'; + ArtifactV1FlinkArtifactListMetadataFromJSON, + ArtifactV1FlinkArtifactListMetadataFromJSONTyped, + ArtifactV1FlinkArtifactListMetadataToJSON, + ArtifactV1FlinkArtifactListMetadataToJSONTyped, +} from "./ArtifactV1FlinkArtifactListMetadata"; +import type { ArtifactV1FlinkArtifactListDataInner } from "./ArtifactV1FlinkArtifactListDataInner"; import { - ArtifactV1FlinkArtifactListDataInnerFromJSON, - ArtifactV1FlinkArtifactListDataInnerFromJSONTyped, - ArtifactV1FlinkArtifactListDataInnerToJSON, - ArtifactV1FlinkArtifactListDataInnerToJSONTyped, -} from './ArtifactV1FlinkArtifactListDataInner'; + ArtifactV1FlinkArtifactListDataInnerFromJSON, + ArtifactV1FlinkArtifactListDataInnerFromJSONTyped, + ArtifactV1FlinkArtifactListDataInnerToJSON, + ArtifactV1FlinkArtifactListDataInnerToJSONTyped, +} from "./ArtifactV1FlinkArtifactListDataInner"; /** * FlinkArtifact objects represent Flink Artifacts on Confluent Cloud. - * - * + * + * * ## The Flink Artifacts Model * * @export * @interface ArtifactV1FlinkArtifactList */ export interface ArtifactV1FlinkArtifactList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1FlinkArtifactList - */ - readonly api_version: ArtifactV1FlinkArtifactListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1FlinkArtifactList - */ - readonly kind: ArtifactV1FlinkArtifactListKindEnum; - /** - * - * @type {ArtifactV1FlinkArtifactListMetadata} - * @memberof ArtifactV1FlinkArtifactList - */ - metadata: ArtifactV1FlinkArtifactListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof ArtifactV1FlinkArtifactList - */ - data: Set | null; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1FlinkArtifactList + */ + readonly api_version: ArtifactV1FlinkArtifactListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1FlinkArtifactList + */ + readonly kind: ArtifactV1FlinkArtifactListKindEnum; + /** + * + * @type {ArtifactV1FlinkArtifactListMetadata} + * @memberof ArtifactV1FlinkArtifactList + */ + metadata: ArtifactV1FlinkArtifactListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof ArtifactV1FlinkArtifactList + */ + data: Set | null; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1FlinkArtifactListApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1FlinkArtifactListKindEnum { - FlinkArtifactList = 'FlinkArtifactList' + FlinkArtifactList = "FlinkArtifactList", } - /** * Check if a given object implements the ArtifactV1FlinkArtifactList interface. */ -export function instanceOfArtifactV1FlinkArtifactList(value: object): value is ArtifactV1FlinkArtifactList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactList( + value: object, +): value is ArtifactV1FlinkArtifactList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ArtifactV1FlinkArtifactListFromJSON(json: any): ArtifactV1FlinkArtifactList { - return ArtifactV1FlinkArtifactListFromJSONTyped(json, false); + return ArtifactV1FlinkArtifactListFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ArtifactV1FlinkArtifactListMetadataFromJSON(json['metadata']), - 'data': (json['data'] == null ? null : new Set((json['data'] as Array).map(ArtifactV1FlinkArtifactListDataInnerFromJSON))), - }; +export function ArtifactV1FlinkArtifactListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifactList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ArtifactV1FlinkArtifactListMetadataFromJSON(json["metadata"]), + data: + json["data"] == null + ? null + : new Set((json["data"] as Array).map(ArtifactV1FlinkArtifactListDataInnerFromJSON)), + }; } export function ArtifactV1FlinkArtifactListToJSON(json: any): ArtifactV1FlinkArtifactList { - return ArtifactV1FlinkArtifactListToJSONTyped(json, false); + return ArtifactV1FlinkArtifactListToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1FlinkArtifactListMetadataToJSON(value['metadata']), - 'data': (value['data'] == null ? null : Array.from(value['data'] as Set).map(ArtifactV1FlinkArtifactListDataInnerToJSON)), - }; + return { + metadata: ArtifactV1FlinkArtifactListMetadataToJSON(value["metadata"]), + data: + value["data"] == null + ? null + : Array.from(value["data"] as Set).map(ArtifactV1FlinkArtifactListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts index dbd0438acf..d732ceb258 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListDataInner.ts @@ -5,200 +5,214 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; +import { mapValues } from "../runtime"; +import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from './ArtifactV1FlinkArtifactVersion'; -import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from "./ArtifactV1FlinkArtifactVersion"; +import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from "./ArtifactV1FlinkArtifactMetadata"; /** - * + * * @export * @interface ArtifactV1FlinkArtifactListDataInner */ export interface ArtifactV1FlinkArtifactListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - readonly api_version?: ArtifactV1FlinkArtifactListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - readonly kind?: ArtifactV1FlinkArtifactListDataInnerKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - readonly id: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - metadata: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof ArtifactV1FlinkArtifactListDataInner - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + readonly api_version?: ArtifactV1FlinkArtifactListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + readonly kind?: ArtifactV1FlinkArtifactListDataInnerKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + readonly id: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + metadata: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof ArtifactV1FlinkArtifactListDataInner + */ + versions?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1FlinkArtifactListDataInnerApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1FlinkArtifactListDataInnerKindEnum { - FlinkArtifact = 'FlinkArtifact' + FlinkArtifact = "FlinkArtifact", } - /** * Check if a given object implements the ArtifactV1FlinkArtifactListDataInner interface. */ -export function instanceOfArtifactV1FlinkArtifactListDataInner(value: object): value is ArtifactV1FlinkArtifactListDataInner { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cloud' in value) || value['cloud'] === undefined) return false; - if (!('region' in value) || value['region'] === undefined) return false; - if (!('environment' in value) || value['environment'] === undefined) return false; - if (!('display_name' in value) || value['display_name'] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactListDataInner( + value: object, +): value is ArtifactV1FlinkArtifactListDataInner { + if (!("id" in value) || value["id"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cloud" in value) || value["cloud"] === undefined) return false; + if (!("region" in value) || value["region"] === undefined) return false; + if (!("environment" in value) || value["environment"] === undefined) return false; + if (!("display_name" in value) || value["display_name"] === undefined) return false; + return true; } -export function ArtifactV1FlinkArtifactListDataInnerFromJSON(json: any): ArtifactV1FlinkArtifactListDataInner { - return ArtifactV1FlinkArtifactListDataInnerFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListDataInnerFromJSON( + json: any, +): ArtifactV1FlinkArtifactListDataInner { + return ArtifactV1FlinkArtifactListDataInnerFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'], - 'metadata': ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), - 'cloud': json['cloud'], - 'region': json['region'], - 'environment': json['environment'], - 'display_name': json['display_name'], - '_class': json['class'] == null ? undefined : json['class'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'description': json['description'] == null ? undefined : json['description'], - 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], - 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], - 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), - }; +export function ArtifactV1FlinkArtifactListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifactListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"], + metadata: ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), + cloud: json["cloud"], + region: json["region"], + environment: json["environment"], + display_name: json["display_name"], + _class: json["class"] == null ? undefined : json["class"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + description: json["description"] == null ? undefined : json["description"], + documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], + runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], + versions: + json["versions"] == null + ? undefined + : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), + }; } -export function ArtifactV1FlinkArtifactListDataInnerToJSON(json: any): ArtifactV1FlinkArtifactListDataInner { - return ArtifactV1FlinkArtifactListDataInnerToJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListDataInnerToJSON( + json: any, +): ArtifactV1FlinkArtifactListDataInner { + return ArtifactV1FlinkArtifactListDataInnerToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - 'display_name': value['display_name'], - 'class': value['_class'], - 'content_format': value['content_format'], - 'description': value['description'], - 'documentation_link': value['documentation_link'], - 'runtime_language': value['runtime_language'], - 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), - }; + return { + metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + display_name: value["display_name"], + class: value["_class"], + content_format: value["content_format"], + description: value["description"], + documentation_link: value["documentation_link"], + runtime_language: value["runtime_language"], + versions: + value["versions"] == null + ? undefined + : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts index 5ddb6c8a63..fc8af69a52 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactListMetadata.ts @@ -5,93 +5,102 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ArtifactV1FlinkArtifactListMetadata */ export interface ArtifactV1FlinkArtifactListMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ArtifactV1FlinkArtifactListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ArtifactV1FlinkArtifactListMetadata + */ + total_size?: number; } /** * Check if a given object implements the ArtifactV1FlinkArtifactListMetadata interface. */ -export function instanceOfArtifactV1FlinkArtifactListMetadata(value: object): value is ArtifactV1FlinkArtifactListMetadata { - return true; +export function instanceOfArtifactV1FlinkArtifactListMetadata( + value: object, +): value is ArtifactV1FlinkArtifactListMetadata { + return true; } -export function ArtifactV1FlinkArtifactListMetadataFromJSON(json: any): ArtifactV1FlinkArtifactListMetadata { - return ArtifactV1FlinkArtifactListMetadataFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListMetadataFromJSON( + json: any, +): ArtifactV1FlinkArtifactListMetadata { + return ArtifactV1FlinkArtifactListMetadataFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactListMetadata { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; +export function ArtifactV1FlinkArtifactListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifactListMetadata { + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } -export function ArtifactV1FlinkArtifactListMetadataToJSON(json: any): ArtifactV1FlinkArtifactListMetadata { - return ArtifactV1FlinkArtifactListMetadataToJSONTyped(json, false); +export function ArtifactV1FlinkArtifactListMetadataToJSON( + json: any, +): ArtifactV1FlinkArtifactListMetadata { + return ArtifactV1FlinkArtifactListMetadataToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactListMetadataToJSONTyped(value?: ArtifactV1FlinkArtifactListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactListMetadataToJSONTyped( + value?: ArtifactV1FlinkArtifactListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts index b8b6f8552a..19e142f6c4 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactMetadata.ts @@ -5,91 +5,98 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ArtifactV1FlinkArtifactMetadata */ export interface ArtifactV1FlinkArtifactMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1FlinkArtifactMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1FlinkArtifactMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ArtifactV1FlinkArtifactMetadata interface. */ -export function instanceOfArtifactV1FlinkArtifactMetadata(value: object): value is ArtifactV1FlinkArtifactMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactMetadata( + value: object, +): value is ArtifactV1FlinkArtifactMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } -export function ArtifactV1FlinkArtifactMetadataFromJSON(json: any): ArtifactV1FlinkArtifactMetadata { - return ArtifactV1FlinkArtifactMetadataFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactMetadataFromJSON( + json: any, +): ArtifactV1FlinkArtifactMetadata { + return ArtifactV1FlinkArtifactMetadataFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function ArtifactV1FlinkArtifactMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifactMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function ArtifactV1FlinkArtifactMetadataToJSON(json: any): ArtifactV1FlinkArtifactMetadata { - return ArtifactV1FlinkArtifactMetadataToJSONTyped(json, false); + return ArtifactV1FlinkArtifactMetadataToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactMetadataToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts index ade6394d3e..d17950a826 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersion.ts @@ -5,112 +5,117 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1FlinkArtifactVersionUploadSource } from './ArtifactV1FlinkArtifactVersionUploadSource'; +import { mapValues } from "../runtime"; +import type { ArtifactV1FlinkArtifactVersionUploadSource } from "./ArtifactV1FlinkArtifactVersionUploadSource"; import { - ArtifactV1FlinkArtifactVersionUploadSourceFromJSON, - ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped, - ArtifactV1FlinkArtifactVersionUploadSourceToJSON, - ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped, -} from './ArtifactV1FlinkArtifactVersionUploadSource'; -import type { ArtifactV1FlinkArtifact } from './ArtifactV1FlinkArtifact'; + ArtifactV1FlinkArtifactVersionUploadSourceFromJSON, + ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped, + ArtifactV1FlinkArtifactVersionUploadSourceToJSON, + ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped, +} from "./ArtifactV1FlinkArtifactVersionUploadSource"; +import type { ArtifactV1FlinkArtifact } from "./ArtifactV1FlinkArtifact"; import { - ArtifactV1FlinkArtifactFromJSON, - ArtifactV1FlinkArtifactFromJSONTyped, - ArtifactV1FlinkArtifactToJSON, - ArtifactV1FlinkArtifactToJSONTyped, -} from './ArtifactV1FlinkArtifact'; + ArtifactV1FlinkArtifactFromJSON, + ArtifactV1FlinkArtifactFromJSONTyped, + ArtifactV1FlinkArtifactToJSON, + ArtifactV1FlinkArtifactToJSONTyped, +} from "./ArtifactV1FlinkArtifact"; /** * Version of the Flink Artifact - * + * * @export * @interface ArtifactV1FlinkArtifactVersion */ export interface ArtifactV1FlinkArtifactVersion { - /** - * Version id of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1FlinkArtifactVersion - */ - version: string; - /** - * Release Notes of the Flink Artifact version. - * @type {string} - * @memberof ArtifactV1FlinkArtifactVersion - */ - release_notes?: string; - /** - * Flag to specify stability of the version - * @type {boolean} - * @memberof ArtifactV1FlinkArtifactVersion - */ - is_beta?: boolean; - /** - * The Flink Artifact this version belongs to. - * @type {ArtifactV1FlinkArtifact} - * @memberof ArtifactV1FlinkArtifactVersion - */ - artifact_id: ArtifactV1FlinkArtifact; - /** - * - * @type {ArtifactV1FlinkArtifactVersionUploadSource} - * @memberof ArtifactV1FlinkArtifactVersion - */ - upload_source: ArtifactV1FlinkArtifactVersionUploadSource; + /** + * Version id of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1FlinkArtifactVersion + */ + version: string; + /** + * Release Notes of the Flink Artifact version. + * @type {string} + * @memberof ArtifactV1FlinkArtifactVersion + */ + release_notes?: string; + /** + * Flag to specify stability of the version + * @type {boolean} + * @memberof ArtifactV1FlinkArtifactVersion + */ + is_beta?: boolean; + /** + * The Flink Artifact this version belongs to. + * @type {ArtifactV1FlinkArtifact} + * @memberof ArtifactV1FlinkArtifactVersion + */ + artifact_id: ArtifactV1FlinkArtifact; + /** + * + * @type {ArtifactV1FlinkArtifactVersionUploadSource} + * @memberof ArtifactV1FlinkArtifactVersion + */ + upload_source: ArtifactV1FlinkArtifactVersionUploadSource; } /** * Check if a given object implements the ArtifactV1FlinkArtifactVersion interface. */ -export function instanceOfArtifactV1FlinkArtifactVersion(value: object): value is ArtifactV1FlinkArtifactVersion { - if (!('version' in value) || value['version'] === undefined) return false; - if (!('artifact_id' in value) || value['artifact_id'] === undefined) return false; - if (!('upload_source' in value) || value['upload_source'] === undefined) return false; - return true; +export function instanceOfArtifactV1FlinkArtifactVersion( + value: object, +): value is ArtifactV1FlinkArtifactVersion { + if (!("version" in value) || value["version"] === undefined) return false; + if (!("artifact_id" in value) || value["artifact_id"] === undefined) return false; + if (!("upload_source" in value) || value["upload_source"] === undefined) return false; + return true; } export function ArtifactV1FlinkArtifactVersionFromJSON(json: any): ArtifactV1FlinkArtifactVersion { - return ArtifactV1FlinkArtifactVersionFromJSONTyped(json, false); + return ArtifactV1FlinkArtifactVersionFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactVersion { - if (json == null) { - return json; - } - return { - - 'version': json['version'], - 'release_notes': json['release_notes'] == null ? undefined : json['release_notes'], - 'is_beta': json['is_beta'] == null ? undefined : json['is_beta'], - 'artifact_id': ArtifactV1FlinkArtifactFromJSON(json['artifact_id']), - 'upload_source': ArtifactV1FlinkArtifactVersionUploadSourceFromJSON(json['upload_source']), - }; +export function ArtifactV1FlinkArtifactVersionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifactVersion { + if (json == null) { + return json; + } + return { + version: json["version"], + release_notes: json["release_notes"] == null ? undefined : json["release_notes"], + is_beta: json["is_beta"] == null ? undefined : json["is_beta"], + artifact_id: ArtifactV1FlinkArtifactFromJSON(json["artifact_id"]), + upload_source: ArtifactV1FlinkArtifactVersionUploadSourceFromJSON(json["upload_source"]), + }; } export function ArtifactV1FlinkArtifactVersionToJSON(json: any): ArtifactV1FlinkArtifactVersion { - return ArtifactV1FlinkArtifactVersionToJSONTyped(json, false); + return ArtifactV1FlinkArtifactVersionToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionToJSONTyped(value?: ArtifactV1FlinkArtifactVersion | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1FlinkArtifactVersionToJSONTyped( + value?: ArtifactV1FlinkArtifactVersion | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'version': value['version'], - 'release_notes': value['release_notes'], - 'is_beta': value['is_beta'], - 'artifact_id': ArtifactV1FlinkArtifactToJSON(value['artifact_id']), - 'upload_source': ArtifactV1FlinkArtifactVersionUploadSourceToJSON(value['upload_source']), - }; + return { + version: value["version"], + release_notes: value["release_notes"], + is_beta: value["is_beta"], + artifact_id: ArtifactV1FlinkArtifactToJSON(value["artifact_id"]), + upload_source: ArtifactV1FlinkArtifactVersionUploadSourceToJSON(value["upload_source"]), + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts index e3790aaa63..8609a3593c 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1FlinkArtifactVersionUploadSource.ts @@ -5,58 +5,74 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { ArtifactV1UploadSourcePresignedUrl } from './ArtifactV1UploadSourcePresignedUrl'; +import type { ArtifactV1UploadSourcePresignedUrl } from "./ArtifactV1UploadSourcePresignedUrl"; import { - instanceOfArtifactV1UploadSourcePresignedUrl, - ArtifactV1UploadSourcePresignedUrlFromJSON, - ArtifactV1UploadSourcePresignedUrlFromJSONTyped, - ArtifactV1UploadSourcePresignedUrlToJSON, -} from './ArtifactV1UploadSourcePresignedUrl'; + instanceOfArtifactV1UploadSourcePresignedUrl, + ArtifactV1UploadSourcePresignedUrlFromJSON, + ArtifactV1UploadSourcePresignedUrlFromJSONTyped, + ArtifactV1UploadSourcePresignedUrlToJSON, +} from "./ArtifactV1UploadSourcePresignedUrl"; /** * @type ArtifactV1FlinkArtifactVersionUploadSource * Upload source of the Flink Artifact Version. * @export */ -export type ArtifactV1FlinkArtifactVersionUploadSource = { location: 'PRESIGNED_URL_LOCATION' } & ArtifactV1UploadSourcePresignedUrl; +export type ArtifactV1FlinkArtifactVersionUploadSource = { + location: "PRESIGNED_URL_LOCATION"; +} & ArtifactV1UploadSourcePresignedUrl; -export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSON(json: any): ArtifactV1FlinkArtifactVersionUploadSource { - return ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped(json, false); +export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSON( + json: any, +): ArtifactV1FlinkArtifactVersionUploadSource { + return ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1FlinkArtifactVersionUploadSource { - if (json == null) { - return json; - } - switch (json['location']) { - case 'PRESIGNED_URL_LOCATION': - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { location: 'PRESIGNED_URL_LOCATION' } as const); - default: - throw new Error(`No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${json['location']}'`); - } +export function ArtifactV1FlinkArtifactVersionUploadSourceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1FlinkArtifactVersionUploadSource { + if (json == null) { + return json; + } + switch (json["location"]) { + case "PRESIGNED_URL_LOCATION": + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { + location: "PRESIGNED_URL_LOCATION", + } as const); + default: + throw new Error( + `No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${json["location"]}'`, + ); + } } export function ArtifactV1FlinkArtifactVersionUploadSourceToJSON(json: any): any { - return ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped(json, false); + return ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped(json, false); } -export function ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped(value?: ArtifactV1FlinkArtifactVersionUploadSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - switch (value['location']) { - case 'PRESIGNED_URL_LOCATION': - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { location: 'PRESIGNED_URL_LOCATION' } as const); - default: - throw new Error(`No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${value['location']}'`); - } - +export function ArtifactV1FlinkArtifactVersionUploadSourceToJSONTyped( + value?: ArtifactV1FlinkArtifactVersionUploadSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + switch (value["location"]) { + case "PRESIGNED_URL_LOCATION": + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { + location: "PRESIGNED_URL_LOCATION", + } as const); + default: + throw new Error( + `No variant of ArtifactV1FlinkArtifactVersionUploadSource exists with 'location=${value["location"]}'`, + ); + } } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts index f759143168..a6b2dd9ea1 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrl.ts @@ -5,138 +5,150 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Request a presigned upload URL for new Flink Artifact. Note that * the URL policy expires in one hour. If the policy expires, you can request * a new presigned upload URL. - * - * + * + * * ## The Presigned Urls Model * * @export * @interface ArtifactV1PresignedUrl */ export interface ArtifactV1PresignedUrl { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly api_version?: ArtifactV1PresignedUrlApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly kind?: ArtifactV1PresignedUrlKindEnum; - /** - * Content format of the Flink Artifact archive. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly content_format?: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly region?: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly environment?: string; - /** - * Unique identifier of this upload. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly upload_id?: string; - /** - * Upload URL for the Flink Artifact archive. - * @type {string} - * @memberof ArtifactV1PresignedUrl - */ - readonly upload_url?: string; - /** - * Upload form data of the Flink Artifact. All values should be strings. - * @type {object} - * @memberof ArtifactV1PresignedUrl - */ - readonly upload_form_data?: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly api_version?: ArtifactV1PresignedUrlApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly kind?: ArtifactV1PresignedUrlKindEnum; + /** + * Content format of the Flink Artifact archive. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly content_format?: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly region?: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly environment?: string; + /** + * Unique identifier of this upload. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly upload_id?: string; + /** + * Upload URL for the Flink Artifact archive. + * @type {string} + * @memberof ArtifactV1PresignedUrl + */ + readonly upload_url?: string; + /** + * Upload form data of the Flink Artifact. All values should be strings. + * @type {object} + * @memberof ArtifactV1PresignedUrl + */ + readonly upload_form_data?: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1PresignedUrlApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1PresignedUrlKindEnum { - PresignedUrl = 'PresignedUrl' + PresignedUrl = "PresignedUrl", } - /** * Check if a given object implements the ArtifactV1PresignedUrl interface. */ export function instanceOfArtifactV1PresignedUrl(value: object): value is ArtifactV1PresignedUrl { - return true; + return true; } export function ArtifactV1PresignedUrlFromJSON(json: any): ArtifactV1PresignedUrl { - return ArtifactV1PresignedUrlFromJSONTyped(json, false); + return ArtifactV1PresignedUrlFromJSONTyped(json, false); } -export function ArtifactV1PresignedUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1PresignedUrl { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'cloud': json['cloud'] == null ? undefined : json['cloud'], - 'region': json['region'] == null ? undefined : json['region'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'upload_id': json['upload_id'] == null ? undefined : json['upload_id'], - 'upload_url': json['upload_url'] == null ? undefined : json['upload_url'], - 'upload_form_data': json['upload_form_data'] == null ? undefined : json['upload_form_data'], - }; +export function ArtifactV1PresignedUrlFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1PresignedUrl { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + cloud: json["cloud"] == null ? undefined : json["cloud"], + region: json["region"] == null ? undefined : json["region"], + environment: json["environment"] == null ? undefined : json["environment"], + upload_id: json["upload_id"] == null ? undefined : json["upload_id"], + upload_url: json["upload_url"] == null ? undefined : json["upload_url"], + upload_form_data: json["upload_form_data"] == null ? undefined : json["upload_form_data"], + }; } export function ArtifactV1PresignedUrlToJSON(json: any): ArtifactV1PresignedUrl { - return ArtifactV1PresignedUrlToJSONTyped(json, false); + return ArtifactV1PresignedUrlToJSONTyped(json, false); } -export function ArtifactV1PresignedUrlToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1PresignedUrlToJSONTyped( + value?: Omit< + ArtifactV1PresignedUrl, + | "api_version" + | "kind" + | "content_format" + | "cloud" + | "region" + | "environment" + | "upload_id" + | "upload_url" + | "upload_form_data" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts index 9e6990aba5..c76cd5e156 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequest.ts @@ -5,139 +5,146 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1PresignedUrlRequestMetadata } from './ArtifactV1PresignedUrlRequestMetadata'; +import { mapValues } from "../runtime"; +import type { ArtifactV1PresignedUrlRequestMetadata } from "./ArtifactV1PresignedUrlRequestMetadata"; import { - ArtifactV1PresignedUrlRequestMetadataFromJSON, - ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, - ArtifactV1PresignedUrlRequestMetadataToJSON, - ArtifactV1PresignedUrlRequestMetadataToJSONTyped, -} from './ArtifactV1PresignedUrlRequestMetadata'; + ArtifactV1PresignedUrlRequestMetadataFromJSON, + ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, + ArtifactV1PresignedUrlRequestMetadataToJSON, + ArtifactV1PresignedUrlRequestMetadataToJSONTyped, +} from "./ArtifactV1PresignedUrlRequestMetadata"; /** * Request schema of the presigned upload URL. - * + * * @export * @interface ArtifactV1PresignedUrlRequest */ export interface ArtifactV1PresignedUrlRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - readonly api_version?: ArtifactV1PresignedUrlRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - readonly kind?: ArtifactV1PresignedUrlRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - readonly id?: string; - /** - * - * @type {ArtifactV1PresignedUrlRequestMetadata} - * @memberof ArtifactV1PresignedUrlRequest - */ - metadata?: ArtifactV1PresignedUrlRequestMetadata; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - content_format?: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - region?: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof ArtifactV1PresignedUrlRequest - */ - environment?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + readonly api_version?: ArtifactV1PresignedUrlRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + readonly kind?: ArtifactV1PresignedUrlRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + readonly id?: string; + /** + * + * @type {ArtifactV1PresignedUrlRequestMetadata} + * @memberof ArtifactV1PresignedUrlRequest + */ + metadata?: ArtifactV1PresignedUrlRequestMetadata; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + content_format?: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + region?: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof ArtifactV1PresignedUrlRequest + */ + environment?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1PresignedUrlRequestApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1PresignedUrlRequestKindEnum { - PresignedUrlRequest = 'PresignedUrlRequest' + PresignedUrlRequest = "PresignedUrlRequest", } - /** * Check if a given object implements the ArtifactV1PresignedUrlRequest interface. */ -export function instanceOfArtifactV1PresignedUrlRequest(value: object): value is ArtifactV1PresignedUrlRequest { - return true; +export function instanceOfArtifactV1PresignedUrlRequest( + value: object, +): value is ArtifactV1PresignedUrlRequest { + return true; } export function ArtifactV1PresignedUrlRequestFromJSON(json: any): ArtifactV1PresignedUrlRequest { - return ArtifactV1PresignedUrlRequestFromJSONTyped(json, false); + return ArtifactV1PresignedUrlRequestFromJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1PresignedUrlRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : ArtifactV1PresignedUrlRequestMetadataFromJSON(json['metadata']), - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'cloud': json['cloud'] == null ? undefined : json['cloud'], - 'region': json['region'] == null ? undefined : json['region'], - 'environment': json['environment'] == null ? undefined : json['environment'], - }; +export function ArtifactV1PresignedUrlRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1PresignedUrlRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null + ? undefined + : ArtifactV1PresignedUrlRequestMetadataFromJSON(json["metadata"]), + content_format: json["content_format"] == null ? undefined : json["content_format"], + cloud: json["cloud"] == null ? undefined : json["cloud"], + region: json["region"] == null ? undefined : json["region"], + environment: json["environment"] == null ? undefined : json["environment"], + }; } export function ArtifactV1PresignedUrlRequestToJSON(json: any): ArtifactV1PresignedUrlRequest { - return ArtifactV1PresignedUrlRequestToJSONTyped(json, false); + return ArtifactV1PresignedUrlRequestToJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1PresignedUrlRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1PresignedUrlRequestMetadataToJSON(value['metadata']), - 'content_format': value['content_format'], - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - }; + return { + metadata: ArtifactV1PresignedUrlRequestMetadataToJSON(value["metadata"]), + content_format: value["content_format"], + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts index c9d9511240..864beec4e0 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1PresignedUrlRequestMetadata.ts @@ -5,91 +5,103 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ArtifactV1PresignedUrlRequestMetadata */ export interface ArtifactV1PresignedUrlRequestMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1PresignedUrlRequestMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1PresignedUrlRequestMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ArtifactV1PresignedUrlRequestMetadata interface. */ -export function instanceOfArtifactV1PresignedUrlRequestMetadata(value: object): value is ArtifactV1PresignedUrlRequestMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfArtifactV1PresignedUrlRequestMetadata( + value: object, +): value is ArtifactV1PresignedUrlRequestMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } -export function ArtifactV1PresignedUrlRequestMetadataFromJSON(json: any): ArtifactV1PresignedUrlRequestMetadata { - return ArtifactV1PresignedUrlRequestMetadataFromJSONTyped(json, false); +export function ArtifactV1PresignedUrlRequestMetadataFromJSON( + json: any, +): ArtifactV1PresignedUrlRequestMetadata { + return ArtifactV1PresignedUrlRequestMetadataFromJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1PresignedUrlRequestMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function ArtifactV1PresignedUrlRequestMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1PresignedUrlRequestMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } -export function ArtifactV1PresignedUrlRequestMetadataToJSON(json: any): ArtifactV1PresignedUrlRequestMetadata { - return ArtifactV1PresignedUrlRequestMetadataToJSONTyped(json, false); +export function ArtifactV1PresignedUrlRequestMetadataToJSON( + json: any, +): ArtifactV1PresignedUrlRequestMetadata { + return ArtifactV1PresignedUrlRequestMetadataToJSONTyped(json, false); } -export function ArtifactV1PresignedUrlRequestMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1PresignedUrlRequestMetadataToJSONTyped( + value?: Omit< + ArtifactV1PresignedUrlRequestMetadata, + "created_at" | "updated_at" | "deleted_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts index bbff0f7a26..908d74839f 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrl.ts @@ -5,129 +5,140 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1UploadSourcePresignedUrlMetadata } from './ArtifactV1UploadSourcePresignedUrlMetadata'; +import { mapValues } from "../runtime"; +import type { ArtifactV1UploadSourcePresignedUrlMetadata } from "./ArtifactV1UploadSourcePresignedUrlMetadata"; import { - ArtifactV1UploadSourcePresignedUrlMetadataFromJSON, - ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped, - ArtifactV1UploadSourcePresignedUrlMetadataToJSON, - ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped, -} from './ArtifactV1UploadSourcePresignedUrlMetadata'; + ArtifactV1UploadSourcePresignedUrlMetadataFromJSON, + ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped, + ArtifactV1UploadSourcePresignedUrlMetadataToJSON, + ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped, +} from "./ArtifactV1UploadSourcePresignedUrlMetadata"; /** * Request a presigned upload URL for new Flink Artifact. Note that * the URL policy expires in one hour. If the policy expires, you can request * a new presigned upload URL. - * - * + * + * * ## The Presigned Urls Model * * @export * @interface ArtifactV1UploadSourcePresignedUrl */ export interface ArtifactV1UploadSourcePresignedUrl { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - readonly api_version?: ArtifactV1UploadSourcePresignedUrlApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - readonly kind?: ArtifactV1UploadSourcePresignedUrlKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - readonly id?: string; - /** - * - * @type {ArtifactV1UploadSourcePresignedUrlMetadata} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - metadata?: ArtifactV1UploadSourcePresignedUrlMetadata; - /** - * Location of the Flink Artifact source. - * - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - location?: string; - /** - * Upload ID returned by the `/presigned-upload-url` API. This field returns an empty string in all responses. - * @type {string} - * @memberof ArtifactV1UploadSourcePresignedUrl - */ - upload_id?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + readonly api_version?: ArtifactV1UploadSourcePresignedUrlApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + readonly kind?: ArtifactV1UploadSourcePresignedUrlKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + readonly id?: string; + /** + * + * @type {ArtifactV1UploadSourcePresignedUrlMetadata} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + metadata?: ArtifactV1UploadSourcePresignedUrlMetadata; + /** + * Location of the Flink Artifact source. + * + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + location?: string; + /** + * Upload ID returned by the `/presigned-upload-url` API. This field returns an empty string in all responses. + * @type {string} + * @memberof ArtifactV1UploadSourcePresignedUrl + */ + upload_id?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1UploadSourcePresignedUrlApiVersionEnum { - ArtifactV1UploadSource = 'artifact.v1/UploadSource' + ArtifactV1UploadSource = "artifact.v1/UploadSource", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ArtifactV1UploadSourcePresignedUrlKindEnum { - PresignedUrl = 'PresignedUrl' + PresignedUrl = "PresignedUrl", } - /** * Check if a given object implements the ArtifactV1UploadSourcePresignedUrl interface. */ -export function instanceOfArtifactV1UploadSourcePresignedUrl(value: object): value is ArtifactV1UploadSourcePresignedUrl { - return true; +export function instanceOfArtifactV1UploadSourcePresignedUrl( + value: object, +): value is ArtifactV1UploadSourcePresignedUrl { + return true; } -export function ArtifactV1UploadSourcePresignedUrlFromJSON(json: any): ArtifactV1UploadSourcePresignedUrl { - return ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlFromJSON( + json: any, +): ArtifactV1UploadSourcePresignedUrl { + return ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1UploadSourcePresignedUrl { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : ArtifactV1UploadSourcePresignedUrlMetadataFromJSON(json['metadata']), - 'location': json['location'] == null ? undefined : json['location'], - 'upload_id': json['upload_id'] == null ? undefined : json['upload_id'], - }; +export function ArtifactV1UploadSourcePresignedUrlFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1UploadSourcePresignedUrl { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null + ? undefined + : ArtifactV1UploadSourcePresignedUrlMetadataFromJSON(json["metadata"]), + location: json["location"] == null ? undefined : json["location"], + upload_id: json["upload_id"] == null ? undefined : json["upload_id"], + }; } -export function ArtifactV1UploadSourcePresignedUrlToJSON(json: any): ArtifactV1UploadSourcePresignedUrl { - return ArtifactV1UploadSourcePresignedUrlToJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlToJSON( + json: any, +): ArtifactV1UploadSourcePresignedUrl { + return ArtifactV1UploadSourcePresignedUrlToJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1UploadSourcePresignedUrlToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1UploadSourcePresignedUrlMetadataToJSON(value['metadata']), - 'location': value['location'], - 'upload_id': value['upload_id'], - }; + return { + metadata: ArtifactV1UploadSourcePresignedUrlMetadataToJSON(value["metadata"]), + location: value["location"], + upload_id: value["upload_id"], + }; } - diff --git a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts index 5d94b630e7..0271ccbe31 100644 --- a/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts +++ b/src/clients/flinkArtifacts/models/ArtifactV1UploadSourcePresignedUrlMetadata.ts @@ -5,91 +5,103 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ArtifactV1UploadSourcePresignedUrlMetadata */ export interface ArtifactV1UploadSourcePresignedUrlMetadata { - /** - * - * @type {any} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ArtifactV1UploadSourcePresignedUrlMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ArtifactV1UploadSourcePresignedUrlMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ArtifactV1UploadSourcePresignedUrlMetadata interface. */ -export function instanceOfArtifactV1UploadSourcePresignedUrlMetadata(value: object): value is ArtifactV1UploadSourcePresignedUrlMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfArtifactV1UploadSourcePresignedUrlMetadata( + value: object, +): value is ArtifactV1UploadSourcePresignedUrlMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } -export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSON(json: any): ArtifactV1UploadSourcePresignedUrlMetadata { - return ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSON( + json: any, +): ArtifactV1UploadSourcePresignedUrlMetadata { + return ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactV1UploadSourcePresignedUrlMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function ArtifactV1UploadSourcePresignedUrlMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ArtifactV1UploadSourcePresignedUrlMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } -export function ArtifactV1UploadSourcePresignedUrlMetadataToJSON(json: any): ArtifactV1UploadSourcePresignedUrlMetadata { - return ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped(json, false); +export function ArtifactV1UploadSourcePresignedUrlMetadataToJSON( + json: any, +): ArtifactV1UploadSourcePresignedUrlMetadata { + return ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped(json, false); } -export function ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ArtifactV1UploadSourcePresignedUrlMetadataToJSONTyped( + value?: Omit< + ArtifactV1UploadSourcePresignedUrlMetadata, + "created_at" | "updated_at" | "deleted_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts index 9bbe3d0948..9a84ec2e6a 100644 --- a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts +++ b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifact201Response.ts @@ -5,198 +5,215 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; +import { mapValues } from "../runtime"; +import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from './ArtifactV1FlinkArtifactVersion'; -import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from "./ArtifactV1FlinkArtifactVersion"; +import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from "./ArtifactV1FlinkArtifactMetadata"; /** - * + * * @export * @interface CreateArtifactV1FlinkArtifact201Response */ export interface CreateArtifactV1FlinkArtifact201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - readonly api_version?: CreateArtifactV1FlinkArtifact201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - readonly kind?: CreateArtifactV1FlinkArtifact201ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - readonly id?: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - metadata?: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof CreateArtifactV1FlinkArtifact201Response - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + readonly api_version?: CreateArtifactV1FlinkArtifact201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + readonly kind?: CreateArtifactV1FlinkArtifact201ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + readonly id?: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + metadata?: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof CreateArtifactV1FlinkArtifact201Response + */ + versions?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateArtifactV1FlinkArtifact201ResponseApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateArtifactV1FlinkArtifact201ResponseKindEnum { - FlinkArtifact = 'FlinkArtifact' + FlinkArtifact = "FlinkArtifact", } - /** * Check if a given object implements the CreateArtifactV1FlinkArtifact201Response interface. */ -export function instanceOfCreateArtifactV1FlinkArtifact201Response(value: object): value is CreateArtifactV1FlinkArtifact201Response { - if (!('cloud' in value) || value['cloud'] === undefined) return false; - if (!('region' in value) || value['region'] === undefined) return false; - if (!('environment' in value) || value['environment'] === undefined) return false; - if (!('display_name' in value) || value['display_name'] === undefined) return false; - return true; +export function instanceOfCreateArtifactV1FlinkArtifact201Response( + value: object, +): value is CreateArtifactV1FlinkArtifact201Response { + if (!("cloud" in value) || value["cloud"] === undefined) return false; + if (!("region" in value) || value["region"] === undefined) return false; + if (!("environment" in value) || value["environment"] === undefined) return false; + if (!("display_name" in value) || value["display_name"] === undefined) return false; + return true; } -export function CreateArtifactV1FlinkArtifact201ResponseFromJSON(json: any): CreateArtifactV1FlinkArtifact201Response { - return CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifact201ResponseFromJSON( + json: any, +): CreateArtifactV1FlinkArtifact201Response { + return CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateArtifactV1FlinkArtifact201Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), - 'cloud': json['cloud'], - 'region': json['region'], - 'environment': json['environment'], - 'display_name': json['display_name'], - '_class': json['class'] == null ? undefined : json['class'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'description': json['description'] == null ? undefined : json['description'], - 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], - 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], - 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), - }; +export function CreateArtifactV1FlinkArtifact201ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateArtifactV1FlinkArtifact201Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null + ? undefined + : ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), + cloud: json["cloud"], + region: json["region"], + environment: json["environment"], + display_name: json["display_name"], + _class: json["class"] == null ? undefined : json["class"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + description: json["description"] == null ? undefined : json["description"], + documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], + runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], + versions: + json["versions"] == null + ? undefined + : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), + }; } -export function CreateArtifactV1FlinkArtifact201ResponseToJSON(json: any): CreateArtifactV1FlinkArtifact201Response { - return CreateArtifactV1FlinkArtifact201ResponseToJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifact201ResponseToJSON( + json: any, +): CreateArtifactV1FlinkArtifact201Response { + return CreateArtifactV1FlinkArtifact201ResponseToJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifact201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateArtifactV1FlinkArtifact201ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - 'display_name': value['display_name'], - 'class': value['_class'], - 'content_format': value['content_format'], - 'description': value['description'], - 'documentation_link': value['documentation_link'], - 'runtime_language': value['runtime_language'], - 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), - }; + return { + metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + display_name: value["display_name"], + class: value["_class"], + content_format: value["content_format"], + description: value["description"], + documentation_link: value["documentation_link"], + runtime_language: value["runtime_language"], + versions: + value["versions"] == null + ? undefined + : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), + }; } - diff --git a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts index 471f386390..28f263cb0e 100644 --- a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts +++ b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequest.ts @@ -5,147 +5,156 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CreateArtifactV1FlinkArtifactRequestUploadSource } from './CreateArtifactV1FlinkArtifactRequestUploadSource'; +import { mapValues } from "../runtime"; +import type { CreateArtifactV1FlinkArtifactRequestUploadSource } from "./CreateArtifactV1FlinkArtifactRequestUploadSource"; import { - CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON, - CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped, - CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON, - CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped, -} from './CreateArtifactV1FlinkArtifactRequestUploadSource'; + CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON, + CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped, + CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON, + CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped, +} from "./CreateArtifactV1FlinkArtifactRequestUploadSource"; /** - * + * * @export * @interface CreateArtifactV1FlinkArtifactRequest */ export interface CreateArtifactV1FlinkArtifactRequest { - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - runtime_language?: string; - /** - * - * @type {CreateArtifactV1FlinkArtifactRequestUploadSource} - * @memberof CreateArtifactV1FlinkArtifactRequest - */ - upload_source: CreateArtifactV1FlinkArtifactRequestUploadSource; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + runtime_language?: string; + /** + * + * @type {CreateArtifactV1FlinkArtifactRequestUploadSource} + * @memberof CreateArtifactV1FlinkArtifactRequest + */ + upload_source: CreateArtifactV1FlinkArtifactRequestUploadSource; } /** * Check if a given object implements the CreateArtifactV1FlinkArtifactRequest interface. */ -export function instanceOfCreateArtifactV1FlinkArtifactRequest(value: object): value is CreateArtifactV1FlinkArtifactRequest { - if (!('cloud' in value) || value['cloud'] === undefined) return false; - if (!('region' in value) || value['region'] === undefined) return false; - if (!('environment' in value) || value['environment'] === undefined) return false; - if (!('display_name' in value) || value['display_name'] === undefined) return false; - if (!('upload_source' in value) || value['upload_source'] === undefined) return false; - return true; +export function instanceOfCreateArtifactV1FlinkArtifactRequest( + value: object, +): value is CreateArtifactV1FlinkArtifactRequest { + if (!("cloud" in value) || value["cloud"] === undefined) return false; + if (!("region" in value) || value["region"] === undefined) return false; + if (!("environment" in value) || value["environment"] === undefined) return false; + if (!("display_name" in value) || value["display_name"] === undefined) return false; + if (!("upload_source" in value) || value["upload_source"] === undefined) return false; + return true; } -export function CreateArtifactV1FlinkArtifactRequestFromJSON(json: any): CreateArtifactV1FlinkArtifactRequest { - return CreateArtifactV1FlinkArtifactRequestFromJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifactRequestFromJSON( + json: any, +): CreateArtifactV1FlinkArtifactRequest { + return CreateArtifactV1FlinkArtifactRequestFromJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateArtifactV1FlinkArtifactRequest { - if (json == null) { - return json; - } - return { - - 'cloud': json['cloud'], - 'region': json['region'], - 'environment': json['environment'], - 'display_name': json['display_name'], - '_class': json['class'] == null ? undefined : json['class'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'description': json['description'] == null ? undefined : json['description'], - 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], - 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], - 'upload_source': CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON(json['upload_source']), - }; +export function CreateArtifactV1FlinkArtifactRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateArtifactV1FlinkArtifactRequest { + if (json == null) { + return json; + } + return { + cloud: json["cloud"], + region: json["region"], + environment: json["environment"], + display_name: json["display_name"], + _class: json["class"] == null ? undefined : json["class"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + description: json["description"] == null ? undefined : json["description"], + documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], + runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], + upload_source: CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON(json["upload_source"]), + }; } -export function CreateArtifactV1FlinkArtifactRequestToJSON(json: any): CreateArtifactV1FlinkArtifactRequest { - return CreateArtifactV1FlinkArtifactRequestToJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifactRequestToJSON( + json: any, +): CreateArtifactV1FlinkArtifactRequest { + return CreateArtifactV1FlinkArtifactRequestToJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestToJSONTyped(value?: CreateArtifactV1FlinkArtifactRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateArtifactV1FlinkArtifactRequestToJSONTyped( + value?: CreateArtifactV1FlinkArtifactRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - 'display_name': value['display_name'], - 'class': value['_class'], - 'content_format': value['content_format'], - 'description': value['description'], - 'documentation_link': value['documentation_link'], - 'runtime_language': value['runtime_language'], - 'upload_source': CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON(value['upload_source']), - }; + return { + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + display_name: value["display_name"], + class: value["_class"], + content_format: value["content_format"], + description: value["description"], + documentation_link: value["documentation_link"], + runtime_language: value["runtime_language"], + upload_source: CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON(value["upload_source"]), + }; } - diff --git a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts index 90af3c7b4e..2359f92597 100644 --- a/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts +++ b/src/clients/flinkArtifacts/models/CreateArtifactV1FlinkArtifactRequestUploadSource.ts @@ -5,58 +5,74 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { ArtifactV1UploadSourcePresignedUrl } from './ArtifactV1UploadSourcePresignedUrl'; +import type { ArtifactV1UploadSourcePresignedUrl } from "./ArtifactV1UploadSourcePresignedUrl"; import { - instanceOfArtifactV1UploadSourcePresignedUrl, - ArtifactV1UploadSourcePresignedUrlFromJSON, - ArtifactV1UploadSourcePresignedUrlFromJSONTyped, - ArtifactV1UploadSourcePresignedUrlToJSON, -} from './ArtifactV1UploadSourcePresignedUrl'; + instanceOfArtifactV1UploadSourcePresignedUrl, + ArtifactV1UploadSourcePresignedUrlFromJSON, + ArtifactV1UploadSourcePresignedUrlFromJSONTyped, + ArtifactV1UploadSourcePresignedUrlToJSON, +} from "./ArtifactV1UploadSourcePresignedUrl"; /** * @type CreateArtifactV1FlinkArtifactRequestUploadSource * Upload source of the Flink Artifact source. * @export */ -export type CreateArtifactV1FlinkArtifactRequestUploadSource = { location: 'PRESIGNED_URL_LOCATION' } & ArtifactV1UploadSourcePresignedUrl; +export type CreateArtifactV1FlinkArtifactRequestUploadSource = { + location: "PRESIGNED_URL_LOCATION"; +} & ArtifactV1UploadSourcePresignedUrl; -export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON(json: any): CreateArtifactV1FlinkArtifactRequestUploadSource { - return CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped(json, false); +export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSON( + json: any, +): CreateArtifactV1FlinkArtifactRequestUploadSource { + return CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateArtifactV1FlinkArtifactRequestUploadSource { - if (json == null) { - return json; - } - switch (json['location']) { - case 'PRESIGNED_URL_LOCATION': - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { location: 'PRESIGNED_URL_LOCATION' } as const); - default: - throw new Error(`No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${json['location']}'`); - } +export function CreateArtifactV1FlinkArtifactRequestUploadSourceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateArtifactV1FlinkArtifactRequestUploadSource { + if (json == null) { + return json; + } + switch (json["location"]) { + case "PRESIGNED_URL_LOCATION": + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlFromJSONTyped(json, true), { + location: "PRESIGNED_URL_LOCATION", + } as const); + default: + throw new Error( + `No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${json["location"]}'`, + ); + } } export function CreateArtifactV1FlinkArtifactRequestUploadSourceToJSON(json: any): any { - return CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped(json, false); + return CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped(json, false); } -export function CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped(value?: CreateArtifactV1FlinkArtifactRequestUploadSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - switch (value['location']) { - case 'PRESIGNED_URL_LOCATION': - return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { location: 'PRESIGNED_URL_LOCATION' } as const); - default: - throw new Error(`No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${value['location']}'`); - } - +export function CreateArtifactV1FlinkArtifactRequestUploadSourceToJSONTyped( + value?: CreateArtifactV1FlinkArtifactRequestUploadSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + switch (value["location"]) { + case "PRESIGNED_URL_LOCATION": + return Object.assign({}, ArtifactV1UploadSourcePresignedUrlToJSON(value), { + location: "PRESIGNED_URL_LOCATION", + } as const); + default: + throw new Error( + `No variant of CreateArtifactV1FlinkArtifactRequestUploadSource exists with 'location=${value["location"]}'`, + ); + } } - diff --git a/src/clients/flinkArtifacts/models/ErrorSource.ts b/src/clients/flinkArtifacts/models/ErrorSource.ts index 09576636a0..fa16775f2d 100644 --- a/src/clients/flinkArtifacts/models/ErrorSource.ts +++ b/src/clients/flinkArtifacts/models/ErrorSource.ts @@ -5,69 +5,69 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - - 'pointer': json['pointer'] == null ? undefined : json['pointer'], - 'parameter': json['parameter'] == null ? undefined : json['parameter'], - }; + if (json == null) { + return json; + } + return { + pointer: json["pointer"] == null ? undefined : json["pointer"], + parameter: json["parameter"] == null ? undefined : json["parameter"], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped( + value?: ErrorSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'pointer': value['pointer'], - 'parameter': value['parameter'], - }; + return { + pointer: value["pointer"], + parameter: value["parameter"], + }; } - diff --git a/src/clients/flinkArtifacts/models/Failure.ts b/src/clients/flinkArtifacts/models/Failure.ts index e81a5b6062..cb9fbf0e0f 100644 --- a/src/clients/flinkArtifacts/models/Failure.ts +++ b/src/clients/flinkArtifacts/models/Failure.ts @@ -5,62 +5,62 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!('errors' in value) || value['errors'] === undefined) return false; - return true; + if (!("errors" in value) || value["errors"] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - - 'errors': new Set(json['errors']), - }; + if (json == null) { + return json; + } + return { + errors: new Set(json["errors"]), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped( + value?: Failure | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'errors': Array.from(value['errors'] as Set), - }; + return { + errors: Array.from(value["errors"] as Set), + }; } - diff --git a/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts b/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts index 4cf222b09d..d9b8248228 100644 --- a/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts +++ b/src/clients/flinkArtifacts/models/GetArtifactV1FlinkArtifact200Response.ts @@ -5,201 +5,218 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1FlinkArtifactVersion } from './ArtifactV1FlinkArtifactVersion'; +import { mapValues } from "../runtime"; +import type { ArtifactV1FlinkArtifactVersion } from "./ArtifactV1FlinkArtifactVersion"; import { - ArtifactV1FlinkArtifactVersionFromJSON, - ArtifactV1FlinkArtifactVersionFromJSONTyped, - ArtifactV1FlinkArtifactVersionToJSON, - ArtifactV1FlinkArtifactVersionToJSONTyped, -} from './ArtifactV1FlinkArtifactVersion'; -import type { ArtifactV1FlinkArtifactMetadata } from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactVersionFromJSON, + ArtifactV1FlinkArtifactVersionFromJSONTyped, + ArtifactV1FlinkArtifactVersionToJSON, + ArtifactV1FlinkArtifactVersionToJSONTyped, +} from "./ArtifactV1FlinkArtifactVersion"; +import type { ArtifactV1FlinkArtifactMetadata } from "./ArtifactV1FlinkArtifactMetadata"; import { - ArtifactV1FlinkArtifactMetadataFromJSON, - ArtifactV1FlinkArtifactMetadataFromJSONTyped, - ArtifactV1FlinkArtifactMetadataToJSON, - ArtifactV1FlinkArtifactMetadataToJSONTyped, -} from './ArtifactV1FlinkArtifactMetadata'; + ArtifactV1FlinkArtifactMetadataFromJSON, + ArtifactV1FlinkArtifactMetadataFromJSONTyped, + ArtifactV1FlinkArtifactMetadataToJSON, + ArtifactV1FlinkArtifactMetadataToJSONTyped, +} from "./ArtifactV1FlinkArtifactMetadata"; /** - * + * * @export * @interface GetArtifactV1FlinkArtifact200Response */ export interface GetArtifactV1FlinkArtifact200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - readonly api_version: GetArtifactV1FlinkArtifact200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - readonly kind: GetArtifactV1FlinkArtifact200ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - readonly id: string; - /** - * - * @type {ArtifactV1FlinkArtifactMetadata} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - metadata?: ArtifactV1FlinkArtifactMetadata; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - region: string; - /** - * Environment the Flink Artifact belongs to. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - environment: string; - /** - * Unique name of the Flink Artifact per cloud, region, environment scope. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - display_name: string; - /** - * Java class or alias for the artifact as provided by developer. Deprecated - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - * @deprecated - */ - _class?: string; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - content_format?: string; - /** - * Description of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - description?: string; - /** - * Documentation link of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - documentation_link?: string; - /** - * Runtime language of the Flink Artifact. - * @type {string} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - runtime_language?: string; - /** - * Versions associated with this Flink Artifact. - * @type {Array} - * @memberof GetArtifactV1FlinkArtifact200Response - */ - versions?: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + readonly api_version: GetArtifactV1FlinkArtifact200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + readonly kind: GetArtifactV1FlinkArtifact200ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + readonly id: string; + /** + * + * @type {ArtifactV1FlinkArtifactMetadata} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + metadata?: ArtifactV1FlinkArtifactMetadata; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + region: string; + /** + * Environment the Flink Artifact belongs to. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + environment: string; + /** + * Unique name of the Flink Artifact per cloud, region, environment scope. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + display_name: string; + /** + * Java class or alias for the artifact as provided by developer. Deprecated + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + * @deprecated + */ + _class?: string; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + content_format?: string; + /** + * Description of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + description?: string; + /** + * Documentation link of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + documentation_link?: string; + /** + * Runtime language of the Flink Artifact. + * @type {string} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + runtime_language?: string; + /** + * Versions associated with this Flink Artifact. + * @type {Array} + * @memberof GetArtifactV1FlinkArtifact200Response + */ + versions?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetArtifactV1FlinkArtifact200ResponseApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetArtifactV1FlinkArtifact200ResponseKindEnum { - FlinkArtifact = 'FlinkArtifact' + FlinkArtifact = "FlinkArtifact", } - /** * Check if a given object implements the GetArtifactV1FlinkArtifact200Response interface. */ -export function instanceOfGetArtifactV1FlinkArtifact200Response(value: object): value is GetArtifactV1FlinkArtifact200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('cloud' in value) || value['cloud'] === undefined) return false; - if (!('region' in value) || value['region'] === undefined) return false; - if (!('environment' in value) || value['environment'] === undefined) return false; - if (!('display_name' in value) || value['display_name'] === undefined) return false; - return true; +export function instanceOfGetArtifactV1FlinkArtifact200Response( + value: object, +): value is GetArtifactV1FlinkArtifact200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("cloud" in value) || value["cloud"] === undefined) return false; + if (!("region" in value) || value["region"] === undefined) return false; + if (!("environment" in value) || value["environment"] === undefined) return false; + if (!("display_name" in value) || value["display_name"] === undefined) return false; + return true; } -export function GetArtifactV1FlinkArtifact200ResponseFromJSON(json: any): GetArtifactV1FlinkArtifact200Response { - return GetArtifactV1FlinkArtifact200ResponseFromJSONTyped(json, false); +export function GetArtifactV1FlinkArtifact200ResponseFromJSON( + json: any, +): GetArtifactV1FlinkArtifact200Response { + return GetArtifactV1FlinkArtifact200ResponseFromJSONTyped(json, false); } -export function GetArtifactV1FlinkArtifact200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetArtifactV1FlinkArtifact200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'id': json['id'], - 'metadata': json['metadata'] == null ? undefined : ArtifactV1FlinkArtifactMetadataFromJSON(json['metadata']), - 'cloud': json['cloud'], - 'region': json['region'], - 'environment': json['environment'], - 'display_name': json['display_name'], - '_class': json['class'] == null ? undefined : json['class'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'description': json['description'] == null ? undefined : json['description'], - 'documentation_link': json['documentation_link'] == null ? undefined : json['documentation_link'], - 'runtime_language': json['runtime_language'] == null ? undefined : json['runtime_language'], - 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON)), - }; +export function GetArtifactV1FlinkArtifact200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetArtifactV1FlinkArtifact200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + id: json["id"], + metadata: + json["metadata"] == null + ? undefined + : ArtifactV1FlinkArtifactMetadataFromJSON(json["metadata"]), + cloud: json["cloud"], + region: json["region"], + environment: json["environment"], + display_name: json["display_name"], + _class: json["class"] == null ? undefined : json["class"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + description: json["description"] == null ? undefined : json["description"], + documentation_link: json["documentation_link"] == null ? undefined : json["documentation_link"], + runtime_language: json["runtime_language"] == null ? undefined : json["runtime_language"], + versions: + json["versions"] == null + ? undefined + : (json["versions"] as Array).map(ArtifactV1FlinkArtifactVersionFromJSON), + }; } -export function GetArtifactV1FlinkArtifact200ResponseToJSON(json: any): GetArtifactV1FlinkArtifact200Response { - return GetArtifactV1FlinkArtifact200ResponseToJSONTyped(json, false); +export function GetArtifactV1FlinkArtifact200ResponseToJSON( + json: any, +): GetArtifactV1FlinkArtifact200Response { + return GetArtifactV1FlinkArtifact200ResponseToJSONTyped(json, false); } -export function GetArtifactV1FlinkArtifact200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetArtifactV1FlinkArtifact200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1FlinkArtifactMetadataToJSON(value['metadata']), - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - 'display_name': value['display_name'], - 'class': value['_class'], - 'content_format': value['content_format'], - 'description': value['description'], - 'documentation_link': value['documentation_link'], - 'runtime_language': value['runtime_language'], - 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ArtifactV1FlinkArtifactVersionToJSON)), - }; + return { + metadata: ArtifactV1FlinkArtifactMetadataToJSON(value["metadata"]), + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + display_name: value["display_name"], + class: value["_class"], + content_format: value["content_format"], + description: value["description"], + documentation_link: value["documentation_link"], + runtime_language: value["runtime_language"], + versions: + value["versions"] == null + ? undefined + : (value["versions"] as Array).map(ArtifactV1FlinkArtifactVersionToJSON), + }; } - diff --git a/src/clients/flinkArtifacts/models/ListMeta.ts b/src/clients/flinkArtifacts/models/ListMeta.ts index 4d1b67487f..13715d8b69 100644 --- a/src/clients/flinkArtifacts/models/ListMeta.ts +++ b/src/clients/flinkArtifacts/models/ListMeta.ts @@ -5,93 +5,93 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. - * @type {string} - * @memberof ListMeta - */ - first?: string | null; - /** - * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. - * @type {string} - * @memberof ListMeta - */ - last?: string | null; - /** - * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. - * @type {string} - * @memberof ListMeta - */ - prev?: string | null; - /** - * A link to the next page of results. If a response does not contain a next link, then there is no more data available. - * @type {string} - * @memberof ListMeta - */ - next?: string | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ListMeta - */ - total_size?: number; + /** + * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. + * @type {string} + * @memberof ListMeta + */ + first?: string | null; + /** + * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. + * @type {string} + * @memberof ListMeta + */ + last?: string | null; + /** + * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. + * @type {string} + * @memberof ListMeta + */ + prev?: string | null; + /** + * A link to the next page of results. If a response does not contain a next link, then there is no more data available. + * @type {string} + * @memberof ListMeta + */ + next?: string | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ListMeta + */ + total_size?: number; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped( + value?: ListMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/flinkArtifacts/models/ModelError.ts b/src/clients/flinkArtifacts/models/ModelError.ts index 96c984cb43..70a61063ab 100644 --- a/src/clients/flinkArtifacts/models/ModelError.ts +++ b/src/clients/flinkArtifacts/models/ModelError.ts @@ -5,21 +5,21 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorSource } from './ErrorSource'; +import { mapValues } from "../runtime"; +import type { ErrorSource } from "./ErrorSource"; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from './ErrorSource'; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from "./ErrorSource"; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'status': json['status'] == null ? undefined : json['status'], - 'code': json['code'] == null ? undefined : json['code'], - 'title': json['title'] == null ? undefined : json['title'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + status: json["status"] == null ? undefined : json["status"], + code: json["code"] == null ? undefined : json["code"], + title: json["title"] == null ? undefined : json["title"], + detail: json["detail"] == null ? undefined : json["detail"], + source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped( + value?: ModelError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'status': value['status'], - 'code': value['code'], - 'title': value['title'], - 'detail': value['detail'], - 'source': ErrorSourceToJSON(value['source']), - }; + return { + id: value["id"], + status: value["status"], + code: value["code"], + title: value["title"], + detail: value["detail"], + source: ErrorSourceToJSON(value["source"]), + }; } - diff --git a/src/clients/flinkArtifacts/models/ObjectMeta.ts b/src/clients/flinkArtifacts/models/ObjectMeta.ts index 05139f434c..a7d0bf4519 100644 --- a/src/clients/flinkArtifacts/models/ObjectMeta.ts +++ b/src/clients/flinkArtifacts/models/ObjectMeta.ts @@ -5,89 +5,91 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_name?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly deleted_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_name?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped( + value?: Omit< + ObjectMeta, + "self" | "resource_name" | "created_at" | "updated_at" | "deleted_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkArtifacts/models/ObjectReference.ts b/src/clients/flinkArtifacts/models/ObjectReference.ts index b1ebafc894..d3ebe4a6af 100644 --- a/src/clients/flinkArtifacts/models/ObjectReference.ts +++ b/src/clients/flinkArtifacts/models/ObjectReference.ts @@ -5,100 +5,103 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface ObjectReference */ export interface ObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof ObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof ObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof ObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly resource_name: string; - /** - * API group and version of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly api_version?: string; - /** - * Kind of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly kind?: string; + /** + * ID of the referred resource + * @type {string} + * @memberof ObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof ObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof ObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly resource_name: string; + /** + * API group and version of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly api_version?: string; + /** + * Kind of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly kind?: string; } /** * Check if a given object implements the ObjectReference interface. */ export function instanceOfObjectReference(value: object): value is ObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function ObjectReferenceFromJSON(json: any): ObjectReference { - return ObjectReferenceFromJSONTyped(json, false); + return ObjectReferenceFromJSONTyped(json, false); } -export function ObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'related': json['related'], - 'resource_name': json['resource_name'], - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function ObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + environment: json["environment"] == null ? undefined : json["environment"], + related: json["related"], + resource_name: json["resource_name"], + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function ObjectReferenceToJSON(json: any): ObjectReference { - return ObjectReferenceToJSONTyped(json, false); + return ObjectReferenceToJSONTyped(json, false); } -export function ObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'environment': value['environment'], - }; + return { + id: value["id"], + environment: value["environment"], + }; } - diff --git a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts index 66e303e2ed..8ff97e678d 100644 --- a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts +++ b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrl200Response.ts @@ -5,134 +5,152 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PresignedUploadUrlArtifactV1PresignedUrl200Response */ export interface PresignedUploadUrlArtifactV1PresignedUrl200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly api_version: PresignedUploadUrlArtifactV1PresignedUrl200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly kind: PresignedUploadUrlArtifactV1PresignedUrl200ResponseKindEnum; - /** - * Content format of the Flink Artifact archive. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly content_format?: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly cloud?: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly region?: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly environment?: string; - /** - * Unique identifier of this upload. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly upload_id?: string; - /** - * Upload URL for the Flink Artifact archive. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly upload_url?: string; - /** - * Upload form data of the Flink Artifact. All values should be strings. - * @type {object} - * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response - */ - readonly upload_form_data?: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly api_version: PresignedUploadUrlArtifactV1PresignedUrl200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly kind: PresignedUploadUrlArtifactV1PresignedUrl200ResponseKindEnum; + /** + * Content format of the Flink Artifact archive. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly content_format?: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly cloud?: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly region?: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly environment?: string; + /** + * Unique identifier of this upload. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly upload_id?: string; + /** + * Upload URL for the Flink Artifact archive. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly upload_url?: string; + /** + * Upload form data of the Flink Artifact. All values should be strings. + * @type {object} + * @memberof PresignedUploadUrlArtifactV1PresignedUrl200Response + */ + readonly upload_form_data?: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PresignedUploadUrlArtifactV1PresignedUrl200ResponseApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PresignedUploadUrlArtifactV1PresignedUrl200ResponseKindEnum { - PresignedUrl = 'PresignedUrl' + PresignedUrl = "PresignedUrl", } - /** * Check if a given object implements the PresignedUploadUrlArtifactV1PresignedUrl200Response interface. */ -export function instanceOfPresignedUploadUrlArtifactV1PresignedUrl200Response(value: object): value is PresignedUploadUrlArtifactV1PresignedUrl200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - return true; +export function instanceOfPresignedUploadUrlArtifactV1PresignedUrl200Response( + value: object, +): value is PresignedUploadUrlArtifactV1PresignedUrl200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + return true; } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrl200Response { - return PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSON( + json: any, +): PresignedUploadUrlArtifactV1PresignedUrl200Response { + return PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PresignedUploadUrlArtifactV1PresignedUrl200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'content_format': json['content_format'] == null ? undefined : json['content_format'], - 'cloud': json['cloud'] == null ? undefined : json['cloud'], - 'region': json['region'] == null ? undefined : json['region'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'upload_id': json['upload_id'] == null ? undefined : json['upload_id'], - 'upload_url': json['upload_url'] == null ? undefined : json['upload_url'], - 'upload_form_data': json['upload_form_data'] == null ? undefined : json['upload_form_data'], - }; +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PresignedUploadUrlArtifactV1PresignedUrl200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + content_format: json["content_format"] == null ? undefined : json["content_format"], + cloud: json["cloud"] == null ? undefined : json["cloud"], + region: json["region"] == null ? undefined : json["region"], + environment: json["environment"] == null ? undefined : json["environment"], + upload_id: json["upload_id"] == null ? undefined : json["upload_id"], + upload_url: json["upload_url"] == null ? undefined : json["upload_url"], + upload_form_data: json["upload_form_data"] == null ? undefined : json["upload_form_data"], + }; } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrl200Response { - return PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSON( + json: any, +): PresignedUploadUrlArtifactV1PresignedUrl200Response { + return PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PresignedUploadUrlArtifactV1PresignedUrl200ResponseToJSONTyped( + value?: Omit< + PresignedUploadUrlArtifactV1PresignedUrl200Response, + | "api_version" + | "kind" + | "content_format" + | "cloud" + | "region" + | "environment" + | "upload_id" + | "upload_url" + | "upload_form_data" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts index 7bba037130..c5f9c5e850 100644 --- a/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts +++ b/src/clients/flinkArtifacts/models/PresignedUploadUrlArtifactV1PresignedUrlRequest.ts @@ -5,142 +5,156 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ArtifactV1PresignedUrlRequestMetadata } from './ArtifactV1PresignedUrlRequestMetadata'; +import { mapValues } from "../runtime"; +import type { ArtifactV1PresignedUrlRequestMetadata } from "./ArtifactV1PresignedUrlRequestMetadata"; import { - ArtifactV1PresignedUrlRequestMetadataFromJSON, - ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, - ArtifactV1PresignedUrlRequestMetadataToJSON, - ArtifactV1PresignedUrlRequestMetadataToJSONTyped, -} from './ArtifactV1PresignedUrlRequestMetadata'; + ArtifactV1PresignedUrlRequestMetadataFromJSON, + ArtifactV1PresignedUrlRequestMetadataFromJSONTyped, + ArtifactV1PresignedUrlRequestMetadataToJSON, + ArtifactV1PresignedUrlRequestMetadataToJSONTyped, +} from "./ArtifactV1PresignedUrlRequestMetadata"; /** - * + * * @export * @interface PresignedUploadUrlArtifactV1PresignedUrlRequest */ export interface PresignedUploadUrlArtifactV1PresignedUrlRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - readonly api_version?: PresignedUploadUrlArtifactV1PresignedUrlRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - readonly kind?: PresignedUploadUrlArtifactV1PresignedUrlRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - readonly id?: string; - /** - * - * @type {ArtifactV1PresignedUrlRequestMetadata} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - metadata?: ArtifactV1PresignedUrlRequestMetadata; - /** - * Archive format of the Flink Artifact. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - content_format: string; - /** - * Cloud provider where the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - cloud: string; - /** - * The Cloud provider region the Flink Artifact archive is uploaded. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - region: string; - /** - * The Environment the uploaded Flink Artifact belongs to. - * @type {string} - * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest - */ - environment: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + readonly api_version?: PresignedUploadUrlArtifactV1PresignedUrlRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + readonly kind?: PresignedUploadUrlArtifactV1PresignedUrlRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + readonly id?: string; + /** + * + * @type {ArtifactV1PresignedUrlRequestMetadata} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + metadata?: ArtifactV1PresignedUrlRequestMetadata; + /** + * Archive format of the Flink Artifact. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + content_format: string; + /** + * Cloud provider where the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + cloud: string; + /** + * The Cloud provider region the Flink Artifact archive is uploaded. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + region: string; + /** + * The Environment the uploaded Flink Artifact belongs to. + * @type {string} + * @memberof PresignedUploadUrlArtifactV1PresignedUrlRequest + */ + environment: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PresignedUploadUrlArtifactV1PresignedUrlRequestApiVersionEnum { - ArtifactV1 = 'artifact/v1' + ArtifactV1 = "artifact/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PresignedUploadUrlArtifactV1PresignedUrlRequestKindEnum { - PresignedUrlRequest = 'PresignedUrlRequest' + PresignedUrlRequest = "PresignedUrlRequest", } - /** * Check if a given object implements the PresignedUploadUrlArtifactV1PresignedUrlRequest interface. */ -export function instanceOfPresignedUploadUrlArtifactV1PresignedUrlRequest(value: object): value is PresignedUploadUrlArtifactV1PresignedUrlRequest { - if (!('content_format' in value) || value['content_format'] === undefined) return false; - if (!('cloud' in value) || value['cloud'] === undefined) return false; - if (!('region' in value) || value['region'] === undefined) return false; - if (!('environment' in value) || value['environment'] === undefined) return false; - return true; +export function instanceOfPresignedUploadUrlArtifactV1PresignedUrlRequest( + value: object, +): value is PresignedUploadUrlArtifactV1PresignedUrlRequest { + if (!("content_format" in value) || value["content_format"] === undefined) return false; + if (!("cloud" in value) || value["cloud"] === undefined) return false; + if (!("region" in value) || value["region"] === undefined) return false; + if (!("environment" in value) || value["environment"] === undefined) return false; + return true; } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrlRequest { - return PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSON( + json: any, +): PresignedUploadUrlArtifactV1PresignedUrlRequest { + return PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PresignedUploadUrlArtifactV1PresignedUrlRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : ArtifactV1PresignedUrlRequestMetadataFromJSON(json['metadata']), - 'content_format': json['content_format'], - 'cloud': json['cloud'], - 'region': json['region'], - 'environment': json['environment'], - }; +export function PresignedUploadUrlArtifactV1PresignedUrlRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PresignedUploadUrlArtifactV1PresignedUrlRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null + ? undefined + : ArtifactV1PresignedUrlRequestMetadataFromJSON(json["metadata"]), + content_format: json["content_format"], + cloud: json["cloud"], + region: json["region"], + environment: json["environment"], + }; } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON(json: any): PresignedUploadUrlArtifactV1PresignedUrlRequest { - return PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped(json, false); +export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSON( + json: any, +): PresignedUploadUrlArtifactV1PresignedUrlRequest { + return PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped(json, false); } -export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PresignedUploadUrlArtifactV1PresignedUrlRequestToJSONTyped( + value?: Omit< + PresignedUploadUrlArtifactV1PresignedUrlRequest, + "api_version" | "kind" | "id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ArtifactV1PresignedUrlRequestMetadataToJSON(value['metadata']), - 'content_format': value['content_format'], - 'cloud': value['cloud'], - 'region': value['region'], - 'environment': value['environment'], - }; + return { + metadata: ArtifactV1PresignedUrlRequestMetadataToJSON(value["metadata"]), + content_format: value["content_format"], + cloud: value["cloud"], + region: value["region"], + environment: value["environment"], + }; } - diff --git a/src/clients/flinkArtifacts/models/index.ts b/src/clients/flinkArtifacts/models/index.ts index af74a6545c..6376488926 100644 --- a/src/clients/flinkArtifacts/models/index.ts +++ b/src/clients/flinkArtifacts/models/index.ts @@ -1,26 +1,26 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ArtifactV1FlinkArtifact'; -export * from './ArtifactV1FlinkArtifactList'; -export * from './ArtifactV1FlinkArtifactListDataInner'; -export * from './ArtifactV1FlinkArtifactListMetadata'; -export * from './ArtifactV1FlinkArtifactMetadata'; -export * from './ArtifactV1FlinkArtifactVersion'; -export * from './ArtifactV1FlinkArtifactVersionUploadSource'; -export * from './ArtifactV1PresignedUrl'; -export * from './ArtifactV1PresignedUrlRequest'; -export * from './ArtifactV1PresignedUrlRequestMetadata'; -export * from './ArtifactV1UploadSourcePresignedUrl'; -export * from './ArtifactV1UploadSourcePresignedUrlMetadata'; -export * from './CreateArtifactV1FlinkArtifact201Response'; -export * from './CreateArtifactV1FlinkArtifactRequest'; -export * from './CreateArtifactV1FlinkArtifactRequestUploadSource'; -export * from './ErrorSource'; -export * from './Failure'; -export * from './GetArtifactV1FlinkArtifact200Response'; -export * from './ListMeta'; -export * from './ModelError'; -export * from './ObjectMeta'; -export * from './ObjectReference'; -export * from './PresignedUploadUrlArtifactV1PresignedUrl200Response'; -export * from './PresignedUploadUrlArtifactV1PresignedUrlRequest'; +export * from "./ArtifactV1FlinkArtifact"; +export * from "./ArtifactV1FlinkArtifactList"; +export * from "./ArtifactV1FlinkArtifactListDataInner"; +export * from "./ArtifactV1FlinkArtifactListMetadata"; +export * from "./ArtifactV1FlinkArtifactMetadata"; +export * from "./ArtifactV1FlinkArtifactVersion"; +export * from "./ArtifactV1FlinkArtifactVersionUploadSource"; +export * from "./ArtifactV1PresignedUrl"; +export * from "./ArtifactV1PresignedUrlRequest"; +export * from "./ArtifactV1PresignedUrlRequestMetadata"; +export * from "./ArtifactV1UploadSourcePresignedUrl"; +export * from "./ArtifactV1UploadSourcePresignedUrlMetadata"; +export * from "./CreateArtifactV1FlinkArtifact201Response"; +export * from "./CreateArtifactV1FlinkArtifactRequest"; +export * from "./CreateArtifactV1FlinkArtifactRequestUploadSource"; +export * from "./ErrorSource"; +export * from "./Failure"; +export * from "./GetArtifactV1FlinkArtifact200Response"; +export * from "./ListMeta"; +export * from "./ModelError"; +export * from "./ObjectMeta"; +export * from "./ObjectReference"; +export * from "./PresignedUploadUrlArtifactV1PresignedUrl200Response"; +export * from "./PresignedUploadUrlArtifactV1PresignedUrlRequest"; diff --git a/src/clients/flinkArtifacts/runtime.ts b/src/clients/flinkArtifacts/runtime.ts index acd93a55e0..c15991b3e1 100644 --- a/src/clients/flinkArtifacts/runtime.ts +++ b/src/clients/flinkArtifacts/runtime.ts @@ -5,83 +5,85 @@ * This is the Flink Artifact Management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://api.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts b/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts index ba52630a65..e10d35b9b0 100644 --- a/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts +++ b/src/clients/flinkComputePool/apis/ComputePoolsFcpmV2Api.ts @@ -5,15 +5,14 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateFcpmV2ComputePool202Response, CreateFcpmV2ComputePoolRequest, @@ -21,307 +20,406 @@ import type { GetFcpmV2ComputePool200Response, ListFcpmV2ComputePools200Response, UpdateFcpmV2ComputePoolRequest, -} from '../models/index'; +} from "../models/index"; import { - CreateFcpmV2ComputePool202ResponseFromJSON, - CreateFcpmV2ComputePool202ResponseToJSON, - CreateFcpmV2ComputePoolRequestFromJSON, - CreateFcpmV2ComputePoolRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetFcpmV2ComputePool200ResponseFromJSON, - GetFcpmV2ComputePool200ResponseToJSON, - ListFcpmV2ComputePools200ResponseFromJSON, - ListFcpmV2ComputePools200ResponseToJSON, - UpdateFcpmV2ComputePoolRequestFromJSON, - UpdateFcpmV2ComputePoolRequestToJSON, -} from '../models/index'; + CreateFcpmV2ComputePool202ResponseFromJSON, + CreateFcpmV2ComputePool202ResponseToJSON, + CreateFcpmV2ComputePoolRequestFromJSON, + CreateFcpmV2ComputePoolRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetFcpmV2ComputePool200ResponseFromJSON, + GetFcpmV2ComputePool200ResponseToJSON, + ListFcpmV2ComputePools200ResponseFromJSON, + ListFcpmV2ComputePools200ResponseToJSON, + UpdateFcpmV2ComputePoolRequestFromJSON, + UpdateFcpmV2ComputePoolRequestToJSON, +} from "../models/index"; export interface CreateFcpmV2ComputePoolOperationRequest { - CreateFcpmV2ComputePoolRequest?: CreateFcpmV2ComputePoolRequest; + CreateFcpmV2ComputePoolRequest?: CreateFcpmV2ComputePoolRequest; } export interface DeleteFcpmV2ComputePoolRequest { - environment: string; - id: string; + environment: string; + id: string; } export interface GetFcpmV2ComputePoolRequest { - environment: string; - id: string; + environment: string; + id: string; } export interface ListFcpmV2ComputePoolsRequest { - environment: string; - spec_region?: string; - spec_network?: string; - page_size?: number; - page_token?: string; + environment: string; + spec_region?: string; + spec_network?: string; + page_size?: number; + page_token?: string; } export interface UpdateFcpmV2ComputePoolOperationRequest { - id: string; - UpdateFcpmV2ComputePoolRequest?: UpdateFcpmV2ComputePoolRequest; + id: string; + UpdateFcpmV2ComputePoolRequest?: UpdateFcpmV2ComputePoolRequest; } /** - * + * */ export class ComputePoolsFcpmV2Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. + * Create a Compute Pool + */ + async createFcpmV2ComputePoolRaw( + requestParameters: CreateFcpmV2ComputePoolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } + + const response = await this.request( + { + path: `/fcpm/v2/compute-pools`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateFcpmV2ComputePoolRequestToJSON( + requestParameters["CreateFcpmV2ComputePoolRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateFcpmV2ComputePool202ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. + * Create a Compute Pool + */ + async createFcpmV2ComputePool( + requestParameters: CreateFcpmV2ComputePoolOperationRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createFcpmV2ComputePoolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. + * Delete a Compute Pool + */ + async deleteFcpmV2ComputePoolRaw( + requestParameters: DeleteFcpmV2ComputePoolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling deleteFcpmV2ComputePool().', + ); + } + + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling deleteFcpmV2ComputePool().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. - * Create a Compute Pool - */ - async createFcpmV2ComputePoolRaw(requestParameters: CreateFcpmV2ComputePoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/fcpm/v2/compute-pools`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateFcpmV2ComputePoolRequestToJSON(requestParameters['CreateFcpmV2ComputePoolRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateFcpmV2ComputePool202ResponseFromJSON(jsonValue)); + const response = await this.request( + { + path: `/fcpm/v2/compute-pools/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. + * Delete a Compute Pool + */ + async deleteFcpmV2ComputePool( + requestParameters: DeleteFcpmV2ComputePoolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteFcpmV2ComputePoolRaw(requestParameters, initOverrides); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. + * Read a Compute Pool + */ + async getFcpmV2ComputePoolRaw( + requestParameters: GetFcpmV2ComputePoolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling getFcpmV2ComputePool().', + ); } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a compute pool. - * Create a Compute Pool - */ - async createFcpmV2ComputePool(requestParameters: CreateFcpmV2ComputePoolOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createFcpmV2ComputePoolRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling getFcpmV2ComputePool().', + ); } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. - * Delete a Compute Pool - */ - async deleteFcpmV2ComputePoolRaw(requestParameters: DeleteFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling deleteFcpmV2ComputePool().' - ); - } - - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling deleteFcpmV2ComputePool().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/fcpm/v2/compute-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const queryParameters: any = {}; + + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); + } + + const response = await this.request( + { + path: `/fcpm/v2/compute-pools/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetFcpmV2ComputePool200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. + * Read a Compute Pool + */ + async getFcpmV2ComputePool( + requestParameters: GetFcpmV2ComputePoolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getFcpmV2ComputePoolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. + * List of Compute Pools + */ + async listFcpmV2ComputePoolsRaw( + requestParameters: ListFcpmV2ComputePoolsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["environment"] == null) { + throw new runtime.RequiredError( + "environment", + 'Required parameter "environment" was null or undefined when calling listFcpmV2ComputePools().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["spec_region"] != null) { + queryParameters["spec.region"] = requestParameters["spec_region"]; } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a compute pool. - * Delete a Compute Pool - */ - async deleteFcpmV2ComputePool(requestParameters: DeleteFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteFcpmV2ComputePoolRaw(requestParameters, initOverrides); + if (requestParameters["environment"] != null) { + queryParameters["environment"] = requestParameters["environment"]; } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. - * Read a Compute Pool - */ - async getFcpmV2ComputePoolRaw(requestParameters: GetFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling getFcpmV2ComputePool().' - ); - } - - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getFcpmV2ComputePool().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/fcpm/v2/compute-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetFcpmV2ComputePool200ResponseFromJSON(jsonValue)); + if (requestParameters["spec_network"] != null) { + queryParameters["spec.network"] = requestParameters["spec_network"]; } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a compute pool. - * Read a Compute Pool - */ - async getFcpmV2ComputePool(requestParameters: GetFcpmV2ComputePoolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFcpmV2ComputePoolRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. - * List of Compute Pools - */ - async listFcpmV2ComputePoolsRaw(requestParameters: ListFcpmV2ComputePoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['environment'] == null) { - throw new runtime.RequiredError( - 'environment', - 'Required parameter "environment" was null or undefined when calling listFcpmV2ComputePools().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['spec_region'] != null) { - queryParameters['spec.region'] = requestParameters['spec_region']; - } - - if (requestParameters['environment'] != null) { - queryParameters['environment'] = requestParameters['environment']; - } - - if (requestParameters['spec_network'] != null) { - queryParameters['spec.network'] = requestParameters['spec_network']; - } - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/fcpm/v2/compute-pools`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListFcpmV2ComputePools200ResponseFromJSON(jsonValue)); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. - * List of Compute Pools - */ - async listFcpmV2ComputePools(requestParameters: ListFcpmV2ComputePoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listFcpmV2ComputePoolsRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. - * Update a Compute Pool - */ - async updateFcpmV2ComputePoolRaw(requestParameters: UpdateFcpmV2ComputePoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling updateFcpmV2ComputePool().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } - - const response = await this.request({ - path: `/fcpm/v2/compute-pools/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: UpdateFcpmV2ComputePoolRequestToJSON(requestParameters['UpdateFcpmV2ComputePoolRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetFcpmV2ComputePool200ResponseFromJSON(jsonValue)); + const response = await this.request( + { + path: `/fcpm/v2/compute-pools`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListFcpmV2ComputePools200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all compute pools. + * List of Compute Pools + */ + async listFcpmV2ComputePools( + requestParameters: ListFcpmV2ComputePoolsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listFcpmV2ComputePoolsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. + * Update a Compute Pool + */ + async updateFcpmV2ComputePoolRaw( + requestParameters: UpdateFcpmV2ComputePoolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling updateFcpmV2ComputePool().', + ); } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. - * Update a Compute Pool - */ - async updateFcpmV2ComputePool(requestParameters: UpdateFcpmV2ComputePoolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateFcpmV2ComputePoolRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); } + const response = await this.request( + { + path: `/fcpm/v2/compute-pools/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "PATCH", + headers: headerParameters, + query: queryParameters, + body: UpdateFcpmV2ComputePoolRequestToJSON( + requestParameters["UpdateFcpmV2ComputePoolRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetFcpmV2ComputePool200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a compute pool. + * Update a Compute Pool + */ + async updateFcpmV2ComputePool( + requestParameters: UpdateFcpmV2ComputePoolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateFcpmV2ComputePoolRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts b/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts index 5876dc2b62..fdcbf4161d 100644 --- a/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts +++ b/src/clients/flinkComputePool/apis/RegionsFcpmV2Api.ts @@ -5,88 +5,100 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - Failure, - FcpmV2RegionList, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { Failure, FcpmV2RegionList } from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - FcpmV2RegionListFromJSON, - FcpmV2RegionListToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + FcpmV2RegionListFromJSON, + FcpmV2RegionListToJSON, +} from "../models/index"; export interface ListFcpmV2RegionsRequest { - cloud?: string; - region_name?: string; - page_size?: number; - page_token?: string; + cloud?: string; + region_name?: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class RegionsFcpmV2Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. + * List of Regions + */ + async listFcpmV2RegionsRaw( + requestParameters: ListFcpmV2RegionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. - * List of Regions - */ - async listFcpmV2RegionsRaw(requestParameters: ListFcpmV2RegionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['cloud'] != null) { - queryParameters['cloud'] = requestParameters['cloud']; - } - - if (requestParameters['region_name'] != null) { - queryParameters['region_name'] = requestParameters['region_name']; - } - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } + if (requestParameters["cloud"] != null) { + queryParameters["cloud"] = requestParameters["cloud"]; + } - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } + if (requestParameters["region_name"] != null) { + queryParameters["region_name"] = requestParameters["region_name"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("confluent-sts-access-token", []); - } + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } - const response = await this.request({ - path: `/fcpm/v2/regions`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => FcpmV2RegionListFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. - * List of Regions - */ - async listFcpmV2Regions(requestParameters: ListFcpmV2RegionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listFcpmV2RegionsRaw(requestParameters, initOverrides); - return await response.value(); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "confluent-sts-access-token", + [], + ); } + const response = await this.request( + { + path: `/fcpm/v2/regions`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + FcpmV2RegionListFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all regions. + * List of Regions + */ + async listFcpmV2Regions( + requestParameters: ListFcpmV2RegionsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listFcpmV2RegionsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkComputePool/apis/index.ts b/src/clients/flinkComputePool/apis/index.ts index d9f515b842..4b043f5432 100644 --- a/src/clients/flinkComputePool/apis/index.ts +++ b/src/clients/flinkComputePool/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ComputePoolsFcpmV2Api'; -export * from './RegionsFcpmV2Api'; +export * from "./ComputePoolsFcpmV2Api"; +export * from "./RegionsFcpmV2Api"; diff --git a/src/clients/flinkComputePool/index.ts b/src/clients/flinkComputePool/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/flinkComputePool/index.ts +++ b/src/clients/flinkComputePool/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts index fbda3a7561..bc912fdf0f 100644 --- a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts +++ b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePool202Response.ts @@ -5,138 +5,147 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from './FcpmV2ComputePoolStatus'; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from "./FcpmV2ComputePoolStatus"; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, -} from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; -import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, +} from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; +import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from "./FcpmV2ComputePoolMetadata"; /** - * + * * @export * @interface CreateFcpmV2ComputePool202Response */ export interface CreateFcpmV2ComputePool202Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateFcpmV2ComputePool202Response - */ - readonly api_version?: CreateFcpmV2ComputePool202ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateFcpmV2ComputePool202Response - */ - readonly kind?: CreateFcpmV2ComputePool202ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof CreateFcpmV2ComputePool202Response - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof CreateFcpmV2ComputePool202Response - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} - * @memberof CreateFcpmV2ComputePool202Response - */ - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof CreateFcpmV2ComputePool202Response - */ - status: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateFcpmV2ComputePool202Response + */ + readonly api_version?: CreateFcpmV2ComputePool202ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateFcpmV2ComputePool202Response + */ + readonly kind?: CreateFcpmV2ComputePool202ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof CreateFcpmV2ComputePool202Response + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof CreateFcpmV2ComputePool202Response + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} + * @memberof CreateFcpmV2ComputePool202Response + */ + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof CreateFcpmV2ComputePool202Response + */ + status: FcpmV2ComputePoolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateFcpmV2ComputePool202ResponseApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateFcpmV2ComputePool202ResponseKindEnum { - ComputePool = 'ComputePool' + ComputePool = "ComputePool", } - /** * Check if a given object implements the CreateFcpmV2ComputePool202Response interface. */ -export function instanceOfCreateFcpmV2ComputePool202Response(value: object): value is CreateFcpmV2ComputePool202Response { - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfCreateFcpmV2ComputePool202Response( + value: object, +): value is CreateFcpmV2ComputePool202Response { + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } -export function CreateFcpmV2ComputePool202ResponseFromJSON(json: any): CreateFcpmV2ComputePool202Response { - return CreateFcpmV2ComputePool202ResponseFromJSONTyped(json, false); +export function CreateFcpmV2ComputePool202ResponseFromJSON( + json: any, +): CreateFcpmV2ComputePool202Response { + return CreateFcpmV2ComputePool202ResponseFromJSONTyped(json, false); } -export function CreateFcpmV2ComputePool202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFcpmV2ComputePool202Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), - 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json['spec']), - 'status': FcpmV2ComputePoolStatusFromJSON(json['status']), - }; +export function CreateFcpmV2ComputePool202ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateFcpmV2ComputePool202Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json["spec"]), + status: FcpmV2ComputePoolStatusFromJSON(json["status"]), + }; } -export function CreateFcpmV2ComputePool202ResponseToJSON(json: any): CreateFcpmV2ComputePool202Response { - return CreateFcpmV2ComputePool202ResponseToJSONTyped(json, false); +export function CreateFcpmV2ComputePool202ResponseToJSON( + json: any, +): CreateFcpmV2ComputePool202Response { + return CreateFcpmV2ComputePool202ResponseToJSONTyped(json, false); } -export function CreateFcpmV2ComputePool202ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateFcpmV2ComputePool202ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), - 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value['spec']), - 'status': FcpmV2ComputePoolStatusToJSON(value['status']), - }; + return { + metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value["spec"]), + status: FcpmV2ComputePoolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts index 21bafe3c37..ffbb4bbceb 100644 --- a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts +++ b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequest.ts @@ -5,137 +5,142 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from './FcpmV2ComputePoolStatus'; -import type { CreateFcpmV2ComputePoolRequestAllOfSpec } from './CreateFcpmV2ComputePoolRequestAllOfSpec'; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from "./FcpmV2ComputePoolStatus"; +import type { CreateFcpmV2ComputePoolRequestAllOfSpec } from "./CreateFcpmV2ComputePoolRequestAllOfSpec"; import { - CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON, - CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, - CreateFcpmV2ComputePoolRequestAllOfSpecToJSON, - CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, -} from './CreateFcpmV2ComputePoolRequestAllOfSpec'; -import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; + CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON, + CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, + CreateFcpmV2ComputePoolRequestAllOfSpecToJSON, + CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, +} from "./CreateFcpmV2ComputePoolRequestAllOfSpec"; +import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from "./FcpmV2ComputePoolMetadata"; /** - * + * * @export * @interface CreateFcpmV2ComputePoolRequest */ export interface CreateFcpmV2ComputePoolRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateFcpmV2ComputePoolRequest - */ - readonly api_version?: CreateFcpmV2ComputePoolRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateFcpmV2ComputePoolRequest - */ - readonly kind?: CreateFcpmV2ComputePoolRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof CreateFcpmV2ComputePoolRequest - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof CreateFcpmV2ComputePoolRequest - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {CreateFcpmV2ComputePoolRequestAllOfSpec} - * @memberof CreateFcpmV2ComputePoolRequest - */ - spec: CreateFcpmV2ComputePoolRequestAllOfSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof CreateFcpmV2ComputePoolRequest - */ - status?: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateFcpmV2ComputePoolRequest + */ + readonly api_version?: CreateFcpmV2ComputePoolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateFcpmV2ComputePoolRequest + */ + readonly kind?: CreateFcpmV2ComputePoolRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof CreateFcpmV2ComputePoolRequest + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof CreateFcpmV2ComputePoolRequest + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {CreateFcpmV2ComputePoolRequestAllOfSpec} + * @memberof CreateFcpmV2ComputePoolRequest + */ + spec: CreateFcpmV2ComputePoolRequestAllOfSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof CreateFcpmV2ComputePoolRequest + */ + status?: FcpmV2ComputePoolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateFcpmV2ComputePoolRequestApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateFcpmV2ComputePoolRequestKindEnum { - ComputePool = 'ComputePool' + ComputePool = "ComputePool", } - /** * Check if a given object implements the CreateFcpmV2ComputePoolRequest interface. */ -export function instanceOfCreateFcpmV2ComputePoolRequest(value: object): value is CreateFcpmV2ComputePoolRequest { - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfCreateFcpmV2ComputePoolRequest( + value: object, +): value is CreateFcpmV2ComputePoolRequest { + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function CreateFcpmV2ComputePoolRequestFromJSON(json: any): CreateFcpmV2ComputePoolRequest { - return CreateFcpmV2ComputePoolRequestFromJSONTyped(json, false); + return CreateFcpmV2ComputePoolRequestFromJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFcpmV2ComputePoolRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), - 'spec': CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json['status']), - }; +export function CreateFcpmV2ComputePoolRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateFcpmV2ComputePoolRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), + spec: CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json["status"]), + }; } export function CreateFcpmV2ComputePoolRequestToJSON(json: any): CreateFcpmV2ComputePoolRequest { - return CreateFcpmV2ComputePoolRequestToJSONTyped(json, false); + return CreateFcpmV2ComputePoolRequestToJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateFcpmV2ComputePoolRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), - 'spec': CreateFcpmV2ComputePoolRequestAllOfSpecToJSON(value['spec']), - 'status': FcpmV2ComputePoolStatusToJSON(value['status']), - }; + return { + metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), + spec: CreateFcpmV2ComputePoolRequestAllOfSpecToJSON(value["spec"]), + status: FcpmV2ComputePoolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts index d8c4c7910f..b53de40f24 100644 --- a/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts +++ b/src/clients/flinkComputePool/models/CreateFcpmV2ComputePoolRequestAllOfSpec.ts @@ -5,69 +5,78 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CreateFcpmV2ComputePoolRequestAllOfSpec */ export interface CreateFcpmV2ComputePoolRequestAllOfSpec { - /** - * - * @type {any} - * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec - */ - environment?: any | null; - /** - * - * @type {any} - * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec - */ - network?: any | null; + /** + * + * @type {any} + * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec + */ + environment?: any | null; + /** + * + * @type {any} + * @memberof CreateFcpmV2ComputePoolRequestAllOfSpec + */ + network?: any | null; } /** * Check if a given object implements the CreateFcpmV2ComputePoolRequestAllOfSpec interface. */ -export function instanceOfCreateFcpmV2ComputePoolRequestAllOfSpec(value: object): value is CreateFcpmV2ComputePoolRequestAllOfSpec { - return true; +export function instanceOfCreateFcpmV2ComputePoolRequestAllOfSpec( + value: object, +): value is CreateFcpmV2ComputePoolRequestAllOfSpec { + return true; } -export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json: any): CreateFcpmV2ComputePoolRequestAllOfSpec { - return CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); +export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSON( + json: any, +): CreateFcpmV2ComputePoolRequestAllOfSpec { + return CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFcpmV2ComputePoolRequestAllOfSpec { - if (json == null) { - return json; - } - return { - - 'environment': json['environment'] == null ? undefined : json['environment'], - 'network': json['network'] == null ? undefined : json['network'], - }; +export function CreateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateFcpmV2ComputePoolRequestAllOfSpec { + if (json == null) { + return json; + } + return { + environment: json["environment"] == null ? undefined : json["environment"], + network: json["network"] == null ? undefined : json["network"], + }; } -export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSON(json: any): CreateFcpmV2ComputePoolRequestAllOfSpec { - return CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); +export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSON( + json: any, +): CreateFcpmV2ComputePoolRequestAllOfSpec { + return CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); } -export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(value?: CreateFcpmV2ComputePoolRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped( + value?: CreateFcpmV2ComputePoolRequestAllOfSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'environment': value['environment'], - 'network': value['network'], - }; + return { + environment: value["environment"], + network: value["network"], + }; } - diff --git a/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts b/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts index d07d581ed5..c85ec5e64b 100644 --- a/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts +++ b/src/clients/flinkComputePool/models/EnvScopedObjectReference.ts @@ -5,86 +5,91 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface EnvScopedObjectReference */ export interface EnvScopedObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof EnvScopedObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof EnvScopedObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the EnvScopedObjectReference interface. */ -export function instanceOfEnvScopedObjectReference(value: object): value is EnvScopedObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; +export function instanceOfEnvScopedObjectReference( + value: object, +): value is EnvScopedObjectReference { + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function EnvScopedObjectReferenceFromJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceFromJSONTyped(json, false); + return EnvScopedObjectReferenceFromJSONTyped(json, false); } -export function EnvScopedObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvScopedObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'related': json['related'], - 'resource_name': json['resource_name'], - }; +export function EnvScopedObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EnvScopedObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + environment: json["environment"] == null ? undefined : json["environment"], + related: json["related"], + resource_name: json["resource_name"], + }; } export function EnvScopedObjectReferenceToJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceToJSONTyped(json, false); + return EnvScopedObjectReferenceToJSONTyped(json, false); } -export function EnvScopedObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EnvScopedObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'environment': value['environment'], - }; + return { + id: value["id"], + environment: value["environment"], + }; } - diff --git a/src/clients/flinkComputePool/models/ErrorSource.ts b/src/clients/flinkComputePool/models/ErrorSource.ts index bb4604e71f..7ccc2758d0 100644 --- a/src/clients/flinkComputePool/models/ErrorSource.ts +++ b/src/clients/flinkComputePool/models/ErrorSource.ts @@ -5,69 +5,69 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - - 'pointer': json['pointer'] == null ? undefined : json['pointer'], - 'parameter': json['parameter'] == null ? undefined : json['parameter'], - }; + if (json == null) { + return json; + } + return { + pointer: json["pointer"] == null ? undefined : json["pointer"], + parameter: json["parameter"] == null ? undefined : json["parameter"], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped( + value?: ErrorSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'pointer': value['pointer'], - 'parameter': value['parameter'], - }; + return { + pointer: value["pointer"], + parameter: value["parameter"], + }; } - diff --git a/src/clients/flinkComputePool/models/Failure.ts b/src/clients/flinkComputePool/models/Failure.ts index 5cfaa1f081..ba7d6211de 100644 --- a/src/clients/flinkComputePool/models/Failure.ts +++ b/src/clients/flinkComputePool/models/Failure.ts @@ -5,62 +5,62 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!('errors' in value) || value['errors'] === undefined) return false; - return true; + if (!("errors" in value) || value["errors"] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - - 'errors': new Set(json['errors']), - }; + if (json == null) { + return json; + } + return { + errors: new Set(json["errors"]), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped( + value?: Failure | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'errors': Array.from(value['errors'] as Set), - }; + return { + errors: Array.from(value["errors"] as Set), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts index e01ec8f121..00d017194c 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePool.ts @@ -5,141 +5,144 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from './FcpmV2ComputePoolStatus'; -import type { FcpmV2ComputePoolSpec } from './FcpmV2ComputePoolSpec'; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from "./FcpmV2ComputePoolStatus"; +import type { FcpmV2ComputePoolSpec } from "./FcpmV2ComputePoolSpec"; import { - FcpmV2ComputePoolSpecFromJSON, - FcpmV2ComputePoolSpecFromJSONTyped, - FcpmV2ComputePoolSpecToJSON, - FcpmV2ComputePoolSpecToJSONTyped, -} from './FcpmV2ComputePoolSpec'; -import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolSpecFromJSON, + FcpmV2ComputePoolSpecFromJSONTyped, + FcpmV2ComputePoolSpecToJSON, + FcpmV2ComputePoolSpecToJSONTyped, +} from "./FcpmV2ComputePoolSpec"; +import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from "./FcpmV2ComputePoolMetadata"; /** * A Compute Pool represents a set of compute resources that is used to run your Queries. * The resources (CPUs, memory,…) provided by a Compute Pool are shared between all Queries that use it. - * - * + * + * * ## The Compute Pools Model * * @export * @interface FcpmV2ComputePool */ export interface FcpmV2ComputePool { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2ComputePool - */ - readonly api_version?: FcpmV2ComputePoolApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2ComputePool - */ - readonly kind?: FcpmV2ComputePoolKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2ComputePool - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof FcpmV2ComputePool - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {FcpmV2ComputePoolSpec} - * @memberof FcpmV2ComputePool - */ - spec?: FcpmV2ComputePoolSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof FcpmV2ComputePool - */ - status?: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2ComputePool + */ + readonly api_version?: FcpmV2ComputePoolApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2ComputePool + */ + readonly kind?: FcpmV2ComputePoolKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2ComputePool + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof FcpmV2ComputePool + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {FcpmV2ComputePoolSpec} + * @memberof FcpmV2ComputePool + */ + spec?: FcpmV2ComputePoolSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof FcpmV2ComputePool + */ + status?: FcpmV2ComputePoolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2ComputePoolApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2ComputePoolKindEnum { - ComputePool = 'ComputePool' + ComputePool = "ComputePool", } - /** * Check if a given object implements the FcpmV2ComputePool interface. */ export function instanceOfFcpmV2ComputePool(value: object): value is FcpmV2ComputePool { - return true; + return true; } export function FcpmV2ComputePoolFromJSON(json: any): FcpmV2ComputePool { - return FcpmV2ComputePoolFromJSONTyped(json, false); + return FcpmV2ComputePoolFromJSONTyped(json, false); } -export function FcpmV2ComputePoolFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePool { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), - 'spec': json['spec'] == null ? undefined : FcpmV2ComputePoolSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json['status']), - }; +export function FcpmV2ComputePoolFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePool { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), + spec: json["spec"] == null ? undefined : FcpmV2ComputePoolSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json["status"]), + }; } export function FcpmV2ComputePoolToJSON(json: any): FcpmV2ComputePool { - return FcpmV2ComputePoolToJSONTyped(json, false); + return FcpmV2ComputePoolToJSONTyped(json, false); } -export function FcpmV2ComputePoolToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), - 'spec': FcpmV2ComputePoolSpecToJSON(value['spec']), - 'status': FcpmV2ComputePoolStatusToJSON(value['status']), - }; + return { + metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), + spec: FcpmV2ComputePoolSpecToJSON(value["spec"]), + status: FcpmV2ComputePoolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts index 48a73f4302..949ca22057 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolList.ts @@ -5,123 +5,125 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolListDataInner } from './FcpmV2ComputePoolListDataInner'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolListDataInner } from "./FcpmV2ComputePoolListDataInner"; import { - FcpmV2ComputePoolListDataInnerFromJSON, - FcpmV2ComputePoolListDataInnerFromJSONTyped, - FcpmV2ComputePoolListDataInnerToJSON, - FcpmV2ComputePoolListDataInnerToJSONTyped, -} from './FcpmV2ComputePoolListDataInner'; -import type { FcpmV2ComputePoolListMetadata } from './FcpmV2ComputePoolListMetadata'; + FcpmV2ComputePoolListDataInnerFromJSON, + FcpmV2ComputePoolListDataInnerFromJSONTyped, + FcpmV2ComputePoolListDataInnerToJSON, + FcpmV2ComputePoolListDataInnerToJSONTyped, +} from "./FcpmV2ComputePoolListDataInner"; +import type { FcpmV2ComputePoolListMetadata } from "./FcpmV2ComputePoolListMetadata"; import { - FcpmV2ComputePoolListMetadataFromJSON, - FcpmV2ComputePoolListMetadataFromJSONTyped, - FcpmV2ComputePoolListMetadataToJSON, - FcpmV2ComputePoolListMetadataToJSONTyped, -} from './FcpmV2ComputePoolListMetadata'; + FcpmV2ComputePoolListMetadataFromJSON, + FcpmV2ComputePoolListMetadataFromJSONTyped, + FcpmV2ComputePoolListMetadataToJSON, + FcpmV2ComputePoolListMetadataToJSONTyped, +} from "./FcpmV2ComputePoolListMetadata"; /** * A Compute Pool represents a set of compute resources that is used to run your Queries. * The resources (CPUs, memory,…) provided by a Compute Pool are shared between all Queries that use it. - * - * + * + * * ## The Compute Pools Model * * @export * @interface FcpmV2ComputePoolList */ export interface FcpmV2ComputePoolList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2ComputePoolList - */ - readonly api_version: FcpmV2ComputePoolListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2ComputePoolList - */ - readonly kind: FcpmV2ComputePoolListKindEnum; - /** - * - * @type {FcpmV2ComputePoolListMetadata} - * @memberof FcpmV2ComputePoolList - */ - metadata: FcpmV2ComputePoolListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof FcpmV2ComputePoolList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2ComputePoolList + */ + readonly api_version: FcpmV2ComputePoolListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2ComputePoolList + */ + readonly kind: FcpmV2ComputePoolListKindEnum; + /** + * + * @type {FcpmV2ComputePoolListMetadata} + * @memberof FcpmV2ComputePoolList + */ + metadata: FcpmV2ComputePoolListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof FcpmV2ComputePoolList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2ComputePoolListApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2ComputePoolListKindEnum { - ComputePoolList = 'ComputePoolList' + ComputePoolList = "ComputePoolList", } - /** * Check if a given object implements the FcpmV2ComputePoolList interface. */ export function instanceOfFcpmV2ComputePoolList(value: object): value is FcpmV2ComputePoolList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function FcpmV2ComputePoolListFromJSON(json: any): FcpmV2ComputePoolList { - return FcpmV2ComputePoolListFromJSONTyped(json, false); + return FcpmV2ComputePoolListFromJSONTyped(json, false); } -export function FcpmV2ComputePoolListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': FcpmV2ComputePoolListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(FcpmV2ComputePoolListDataInnerFromJSON))), - }; +export function FcpmV2ComputePoolListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePoolList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: FcpmV2ComputePoolListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(FcpmV2ComputePoolListDataInnerFromJSON)), + }; } export function FcpmV2ComputePoolListToJSON(json: any): FcpmV2ComputePoolList { - return FcpmV2ComputePoolListToJSONTyped(json, false); + return FcpmV2ComputePoolListToJSONTyped(json, false); } -export function FcpmV2ComputePoolListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(FcpmV2ComputePoolListDataInnerToJSON)), - }; + return { + metadata: FcpmV2ComputePoolListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(FcpmV2ComputePoolListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts index d50ec69663..5f0149ea37 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListDataInner.ts @@ -5,133 +5,137 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from './FcpmV2ComputePoolStatus'; -import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from "./FcpmV2ComputePoolStatus"; +import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from "./FcpmV2ComputePoolMetadata"; /** - * + * * @export * @interface FcpmV2ComputePoolListDataInner */ export interface FcpmV2ComputePoolListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2ComputePoolListDataInner - */ - readonly api_version?: FcpmV2ComputePoolListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2ComputePoolListDataInner - */ - readonly kind?: FcpmV2ComputePoolListDataInnerKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2ComputePoolListDataInner - */ - readonly id: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof FcpmV2ComputePoolListDataInner - */ - metadata: FcpmV2ComputePoolMetadata; - /** - * - * @type {object} - * @memberof FcpmV2ComputePoolListDataInner - */ - spec: object; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof FcpmV2ComputePoolListDataInner - */ - status: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2ComputePoolListDataInner + */ + readonly api_version?: FcpmV2ComputePoolListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2ComputePoolListDataInner + */ + readonly kind?: FcpmV2ComputePoolListDataInnerKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2ComputePoolListDataInner + */ + readonly id: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof FcpmV2ComputePoolListDataInner + */ + metadata: FcpmV2ComputePoolMetadata; + /** + * + * @type {object} + * @memberof FcpmV2ComputePoolListDataInner + */ + spec: object; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof FcpmV2ComputePoolListDataInner + */ + status: FcpmV2ComputePoolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2ComputePoolListDataInnerApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2ComputePoolListDataInnerKindEnum { - ComputePool = 'ComputePool' + ComputePool = "ComputePool", } - /** * Check if a given object implements the FcpmV2ComputePoolListDataInner interface. */ -export function instanceOfFcpmV2ComputePoolListDataInner(value: object): value is FcpmV2ComputePoolListDataInner { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfFcpmV2ComputePoolListDataInner( + value: object, +): value is FcpmV2ComputePoolListDataInner { + if (!("id" in value) || value["id"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } export function FcpmV2ComputePoolListDataInnerFromJSON(json: any): FcpmV2ComputePoolListDataInner { - return FcpmV2ComputePoolListDataInnerFromJSONTyped(json, false); + return FcpmV2ComputePoolListDataInnerFromJSONTyped(json, false); } -export function FcpmV2ComputePoolListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'], - 'metadata': FcpmV2ComputePoolMetadataFromJSON(json['metadata']), - 'spec': json['spec'], - 'status': FcpmV2ComputePoolStatusFromJSON(json['status']), - }; +export function FcpmV2ComputePoolListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePoolListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"], + metadata: FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), + spec: json["spec"], + status: FcpmV2ComputePoolStatusFromJSON(json["status"]), + }; } export function FcpmV2ComputePoolListDataInnerToJSON(json: any): FcpmV2ComputePoolListDataInner { - return FcpmV2ComputePoolListDataInnerToJSONTyped(json, false); + return FcpmV2ComputePoolListDataInnerToJSONTyped(json, false); } -export function FcpmV2ComputePoolListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), - 'spec': value['spec'], - 'status': FcpmV2ComputePoolStatusToJSON(value['status']), - }; + return { + metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), + spec: value["spec"], + status: FcpmV2ComputePoolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts index 9eff215f0c..e793bf7513 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolListMetadata.ts @@ -5,93 +5,98 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface FcpmV2ComputePoolListMetadata */ export interface FcpmV2ComputePoolListMetadata { - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof FcpmV2ComputePoolListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof FcpmV2ComputePoolListMetadata + */ + total_size?: number; } /** * Check if a given object implements the FcpmV2ComputePoolListMetadata interface. */ -export function instanceOfFcpmV2ComputePoolListMetadata(value: object): value is FcpmV2ComputePoolListMetadata { - return true; +export function instanceOfFcpmV2ComputePoolListMetadata( + value: object, +): value is FcpmV2ComputePoolListMetadata { + return true; } export function FcpmV2ComputePoolListMetadataFromJSON(json: any): FcpmV2ComputePoolListMetadata { - return FcpmV2ComputePoolListMetadataFromJSONTyped(json, false); + return FcpmV2ComputePoolListMetadataFromJSONTyped(json, false); } -export function FcpmV2ComputePoolListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolListMetadata { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; +export function FcpmV2ComputePoolListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePoolListMetadata { + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function FcpmV2ComputePoolListMetadataToJSON(json: any): FcpmV2ComputePoolListMetadata { - return FcpmV2ComputePoolListMetadataToJSONTyped(json, false); + return FcpmV2ComputePoolListMetadataToJSONTyped(json, false); } -export function FcpmV2ComputePoolListMetadataToJSONTyped(value?: FcpmV2ComputePoolListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolListMetadataToJSONTyped( + value?: FcpmV2ComputePoolListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts index 4fdf83a6bb..fdb536eced 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolMetadata.ts @@ -5,91 +5,96 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface FcpmV2ComputePoolMetadata */ export interface FcpmV2ComputePoolMetadata { - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof FcpmV2ComputePoolMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2ComputePoolMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2ComputePoolMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2ComputePoolMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof FcpmV2ComputePoolMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2ComputePoolMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2ComputePoolMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2ComputePoolMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the FcpmV2ComputePoolMetadata interface. */ -export function instanceOfFcpmV2ComputePoolMetadata(value: object): value is FcpmV2ComputePoolMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfFcpmV2ComputePoolMetadata( + value: object, +): value is FcpmV2ComputePoolMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function FcpmV2ComputePoolMetadataFromJSON(json: any): FcpmV2ComputePoolMetadata { - return FcpmV2ComputePoolMetadataFromJSONTyped(json, false); + return FcpmV2ComputePoolMetadataFromJSONTyped(json, false); } -export function FcpmV2ComputePoolMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function FcpmV2ComputePoolMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePoolMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function FcpmV2ComputePoolMetadataToJSON(json: any): FcpmV2ComputePoolMetadata { - return FcpmV2ComputePoolMetadataToJSONTyped(json, false); + return FcpmV2ComputePoolMetadataToJSONTyped(json, false); } -export function FcpmV2ComputePoolMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolMetadataToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts index 6b3f090da0..8aa7f70cc7 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolSpec.ts @@ -5,28 +5,28 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GlobalObjectReference } from './GlobalObjectReference'; +import { mapValues } from "../runtime"; +import type { GlobalObjectReference } from "./GlobalObjectReference"; import { - GlobalObjectReferenceFromJSON, - GlobalObjectReferenceFromJSONTyped, - GlobalObjectReferenceToJSON, - GlobalObjectReferenceToJSONTyped, -} from './GlobalObjectReference'; -import type { EnvScopedObjectReference } from './EnvScopedObjectReference'; + GlobalObjectReferenceFromJSON, + GlobalObjectReferenceFromJSONTyped, + GlobalObjectReferenceToJSON, + GlobalObjectReferenceToJSONTyped, +} from "./GlobalObjectReference"; +import type { EnvScopedObjectReference } from "./EnvScopedObjectReference"; import { - EnvScopedObjectReferenceFromJSON, - EnvScopedObjectReferenceFromJSONTyped, - EnvScopedObjectReferenceToJSON, - EnvScopedObjectReferenceToJSONTyped, -} from './EnvScopedObjectReference'; + EnvScopedObjectReferenceFromJSON, + EnvScopedObjectReferenceFromJSONTyped, + EnvScopedObjectReferenceToJSON, + EnvScopedObjectReferenceToJSONTyped, +} from "./EnvScopedObjectReference"; /** * The desired state of the Compute Pool @@ -34,98 +34,103 @@ import { * @interface FcpmV2ComputePoolSpec */ export interface FcpmV2ComputePoolSpec { - /** - * The name of the Flink compute pool. - * @type {string} - * @memberof FcpmV2ComputePoolSpec - */ - display_name?: string; - /** - * The cloud service provider that runs the compute pool. - * @type {string} - * @memberof FcpmV2ComputePoolSpec - */ - cloud?: string; - /** - * Flink compute pools in the region provided will be able to use this identity pool - * @type {string} - * @memberof FcpmV2ComputePoolSpec - */ - region?: string; - /** - * Maximum number of Confluent Flink Units (CFUs) that the Flink compute pool should auto-scale to. - * - * @type {number} - * @memberof FcpmV2ComputePoolSpec - */ - max_cfu?: number; - /** - * The flag to enable AI computing using Ray for the Flink compute pool. It's available in the Early Access API - * lifecycle stage only. - * - * @type {boolean} - * @memberof FcpmV2ComputePoolSpec - */ - enable_ai?: boolean; - /** - * The environment to which this belongs. - * @type {GlobalObjectReference} - * @memberof FcpmV2ComputePoolSpec - */ - environment?: GlobalObjectReference; - /** - * The network to which this belongs. - * @type {EnvScopedObjectReference} - * @memberof FcpmV2ComputePoolSpec - */ - network?: EnvScopedObjectReference; + /** + * The name of the Flink compute pool. + * @type {string} + * @memberof FcpmV2ComputePoolSpec + */ + display_name?: string; + /** + * The cloud service provider that runs the compute pool. + * @type {string} + * @memberof FcpmV2ComputePoolSpec + */ + cloud?: string; + /** + * Flink compute pools in the region provided will be able to use this identity pool + * @type {string} + * @memberof FcpmV2ComputePoolSpec + */ + region?: string; + /** + * Maximum number of Confluent Flink Units (CFUs) that the Flink compute pool should auto-scale to. + * + * @type {number} + * @memberof FcpmV2ComputePoolSpec + */ + max_cfu?: number; + /** + * The flag to enable AI computing using Ray for the Flink compute pool. It's available in the Early Access API + * lifecycle stage only. + * + * @type {boolean} + * @memberof FcpmV2ComputePoolSpec + */ + enable_ai?: boolean; + /** + * The environment to which this belongs. + * @type {GlobalObjectReference} + * @memberof FcpmV2ComputePoolSpec + */ + environment?: GlobalObjectReference; + /** + * The network to which this belongs. + * @type {EnvScopedObjectReference} + * @memberof FcpmV2ComputePoolSpec + */ + network?: EnvScopedObjectReference; } /** * Check if a given object implements the FcpmV2ComputePoolSpec interface. */ export function instanceOfFcpmV2ComputePoolSpec(value: object): value is FcpmV2ComputePoolSpec { - return true; + return true; } export function FcpmV2ComputePoolSpecFromJSON(json: any): FcpmV2ComputePoolSpec { - return FcpmV2ComputePoolSpecFromJSONTyped(json, false); + return FcpmV2ComputePoolSpecFromJSONTyped(json, false); } -export function FcpmV2ComputePoolSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolSpec { - if (json == null) { - return json; - } - return { - - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - 'cloud': json['cloud'] == null ? undefined : json['cloud'], - 'region': json['region'] == null ? undefined : json['region'], - 'max_cfu': json['max_cfu'] == null ? undefined : json['max_cfu'], - 'enable_ai': json['enable_ai'] == null ? undefined : json['enable_ai'], - 'environment': json['environment'] == null ? undefined : GlobalObjectReferenceFromJSON(json['environment']), - 'network': json['network'] == null ? undefined : EnvScopedObjectReferenceFromJSON(json['network']), - }; +export function FcpmV2ComputePoolSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePoolSpec { + if (json == null) { + return json; + } + return { + display_name: json["display_name"] == null ? undefined : json["display_name"], + cloud: json["cloud"] == null ? undefined : json["cloud"], + region: json["region"] == null ? undefined : json["region"], + max_cfu: json["max_cfu"] == null ? undefined : json["max_cfu"], + enable_ai: json["enable_ai"] == null ? undefined : json["enable_ai"], + environment: + json["environment"] == null ? undefined : GlobalObjectReferenceFromJSON(json["environment"]), + network: + json["network"] == null ? undefined : EnvScopedObjectReferenceFromJSON(json["network"]), + }; } export function FcpmV2ComputePoolSpecToJSON(json: any): FcpmV2ComputePoolSpec { - return FcpmV2ComputePoolSpecToJSONTyped(json, false); + return FcpmV2ComputePoolSpecToJSONTyped(json, false); } -export function FcpmV2ComputePoolSpecToJSONTyped(value?: FcpmV2ComputePoolSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolSpecToJSONTyped( + value?: FcpmV2ComputePoolSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'display_name': value['display_name'], - 'cloud': value['cloud'], - 'region': value['region'], - 'max_cfu': value['max_cfu'], - 'enable_ai': value['enable_ai'], - 'environment': GlobalObjectReferenceToJSON(value['environment']), - 'network': EnvScopedObjectReferenceToJSON(value['network']), - }; + return { + display_name: value["display_name"], + cloud: value["cloud"], + region: value["region"], + max_cfu: value["max_cfu"], + enable_ai: value["enable_ai"], + environment: GlobalObjectReferenceToJSON(value["environment"]), + network: EnvScopedObjectReferenceToJSON(value["network"]), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts b/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts index 50f314a2da..007134e946 100644 --- a/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts +++ b/src/clients/flinkComputePool/models/FcpmV2ComputePoolStatus.ts @@ -5,69 +5,71 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of the Compute Pool * @export * @interface FcpmV2ComputePoolStatus */ export interface FcpmV2ComputePoolStatus { - /** - * Status of the Flink compute pool. - * @type {string} - * @memberof FcpmV2ComputePoolStatus - */ - readonly phase: string; - /** - * The number of Confluent Flink Units (CFUs) currently allocated to this Flink compute pool. - * @type {number} - * @memberof FcpmV2ComputePoolStatus - */ - readonly current_cfu: number; + /** + * Status of the Flink compute pool. + * @type {string} + * @memberof FcpmV2ComputePoolStatus + */ + readonly phase: string; + /** + * The number of Confluent Flink Units (CFUs) currently allocated to this Flink compute pool. + * @type {number} + * @memberof FcpmV2ComputePoolStatus + */ + readonly current_cfu: number; } /** * Check if a given object implements the FcpmV2ComputePoolStatus interface. */ export function instanceOfFcpmV2ComputePoolStatus(value: object): value is FcpmV2ComputePoolStatus { - if (!('phase' in value) || value['phase'] === undefined) return false; - if (!('current_cfu' in value) || value['current_cfu'] === undefined) return false; - return true; + if (!("phase" in value) || value["phase"] === undefined) return false; + if (!("current_cfu" in value) || value["current_cfu"] === undefined) return false; + return true; } export function FcpmV2ComputePoolStatusFromJSON(json: any): FcpmV2ComputePoolStatus { - return FcpmV2ComputePoolStatusFromJSONTyped(json, false); + return FcpmV2ComputePoolStatusFromJSONTyped(json, false); } -export function FcpmV2ComputePoolStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2ComputePoolStatus { - if (json == null) { - return json; - } - return { - - 'phase': json['phase'], - 'current_cfu': json['current_cfu'], - }; +export function FcpmV2ComputePoolStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2ComputePoolStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"], + current_cfu: json["current_cfu"], + }; } export function FcpmV2ComputePoolStatusToJSON(json: any): FcpmV2ComputePoolStatus { - return FcpmV2ComputePoolStatusToJSONTyped(json, false); + return FcpmV2ComputePoolStatusToJSONTyped(json, false); } -export function FcpmV2ComputePoolStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2ComputePoolStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2Region.ts b/src/clients/flinkComputePool/models/FcpmV2Region.ts index 2b66ae4f87..27451f18e4 100644 --- a/src/clients/flinkComputePool/models/FcpmV2Region.ts +++ b/src/clients/flinkComputePool/models/FcpmV2Region.ts @@ -5,146 +5,156 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2RegionMetadata } from './FcpmV2RegionMetadata'; +import { mapValues } from "../runtime"; +import type { FcpmV2RegionMetadata } from "./FcpmV2RegionMetadata"; import { - FcpmV2RegionMetadataFromJSON, - FcpmV2RegionMetadataFromJSONTyped, - FcpmV2RegionMetadataToJSON, - FcpmV2RegionMetadataToJSONTyped, -} from './FcpmV2RegionMetadata'; + FcpmV2RegionMetadataFromJSON, + FcpmV2RegionMetadataFromJSONTyped, + FcpmV2RegionMetadataToJSON, + FcpmV2RegionMetadataToJSONTyped, +} from "./FcpmV2RegionMetadata"; /** * `Region` objects represent cloud provider regions available when placing Flink compute pools. * The API allows you to list Flink regions. - * - * + * + * * ## The Regions Model * * @export * @interface FcpmV2Region */ export interface FcpmV2Region { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2Region - */ - readonly api_version?: FcpmV2RegionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2Region - */ - readonly kind?: FcpmV2RegionKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2Region - */ - readonly id?: string; - /** - * - * @type {FcpmV2RegionMetadata} - * @memberof FcpmV2Region - */ - metadata?: FcpmV2RegionMetadata; - /** - * The display name. - * @type {string} - * @memberof FcpmV2Region - */ - readonly display_name?: string; - /** - * The cloud service provider that hosts the region. - * @type {string} - * @memberof FcpmV2Region - */ - readonly cloud?: string; - /** - * The region name. - * @type {string} - * @memberof FcpmV2Region - */ - readonly region_name?: string; - /** - * The regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2Region - */ - readonly http_endpoint?: string; - /** - * The private regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2Region - */ - readonly private_http_endpoint?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2Region + */ + readonly api_version?: FcpmV2RegionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2Region + */ + readonly kind?: FcpmV2RegionKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2Region + */ + readonly id?: string; + /** + * + * @type {FcpmV2RegionMetadata} + * @memberof FcpmV2Region + */ + metadata?: FcpmV2RegionMetadata; + /** + * The display name. + * @type {string} + * @memberof FcpmV2Region + */ + readonly display_name?: string; + /** + * The cloud service provider that hosts the region. + * @type {string} + * @memberof FcpmV2Region + */ + readonly cloud?: string; + /** + * The region name. + * @type {string} + * @memberof FcpmV2Region + */ + readonly region_name?: string; + /** + * The regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2Region + */ + readonly http_endpoint?: string; + /** + * The private regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2Region + */ + readonly private_http_endpoint?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2RegionApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2RegionKindEnum { - Region = 'Region' + Region = "Region", } - /** * Check if a given object implements the FcpmV2Region interface. */ export function instanceOfFcpmV2Region(value: object): value is FcpmV2Region { - return true; + return true; } export function FcpmV2RegionFromJSON(json: any): FcpmV2Region { - return FcpmV2RegionFromJSONTyped(json, false); + return FcpmV2RegionFromJSONTyped(json, false); } export function FcpmV2RegionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2Region { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : FcpmV2RegionMetadataFromJSON(json['metadata']), - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - 'cloud': json['cloud'] == null ? undefined : json['cloud'], - 'region_name': json['region_name'] == null ? undefined : json['region_name'], - 'http_endpoint': json['http_endpoint'] == null ? undefined : json['http_endpoint'], - 'private_http_endpoint': json['private_http_endpoint'] == null ? undefined : json['private_http_endpoint'], - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: json["metadata"] == null ? undefined : FcpmV2RegionMetadataFromJSON(json["metadata"]), + display_name: json["display_name"] == null ? undefined : json["display_name"], + cloud: json["cloud"] == null ? undefined : json["cloud"], + region_name: json["region_name"] == null ? undefined : json["region_name"], + http_endpoint: json["http_endpoint"] == null ? undefined : json["http_endpoint"], + private_http_endpoint: + json["private_http_endpoint"] == null ? undefined : json["private_http_endpoint"], + }; } export function FcpmV2RegionToJSON(json: any): FcpmV2Region { - return FcpmV2RegionToJSONTyped(json, false); + return FcpmV2RegionToJSONTyped(json, false); } -export function FcpmV2RegionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2RegionToJSONTyped( + value?: Omit< + FcpmV2Region, + | "api_version" + | "kind" + | "id" + | "display_name" + | "cloud" + | "region_name" + | "http_endpoint" + | "private_http_endpoint" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2RegionMetadataToJSON(value['metadata']), - }; + return { + metadata: FcpmV2RegionMetadataToJSON(value["metadata"]), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionList.ts b/src/clients/flinkComputePool/models/FcpmV2RegionList.ts index 534e7d1560..5c149383d5 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionList.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionList.ts @@ -5,123 +5,125 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2RegionListDataInner } from './FcpmV2RegionListDataInner'; +import { mapValues } from "../runtime"; +import type { FcpmV2RegionListDataInner } from "./FcpmV2RegionListDataInner"; import { - FcpmV2RegionListDataInnerFromJSON, - FcpmV2RegionListDataInnerFromJSONTyped, - FcpmV2RegionListDataInnerToJSON, - FcpmV2RegionListDataInnerToJSONTyped, -} from './FcpmV2RegionListDataInner'; -import type { FcpmV2RegionListMetadata } from './FcpmV2RegionListMetadata'; + FcpmV2RegionListDataInnerFromJSON, + FcpmV2RegionListDataInnerFromJSONTyped, + FcpmV2RegionListDataInnerToJSON, + FcpmV2RegionListDataInnerToJSONTyped, +} from "./FcpmV2RegionListDataInner"; +import type { FcpmV2RegionListMetadata } from "./FcpmV2RegionListMetadata"; import { - FcpmV2RegionListMetadataFromJSON, - FcpmV2RegionListMetadataFromJSONTyped, - FcpmV2RegionListMetadataToJSON, - FcpmV2RegionListMetadataToJSONTyped, -} from './FcpmV2RegionListMetadata'; + FcpmV2RegionListMetadataFromJSON, + FcpmV2RegionListMetadataFromJSONTyped, + FcpmV2RegionListMetadataToJSON, + FcpmV2RegionListMetadataToJSONTyped, +} from "./FcpmV2RegionListMetadata"; /** * `Region` objects represent cloud provider regions available when placing Flink compute pools. * The API allows you to list Flink regions. - * - * + * + * * ## The Regions Model * * @export * @interface FcpmV2RegionList */ export interface FcpmV2RegionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2RegionList - */ - readonly api_version: FcpmV2RegionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2RegionList - */ - readonly kind: FcpmV2RegionListKindEnum; - /** - * - * @type {FcpmV2RegionListMetadata} - * @memberof FcpmV2RegionList - */ - metadata: FcpmV2RegionListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof FcpmV2RegionList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2RegionList + */ + readonly api_version: FcpmV2RegionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2RegionList + */ + readonly kind: FcpmV2RegionListKindEnum; + /** + * + * @type {FcpmV2RegionListMetadata} + * @memberof FcpmV2RegionList + */ + metadata: FcpmV2RegionListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof FcpmV2RegionList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2RegionListApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2RegionListKindEnum { - RegionList = 'RegionList' + RegionList = "RegionList", } - /** * Check if a given object implements the FcpmV2RegionList interface. */ export function instanceOfFcpmV2RegionList(value: object): value is FcpmV2RegionList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function FcpmV2RegionListFromJSON(json: any): FcpmV2RegionList { - return FcpmV2RegionListFromJSONTyped(json, false); + return FcpmV2RegionListFromJSONTyped(json, false); } -export function FcpmV2RegionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': FcpmV2RegionListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(FcpmV2RegionListDataInnerFromJSON))), - }; +export function FcpmV2RegionListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2RegionList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: FcpmV2RegionListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(FcpmV2RegionListDataInnerFromJSON)), + }; } export function FcpmV2RegionListToJSON(json: any): FcpmV2RegionList { - return FcpmV2RegionListToJSONTyped(json, false); + return FcpmV2RegionListToJSONTyped(json, false); } -export function FcpmV2RegionListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2RegionListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2RegionListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(FcpmV2RegionListDataInnerToJSON)), - }; + return { + metadata: FcpmV2RegionListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(FcpmV2RegionListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts b/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts index 7ed41c6511..728a1130f4 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionListDataInner.ts @@ -5,147 +5,162 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2RegionMetadata } from './FcpmV2RegionMetadata'; +import { mapValues } from "../runtime"; +import type { FcpmV2RegionMetadata } from "./FcpmV2RegionMetadata"; import { - FcpmV2RegionMetadataFromJSON, - FcpmV2RegionMetadataFromJSONTyped, - FcpmV2RegionMetadataToJSON, - FcpmV2RegionMetadataToJSONTyped, -} from './FcpmV2RegionMetadata'; + FcpmV2RegionMetadataFromJSON, + FcpmV2RegionMetadataFromJSONTyped, + FcpmV2RegionMetadataToJSON, + FcpmV2RegionMetadataToJSONTyped, +} from "./FcpmV2RegionMetadata"; /** - * + * * @export * @interface FcpmV2RegionListDataInner */ export interface FcpmV2RegionListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly api_version?: FcpmV2RegionListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly kind?: FcpmV2RegionListDataInnerKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly id: string; - /** - * - * @type {FcpmV2RegionMetadata} - * @memberof FcpmV2RegionListDataInner - */ - metadata: FcpmV2RegionMetadata; - /** - * The display name. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly display_name: string; - /** - * The cloud service provider that hosts the region. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly cloud: string; - /** - * The region name. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly region_name: string; - /** - * The regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly http_endpoint: string; - /** - * The private regional API endpoint for Flink compute pools. - * @type {string} - * @memberof FcpmV2RegionListDataInner - */ - readonly private_http_endpoint?: string; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly api_version?: FcpmV2RegionListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly kind?: FcpmV2RegionListDataInnerKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly id: string; + /** + * + * @type {FcpmV2RegionMetadata} + * @memberof FcpmV2RegionListDataInner + */ + metadata: FcpmV2RegionMetadata; + /** + * The display name. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly display_name: string; + /** + * The cloud service provider that hosts the region. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly cloud: string; + /** + * The region name. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly region_name: string; + /** + * The regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly http_endpoint: string; + /** + * The private regional API endpoint for Flink compute pools. + * @type {string} + * @memberof FcpmV2RegionListDataInner + */ + readonly private_http_endpoint?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2RegionListDataInnerApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum FcpmV2RegionListDataInnerKindEnum { - Region = 'Region' + Region = "Region", } - /** * Check if a given object implements the FcpmV2RegionListDataInner interface. */ -export function instanceOfFcpmV2RegionListDataInner(value: object): value is FcpmV2RegionListDataInner { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('display_name' in value) || value['display_name'] === undefined) return false; - if (!('cloud' in value) || value['cloud'] === undefined) return false; - if (!('region_name' in value) || value['region_name'] === undefined) return false; - if (!('http_endpoint' in value) || value['http_endpoint'] === undefined) return false; - return true; +export function instanceOfFcpmV2RegionListDataInner( + value: object, +): value is FcpmV2RegionListDataInner { + if (!("id" in value) || value["id"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("display_name" in value) || value["display_name"] === undefined) return false; + if (!("cloud" in value) || value["cloud"] === undefined) return false; + if (!("region_name" in value) || value["region_name"] === undefined) return false; + if (!("http_endpoint" in value) || value["http_endpoint"] === undefined) return false; + return true; } export function FcpmV2RegionListDataInnerFromJSON(json: any): FcpmV2RegionListDataInner { - return FcpmV2RegionListDataInnerFromJSONTyped(json, false); + return FcpmV2RegionListDataInnerFromJSONTyped(json, false); } -export function FcpmV2RegionListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'], - 'metadata': FcpmV2RegionMetadataFromJSON(json['metadata']), - 'display_name': json['display_name'], - 'cloud': json['cloud'], - 'region_name': json['region_name'], - 'http_endpoint': json['http_endpoint'], - 'private_http_endpoint': json['private_http_endpoint'] == null ? undefined : json['private_http_endpoint'], - }; +export function FcpmV2RegionListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2RegionListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"], + metadata: FcpmV2RegionMetadataFromJSON(json["metadata"]), + display_name: json["display_name"], + cloud: json["cloud"], + region_name: json["region_name"], + http_endpoint: json["http_endpoint"], + private_http_endpoint: + json["private_http_endpoint"] == null ? undefined : json["private_http_endpoint"], + }; } export function FcpmV2RegionListDataInnerToJSON(json: any): FcpmV2RegionListDataInner { - return FcpmV2RegionListDataInnerToJSONTyped(json, false); + return FcpmV2RegionListDataInnerToJSONTyped(json, false); } -export function FcpmV2RegionListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2RegionListDataInnerToJSONTyped( + value?: Omit< + FcpmV2RegionListDataInner, + | "api_version" + | "kind" + | "id" + | "display_name" + | "cloud" + | "region_name" + | "http_endpoint" + | "private_http_endpoint" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2RegionMetadataToJSON(value['metadata']), - }; + return { + metadata: FcpmV2RegionMetadataToJSON(value["metadata"]), + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts index 262663a247..359dfcd4c7 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionListMetadata.ts @@ -5,93 +5,98 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface FcpmV2RegionListMetadata */ export interface FcpmV2RegionListMetadata { - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof FcpmV2RegionListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof FcpmV2RegionListMetadata + */ + total_size?: number; } /** * Check if a given object implements the FcpmV2RegionListMetadata interface. */ -export function instanceOfFcpmV2RegionListMetadata(value: object): value is FcpmV2RegionListMetadata { - return true; +export function instanceOfFcpmV2RegionListMetadata( + value: object, +): value is FcpmV2RegionListMetadata { + return true; } export function FcpmV2RegionListMetadataFromJSON(json: any): FcpmV2RegionListMetadata { - return FcpmV2RegionListMetadataFromJSONTyped(json, false); + return FcpmV2RegionListMetadataFromJSONTyped(json, false); } -export function FcpmV2RegionListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionListMetadata { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; +export function FcpmV2RegionListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2RegionListMetadata { + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function FcpmV2RegionListMetadataToJSON(json: any): FcpmV2RegionListMetadata { - return FcpmV2RegionListMetadataToJSONTyped(json, false); + return FcpmV2RegionListMetadataToJSONTyped(json, false); } -export function FcpmV2RegionListMetadataToJSONTyped(value?: FcpmV2RegionListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2RegionListMetadataToJSONTyped( + value?: FcpmV2RegionListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts b/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts index be12637345..55d3299bcd 100644 --- a/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts +++ b/src/clients/flinkComputePool/models/FcpmV2RegionMetadata.ts @@ -5,91 +5,94 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface FcpmV2RegionMetadata */ export interface FcpmV2RegionMetadata { - /** - * - * @type {any} - * @memberof FcpmV2RegionMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof FcpmV2RegionMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2RegionMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2RegionMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof FcpmV2RegionMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof FcpmV2RegionMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof FcpmV2RegionMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2RegionMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2RegionMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof FcpmV2RegionMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the FcpmV2RegionMetadata interface. */ export function instanceOfFcpmV2RegionMetadata(value: object): value is FcpmV2RegionMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function FcpmV2RegionMetadataFromJSON(json: any): FcpmV2RegionMetadata { - return FcpmV2RegionMetadataFromJSONTyped(json, false); + return FcpmV2RegionMetadataFromJSONTyped(json, false); } -export function FcpmV2RegionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): FcpmV2RegionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function FcpmV2RegionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): FcpmV2RegionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function FcpmV2RegionMetadataToJSON(json: any): FcpmV2RegionMetadata { - return FcpmV2RegionMetadataToJSONTyped(json, false); + return FcpmV2RegionMetadataToJSONTyped(json, false); } -export function FcpmV2RegionMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FcpmV2RegionMetadataToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts b/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts index 1c45eb23fc..8e188cd4cd 100644 --- a/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts +++ b/src/clients/flinkComputePool/models/GetFcpmV2ComputePool200Response.ts @@ -5,141 +5,148 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from './FcpmV2ComputePoolStatus'; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from "./FcpmV2ComputePoolStatus"; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, -} from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; -import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, +} from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; +import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from "./FcpmV2ComputePoolMetadata"; /** - * + * * @export * @interface GetFcpmV2ComputePool200Response */ export interface GetFcpmV2ComputePool200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetFcpmV2ComputePool200Response - */ - readonly api_version: GetFcpmV2ComputePool200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetFcpmV2ComputePool200Response - */ - readonly kind: GetFcpmV2ComputePool200ResponseKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof GetFcpmV2ComputePool200Response - */ - readonly id: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof GetFcpmV2ComputePool200Response - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} - * @memberof GetFcpmV2ComputePool200Response - */ - spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof GetFcpmV2ComputePool200Response - */ - status: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetFcpmV2ComputePool200Response + */ + readonly api_version: GetFcpmV2ComputePool200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetFcpmV2ComputePool200Response + */ + readonly kind: GetFcpmV2ComputePool200ResponseKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof GetFcpmV2ComputePool200Response + */ + readonly id: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof GetFcpmV2ComputePool200Response + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} + * @memberof GetFcpmV2ComputePool200Response + */ + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof GetFcpmV2ComputePool200Response + */ + status: FcpmV2ComputePoolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetFcpmV2ComputePool200ResponseApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetFcpmV2ComputePool200ResponseKindEnum { - ComputePool = 'ComputePool' + ComputePool = "ComputePool", } - /** * Check if a given object implements the GetFcpmV2ComputePool200Response interface. */ -export function instanceOfGetFcpmV2ComputePool200Response(value: object): value is GetFcpmV2ComputePool200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfGetFcpmV2ComputePool200Response( + value: object, +): value is GetFcpmV2ComputePool200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } -export function GetFcpmV2ComputePool200ResponseFromJSON(json: any): GetFcpmV2ComputePool200Response { - return GetFcpmV2ComputePool200ResponseFromJSONTyped(json, false); +export function GetFcpmV2ComputePool200ResponseFromJSON( + json: any, +): GetFcpmV2ComputePool200Response { + return GetFcpmV2ComputePool200ResponseFromJSONTyped(json, false); } -export function GetFcpmV2ComputePool200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetFcpmV2ComputePool200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'id': json['id'], - 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), - 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json['spec']), - 'status': FcpmV2ComputePoolStatusFromJSON(json['status']), - }; +export function GetFcpmV2ComputePool200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetFcpmV2ComputePool200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + id: json["id"], + metadata: + json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json["spec"]), + status: FcpmV2ComputePoolStatusFromJSON(json["status"]), + }; } export function GetFcpmV2ComputePool200ResponseToJSON(json: any): GetFcpmV2ComputePool200Response { - return GetFcpmV2ComputePool200ResponseToJSONTyped(json, false); + return GetFcpmV2ComputePool200ResponseToJSONTyped(json, false); } -export function GetFcpmV2ComputePool200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetFcpmV2ComputePool200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), - 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value['spec']), - 'status': FcpmV2ComputePoolStatusToJSON(value['status']), - }; + return { + metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value["spec"]), + status: FcpmV2ComputePoolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkComputePool/models/GlobalObjectReference.ts b/src/clients/flinkComputePool/models/GlobalObjectReference.ts index f7089ae5f1..fd50f5b7b8 100644 --- a/src/clients/flinkComputePool/models/GlobalObjectReference.ts +++ b/src/clients/flinkComputePool/models/GlobalObjectReference.ts @@ -5,78 +5,81 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface GlobalObjectReference */ export interface GlobalObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - id: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof GlobalObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + id: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof GlobalObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the GlobalObjectReference interface. */ export function instanceOfGlobalObjectReference(value: object): value is GlobalObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function GlobalObjectReferenceFromJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceFromJSONTyped(json, false); + return GlobalObjectReferenceFromJSONTyped(json, false); } -export function GlobalObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'related': json['related'], - 'resource_name': json['resource_name'], - }; +export function GlobalObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GlobalObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + related: json["related"], + resource_name: json["resource_name"], + }; } export function GlobalObjectReferenceToJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceToJSONTyped(json, false); + return GlobalObjectReferenceToJSONTyped(json, false); } -export function GlobalObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GlobalObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - }; + return { + id: value["id"], + }; } - diff --git a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts index 176e0634ad..e97ce26319 100644 --- a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts +++ b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200Response.ts @@ -5,118 +5,126 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolListMetadata } from './FcpmV2ComputePoolListMetadata'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolListMetadata } from "./FcpmV2ComputePoolListMetadata"; import { - FcpmV2ComputePoolListMetadataFromJSON, - FcpmV2ComputePoolListMetadataFromJSONTyped, - FcpmV2ComputePoolListMetadataToJSON, - FcpmV2ComputePoolListMetadataToJSONTyped, -} from './FcpmV2ComputePoolListMetadata'; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInner } from './ListFcpmV2ComputePools200ResponseAllOfDataInner'; + FcpmV2ComputePoolListMetadataFromJSON, + FcpmV2ComputePoolListMetadataFromJSONTyped, + FcpmV2ComputePoolListMetadataToJSON, + FcpmV2ComputePoolListMetadataToJSONTyped, +} from "./FcpmV2ComputePoolListMetadata"; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInner } from "./ListFcpmV2ComputePools200ResponseAllOfDataInner"; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped, -} from './ListFcpmV2ComputePools200ResponseAllOfDataInner'; + ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped, +} from "./ListFcpmV2ComputePools200ResponseAllOfDataInner"; /** - * + * * @export * @interface ListFcpmV2ComputePools200Response */ export interface ListFcpmV2ComputePools200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ListFcpmV2ComputePools200Response - */ - readonly api_version: ListFcpmV2ComputePools200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ListFcpmV2ComputePools200Response - */ - readonly kind: ListFcpmV2ComputePools200ResponseKindEnum; - /** - * - * @type {FcpmV2ComputePoolListMetadata} - * @memberof ListFcpmV2ComputePools200Response - */ - metadata: FcpmV2ComputePoolListMetadata; - /** - * - * @type {Array} - * @memberof ListFcpmV2ComputePools200Response - */ - data: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ListFcpmV2ComputePools200Response + */ + readonly api_version: ListFcpmV2ComputePools200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ListFcpmV2ComputePools200Response + */ + readonly kind: ListFcpmV2ComputePools200ResponseKindEnum; + /** + * + * @type {FcpmV2ComputePoolListMetadata} + * @memberof ListFcpmV2ComputePools200Response + */ + metadata: FcpmV2ComputePoolListMetadata; + /** + * + * @type {Array} + * @memberof ListFcpmV2ComputePools200Response + */ + data: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ListFcpmV2ComputePools200ResponseApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ListFcpmV2ComputePools200ResponseKindEnum { - ComputePoolList = 'ComputePoolList' + ComputePoolList = "ComputePoolList", } - /** * Check if a given object implements the ListFcpmV2ComputePools200Response interface. */ -export function instanceOfListFcpmV2ComputePools200Response(value: object): value is ListFcpmV2ComputePools200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfListFcpmV2ComputePools200Response( + value: object, +): value is ListFcpmV2ComputePools200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function ListFcpmV2ComputePools200ResponseFromJSON(json: any): ListFcpmV2ComputePools200Response { - return ListFcpmV2ComputePools200ResponseFromJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseFromJSON( + json: any, +): ListFcpmV2ComputePools200Response { + return ListFcpmV2ComputePools200ResponseFromJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFcpmV2ComputePools200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': FcpmV2ComputePoolListMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON)), - }; +export function ListFcpmV2ComputePools200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListFcpmV2ComputePools200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: FcpmV2ComputePoolListMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON), + }; } -export function ListFcpmV2ComputePools200ResponseToJSON(json: any): ListFcpmV2ComputePools200Response { - return ListFcpmV2ComputePools200ResponseToJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseToJSON( + json: any, +): ListFcpmV2ComputePools200Response { + return ListFcpmV2ComputePools200ResponseToJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListFcpmV2ComputePools200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolListMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON)), - }; + return { + metadata: FcpmV2ComputePoolListMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON), + }; } - diff --git a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts index bbb2bc9268..cd0aa3a61e 100644 --- a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts +++ b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInner.ts @@ -5,69 +5,81 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; +import { mapValues } from "../runtime"; +import type { ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec } from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; import { - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, - ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, -} from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON, + ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped, +} from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; /** - * + * * @export * @interface ListFcpmV2ComputePools200ResponseAllOfDataInner */ export interface ListFcpmV2ComputePools200ResponseAllOfDataInner { - /** - * - * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} - * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInner - */ - spec?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; + /** + * + * @type {ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec} + * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInner + */ + spec?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec; } /** * Check if a given object implements the ListFcpmV2ComputePools200ResponseAllOfDataInner interface. */ -export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInner(value: object): value is ListFcpmV2ComputePools200ResponseAllOfDataInner { - return true; +export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInner( + value: object, +): value is ListFcpmV2ComputePools200ResponseAllOfDataInner { + return true; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInner { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSON( + json: any, +): ListFcpmV2ComputePools200ResponseAllOfDataInner { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFcpmV2ComputePools200ResponseAllOfDataInner { - if (json == null) { - return json; - } - return { - - 'spec': json['spec'] == null ? undefined : ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json['spec']), - }; +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListFcpmV2ComputePools200ResponseAllOfDataInner { + if (json == null) { + return json; + } + return { + spec: + json["spec"] == null + ? undefined + : ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json["spec"]), + }; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInner { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSON( + json: any, +): ListFcpmV2ComputePools200ResponseAllOfDataInner { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped(value?: ListFcpmV2ComputePools200ResponseAllOfDataInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerToJSONTyped( + value?: ListFcpmV2ComputePools200ResponseAllOfDataInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'spec': ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value['spec']), - }; + return { + spec: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts index de53729c93..0501ef2df4 100644 --- a/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts +++ b/src/clients/flinkComputePool/models/ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec.ts @@ -5,69 +5,78 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec */ export interface ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - /** - * - * @type {any} - * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec - */ - environment?: any | null; - /** - * - * @type {any} - * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec - */ - network?: any | null; + /** + * + * @type {any} + * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec + */ + environment?: any | null; + /** + * + * @type {any} + * @memberof ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec + */ + network?: any | null; } /** * Check if a given object implements the ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec interface. */ -export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInnerSpec(value: object): value is ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - return true; +export function instanceOfListFcpmV2ComputePools200ResponseAllOfDataInnerSpec( + value: object, +): value is ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + return true; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSON( + json: any, +): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - if (json == null) { - return json; - } - return { - - 'environment': json['environment'] == null ? undefined : json['environment'], - 'network': json['network'] == null ? undefined : json['network'], - }; +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + if (json == null) { + return json; + } + return { + environment: json["environment"] == null ? undefined : json["environment"], + network: json["network"] == null ? undefined : json["network"], + }; } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON(json: any): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { - return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped(json, false); +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSON( + json: any, +): ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec { + return ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped(json, false); } -export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped(value?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListFcpmV2ComputePools200ResponseAllOfDataInnerSpecToJSONTyped( + value?: ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'environment': value['environment'], - 'network': value['network'], - }; + return { + environment: value["environment"], + network: value["network"], + }; } - diff --git a/src/clients/flinkComputePool/models/ListMeta.ts b/src/clients/flinkComputePool/models/ListMeta.ts index e2affd30f1..f82c218c2f 100644 --- a/src/clients/flinkComputePool/models/ListMeta.ts +++ b/src/clients/flinkComputePool/models/ListMeta.ts @@ -5,93 +5,93 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. - * @type {string} - * @memberof ListMeta - */ - first?: string | null; - /** - * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. - * @type {string} - * @memberof ListMeta - */ - last?: string | null; - /** - * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. - * @type {string} - * @memberof ListMeta - */ - prev?: string | null; - /** - * A link to the next page of results. If a response does not contain a next link, then there is no more data available. - * @type {string} - * @memberof ListMeta - */ - next?: string | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ListMeta - */ - total_size?: number; + /** + * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. + * @type {string} + * @memberof ListMeta + */ + first?: string | null; + /** + * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. + * @type {string} + * @memberof ListMeta + */ + last?: string | null; + /** + * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. + * @type {string} + * @memberof ListMeta + */ + prev?: string | null; + /** + * A link to the next page of results. If a response does not contain a next link, then there is no more data available. + * @type {string} + * @memberof ListMeta + */ + next?: string | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ListMeta + */ + total_size?: number; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped( + value?: ListMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/flinkComputePool/models/ModelError.ts b/src/clients/flinkComputePool/models/ModelError.ts index 729d09393d..feb9669fcb 100644 --- a/src/clients/flinkComputePool/models/ModelError.ts +++ b/src/clients/flinkComputePool/models/ModelError.ts @@ -5,21 +5,21 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorSource } from './ErrorSource'; +import { mapValues } from "../runtime"; +import type { ErrorSource } from "./ErrorSource"; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from './ErrorSource'; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from "./ErrorSource"; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'status': json['status'] == null ? undefined : json['status'], - 'code': json['code'] == null ? undefined : json['code'], - 'title': json['title'] == null ? undefined : json['title'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + status: json["status"] == null ? undefined : json["status"], + code: json["code"] == null ? undefined : json["code"], + title: json["title"] == null ? undefined : json["title"], + detail: json["detail"] == null ? undefined : json["detail"], + source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped( + value?: ModelError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'status': value['status'], - 'code': value['code'], - 'title': value['title'], - 'detail': value['detail'], - 'source': ErrorSourceToJSON(value['source']), - }; + return { + id: value["id"], + status: value["status"], + code: value["code"], + title: value["title"], + detail: value["detail"], + source: ErrorSourceToJSON(value["source"]), + }; } - diff --git a/src/clients/flinkComputePool/models/ObjectMeta.ts b/src/clients/flinkComputePool/models/ObjectMeta.ts index 19008bb09e..0c4d83d6ad 100644 --- a/src/clients/flinkComputePool/models/ObjectMeta.ts +++ b/src/clients/flinkComputePool/models/ObjectMeta.ts @@ -5,89 +5,91 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_name?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly deleted_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_name?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped( + value?: Omit< + ObjectMeta, + "self" | "resource_name" | "created_at" | "updated_at" | "deleted_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkComputePool/models/ObjectReference.ts b/src/clients/flinkComputePool/models/ObjectReference.ts index c818f9ec61..4dfde26dcb 100644 --- a/src/clients/flinkComputePool/models/ObjectReference.ts +++ b/src/clients/flinkComputePool/models/ObjectReference.ts @@ -5,100 +5,103 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface ObjectReference */ export interface ObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof ObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof ObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof ObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly resource_name: string; - /** - * API group and version of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly api_version?: string; - /** - * Kind of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly kind?: string; + /** + * ID of the referred resource + * @type {string} + * @memberof ObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof ObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof ObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly resource_name: string; + /** + * API group and version of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly api_version?: string; + /** + * Kind of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly kind?: string; } /** * Check if a given object implements the ObjectReference interface. */ export function instanceOfObjectReference(value: object): value is ObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function ObjectReferenceFromJSON(json: any): ObjectReference { - return ObjectReferenceFromJSONTyped(json, false); + return ObjectReferenceFromJSONTyped(json, false); } -export function ObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'related': json['related'], - 'resource_name': json['resource_name'], - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function ObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + environment: json["environment"] == null ? undefined : json["environment"], + related: json["related"], + resource_name: json["resource_name"], + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function ObjectReferenceToJSON(json: any): ObjectReference { - return ObjectReferenceToJSONTyped(json, false); + return ObjectReferenceToJSONTyped(json, false); } -export function ObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'environment': value['environment'], - }; + return { + id: value["id"], + environment: value["environment"], + }; } - diff --git a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts index 3a52adab2e..716d535030 100644 --- a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts +++ b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequest.ts @@ -5,137 +5,142 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { FcpmV2ComputePoolStatus } from './FcpmV2ComputePoolStatus'; +import { mapValues } from "../runtime"; +import type { FcpmV2ComputePoolStatus } from "./FcpmV2ComputePoolStatus"; import { - FcpmV2ComputePoolStatusFromJSON, - FcpmV2ComputePoolStatusFromJSONTyped, - FcpmV2ComputePoolStatusToJSON, - FcpmV2ComputePoolStatusToJSONTyped, -} from './FcpmV2ComputePoolStatus'; -import type { UpdateFcpmV2ComputePoolRequestAllOfSpec } from './UpdateFcpmV2ComputePoolRequestAllOfSpec'; + FcpmV2ComputePoolStatusFromJSON, + FcpmV2ComputePoolStatusFromJSONTyped, + FcpmV2ComputePoolStatusToJSON, + FcpmV2ComputePoolStatusToJSONTyped, +} from "./FcpmV2ComputePoolStatus"; +import type { UpdateFcpmV2ComputePoolRequestAllOfSpec } from "./UpdateFcpmV2ComputePoolRequestAllOfSpec"; import { - UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON, - UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, - UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON, - UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, -} from './UpdateFcpmV2ComputePoolRequestAllOfSpec'; -import type { FcpmV2ComputePoolMetadata } from './FcpmV2ComputePoolMetadata'; + UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON, + UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped, + UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON, + UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped, +} from "./UpdateFcpmV2ComputePoolRequestAllOfSpec"; +import type { FcpmV2ComputePoolMetadata } from "./FcpmV2ComputePoolMetadata"; import { - FcpmV2ComputePoolMetadataFromJSON, - FcpmV2ComputePoolMetadataFromJSONTyped, - FcpmV2ComputePoolMetadataToJSON, - FcpmV2ComputePoolMetadataToJSONTyped, -} from './FcpmV2ComputePoolMetadata'; + FcpmV2ComputePoolMetadataFromJSON, + FcpmV2ComputePoolMetadataFromJSONTyped, + FcpmV2ComputePoolMetadataToJSON, + FcpmV2ComputePoolMetadataToJSONTyped, +} from "./FcpmV2ComputePoolMetadata"; /** - * + * * @export * @interface UpdateFcpmV2ComputePoolRequest */ export interface UpdateFcpmV2ComputePoolRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - readonly api_version?: UpdateFcpmV2ComputePoolRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - readonly kind?: UpdateFcpmV2ComputePoolRequestKindEnum; - /** - * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). - * @type {string} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - readonly id?: string; - /** - * - * @type {FcpmV2ComputePoolMetadata} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - metadata?: FcpmV2ComputePoolMetadata; - /** - * - * @type {UpdateFcpmV2ComputePoolRequestAllOfSpec} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - spec: UpdateFcpmV2ComputePoolRequestAllOfSpec; - /** - * - * @type {FcpmV2ComputePoolStatus} - * @memberof UpdateFcpmV2ComputePoolRequest - */ - status?: FcpmV2ComputePoolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + readonly api_version?: UpdateFcpmV2ComputePoolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + readonly kind?: UpdateFcpmV2ComputePoolRequestKindEnum; + /** + * ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object `kinds` or objects of the same `kind` within a different scope/namespace ("space"). + * @type {string} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + readonly id?: string; + /** + * + * @type {FcpmV2ComputePoolMetadata} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + metadata?: FcpmV2ComputePoolMetadata; + /** + * + * @type {UpdateFcpmV2ComputePoolRequestAllOfSpec} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + spec: UpdateFcpmV2ComputePoolRequestAllOfSpec; + /** + * + * @type {FcpmV2ComputePoolStatus} + * @memberof UpdateFcpmV2ComputePoolRequest + */ + status?: FcpmV2ComputePoolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateFcpmV2ComputePoolRequestApiVersionEnum { - FcpmV2 = 'fcpm/v2' + FcpmV2 = "fcpm/v2", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateFcpmV2ComputePoolRequestKindEnum { - ComputePool = 'ComputePool' + ComputePool = "ComputePool", } - /** * Check if a given object implements the UpdateFcpmV2ComputePoolRequest interface. */ -export function instanceOfUpdateFcpmV2ComputePoolRequest(value: object): value is UpdateFcpmV2ComputePoolRequest { - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfUpdateFcpmV2ComputePoolRequest( + value: object, +): value is UpdateFcpmV2ComputePoolRequest { + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function UpdateFcpmV2ComputePoolRequestFromJSON(json: any): UpdateFcpmV2ComputePoolRequest { - return UpdateFcpmV2ComputePoolRequestFromJSONTyped(json, false); + return UpdateFcpmV2ComputePoolRequestFromJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateFcpmV2ComputePoolRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'id': json['id'] == null ? undefined : json['id'], - 'metadata': json['metadata'] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json['metadata']), - 'spec': UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json['status']), - }; +export function UpdateFcpmV2ComputePoolRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateFcpmV2ComputePoolRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + id: json["id"] == null ? undefined : json["id"], + metadata: + json["metadata"] == null ? undefined : FcpmV2ComputePoolMetadataFromJSON(json["metadata"]), + spec: UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : FcpmV2ComputePoolStatusFromJSON(json["status"]), + }; } export function UpdateFcpmV2ComputePoolRequestToJSON(json: any): UpdateFcpmV2ComputePoolRequest { - return UpdateFcpmV2ComputePoolRequestToJSONTyped(json, false); + return UpdateFcpmV2ComputePoolRequestToJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateFcpmV2ComputePoolRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': FcpmV2ComputePoolMetadataToJSON(value['metadata']), - 'spec': UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON(value['spec']), - 'status': FcpmV2ComputePoolStatusToJSON(value['status']), - }; + return { + metadata: FcpmV2ComputePoolMetadataToJSON(value["metadata"]), + spec: UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON(value["spec"]), + status: FcpmV2ComputePoolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts index 99ada9403f..365d28f66f 100644 --- a/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts +++ b/src/clients/flinkComputePool/models/UpdateFcpmV2ComputePoolRequestAllOfSpec.ts @@ -5,62 +5,71 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UpdateFcpmV2ComputePoolRequestAllOfSpec */ export interface UpdateFcpmV2ComputePoolRequestAllOfSpec { - /** - * - * @type {any} - * @memberof UpdateFcpmV2ComputePoolRequestAllOfSpec - */ - environment: any | null; + /** + * + * @type {any} + * @memberof UpdateFcpmV2ComputePoolRequestAllOfSpec + */ + environment: any | null; } /** * Check if a given object implements the UpdateFcpmV2ComputePoolRequestAllOfSpec interface. */ -export function instanceOfUpdateFcpmV2ComputePoolRequestAllOfSpec(value: object): value is UpdateFcpmV2ComputePoolRequestAllOfSpec { - if (!('environment' in value) || value['environment'] === undefined) return false; - return true; +export function instanceOfUpdateFcpmV2ComputePoolRequestAllOfSpec( + value: object, +): value is UpdateFcpmV2ComputePoolRequestAllOfSpec { + if (!("environment" in value) || value["environment"] === undefined) return false; + return true; } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON(json: any): UpdateFcpmV2ComputePoolRequestAllOfSpec { - return UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); +export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSON( + json: any, +): UpdateFcpmV2ComputePoolRequestAllOfSpec { + return UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateFcpmV2ComputePoolRequestAllOfSpec { - if (json == null) { - return json; - } - return { - - 'environment': json['environment'], - }; +export function UpdateFcpmV2ComputePoolRequestAllOfSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateFcpmV2ComputePoolRequestAllOfSpec { + if (json == null) { + return json; + } + return { + environment: json["environment"], + }; } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON(json: any): UpdateFcpmV2ComputePoolRequestAllOfSpec { - return UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); +export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSON( + json: any, +): UpdateFcpmV2ComputePoolRequestAllOfSpec { + return UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(json, false); } -export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped(value?: UpdateFcpmV2ComputePoolRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateFcpmV2ComputePoolRequestAllOfSpecToJSONTyped( + value?: UpdateFcpmV2ComputePoolRequestAllOfSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'environment': value['environment'], - }; + return { + environment: value["environment"], + }; } - diff --git a/src/clients/flinkComputePool/models/index.ts b/src/clients/flinkComputePool/models/index.ts index e0a9098cb7..4fb7a2b982 100644 --- a/src/clients/flinkComputePool/models/index.ts +++ b/src/clients/flinkComputePool/models/index.ts @@ -1,31 +1,31 @@ /* tslint:disable */ /* eslint-disable */ -export * from './CreateFcpmV2ComputePool202Response'; -export * from './CreateFcpmV2ComputePoolRequest'; -export * from './CreateFcpmV2ComputePoolRequestAllOfSpec'; -export * from './EnvScopedObjectReference'; -export * from './ErrorSource'; -export * from './Failure'; -export * from './FcpmV2ComputePool'; -export * from './FcpmV2ComputePoolList'; -export * from './FcpmV2ComputePoolListDataInner'; -export * from './FcpmV2ComputePoolListMetadata'; -export * from './FcpmV2ComputePoolMetadata'; -export * from './FcpmV2ComputePoolSpec'; -export * from './FcpmV2ComputePoolStatus'; -export * from './FcpmV2Region'; -export * from './FcpmV2RegionList'; -export * from './FcpmV2RegionListDataInner'; -export * from './FcpmV2RegionListMetadata'; -export * from './FcpmV2RegionMetadata'; -export * from './GetFcpmV2ComputePool200Response'; -export * from './GlobalObjectReference'; -export * from './ListFcpmV2ComputePools200Response'; -export * from './ListFcpmV2ComputePools200ResponseAllOfDataInner'; -export * from './ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec'; -export * from './ListMeta'; -export * from './ModelError'; -export * from './ObjectMeta'; -export * from './ObjectReference'; -export * from './UpdateFcpmV2ComputePoolRequest'; -export * from './UpdateFcpmV2ComputePoolRequestAllOfSpec'; +export * from "./CreateFcpmV2ComputePool202Response"; +export * from "./CreateFcpmV2ComputePoolRequest"; +export * from "./CreateFcpmV2ComputePoolRequestAllOfSpec"; +export * from "./EnvScopedObjectReference"; +export * from "./ErrorSource"; +export * from "./Failure"; +export * from "./FcpmV2ComputePool"; +export * from "./FcpmV2ComputePoolList"; +export * from "./FcpmV2ComputePoolListDataInner"; +export * from "./FcpmV2ComputePoolListMetadata"; +export * from "./FcpmV2ComputePoolMetadata"; +export * from "./FcpmV2ComputePoolSpec"; +export * from "./FcpmV2ComputePoolStatus"; +export * from "./FcpmV2Region"; +export * from "./FcpmV2RegionList"; +export * from "./FcpmV2RegionListDataInner"; +export * from "./FcpmV2RegionListMetadata"; +export * from "./FcpmV2RegionMetadata"; +export * from "./GetFcpmV2ComputePool200Response"; +export * from "./GlobalObjectReference"; +export * from "./ListFcpmV2ComputePools200Response"; +export * from "./ListFcpmV2ComputePools200ResponseAllOfDataInner"; +export * from "./ListFcpmV2ComputePools200ResponseAllOfDataInnerSpec"; +export * from "./ListMeta"; +export * from "./ModelError"; +export * from "./ObjectMeta"; +export * from "./ObjectReference"; +export * from "./UpdateFcpmV2ComputePoolRequest"; +export * from "./UpdateFcpmV2ComputePoolRequestAllOfSpec"; diff --git a/src/clients/flinkComputePool/runtime.ts b/src/clients/flinkComputePool/runtime.ts index 8cb8b43b64..bde357f003 100644 --- a/src/clients/flinkComputePool/runtime.ts +++ b/src/clients/flinkComputePool/runtime.ts @@ -5,83 +5,85 @@ * This is the Flink Compute Pool management API. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://api.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/flinkSql/apis/AgentsSqlV1Api.ts b/src/clients/flinkSql/apis/AgentsSqlV1Api.ts index 4e9086717f..5ef5e7aa2e 100644 --- a/src/clients/flinkSql/apis/AgentsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/AgentsSqlV1Api.ts @@ -12,386 +12,533 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateSqlv1AgentRequest, Failure, SqlV1Agent, SqlV1AgentList, UpdateSqlv1AgentRequest, -} from '../models/index'; +} from "../models/index"; import { - CreateSqlv1AgentRequestFromJSON, - CreateSqlv1AgentRequestToJSON, - FailureFromJSON, - FailureToJSON, - SqlV1AgentFromJSON, - SqlV1AgentToJSON, - SqlV1AgentListFromJSON, - SqlV1AgentListToJSON, - UpdateSqlv1AgentRequestFromJSON, - UpdateSqlv1AgentRequestToJSON, -} from '../models/index'; + CreateSqlv1AgentRequestFromJSON, + CreateSqlv1AgentRequestToJSON, + FailureFromJSON, + FailureToJSON, + SqlV1AgentFromJSON, + SqlV1AgentToJSON, + SqlV1AgentListFromJSON, + SqlV1AgentListToJSON, + UpdateSqlv1AgentRequestFromJSON, + UpdateSqlv1AgentRequestToJSON, +} from "../models/index"; export interface CreateSqlv1AgentOperationRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - CreateSqlv1AgentRequest?: CreateSqlv1AgentRequest; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + CreateSqlv1AgentRequest?: CreateSqlv1AgentRequest; } export interface DeleteSqlv1AgentRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - agent_name: string; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; } export interface GetSqlv1AgentRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - agent_name: string; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; } export interface ListSqlv1AgentsRequest { - organization_id: string; - environment_id: string; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + page_size?: number; + page_token?: string; } export interface UpdateSqlv1AgentOperationRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - agent_name: string; - UpdateSqlv1AgentRequest: UpdateSqlv1AgentRequest; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; + UpdateSqlv1AgentRequest: UpdateSqlv1AgentRequest; } /** - * + * */ export class AgentsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. + * Create an Agent + */ + async createSqlv1AgentRaw( + requestParameters: CreateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1AgentRequestToJSON(requestParameters["CreateSqlv1AgentRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1AgentRequestFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. + * Create an Agent + */ + async createSqlv1Agent( + requestParameters: CreateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. + * Delete an Agent + */ + async deleteSqlv1AgentRaw( + requestParameters: DeleteSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + if (requestParameters["agent_name"] == null) { + throw new runtime.RequiredError( + "agent_name", + 'Required parameter "agent_name" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"agent_name"}}`, + encodeURIComponent(String(requestParameters["agent_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. + * Delete an Agent + */ + async deleteSqlv1Agent( + requestParameters: DeleteSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1AgentRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. + * Read an Agent + */ + async getSqlv1AgentRaw( + requestParameters: GetSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1Agent().', + ); + } + + if (requestParameters["agent_name"] == null) { + throw new runtime.RequiredError( + "agent_name", + 'Required parameter "agent_name" was null or undefined when calling getSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. - * Create an Agent - */ - async createSqlv1AgentRaw(requestParameters: CreateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling createSqlv1Agent().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling createSqlv1Agent().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1Agent().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1AgentRequestToJSON(requestParameters['CreateSqlv1AgentRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1AgentRequestFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. - * Create an Agent - */ - async createSqlv1Agent(requestParameters: CreateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createSqlv1AgentRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"agent_name"}}`, + encodeURIComponent(String(requestParameters["agent_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. + * Read an Agent + */ + async getSqlv1Agent( + requestParameters: GetSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. + * List all agents + */ + async listSqlv1AgentsRaw( + requestParameters: ListSqlv1AgentsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Agents().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Agents().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. - * Delete an Agent - */ - async deleteSqlv1AgentRaw(requestParameters: DeleteSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Agent().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Agent().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1Agent().' - ); - } - - if (requestParameters['agent_name'] == null) { - throw new runtime.RequiredError( - 'agent_name', - 'Required parameter "agent_name" was null or undefined when calling deleteSqlv1Agent().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"agent_name"}}`, encodeURIComponent(String(requestParameters['agent_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. - * Delete an Agent - */ - async deleteSqlv1Agent(requestParameters: DeleteSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteSqlv1AgentRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. - * Read an Agent - */ - async getSqlv1AgentRaw(requestParameters: GetSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1Agent().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1Agent().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1Agent().' - ); - } - - if (requestParameters['agent_name'] == null) { - throw new runtime.RequiredError( - 'agent_name', - 'Required parameter "agent_name" was null or undefined when calling getSqlv1Agent().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"agent_name"}}`, encodeURIComponent(String(requestParameters['agent_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/agents` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. + * List all agents + */ + async listSqlv1Agents( + requestParameters: ListSqlv1AgentsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1AgentsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. + * Alter an Agent + */ + async updateSqlv1AgentRaw( + requestParameters: UpdateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Agent().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. - * Read an Agent - */ - async getSqlv1Agent(requestParameters: GetSqlv1AgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1AgentRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Agent().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. - * List all agents - */ - async listSqlv1AgentsRaw(requestParameters: ListSqlv1AgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listSqlv1Agents().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listSqlv1Agents().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/agents`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentListFromJSON(jsonValue)); + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1Agent().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. - * List all agents - */ - async listSqlv1Agents(requestParameters: ListSqlv1AgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSqlv1AgentsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["agent_name"] == null) { + throw new runtime.RequiredError( + "agent_name", + 'Required parameter "agent_name" was null or undefined when calling updateSqlv1Agent().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. - * Alter an Agent - */ - async updateSqlv1AgentRaw(requestParameters: UpdateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Agent().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Agent().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1Agent().' - ); - } - - if (requestParameters['agent_name'] == null) { - throw new runtime.RequiredError( - 'agent_name', - 'Required parameter "agent_name" was null or undefined when calling updateSqlv1Agent().' - ); - } - - if (requestParameters['UpdateSqlv1AgentRequest'] == null) { - throw new runtime.RequiredError( - 'UpdateSqlv1AgentRequest', - 'Required parameter "UpdateSqlv1AgentRequest" was null or undefined when calling updateSqlv1Agent().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"agent_name"}}`, encodeURIComponent(String(requestParameters['agent_name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateSqlv1AgentRequestToJSON(requestParameters['UpdateSqlv1AgentRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + if (requestParameters["UpdateSqlv1AgentRequest"] == null) { + throw new runtime.RequiredError( + "UpdateSqlv1AgentRequest", + 'Required parameter "UpdateSqlv1AgentRequest" was null or undefined when calling updateSqlv1Agent().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. - * Alter an Agent - */ - async updateSqlv1Agent(requestParameters: UpdateSqlv1AgentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateSqlv1AgentRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"agent_name"}}`, + encodeURIComponent(String(requestParameters["agent_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1AgentRequestToJSON(requestParameters["UpdateSqlv1AgentRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. + * Alter an Agent + */ + async updateSqlv1Agent( + requestParameters: UpdateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts b/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts index b13be692ea..6a62d14616 100644 --- a/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts @@ -12,8 +12,7 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateSqlv1Connection201Response, CreateSqlv1ConnectionRequest, @@ -21,320 +20,441 @@ import type { GetSqlv1Connection200Response, SqlV1ConnectionList, UpdateSqlv1ConnectionRequest, -} from '../models/index'; +} from "../models/index"; import { - CreateSqlv1Connection201ResponseFromJSON, - CreateSqlv1Connection201ResponseToJSON, - CreateSqlv1ConnectionRequestFromJSON, - CreateSqlv1ConnectionRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetSqlv1Connection200ResponseFromJSON, - GetSqlv1Connection200ResponseToJSON, - SqlV1ConnectionListFromJSON, - SqlV1ConnectionListToJSON, - UpdateSqlv1ConnectionRequestFromJSON, - UpdateSqlv1ConnectionRequestToJSON, -} from '../models/index'; + CreateSqlv1Connection201ResponseFromJSON, + CreateSqlv1Connection201ResponseToJSON, + CreateSqlv1ConnectionRequestFromJSON, + CreateSqlv1ConnectionRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Connection200ResponseFromJSON, + GetSqlv1Connection200ResponseToJSON, + SqlV1ConnectionListFromJSON, + SqlV1ConnectionListToJSON, + UpdateSqlv1ConnectionRequestFromJSON, + UpdateSqlv1ConnectionRequestToJSON, +} from "../models/index"; export interface CreateSqlv1ConnectionOperationRequest { - organization_id: string; - environment_id: string; - CreateSqlv1ConnectionRequest?: CreateSqlv1ConnectionRequest; + organization_id: string; + environment_id: string; + CreateSqlv1ConnectionRequest?: CreateSqlv1ConnectionRequest; } export interface DeleteSqlv1ConnectionRequest { - organization_id: string; - environment_id: string; - connection_name: string; + organization_id: string; + environment_id: string; + connection_name: string; } export interface GetSqlv1ConnectionRequest { - organization_id: string; - environment_id: string; - connection_name: string; + organization_id: string; + environment_id: string; + connection_name: string; } export interface ListSqlv1ConnectionsRequest { - organization_id: string; - environment_id: string; - spec_connection_type?: string; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + spec_connection_type?: string; + page_size?: number; + page_token?: string; } export interface UpdateSqlv1ConnectionOperationRequest { - organization_id: string; - environment_id: string; - connection_name: string; - UpdateSqlv1ConnectionRequest?: UpdateSqlv1ConnectionRequest; + organization_id: string; + environment_id: string; + connection_name: string; + UpdateSqlv1ConnectionRequest?: UpdateSqlv1ConnectionRequest; } /** - * + * */ export class ConnectionsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. + * Create a Connection + */ + async createSqlv1ConnectionRaw( + requestParameters: CreateSqlv1ConnectionOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Connection().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Connection().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1ConnectionRequestToJSON(requestParameters["CreateSqlv1ConnectionRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1Connection201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. + * Create a Connection + */ + async createSqlv1Connection( + requestParameters: CreateSqlv1ConnectionOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1ConnectionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Connection + */ + async deleteSqlv1ConnectionRaw( + requestParameters: DeleteSqlv1ConnectionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Connection().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Connection().', + ); + } + + if (requestParameters["connection_name"] == null) { + throw new runtime.RequiredError( + "connection_name", + 'Required parameter "connection_name" was null or undefined when calling deleteSqlv1Connection().', + ); + } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. - * Create a Connection - */ - async createSqlv1ConnectionRaw(requestParameters: CreateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling createSqlv1Connection().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling createSqlv1Connection().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1ConnectionRequestToJSON(requestParameters['CreateSqlv1ConnectionRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1Connection201ResponseFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"connection_name"}}`, + encodeURIComponent(String(requestParameters["connection_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Connection + */ + async deleteSqlv1Connection( + requestParameters: DeleteSqlv1ConnectionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1ConnectionRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. + * Read a Connection + */ + async getSqlv1ConnectionRaw( + requestParameters: GetSqlv1ConnectionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Connection().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Connection. - * Create a Connection - */ - async createSqlv1Connection(requestParameters: CreateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createSqlv1ConnectionRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Connection().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Connection - */ - async deleteSqlv1ConnectionRaw(requestParameters: DeleteSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Connection().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Connection().' - ); - } - - if (requestParameters['connection_name'] == null) { - throw new runtime.RequiredError( - 'connection_name', - 'Required parameter "connection_name" was null or undefined when calling deleteSqlv1Connection().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"connection_name"}}`, encodeURIComponent(String(requestParameters['connection_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["connection_name"] == null) { + throw new runtime.RequiredError( + "connection_name", + 'Required parameter "connection_name" was null or undefined when calling getSqlv1Connection().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Connection - */ - async deleteSqlv1Connection(requestParameters: DeleteSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteSqlv1ConnectionRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"connection_name"}}`, + encodeURIComponent(String(requestParameters["connection_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetSqlv1Connection200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. + * Read a Connection + */ + async getSqlv1Connection( + requestParameters: GetSqlv1ConnectionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1ConnectionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. + * List of Connections + */ + async listSqlv1ConnectionsRaw( + requestParameters: ListSqlv1ConnectionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Connections().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. - * Read a Connection - */ - async getSqlv1ConnectionRaw(requestParameters: GetSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1Connection().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1Connection().' - ); - } - - if (requestParameters['connection_name'] == null) { - throw new runtime.RequiredError( - 'connection_name', - 'Required parameter "connection_name" was null or undefined when calling getSqlv1Connection().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"connection_name"}}`, encodeURIComponent(String(requestParameters['connection_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1Connection200ResponseFromJSON(jsonValue)); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Connections().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Connection. - * Read a Connection - */ - async getSqlv1Connection(requestParameters: GetSqlv1ConnectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1ConnectionRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["spec_connection_type"] != null) { + queryParameters["spec.connection_type"] = requestParameters["spec_connection_type"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. - * List of Connections - */ - async listSqlv1ConnectionsRaw(requestParameters: ListSqlv1ConnectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listSqlv1Connections().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listSqlv1Connections().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['spec_connection_type'] != null) { - queryParameters['spec.connection_type'] = requestParameters['spec_connection_type']; - } - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1ConnectionListFromJSON(jsonValue)); + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. - * List of Connections - */ - async listSqlv1Connections(requestParameters: ListSqlv1ConnectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSqlv1ConnectionsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. - * Update a Connection - */ - async updateSqlv1ConnectionRaw(requestParameters: UpdateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Connection().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Connection().' - ); - } - - if (requestParameters['connection_name'] == null) { - throw new runtime.RequiredError( - 'connection_name', - 'Required parameter "connection_name" was null or undefined when calling updateSqlv1Connection().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"connection_name"}}`, encodeURIComponent(String(requestParameters['connection_name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateSqlv1ConnectionRequestToJSON(requestParameters['UpdateSqlv1ConnectionRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1ConnectionListFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered and paginated list of all Connections. + * List of Connections + */ + async listSqlv1Connections( + requestParameters: ListSqlv1ConnectionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1ConnectionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. + * Update a Connection + */ + async updateSqlv1ConnectionRaw( + requestParameters: UpdateSqlv1ConnectionOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Connection().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Connection().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. - * Update a Connection - */ - async updateSqlv1Connection(requestParameters: UpdateSqlv1ConnectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateSqlv1ConnectionRaw(requestParameters, initOverrides); + if (requestParameters["connection_name"] == null) { + throw new runtime.RequiredError( + "connection_name", + 'Required parameter "connection_name" was null or undefined when calling updateSqlv1Connection().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/connections/{connection_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"connection_name"}}`, + encodeURIComponent(String(requestParameters["connection_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1ConnectionRequestToJSON(requestParameters["UpdateSqlv1ConnectionRequest"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a connection. + * Update a Connection + */ + async updateSqlv1Connection( + requestParameters: UpdateSqlv1ConnectionOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateSqlv1ConnectionRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts b/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts index c47ca8a8ab..05188114f4 100644 --- a/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts @@ -12,185 +12,254 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { Failure, SqlV1MaterializedTableVersion, SqlV1MaterializedTableVersionList, -} from '../models/index'; +} from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - SqlV1MaterializedTableVersionFromJSON, - SqlV1MaterializedTableVersionToJSON, - SqlV1MaterializedTableVersionListFromJSON, - SqlV1MaterializedTableVersionListToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + SqlV1MaterializedTableVersionFromJSON, + SqlV1MaterializedTableVersionToJSON, + SqlV1MaterializedTableVersionListFromJSON, + SqlV1MaterializedTableVersionListToJSON, +} from "../models/index"; export interface GetSqlv1MaterializedTableVersionRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - table_name: string; - version: number; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + version: number; } export interface ListSqlv1MaterializedTableVersionsRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - table_name: string; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class MaterializedTableVersionsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. + * Read a materialized table version + */ + async getSqlv1MaterializedTableVersionRaw( + requestParameters: GetSqlv1MaterializedTableVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. - * Read a materialized table version - */ - async getSqlv1MaterializedTableVersionRaw(requestParameters: GetSqlv1MaterializedTableVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTableVersion().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTableVersion().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTableVersion().' - ); - } - - if (requestParameters['table_name'] == null) { - throw new runtime.RequiredError( - 'table_name', - 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTableVersion().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling getSqlv1MaterializedTableVersion().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions/{version}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableVersionFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions/{version}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters["table_name"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. - * Read a materialized table version - */ - async getSqlv1MaterializedTableVersion(requestParameters: GetSqlv1MaterializedTableVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1MaterializedTableVersionRaw(requestParameters, initOverrides); - return await response.value(); + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableVersionFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. + * Read a materialized table version + */ + async getSqlv1MaterializedTableVersion( + requestParameters: GetSqlv1MaterializedTableVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1MaterializedTableVersionRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + * List all the versions of a materialized table + */ + async listSqlv1MaterializedTableVersionsRaw( + requestParameters: ListSqlv1MaterializedTableVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. - * List all the versions of a materialized table - */ - async listSqlv1MaterializedTableVersionsRaw(requestParameters: ListSqlv1MaterializedTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTableVersions().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTableVersions().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling listSqlv1MaterializedTableVersions().' - ); - } - - if (requestParameters['table_name'] == null) { - throw new runtime.RequiredError( - 'table_name', - 'Required parameter "table_name" was null or undefined when calling listSqlv1MaterializedTableVersions().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableVersionListFromJSON(jsonValue)); + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. - * List all the versions of a materialized table - */ - async listSqlv1MaterializedTableVersions(requestParameters: ListSqlv1MaterializedTableVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSqlv1MaterializedTableVersionsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); } + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableVersionListFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + * List all the versions of a materialized table + */ + async listSqlv1MaterializedTableVersions( + requestParameters: ListSqlv1MaterializedTableVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1MaterializedTableVersionsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts b/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts index a86f5ebf12..a9f8bd051d 100644 --- a/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts +++ b/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts @@ -12,8 +12,7 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateSqlv1MaterializedTable201Response, CreateSqlv1MaterializedTableRequest, @@ -21,380 +20,538 @@ import type { SqlV1MaterializedTable, SqlV1MaterializedTableList, UpdateSqlv1MaterializedTableRequest, -} from '../models/index'; +} from "../models/index"; import { - CreateSqlv1MaterializedTable201ResponseFromJSON, - CreateSqlv1MaterializedTable201ResponseToJSON, - CreateSqlv1MaterializedTableRequestFromJSON, - CreateSqlv1MaterializedTableRequestToJSON, - FailureFromJSON, - FailureToJSON, - SqlV1MaterializedTableFromJSON, - SqlV1MaterializedTableToJSON, - SqlV1MaterializedTableListFromJSON, - SqlV1MaterializedTableListToJSON, - UpdateSqlv1MaterializedTableRequestFromJSON, - UpdateSqlv1MaterializedTableRequestToJSON, -} from '../models/index'; + CreateSqlv1MaterializedTable201ResponseFromJSON, + CreateSqlv1MaterializedTable201ResponseToJSON, + CreateSqlv1MaterializedTableRequestFromJSON, + CreateSqlv1MaterializedTableRequestToJSON, + FailureFromJSON, + FailureToJSON, + SqlV1MaterializedTableFromJSON, + SqlV1MaterializedTableToJSON, + SqlV1MaterializedTableListFromJSON, + SqlV1MaterializedTableListToJSON, + UpdateSqlv1MaterializedTableRequestFromJSON, + UpdateSqlv1MaterializedTableRequestToJSON, +} from "../models/index"; export interface CreateSqlv1MaterializedTableOperationRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - CreateSqlv1MaterializedTableRequest?: CreateSqlv1MaterializedTableRequest; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + CreateSqlv1MaterializedTableRequest?: CreateSqlv1MaterializedTableRequest; } export interface DeleteSqlv1MaterializedTableRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - table_name: string; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; } export interface GetSqlv1MaterializedTableRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - table_name: string; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; } export interface ListSqlv1MaterializedTablesRequest { - organization_id: string; - environment_id: string; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + page_size?: number; + page_token?: string; } export interface UpdateSqlv1MaterializedTableOperationRequest { - organization_id: string; - environment_id: string; - kafka_cluster_id: string; - table_name: string; - UpdateSqlv1MaterializedTableRequest: UpdateSqlv1MaterializedTableRequest; + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + UpdateSqlv1MaterializedTableRequest: UpdateSqlv1MaterializedTableRequest; } /** - * + * */ export class MaterializedTablesSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. + * Create a materialized table + */ + async createSqlv1MaterializedTableRaw( + requestParameters: CreateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1MaterializedTableRequestToJSON( + requestParameters["CreateSqlv1MaterializedTableRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1MaterializedTable201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. + * Create a materialized table + */ + async createSqlv1MaterializedTable( + requestParameters: CreateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. + * Delete a materialized table + */ + async deleteSqlv1MaterializedTableRaw( + requestParameters: DeleteSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. + * Delete a materialized table + */ + async deleteSqlv1MaterializedTable( + requestParameters: DeleteSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1MaterializedTableRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. + * Read a materialized table + */ + async getSqlv1MaterializedTableRaw( + requestParameters: GetSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. - * Create a materialized table - */ - async createSqlv1MaterializedTableRaw(requestParameters: CreateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling createSqlv1MaterializedTable().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling createSqlv1MaterializedTable().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1MaterializedTable().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1MaterializedTableRequestToJSON(requestParameters['CreateSqlv1MaterializedTableRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1MaterializedTable201ResponseFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. - * Create a materialized table - */ - async createSqlv1MaterializedTable(requestParameters: CreateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createSqlv1MaterializedTableRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. + * Read a materialized table + */ + async getSqlv1MaterializedTable( + requestParameters: GetSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. + * List all materialized tables + */ + async listSqlv1MaterializedTablesRaw( + requestParameters: ListSqlv1MaterializedTablesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTables().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTables().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. - * Delete a materialized table - */ - async deleteSqlv1MaterializedTableRaw(requestParameters: DeleteSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1MaterializedTable().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1MaterializedTable().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1MaterializedTable().' - ); - } - - if (requestParameters['table_name'] == null) { - throw new runtime.RequiredError( - 'table_name', - 'Required parameter "table_name" was null or undefined when calling deleteSqlv1MaterializedTable().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. - * Delete a materialized table - */ - async deleteSqlv1MaterializedTable(requestParameters: DeleteSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteSqlv1MaterializedTableRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. - * Read a materialized table - */ - async getSqlv1MaterializedTableRaw(requestParameters: GetSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTable().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTable().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTable().' - ); - } - - if (requestParameters['table_name'] == null) { - throw new runtime.RequiredError( - 'table_name', - 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTable().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/materialized-tables` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableListFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. + * List all materialized tables + */ + async listSqlv1MaterializedTables( + requestParameters: ListSqlv1MaterializedTablesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1MaterializedTablesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + * Update/Evolve a materialized table + */ + async updateSqlv1MaterializedTableRaw( + requestParameters: UpdateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1MaterializedTable().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. - * Read a materialized table - */ - async getSqlv1MaterializedTable(requestParameters: GetSqlv1MaterializedTableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1MaterializedTableRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1MaterializedTable().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. - * List all materialized tables - */ - async listSqlv1MaterializedTablesRaw(requestParameters: ListSqlv1MaterializedTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTables().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTables().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/materialized-tables`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableListFromJSON(jsonValue)); + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1MaterializedTable().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. - * List all materialized tables - */ - async listSqlv1MaterializedTables(requestParameters: ListSqlv1MaterializedTablesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSqlv1MaterializedTablesRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling updateSqlv1MaterializedTable().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. - * Update/Evolve a materialized table - */ - async updateSqlv1MaterializedTableRaw(requestParameters: UpdateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling updateSqlv1MaterializedTable().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling updateSqlv1MaterializedTable().' - ); - } - - if (requestParameters['kafka_cluster_id'] == null) { - throw new runtime.RequiredError( - 'kafka_cluster_id', - 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1MaterializedTable().' - ); - } - - if (requestParameters['table_name'] == null) { - throw new runtime.RequiredError( - 'table_name', - 'Required parameter "table_name" was null or undefined when calling updateSqlv1MaterializedTable().' - ); - } - - if (requestParameters['UpdateSqlv1MaterializedTableRequest'] == null) { - throw new runtime.RequiredError( - 'UpdateSqlv1MaterializedTableRequest', - 'Required parameter "UpdateSqlv1MaterializedTableRequest" was null or undefined when calling updateSqlv1MaterializedTable().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"kafka_cluster_id"}}`, encodeURIComponent(String(requestParameters['kafka_cluster_id']))).replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters['table_name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateSqlv1MaterializedTableRequestToJSON(requestParameters['UpdateSqlv1MaterializedTableRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1MaterializedTableFromJSON(jsonValue)); + if (requestParameters["UpdateSqlv1MaterializedTableRequest"] == null) { + throw new runtime.RequiredError( + "UpdateSqlv1MaterializedTableRequest", + 'Required parameter "UpdateSqlv1MaterializedTableRequest" was null or undefined when calling updateSqlv1MaterializedTable().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. - * Update/Evolve a materialized table - */ - async updateSqlv1MaterializedTable(requestParameters: UpdateSqlv1MaterializedTableOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateSqlv1MaterializedTableRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1MaterializedTableRequestToJSON( + requestParameters["UpdateSqlv1MaterializedTableRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + * Update/Evolve a materialized table + */ + async updateSqlv1MaterializedTable( + requestParameters: UpdateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts index 4281aed52c..f889cff0e3 100644 --- a/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts @@ -12,85 +12,109 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - Failure, - SqlV1StatementExceptionList, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { Failure, SqlV1StatementExceptionList } from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - SqlV1StatementExceptionListFromJSON, - SqlV1StatementExceptionListToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + SqlV1StatementExceptionListFromJSON, + SqlV1StatementExceptionListToJSON, +} from "../models/index"; export interface GetSqlv1StatementExceptionsRequest { - organization_id: string; - environment_id: string; - statement_name: string; + organization_id: string; + environment_id: string; + statement_name: string; } /** - * + * */ export class StatementExceptionsSqlV1Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. + * List of Statement Exceptions + */ + async getSqlv1StatementExceptionsRaw( + requestParameters: GetSqlv1StatementExceptionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementExceptions().', + ); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. - * List of Statement Exceptions - */ - async getSqlv1StatementExceptionsRaw(requestParameters: GetSqlv1StatementExceptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementExceptions().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementExceptions().' - ); - } - - if (requestParameters['statement_name'] == null) { - throw new runtime.RequiredError( - 'statement_name', - 'Required parameter "statement_name" was null or undefined when calling getSqlv1StatementExceptions().' - ); - } - - const queryParameters: any = {}; + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementExceptions().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["statement_name"] == null) { + throw new runtime.RequiredError( + "statement_name", + 'Required parameter "statement_name" was null or undefined when calling getSqlv1StatementExceptions().', + ); + } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } + const queryParameters: any = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}/exceptions`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1StatementExceptionListFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. - * List of Statement Exceptions - */ - async getSqlv1StatementExceptions(requestParameters: GetSqlv1StatementExceptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1StatementExceptionsRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}/exceptions` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"statement_name"}}`, + encodeURIComponent(String(requestParameters["statement_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1StatementExceptionListFromJSON(jsonValue), + ); + } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a list of the 10 most recent statement exceptions. + * List of Statement Exceptions + */ + async getSqlv1StatementExceptions( + requestParameters: GetSqlv1StatementExceptionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1StatementExceptionsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts index 82c7988a6d..fcadd8ed9a 100644 --- a/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts @@ -12,90 +12,111 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - Failure, - GetSqlv1StatementResult200Response, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { Failure, GetSqlv1StatementResult200Response } from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - GetSqlv1StatementResult200ResponseFromJSON, - GetSqlv1StatementResult200ResponseToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + GetSqlv1StatementResult200ResponseFromJSON, + GetSqlv1StatementResult200ResponseToJSON, +} from "../models/index"; export interface GetSqlv1StatementResultRequest { - organization_id: string; - environment_id: string; - name: string; - page_token?: string; + organization_id: string; + environment_id: string; + name: string; + page_token?: string; } /** - * + * */ export class StatementResultsSqlV1Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. + * Read Statement Result + */ + async getSqlv1StatementResultRaw( + requestParameters: GetSqlv1StatementResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementResult().', + ); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. - * Read Statement Result - */ - async getSqlv1StatementResultRaw(requestParameters: GetSqlv1StatementResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1StatementResult().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementResult().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getSqlv1StatementResult().' - ); - } - - const queryParameters: any = {}; + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1StatementResult().', + ); + } - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getSqlv1StatementResult().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{name}/results`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1StatementResult200ResponseFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. - * Read Statement Result - */ - async getSqlv1StatementResult(requestParameters: GetSqlv1StatementResultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1StatementResultRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{name}/results` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetSqlv1StatementResult200ResponseFromJSON(jsonValue), + ); + } + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Read Statement Result. + * Read Statement Result + */ + async getSqlv1StatementResult( + requestParameters: GetSqlv1StatementResultRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1StatementResultRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkSql/apis/StatementsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementsSqlV1Api.ts index 2a8b83a7df..5651f06ef9 100644 --- a/src/clients/flinkSql/apis/StatementsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementsSqlV1Api.ts @@ -12,8 +12,7 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateSqlv1Statement201Response, CreateSqlv1StatementRequest, @@ -22,419 +21,585 @@ import type { PatchRequestInner, SqlV1StatementList, UpdateSqlv1StatementRequest, -} from '../models/index'; +} from "../models/index"; import { - CreateSqlv1Statement201ResponseFromJSON, - CreateSqlv1Statement201ResponseToJSON, - CreateSqlv1StatementRequestFromJSON, - CreateSqlv1StatementRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetSqlv1Statement200ResponseFromJSON, - GetSqlv1Statement200ResponseToJSON, - PatchRequestInnerFromJSON, - PatchRequestInnerToJSON, - SqlV1StatementListFromJSON, - SqlV1StatementListToJSON, - UpdateSqlv1StatementRequestFromJSON, - UpdateSqlv1StatementRequestToJSON, -} from '../models/index'; + CreateSqlv1Statement201ResponseFromJSON, + CreateSqlv1Statement201ResponseToJSON, + CreateSqlv1StatementRequestFromJSON, + CreateSqlv1StatementRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Statement200ResponseFromJSON, + GetSqlv1Statement200ResponseToJSON, + PatchRequestInnerFromJSON, + PatchRequestInnerToJSON, + SqlV1StatementListFromJSON, + SqlV1StatementListToJSON, + UpdateSqlv1StatementRequestFromJSON, + UpdateSqlv1StatementRequestToJSON, +} from "../models/index"; export interface CreateSqlv1StatementOperationRequest { - organization_id: string; - environment_id: string; - CreateSqlv1StatementRequest?: CreateSqlv1StatementRequest; + organization_id: string; + environment_id: string; + CreateSqlv1StatementRequest?: CreateSqlv1StatementRequest; } export interface DeleteSqlv1StatementRequest { - organization_id: string; - environment_id: string; - statement_name: string; + organization_id: string; + environment_id: string; + statement_name: string; } export interface GetSqlv1StatementRequest { - organization_id: string; - environment_id: string; - statement_name: string; + organization_id: string; + environment_id: string; + statement_name: string; } export interface ListSqlv1StatementsRequest { - organization_id: string; - environment_id: string; - spec_compute_pool_id?: string; - page_size?: number; - page_token?: string; - label_selector?: string; + organization_id: string; + environment_id: string; + spec_compute_pool_id?: string; + page_size?: number; + page_token?: string; + label_selector?: string; } export interface PatchSqlv1StatementRequest { - organization_id: string; - environment_id: string; - statement_name: string; - PatchRequestInner?: Array; + organization_id: string; + environment_id: string; + statement_name: string; + PatchRequestInner?: Array; } export interface UpdateSqlv1StatementOperationRequest { - organization_id: string; - environment_id: string; - statement_name: string; - UpdateSqlv1StatementRequest?: UpdateSqlv1StatementRequest; + organization_id: string; + environment_id: string; + statement_name: string; + UpdateSqlv1StatementRequest?: UpdateSqlv1StatementRequest; } /** - * + * */ export class StatementsSqlV1Api extends runtime.BaseAPI { + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. + * Create a Statement + */ + async createSqlv1StatementRaw( + requestParameters: CreateSqlv1StatementOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Statement().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Statement().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1StatementRequestToJSON(requestParameters["CreateSqlv1StatementRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1Statement201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. + * Create a Statement + */ + async createSqlv1Statement( + requestParameters: CreateSqlv1StatementOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1StatementRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Statement + */ + async deleteSqlv1StatementRaw( + requestParameters: DeleteSqlv1StatementRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Statement().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Statement().', + ); + } + + if (requestParameters["statement_name"] == null) { + throw new runtime.RequiredError( + "statement_name", + 'Required parameter "statement_name" was null or undefined when calling deleteSqlv1Statement().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"statement_name"}}`, + encodeURIComponent(String(requestParameters["statement_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. + * Delete a Statement + */ + async deleteSqlv1Statement( + requestParameters: DeleteSqlv1StatementRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1StatementRaw(requestParameters, initOverrides); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. + * Read a Statement + */ + async getSqlv1StatementRaw( + requestParameters: GetSqlv1StatementRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Statement().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Statement().', + ); + } + + if (requestParameters["statement_name"] == null) { + throw new runtime.RequiredError( + "statement_name", + 'Required parameter "statement_name" was null or undefined when calling getSqlv1Statement().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"statement_name"}}`, + encodeURIComponent(String(requestParameters["statement_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetSqlv1Statement200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. + * Read a Statement + */ + async getSqlv1Statement( + requestParameters: GetSqlv1StatementRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1StatementRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. + * List of Statements + */ + async listSqlv1StatementsRaw( + requestParameters: ListSqlv1StatementsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Statements().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Statements().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["spec_compute_pool_id"] != null) { + queryParameters["spec.compute_pool_id"] = requestParameters["spec_compute_pool_id"]; + } + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + if (requestParameters["label_selector"] != null) { + queryParameters["label_selector"] = requestParameters["label_selector"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1StatementListFromJSON(jsonValue), + ); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. + * List of Statements + */ + async listSqlv1Statements( + requestParameters: ListSqlv1StatementsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1StatementsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. + * Patch a Statement + */ + async patchSqlv1StatementRaw( + requestParameters: PatchSqlv1StatementRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling patchSqlv1Statement().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling patchSqlv1Statement().', + ); + } - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. - * Create a Statement - */ - async createSqlv1StatementRaw(requestParameters: CreateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling createSqlv1Statement().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling createSqlv1Statement().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1StatementRequestToJSON(requestParameters['CreateSqlv1StatementRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1Statement201ResponseFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a statement. - * Create a Statement - */ - async createSqlv1Statement(requestParameters: CreateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createSqlv1StatementRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Statement - */ - async deleteSqlv1StatementRaw(requestParameters: DeleteSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Statement().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Statement().' - ); - } - - if (requestParameters['statement_name'] == null) { - throw new runtime.RequiredError( - 'statement_name', - 'Required parameter "statement_name" was null or undefined when calling deleteSqlv1Statement().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a statement. - * Delete a Statement - */ - async deleteSqlv1Statement(requestParameters: DeleteSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteSqlv1StatementRaw(requestParameters, initOverrides); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. - * Read a Statement - */ - async getSqlv1StatementRaw(requestParameters: GetSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1Statement().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1Statement().' - ); - } - - if (requestParameters['statement_name'] == null) { - throw new runtime.RequiredError( - 'statement_name', - 'Required parameter "statement_name" was null or undefined when calling getSqlv1Statement().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1Statement200ResponseFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a statement. - * Read a Statement - */ - async getSqlv1Statement(requestParameters: GetSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1StatementRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. - * List of Statements - */ - async listSqlv1StatementsRaw(requestParameters: ListSqlv1StatementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listSqlv1Statements().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listSqlv1Statements().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['spec_compute_pool_id'] != null) { - queryParameters['spec.compute_pool_id'] = requestParameters['spec_compute_pool_id']; - } - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - if (requestParameters['label_selector'] != null) { - queryParameters['label_selector'] = requestParameters['label_selector']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1StatementListFromJSON(jsonValue)); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all statements. - * List of Statements - */ - async listSqlv1Statements(requestParameters: ListSqlv1StatementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSqlv1StatementsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. - * Patch a Statement - */ - async patchSqlv1StatementRaw(requestParameters: PatchSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling patchSqlv1Statement().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling patchSqlv1Statement().' - ); - } - - if (requestParameters['statement_name'] == null) { - throw new runtime.RequiredError( - 'statement_name', - 'Required parameter "statement_name" was null or undefined when calling patchSqlv1Statement().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json-patch+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: requestParameters['PatchRequestInner']!.map(PatchRequestInnerToJSON), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1Statement201ResponseFromJSON(jsonValue)); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. - * Patch a Statement - */ - async patchSqlv1Statement(requestParameters: PatchSqlv1StatementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.patchSqlv1StatementRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Statement - */ - async updateSqlv1StatementRaw(requestParameters: UpdateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Statement().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Statement().' - ); - } - - if (requestParameters['statement_name'] == null) { - throw new runtime.RequiredError( - 'statement_name', - 'Required parameter "statement_name" was null or undefined when calling updateSqlv1Statement().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"statement_name"}}`, encodeURIComponent(String(requestParameters['statement_name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateSqlv1StatementRequestToJSON(requestParameters['UpdateSqlv1StatementRequest']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Statement - */ - async updateSqlv1Statement(requestParameters: UpdateSqlv1StatementOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateSqlv1StatementRaw(requestParameters, initOverrides); + if (requestParameters["statement_name"] == null) { + throw new runtime.RequiredError( + "statement_name", + 'Required parameter "statement_name" was null or undefined when calling patchSqlv1Statement().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json-patch+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"statement_name"}}`, + encodeURIComponent(String(requestParameters["statement_name"])), + ), + method: "PATCH", + headers: headerParameters, + query: queryParameters, + body: requestParameters["PatchRequestInner"]!.map(PatchRequestInnerToJSON), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1Statement201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a statement. + * Patch a Statement + */ + async patchSqlv1Statement( + requestParameters: PatchSqlv1StatementRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.patchSqlv1StatementRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Statement + */ + async updateSqlv1StatementRaw( + requestParameters: UpdateSqlv1StatementOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Statement().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Statement().', + ); + } + + if (requestParameters["statement_name"] == null) { + throw new runtime.RequiredError( + "statement_name", + 'Required parameter "statement_name" was null or undefined when calling updateSqlv1Statement().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/statements/{statement_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"statement_name"}}`, + encodeURIComponent(String(requestParameters["statement_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1StatementRequestToJSON(requestParameters["UpdateSqlv1StatementRequest"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a statement. The request will fail with a 409 Conflict error if the Statement has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Statement + */ + async updateSqlv1Statement( + requestParameters: UpdateSqlv1StatementOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateSqlv1StatementRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/flinkSql/apis/ToolsSqlV1Api.ts b/src/clients/flinkSql/apis/ToolsSqlV1Api.ts index 58e340e55c..7f7fa16738 100644 --- a/src/clients/flinkSql/apis/ToolsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/ToolsSqlV1Api.ts @@ -12,281 +12,380 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateSqlv1ToolRequest, Failure, GetSqlv1Tool200Response, SqlV1ToolList, -} from '../models/index'; +} from "../models/index"; import { - CreateSqlv1ToolRequestFromJSON, - CreateSqlv1ToolRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetSqlv1Tool200ResponseFromJSON, - GetSqlv1Tool200ResponseToJSON, - SqlV1ToolListFromJSON, - SqlV1ToolListToJSON, -} from '../models/index'; + CreateSqlv1ToolRequestFromJSON, + CreateSqlv1ToolRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Tool200ResponseFromJSON, + GetSqlv1Tool200ResponseToJSON, + SqlV1ToolListFromJSON, + SqlV1ToolListToJSON, +} from "../models/index"; export interface CreateSqlv1ToolOperationRequest { - organization_id: string; - environment_id: string; - CreateSqlv1ToolRequest?: CreateSqlv1ToolRequest; + organization_id: string; + environment_id: string; + CreateSqlv1ToolRequest?: CreateSqlv1ToolRequest; } export interface DeleteSqlv1ToolRequest { - organization_id: string; - environment_id: string; - database_name: string; - tool_name: string; + organization_id: string; + environment_id: string; + database_name: string; + tool_name: string; } export interface GetSqlv1ToolRequest { - organization_id: string; - environment_id: string; - database_name: string; - tool_name: string; + organization_id: string; + environment_id: string; + database_name: string; + tool_name: string; } export interface ListSqlv1ToolsRequest { - organization_id: string; - environment_id: string; - database_name: string; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + database_name: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class ToolsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. + * Create a Tool + */ + async createSqlv1ToolRaw( + requestParameters: CreateSqlv1ToolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Tool().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Tool().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/tools` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1ToolRequestToJSON(requestParameters["CreateSqlv1ToolRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1ToolRequestFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. + * Create a Tool + */ + async createSqlv1Tool( + requestParameters: CreateSqlv1ToolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1ToolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. + * Delete a Tool + */ + async deleteSqlv1ToolRaw( + requestParameters: DeleteSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + if (requestParameters["database_name"] == null) { + throw new runtime.RequiredError( + "database_name", + 'Required parameter "database_name" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + if (requestParameters["tool_name"] == null) { + throw new runtime.RequiredError( + "tool_name", + 'Required parameter "tool_name" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"database_name"}}`, + encodeURIComponent(String(requestParameters["database_name"])), + ) + .replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters["tool_name"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. + * Delete a Tool + */ + async deleteSqlv1Tool( + requestParameters: DeleteSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1ToolRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. + * Read a Tool + */ + async getSqlv1ToolRaw( + requestParameters: GetSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Tool().', + ); + } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. - * Create a Tool - */ - async createSqlv1ToolRaw(requestParameters: CreateSqlv1ToolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling createSqlv1Tool().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling createSqlv1Tool().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/tools`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateSqlv1ToolRequestToJSON(requestParameters['CreateSqlv1ToolRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateSqlv1ToolRequestFromJSON(jsonValue)); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Tool().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. - * Create a Tool - */ - async createSqlv1Tool(requestParameters: CreateSqlv1ToolOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createSqlv1ToolRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["database_name"] == null) { + throw new runtime.RequiredError( + "database_name", + 'Required parameter "database_name" was null or undefined when calling getSqlv1Tool().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. - * Delete a Tool - */ - async deleteSqlv1ToolRaw(requestParameters: DeleteSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Tool().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Tool().' - ); - } - - if (requestParameters['database_name'] == null) { - throw new runtime.RequiredError( - 'database_name', - 'Required parameter "database_name" was null or undefined when calling deleteSqlv1Tool().' - ); - } - - if (requestParameters['tool_name'] == null) { - throw new runtime.RequiredError( - 'tool_name', - 'Required parameter "tool_name" was null or undefined when calling deleteSqlv1Tool().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"database_name"}}`, encodeURIComponent(String(requestParameters['database_name']))).replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters['tool_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["tool_name"] == null) { + throw new runtime.RequiredError( + "tool_name", + 'Required parameter "tool_name" was null or undefined when calling getSqlv1Tool().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. - * Delete a Tool - */ - async deleteSqlv1Tool(requestParameters: DeleteSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteSqlv1ToolRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"database_name"}}`, + encodeURIComponent(String(requestParameters["database_name"])), + ) + .replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters["tool_name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetSqlv1Tool200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. + * Read a Tool + */ + async getSqlv1Tool( + requestParameters: GetSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1ToolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. + * List of Tools + */ + async listSqlv1ToolsRaw( + requestParameters: ListSqlv1ToolsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Tools().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. - * Read a Tool - */ - async getSqlv1ToolRaw(requestParameters: GetSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getSqlv1Tool().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getSqlv1Tool().' - ); - } - - if (requestParameters['database_name'] == null) { - throw new runtime.RequiredError( - 'database_name', - 'Required parameter "database_name" was null or undefined when calling getSqlv1Tool().' - ); - } - - if (requestParameters['tool_name'] == null) { - throw new runtime.RequiredError( - 'tool_name', - 'Required parameter "tool_name" was null or undefined when calling getSqlv1Tool().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"database_name"}}`, encodeURIComponent(String(requestParameters['database_name']))).replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters['tool_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetSqlv1Tool200ResponseFromJSON(jsonValue)); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Tools().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. - * Read a Tool - */ - async getSqlv1Tool(requestParameters: GetSqlv1ToolRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSqlv1ToolRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["database_name"] == null) { + throw new runtime.RequiredError( + "database_name", + 'Required parameter "database_name" was null or undefined when calling listSqlv1Tools().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. - * List of Tools - */ - async listSqlv1ToolsRaw(requestParameters: ListSqlv1ToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listSqlv1Tools().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listSqlv1Tools().' - ); - } - - if (requestParameters['database_name'] == null) { - throw new runtime.RequiredError( - 'database_name', - 'Required parameter "database_name" was null or undefined when calling listSqlv1Tools().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"database_name"}}`, encodeURIComponent(String(requestParameters['database_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1ToolListFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. - * List of Tools - */ - async listSqlv1Tools(requestParameters: ListSqlv1ToolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSqlv1ToolsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"database_name"}}`, + encodeURIComponent(String(requestParameters["database_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1ToolListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. + * List of Tools + */ + async listSqlv1Tools( + requestParameters: ListSqlv1ToolsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1ToolsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkSql/apis/index.ts b/src/clients/flinkSql/apis/index.ts index 2041888bc8..a253b01d4f 100644 --- a/src/clients/flinkSql/apis/index.ts +++ b/src/clients/flinkSql/apis/index.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ -export * from './AgentsSqlV1Api'; -export * from './ConnectionsSqlV1Api'; -export * from './MaterializedTableVersionsSqlV1Api'; -export * from './MaterializedTablesSqlV1Api'; -export * from './StatementExceptionsSqlV1Api'; -export * from './StatementResultsSqlV1Api'; -export * from './StatementsSqlV1Api'; -export * from './ToolsSqlV1Api'; +export * from "./AgentsSqlV1Api"; +export * from "./ConnectionsSqlV1Api"; +export * from "./MaterializedTableVersionsSqlV1Api"; +export * from "./MaterializedTablesSqlV1Api"; +export * from "./StatementExceptionsSqlV1Api"; +export * from "./StatementResultsSqlV1Api"; +export * from "./StatementsSqlV1Api"; +export * from "./ToolsSqlV1Api"; diff --git a/src/clients/flinkSql/index.ts b/src/clients/flinkSql/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/flinkSql/index.ts +++ b/src/clients/flinkSql/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/flinkSql/models/ColumnDetails.ts b/src/clients/flinkSql/models/ColumnDetails.ts index 3a95e434a5..097b867e16 100644 --- a/src/clients/flinkSql/models/ColumnDetails.ts +++ b/src/clients/flinkSql/models/ColumnDetails.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { DataType } from './DataType'; +import { mapValues } from "../runtime"; +import type { DataType } from "./DataType"; import { - DataTypeFromJSON, - DataTypeFromJSONTyped, - DataTypeToJSON, - DataTypeToJSONTyped, -} from './DataType'; + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from "./DataType"; /** * A column in the results schema. @@ -27,57 +27,57 @@ import { * @interface ColumnDetails */ export interface ColumnDetails { - /** - * The name of the SQL table column. - * @type {string} - * @memberof ColumnDetails - */ - name: string; - /** - * JSON object in TableSchema format; describes the data returned by the results serving API. - * @type {DataType} - * @memberof ColumnDetails - */ - type: DataType; + /** + * The name of the SQL table column. + * @type {string} + * @memberof ColumnDetails + */ + name: string; + /** + * JSON object in TableSchema format; describes the data returned by the results serving API. + * @type {DataType} + * @memberof ColumnDetails + */ + type: DataType; } /** * Check if a given object implements the ColumnDetails interface. */ export function instanceOfColumnDetails(value: object): value is ColumnDetails { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + return true; } export function ColumnDetailsFromJSON(json: any): ColumnDetails { - return ColumnDetailsFromJSONTyped(json, false); + return ColumnDetailsFromJSONTyped(json, false); } export function ColumnDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ColumnDetails { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'type': DataTypeFromJSON(json['type']), - }; + if (json == null) { + return json; + } + return { + name: json["name"], + type: DataTypeFromJSON(json["type"]), + }; } export function ColumnDetailsToJSON(json: any): ColumnDetails { - return ColumnDetailsToJSONTyped(json, false); + return ColumnDetailsToJSONTyped(json, false); } -export function ColumnDetailsToJSONTyped(value?: ColumnDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ColumnDetailsToJSONTyped( + value?: ColumnDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'type': DataTypeToJSON(value['type']), - }; + return { + name: value["name"], + type: DataTypeToJSON(value["type"]), + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts b/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts index 5b144d46bc..d4f5dad67a 100644 --- a/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts @@ -12,143 +12,148 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1AgentMetadata } from './SqlV1AgentMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1AgentMetadata } from "./SqlV1AgentMetadata"; import { - SqlV1AgentMetadataFromJSON, - SqlV1AgentMetadataFromJSONTyped, - SqlV1AgentMetadataToJSON, - SqlV1AgentMetadataToJSONTyped, -} from './SqlV1AgentMetadata'; -import type { SqlV1AgentStatus } from './SqlV1AgentStatus'; + SqlV1AgentMetadataFromJSON, + SqlV1AgentMetadataFromJSONTyped, + SqlV1AgentMetadataToJSON, + SqlV1AgentMetadataToJSONTyped, +} from "./SqlV1AgentMetadata"; +import type { SqlV1AgentStatus } from "./SqlV1AgentStatus"; import { - SqlV1AgentStatusFromJSON, - SqlV1AgentStatusFromJSONTyped, - SqlV1AgentStatusToJSON, - SqlV1AgentStatusToJSONTyped, -} from './SqlV1AgentStatus'; + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from "./SqlV1AgentStatus"; /** - * + * * @export * @interface CreateSqlv1AgentRequest */ export interface CreateSqlv1AgentRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1AgentRequest - */ - readonly api_version: CreateSqlv1AgentRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1AgentRequest - */ - readonly kind: CreateSqlv1AgentRequestKindEnum; - /** - * - * @type {SqlV1AgentMetadata} - * @memberof CreateSqlv1AgentRequest - */ - metadata: SqlV1AgentMetadata; - /** - * The user-provided name of the agent, unique within this environment. - * @type {string} - * @memberof CreateSqlv1AgentRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1AgentRequest - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1AgentRequest - */ - readonly environment_id: string; - /** - * - * @type {object} - * @memberof CreateSqlv1AgentRequest - */ - spec: object; - /** - * - * @type {SqlV1AgentStatus} - * @memberof CreateSqlv1AgentRequest - */ - readonly status?: SqlV1AgentStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly api_version: CreateSqlv1AgentRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly kind: CreateSqlv1AgentRequestKindEnum; + /** + * + * @type {SqlV1AgentMetadata} + * @memberof CreateSqlv1AgentRequest + */ + metadata: SqlV1AgentMetadata; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1AgentRequest + */ + spec: object; + /** + * + * @type {SqlV1AgentStatus} + * @memberof CreateSqlv1AgentRequest + */ + readonly status?: SqlV1AgentStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1AgentRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1AgentRequestKindEnum { - Agent = 'Agent' + Agent = "Agent", } - /** * Check if a given object implements the CreateSqlv1AgentRequest interface. */ export function instanceOfCreateSqlv1AgentRequest(value: object): value is CreateSqlv1AgentRequest { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function CreateSqlv1AgentRequestFromJSON(json: any): CreateSqlv1AgentRequest { - return CreateSqlv1AgentRequestFromJSONTyped(json, false); + return CreateSqlv1AgentRequestFromJSONTyped(json, false); } -export function CreateSqlv1AgentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1AgentRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1AgentMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1AgentStatusFromJSON(json['status']), - }; +export function CreateSqlv1AgentRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1AgentRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1AgentMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1AgentStatusFromJSON(json["status"]), + }; } export function CreateSqlv1AgentRequestToJSON(json: any): CreateSqlv1AgentRequest { - return CreateSqlv1AgentRequestToJSONTyped(json, false); + return CreateSqlv1AgentRequestToJSONTyped(json, false); } -export function CreateSqlv1AgentRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1AgentRequestToJSONTyped( + value?: Omit< + CreateSqlv1AgentRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1AgentMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - }; + return { + metadata: SqlV1AgentMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts b/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts index cc27a1d74d..4165b79050 100644 --- a/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts @@ -12,124 +12,133 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from './SqlV1ConnectionStatus'; -import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from "./SqlV1ConnectionStatus"; +import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from './SqlV1ConnectionMetadata'; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from "./SqlV1ConnectionMetadata"; /** - * + * * @export * @interface CreateSqlv1Connection201Response */ export interface CreateSqlv1Connection201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1Connection201Response - */ - readonly api_version?: CreateSqlv1Connection201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1Connection201Response - */ - readonly kind?: CreateSqlv1Connection201ResponseKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof CreateSqlv1Connection201Response - */ - metadata?: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1Connection201Response - */ - name?: string; - /** - * - * @type {object} - * @memberof CreateSqlv1Connection201Response - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof CreateSqlv1Connection201Response - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1Connection201Response + */ + readonly api_version?: CreateSqlv1Connection201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1Connection201Response + */ + readonly kind?: CreateSqlv1Connection201ResponseKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof CreateSqlv1Connection201Response + */ + metadata?: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1Connection201Response + */ + name?: string; + /** + * + * @type {object} + * @memberof CreateSqlv1Connection201Response + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof CreateSqlv1Connection201Response + */ + status?: SqlV1ConnectionStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1Connection201ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1Connection201ResponseKindEnum { - Connection = 'Connection' + Connection = "Connection", } - /** * Check if a given object implements the CreateSqlv1Connection201Response interface. */ -export function instanceOfCreateSqlv1Connection201Response(value: object): value is CreateSqlv1Connection201Response { - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfCreateSqlv1Connection201Response( + value: object, +): value is CreateSqlv1Connection201Response { + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function CreateSqlv1Connection201ResponseFromJSON(json: any): CreateSqlv1Connection201Response { - return CreateSqlv1Connection201ResponseFromJSONTyped(json, false); +export function CreateSqlv1Connection201ResponseFromJSON( + json: any, +): CreateSqlv1Connection201Response { + return CreateSqlv1Connection201ResponseFromJSONTyped(json, false); } -export function CreateSqlv1Connection201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1Connection201Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), - }; +export function CreateSqlv1Connection201ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1Connection201Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), + }; } -export function CreateSqlv1Connection201ResponseToJSON(json: any): CreateSqlv1Connection201Response { - return CreateSqlv1Connection201ResponseToJSONTyped(json, false); +export function CreateSqlv1Connection201ResponseToJSON( + json: any, +): CreateSqlv1Connection201Response { + return CreateSqlv1Connection201ResponseToJSONTyped(json, false); } -export function CreateSqlv1Connection201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1Connection201ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ConnectionStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts b/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts index 12d61c48e4..ef9b8c0ae0 100644 --- a/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts @@ -12,125 +12,130 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from './SqlV1ConnectionStatus'; -import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from "./SqlV1ConnectionStatus"; +import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from './SqlV1ConnectionMetadata'; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from "./SqlV1ConnectionMetadata"; /** - * + * * @export * @interface CreateSqlv1ConnectionRequest */ export interface CreateSqlv1ConnectionRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1ConnectionRequest - */ - readonly api_version?: CreateSqlv1ConnectionRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1ConnectionRequest - */ - readonly kind?: CreateSqlv1ConnectionRequestKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof CreateSqlv1ConnectionRequest - */ - metadata?: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1ConnectionRequest - */ - name: string; - /** - * - * @type {object} - * @memberof CreateSqlv1ConnectionRequest - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof CreateSqlv1ConnectionRequest - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1ConnectionRequest + */ + readonly api_version?: CreateSqlv1ConnectionRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1ConnectionRequest + */ + readonly kind?: CreateSqlv1ConnectionRequestKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof CreateSqlv1ConnectionRequest + */ + metadata?: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1ConnectionRequest + */ + name: string; + /** + * + * @type {object} + * @memberof CreateSqlv1ConnectionRequest + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof CreateSqlv1ConnectionRequest + */ + status?: SqlV1ConnectionStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1ConnectionRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1ConnectionRequestKindEnum { - Connection = 'Connection' + Connection = "Connection", } - /** * Check if a given object implements the CreateSqlv1ConnectionRequest interface. */ -export function instanceOfCreateSqlv1ConnectionRequest(value: object): value is CreateSqlv1ConnectionRequest { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfCreateSqlv1ConnectionRequest( + value: object, +): value is CreateSqlv1ConnectionRequest { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function CreateSqlv1ConnectionRequestFromJSON(json: any): CreateSqlv1ConnectionRequest { - return CreateSqlv1ConnectionRequestFromJSONTyped(json, false); + return CreateSqlv1ConnectionRequestFromJSONTyped(json, false); } -export function CreateSqlv1ConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1ConnectionRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), - }; +export function CreateSqlv1ConnectionRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1ConnectionRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), + }; } export function CreateSqlv1ConnectionRequestToJSON(json: any): CreateSqlv1ConnectionRequest { - return CreateSqlv1ConnectionRequestToJSONTyped(json, false); + return CreateSqlv1ConnectionRequestToJSONTyped(json, false); } -export function CreateSqlv1ConnectionRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1ConnectionRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ConnectionStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts b/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts index 73a0396805..12bdff495c 100644 --- a/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts @@ -12,144 +12,155 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableMetadata } from './SqlV1MaterializedTableMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableMetadata } from "./SqlV1MaterializedTableMetadata"; import { - SqlV1MaterializedTableMetadataFromJSON, - SqlV1MaterializedTableMetadataFromJSONTyped, - SqlV1MaterializedTableMetadataToJSON, - SqlV1MaterializedTableMetadataToJSONTyped, -} from './SqlV1MaterializedTableMetadata'; -import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from "./SqlV1MaterializedTableMetadata"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; import { - SqlV1MaterializedTableStatusFromJSON, - SqlV1MaterializedTableStatusFromJSONTyped, - SqlV1MaterializedTableStatusToJSON, - SqlV1MaterializedTableStatusToJSONTyped, -} from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; /** - * + * * @export * @interface CreateSqlv1MaterializedTable201Response */ export interface CreateSqlv1MaterializedTable201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1MaterializedTable201Response - */ - readonly api_version: CreateSqlv1MaterializedTable201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1MaterializedTable201Response - */ - readonly kind: CreateSqlv1MaterializedTable201ResponseKindEnum; - /** - * - * @type {SqlV1MaterializedTableMetadata} - * @memberof CreateSqlv1MaterializedTable201Response - */ - metadata: SqlV1MaterializedTableMetadata; - /** - * The user-provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1MaterializedTable201Response - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1MaterializedTable201Response - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1MaterializedTable201Response - */ - readonly environment_id: string; - /** - * - * @type {object} - * @memberof CreateSqlv1MaterializedTable201Response - */ - spec: object; - /** - * - * @type {SqlV1MaterializedTableStatus} - * @memberof CreateSqlv1MaterializedTable201Response - */ - readonly status: SqlV1MaterializedTableStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly api_version: CreateSqlv1MaterializedTable201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly kind: CreateSqlv1MaterializedTable201ResponseKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof CreateSqlv1MaterializedTable201Response + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1MaterializedTable201Response + */ + spec: object; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly status: SqlV1MaterializedTableStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1MaterializedTable201ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1MaterializedTable201ResponseKindEnum { - MaterializedTable = 'MaterializedTable' + MaterializedTable = "MaterializedTable", } - /** * Check if a given object implements the CreateSqlv1MaterializedTable201Response interface. */ -export function instanceOfCreateSqlv1MaterializedTable201Response(value: object): value is CreateSqlv1MaterializedTable201Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfCreateSqlv1MaterializedTable201Response( + value: object, +): value is CreateSqlv1MaterializedTable201Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } -export function CreateSqlv1MaterializedTable201ResponseFromJSON(json: any): CreateSqlv1MaterializedTable201Response { - return CreateSqlv1MaterializedTable201ResponseFromJSONTyped(json, false); +export function CreateSqlv1MaterializedTable201ResponseFromJSON( + json: any, +): CreateSqlv1MaterializedTable201Response { + return CreateSqlv1MaterializedTable201ResponseFromJSONTyped(json, false); } -export function CreateSqlv1MaterializedTable201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1MaterializedTable201Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1MaterializedTableMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': json['spec'], - 'status': SqlV1MaterializedTableStatusFromJSON(json['status']), - }; +export function CreateSqlv1MaterializedTable201ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1MaterializedTable201Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; } -export function CreateSqlv1MaterializedTable201ResponseToJSON(json: any): CreateSqlv1MaterializedTable201Response { - return CreateSqlv1MaterializedTable201ResponseToJSONTyped(json, false); +export function CreateSqlv1MaterializedTable201ResponseToJSON( + json: any, +): CreateSqlv1MaterializedTable201Response { + return CreateSqlv1MaterializedTable201ResponseToJSONTyped(json, false); } -export function CreateSqlv1MaterializedTable201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1MaterializedTable201ResponseToJSONTyped( + value?: Omit< + CreateSqlv1MaterializedTable201Response, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1MaterializedTableMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - }; + return { + metadata: SqlV1MaterializedTableMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts b/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts index 6f98348956..29d9d43b34 100644 --- a/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts @@ -12,143 +12,155 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableMetadata } from './SqlV1MaterializedTableMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableMetadata } from "./SqlV1MaterializedTableMetadata"; import { - SqlV1MaterializedTableMetadataFromJSON, - SqlV1MaterializedTableMetadataFromJSONTyped, - SqlV1MaterializedTableMetadataToJSON, - SqlV1MaterializedTableMetadataToJSONTyped, -} from './SqlV1MaterializedTableMetadata'; -import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from "./SqlV1MaterializedTableMetadata"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; import { - SqlV1MaterializedTableStatusFromJSON, - SqlV1MaterializedTableStatusFromJSONTyped, - SqlV1MaterializedTableStatusToJSON, - SqlV1MaterializedTableStatusToJSONTyped, -} from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; /** - * + * * @export * @interface CreateSqlv1MaterializedTableRequest */ export interface CreateSqlv1MaterializedTableRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1MaterializedTableRequest - */ - readonly api_version: CreateSqlv1MaterializedTableRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1MaterializedTableRequest - */ - readonly kind: CreateSqlv1MaterializedTableRequestKindEnum; - /** - * - * @type {SqlV1MaterializedTableMetadata} - * @memberof CreateSqlv1MaterializedTableRequest - */ - metadata: SqlV1MaterializedTableMetadata; - /** - * The user-provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1MaterializedTableRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1MaterializedTableRequest - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1MaterializedTableRequest - */ - readonly environment_id: string; - /** - * - * @type {object} - * @memberof CreateSqlv1MaterializedTableRequest - */ - spec: object; - /** - * - * @type {SqlV1MaterializedTableStatus} - * @memberof CreateSqlv1MaterializedTableRequest - */ - readonly status?: SqlV1MaterializedTableStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly api_version: CreateSqlv1MaterializedTableRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly kind: CreateSqlv1MaterializedTableRequestKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof CreateSqlv1MaterializedTableRequest + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1MaterializedTableRequest + */ + spec: object; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly status?: SqlV1MaterializedTableStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1MaterializedTableRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1MaterializedTableRequestKindEnum { - MaterializedTable = 'MaterializedTable' + MaterializedTable = "MaterializedTable", } - /** * Check if a given object implements the CreateSqlv1MaterializedTableRequest interface. */ -export function instanceOfCreateSqlv1MaterializedTableRequest(value: object): value is CreateSqlv1MaterializedTableRequest { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfCreateSqlv1MaterializedTableRequest( + value: object, +): value is CreateSqlv1MaterializedTableRequest { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function CreateSqlv1MaterializedTableRequestFromJSON(json: any): CreateSqlv1MaterializedTableRequest { - return CreateSqlv1MaterializedTableRequestFromJSONTyped(json, false); +export function CreateSqlv1MaterializedTableRequestFromJSON( + json: any, +): CreateSqlv1MaterializedTableRequest { + return CreateSqlv1MaterializedTableRequestFromJSONTyped(json, false); } -export function CreateSqlv1MaterializedTableRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1MaterializedTableRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1MaterializedTableMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json['status']), - }; +export function CreateSqlv1MaterializedTableRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1MaterializedTableRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: + json["status"] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; } -export function CreateSqlv1MaterializedTableRequestToJSON(json: any): CreateSqlv1MaterializedTableRequest { - return CreateSqlv1MaterializedTableRequestToJSONTyped(json, false); +export function CreateSqlv1MaterializedTableRequestToJSON( + json: any, +): CreateSqlv1MaterializedTableRequest { + return CreateSqlv1MaterializedTableRequestToJSONTyped(json, false); } -export function CreateSqlv1MaterializedTableRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1MaterializedTableRequestToJSONTyped( + value?: Omit< + CreateSqlv1MaterializedTableRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1MaterializedTableMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - }; + return { + metadata: SqlV1MaterializedTableMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts b/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts index 871348fdf1..1ff2c48053 100644 --- a/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts @@ -12,156 +12,163 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from './SqlV1StatementMetadata'; -import type { SqlV1StatementResult } from './SqlV1StatementResult'; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from "./SqlV1StatementMetadata"; +import type { SqlV1StatementResult } from "./SqlV1StatementResult"; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from './SqlV1StatementResult'; -import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from "./SqlV1StatementResult"; +import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from './SqlV1StatementStatus'; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from "./SqlV1StatementStatus"; /** - * + * * @export * @interface CreateSqlv1Statement201Response */ export interface CreateSqlv1Statement201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - readonly api_version?: CreateSqlv1Statement201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - readonly kind?: CreateSqlv1Statement201ResponseKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof CreateSqlv1Statement201Response - */ - metadata?: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - name?: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1Statement201Response - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof CreateSqlv1Statement201Response - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof CreateSqlv1Statement201Response - */ - status: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof CreateSqlv1Statement201Response - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + readonly api_version?: CreateSqlv1Statement201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + readonly kind?: CreateSqlv1Statement201ResponseKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof CreateSqlv1Statement201Response + */ + metadata?: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + name?: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1Statement201Response + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof CreateSqlv1Statement201Response + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof CreateSqlv1Statement201Response + */ + status: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof CreateSqlv1Statement201Response + */ + result?: SqlV1StatementResult; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1Statement201ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1Statement201ResponseKindEnum { - Statement = 'Statement' + Statement = "Statement", } - /** * Check if a given object implements the CreateSqlv1Statement201Response interface. */ -export function instanceOfCreateSqlv1Statement201Response(value: object): value is CreateSqlv1Statement201Response { - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfCreateSqlv1Statement201Response( + value: object, +): value is CreateSqlv1Statement201Response { + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } -export function CreateSqlv1Statement201ResponseFromJSON(json: any): CreateSqlv1Statement201Response { - return CreateSqlv1Statement201ResponseFromJSONTyped(json, false); +export function CreateSqlv1Statement201ResponseFromJSON( + json: any, +): CreateSqlv1Statement201Response { + return CreateSqlv1Statement201ResponseFromJSONTyped(json, false); } -export function CreateSqlv1Statement201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1Statement201Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1StatementMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'spec': json['spec'], - 'status': SqlV1StatementStatusFromJSON(json['status']), - 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), - }; +export function CreateSqlv1Statement201ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1Statement201Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : SqlV1StatementMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + spec: json["spec"], + status: SqlV1StatementStatusFromJSON(json["status"]), + result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), + }; } export function CreateSqlv1Statement201ResponseToJSON(json: any): CreateSqlv1Statement201Response { - return CreateSqlv1Statement201ResponseToJSONTyped(json, false); + return CreateSqlv1Statement201ResponseToJSONTyped(json, false); } -export function CreateSqlv1Statement201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1Statement201ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), - 'name': value['name'], - 'organization_id': value['organization_id'], - 'environment_id': value['environment_id'], - 'spec': value['spec'], - 'status': SqlV1StatementStatusToJSON(value['status']), - 'result': SqlV1StatementResultToJSON(value['result']), - }; + return { + metadata: SqlV1StatementMetadataToJSON(value["metadata"]), + name: value["name"], + organization_id: value["organization_id"], + environment_id: value["environment_id"], + spec: value["spec"], + status: SqlV1StatementStatusToJSON(value["status"]), + result: SqlV1StatementResultToJSON(value["result"]), + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts b/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts index 2d55ca60fb..b8f33c8dbf 100644 --- a/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts @@ -12,156 +12,161 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from './SqlV1StatementMetadata'; -import type { SqlV1StatementResult } from './SqlV1StatementResult'; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from "./SqlV1StatementMetadata"; +import type { SqlV1StatementResult } from "./SqlV1StatementResult"; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from './SqlV1StatementResult'; -import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from "./SqlV1StatementResult"; +import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from './SqlV1StatementStatus'; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from "./SqlV1StatementStatus"; /** - * + * * @export * @interface CreateSqlv1StatementRequest */ export interface CreateSqlv1StatementRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - readonly api_version?: CreateSqlv1StatementRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - readonly kind?: CreateSqlv1StatementRequestKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof CreateSqlv1StatementRequest - */ - metadata?: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof CreateSqlv1StatementRequest - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof CreateSqlv1StatementRequest - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof CreateSqlv1StatementRequest - */ - status?: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof CreateSqlv1StatementRequest - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + readonly api_version?: CreateSqlv1StatementRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + readonly kind?: CreateSqlv1StatementRequestKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof CreateSqlv1StatementRequest + */ + metadata?: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1StatementRequest + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof CreateSqlv1StatementRequest + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof CreateSqlv1StatementRequest + */ + status?: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof CreateSqlv1StatementRequest + */ + result?: SqlV1StatementResult; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1StatementRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1StatementRequestKindEnum { - Statement = 'Statement' + Statement = "Statement", } - /** * Check if a given object implements the CreateSqlv1StatementRequest interface. */ -export function instanceOfCreateSqlv1StatementRequest(value: object): value is CreateSqlv1StatementRequest { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfCreateSqlv1StatementRequest( + value: object, +): value is CreateSqlv1StatementRequest { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function CreateSqlv1StatementRequestFromJSON(json: any): CreateSqlv1StatementRequest { - return CreateSqlv1StatementRequestFromJSONTyped(json, false); + return CreateSqlv1StatementRequestFromJSONTyped(json, false); } -export function CreateSqlv1StatementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1StatementRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1StatementMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1StatementStatusFromJSON(json['status']), - 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), - }; +export function CreateSqlv1StatementRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1StatementRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : SqlV1StatementMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1StatementStatusFromJSON(json["status"]), + result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), + }; } export function CreateSqlv1StatementRequestToJSON(json: any): CreateSqlv1StatementRequest { - return CreateSqlv1StatementRequestToJSONTyped(json, false); + return CreateSqlv1StatementRequestToJSONTyped(json, false); } -export function CreateSqlv1StatementRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1StatementRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), - 'name': value['name'], - 'organization_id': value['organization_id'], - 'environment_id': value['environment_id'], - 'spec': value['spec'], - 'status': SqlV1StatementStatusToJSON(value['status']), - 'result': SqlV1StatementResultToJSON(value['result']), - }; + return { + metadata: SqlV1StatementMetadataToJSON(value["metadata"]), + name: value["name"], + organization_id: value["organization_id"], + environment_id: value["environment_id"], + spec: value["spec"], + status: SqlV1StatementStatusToJSON(value["status"]), + result: SqlV1StatementResultToJSON(value["result"]), + }; } - diff --git a/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts b/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts index 9b4a1a1b9a..87b191ef14 100644 --- a/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts @@ -12,125 +12,127 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; import { - SqlV1ToolStatusFromJSON, - SqlV1ToolStatusFromJSONTyped, - SqlV1ToolStatusToJSON, - SqlV1ToolStatusToJSONTyped, -} from './SqlV1ToolStatus'; -import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; import { - SqlV1ToolMetadataFromJSON, - SqlV1ToolMetadataFromJSONTyped, - SqlV1ToolMetadataToJSON, - SqlV1ToolMetadataToJSONTyped, -} from './SqlV1ToolMetadata'; + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; /** - * + * * @export * @interface CreateSqlv1ToolRequest */ export interface CreateSqlv1ToolRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateSqlv1ToolRequest - */ - readonly api_version?: CreateSqlv1ToolRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateSqlv1ToolRequest - */ - readonly kind?: CreateSqlv1ToolRequestKindEnum; - /** - * - * @type {SqlV1ToolMetadata} - * @memberof CreateSqlv1ToolRequest - */ - metadata?: SqlV1ToolMetadata; - /** - * The user provided name of the tool, unique within this environment. - * @type {string} - * @memberof CreateSqlv1ToolRequest - */ - name: string; - /** - * - * @type {object} - * @memberof CreateSqlv1ToolRequest - */ - spec: object; - /** - * - * @type {SqlV1ToolStatus} - * @memberof CreateSqlv1ToolRequest - */ - status?: SqlV1ToolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + readonly api_version?: CreateSqlv1ToolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + readonly kind?: CreateSqlv1ToolRequestKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof CreateSqlv1ToolRequest + */ + metadata?: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + name: string; + /** + * + * @type {object} + * @memberof CreateSqlv1ToolRequest + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof CreateSqlv1ToolRequest + */ + status?: SqlV1ToolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1ToolRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateSqlv1ToolRequestKindEnum { - Tool = 'Tool' + Tool = "Tool", } - /** * Check if a given object implements the CreateSqlv1ToolRequest interface. */ export function instanceOfCreateSqlv1ToolRequest(value: object): value is CreateSqlv1ToolRequest { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function CreateSqlv1ToolRequestFromJSON(json: any): CreateSqlv1ToolRequest { - return CreateSqlv1ToolRequestFromJSONTyped(json, false); + return CreateSqlv1ToolRequestFromJSONTyped(json, false); } -export function CreateSqlv1ToolRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSqlv1ToolRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1ToolMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1ToolStatusFromJSON(json['status']), - }; +export function CreateSqlv1ToolRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1ToolRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"] == null ? undefined : SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ToolStatusFromJSON(json["status"]), + }; } export function CreateSqlv1ToolRequestToJSON(json: any): CreateSqlv1ToolRequest { - return CreateSqlv1ToolRequestToJSONTyped(json, false); + return CreateSqlv1ToolRequestToJSONTyped(json, false); } -export function CreateSqlv1ToolRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateSqlv1ToolRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ToolStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ToolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/DataType.ts b/src/clients/flinkSql/models/DataType.ts index 89b79a6892..f23448ffc9 100644 --- a/src/clients/flinkSql/models/DataType.ts +++ b/src/clients/flinkSql/models/DataType.ts @@ -12,152 +12,155 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { RowFieldType } from './RowFieldType'; +import { mapValues } from "../runtime"; +import type { RowFieldType } from "./RowFieldType"; import { - RowFieldTypeFromJSON, - RowFieldTypeFromJSONTyped, - RowFieldTypeToJSON, - RowFieldTypeToJSONTyped, -} from './RowFieldType'; + RowFieldTypeFromJSON, + RowFieldTypeFromJSONTyped, + RowFieldTypeToJSON, + RowFieldTypeToJSONTyped, +} from "./RowFieldType"; /** - * + * * @export * @interface DataType */ export interface DataType { - /** - * The data type of the column. - * @type {string} - * @memberof DataType - */ - type: string; - /** - * Indicates whether values in this column can be null. - * @type {boolean} - * @memberof DataType - */ - nullable: boolean; - /** - * The length of the data type. - * @type {number} - * @memberof DataType - */ - length?: number; - /** - * The precision of the data type. - * @type {number} - * @memberof DataType - */ - precision?: number; - /** - * The scale of the data type. - * @type {number} - * @memberof DataType - */ - scale?: number; - /** - * The type of the key in the data type (if applicable). - * @type {DataType} - * @memberof DataType - */ - key_type?: DataType; - /** - * The type of the value in the data type (if applicable). - * @type {DataType} - * @memberof DataType - */ - value_type?: DataType; - /** - * The type of the element in the data type (if applicable). - * @type {DataType} - * @memberof DataType - */ - element_type?: DataType; - /** - * The fields of the element in the data type (if applicable). - * @type {Array} - * @memberof DataType - */ - fields?: Array; - /** - * The resolution of the data type (if applicable). - * @type {string} - * @memberof DataType - */ - resolution?: string; - /** - * The fractional precision of the data type (if applicable). - * @type {number} - * @memberof DataType - */ - fractional_precision?: number; - /** - * The class name of the structured data type (if applicable). - * @type {string} - * @memberof DataType - */ - class_name?: string; + /** + * The data type of the column. + * @type {string} + * @memberof DataType + */ + type: string; + /** + * Indicates whether values in this column can be null. + * @type {boolean} + * @memberof DataType + */ + nullable: boolean; + /** + * The length of the data type. + * @type {number} + * @memberof DataType + */ + length?: number; + /** + * The precision of the data type. + * @type {number} + * @memberof DataType + */ + precision?: number; + /** + * The scale of the data type. + * @type {number} + * @memberof DataType + */ + scale?: number; + /** + * The type of the key in the data type (if applicable). + * @type {DataType} + * @memberof DataType + */ + key_type?: DataType; + /** + * The type of the value in the data type (if applicable). + * @type {DataType} + * @memberof DataType + */ + value_type?: DataType; + /** + * The type of the element in the data type (if applicable). + * @type {DataType} + * @memberof DataType + */ + element_type?: DataType; + /** + * The fields of the element in the data type (if applicable). + * @type {Array} + * @memberof DataType + */ + fields?: Array; + /** + * The resolution of the data type (if applicable). + * @type {string} + * @memberof DataType + */ + resolution?: string; + /** + * The fractional precision of the data type (if applicable). + * @type {number} + * @memberof DataType + */ + fractional_precision?: number; + /** + * The class name of the structured data type (if applicable). + * @type {string} + * @memberof DataType + */ + class_name?: string; } /** * Check if a given object implements the DataType interface. */ export function instanceOfDataType(value: object): value is DataType { - if (!('type' in value) || value['type'] === undefined) return false; - if (!('nullable' in value) || value['nullable'] === undefined) return false; - return true; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("nullable" in value) || value["nullable"] === undefined) return false; + return true; } export function DataTypeFromJSON(json: any): DataType { - return DataTypeFromJSONTyped(json, false); + return DataTypeFromJSONTyped(json, false); } export function DataTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataType { - if (json == null) { - return json; - } - return { - - 'type': json['type'], - 'nullable': json['nullable'], - 'length': json['length'] == null ? undefined : json['length'], - 'precision': json['precision'] == null ? undefined : json['precision'], - 'scale': json['scale'] == null ? undefined : json['scale'], - 'key_type': json['key_type'] == null ? undefined : DataTypeFromJSON(json['key_type']), - 'value_type': json['value_type'] == null ? undefined : DataTypeFromJSON(json['value_type']), - 'element_type': json['element_type'] == null ? undefined : DataTypeFromJSON(json['element_type']), - 'fields': json['fields'] == null ? undefined : ((json['fields'] as Array).map(RowFieldTypeFromJSON)), - 'resolution': json['resolution'] == null ? undefined : json['resolution'], - 'fractional_precision': json['fractional_precision'] == null ? undefined : json['fractional_precision'], - 'class_name': json['class_name'] == null ? undefined : json['class_name'], - }; + if (json == null) { + return json; + } + return { + type: json["type"], + nullable: json["nullable"], + length: json["length"] == null ? undefined : json["length"], + precision: json["precision"] == null ? undefined : json["precision"], + scale: json["scale"] == null ? undefined : json["scale"], + key_type: json["key_type"] == null ? undefined : DataTypeFromJSON(json["key_type"]), + value_type: json["value_type"] == null ? undefined : DataTypeFromJSON(json["value_type"]), + element_type: json["element_type"] == null ? undefined : DataTypeFromJSON(json["element_type"]), + fields: + json["fields"] == null ? undefined : (json["fields"] as Array).map(RowFieldTypeFromJSON), + resolution: json["resolution"] == null ? undefined : json["resolution"], + fractional_precision: + json["fractional_precision"] == null ? undefined : json["fractional_precision"], + class_name: json["class_name"] == null ? undefined : json["class_name"], + }; } export function DataTypeToJSON(json: any): DataType { - return DataTypeToJSONTyped(json, false); + return DataTypeToJSONTyped(json, false); } -export function DataTypeToJSONTyped(value?: DataType | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DataTypeToJSONTyped( + value?: DataType | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'nullable': value['nullable'], - 'length': value['length'], - 'precision': value['precision'], - 'scale': value['scale'], - 'key_type': DataTypeToJSON(value['key_type']), - 'value_type': DataTypeToJSON(value['value_type']), - 'element_type': DataTypeToJSON(value['element_type']), - 'fields': value['fields'] == null ? undefined : ((value['fields'] as Array).map(RowFieldTypeToJSON)), - 'resolution': value['resolution'], - 'fractional_precision': value['fractional_precision'], - 'class_name': value['class_name'], - }; + return { + type: value["type"], + nullable: value["nullable"], + length: value["length"], + precision: value["precision"], + scale: value["scale"], + key_type: DataTypeToJSON(value["key_type"]), + value_type: DataTypeToJSON(value["value_type"]), + element_type: DataTypeToJSON(value["element_type"]), + fields: + value["fields"] == null ? undefined : (value["fields"] as Array).map(RowFieldTypeToJSON), + resolution: value["resolution"], + fractional_precision: value["fractional_precision"], + class_name: value["class_name"], + }; } - diff --git a/src/clients/flinkSql/models/ErrorSource.ts b/src/clients/flinkSql/models/ErrorSource.ts index 867abe8a62..7d50c87736 100644 --- a/src/clients/flinkSql/models/ErrorSource.ts +++ b/src/clients/flinkSql/models/ErrorSource.ts @@ -12,62 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - - 'pointer': json['pointer'] == null ? undefined : json['pointer'], - 'parameter': json['parameter'] == null ? undefined : json['parameter'], - }; + if (json == null) { + return json; + } + return { + pointer: json["pointer"] == null ? undefined : json["pointer"], + parameter: json["parameter"] == null ? undefined : json["parameter"], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped( + value?: ErrorSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'pointer': value['pointer'], - 'parameter': value['parameter'], - }; + return { + pointer: value["pointer"], + parameter: value["parameter"], + }; } - diff --git a/src/clients/flinkSql/models/ExceptionListMeta.ts b/src/clients/flinkSql/models/ExceptionListMeta.ts index 82e0b5a2ad..3db1020f8b 100644 --- a/src/clients/flinkSql/models/ExceptionListMeta.ts +++ b/src/clients/flinkSql/models/ExceptionListMeta.ts @@ -12,54 +12,57 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ExceptionListMeta */ export interface ExceptionListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ExceptionListMeta - */ - self?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ExceptionListMeta + */ + self?: string; } /** * Check if a given object implements the ExceptionListMeta interface. */ export function instanceOfExceptionListMeta(value: object): value is ExceptionListMeta { - return true; + return true; } export function ExceptionListMetaFromJSON(json: any): ExceptionListMeta { - return ExceptionListMetaFromJSONTyped(json, false); + return ExceptionListMetaFromJSONTyped(json, false); } -export function ExceptionListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExceptionListMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - }; +export function ExceptionListMetaFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExceptionListMeta { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + }; } export function ExceptionListMetaToJSON(json: any): ExceptionListMeta { - return ExceptionListMetaToJSONTyped(json, false); + return ExceptionListMetaToJSONTyped(json, false); } -export function ExceptionListMetaToJSONTyped(value?: ExceptionListMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExceptionListMetaToJSONTyped( + value?: ExceptionListMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - }; + return { + self: value["self"], + }; } - diff --git a/src/clients/flinkSql/models/Failure.ts b/src/clients/flinkSql/models/Failure.ts index 9cb5185891..eade361496 100644 --- a/src/clients/flinkSql/models/Failure.ts +++ b/src/clients/flinkSql/models/Failure.ts @@ -12,55 +12,55 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!('errors' in value) || value['errors'] === undefined) return false; - return true; + if (!("errors" in value) || value["errors"] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - - 'errors': new Set(json['errors']), - }; + if (json == null) { + return json; + } + return { + errors: new Set(json["errors"]), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped( + value?: Failure | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'errors': Array.from(value['errors'] as Set), - }; + return { + errors: Array.from(value["errors"] as Set), + }; } - diff --git a/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts b/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts index 0066ed87ee..7428f814fe 100644 --- a/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts @@ -12,127 +12,131 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from './SqlV1ConnectionStatus'; -import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from "./SqlV1ConnectionStatus"; +import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from './SqlV1ConnectionMetadata'; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from "./SqlV1ConnectionMetadata"; /** - * + * * @export * @interface GetSqlv1Connection200Response */ export interface GetSqlv1Connection200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1Connection200Response - */ - readonly api_version: GetSqlv1Connection200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1Connection200Response - */ - readonly kind: GetSqlv1Connection200ResponseKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof GetSqlv1Connection200Response - */ - metadata: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof GetSqlv1Connection200Response - */ - name?: string; - /** - * - * @type {object} - * @memberof GetSqlv1Connection200Response - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof GetSqlv1Connection200Response - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Connection200Response + */ + readonly api_version: GetSqlv1Connection200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Connection200Response + */ + readonly kind: GetSqlv1Connection200ResponseKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof GetSqlv1Connection200Response + */ + metadata: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof GetSqlv1Connection200Response + */ + name?: string; + /** + * + * @type {object} + * @memberof GetSqlv1Connection200Response + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof GetSqlv1Connection200Response + */ + status?: SqlV1ConnectionStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1Connection200ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1Connection200ResponseKindEnum { - Connection = 'Connection' + Connection = "Connection", } - /** * Check if a given object implements the GetSqlv1Connection200Response interface. */ -export function instanceOfGetSqlv1Connection200Response(value: object): value is GetSqlv1Connection200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfGetSqlv1Connection200Response( + value: object, +): value is GetSqlv1Connection200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function GetSqlv1Connection200ResponseFromJSON(json: any): GetSqlv1Connection200Response { - return GetSqlv1Connection200ResponseFromJSONTyped(json, false); + return GetSqlv1Connection200ResponseFromJSONTyped(json, false); } -export function GetSqlv1Connection200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1Connection200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1ConnectionMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), - }; +export function GetSqlv1Connection200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetSqlv1Connection200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ConnectionMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), + }; } export function GetSqlv1Connection200ResponseToJSON(json: any): GetSqlv1Connection200Response { - return GetSqlv1Connection200ResponseToJSONTyped(json, false); + return GetSqlv1Connection200ResponseToJSONTyped(json, false); } -export function GetSqlv1Connection200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetSqlv1Connection200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ConnectionStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts b/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts index 34255f22d5..f3fff21df0 100644 --- a/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts @@ -12,159 +12,163 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from './SqlV1StatementMetadata'; -import type { SqlV1StatementResult } from './SqlV1StatementResult'; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from "./SqlV1StatementMetadata"; +import type { SqlV1StatementResult } from "./SqlV1StatementResult"; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from './SqlV1StatementResult'; -import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from "./SqlV1StatementResult"; +import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from './SqlV1StatementStatus'; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from "./SqlV1StatementStatus"; /** - * + * * @export * @interface GetSqlv1Statement200Response */ export interface GetSqlv1Statement200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - readonly api_version: GetSqlv1Statement200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - readonly kind: GetSqlv1Statement200ResponseKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof GetSqlv1Statement200Response - */ - metadata: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - name?: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof GetSqlv1Statement200Response - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof GetSqlv1Statement200Response - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof GetSqlv1Statement200Response - */ - status: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof GetSqlv1Statement200Response - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + readonly api_version: GetSqlv1Statement200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + readonly kind: GetSqlv1Statement200ResponseKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof GetSqlv1Statement200Response + */ + metadata: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + name?: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof GetSqlv1Statement200Response + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof GetSqlv1Statement200Response + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof GetSqlv1Statement200Response + */ + status: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof GetSqlv1Statement200Response + */ + result?: SqlV1StatementResult; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1Statement200ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1Statement200ResponseKindEnum { - Statement = 'Statement' + Statement = "Statement", } - /** * Check if a given object implements the GetSqlv1Statement200Response interface. */ -export function instanceOfGetSqlv1Statement200Response(value: object): value is GetSqlv1Statement200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfGetSqlv1Statement200Response( + value: object, +): value is GetSqlv1Statement200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } export function GetSqlv1Statement200ResponseFromJSON(json: any): GetSqlv1Statement200Response { - return GetSqlv1Statement200ResponseFromJSONTyped(json, false); + return GetSqlv1Statement200ResponseFromJSONTyped(json, false); } -export function GetSqlv1Statement200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1Statement200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1StatementMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'spec': json['spec'], - 'status': SqlV1StatementStatusFromJSON(json['status']), - 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), - }; +export function GetSqlv1Statement200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetSqlv1Statement200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1StatementMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + spec: json["spec"], + status: SqlV1StatementStatusFromJSON(json["status"]), + result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), + }; } export function GetSqlv1Statement200ResponseToJSON(json: any): GetSqlv1Statement200Response { - return GetSqlv1Statement200ResponseToJSONTyped(json, false); + return GetSqlv1Statement200ResponseToJSONTyped(json, false); } -export function GetSqlv1Statement200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetSqlv1Statement200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), - 'name': value['name'], - 'organization_id': value['organization_id'], - 'environment_id': value['environment_id'], - 'spec': value['spec'], - 'status': SqlV1StatementStatusToJSON(value['status']), - 'result': SqlV1StatementResultToJSON(value['result']), - }; + return { + metadata: SqlV1StatementMetadataToJSON(value["metadata"]), + name: value["name"], + organization_id: value["organization_id"], + environment_id: value["environment_id"], + spec: value["spec"], + status: SqlV1StatementStatusToJSON(value["status"]), + result: SqlV1StatementResultToJSON(value["result"]), + }; } - diff --git a/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts b/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts index cfd628a405..6def81789e 100644 --- a/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts @@ -12,106 +12,114 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResultListMeta } from './ResultListMeta'; +import { mapValues } from "../runtime"; +import type { ResultListMeta } from "./ResultListMeta"; import { - ResultListMetaFromJSON, - ResultListMetaFromJSONTyped, - ResultListMetaToJSON, - ResultListMetaToJSONTyped, -} from './ResultListMeta'; + ResultListMetaFromJSON, + ResultListMetaFromJSONTyped, + ResultListMetaToJSON, + ResultListMetaToJSONTyped, +} from "./ResultListMeta"; /** - * + * * @export * @interface GetSqlv1StatementResult200Response */ export interface GetSqlv1StatementResult200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1StatementResult200Response - */ - api_version: GetSqlv1StatementResult200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1StatementResult200Response - */ - kind: GetSqlv1StatementResult200ResponseKindEnum; - /** - * - * @type {ResultListMeta} - * @memberof GetSqlv1StatementResult200Response - */ - metadata: ResultListMeta; - /** - * - * @type {object} - * @memberof GetSqlv1StatementResult200Response - */ - results: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1StatementResult200Response + */ + api_version: GetSqlv1StatementResult200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1StatementResult200Response + */ + kind: GetSqlv1StatementResult200ResponseKindEnum; + /** + * + * @type {ResultListMeta} + * @memberof GetSqlv1StatementResult200Response + */ + metadata: ResultListMeta; + /** + * + * @type {object} + * @memberof GetSqlv1StatementResult200Response + */ + results: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1StatementResult200ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1StatementResult200ResponseKindEnum { - StatementResult = 'StatementResult' + StatementResult = "StatementResult", } - /** * Check if a given object implements the GetSqlv1StatementResult200Response interface. */ -export function instanceOfGetSqlv1StatementResult200Response(value: object): value is GetSqlv1StatementResult200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('results' in value) || value['results'] === undefined) return false; - return true; +export function instanceOfGetSqlv1StatementResult200Response( + value: object, +): value is GetSqlv1StatementResult200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("results" in value) || value["results"] === undefined) return false; + return true; } -export function GetSqlv1StatementResult200ResponseFromJSON(json: any): GetSqlv1StatementResult200Response { - return GetSqlv1StatementResult200ResponseFromJSONTyped(json, false); +export function GetSqlv1StatementResult200ResponseFromJSON( + json: any, +): GetSqlv1StatementResult200Response { + return GetSqlv1StatementResult200ResponseFromJSONTyped(json, false); } -export function GetSqlv1StatementResult200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1StatementResult200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ResultListMetaFromJSON(json['metadata']), - 'results': json['results'], - }; +export function GetSqlv1StatementResult200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetSqlv1StatementResult200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ResultListMetaFromJSON(json["metadata"]), + results: json["results"], + }; } -export function GetSqlv1StatementResult200ResponseToJSON(json: any): GetSqlv1StatementResult200Response { - return GetSqlv1StatementResult200ResponseToJSONTyped(json, false); +export function GetSqlv1StatementResult200ResponseToJSON( + json: any, +): GetSqlv1StatementResult200Response { + return GetSqlv1StatementResult200ResponseToJSONTyped(json, false); } -export function GetSqlv1StatementResult200ResponseToJSONTyped(value?: GetSqlv1StatementResult200Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetSqlv1StatementResult200ResponseToJSONTyped( + value?: GetSqlv1StatementResult200Response | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': ResultListMetaToJSON(value['metadata']), - 'results': value['results'], - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: ResultListMetaToJSON(value["metadata"]), + results: value["results"], + }; } - diff --git a/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts b/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts index b3202f7d2c..eb0c6b925d 100644 --- a/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts @@ -12,128 +12,130 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; import { - SqlV1ToolStatusFromJSON, - SqlV1ToolStatusFromJSONTyped, - SqlV1ToolStatusToJSON, - SqlV1ToolStatusToJSONTyped, -} from './SqlV1ToolStatus'; -import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; import { - SqlV1ToolMetadataFromJSON, - SqlV1ToolMetadataFromJSONTyped, - SqlV1ToolMetadataToJSON, - SqlV1ToolMetadataToJSONTyped, -} from './SqlV1ToolMetadata'; + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; /** - * + * * @export * @interface GetSqlv1Tool200Response */ export interface GetSqlv1Tool200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetSqlv1Tool200Response - */ - readonly api_version: GetSqlv1Tool200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetSqlv1Tool200Response - */ - readonly kind: GetSqlv1Tool200ResponseKindEnum; - /** - * - * @type {SqlV1ToolMetadata} - * @memberof GetSqlv1Tool200Response - */ - metadata: SqlV1ToolMetadata; - /** - * The user provided name of the tool, unique within this environment. - * @type {string} - * @memberof GetSqlv1Tool200Response - */ - name: string; - /** - * - * @type {object} - * @memberof GetSqlv1Tool200Response - */ - spec: object; - /** - * - * @type {SqlV1ToolStatus} - * @memberof GetSqlv1Tool200Response - */ - status?: SqlV1ToolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + readonly api_version: GetSqlv1Tool200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + readonly kind: GetSqlv1Tool200ResponseKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof GetSqlv1Tool200Response + */ + metadata: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + name: string; + /** + * + * @type {object} + * @memberof GetSqlv1Tool200Response + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof GetSqlv1Tool200Response + */ + status?: SqlV1ToolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1Tool200ResponseApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetSqlv1Tool200ResponseKindEnum { - Tool = 'Tool' + Tool = "Tool", } - /** * Check if a given object implements the GetSqlv1Tool200Response interface. */ export function instanceOfGetSqlv1Tool200Response(value: object): value is GetSqlv1Tool200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function GetSqlv1Tool200ResponseFromJSON(json: any): GetSqlv1Tool200Response { - return GetSqlv1Tool200ResponseFromJSONTyped(json, false); + return GetSqlv1Tool200ResponseFromJSONTyped(json, false); } -export function GetSqlv1Tool200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSqlv1Tool200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1ToolMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1ToolStatusFromJSON(json['status']), - }; +export function GetSqlv1Tool200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetSqlv1Tool200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ToolStatusFromJSON(json["status"]), + }; } export function GetSqlv1Tool200ResponseToJSON(json: any): GetSqlv1Tool200Response { - return GetSqlv1Tool200ResponseToJSONTyped(json, false); + return GetSqlv1Tool200ResponseToJSONTyped(json, false); } -export function GetSqlv1Tool200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetSqlv1Tool200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ToolStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ToolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts b/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts index 74177a1eed..8cfb72dde9 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts @@ -12,84 +12,88 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * This option is used to add or replace a value for a field * @export * @interface JsonPatchRequestAddReplace */ export interface JsonPatchRequestAddReplace { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestAddReplace - */ - path: string; - /** - * The value to add, replace or test. - * @type {any} - * @memberof JsonPatchRequestAddReplace - */ - value: any | null; - /** - * The operation to perform. - * @type {string} - * @memberof JsonPatchRequestAddReplace - */ - op: JsonPatchRequestAddReplaceOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestAddReplace + */ + path: string; + /** + * The value to add, replace or test. + * @type {any} + * @memberof JsonPatchRequestAddReplace + */ + value: any | null; + /** + * The operation to perform. + * @type {string} + * @memberof JsonPatchRequestAddReplace + */ + op: JsonPatchRequestAddReplaceOpEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum JsonPatchRequestAddReplaceOpEnum { - Add = 'ADD', - Replace = 'REPLACE', - Test = 'TEST' + Add = "ADD", + Replace = "REPLACE", + Test = "TEST", } - /** * Check if a given object implements the JsonPatchRequestAddReplace interface. */ -export function instanceOfJsonPatchRequestAddReplace(value: object): value is JsonPatchRequestAddReplace { - if (!('path' in value) || value['path'] === undefined) return false; - if (!('value' in value) || value['value'] === undefined) return false; - if (!('op' in value) || value['op'] === undefined) return false; - return true; +export function instanceOfJsonPatchRequestAddReplace( + value: object, +): value is JsonPatchRequestAddReplace { + if (!("path" in value) || value["path"] === undefined) return false; + if (!("value" in value) || value["value"] === undefined) return false; + if (!("op" in value) || value["op"] === undefined) return false; + return true; } export function JsonPatchRequestAddReplaceFromJSON(json: any): JsonPatchRequestAddReplace { - return JsonPatchRequestAddReplaceFromJSONTyped(json, false); + return JsonPatchRequestAddReplaceFromJSONTyped(json, false); } -export function JsonPatchRequestAddReplaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatchRequestAddReplace { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'value': json['value'], - 'op': json['op'], - }; +export function JsonPatchRequestAddReplaceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): JsonPatchRequestAddReplace { + if (json == null) { + return json; + } + return { + path: json["path"], + value: json["value"], + op: json["op"], + }; } export function JsonPatchRequestAddReplaceToJSON(json: any): JsonPatchRequestAddReplace { - return JsonPatchRequestAddReplaceToJSONTyped(json, false); + return JsonPatchRequestAddReplaceToJSONTyped(json, false); } -export function JsonPatchRequestAddReplaceToJSONTyped(value?: JsonPatchRequestAddReplace | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JsonPatchRequestAddReplaceToJSONTyped( + value?: JsonPatchRequestAddReplace | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'value': value['value'], - 'op': value['op'], - }; + return { + path: value["path"], + value: value["value"], + op: value["op"], + }; } - diff --git a/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts b/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts index 85e535984e..923c154125 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts @@ -12,83 +12,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * This option is used to move or copy a field * @export * @interface JsonPatchRequestMoveCopy */ export interface JsonPatchRequestMoveCopy { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestMoveCopy - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JsonPatchRequestMoveCopy - */ - op: JsonPatchRequestMoveCopyOpEnum; - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestMoveCopy - */ - from: string; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestMoveCopy + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JsonPatchRequestMoveCopy + */ + op: JsonPatchRequestMoveCopyOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestMoveCopy + */ + from: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum JsonPatchRequestMoveCopyOpEnum { - Move = 'MOVE', - Copy = 'COPY' + Move = "MOVE", + Copy = "COPY", } - /** * Check if a given object implements the JsonPatchRequestMoveCopy interface. */ -export function instanceOfJsonPatchRequestMoveCopy(value: object): value is JsonPatchRequestMoveCopy { - if (!('path' in value) || value['path'] === undefined) return false; - if (!('op' in value) || value['op'] === undefined) return false; - if (!('from' in value) || value['from'] === undefined) return false; - return true; +export function instanceOfJsonPatchRequestMoveCopy( + value: object, +): value is JsonPatchRequestMoveCopy { + if (!("path" in value) || value["path"] === undefined) return false; + if (!("op" in value) || value["op"] === undefined) return false; + if (!("from" in value) || value["from"] === undefined) return false; + return true; } export function JsonPatchRequestMoveCopyFromJSON(json: any): JsonPatchRequestMoveCopy { - return JsonPatchRequestMoveCopyFromJSONTyped(json, false); + return JsonPatchRequestMoveCopyFromJSONTyped(json, false); } -export function JsonPatchRequestMoveCopyFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatchRequestMoveCopy { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'op': json['op'], - 'from': json['from'], - }; +export function JsonPatchRequestMoveCopyFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): JsonPatchRequestMoveCopy { + if (json == null) { + return json; + } + return { + path: json["path"], + op: json["op"], + from: json["from"], + }; } export function JsonPatchRequestMoveCopyToJSON(json: any): JsonPatchRequestMoveCopy { - return JsonPatchRequestMoveCopyToJSONTyped(json, false); + return JsonPatchRequestMoveCopyToJSONTyped(json, false); } -export function JsonPatchRequestMoveCopyToJSONTyped(value?: JsonPatchRequestMoveCopy | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JsonPatchRequestMoveCopyToJSONTyped( + value?: JsonPatchRequestMoveCopy | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'op': value['op'], - 'from': value['from'], - }; + return { + path: value["path"], + op: value["op"], + from: value["from"], + }; } - diff --git a/src/clients/flinkSql/models/JsonPatchRequestRemove.ts b/src/clients/flinkSql/models/JsonPatchRequestRemove.ts index 49533d4bc1..e19c0a7fc3 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestRemove.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestRemove.ts @@ -12,73 +12,75 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * This option is used to remove a field * @export * @interface JsonPatchRequestRemove */ export interface JsonPatchRequestRemove { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JsonPatchRequestRemove - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JsonPatchRequestRemove - */ - op: JsonPatchRequestRemoveOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JsonPatchRequestRemove + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JsonPatchRequestRemove + */ + op: JsonPatchRequestRemoveOpEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum JsonPatchRequestRemoveOpEnum { - Remove = 'REMOVE' + Remove = "REMOVE", } - /** * Check if a given object implements the JsonPatchRequestRemove interface. */ export function instanceOfJsonPatchRequestRemove(value: object): value is JsonPatchRequestRemove { - if (!('path' in value) || value['path'] === undefined) return false; - if (!('op' in value) || value['op'] === undefined) return false; - return true; + if (!("path" in value) || value["path"] === undefined) return false; + if (!("op" in value) || value["op"] === undefined) return false; + return true; } export function JsonPatchRequestRemoveFromJSON(json: any): JsonPatchRequestRemove { - return JsonPatchRequestRemoveFromJSONTyped(json, false); + return JsonPatchRequestRemoveFromJSONTyped(json, false); } -export function JsonPatchRequestRemoveFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonPatchRequestRemove { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'op': json['op'], - }; +export function JsonPatchRequestRemoveFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): JsonPatchRequestRemove { + if (json == null) { + return json; + } + return { + path: json["path"], + op: json["op"], + }; } export function JsonPatchRequestRemoveToJSON(json: any): JsonPatchRequestRemove { - return JsonPatchRequestRemoveToJSONTyped(json, false); + return JsonPatchRequestRemoveToJSONTyped(json, false); } -export function JsonPatchRequestRemoveToJSONTyped(value?: JsonPatchRequestRemove | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JsonPatchRequestRemoveToJSONTyped( + value?: JsonPatchRequestRemove | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'op': value['op'], - }; + return { + path: value["path"], + op: value["op"], + }; } - diff --git a/src/clients/flinkSql/models/ListMeta.ts b/src/clients/flinkSql/models/ListMeta.ts index 9c41dd7033..cecf58eb2a 100644 --- a/src/clients/flinkSql/models/ListMeta.ts +++ b/src/clients/flinkSql/models/ListMeta.ts @@ -12,62 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ListMeta - */ - self?: string; - /** - * A URL that can be followed to get the next batch of results. - * @type {string} - * @memberof ListMeta - */ - next?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ListMeta + */ + self?: string; + /** + * A URL that can be followed to get the next batch of results. + * @type {string} + * @memberof ListMeta + */ + next?: string; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - }; + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped( + value?: ListMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - }; + return { + self: value["self"], + next: value["next"], + }; } - diff --git a/src/clients/flinkSql/models/ModelError.ts b/src/clients/flinkSql/models/ModelError.ts index cb2fc51636..b1e74df29c 100644 --- a/src/clients/flinkSql/models/ModelError.ts +++ b/src/clients/flinkSql/models/ModelError.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorSource } from './ErrorSource'; +import { mapValues } from "../runtime"; +import type { ErrorSource } from "./ErrorSource"; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from './ErrorSource'; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from "./ErrorSource"; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'status': json['status'] == null ? undefined : json['status'], - 'code': json['code'] == null ? undefined : json['code'], - 'title': json['title'] == null ? undefined : json['title'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + status: json["status"] == null ? undefined : json["status"], + code: json["code"] == null ? undefined : json["code"], + title: json["title"] == null ? undefined : json["title"], + detail: json["detail"] == null ? undefined : json["detail"], + source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped( + value?: ModelError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'status': value['status'], - 'code': value['code'], - 'title': value['title'], - 'detail': value['detail'], - 'source': ErrorSourceToJSON(value['source']), - }; + return { + id: value["id"], + status: value["status"], + code: value["code"], + title: value["title"], + detail: value["detail"], + source: ErrorSourceToJSON(value["source"]), + }; } - diff --git a/src/clients/flinkSql/models/ObjectMeta.ts b/src/clients/flinkSql/models/ObjectMeta.ts index 1c9c4119b6..15f8abe746 100644 --- a/src/clients/flinkSql/models/ObjectMeta.ts +++ b/src/clients/flinkSql/models/ObjectMeta.ts @@ -12,87 +12,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The metadata of the statement. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - self: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - updated_at?: Date; - /** - * A system generated globally unique identifier for this resource. - * @type {string} - * @memberof ObjectMeta - */ - uid?: string; - /** - * A system generated string that uniquely identifies the version of this resource. - * @type {string} - * @memberof ObjectMeta - */ - resource_version?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + self: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof ObjectMeta + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof ObjectMeta + */ + resource_version?: string; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - }; + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped(value?: ObjectMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped( + value?: ObjectMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + }; } - diff --git a/src/clients/flinkSql/models/PatchRequestInner.ts b/src/clients/flinkSql/models/PatchRequestInner.ts index 5b9bf140d6..a5c1169af1 100644 --- a/src/clients/flinkSql/models/PatchRequestInner.ts +++ b/src/clients/flinkSql/models/PatchRequestInner.ts @@ -12,75 +12,83 @@ * Do not edit the class manually. */ -import type { JsonPatchRequestAddReplace } from './JsonPatchRequestAddReplace'; +import type { JsonPatchRequestAddReplace } from "./JsonPatchRequestAddReplace"; import { - instanceOfJsonPatchRequestAddReplace, - JsonPatchRequestAddReplaceFromJSON, - JsonPatchRequestAddReplaceFromJSONTyped, - JsonPatchRequestAddReplaceToJSON, -} from './JsonPatchRequestAddReplace'; -import type { JsonPatchRequestMoveCopy } from './JsonPatchRequestMoveCopy'; + instanceOfJsonPatchRequestAddReplace, + JsonPatchRequestAddReplaceFromJSON, + JsonPatchRequestAddReplaceFromJSONTyped, + JsonPatchRequestAddReplaceToJSON, +} from "./JsonPatchRequestAddReplace"; +import type { JsonPatchRequestMoveCopy } from "./JsonPatchRequestMoveCopy"; import { - instanceOfJsonPatchRequestMoveCopy, - JsonPatchRequestMoveCopyFromJSON, - JsonPatchRequestMoveCopyFromJSONTyped, - JsonPatchRequestMoveCopyToJSON, -} from './JsonPatchRequestMoveCopy'; -import type { JsonPatchRequestRemove } from './JsonPatchRequestRemove'; + instanceOfJsonPatchRequestMoveCopy, + JsonPatchRequestMoveCopyFromJSON, + JsonPatchRequestMoveCopyFromJSONTyped, + JsonPatchRequestMoveCopyToJSON, +} from "./JsonPatchRequestMoveCopy"; +import type { JsonPatchRequestRemove } from "./JsonPatchRequestRemove"; import { - instanceOfJsonPatchRequestRemove, - JsonPatchRequestRemoveFromJSON, - JsonPatchRequestRemoveFromJSONTyped, - JsonPatchRequestRemoveToJSON, -} from './JsonPatchRequestRemove'; + instanceOfJsonPatchRequestRemove, + JsonPatchRequestRemoveFromJSON, + JsonPatchRequestRemoveFromJSONTyped, + JsonPatchRequestRemoveToJSON, +} from "./JsonPatchRequestRemove"; /** * @type PatchRequestInner - * + * * @export */ -export type PatchRequestInner = JsonPatchRequestAddReplace | JsonPatchRequestMoveCopy | JsonPatchRequestRemove; +export type PatchRequestInner = + | JsonPatchRequestAddReplace + | JsonPatchRequestMoveCopy + | JsonPatchRequestRemove; export function PatchRequestInnerFromJSON(json: any): PatchRequestInner { - return PatchRequestInnerFromJSONTyped(json, false); + return PatchRequestInnerFromJSONTyped(json, false); } -export function PatchRequestInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchRequestInner { - if (json == null) { - return json; - } - if (instanceOfJsonPatchRequestAddReplace(json)) { - return JsonPatchRequestAddReplaceFromJSONTyped(json, true); - } - if (instanceOfJsonPatchRequestMoveCopy(json)) { - return JsonPatchRequestMoveCopyFromJSONTyped(json, true); - } - if (instanceOfJsonPatchRequestRemove(json)) { - return JsonPatchRequestRemoveFromJSONTyped(json, true); - } +export function PatchRequestInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PatchRequestInner { + if (json == null) { + return json; + } + if (instanceOfJsonPatchRequestAddReplace(json)) { + return JsonPatchRequestAddReplaceFromJSONTyped(json, true); + } + if (instanceOfJsonPatchRequestMoveCopy(json)) { + return JsonPatchRequestMoveCopyFromJSONTyped(json, true); + } + if (instanceOfJsonPatchRequestRemove(json)) { + return JsonPatchRequestRemoveFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function PatchRequestInnerToJSON(json: any): any { - return PatchRequestInnerToJSONTyped(json, false); + return PatchRequestInnerToJSONTyped(json, false); } -export function PatchRequestInnerToJSONTyped(value?: PatchRequestInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PatchRequestInnerToJSONTyped( + value?: PatchRequestInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - if (instanceOfJsonPatchRequestAddReplace(value)) { - return JsonPatchRequestAddReplaceToJSON(value as JsonPatchRequestAddReplace); - } - if (instanceOfJsonPatchRequestMoveCopy(value)) { - return JsonPatchRequestMoveCopyToJSON(value as JsonPatchRequestMoveCopy); - } - if (instanceOfJsonPatchRequestRemove(value)) { - return JsonPatchRequestRemoveToJSON(value as JsonPatchRequestRemove); - } + if (instanceOfJsonPatchRequestAddReplace(value)) { + return JsonPatchRequestAddReplaceToJSON(value as JsonPatchRequestAddReplace); + } + if (instanceOfJsonPatchRequestMoveCopy(value)) { + return JsonPatchRequestMoveCopyToJSON(value as JsonPatchRequestMoveCopy); + } + if (instanceOfJsonPatchRequestRemove(value)) { + return JsonPatchRequestRemoveToJSON(value as JsonPatchRequestRemove); + } - return {}; + return {}; } - diff --git a/src/clients/flinkSql/models/ResultListMeta.ts b/src/clients/flinkSql/models/ResultListMeta.ts index 18130dba1b..d7cf9f49f6 100644 --- a/src/clients/flinkSql/models/ResultListMeta.ts +++ b/src/clients/flinkSql/models/ResultListMeta.ts @@ -12,69 +12,72 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ResultListMeta */ export interface ResultListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ResultListMeta - */ - self?: string; - /** - * A URL that can be followed to get the next batch of results. - * @type {string} - * @memberof ResultListMeta - */ - next?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ResultListMeta - */ - readonly created_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ResultListMeta + */ + self?: string; + /** + * A URL that can be followed to get the next batch of results. + * @type {string} + * @memberof ResultListMeta + */ + next?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ResultListMeta + */ + readonly created_at?: Date; } /** * Check if a given object implements the ResultListMeta interface. */ export function instanceOfResultListMeta(value: object): value is ResultListMeta { - return true; + return true; } export function ResultListMetaFromJSON(json: any): ResultListMeta { - return ResultListMetaFromJSONTyped(json, false); + return ResultListMetaFromJSONTyped(json, false); } -export function ResultListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResultListMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - }; +export function ResultListMetaFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResultListMeta { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + }; } export function ResultListMetaToJSON(json: any): ResultListMeta { - return ResultListMetaToJSONTyped(json, false); + return ResultListMetaToJSONTyped(json, false); } -export function ResultListMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResultListMetaToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - }; + return { + self: value["self"], + next: value["next"], + }; } - diff --git a/src/clients/flinkSql/models/RowFieldType.ts b/src/clients/flinkSql/models/RowFieldType.ts index c93ffe30ea..d9b95e8160 100644 --- a/src/clients/flinkSql/models/RowFieldType.ts +++ b/src/clients/flinkSql/models/RowFieldType.ts @@ -12,80 +12,80 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { DataType } from './DataType'; +import { mapValues } from "../runtime"; +import type { DataType } from "./DataType"; import { - DataTypeFromJSON, - DataTypeFromJSONTyped, - DataTypeToJSON, - DataTypeToJSONTyped, -} from './DataType'; + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from "./DataType"; /** - * + * * @export * @interface RowFieldType */ export interface RowFieldType { - /** - * The name of the field. - * @type {string} - * @memberof RowFieldType - */ - name: string; - /** - * The data type of the field. - * @type {DataType} - * @memberof RowFieldType - */ - field_type: DataType; - /** - * The description of the field. - * @type {string} - * @memberof RowFieldType - */ - description?: string; + /** + * The name of the field. + * @type {string} + * @memberof RowFieldType + */ + name: string; + /** + * The data type of the field. + * @type {DataType} + * @memberof RowFieldType + */ + field_type: DataType; + /** + * The description of the field. + * @type {string} + * @memberof RowFieldType + */ + description?: string; } /** * Check if a given object implements the RowFieldType interface. */ export function instanceOfRowFieldType(value: object): value is RowFieldType { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('field_type' in value) || value['field_type'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("field_type" in value) || value["field_type"] === undefined) return false; + return true; } export function RowFieldTypeFromJSON(json: any): RowFieldType { - return RowFieldTypeFromJSONTyped(json, false); + return RowFieldTypeFromJSONTyped(json, false); } export function RowFieldTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): RowFieldType { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'field_type': DataTypeFromJSON(json['field_type']), - 'description': json['description'] == null ? undefined : json['description'], - }; + if (json == null) { + return json; + } + return { + name: json["name"], + field_type: DataTypeFromJSON(json["field_type"]), + description: json["description"] == null ? undefined : json["description"], + }; } export function RowFieldTypeToJSON(json: any): RowFieldType { - return RowFieldTypeToJSONTyped(json, false); + return RowFieldTypeToJSONTyped(json, false); } -export function RowFieldTypeToJSONTyped(value?: RowFieldType | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RowFieldTypeToJSONTyped( + value?: RowFieldType | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'field_type': DataTypeToJSON(value['field_type']), - 'description': value['description'], - }; + return { + name: value["name"], + field_type: DataTypeToJSON(value["field_type"]), + description: value["description"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1Agent.ts b/src/clients/flinkSql/models/SqlV1Agent.ts index b7a0c17a5c..31db27b776 100644 --- a/src/clients/flinkSql/models/SqlV1Agent.ts +++ b/src/clients/flinkSql/models/SqlV1Agent.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1AgentMetadata } from './SqlV1AgentMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1AgentMetadata } from "./SqlV1AgentMetadata"; import { - SqlV1AgentMetadataFromJSON, - SqlV1AgentMetadataFromJSONTyped, - SqlV1AgentMetadataToJSON, - SqlV1AgentMetadataToJSONTyped, -} from './SqlV1AgentMetadata'; -import type { SqlV1AgentStatus } from './SqlV1AgentStatus'; + SqlV1AgentMetadataFromJSON, + SqlV1AgentMetadataFromJSONTyped, + SqlV1AgentMetadataToJSON, + SqlV1AgentMetadataToJSONTyped, +} from "./SqlV1AgentMetadata"; +import type { SqlV1AgentStatus } from "./SqlV1AgentStatus"; import { - SqlV1AgentStatusFromJSON, - SqlV1AgentStatusFromJSONTyped, - SqlV1AgentStatusToJSON, - SqlV1AgentStatusToJSONTyped, -} from './SqlV1AgentStatus'; -import type { SqlV1AgentSpec } from './SqlV1AgentSpec'; + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from "./SqlV1AgentStatus"; +import type { SqlV1AgentSpec } from "./SqlV1AgentSpec"; import { - SqlV1AgentSpecFromJSON, - SqlV1AgentSpecFromJSONTyped, - SqlV1AgentSpecToJSON, - SqlV1AgentSpecToJSONTyped, -} from './SqlV1AgentSpec'; + SqlV1AgentSpecFromJSON, + SqlV1AgentSpecFromJSONTyped, + SqlV1AgentSpecToJSON, + SqlV1AgentSpecToJSONTyped, +} from "./SqlV1AgentSpec"; /** * Represents an Agent resource. @@ -41,121 +41,123 @@ import { * @interface SqlV1Agent */ export interface SqlV1Agent { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1Agent - */ - readonly api_version: SqlV1AgentApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1Agent - */ - readonly kind: SqlV1AgentKindEnum; - /** - * - * @type {SqlV1AgentMetadata} - * @memberof SqlV1Agent - */ - metadata: SqlV1AgentMetadata; - /** - * The user-provided name of the agent, unique within this environment. - * @type {string} - * @memberof SqlV1Agent - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1Agent - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1Agent - */ - readonly environment_id: string; - /** - * - * @type {SqlV1AgentSpec} - * @memberof SqlV1Agent - */ - spec: SqlV1AgentSpec; - /** - * - * @type {SqlV1AgentStatus} - * @memberof SqlV1Agent - */ - readonly status?: SqlV1AgentStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Agent + */ + readonly api_version: SqlV1AgentApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Agent + */ + readonly kind: SqlV1AgentKindEnum; + /** + * + * @type {SqlV1AgentMetadata} + * @memberof SqlV1Agent + */ + metadata: SqlV1AgentMetadata; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof SqlV1Agent + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1Agent + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1Agent + */ + readonly environment_id: string; + /** + * + * @type {SqlV1AgentSpec} + * @memberof SqlV1Agent + */ + spec: SqlV1AgentSpec; + /** + * + * @type {SqlV1AgentStatus} + * @memberof SqlV1Agent + */ + readonly status?: SqlV1AgentStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1AgentApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1AgentKindEnum { - Agent = 'Agent' + Agent = "Agent", } - /** * Check if a given object implements the SqlV1Agent interface. */ export function instanceOfSqlV1Agent(value: object): value is SqlV1Agent { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function SqlV1AgentFromJSON(json: any): SqlV1Agent { - return SqlV1AgentFromJSONTyped(json, false); + return SqlV1AgentFromJSONTyped(json, false); } export function SqlV1AgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Agent { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1AgentMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': SqlV1AgentSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1AgentStatusFromJSON(json['status']), - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1AgentMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1AgentSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1AgentStatusFromJSON(json["status"]), + }; } export function SqlV1AgentToJSON(json: any): SqlV1Agent { - return SqlV1AgentToJSONTyped(json, false); + return SqlV1AgentToJSONTyped(json, false); } -export function SqlV1AgentToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1AgentToJSONTyped( + value?: Omit< + SqlV1Agent, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1AgentMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': SqlV1AgentSpecToJSON(value['spec']), - }; + return { + metadata: SqlV1AgentMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1AgentSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1AgentList.ts b/src/clients/flinkSql/models/SqlV1AgentList.ts index 0efb7d1b35..269196cb2a 100644 --- a/src/clients/flinkSql/models/SqlV1AgentList.ts +++ b/src/clients/flinkSql/models/SqlV1AgentList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1Agent } from './SqlV1Agent'; +import { mapValues } from "../runtime"; +import type { SqlV1Agent } from "./SqlV1Agent"; import { - SqlV1AgentFromJSON, - SqlV1AgentFromJSONTyped, - SqlV1AgentToJSON, - SqlV1AgentToJSONTyped, -} from './SqlV1Agent'; -import type { ListMeta } from './ListMeta'; + SqlV1AgentFromJSON, + SqlV1AgentFromJSONTyped, + SqlV1AgentToJSON, + SqlV1AgentToJSONTyped, +} from "./SqlV1Agent"; +import type { ListMeta } from "./ListMeta"; import { - ListMetaFromJSON, - ListMetaFromJSONTyped, - ListMetaToJSON, - ListMetaToJSONTyped, -} from './ListMeta'; + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; /** * A list of Agent resources. @@ -34,89 +34,91 @@ import { * @interface SqlV1AgentList */ export interface SqlV1AgentList { - /** - * - * @type {string} - * @memberof SqlV1AgentList - */ - readonly api_version: SqlV1AgentListApiVersionEnum; - /** - * - * @type {string} - * @memberof SqlV1AgentList - */ - readonly kind: SqlV1AgentListKindEnum; - /** - * - * @type {ListMeta} - * @memberof SqlV1AgentList - */ - metadata: ListMeta; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1AgentList - */ - data: Set; + /** + * + * @type {string} + * @memberof SqlV1AgentList + */ + readonly api_version: SqlV1AgentListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1AgentList + */ + readonly kind: SqlV1AgentListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1AgentList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1AgentList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1AgentListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1AgentListKindEnum { - AgentList = 'AgentList' + AgentList = "AgentList", } - /** * Check if a given object implements the SqlV1AgentList interface. */ export function instanceOfSqlV1AgentList(value: object): value is SqlV1AgentList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function SqlV1AgentListFromJSON(json: any): SqlV1AgentList { - return SqlV1AgentListFromJSONTyped(json, false); + return SqlV1AgentListFromJSONTyped(json, false); } -export function SqlV1AgentListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ListMetaFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(SqlV1AgentFromJSON))), - }; +export function SqlV1AgentListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1AgentFromJSON)), + }; } export function SqlV1AgentListToJSON(json: any): SqlV1AgentList { - return SqlV1AgentListToJSONTyped(json, false); + return SqlV1AgentListToJSONTyped(json, false); } -export function SqlV1AgentListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1AgentListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ListMetaToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(SqlV1AgentToJSON)), - }; + return { + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1AgentToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1AgentMetadata.ts b/src/clients/flinkSql/models/SqlV1AgentMetadata.ts index 45072df92f..8358539e10 100644 --- a/src/clients/flinkSql/models/SqlV1AgentMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1AgentMetadata.ts @@ -12,103 +12,106 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1AgentMetadata */ export interface SqlV1AgentMetadata { - /** - * - * @type {any} - * @memberof SqlV1AgentMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1AgentMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1AgentMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1AgentMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1AgentMetadata - */ - resource_version?: any | null; - /** - * - * @type {any} - * @memberof SqlV1AgentMetadata - */ - resource_name?: any | null; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SqlV1AgentMetadata - */ - labels?: { [key: string]: string; }; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1AgentMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1AgentMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + resource_name?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1AgentMetadata + */ + labels?: { [key: string]: string }; } /** * Check if a given object implements the SqlV1AgentMetadata interface. */ export function instanceOfSqlV1AgentMetadata(value: object): value is SqlV1AgentMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function SqlV1AgentMetadataFromJSON(json: any): SqlV1AgentMetadata { - return SqlV1AgentMetadataFromJSONTyped(json, false); + return SqlV1AgentMetadataFromJSONTyped(json, false); } -export function SqlV1AgentMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'labels': json['labels'] == null ? undefined : json['labels'], - }; +export function SqlV1AgentMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + labels: json["labels"] == null ? undefined : json["labels"], + }; } export function SqlV1AgentMetadataToJSON(json: any): SqlV1AgentMetadata { - return SqlV1AgentMetadataToJSONTyped(json, false); + return SqlV1AgentMetadataToJSONTyped(json, false); } -export function SqlV1AgentMetadataToJSONTyped(value?: SqlV1AgentMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1AgentMetadataToJSONTyped( + value?: SqlV1AgentMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - 'resource_name': value['resource_name'], - 'labels': value['labels'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + labels: value["labels"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1AgentSpec.ts b/src/clients/flinkSql/models/SqlV1AgentSpec.ts index 7f868da660..b5b901f366 100644 --- a/src/clients/flinkSql/models/SqlV1AgentSpec.ts +++ b/src/clients/flinkSql/models/SqlV1AgentSpec.ts @@ -12,86 +12,89 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The specifications of the Agent. * @export * @interface SqlV1AgentSpec */ export interface SqlV1AgentSpec { - /** - * The description of the agent. - * @type {string} - * @memberof SqlV1AgentSpec - */ - description?: string; - /** - * The name of the model the agent uses for inferencing. - * @type {string} - * @memberof SqlV1AgentSpec - */ - model?: string; - /** - * The instruction prompt that guides the agent's behavior. - * @type {string} - * @memberof SqlV1AgentSpec - */ - prompt?: string; - /** - * The list of tools available to the agent. - * @type {Array} - * @memberof SqlV1AgentSpec - */ - tools?: Array; - /** - * A set of key-value option pairs that configure the agent's behavior. - * @type {{ [key: string]: string; }} - * @memberof SqlV1AgentSpec - */ - properties?: { [key: string]: string; }; + /** + * The description of the agent. + * @type {string} + * @memberof SqlV1AgentSpec + */ + description?: string; + /** + * The name of the model the agent uses for inferencing. + * @type {string} + * @memberof SqlV1AgentSpec + */ + model?: string; + /** + * The instruction prompt that guides the agent's behavior. + * @type {string} + * @memberof SqlV1AgentSpec + */ + prompt?: string; + /** + * The list of tools available to the agent. + * @type {Array} + * @memberof SqlV1AgentSpec + */ + tools?: Array; + /** + * A set of key-value option pairs that configure the agent's behavior. + * @type {{ [key: string]: string; }} + * @memberof SqlV1AgentSpec + */ + properties?: { [key: string]: string }; } /** * Check if a given object implements the SqlV1AgentSpec interface. */ export function instanceOfSqlV1AgentSpec(value: object): value is SqlV1AgentSpec { - return true; + return true; } export function SqlV1AgentSpecFromJSON(json: any): SqlV1AgentSpec { - return SqlV1AgentSpecFromJSONTyped(json, false); + return SqlV1AgentSpecFromJSONTyped(json, false); } -export function SqlV1AgentSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentSpec { - if (json == null) { - return json; - } - return { - - 'description': json['description'] == null ? undefined : json['description'], - 'model': json['model'] == null ? undefined : json['model'], - 'prompt': json['prompt'] == null ? undefined : json['prompt'], - 'tools': json['tools'] == null ? undefined : json['tools'], - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function SqlV1AgentSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentSpec { + if (json == null) { + return json; + } + return { + description: json["description"] == null ? undefined : json["description"], + model: json["model"] == null ? undefined : json["model"], + prompt: json["prompt"] == null ? undefined : json["prompt"], + tools: json["tools"] == null ? undefined : json["tools"], + properties: json["properties"] == null ? undefined : json["properties"], + }; } export function SqlV1AgentSpecToJSON(json: any): SqlV1AgentSpec { - return SqlV1AgentSpecToJSONTyped(json, false); + return SqlV1AgentSpecToJSONTyped(json, false); } -export function SqlV1AgentSpecToJSONTyped(value?: SqlV1AgentSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1AgentSpecToJSONTyped( + value?: SqlV1AgentSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'description': value['description'], - 'model': value['model'], - 'prompt': value['prompt'], - 'tools': value['tools'], - 'properties': value['properties'], - }; + return { + description: value["description"], + model: value["model"], + prompt: value["prompt"], + tools: value["tools"], + properties: value["properties"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1AgentStatus.ts b/src/clients/flinkSql/models/SqlV1AgentStatus.ts index f957691662..0afe6929f1 100644 --- a/src/clients/flinkSql/models/SqlV1AgentStatus.ts +++ b/src/clients/flinkSql/models/SqlV1AgentStatus.ts @@ -12,59 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of the Agent. * @export * @interface SqlV1AgentStatus */ export interface SqlV1AgentStatus { - /** - * Describes the status of the agent: - * - * READY: The Agent is created; - * - * RUNNING: The Agent is created and running in a query; - * - * @type {string} - * @memberof SqlV1AgentStatus - */ - phase?: string; + /** + * Describes the status of the agent: + * + * READY: The Agent is created; + * + * RUNNING: The Agent is created and running in a query; + * + * @type {string} + * @memberof SqlV1AgentStatus + */ + phase?: string; } /** * Check if a given object implements the SqlV1AgentStatus interface. */ export function instanceOfSqlV1AgentStatus(value: object): value is SqlV1AgentStatus { - return true; + return true; } export function SqlV1AgentStatusFromJSON(json: any): SqlV1AgentStatus { - return SqlV1AgentStatusFromJSONTyped(json, false); + return SqlV1AgentStatusFromJSONTyped(json, false); } -export function SqlV1AgentStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1AgentStatus { - if (json == null) { - return json; - } - return { - - 'phase': json['phase'] == null ? undefined : json['phase'], - }; +export function SqlV1AgentStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"] == null ? undefined : json["phase"], + }; } export function SqlV1AgentStatusToJSON(json: any): SqlV1AgentStatus { - return SqlV1AgentStatusToJSONTyped(json, false); + return SqlV1AgentStatusToJSONTyped(json, false); } -export function SqlV1AgentStatusToJSONTyped(value?: SqlV1AgentStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1AgentStatusToJSONTyped( + value?: SqlV1AgentStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'phase': value['phase'], - }; + return { + phase: value["phase"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ColumnCommon.ts b/src/clients/flinkSql/models/SqlV1ColumnCommon.ts index 4412683000..dc6307213c 100644 --- a/src/clients/flinkSql/models/SqlV1ColumnCommon.ts +++ b/src/clients/flinkSql/models/SqlV1ColumnCommon.ts @@ -12,80 +12,83 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { DataType } from './DataType'; +import { mapValues } from "../runtime"; +import type { DataType } from "./DataType"; import { - DataTypeFromJSON, - DataTypeFromJSONTyped, - DataTypeToJSON, - DataTypeToJSONTyped, -} from './DataType'; + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from "./DataType"; /** - * + * * @export * @interface SqlV1ColumnCommon */ export interface SqlV1ColumnCommon { - /** - * The name of the column. - * @type {string} - * @memberof SqlV1ColumnCommon - */ - name: string; - /** - * - * @type {DataType} - * @memberof SqlV1ColumnCommon - */ - type: DataType; - /** - * A comment or description for the column. - * @type {string} - * @memberof SqlV1ColumnCommon - */ - comment?: string; + /** + * The name of the column. + * @type {string} + * @memberof SqlV1ColumnCommon + */ + name: string; + /** + * + * @type {DataType} + * @memberof SqlV1ColumnCommon + */ + type: DataType; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1ColumnCommon + */ + comment?: string; } /** * Check if a given object implements the SqlV1ColumnCommon interface. */ export function instanceOfSqlV1ColumnCommon(value: object): value is SqlV1ColumnCommon { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + return true; } export function SqlV1ColumnCommonFromJSON(json: any): SqlV1ColumnCommon { - return SqlV1ColumnCommonFromJSONTyped(json, false); + return SqlV1ColumnCommonFromJSONTyped(json, false); } -export function SqlV1ColumnCommonFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ColumnCommon { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'type': DataTypeFromJSON(json['type']), - 'comment': json['comment'] == null ? undefined : json['comment'], - }; +export function SqlV1ColumnCommonFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ColumnCommon { + if (json == null) { + return json; + } + return { + name: json["name"], + type: DataTypeFromJSON(json["type"]), + comment: json["comment"] == null ? undefined : json["comment"], + }; } export function SqlV1ColumnCommonToJSON(json: any): SqlV1ColumnCommon { - return SqlV1ColumnCommonToJSONTyped(json, false); + return SqlV1ColumnCommonToJSONTyped(json, false); } -export function SqlV1ColumnCommonToJSONTyped(value?: SqlV1ColumnCommon | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ColumnCommonToJSONTyped( + value?: SqlV1ColumnCommon | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'type': DataTypeToJSON(value['type']), - 'comment': value['comment'], - }; + return { + name: value["name"], + type: DataTypeToJSON(value["type"]), + comment: value["comment"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ComputedColumn.ts b/src/clients/flinkSql/models/SqlV1ComputedColumn.ts index de77f4c91c..08c1cea307 100644 --- a/src/clients/flinkSql/models/SqlV1ComputedColumn.ts +++ b/src/clients/flinkSql/models/SqlV1ComputedColumn.ts @@ -12,107 +12,109 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Computed columns are generated via an expression. * @export * @interface SqlV1ComputedColumn */ export interface SqlV1ComputedColumn { - /** - * - * @type {any} - * @memberof SqlV1ComputedColumn - */ - name: any | null; - /** - * - * @type {any} - * @memberof SqlV1ComputedColumn - */ - type: any | null; - /** - * A comment or description for the column. - * @type {string} - * @memberof SqlV1ComputedColumn - */ - comment?: string; - /** - * The kind of column. - * @type {string} - * @memberof SqlV1ComputedColumn - */ - kind: SqlV1ComputedColumnKindEnum; - /** - * The SQL expression used to compute the column value. - * @type {string} - * @memberof SqlV1ComputedColumn - */ - expression: string; - /** - * Indicates if the computed column is virtual. - * @type {boolean} - * @memberof SqlV1ComputedColumn - */ - virtual?: boolean; + /** + * + * @type {any} + * @memberof SqlV1ComputedColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1ComputedColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + kind: SqlV1ComputedColumnKindEnum; + /** + * The SQL expression used to compute the column value. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + expression: string; + /** + * Indicates if the computed column is virtual. + * @type {boolean} + * @memberof SqlV1ComputedColumn + */ + virtual?: boolean; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ComputedColumnKindEnum { - Computed = 'Computed' + Computed = "Computed", } - /** * Check if a given object implements the SqlV1ComputedColumn interface. */ export function instanceOfSqlV1ComputedColumn(value: object): value is SqlV1ComputedColumn { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('expression' in value) || value['expression'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("expression" in value) || value["expression"] === undefined) return false; + return true; } export function SqlV1ComputedColumnFromJSON(json: any): SqlV1ComputedColumn { - return SqlV1ComputedColumnFromJSONTyped(json, false); + return SqlV1ComputedColumnFromJSONTyped(json, false); } -export function SqlV1ComputedColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ComputedColumn { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'type': json['type'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'kind': json['kind'], - 'expression': json['expression'], - 'virtual': json['virtual'] == null ? undefined : json['virtual'], - }; +export function SqlV1ComputedColumnFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ComputedColumn { + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + comment: json["comment"] == null ? undefined : json["comment"], + kind: json["kind"], + expression: json["expression"], + virtual: json["virtual"] == null ? undefined : json["virtual"], + }; } export function SqlV1ComputedColumnToJSON(json: any): SqlV1ComputedColumn { - return SqlV1ComputedColumnToJSONTyped(json, false); + return SqlV1ComputedColumnToJSONTyped(json, false); } -export function SqlV1ComputedColumnToJSONTyped(value?: SqlV1ComputedColumn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ComputedColumnToJSONTyped( + value?: SqlV1ComputedColumn | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'type': value['type'], - 'comment': value['comment'], - 'kind': value['kind'], - 'expression': value['expression'], - 'virtual': value['virtual'], - }; + return { + name: value["name"], + type: value["type"], + comment: value["comment"], + kind: value["kind"], + expression: value["expression"], + virtual: value["virtual"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1Connection.ts b/src/clients/flinkSql/models/SqlV1Connection.ts index 9d25d310f0..99e41cdf6e 100644 --- a/src/clients/flinkSql/models/SqlV1Connection.ts +++ b/src/clients/flinkSql/models/SqlV1Connection.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from './SqlV1ConnectionStatus'; -import type { SqlV1ConnectionSpec } from './SqlV1ConnectionSpec'; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from "./SqlV1ConnectionStatus"; +import type { SqlV1ConnectionSpec } from "./SqlV1ConnectionSpec"; import { - SqlV1ConnectionSpecFromJSON, - SqlV1ConnectionSpecFromJSONTyped, - SqlV1ConnectionSpecToJSON, - SqlV1ConnectionSpecToJSONTyped, -} from './SqlV1ConnectionSpec'; -import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; + SqlV1ConnectionSpecFromJSON, + SqlV1ConnectionSpecFromJSONTyped, + SqlV1ConnectionSpecToJSON, + SqlV1ConnectionSpecToJSONTyped, +} from "./SqlV1ConnectionSpec"; +import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from './SqlV1ConnectionMetadata'; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from "./SqlV1ConnectionMetadata"; /** * `Connection` models a reusable endpoint and auth token to authenticate the caller to @@ -48,101 +48,104 @@ import { * @interface SqlV1Connection */ export interface SqlV1Connection { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1Connection - */ - readonly api_version?: SqlV1ConnectionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1Connection - */ - readonly kind?: SqlV1ConnectionKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof SqlV1Connection - */ - metadata?: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1Connection - */ - name?: string; - /** - * - * @type {SqlV1ConnectionSpec} - * @memberof SqlV1Connection - */ - spec?: SqlV1ConnectionSpec; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof SqlV1Connection - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Connection + */ + readonly api_version?: SqlV1ConnectionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Connection + */ + readonly kind?: SqlV1ConnectionKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof SqlV1Connection + */ + metadata?: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1Connection + */ + name?: string; + /** + * + * @type {SqlV1ConnectionSpec} + * @memberof SqlV1Connection + */ + spec?: SqlV1ConnectionSpec; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof SqlV1Connection + */ + status?: SqlV1ConnectionStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ConnectionApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ConnectionKindEnum { - Connection = 'Connection' + Connection = "Connection", } - /** * Check if a given object implements the SqlV1Connection interface. */ export function instanceOfSqlV1Connection(value: object): value is SqlV1Connection { - return true; + return true; } export function SqlV1ConnectionFromJSON(json: any): SqlV1Connection { - return SqlV1ConnectionFromJSONTyped(json, false); + return SqlV1ConnectionFromJSONTyped(json, false); } -export function SqlV1ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Connection { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'spec': json['spec'] == null ? undefined : SqlV1ConnectionSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), - }; +export function SqlV1ConnectionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1Connection { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : SqlV1ConnectionMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"] == null ? undefined : SqlV1ConnectionSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), + }; } export function SqlV1ConnectionToJSON(json: any): SqlV1Connection { - return SqlV1ConnectionToJSONTyped(json, false); + return SqlV1ConnectionToJSONTyped(json, false); } -export function SqlV1ConnectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': SqlV1ConnectionSpecToJSON(value['spec']), - 'status': SqlV1ConnectionStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1ConnectionSpecToJSON(value["spec"]), + status: SqlV1ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionList.ts b/src/clients/flinkSql/models/SqlV1ConnectionList.ts index 71e28d0bde..597d5d8548 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionList.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionListDataInner } from './SqlV1ConnectionListDataInner'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionListDataInner } from "./SqlV1ConnectionListDataInner"; import { - SqlV1ConnectionListDataInnerFromJSON, - SqlV1ConnectionListDataInnerFromJSONTyped, - SqlV1ConnectionListDataInnerToJSON, - SqlV1ConnectionListDataInnerToJSONTyped, -} from './SqlV1ConnectionListDataInner'; -import type { SqlV1ConnectionListMetadata } from './SqlV1ConnectionListMetadata'; + SqlV1ConnectionListDataInnerFromJSON, + SqlV1ConnectionListDataInnerFromJSONTyped, + SqlV1ConnectionListDataInnerToJSON, + SqlV1ConnectionListDataInnerToJSONTyped, +} from "./SqlV1ConnectionListDataInner"; +import type { SqlV1ConnectionListMetadata } from "./SqlV1ConnectionListMetadata"; import { - SqlV1ConnectionListMetadataFromJSON, - SqlV1ConnectionListMetadataFromJSONTyped, - SqlV1ConnectionListMetadataToJSON, - SqlV1ConnectionListMetadataToJSONTyped, -} from './SqlV1ConnectionListMetadata'; + SqlV1ConnectionListMetadataFromJSON, + SqlV1ConnectionListMetadataFromJSONTyped, + SqlV1ConnectionListMetadataToJSON, + SqlV1ConnectionListMetadataToJSONTyped, +} from "./SqlV1ConnectionListMetadata"; /** * `Connection` models a reusable endpoint and auth token to authenticate the caller to @@ -41,91 +41,93 @@ import { * @interface SqlV1ConnectionList */ export interface SqlV1ConnectionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1ConnectionList - */ - api_version: SqlV1ConnectionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1ConnectionList - */ - kind: SqlV1ConnectionListKindEnum; - /** - * - * @type {SqlV1ConnectionListMetadata} - * @memberof SqlV1ConnectionList - */ - metadata: SqlV1ConnectionListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1ConnectionList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ConnectionList + */ + api_version: SqlV1ConnectionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ConnectionList + */ + kind: SqlV1ConnectionListKindEnum; + /** + * + * @type {SqlV1ConnectionListMetadata} + * @memberof SqlV1ConnectionList + */ + metadata: SqlV1ConnectionListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1ConnectionList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ConnectionListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ConnectionListKindEnum { - ConnectionList = 'ConnectionList' + ConnectionList = "ConnectionList", } - /** * Check if a given object implements the SqlV1ConnectionList interface. */ export function instanceOfSqlV1ConnectionList(value: object): value is SqlV1ConnectionList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function SqlV1ConnectionListFromJSON(json: any): SqlV1ConnectionList { - return SqlV1ConnectionListFromJSONTyped(json, false); + return SqlV1ConnectionListFromJSONTyped(json, false); } -export function SqlV1ConnectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1ConnectionListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(SqlV1ConnectionListDataInnerFromJSON))), - }; +export function SqlV1ConnectionListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ConnectionListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1ConnectionListDataInnerFromJSON)), + }; } export function SqlV1ConnectionListToJSON(json: any): SqlV1ConnectionList { - return SqlV1ConnectionListToJSONTyped(json, false); + return SqlV1ConnectionListToJSONTyped(json, false); } -export function SqlV1ConnectionListToJSONTyped(value?: SqlV1ConnectionList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionListToJSONTyped( + value?: SqlV1ConnectionList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': SqlV1ConnectionListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(SqlV1ConnectionListDataInnerToJSON)), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: SqlV1ConnectionListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1ConnectionListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts b/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts index c726b2305a..472b88430d 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts @@ -12,129 +12,133 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from './SqlV1ConnectionStatus'; -import type { SqlV1ConnectionMetadata } from './SqlV1ConnectionMetadata'; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from "./SqlV1ConnectionStatus"; +import type { SqlV1ConnectionMetadata } from "./SqlV1ConnectionMetadata"; import { - SqlV1ConnectionMetadataFromJSON, - SqlV1ConnectionMetadataFromJSONTyped, - SqlV1ConnectionMetadataToJSON, - SqlV1ConnectionMetadataToJSONTyped, -} from './SqlV1ConnectionMetadata'; + SqlV1ConnectionMetadataFromJSON, + SqlV1ConnectionMetadataFromJSONTyped, + SqlV1ConnectionMetadataToJSON, + SqlV1ConnectionMetadataToJSONTyped, +} from "./SqlV1ConnectionMetadata"; /** - * + * * @export * @interface SqlV1ConnectionListDataInner */ export interface SqlV1ConnectionListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1ConnectionListDataInner - */ - readonly api_version: SqlV1ConnectionListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1ConnectionListDataInner - */ - readonly kind: SqlV1ConnectionListDataInnerKindEnum; - /** - * - * @type {SqlV1ConnectionMetadata} - * @memberof SqlV1ConnectionListDataInner - */ - metadata: SqlV1ConnectionMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1ConnectionListDataInner - */ - name: string; - /** - * - * @type {object} - * @memberof SqlV1ConnectionListDataInner - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof SqlV1ConnectionListDataInner - */ - status: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ConnectionListDataInner + */ + readonly api_version: SqlV1ConnectionListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ConnectionListDataInner + */ + readonly kind: SqlV1ConnectionListDataInnerKindEnum; + /** + * + * @type {SqlV1ConnectionMetadata} + * @memberof SqlV1ConnectionListDataInner + */ + metadata: SqlV1ConnectionMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1ConnectionListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof SqlV1ConnectionListDataInner + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof SqlV1ConnectionListDataInner + */ + status: SqlV1ConnectionStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ConnectionListDataInnerApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ConnectionListDataInnerKindEnum { - Connection = 'Connection' + Connection = "Connection", } - /** * Check if a given object implements the SqlV1ConnectionListDataInner interface. */ -export function instanceOfSqlV1ConnectionListDataInner(value: object): value is SqlV1ConnectionListDataInner { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfSqlV1ConnectionListDataInner( + value: object, +): value is SqlV1ConnectionListDataInner { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } export function SqlV1ConnectionListDataInnerFromJSON(json: any): SqlV1ConnectionListDataInner { - return SqlV1ConnectionListDataInnerFromJSONTyped(json, false); + return SqlV1ConnectionListDataInnerFromJSONTyped(json, false); } -export function SqlV1ConnectionListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1ConnectionMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'spec': json['spec'], - 'status': SqlV1ConnectionStatusFromJSON(json['status']), - }; +export function SqlV1ConnectionListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ConnectionMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: SqlV1ConnectionStatusFromJSON(json["status"]), + }; } export function SqlV1ConnectionListDataInnerToJSON(json: any): SqlV1ConnectionListDataInner { - return SqlV1ConnectionListDataInnerToJSONTyped(json, false); + return SqlV1ConnectionListDataInnerToJSONTyped(json, false); } -export function SqlV1ConnectionListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ConnectionMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ConnectionStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ConnectionMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts b/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts index a81d189765..90c16d255c 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts @@ -12,86 +12,91 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1ConnectionListMetadata */ export interface SqlV1ConnectionListMetadata { - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - self?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - next?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionListMetadata - */ - prev?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionListMetadata + */ + prev?: any | null; } /** * Check if a given object implements the SqlV1ConnectionListMetadata interface. */ -export function instanceOfSqlV1ConnectionListMetadata(value: object): value is SqlV1ConnectionListMetadata { - return true; +export function instanceOfSqlV1ConnectionListMetadata( + value: object, +): value is SqlV1ConnectionListMetadata { + return true; } export function SqlV1ConnectionListMetadataFromJSON(json: any): SqlV1ConnectionListMetadata { - return SqlV1ConnectionListMetadataFromJSONTyped(json, false); + return SqlV1ConnectionListMetadataFromJSONTyped(json, false); } -export function SqlV1ConnectionListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionListMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - }; +export function SqlV1ConnectionListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionListMetadata { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + }; } export function SqlV1ConnectionListMetadataToJSON(json: any): SqlV1ConnectionListMetadata { - return SqlV1ConnectionListMetadataToJSONTyped(json, false); + return SqlV1ConnectionListMetadataToJSONTyped(json, false); } -export function SqlV1ConnectionListMetadataToJSONTyped(value?: SqlV1ConnectionListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionListMetadataToJSONTyped( + value?: SqlV1ConnectionListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - }; + return { + self: value["self"], + next: value["next"], + first: value["first"], + last: value["last"], + prev: value["prev"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts b/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts index 41892b42f2..239bb4b196 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts @@ -12,95 +12,98 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1ConnectionMetadata */ export interface SqlV1ConnectionMetadata { - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1ConnectionMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1ConnectionMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - resource_version?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ConnectionMetadata - */ - resource_name?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ConnectionMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ConnectionMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ConnectionMetadata + */ + resource_name?: any | null; } /** * Check if a given object implements the SqlV1ConnectionMetadata interface. */ export function instanceOfSqlV1ConnectionMetadata(value: object): value is SqlV1ConnectionMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function SqlV1ConnectionMetadataFromJSON(json: any): SqlV1ConnectionMetadata { - return SqlV1ConnectionMetadataFromJSONTyped(json, false); + return SqlV1ConnectionMetadataFromJSONTyped(json, false); } -export function SqlV1ConnectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - }; +export function SqlV1ConnectionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + }; } export function SqlV1ConnectionMetadataToJSON(json: any): SqlV1ConnectionMetadata { - return SqlV1ConnectionMetadataToJSONTyped(json, false); + return SqlV1ConnectionMetadataToJSONTyped(json, false); } -export function SqlV1ConnectionMetadataToJSONTyped(value?: SqlV1ConnectionMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionMetadataToJSONTyped( + value?: SqlV1ConnectionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts b/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts index f1061ab184..9ce332d264 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionSpecAuthData } from './SqlV1ConnectionSpecAuthData'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionSpecAuthData } from "./SqlV1ConnectionSpecAuthData"; import { - SqlV1ConnectionSpecAuthDataFromJSON, - SqlV1ConnectionSpecAuthDataFromJSONTyped, - SqlV1ConnectionSpecAuthDataToJSON, - SqlV1ConnectionSpecAuthDataToJSONTyped, -} from './SqlV1ConnectionSpecAuthData'; + SqlV1ConnectionSpecAuthDataFromJSON, + SqlV1ConnectionSpecAuthDataFromJSONTyped, + SqlV1ConnectionSpecAuthDataToJSON, + SqlV1ConnectionSpecAuthDataToJSONTyped, +} from "./SqlV1ConnectionSpecAuthData"; /** * Encapsulates the model provider access details @@ -27,63 +27,69 @@ import { * @interface SqlV1ConnectionSpec */ export interface SqlV1ConnectionSpec { - /** - * The type of this connection. - * @type {string} - * @memberof SqlV1ConnectionSpec - */ - connection_type?: string; - /** - * The endpoint that is used to run model inferencing. - * @type {string} - * @memberof SqlV1ConnectionSpec - */ - endpoint?: string; - /** - * - * @type {SqlV1ConnectionSpecAuthData} - * @memberof SqlV1ConnectionSpec - */ - auth_data?: SqlV1ConnectionSpecAuthData; + /** + * The type of this connection. + * @type {string} + * @memberof SqlV1ConnectionSpec + */ + connection_type?: string; + /** + * The endpoint that is used to run model inferencing. + * @type {string} + * @memberof SqlV1ConnectionSpec + */ + endpoint?: string; + /** + * + * @type {SqlV1ConnectionSpecAuthData} + * @memberof SqlV1ConnectionSpec + */ + auth_data?: SqlV1ConnectionSpecAuthData; } /** * Check if a given object implements the SqlV1ConnectionSpec interface. */ export function instanceOfSqlV1ConnectionSpec(value: object): value is SqlV1ConnectionSpec { - return true; + return true; } export function SqlV1ConnectionSpecFromJSON(json: any): SqlV1ConnectionSpec { - return SqlV1ConnectionSpecFromJSONTyped(json, false); + return SqlV1ConnectionSpecFromJSONTyped(json, false); } -export function SqlV1ConnectionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionSpec { - if (json == null) { - return json; - } - return { - - 'connection_type': json['connection_type'] == null ? undefined : json['connection_type'], - 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], - 'auth_data': json['auth_data'] == null ? undefined : SqlV1ConnectionSpecAuthDataFromJSON(json['auth_data']), - }; +export function SqlV1ConnectionSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionSpec { + if (json == null) { + return json; + } + return { + connection_type: json["connection_type"] == null ? undefined : json["connection_type"], + endpoint: json["endpoint"] == null ? undefined : json["endpoint"], + auth_data: + json["auth_data"] == null + ? undefined + : SqlV1ConnectionSpecAuthDataFromJSON(json["auth_data"]), + }; } export function SqlV1ConnectionSpecToJSON(json: any): SqlV1ConnectionSpec { - return SqlV1ConnectionSpecToJSONTyped(json, false); + return SqlV1ConnectionSpecToJSONTyped(json, false); } -export function SqlV1ConnectionSpecToJSONTyped(value?: SqlV1ConnectionSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionSpecToJSONTyped( + value?: SqlV1ConnectionSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'connection_type': value['connection_type'], - 'endpoint': value['endpoint'], - 'auth_data': SqlV1ConnectionSpecAuthDataToJSON(value['auth_data']), - }; + return { + connection_type: value["connection_type"], + endpoint: value["endpoint"], + auth_data: SqlV1ConnectionSpecAuthDataToJSON(value["auth_data"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts b/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts index a04848c41a..d979d25d8d 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts @@ -12,55 +12,67 @@ * Do not edit the class manually. */ -import type { SqlV1PlaintextProvider } from './SqlV1PlaintextProvider'; +import type { SqlV1PlaintextProvider } from "./SqlV1PlaintextProvider"; import { - instanceOfSqlV1PlaintextProvider, - SqlV1PlaintextProviderFromJSON, - SqlV1PlaintextProviderFromJSONTyped, - SqlV1PlaintextProviderToJSON, -} from './SqlV1PlaintextProvider'; + instanceOfSqlV1PlaintextProvider, + SqlV1PlaintextProviderFromJSON, + SqlV1PlaintextProviderFromJSONTyped, + SqlV1PlaintextProviderToJSON, +} from "./SqlV1PlaintextProvider"; /** * @type SqlV1ConnectionSpecAuthData * The vendor specific authentication token details - * + * * The contents are stored as opaque bytes given in plaintext by an EnvAdmin. * In future, we would support more secure methods for distributing authentication tokens. - * + * * @export */ -export type SqlV1ConnectionSpecAuthData = { kind: 'PlaintextProvider' } & SqlV1PlaintextProvider; +export type SqlV1ConnectionSpecAuthData = { kind: "PlaintextProvider" } & SqlV1PlaintextProvider; export function SqlV1ConnectionSpecAuthDataFromJSON(json: any): SqlV1ConnectionSpecAuthData { - return SqlV1ConnectionSpecAuthDataFromJSONTyped(json, false); + return SqlV1ConnectionSpecAuthDataFromJSONTyped(json, false); } -export function SqlV1ConnectionSpecAuthDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionSpecAuthData { - if (json == null) { - return json; - } - switch (json['kind']) { - case 'PlaintextProvider': - return Object.assign({}, SqlV1PlaintextProviderFromJSONTyped(json, true), { kind: 'PlaintextProvider' } as const); - default: - throw new Error(`No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${json['kind']}'`); - } +export function SqlV1ConnectionSpecAuthDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionSpecAuthData { + if (json == null) { + return json; + } + switch (json["kind"]) { + case "PlaintextProvider": + return Object.assign({}, SqlV1PlaintextProviderFromJSONTyped(json, true), { + kind: "PlaintextProvider", + } as const); + default: + throw new Error( + `No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${json["kind"]}'`, + ); + } } export function SqlV1ConnectionSpecAuthDataToJSON(json: any): any { - return SqlV1ConnectionSpecAuthDataToJSONTyped(json, false); + return SqlV1ConnectionSpecAuthDataToJSONTyped(json, false); } -export function SqlV1ConnectionSpecAuthDataToJSONTyped(value?: SqlV1ConnectionSpecAuthData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - switch (value['kind']) { - case 'PlaintextProvider': - return Object.assign({}, SqlV1PlaintextProviderToJSON(value), { kind: 'PlaintextProvider' } as const); - default: - throw new Error(`No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${value['kind']}'`); - } - +export function SqlV1ConnectionSpecAuthDataToJSONTyped( + value?: SqlV1ConnectionSpecAuthData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + switch (value["kind"]) { + case "PlaintextProvider": + return Object.assign({}, SqlV1PlaintextProviderToJSON(value), { + kind: "PlaintextProvider", + } as const); + default: + throw new Error( + `No variant of SqlV1ConnectionSpecAuthData exists with 'kind=${value["kind"]}'`, + ); + } } - diff --git a/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts b/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts index 142354655c..1cfd1393ef 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts @@ -12,68 +12,70 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of the Connection * @export * @interface SqlV1ConnectionStatus */ export interface SqlV1ConnectionStatus { - /** - * Describes the status of the connection: - * - * READY: The Connection is usable; - * - * UNREACHABLE: The Connection endpoint is unreachable; - * - * INVALID_AUTH: The Connection auth token is invalid; - * - * @type {string} - * @memberof SqlV1ConnectionStatus - */ - readonly phase: string; - /** - * Details about why connection transitioned into a given status. - * @type {string} - * @memberof SqlV1ConnectionStatus - */ - readonly detail?: string; + /** + * Describes the status of the connection: + * + * READY: The Connection is usable; + * + * UNREACHABLE: The Connection endpoint is unreachable; + * + * INVALID_AUTH: The Connection auth token is invalid; + * + * @type {string} + * @memberof SqlV1ConnectionStatus + */ + readonly phase: string; + /** + * Details about why connection transitioned into a given status. + * @type {string} + * @memberof SqlV1ConnectionStatus + */ + readonly detail?: string; } /** * Check if a given object implements the SqlV1ConnectionStatus interface. */ export function instanceOfSqlV1ConnectionStatus(value: object): value is SqlV1ConnectionStatus { - if (!('phase' in value) || value['phase'] === undefined) return false; - return true; + if (!("phase" in value) || value["phase"] === undefined) return false; + return true; } export function SqlV1ConnectionStatusFromJSON(json: any): SqlV1ConnectionStatus { - return SqlV1ConnectionStatusFromJSONTyped(json, false); + return SqlV1ConnectionStatusFromJSONTyped(json, false); } -export function SqlV1ConnectionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ConnectionStatus { - if (json == null) { - return json; - } - return { - - 'phase': json['phase'], - 'detail': json['detail'] == null ? undefined : json['detail'], - }; +export function SqlV1ConnectionStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ConnectionStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"], + detail: json["detail"] == null ? undefined : json["detail"], + }; } export function SqlV1ConnectionStatusToJSON(json: any): SqlV1ConnectionStatus { - return SqlV1ConnectionStatusToJSONTyped(json, false); + return SqlV1ConnectionStatusToJSONTyped(json, false); } -export function SqlV1ConnectionStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ConnectionStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTable.ts b/src/clients/flinkSql/models/SqlV1MaterializedTable.ts index 38a44af5db..0b9dfadbf3 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTable.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTable.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableMetadata } from './SqlV1MaterializedTableMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableMetadata } from "./SqlV1MaterializedTableMetadata"; import { - SqlV1MaterializedTableMetadataFromJSON, - SqlV1MaterializedTableMetadataFromJSONTyped, - SqlV1MaterializedTableMetadataToJSON, - SqlV1MaterializedTableMetadataToJSONTyped, -} from './SqlV1MaterializedTableMetadata'; -import type { SqlV1MaterializedTableSpec } from './SqlV1MaterializedTableSpec'; + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from "./SqlV1MaterializedTableMetadata"; +import type { SqlV1MaterializedTableSpec } from "./SqlV1MaterializedTableSpec"; import { - SqlV1MaterializedTableSpecFromJSON, - SqlV1MaterializedTableSpecFromJSONTyped, - SqlV1MaterializedTableSpecToJSON, - SqlV1MaterializedTableSpecToJSONTyped, -} from './SqlV1MaterializedTableSpec'; -import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableSpecFromJSON, + SqlV1MaterializedTableSpecFromJSONTyped, + SqlV1MaterializedTableSpecToJSON, + SqlV1MaterializedTableSpecToJSONTyped, +} from "./SqlV1MaterializedTableSpec"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; import { - SqlV1MaterializedTableStatusFromJSON, - SqlV1MaterializedTableStatusFromJSONTyped, - SqlV1MaterializedTableStatusToJSON, - SqlV1MaterializedTableStatusToJSONTyped, -} from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; /** * Represents a Materialized Table resource. @@ -41,121 +41,127 @@ import { * @interface SqlV1MaterializedTable */ export interface SqlV1MaterializedTable { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1MaterializedTable - */ - readonly api_version: SqlV1MaterializedTableApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1MaterializedTable - */ - readonly kind: SqlV1MaterializedTableKindEnum; - /** - * - * @type {SqlV1MaterializedTableMetadata} - * @memberof SqlV1MaterializedTable - */ - metadata: SqlV1MaterializedTableMetadata; - /** - * The user-provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1MaterializedTable - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1MaterializedTable - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1MaterializedTable - */ - readonly environment_id: string; - /** - * - * @type {SqlV1MaterializedTableSpec} - * @memberof SqlV1MaterializedTable - */ - spec: SqlV1MaterializedTableSpec; - /** - * - * @type {SqlV1MaterializedTableStatus} - * @memberof SqlV1MaterializedTable - */ - readonly status?: SqlV1MaterializedTableStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly api_version: SqlV1MaterializedTableApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly kind: SqlV1MaterializedTableKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof SqlV1MaterializedTable + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableSpec} + * @memberof SqlV1MaterializedTable + */ + spec: SqlV1MaterializedTableSpec; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof SqlV1MaterializedTable + */ + readonly status?: SqlV1MaterializedTableStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableKindEnum { - MaterializedTable = 'MaterializedTable' + MaterializedTable = "MaterializedTable", } - /** * Check if a given object implements the SqlV1MaterializedTable interface. */ export function instanceOfSqlV1MaterializedTable(value: object): value is SqlV1MaterializedTable { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function SqlV1MaterializedTableFromJSON(json: any): SqlV1MaterializedTable { - return SqlV1MaterializedTableFromJSONTyped(json, false); + return SqlV1MaterializedTableFromJSONTyped(json, false); } -export function SqlV1MaterializedTableFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTable { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1MaterializedTableMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': SqlV1MaterializedTableSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json['status']), - }; +export function SqlV1MaterializedTableFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTable { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1MaterializedTableSpecFromJSON(json["spec"]), + status: + json["status"] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; } export function SqlV1MaterializedTableToJSON(json: any): SqlV1MaterializedTable { - return SqlV1MaterializedTableToJSONTyped(json, false); + return SqlV1MaterializedTableToJSONTyped(json, false); } -export function SqlV1MaterializedTableToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableToJSONTyped( + value?: Omit< + SqlV1MaterializedTable, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1MaterializedTableMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': SqlV1MaterializedTableSpecToJSON(value['spec']), - }; + return { + metadata: SqlV1MaterializedTableMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1MaterializedTableSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts index 1d1d7e5735..d73da16ba5 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts @@ -12,73 +12,92 @@ * Do not edit the class manually. */ -import type { SqlV1ComputedColumn } from './SqlV1ComputedColumn'; +import type { SqlV1ComputedColumn } from "./SqlV1ComputedColumn"; import { - instanceOfSqlV1ComputedColumn, - SqlV1ComputedColumnFromJSON, - SqlV1ComputedColumnFromJSONTyped, - SqlV1ComputedColumnToJSON, -} from './SqlV1ComputedColumn'; -import type { SqlV1MetadataColumn } from './SqlV1MetadataColumn'; + instanceOfSqlV1ComputedColumn, + SqlV1ComputedColumnFromJSON, + SqlV1ComputedColumnFromJSONTyped, + SqlV1ComputedColumnToJSON, +} from "./SqlV1ComputedColumn"; +import type { SqlV1MetadataColumn } from "./SqlV1MetadataColumn"; import { - instanceOfSqlV1MetadataColumn, - SqlV1MetadataColumnFromJSON, - SqlV1MetadataColumnFromJSONTyped, - SqlV1MetadataColumnToJSON, -} from './SqlV1MetadataColumn'; -import type { SqlV1PhysicalColumn } from './SqlV1PhysicalColumn'; + instanceOfSqlV1MetadataColumn, + SqlV1MetadataColumnFromJSON, + SqlV1MetadataColumnFromJSONTyped, + SqlV1MetadataColumnToJSON, +} from "./SqlV1MetadataColumn"; +import type { SqlV1PhysicalColumn } from "./SqlV1PhysicalColumn"; import { - instanceOfSqlV1PhysicalColumn, - SqlV1PhysicalColumnFromJSON, - SqlV1PhysicalColumnFromJSONTyped, - SqlV1PhysicalColumnToJSON, -} from './SqlV1PhysicalColumn'; + instanceOfSqlV1PhysicalColumn, + SqlV1PhysicalColumnFromJSON, + SqlV1PhysicalColumnFromJSONTyped, + SqlV1PhysicalColumnToJSON, +} from "./SqlV1PhysicalColumn"; /** * @type SqlV1MaterializedTableColumnDetails * Details of a column in the Materialized Table. * @export */ -export type SqlV1MaterializedTableColumnDetails = { kind: 'Computed' } & SqlV1ComputedColumn | { kind: 'Metadata' } & SqlV1MetadataColumn | { kind: 'Physical' } & SqlV1PhysicalColumn; +export type SqlV1MaterializedTableColumnDetails = + | ({ kind: "Computed" } & SqlV1ComputedColumn) + | ({ kind: "Metadata" } & SqlV1MetadataColumn) + | ({ kind: "Physical" } & SqlV1PhysicalColumn); -export function SqlV1MaterializedTableColumnDetailsFromJSON(json: any): SqlV1MaterializedTableColumnDetails { - return SqlV1MaterializedTableColumnDetailsFromJSONTyped(json, false); +export function SqlV1MaterializedTableColumnDetailsFromJSON( + json: any, +): SqlV1MaterializedTableColumnDetails { + return SqlV1MaterializedTableColumnDetailsFromJSONTyped(json, false); } -export function SqlV1MaterializedTableColumnDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableColumnDetails { - if (json == null) { - return json; - } - switch (json['kind']) { - case 'Computed': - return Object.assign({}, SqlV1ComputedColumnFromJSONTyped(json, true), { kind: 'Computed' } as const); - case 'Metadata': - return Object.assign({}, SqlV1MetadataColumnFromJSONTyped(json, true), { kind: 'Metadata' } as const); - case 'Physical': - return Object.assign({}, SqlV1PhysicalColumnFromJSONTyped(json, true), { kind: 'Physical' } as const); - default: - throw new Error(`No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${json['kind']}'`); - } +export function SqlV1MaterializedTableColumnDetailsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableColumnDetails { + if (json == null) { + return json; + } + switch (json["kind"]) { + case "Computed": + return Object.assign({}, SqlV1ComputedColumnFromJSONTyped(json, true), { + kind: "Computed", + } as const); + case "Metadata": + return Object.assign({}, SqlV1MetadataColumnFromJSONTyped(json, true), { + kind: "Metadata", + } as const); + case "Physical": + return Object.assign({}, SqlV1PhysicalColumnFromJSONTyped(json, true), { + kind: "Physical", + } as const); + default: + throw new Error( + `No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${json["kind"]}'`, + ); + } } export function SqlV1MaterializedTableColumnDetailsToJSON(json: any): any { - return SqlV1MaterializedTableColumnDetailsToJSONTyped(json, false); + return SqlV1MaterializedTableColumnDetailsToJSONTyped(json, false); } -export function SqlV1MaterializedTableColumnDetailsToJSONTyped(value?: SqlV1MaterializedTableColumnDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - switch (value['kind']) { - case 'Computed': - return Object.assign({}, SqlV1ComputedColumnToJSON(value), { kind: 'Computed' } as const); - case 'Metadata': - return Object.assign({}, SqlV1MetadataColumnToJSON(value), { kind: 'Metadata' } as const); - case 'Physical': - return Object.assign({}, SqlV1PhysicalColumnToJSON(value), { kind: 'Physical' } as const); - default: - throw new Error(`No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${value['kind']}'`); - } - +export function SqlV1MaterializedTableColumnDetailsToJSONTyped( + value?: SqlV1MaterializedTableColumnDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + switch (value["kind"]) { + case "Computed": + return Object.assign({}, SqlV1ComputedColumnToJSON(value), { kind: "Computed" } as const); + case "Metadata": + return Object.assign({}, SqlV1MetadataColumnToJSON(value), { kind: "Metadata" } as const); + case "Physical": + return Object.assign({}, SqlV1PhysicalColumnToJSON(value), { kind: "Physical" } as const); + default: + throw new Error( + `No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${value["kind"]}'`, + ); + } } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts index 475d8fa689..7ef18915ad 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts @@ -12,78 +12,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * A constraint on the materialized table. * @export * @interface SqlV1MaterializedTableConstraint */ export interface SqlV1MaterializedTableConstraint { - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableConstraint - */ - name?: string; - /** - * The type of constraint. - * @type {string} - * @memberof SqlV1MaterializedTableConstraint - */ - kind?: string; - /** - * - * @type {Array} - * @memberof SqlV1MaterializedTableConstraint - */ - column_names?: Array; - /** - * Whether the constraint is enforced. - * @type {boolean} - * @memberof SqlV1MaterializedTableConstraint - */ - enforced?: boolean; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableConstraint + */ + name?: string; + /** + * The type of constraint. + * @type {string} + * @memberof SqlV1MaterializedTableConstraint + */ + kind?: string; + /** + * + * @type {Array} + * @memberof SqlV1MaterializedTableConstraint + */ + column_names?: Array; + /** + * Whether the constraint is enforced. + * @type {boolean} + * @memberof SqlV1MaterializedTableConstraint + */ + enforced?: boolean; } /** * Check if a given object implements the SqlV1MaterializedTableConstraint interface. */ -export function instanceOfSqlV1MaterializedTableConstraint(value: object): value is SqlV1MaterializedTableConstraint { - return true; +export function instanceOfSqlV1MaterializedTableConstraint( + value: object, +): value is SqlV1MaterializedTableConstraint { + return true; } -export function SqlV1MaterializedTableConstraintFromJSON(json: any): SqlV1MaterializedTableConstraint { - return SqlV1MaterializedTableConstraintFromJSONTyped(json, false); +export function SqlV1MaterializedTableConstraintFromJSON( + json: any, +): SqlV1MaterializedTableConstraint { + return SqlV1MaterializedTableConstraintFromJSONTyped(json, false); } -export function SqlV1MaterializedTableConstraintFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableConstraint { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'column_names': json['column_names'] == null ? undefined : json['column_names'], - 'enforced': json['enforced'] == null ? undefined : json['enforced'], - }; +export function SqlV1MaterializedTableConstraintFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableConstraint { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + kind: json["kind"] == null ? undefined : json["kind"], + column_names: json["column_names"] == null ? undefined : json["column_names"], + enforced: json["enforced"] == null ? undefined : json["enforced"], + }; } -export function SqlV1MaterializedTableConstraintToJSON(json: any): SqlV1MaterializedTableConstraint { - return SqlV1MaterializedTableConstraintToJSONTyped(json, false); +export function SqlV1MaterializedTableConstraintToJSON( + json: any, +): SqlV1MaterializedTableConstraint { + return SqlV1MaterializedTableConstraintToJSONTyped(json, false); } -export function SqlV1MaterializedTableConstraintToJSONTyped(value?: SqlV1MaterializedTableConstraint | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableConstraintToJSONTyped( + value?: SqlV1MaterializedTableConstraint | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'kind': value['kind'], - 'column_names': value['column_names'], - 'enforced': value['enforced'], - }; + return { + name: value["name"], + kind: value["kind"], + column_names: value["column_names"], + enforced: value["enforced"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts index ce9087365f..a7b8b3f434 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts @@ -12,62 +12,71 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Distribution (bucket by) strategy. * @export * @interface SqlV1MaterializedTableDistribution */ export interface SqlV1MaterializedTableDistribution { - /** - * - * @type {Array} - * @memberof SqlV1MaterializedTableDistribution - */ - column_names?: Array; - /** - * The number of buckets. - * @type {number} - * @memberof SqlV1MaterializedTableDistribution - */ - buckets?: number; + /** + * + * @type {Array} + * @memberof SqlV1MaterializedTableDistribution + */ + column_names?: Array; + /** + * The number of buckets. + * @type {number} + * @memberof SqlV1MaterializedTableDistribution + */ + buckets?: number; } /** * Check if a given object implements the SqlV1MaterializedTableDistribution interface. */ -export function instanceOfSqlV1MaterializedTableDistribution(value: object): value is SqlV1MaterializedTableDistribution { - return true; +export function instanceOfSqlV1MaterializedTableDistribution( + value: object, +): value is SqlV1MaterializedTableDistribution { + return true; } -export function SqlV1MaterializedTableDistributionFromJSON(json: any): SqlV1MaterializedTableDistribution { - return SqlV1MaterializedTableDistributionFromJSONTyped(json, false); +export function SqlV1MaterializedTableDistributionFromJSON( + json: any, +): SqlV1MaterializedTableDistribution { + return SqlV1MaterializedTableDistributionFromJSONTyped(json, false); } -export function SqlV1MaterializedTableDistributionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableDistribution { - if (json == null) { - return json; - } - return { - - 'column_names': json['column_names'] == null ? undefined : json['column_names'], - 'buckets': json['buckets'] == null ? undefined : json['buckets'], - }; +export function SqlV1MaterializedTableDistributionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableDistribution { + if (json == null) { + return json; + } + return { + column_names: json["column_names"] == null ? undefined : json["column_names"], + buckets: json["buckets"] == null ? undefined : json["buckets"], + }; } -export function SqlV1MaterializedTableDistributionToJSON(json: any): SqlV1MaterializedTableDistribution { - return SqlV1MaterializedTableDistributionToJSONTyped(json, false); +export function SqlV1MaterializedTableDistributionToJSON( + json: any, +): SqlV1MaterializedTableDistribution { + return SqlV1MaterializedTableDistributionToJSONTyped(json, false); } -export function SqlV1MaterializedTableDistributionToJSONTyped(value?: SqlV1MaterializedTableDistribution | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableDistributionToJSONTyped( + value?: SqlV1MaterializedTableDistribution | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'column_names': value['column_names'], - 'buckets': value['buckets'], - }; + return { + column_names: value["column_names"], + buckets: value["buckets"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts index b8a298fefb..da6b885ed5 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTable } from './SqlV1MaterializedTable'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTable } from "./SqlV1MaterializedTable"; import { - SqlV1MaterializedTableFromJSON, - SqlV1MaterializedTableFromJSONTyped, - SqlV1MaterializedTableToJSON, - SqlV1MaterializedTableToJSONTyped, -} from './SqlV1MaterializedTable'; -import type { ListMeta } from './ListMeta'; + SqlV1MaterializedTableFromJSON, + SqlV1MaterializedTableFromJSONTyped, + SqlV1MaterializedTableToJSON, + SqlV1MaterializedTableToJSONTyped, +} from "./SqlV1MaterializedTable"; +import type { ListMeta } from "./ListMeta"; import { - ListMetaFromJSON, - ListMetaFromJSONTyped, - ListMetaToJSON, - ListMetaToJSONTyped, -} from './ListMeta'; + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; /** * A list of Materialized Table resources. @@ -34,89 +34,93 @@ import { * @interface SqlV1MaterializedTableList */ export interface SqlV1MaterializedTableList { - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableList - */ - readonly api_version: SqlV1MaterializedTableListApiVersionEnum; - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableList - */ - readonly kind: SqlV1MaterializedTableListKindEnum; - /** - * - * @type {ListMeta} - * @memberof SqlV1MaterializedTableList - */ - metadata: ListMeta; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1MaterializedTableList - */ - data: Set; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableList + */ + readonly api_version: SqlV1MaterializedTableListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableList + */ + readonly kind: SqlV1MaterializedTableListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1MaterializedTableList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1MaterializedTableList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableListKindEnum { - MaterializedTableList = 'MaterializedTableList' + MaterializedTableList = "MaterializedTableList", } - /** * Check if a given object implements the SqlV1MaterializedTableList interface. */ -export function instanceOfSqlV1MaterializedTableList(value: object): value is SqlV1MaterializedTableList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableList( + value: object, +): value is SqlV1MaterializedTableList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function SqlV1MaterializedTableListFromJSON(json: any): SqlV1MaterializedTableList { - return SqlV1MaterializedTableListFromJSONTyped(json, false); + return SqlV1MaterializedTableListFromJSONTyped(json, false); } -export function SqlV1MaterializedTableListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ListMetaFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(SqlV1MaterializedTableFromJSON))), - }; +export function SqlV1MaterializedTableListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1MaterializedTableFromJSON)), + }; } export function SqlV1MaterializedTableListToJSON(json: any): SqlV1MaterializedTableList { - return SqlV1MaterializedTableListToJSONTyped(json, false); + return SqlV1MaterializedTableListToJSONTyped(json, false); } -export function SqlV1MaterializedTableListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ListMetaToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(SqlV1MaterializedTableToJSON)), - }; + return { + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1MaterializedTableToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts index e4ef072b93..0f8b8b127f 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts @@ -12,103 +12,108 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1MaterializedTableMetadata */ export interface SqlV1MaterializedTableMetadata { - /** - * - * @type {any} - * @memberof SqlV1MaterializedTableMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1MaterializedTableMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1MaterializedTableMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1MaterializedTableMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1MaterializedTableMetadata - */ - resource_version?: any | null; - /** - * - * @type {any} - * @memberof SqlV1MaterializedTableMetadata - */ - resource_name?: any | null; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SqlV1MaterializedTableMetadata - */ - labels?: { [key: string]: string; }; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + resource_name?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableMetadata + */ + labels?: { [key: string]: string }; } /** * Check if a given object implements the SqlV1MaterializedTableMetadata interface. */ -export function instanceOfSqlV1MaterializedTableMetadata(value: object): value is SqlV1MaterializedTableMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableMetadata( + value: object, +): value is SqlV1MaterializedTableMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function SqlV1MaterializedTableMetadataFromJSON(json: any): SqlV1MaterializedTableMetadata { - return SqlV1MaterializedTableMetadataFromJSONTyped(json, false); + return SqlV1MaterializedTableMetadataFromJSONTyped(json, false); } -export function SqlV1MaterializedTableMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'labels': json['labels'] == null ? undefined : json['labels'], - }; +export function SqlV1MaterializedTableMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + labels: json["labels"] == null ? undefined : json["labels"], + }; } export function SqlV1MaterializedTableMetadataToJSON(json: any): SqlV1MaterializedTableMetadata { - return SqlV1MaterializedTableMetadataToJSONTyped(json, false); + return SqlV1MaterializedTableMetadataToJSONTyped(json, false); } -export function SqlV1MaterializedTableMetadataToJSONTyped(value?: SqlV1MaterializedTableMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableMetadataToJSONTyped( + value?: SqlV1MaterializedTableMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - 'resource_name': value['resource_name'], - 'labels': value['labels'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + labels: value["labels"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts index 24815e262d..df56dff77e 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts @@ -12,35 +12,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableWatermark } from './SqlV1MaterializedTableWatermark'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableWatermark } from "./SqlV1MaterializedTableWatermark"; import { - SqlV1MaterializedTableWatermarkFromJSON, - SqlV1MaterializedTableWatermarkFromJSONTyped, - SqlV1MaterializedTableWatermarkToJSON, - SqlV1MaterializedTableWatermarkToJSONTyped, -} from './SqlV1MaterializedTableWatermark'; -import type { SqlV1MaterializedTableConstraint } from './SqlV1MaterializedTableConstraint'; + SqlV1MaterializedTableWatermarkFromJSON, + SqlV1MaterializedTableWatermarkFromJSONTyped, + SqlV1MaterializedTableWatermarkToJSON, + SqlV1MaterializedTableWatermarkToJSONTyped, +} from "./SqlV1MaterializedTableWatermark"; +import type { SqlV1MaterializedTableConstraint } from "./SqlV1MaterializedTableConstraint"; import { - SqlV1MaterializedTableConstraintFromJSON, - SqlV1MaterializedTableConstraintFromJSONTyped, - SqlV1MaterializedTableConstraintToJSON, - SqlV1MaterializedTableConstraintToJSONTyped, -} from './SqlV1MaterializedTableConstraint'; -import type { SqlV1MaterializedTableDistribution } from './SqlV1MaterializedTableDistribution'; + SqlV1MaterializedTableConstraintFromJSON, + SqlV1MaterializedTableConstraintFromJSONTyped, + SqlV1MaterializedTableConstraintToJSON, + SqlV1MaterializedTableConstraintToJSONTyped, +} from "./SqlV1MaterializedTableConstraint"; +import type { SqlV1MaterializedTableDistribution } from "./SqlV1MaterializedTableDistribution"; import { - SqlV1MaterializedTableDistributionFromJSON, - SqlV1MaterializedTableDistributionFromJSONTyped, - SqlV1MaterializedTableDistributionToJSON, - SqlV1MaterializedTableDistributionToJSONTyped, -} from './SqlV1MaterializedTableDistribution'; -import type { SqlV1MaterializedTableColumnDetails } from './SqlV1MaterializedTableColumnDetails'; + SqlV1MaterializedTableDistributionFromJSON, + SqlV1MaterializedTableDistributionFromJSONTyped, + SqlV1MaterializedTableDistributionToJSON, + SqlV1MaterializedTableDistributionToJSONTyped, +} from "./SqlV1MaterializedTableDistribution"; +import type { SqlV1MaterializedTableColumnDetails } from "./SqlV1MaterializedTableColumnDetails"; import { - SqlV1MaterializedTableColumnDetailsFromJSON, - SqlV1MaterializedTableColumnDetailsFromJSONTyped, - SqlV1MaterializedTableColumnDetailsToJSON, - SqlV1MaterializedTableColumnDetailsToJSONTyped, -} from './SqlV1MaterializedTableColumnDetails'; + SqlV1MaterializedTableColumnDetailsFromJSON, + SqlV1MaterializedTableColumnDetailsFromJSONTyped, + SqlV1MaterializedTableColumnDetailsToJSON, + SqlV1MaterializedTableColumnDetailsToJSONTyped, +} from "./SqlV1MaterializedTableColumnDetails"; /** * The specifications of the Materialized Table. @@ -48,127 +48,150 @@ import { * @interface SqlV1MaterializedTableSpec */ export interface SqlV1MaterializedTableSpec { - /** - * The ID of Kafka cluster hosting the Materialized Table's topic. Populated from the `kafka_cluster_id` path parameter on creation. - * @type {string} - * @memberof SqlV1MaterializedTableSpec - */ - readonly kafka_cluster_id?: string; - /** - * The id associated with the compute pool in context. - * If not specified, the materialized table will use the default compute pool. The default pool is automatically determined by the system. - * @type {string} - * @memberof SqlV1MaterializedTableSpec - */ - compute_pool_id?: string; - /** - * The id of a principal this Materialized Table query runs as. - * @type {string} - * @memberof SqlV1MaterializedTableSpec - */ - principal?: string; - /** - * Indicates whether the Materialized Table query should be stopped. - * @type {boolean} - * @memberof SqlV1MaterializedTableSpec - */ - stopped?: boolean; - /** - * Defines configuration properties for the table, equivalent to the SQL 'WITH' clause - * @type {{ [key: string]: string; }} - * @memberof SqlV1MaterializedTableSpec - */ - table_options?: { [key: string]: string; }; - /** - * Session configurations equivalent to the SQL 'SET' statement. - * @type {{ [key: string]: string; }} - * @memberof SqlV1MaterializedTableSpec - */ - session_options?: { [key: string]: string; }; - /** - * Details of each column in Materialized Table resource. If columns are not specified, we infer from query. If it's specified it must be compatible with the types in the query. - * @type {Array} - * @memberof SqlV1MaterializedTableSpec - */ - columns?: Array; - /** - * - * @type {SqlV1MaterializedTableWatermark} - * @memberof SqlV1MaterializedTableSpec - */ - watermark?: SqlV1MaterializedTableWatermark; - /** - * Specify table constraints. - * @type {Array} - * @memberof SqlV1MaterializedTableSpec - */ - constraints?: Array; - /** - * - * @type {SqlV1MaterializedTableDistribution} - * @memberof SqlV1MaterializedTableSpec - */ - distributed_by?: SqlV1MaterializedTableDistribution; - /** - * Contains the query section (usually starting with a SELECT) of the latest Materialized Table. - * @type {string} - * @memberof SqlV1MaterializedTableSpec - */ - query?: string; + /** + * The ID of Kafka cluster hosting the Materialized Table's topic. Populated from the `kafka_cluster_id` path parameter on creation. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + readonly kafka_cluster_id?: string; + /** + * The id associated with the compute pool in context. + * If not specified, the materialized table will use the default compute pool. The default pool is automatically determined by the system. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + compute_pool_id?: string; + /** + * The id of a principal this Materialized Table query runs as. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + principal?: string; + /** + * Indicates whether the Materialized Table query should be stopped. + * @type {boolean} + * @memberof SqlV1MaterializedTableSpec + */ + stopped?: boolean; + /** + * Defines configuration properties for the table, equivalent to the SQL 'WITH' clause + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableSpec + */ + table_options?: { [key: string]: string }; + /** + * Session configurations equivalent to the SQL 'SET' statement. + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableSpec + */ + session_options?: { [key: string]: string }; + /** + * Details of each column in Materialized Table resource. If columns are not specified, we infer from query. If it's specified it must be compatible with the types in the query. + * @type {Array} + * @memberof SqlV1MaterializedTableSpec + */ + columns?: Array; + /** + * + * @type {SqlV1MaterializedTableWatermark} + * @memberof SqlV1MaterializedTableSpec + */ + watermark?: SqlV1MaterializedTableWatermark; + /** + * Specify table constraints. + * @type {Array} + * @memberof SqlV1MaterializedTableSpec + */ + constraints?: Array; + /** + * + * @type {SqlV1MaterializedTableDistribution} + * @memberof SqlV1MaterializedTableSpec + */ + distributed_by?: SqlV1MaterializedTableDistribution; + /** + * Contains the query section (usually starting with a SELECT) of the latest Materialized Table. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + query?: string; } /** * Check if a given object implements the SqlV1MaterializedTableSpec interface. */ -export function instanceOfSqlV1MaterializedTableSpec(value: object): value is SqlV1MaterializedTableSpec { - return true; +export function instanceOfSqlV1MaterializedTableSpec( + value: object, +): value is SqlV1MaterializedTableSpec { + return true; } export function SqlV1MaterializedTableSpecFromJSON(json: any): SqlV1MaterializedTableSpec { - return SqlV1MaterializedTableSpecFromJSONTyped(json, false); + return SqlV1MaterializedTableSpecFromJSONTyped(json, false); } -export function SqlV1MaterializedTableSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableSpec { - if (json == null) { - return json; - } - return { - - 'kafka_cluster_id': json['kafka_cluster_id'] == null ? undefined : json['kafka_cluster_id'], - 'compute_pool_id': json['compute_pool_id'] == null ? undefined : json['compute_pool_id'], - 'principal': json['principal'] == null ? undefined : json['principal'], - 'stopped': json['stopped'] == null ? undefined : json['stopped'], - 'table_options': json['table_options'] == null ? undefined : json['table_options'], - 'session_options': json['session_options'] == null ? undefined : json['session_options'], - 'columns': json['columns'] == null ? undefined : ((json['columns'] as Array).map(SqlV1MaterializedTableColumnDetailsFromJSON)), - 'watermark': json['watermark'] == null ? undefined : SqlV1MaterializedTableWatermarkFromJSON(json['watermark']), - 'constraints': json['constraints'] == null ? undefined : ((json['constraints'] as Array).map(SqlV1MaterializedTableConstraintFromJSON)), - 'distributed_by': json['distributed_by'] == null ? undefined : SqlV1MaterializedTableDistributionFromJSON(json['distributed_by']), - 'query': json['query'] == null ? undefined : json['query'], - }; +export function SqlV1MaterializedTableSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableSpec { + if (json == null) { + return json; + } + return { + kafka_cluster_id: json["kafka_cluster_id"] == null ? undefined : json["kafka_cluster_id"], + compute_pool_id: json["compute_pool_id"] == null ? undefined : json["compute_pool_id"], + principal: json["principal"] == null ? undefined : json["principal"], + stopped: json["stopped"] == null ? undefined : json["stopped"], + table_options: json["table_options"] == null ? undefined : json["table_options"], + session_options: json["session_options"] == null ? undefined : json["session_options"], + columns: + json["columns"] == null + ? undefined + : (json["columns"] as Array).map(SqlV1MaterializedTableColumnDetailsFromJSON), + watermark: + json["watermark"] == null + ? undefined + : SqlV1MaterializedTableWatermarkFromJSON(json["watermark"]), + constraints: + json["constraints"] == null + ? undefined + : (json["constraints"] as Array).map(SqlV1MaterializedTableConstraintFromJSON), + distributed_by: + json["distributed_by"] == null + ? undefined + : SqlV1MaterializedTableDistributionFromJSON(json["distributed_by"]), + query: json["query"] == null ? undefined : json["query"], + }; } export function SqlV1MaterializedTableSpecToJSON(json: any): SqlV1MaterializedTableSpec { - return SqlV1MaterializedTableSpecToJSONTyped(json, false); + return SqlV1MaterializedTableSpecToJSONTyped(json, false); } -export function SqlV1MaterializedTableSpecToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableSpecToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'compute_pool_id': value['compute_pool_id'], - 'principal': value['principal'], - 'stopped': value['stopped'], - 'table_options': value['table_options'], - 'session_options': value['session_options'], - 'columns': value['columns'] == null ? undefined : ((value['columns'] as Array).map(SqlV1MaterializedTableColumnDetailsToJSON)), - 'watermark': SqlV1MaterializedTableWatermarkToJSON(value['watermark']), - 'constraints': value['constraints'] == null ? undefined : ((value['constraints'] as Array).map(SqlV1MaterializedTableConstraintToJSON)), - 'distributed_by': SqlV1MaterializedTableDistributionToJSON(value['distributed_by']), - 'query': value['query'], - }; + return { + compute_pool_id: value["compute_pool_id"], + principal: value["principal"], + stopped: value["stopped"], + table_options: value["table_options"], + session_options: value["session_options"], + columns: + value["columns"] == null + ? undefined + : (value["columns"] as Array).map(SqlV1MaterializedTableColumnDetailsToJSON), + watermark: SqlV1MaterializedTableWatermarkToJSON(value["watermark"]), + constraints: + value["constraints"] == null + ? undefined + : (value["constraints"] as Array).map(SqlV1MaterializedTableConstraintToJSON), + distributed_by: SqlV1MaterializedTableDistributionToJSON(value["distributed_by"]), + query: value["query"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts index 8f87b115f6..860cf496df 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ScalingStatus } from './SqlV1ScalingStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ScalingStatus } from "./SqlV1ScalingStatus"; import { - SqlV1ScalingStatusFromJSON, - SqlV1ScalingStatusFromJSONTyped, - SqlV1ScalingStatusToJSON, - SqlV1ScalingStatusToJSONTyped, -} from './SqlV1ScalingStatus'; -import type { SqlV1StatementWarning } from './SqlV1StatementWarning'; + SqlV1ScalingStatusFromJSON, + SqlV1ScalingStatusFromJSONTyped, + SqlV1ScalingStatusToJSON, + SqlV1ScalingStatusToJSONTyped, +} from "./SqlV1ScalingStatus"; +import type { SqlV1StatementWarning } from "./SqlV1StatementWarning"; import { - SqlV1StatementWarningFromJSON, - SqlV1StatementWarningFromJSONTyped, - SqlV1StatementWarningToJSON, - SqlV1StatementWarningToJSONTyped, -} from './SqlV1StatementWarning'; + SqlV1StatementWarningFromJSON, + SqlV1StatementWarningFromJSONTyped, + SqlV1StatementWarningToJSON, + SqlV1StatementWarningToJSONTyped, +} from "./SqlV1StatementWarning"; /** * The status of the Materialized Table. @@ -34,87 +34,101 @@ import { * @interface SqlV1MaterializedTableStatus */ export interface SqlV1MaterializedTableStatus { - /** - * The lifecycle phase of the materialized table. - * @type {string} - * @memberof SqlV1MaterializedTableStatus - */ - phase?: string; - /** - * Optional. Human-readable description of phase. - * @type {string} - * @memberof SqlV1MaterializedTableStatus - */ - detail?: string; - /** - * List of warnings encountered during materialized table execution. - * @type {Array} - * @memberof SqlV1MaterializedTableStatus - */ - warnings?: Array; - /** - * Entire Materialized Table statement as submitted by user e.g CREATE OR ALTER MATERIALIZED TABLE ... - * @type {string} - * @memberof SqlV1MaterializedTableStatus - */ - creation_statement?: string; - /** - * - * @type {SqlV1ScalingStatus} - * @memberof SqlV1MaterializedTableStatus - */ - scaling_status?: SqlV1ScalingStatus; - /** - * Represents the evolution history of the Materialized Table. The current value indicates the latest version. - * @type {number} - * @memberof SqlV1MaterializedTableStatus - */ - version?: number; + /** + * The lifecycle phase of the materialized table. + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + phase?: string; + /** + * Optional. Human-readable description of phase. + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + detail?: string; + /** + * List of warnings encountered during materialized table execution. + * @type {Array} + * @memberof SqlV1MaterializedTableStatus + */ + warnings?: Array; + /** + * Entire Materialized Table statement as submitted by user e.g CREATE OR ALTER MATERIALIZED TABLE ... + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + creation_statement?: string; + /** + * + * @type {SqlV1ScalingStatus} + * @memberof SqlV1MaterializedTableStatus + */ + scaling_status?: SqlV1ScalingStatus; + /** + * Represents the evolution history of the Materialized Table. The current value indicates the latest version. + * @type {number} + * @memberof SqlV1MaterializedTableStatus + */ + version?: number; } /** * Check if a given object implements the SqlV1MaterializedTableStatus interface. */ -export function instanceOfSqlV1MaterializedTableStatus(value: object): value is SqlV1MaterializedTableStatus { - return true; +export function instanceOfSqlV1MaterializedTableStatus( + value: object, +): value is SqlV1MaterializedTableStatus { + return true; } export function SqlV1MaterializedTableStatusFromJSON(json: any): SqlV1MaterializedTableStatus { - return SqlV1MaterializedTableStatusFromJSONTyped(json, false); + return SqlV1MaterializedTableStatusFromJSONTyped(json, false); } -export function SqlV1MaterializedTableStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableStatus { - if (json == null) { - return json; - } - return { - - 'phase': json['phase'] == null ? undefined : json['phase'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(SqlV1StatementWarningFromJSON)), - 'creation_statement': json['creation_statement'] == null ? undefined : json['creation_statement'], - 'scaling_status': json['scaling_status'] == null ? undefined : SqlV1ScalingStatusFromJSON(json['scaling_status']), - 'version': json['version'] == null ? undefined : json['version'], - }; +export function SqlV1MaterializedTableStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"] == null ? undefined : json["phase"], + detail: json["detail"] == null ? undefined : json["detail"], + warnings: + json["warnings"] == null + ? undefined + : (json["warnings"] as Array).map(SqlV1StatementWarningFromJSON), + creation_statement: json["creation_statement"] == null ? undefined : json["creation_statement"], + scaling_status: + json["scaling_status"] == null + ? undefined + : SqlV1ScalingStatusFromJSON(json["scaling_status"]), + version: json["version"] == null ? undefined : json["version"], + }; } export function SqlV1MaterializedTableStatusToJSON(json: any): SqlV1MaterializedTableStatus { - return SqlV1MaterializedTableStatusToJSONTyped(json, false); + return SqlV1MaterializedTableStatusToJSONTyped(json, false); } -export function SqlV1MaterializedTableStatusToJSONTyped(value?: SqlV1MaterializedTableStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableStatusToJSONTyped( + value?: SqlV1MaterializedTableStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'phase': value['phase'], - 'detail': value['detail'], - 'warnings': value['warnings'] == null ? undefined : ((value['warnings'] as Array).map(SqlV1StatementWarningToJSON)), - 'creation_statement': value['creation_statement'], - 'scaling_status': SqlV1ScalingStatusToJSON(value['scaling_status']), - 'version': value['version'], - }; + return { + phase: value["phase"], + detail: value["detail"], + warnings: + value["warnings"] == null + ? undefined + : (value["warnings"] as Array).map(SqlV1StatementWarningToJSON), + creation_statement: value["creation_statement"], + scaling_status: SqlV1ScalingStatusToJSON(value["scaling_status"]), + version: value["version"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts index b29b870ae0..0d42a92982 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableVersionSpec } from './SqlV1MaterializedTableVersionSpec'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableVersionSpec } from "./SqlV1MaterializedTableVersionSpec"; import { - SqlV1MaterializedTableVersionSpecFromJSON, - SqlV1MaterializedTableVersionSpecFromJSONTyped, - SqlV1MaterializedTableVersionSpecToJSON, - SqlV1MaterializedTableVersionSpecToJSONTyped, -} from './SqlV1MaterializedTableVersionSpec'; -import type { SqlV1MaterializedTableVersionMetadata } from './SqlV1MaterializedTableVersionMetadata'; + SqlV1MaterializedTableVersionSpecFromJSON, + SqlV1MaterializedTableVersionSpecFromJSONTyped, + SqlV1MaterializedTableVersionSpecToJSON, + SqlV1MaterializedTableVersionSpecToJSONTyped, +} from "./SqlV1MaterializedTableVersionSpec"; +import type { SqlV1MaterializedTableVersionMetadata } from "./SqlV1MaterializedTableVersionMetadata"; import { - SqlV1MaterializedTableVersionMetadataFromJSON, - SqlV1MaterializedTableVersionMetadataFromJSONTyped, - SqlV1MaterializedTableVersionMetadataToJSON, - SqlV1MaterializedTableVersionMetadataToJSONTyped, -} from './SqlV1MaterializedTableVersionMetadata'; + SqlV1MaterializedTableVersionMetadataFromJSON, + SqlV1MaterializedTableVersionMetadataFromJSONTyped, + SqlV1MaterializedTableVersionMetadataToJSON, + SqlV1MaterializedTableVersionMetadataToJSONTyped, +} from "./SqlV1MaterializedTableVersionMetadata"; /** * Represents a specific version of a Materialized Table resource. @@ -34,115 +34,122 @@ import { * @interface SqlV1MaterializedTableVersion */ export interface SqlV1MaterializedTableVersion { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1MaterializedTableVersion - */ - readonly api_version: SqlV1MaterializedTableVersionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1MaterializedTableVersion - */ - readonly kind: SqlV1MaterializedTableVersionKindEnum; - /** - * - * @type {SqlV1MaterializedTableVersionMetadata} - * @memberof SqlV1MaterializedTableVersion - */ - metadata: SqlV1MaterializedTableVersionMetadata; - /** - * The resource version name, unique within the Kafka cluster. - * Name conforms to DNS Subdomain (RFC 1123). - * - * @type {string} - * @memberof SqlV1MaterializedTableVersion - */ - readonly name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1MaterializedTableVersion - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1MaterializedTableVersion - */ - readonly environment_id: string; - /** - * - * @type {SqlV1MaterializedTableVersionSpec} - * @memberof SqlV1MaterializedTableVersion - */ - spec: SqlV1MaterializedTableVersionSpec; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly api_version: SqlV1MaterializedTableVersionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly kind: SqlV1MaterializedTableVersionKindEnum; + /** + * + * @type {SqlV1MaterializedTableVersionMetadata} + * @memberof SqlV1MaterializedTableVersion + */ + metadata: SqlV1MaterializedTableVersionMetadata; + /** + * The resource version name, unique within the Kafka cluster. + * Name conforms to DNS Subdomain (RFC 1123). + * + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableVersionSpec} + * @memberof SqlV1MaterializedTableVersion + */ + spec: SqlV1MaterializedTableVersionSpec; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableVersionApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableVersionKindEnum { - MaterializedTableVersion = 'MaterializedTableVersion' + MaterializedTableVersion = "MaterializedTableVersion", } - /** * Check if a given object implements the SqlV1MaterializedTableVersion interface. */ -export function instanceOfSqlV1MaterializedTableVersion(value: object): value is SqlV1MaterializedTableVersion { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableVersion( + value: object, +): value is SqlV1MaterializedTableVersion { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function SqlV1MaterializedTableVersionFromJSON(json: any): SqlV1MaterializedTableVersion { - return SqlV1MaterializedTableVersionFromJSONTyped(json, false); + return SqlV1MaterializedTableVersionFromJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersion { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1MaterializedTableVersionMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': SqlV1MaterializedTableVersionSpecFromJSON(json['spec']), - }; +export function SqlV1MaterializedTableVersionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersion { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableVersionMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1MaterializedTableVersionSpecFromJSON(json["spec"]), + }; } export function SqlV1MaterializedTableVersionToJSON(json: any): SqlV1MaterializedTableVersion { - return SqlV1MaterializedTableVersionToJSONTyped(json, false); + return SqlV1MaterializedTableVersionToJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableVersionToJSONTyped( + value?: Omit< + SqlV1MaterializedTableVersion, + "api_version" | "kind" | "name" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1MaterializedTableVersionMetadataToJSON(value['metadata']), - 'spec': SqlV1MaterializedTableVersionSpecToJSON(value['spec']), - }; + return { + metadata: SqlV1MaterializedTableVersionMetadataToJSON(value["metadata"]), + spec: SqlV1MaterializedTableVersionSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts index 2b7ad39435..b29baf1f2e 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableVersion } from './SqlV1MaterializedTableVersion'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableVersion } from "./SqlV1MaterializedTableVersion"; import { - SqlV1MaterializedTableVersionFromJSON, - SqlV1MaterializedTableVersionFromJSONTyped, - SqlV1MaterializedTableVersionToJSON, - SqlV1MaterializedTableVersionToJSONTyped, -} from './SqlV1MaterializedTableVersion'; -import type { ListMeta } from './ListMeta'; + SqlV1MaterializedTableVersionFromJSON, + SqlV1MaterializedTableVersionFromJSONTyped, + SqlV1MaterializedTableVersionToJSON, + SqlV1MaterializedTableVersionToJSONTyped, +} from "./SqlV1MaterializedTableVersion"; +import type { ListMeta } from "./ListMeta"; import { - ListMetaFromJSON, - ListMetaFromJSONTyped, - ListMetaToJSON, - ListMetaToJSONTyped, -} from './ListMeta'; + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; /** * A list of Materialized Table Version resources. @@ -34,89 +34,97 @@ import { * @interface SqlV1MaterializedTableVersionList */ export interface SqlV1MaterializedTableVersionList { - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableVersionList - */ - readonly api_version: SqlV1MaterializedTableVersionListApiVersionEnum; - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableVersionList - */ - readonly kind: SqlV1MaterializedTableVersionListKindEnum; - /** - * - * @type {ListMeta} - * @memberof SqlV1MaterializedTableVersionList - */ - metadata: ListMeta; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1MaterializedTableVersionList - */ - data: Set; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionList + */ + readonly api_version: SqlV1MaterializedTableVersionListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionList + */ + readonly kind: SqlV1MaterializedTableVersionListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1MaterializedTableVersionList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1MaterializedTableVersionList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableVersionListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MaterializedTableVersionListKindEnum { - MaterializedTableVersionList = 'MaterializedTableVersionList' + MaterializedTableVersionList = "MaterializedTableVersionList", } - /** * Check if a given object implements the SqlV1MaterializedTableVersionList interface. */ -export function instanceOfSqlV1MaterializedTableVersionList(value: object): value is SqlV1MaterializedTableVersionList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableVersionList( + value: object, +): value is SqlV1MaterializedTableVersionList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function SqlV1MaterializedTableVersionListFromJSON(json: any): SqlV1MaterializedTableVersionList { - return SqlV1MaterializedTableVersionListFromJSONTyped(json, false); +export function SqlV1MaterializedTableVersionListFromJSON( + json: any, +): SqlV1MaterializedTableVersionList { + return SqlV1MaterializedTableVersionListFromJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersionList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ListMetaFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(SqlV1MaterializedTableVersionFromJSON))), - }; +export function SqlV1MaterializedTableVersionListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersionList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1MaterializedTableVersionFromJSON)), + }; } -export function SqlV1MaterializedTableVersionListToJSON(json: any): SqlV1MaterializedTableVersionList { - return SqlV1MaterializedTableVersionListToJSONTyped(json, false); +export function SqlV1MaterializedTableVersionListToJSON( + json: any, +): SqlV1MaterializedTableVersionList { + return SqlV1MaterializedTableVersionListToJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableVersionListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ListMetaToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(SqlV1MaterializedTableVersionToJSON)), - }; + return { + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1MaterializedTableVersionToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts index 46df9831e2..97b31aab66 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts @@ -12,87 +12,96 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1MaterializedTableVersionMetadata */ export interface SqlV1MaterializedTableVersionMetadata { - /** - * - * @type {any} - * @memberof SqlV1MaterializedTableVersionMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1MaterializedTableVersionMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1MaterializedTableVersionMetadata - */ - updated_at?: Date; - /** - * A system generated globally unique identifier for this resource. - * @type {string} - * @memberof SqlV1MaterializedTableVersionMetadata - */ - uid?: string; - /** - * A system generated string that uniquely identifies the version of this resource. - * @type {string} - * @memberof SqlV1MaterializedTableVersionMetadata - */ - resource_version?: string; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + resource_version?: string; } /** * Check if a given object implements the SqlV1MaterializedTableVersionMetadata interface. */ -export function instanceOfSqlV1MaterializedTableVersionMetadata(value: object): value is SqlV1MaterializedTableVersionMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableVersionMetadata( + value: object, +): value is SqlV1MaterializedTableVersionMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } -export function SqlV1MaterializedTableVersionMetadataFromJSON(json: any): SqlV1MaterializedTableVersionMetadata { - return SqlV1MaterializedTableVersionMetadataFromJSONTyped(json, false); +export function SqlV1MaterializedTableVersionMetadataFromJSON( + json: any, +): SqlV1MaterializedTableVersionMetadata { + return SqlV1MaterializedTableVersionMetadataFromJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - }; +export function SqlV1MaterializedTableVersionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + }; } -export function SqlV1MaterializedTableVersionMetadataToJSON(json: any): SqlV1MaterializedTableVersionMetadata { - return SqlV1MaterializedTableVersionMetadataToJSONTyped(json, false); +export function SqlV1MaterializedTableVersionMetadataToJSON( + json: any, +): SqlV1MaterializedTableVersionMetadata { + return SqlV1MaterializedTableVersionMetadataToJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionMetadataToJSONTyped(value?: SqlV1MaterializedTableVersionMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableVersionMetadataToJSONTyped( + value?: SqlV1MaterializedTableVersionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts index a108bf7e34..4becdc6156 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ResourceChange } from './SqlV1ResourceChange'; +import { mapValues } from "../runtime"; +import type { SqlV1ResourceChange } from "./SqlV1ResourceChange"; import { - SqlV1ResourceChangeFromJSON, - SqlV1ResourceChangeFromJSONTyped, - SqlV1ResourceChangeToJSON, - SqlV1ResourceChangeToJSONTyped, -} from './SqlV1ResourceChange'; + SqlV1ResourceChangeFromJSON, + SqlV1ResourceChangeFromJSONTyped, + SqlV1ResourceChangeToJSON, + SqlV1ResourceChangeToJSONTyped, +} from "./SqlV1ResourceChange"; /** * The specifications of the Materialized Table Version. @@ -27,63 +27,74 @@ import { * @interface SqlV1MaterializedTableVersionSpec */ export interface SqlV1MaterializedTableVersionSpec { - /** - * The version number of the Materialized Table. - * @type {number} - * @memberof SqlV1MaterializedTableVersionSpec - */ - readonly version: number; - /** - * The full SQL statement for the materialized table as generated by SHOW CREATE MATERIALIZED TABLE at the time of the evolution. - * - * @type {string} - * @memberof SqlV1MaterializedTableVersionSpec - */ - readonly statement: string; - /** - * Changes affecting resources since the previous version. - * @type {Array} - * @memberof SqlV1MaterializedTableVersionSpec - */ - readonly changes?: Array; + /** + * The version number of the Materialized Table. + * @type {number} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly version: number; + /** + * The full SQL statement for the materialized table as generated by SHOW CREATE MATERIALIZED TABLE at the time of the evolution. + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly statement: string; + /** + * Changes affecting resources since the previous version. + * @type {Array} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly changes?: Array; } /** * Check if a given object implements the SqlV1MaterializedTableVersionSpec interface. */ -export function instanceOfSqlV1MaterializedTableVersionSpec(value: object): value is SqlV1MaterializedTableVersionSpec { - if (!('version' in value) || value['version'] === undefined) return false; - if (!('statement' in value) || value['statement'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableVersionSpec( + value: object, +): value is SqlV1MaterializedTableVersionSpec { + if (!("version" in value) || value["version"] === undefined) return false; + if (!("statement" in value) || value["statement"] === undefined) return false; + return true; } -export function SqlV1MaterializedTableVersionSpecFromJSON(json: any): SqlV1MaterializedTableVersionSpec { - return SqlV1MaterializedTableVersionSpecFromJSONTyped(json, false); +export function SqlV1MaterializedTableVersionSpecFromJSON( + json: any, +): SqlV1MaterializedTableVersionSpec { + return SqlV1MaterializedTableVersionSpecFromJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableVersionSpec { - if (json == null) { - return json; - } - return { - - 'version': json['version'], - 'statement': json['statement'], - 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(SqlV1ResourceChangeFromJSON)), - }; +export function SqlV1MaterializedTableVersionSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersionSpec { + if (json == null) { + return json; + } + return { + version: json["version"], + statement: json["statement"], + changes: + json["changes"] == null + ? undefined + : (json["changes"] as Array).map(SqlV1ResourceChangeFromJSON), + }; } -export function SqlV1MaterializedTableVersionSpecToJSON(json: any): SqlV1MaterializedTableVersionSpec { - return SqlV1MaterializedTableVersionSpecToJSONTyped(json, false); +export function SqlV1MaterializedTableVersionSpecToJSON( + json: any, +): SqlV1MaterializedTableVersionSpec { + return SqlV1MaterializedTableVersionSpecToJSONTyped(json, false); } -export function SqlV1MaterializedTableVersionSpecToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableVersionSpecToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts index 83e8c6b639..c80614b2f9 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts @@ -12,88 +12,93 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Represents a non-fatal issue encountered during materialized table processing. * @export * @interface SqlV1MaterializedTableWarning */ export interface SqlV1MaterializedTableWarning { - /** - * Indicates the severity of the warning. - * - * LOW: Indicates a low severity warning and for informing the user. - * - * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. - * - * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. - * - * @type {string} - * @memberof SqlV1MaterializedTableWarning - */ - severity: string; - /** - * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1MaterializedTableWarning - */ - readonly created_at: Date; - /** - * A machine-readable short, upper case summary delimited by underscore. - * @type {string} - * @memberof SqlV1MaterializedTableWarning - */ - reason: string; - /** - * A human-readable string containing the description of the warning. - * @type {string} - * @memberof SqlV1MaterializedTableWarning - */ - message: string; + /** + * Indicates the severity of the warning. + * + * LOW: Indicates a low severity warning and for informing the user. + * + * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + * + * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + * + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + severity: string; + /** + * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableWarning + */ + readonly created_at: Date; + /** + * A machine-readable short, upper case summary delimited by underscore. + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + reason: string; + /** + * A human-readable string containing the description of the warning. + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + message: string; } /** * Check if a given object implements the SqlV1MaterializedTableWarning interface. */ -export function instanceOfSqlV1MaterializedTableWarning(value: object): value is SqlV1MaterializedTableWarning { - if (!('severity' in value) || value['severity'] === undefined) return false; - if (!('created_at' in value) || value['created_at'] === undefined) return false; - if (!('reason' in value) || value['reason'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - return true; +export function instanceOfSqlV1MaterializedTableWarning( + value: object, +): value is SqlV1MaterializedTableWarning { + if (!("severity" in value) || value["severity"] === undefined) return false; + if (!("created_at" in value) || value["created_at"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + if (!("message" in value) || value["message"] === undefined) return false; + return true; } export function SqlV1MaterializedTableWarningFromJSON(json: any): SqlV1MaterializedTableWarning { - return SqlV1MaterializedTableWarningFromJSONTyped(json, false); + return SqlV1MaterializedTableWarningFromJSONTyped(json, false); } -export function SqlV1MaterializedTableWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableWarning { - if (json == null) { - return json; - } - return { - - 'severity': json['severity'], - 'created_at': (new Date(json['created_at'])), - 'reason': json['reason'], - 'message': json['message'], - }; +export function SqlV1MaterializedTableWarningFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableWarning { + if (json == null) { + return json; + } + return { + severity: json["severity"], + created_at: new Date(json["created_at"]), + reason: json["reason"], + message: json["message"], + }; } export function SqlV1MaterializedTableWarningToJSON(json: any): SqlV1MaterializedTableWarning { - return SqlV1MaterializedTableWarningToJSONTyped(json, false); + return SqlV1MaterializedTableWarningToJSONTyped(json, false); } -export function SqlV1MaterializedTableWarningToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableWarningToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'severity': value['severity'], - 'reason': value['reason'], - 'message': value['message'], - }; + return { + severity: value["severity"], + reason: value["reason"], + message: value["message"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts index 43fa9c97f6..6881eb428a 100644 --- a/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts @@ -12,62 +12,69 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Watermark strategy for the Materialized Table resource. * @export * @interface SqlV1MaterializedTableWatermark */ export interface SqlV1MaterializedTableWatermark { - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableWatermark - */ - column_name?: string; - /** - * - * @type {string} - * @memberof SqlV1MaterializedTableWatermark - */ - expression?: string; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableWatermark + */ + column_name?: string; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableWatermark + */ + expression?: string; } /** * Check if a given object implements the SqlV1MaterializedTableWatermark interface. */ -export function instanceOfSqlV1MaterializedTableWatermark(value: object): value is SqlV1MaterializedTableWatermark { - return true; +export function instanceOfSqlV1MaterializedTableWatermark( + value: object, +): value is SqlV1MaterializedTableWatermark { + return true; } -export function SqlV1MaterializedTableWatermarkFromJSON(json: any): SqlV1MaterializedTableWatermark { - return SqlV1MaterializedTableWatermarkFromJSONTyped(json, false); +export function SqlV1MaterializedTableWatermarkFromJSON( + json: any, +): SqlV1MaterializedTableWatermark { + return SqlV1MaterializedTableWatermarkFromJSONTyped(json, false); } -export function SqlV1MaterializedTableWatermarkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MaterializedTableWatermark { - if (json == null) { - return json; - } - return { - - 'column_name': json['column_name'] == null ? undefined : json['column_name'], - 'expression': json['expression'] == null ? undefined : json['expression'], - }; +export function SqlV1MaterializedTableWatermarkFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableWatermark { + if (json == null) { + return json; + } + return { + column_name: json["column_name"] == null ? undefined : json["column_name"], + expression: json["expression"] == null ? undefined : json["expression"], + }; } export function SqlV1MaterializedTableWatermarkToJSON(json: any): SqlV1MaterializedTableWatermark { - return SqlV1MaterializedTableWatermarkToJSONTyped(json, false); + return SqlV1MaterializedTableWatermarkToJSONTyped(json, false); } -export function SqlV1MaterializedTableWatermarkToJSONTyped(value?: SqlV1MaterializedTableWatermark | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MaterializedTableWatermarkToJSONTyped( + value?: SqlV1MaterializedTableWatermark | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'column_name': value['column_name'], - 'expression': value['expression'], - }; + return { + column_name: value["column_name"], + expression: value["expression"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1MetadataColumn.ts b/src/clients/flinkSql/models/SqlV1MetadataColumn.ts index 646c138b42..8ea0018b86 100644 --- a/src/clients/flinkSql/models/SqlV1MetadataColumn.ts +++ b/src/clients/flinkSql/models/SqlV1MetadataColumn.ts @@ -12,107 +12,109 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Metadata columns reference system properties. * @export * @interface SqlV1MetadataColumn */ export interface SqlV1MetadataColumn { - /** - * - * @type {any} - * @memberof SqlV1MetadataColumn - */ - name: any | null; - /** - * - * @type {any} - * @memberof SqlV1MetadataColumn - */ - type: any | null; - /** - * A comment or description for the column. - * @type {string} - * @memberof SqlV1MetadataColumn - */ - comment?: string; - /** - * The kind of column. - * @type {string} - * @memberof SqlV1MetadataColumn - */ - kind: SqlV1MetadataColumnKindEnum; - /** - * The system metadata key to reference. - * @type {string} - * @memberof SqlV1MetadataColumn - */ - metadata_key: string; - /** - * Indicates if the metadata column is virtual. - * @type {boolean} - * @memberof SqlV1MetadataColumn - */ - virtual?: boolean; + /** + * + * @type {any} + * @memberof SqlV1MetadataColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1MetadataColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + kind: SqlV1MetadataColumnKindEnum; + /** + * The system metadata key to reference. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + metadata_key: string; + /** + * Indicates if the metadata column is virtual. + * @type {boolean} + * @memberof SqlV1MetadataColumn + */ + virtual?: boolean; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1MetadataColumnKindEnum { - Metadata = 'Metadata' + Metadata = "Metadata", } - /** * Check if a given object implements the SqlV1MetadataColumn interface. */ export function instanceOfSqlV1MetadataColumn(value: object): value is SqlV1MetadataColumn { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata_key' in value) || value['metadata_key'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata_key" in value) || value["metadata_key"] === undefined) return false; + return true; } export function SqlV1MetadataColumnFromJSON(json: any): SqlV1MetadataColumn { - return SqlV1MetadataColumnFromJSONTyped(json, false); + return SqlV1MetadataColumnFromJSONTyped(json, false); } -export function SqlV1MetadataColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1MetadataColumn { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'type': json['type'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'kind': json['kind'], - 'metadata_key': json['metadata_key'], - 'virtual': json['virtual'] == null ? undefined : json['virtual'], - }; +export function SqlV1MetadataColumnFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MetadataColumn { + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + comment: json["comment"] == null ? undefined : json["comment"], + kind: json["kind"], + metadata_key: json["metadata_key"], + virtual: json["virtual"] == null ? undefined : json["virtual"], + }; } export function SqlV1MetadataColumnToJSON(json: any): SqlV1MetadataColumn { - return SqlV1MetadataColumnToJSONTyped(json, false); + return SqlV1MetadataColumnToJSONTyped(json, false); } -export function SqlV1MetadataColumnToJSONTyped(value?: SqlV1MetadataColumn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1MetadataColumnToJSONTyped( + value?: SqlV1MetadataColumn | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'type': value['type'], - 'comment': value['comment'], - 'kind': value['kind'], - 'metadata_key': value['metadata_key'], - 'virtual': value['virtual'], - }; + return { + name: value["name"], + type: value["type"], + comment: value["comment"], + kind: value["kind"], + metadata_key: value["metadata_key"], + virtual: value["virtual"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts b/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts index 659310de5f..b6d09fca93 100644 --- a/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts +++ b/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts @@ -12,90 +12,92 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Physical columns define the structure of the table and the data types of its fields. * @export * @interface SqlV1PhysicalColumn */ export interface SqlV1PhysicalColumn { - /** - * - * @type {any} - * @memberof SqlV1PhysicalColumn - */ - name: any | null; - /** - * - * @type {any} - * @memberof SqlV1PhysicalColumn - */ - type: any | null; - /** - * A comment or description for the column. - * @type {string} - * @memberof SqlV1PhysicalColumn - */ - comment?: string; - /** - * The kind of column. - * @type {string} - * @memberof SqlV1PhysicalColumn - */ - kind: SqlV1PhysicalColumnKindEnum; + /** + * + * @type {any} + * @memberof SqlV1PhysicalColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1PhysicalColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1PhysicalColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1PhysicalColumn + */ + kind: SqlV1PhysicalColumnKindEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1PhysicalColumnKindEnum { - Physical = 'Physical' + Physical = "Physical", } - /** * Check if a given object implements the SqlV1PhysicalColumn interface. */ export function instanceOfSqlV1PhysicalColumn(value: object): value is SqlV1PhysicalColumn { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + return true; } export function SqlV1PhysicalColumnFromJSON(json: any): SqlV1PhysicalColumn { - return SqlV1PhysicalColumnFromJSONTyped(json, false); + return SqlV1PhysicalColumnFromJSONTyped(json, false); } -export function SqlV1PhysicalColumnFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1PhysicalColumn { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'type': json['type'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'kind': json['kind'], - }; +export function SqlV1PhysicalColumnFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1PhysicalColumn { + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + comment: json["comment"] == null ? undefined : json["comment"], + kind: json["kind"], + }; } export function SqlV1PhysicalColumnToJSON(json: any): SqlV1PhysicalColumn { - return SqlV1PhysicalColumnToJSONTyped(json, false); + return SqlV1PhysicalColumnToJSONTyped(json, false); } -export function SqlV1PhysicalColumnToJSONTyped(value?: SqlV1PhysicalColumn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1PhysicalColumnToJSONTyped( + value?: SqlV1PhysicalColumn | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'type': value['type'], - 'comment': value['comment'], - 'kind': value['kind'], - }; + return { + name: value["name"], + type: value["type"], + comment: value["comment"], + kind: value["kind"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts b/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts index 5d3c0db954..532232bb89 100644 --- a/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts +++ b/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts @@ -12,82 +12,84 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Describes a sensitive piece of information passed in plaintext. - * + * * Confluent only accepts authentication tokens of supported model providers from OrgAdmins and EnvAdmins. * For now, only 'PlainText' provider is supported. It stores authentication token details as opaque bytes in an encrypted form. * This option offers limited security as it only provides a single level of encryption. - * + * * @export * @interface SqlV1PlaintextProvider */ export interface SqlV1PlaintextProvider { - /** - * Plaintext Provider Kind Type - * - * @type {string} - * @memberof SqlV1PlaintextProvider - */ - kind?: SqlV1PlaintextProviderKindEnum; - /** - * Authentication token in plaintext JSON string. - * For composite tokens, provide them as JSON. - * This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. - * - * Scoped to an endpoint of a `Connection` resource. - * - * @type {string} - * @memberof SqlV1PlaintextProvider - */ - data?: string; + /** + * Plaintext Provider Kind Type + * + * @type {string} + * @memberof SqlV1PlaintextProvider + */ + kind?: SqlV1PlaintextProviderKindEnum; + /** + * Authentication token in plaintext JSON string. + * For composite tokens, provide them as JSON. + * This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. + * + * Scoped to an endpoint of a `Connection` resource. + * + * @type {string} + * @memberof SqlV1PlaintextProvider + */ + data?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1PlaintextProviderKindEnum { - PlaintextProvider = 'PlaintextProvider' + PlaintextProvider = "PlaintextProvider", } - /** * Check if a given object implements the SqlV1PlaintextProvider interface. */ export function instanceOfSqlV1PlaintextProvider(value: object): value is SqlV1PlaintextProvider { - return true; + return true; } export function SqlV1PlaintextProviderFromJSON(json: any): SqlV1PlaintextProvider { - return SqlV1PlaintextProviderFromJSONTyped(json, false); + return SqlV1PlaintextProviderFromJSONTyped(json, false); } -export function SqlV1PlaintextProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1PlaintextProvider { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'] == null ? undefined : json['kind'], - 'data': json['data'] == null ? undefined : json['data'], - }; +export function SqlV1PlaintextProviderFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1PlaintextProvider { + if (json == null) { + return json; + } + return { + kind: json["kind"] == null ? undefined : json["kind"], + data: json["data"] == null ? undefined : json["data"], + }; } export function SqlV1PlaintextProviderToJSON(json: any): SqlV1PlaintextProvider { - return SqlV1PlaintextProviderToJSONTyped(json, false); + return SqlV1PlaintextProviderToJSONTyped(json, false); } -export function SqlV1PlaintextProviderToJSONTyped(value?: SqlV1PlaintextProvider | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1PlaintextProviderToJSONTyped( + value?: SqlV1PlaintextProvider | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'data': value['data'], - }; + return { + kind: value["kind"], + data: value["data"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ResourceChange.ts b/src/clients/flinkSql/models/SqlV1ResourceChange.ts index 113ed20ac5..d3f8d90ad4 100644 --- a/src/clients/flinkSql/models/SqlV1ResourceChange.ts +++ b/src/clients/flinkSql/models/SqlV1ResourceChange.ts @@ -12,91 +12,94 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Details of a change to a specific resource. * @export * @interface SqlV1ResourceChange */ export interface SqlV1ResourceChange { - /** - * The type of resource that was changed. - * @type {string} - * @memberof SqlV1ResourceChange - */ - kind: string; - /** - * The environment containing the resource. Can be either the environment name or ID, depending on how it is referenced in the SQL statement text. - * @type {string} - * @memberof SqlV1ResourceChange - */ - environment_locator: string; - /** - * The database containing the resource. Can be either the database name or ID, depending on how it is referenced in the SQL statement text. - * @type {string} - * @memberof SqlV1ResourceChange - */ - database_locator: string; - /** - * The name of the resource, unique within its scope (environment and database). - * @type {string} - * @memberof SqlV1ResourceChange - */ - name: string; - /** - * Human-readable descriptions of the changes made to this resource. - * @type {Array} - * @memberof SqlV1ResourceChange - */ - details: Array; + /** + * The type of resource that was changed. + * @type {string} + * @memberof SqlV1ResourceChange + */ + kind: string; + /** + * The environment containing the resource. Can be either the environment name or ID, depending on how it is referenced in the SQL statement text. + * @type {string} + * @memberof SqlV1ResourceChange + */ + environment_locator: string; + /** + * The database containing the resource. Can be either the database name or ID, depending on how it is referenced in the SQL statement text. + * @type {string} + * @memberof SqlV1ResourceChange + */ + database_locator: string; + /** + * The name of the resource, unique within its scope (environment and database). + * @type {string} + * @memberof SqlV1ResourceChange + */ + name: string; + /** + * Human-readable descriptions of the changes made to this resource. + * @type {Array} + * @memberof SqlV1ResourceChange + */ + details: Array; } /** * Check if a given object implements the SqlV1ResourceChange interface. */ export function instanceOfSqlV1ResourceChange(value: object): value is SqlV1ResourceChange { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('environment_locator' in value) || value['environment_locator'] === undefined) return false; - if (!('database_locator' in value) || value['database_locator'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('details' in value) || value['details'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("environment_locator" in value) || value["environment_locator"] === undefined) return false; + if (!("database_locator" in value) || value["database_locator"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("details" in value) || value["details"] === undefined) return false; + return true; } export function SqlV1ResourceChangeFromJSON(json: any): SqlV1ResourceChange { - return SqlV1ResourceChangeFromJSONTyped(json, false); + return SqlV1ResourceChangeFromJSONTyped(json, false); } -export function SqlV1ResourceChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ResourceChange { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'environment_locator': json['environment_locator'], - 'database_locator': json['database_locator'], - 'name': json['name'], - 'details': json['details'], - }; +export function SqlV1ResourceChangeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ResourceChange { + if (json == null) { + return json; + } + return { + kind: json["kind"], + environment_locator: json["environment_locator"], + database_locator: json["database_locator"], + name: json["name"], + details: json["details"], + }; } export function SqlV1ResourceChangeToJSON(json: any): SqlV1ResourceChange { - return SqlV1ResourceChangeToJSONTyped(json, false); + return SqlV1ResourceChangeToJSONTyped(json, false); } -export function SqlV1ResourceChangeToJSONTyped(value?: SqlV1ResourceChange | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ResourceChangeToJSONTyped( + value?: SqlV1ResourceChange | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'environment_locator': value['environment_locator'], - 'database_locator': value['database_locator'], - 'name': value['name'], - 'details': value['details'], - }; + return { + kind: value["kind"], + environment_locator: value["environment_locator"], + database_locator: value["database_locator"], + name: value["name"], + details: value["details"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ResultSchema.ts b/src/clients/flinkSql/models/SqlV1ResultSchema.ts index 0dfe79ecf9..e647290917 100644 --- a/src/clients/flinkSql/models/SqlV1ResultSchema.ts +++ b/src/clients/flinkSql/models/SqlV1ResultSchema.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ColumnDetails } from './ColumnDetails'; +import { mapValues } from "../runtime"; +import type { ColumnDetails } from "./ColumnDetails"; import { - ColumnDetailsFromJSON, - ColumnDetailsFromJSONTyped, - ColumnDetailsToJSON, - ColumnDetailsToJSONTyped, -} from './ColumnDetails'; + ColumnDetailsFromJSON, + ColumnDetailsFromJSONTyped, + ColumnDetailsToJSON, + ColumnDetailsToJSONTyped, +} from "./ColumnDetails"; /** * The table columns of the results schema. @@ -27,47 +27,56 @@ import { * @interface SqlV1ResultSchema */ export interface SqlV1ResultSchema { - /** - * The properties of each SQL column in the schema. - * @type {Array} - * @memberof SqlV1ResultSchema - */ - columns?: Array; + /** + * The properties of each SQL column in the schema. + * @type {Array} + * @memberof SqlV1ResultSchema + */ + columns?: Array; } /** * Check if a given object implements the SqlV1ResultSchema interface. */ export function instanceOfSqlV1ResultSchema(value: object): value is SqlV1ResultSchema { - return true; + return true; } export function SqlV1ResultSchemaFromJSON(json: any): SqlV1ResultSchema { - return SqlV1ResultSchemaFromJSONTyped(json, false); + return SqlV1ResultSchemaFromJSONTyped(json, false); } -export function SqlV1ResultSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ResultSchema { - if (json == null) { - return json; - } - return { - - 'columns': json['columns'] == null ? undefined : ((json['columns'] as Array).map(ColumnDetailsFromJSON)), - }; +export function SqlV1ResultSchemaFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ResultSchema { + if (json == null) { + return json; + } + return { + columns: + json["columns"] == null + ? undefined + : (json["columns"] as Array).map(ColumnDetailsFromJSON), + }; } export function SqlV1ResultSchemaToJSON(json: any): SqlV1ResultSchema { - return SqlV1ResultSchemaToJSONTyped(json, false); + return SqlV1ResultSchemaToJSONTyped(json, false); } -export function SqlV1ResultSchemaToJSONTyped(value?: SqlV1ResultSchema | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ResultSchemaToJSONTyped( + value?: SqlV1ResultSchema | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'columns': value['columns'] == null ? undefined : ((value['columns'] as Array).map(ColumnDetailsToJSON)), - }; + return { + columns: + value["columns"] == null + ? undefined + : (value["columns"] as Array).map(ColumnDetailsToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ScalingStatus.ts b/src/clients/flinkSql/models/SqlV1ScalingStatus.ts index e2455c2610..f843b2ca63 100644 --- a/src/clients/flinkSql/models/SqlV1ScalingStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ScalingStatus.ts @@ -12,67 +12,69 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Scaling status for this statement. * @export * @interface SqlV1ScalingStatus */ export interface SqlV1ScalingStatus { - /** - * OK: The statement runs at the right scale. - * - * PENDING_SCALE_DOWN: The statement requires less resources, and will be scaled down in the near future. - * - * PENDING_SCALE_UP: The statement requires more resources, and will be scaled up in the near future. - * - * POOL_EXHAUSTED: The statement requires more resources, but not enough resources are available. - * - * @type {string} - * @memberof SqlV1ScalingStatus - */ - readonly scaling_state?: string; - /** - * The last time the scaling status was updated. - * @type {Date} - * @memberof SqlV1ScalingStatus - */ - readonly last_updated?: Date; + /** + * OK: The statement runs at the right scale. + * + * PENDING_SCALE_DOWN: The statement requires less resources, and will be scaled down in the near future. + * + * PENDING_SCALE_UP: The statement requires more resources, and will be scaled up in the near future. + * + * POOL_EXHAUSTED: The statement requires more resources, but not enough resources are available. + * + * @type {string} + * @memberof SqlV1ScalingStatus + */ + readonly scaling_state?: string; + /** + * The last time the scaling status was updated. + * @type {Date} + * @memberof SqlV1ScalingStatus + */ + readonly last_updated?: Date; } /** * Check if a given object implements the SqlV1ScalingStatus interface. */ export function instanceOfSqlV1ScalingStatus(value: object): value is SqlV1ScalingStatus { - return true; + return true; } export function SqlV1ScalingStatusFromJSON(json: any): SqlV1ScalingStatus { - return SqlV1ScalingStatusFromJSONTyped(json, false); + return SqlV1ScalingStatusFromJSONTyped(json, false); } -export function SqlV1ScalingStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ScalingStatus { - if (json == null) { - return json; - } - return { - - 'scaling_state': json['scaling_state'] == null ? undefined : json['scaling_state'], - 'last_updated': json['last_updated'] == null ? undefined : (new Date(json['last_updated'])), - }; +export function SqlV1ScalingStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ScalingStatus { + if (json == null) { + return json; + } + return { + scaling_state: json["scaling_state"] == null ? undefined : json["scaling_state"], + last_updated: json["last_updated"] == null ? undefined : new Date(json["last_updated"]), + }; } export function SqlV1ScalingStatusToJSON(json: any): SqlV1ScalingStatus { - return SqlV1ScalingStatusToJSONTyped(json, false); + return SqlV1ScalingStatusToJSONTyped(json, false); } -export function SqlV1ScalingStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ScalingStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts b/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts index 75f0ef83e6..12f8ba395b 100644 --- a/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts +++ b/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts @@ -12,76 +12,78 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * State limit status for this statement. * @export * @interface SqlV1StateLimitStatus */ export interface SqlV1StateLimitStatus { - /** - * OK: The statement is within state limits. - * - * APPROACHING_SOFT_LIMIT: The statement is approaching soft state limits. - * - * EXCEEDING_SOFT_LIMIT: The statement is exceeding soft state limits. - * - * APPROACHING_HARD_LIMIT: The statement is approaching hard state limits. - * - * EXCEEDING_HARD_LIMIT: The statement is exceeding hard state limits. - * - * @type {string} - * @memberof SqlV1StateLimitStatus - */ - readonly state_limit_state?: string; - /** - * The last time the state limit status was updated. - * @type {Date} - * @memberof SqlV1StateLimitStatus - */ - readonly last_updated?: Date; - /** - * Details about why state limit status is in its current state. - * @type {string} - * @memberof SqlV1StateLimitStatus - */ - readonly detail?: string; + /** + * OK: The statement is within state limits. + * + * APPROACHING_SOFT_LIMIT: The statement is approaching soft state limits. + * + * EXCEEDING_SOFT_LIMIT: The statement is exceeding soft state limits. + * + * APPROACHING_HARD_LIMIT: The statement is approaching hard state limits. + * + * EXCEEDING_HARD_LIMIT: The statement is exceeding hard state limits. + * + * @type {string} + * @memberof SqlV1StateLimitStatus + */ + readonly state_limit_state?: string; + /** + * The last time the state limit status was updated. + * @type {Date} + * @memberof SqlV1StateLimitStatus + */ + readonly last_updated?: Date; + /** + * Details about why state limit status is in its current state. + * @type {string} + * @memberof SqlV1StateLimitStatus + */ + readonly detail?: string; } /** * Check if a given object implements the SqlV1StateLimitStatus interface. */ export function instanceOfSqlV1StateLimitStatus(value: object): value is SqlV1StateLimitStatus { - return true; + return true; } export function SqlV1StateLimitStatusFromJSON(json: any): SqlV1StateLimitStatus { - return SqlV1StateLimitStatusFromJSONTyped(json, false); + return SqlV1StateLimitStatusFromJSONTyped(json, false); } -export function SqlV1StateLimitStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StateLimitStatus { - if (json == null) { - return json; - } - return { - - 'state_limit_state': json['state_limit_state'] == null ? undefined : json['state_limit_state'], - 'last_updated': json['last_updated'] == null ? undefined : (new Date(json['last_updated'])), - 'detail': json['detail'] == null ? undefined : json['detail'], - }; +export function SqlV1StateLimitStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StateLimitStatus { + if (json == null) { + return json; + } + return { + state_limit_state: json["state_limit_state"] == null ? undefined : json["state_limit_state"], + last_updated: json["last_updated"] == null ? undefined : new Date(json["last_updated"]), + detail: json["detail"] == null ? undefined : json["detail"], + }; } export function SqlV1StateLimitStatusToJSON(json: any): SqlV1StateLimitStatus { - return SqlV1StateLimitStatusToJSONTyped(json, false); + return SqlV1StateLimitStatusToJSONTyped(json, false); } -export function SqlV1StateLimitStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StateLimitStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkSql/models/SqlV1Statement.ts b/src/clients/flinkSql/models/SqlV1Statement.ts index 7631541176..afbdb11994 100644 --- a/src/clients/flinkSql/models/SqlV1Statement.ts +++ b/src/clients/flinkSql/models/SqlV1Statement.ts @@ -12,35 +12,35 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from './SqlV1StatementMetadata'; -import type { SqlV1StatementResult } from './SqlV1StatementResult'; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from "./SqlV1StatementMetadata"; +import type { SqlV1StatementResult } from "./SqlV1StatementResult"; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from './SqlV1StatementResult'; -import type { SqlV1StatementSpec } from './SqlV1StatementSpec'; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from "./SqlV1StatementResult"; +import type { SqlV1StatementSpec } from "./SqlV1StatementSpec"; import { - SqlV1StatementSpecFromJSON, - SqlV1StatementSpecFromJSONTyped, - SqlV1StatementSpecToJSON, - SqlV1StatementSpecToJSONTyped, -} from './SqlV1StatementSpec'; -import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; + SqlV1StatementSpecFromJSON, + SqlV1StatementSpecFromJSONTyped, + SqlV1StatementSpecToJSON, + SqlV1StatementSpecToJSONTyped, +} from "./SqlV1StatementSpec"; +import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from './SqlV1StatementStatus'; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from "./SqlV1StatementStatus"; /** * `Statement` represents a core resource used to model SQL statements for execution. @@ -53,125 +53,128 @@ import { * @interface SqlV1Statement */ export interface SqlV1Statement { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1Statement - */ - readonly api_version?: SqlV1StatementApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1Statement - */ - readonly kind?: SqlV1StatementKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof SqlV1Statement - */ - metadata?: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1Statement - */ - name?: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1Statement - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1Statement - */ - environment_id?: string; - /** - * - * @type {SqlV1StatementSpec} - * @memberof SqlV1Statement - */ - spec?: SqlV1StatementSpec; - /** - * - * @type {SqlV1StatementStatus} - * @memberof SqlV1Statement - */ - status?: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof SqlV1Statement - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Statement + */ + readonly api_version?: SqlV1StatementApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Statement + */ + readonly kind?: SqlV1StatementKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof SqlV1Statement + */ + metadata?: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1Statement + */ + name?: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1Statement + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1Statement + */ + environment_id?: string; + /** + * + * @type {SqlV1StatementSpec} + * @memberof SqlV1Statement + */ + spec?: SqlV1StatementSpec; + /** + * + * @type {SqlV1StatementStatus} + * @memberof SqlV1Statement + */ + status?: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof SqlV1Statement + */ + result?: SqlV1StatementResult; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementKindEnum { - Statement = 'Statement' + Statement = "Statement", } - /** * Check if a given object implements the SqlV1Statement interface. */ export function instanceOfSqlV1Statement(value: object): value is SqlV1Statement { - return true; + return true; } export function SqlV1StatementFromJSON(json: any): SqlV1Statement { - return SqlV1StatementFromJSONTyped(json, false); + return SqlV1StatementFromJSONTyped(json, false); } -export function SqlV1StatementFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Statement { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1StatementMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'spec': json['spec'] == null ? undefined : SqlV1StatementSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1StatementStatusFromJSON(json['status']), - 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), - }; +export function SqlV1StatementFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1Statement { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : SqlV1StatementMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + spec: json["spec"] == null ? undefined : SqlV1StatementSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1StatementStatusFromJSON(json["status"]), + result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), + }; } export function SqlV1StatementToJSON(json: any): SqlV1Statement { - return SqlV1StatementToJSONTyped(json, false); + return SqlV1StatementToJSONTyped(json, false); } -export function SqlV1StatementToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), - 'name': value['name'], - 'organization_id': value['organization_id'], - 'environment_id': value['environment_id'], - 'spec': SqlV1StatementSpecToJSON(value['spec']), - 'status': SqlV1StatementStatusToJSON(value['status']), - 'result': SqlV1StatementResultToJSON(value['result']), - }; + return { + metadata: SqlV1StatementMetadataToJSON(value["metadata"]), + name: value["name"], + organization_id: value["organization_id"], + environment_id: value["environment_id"], + spec: SqlV1StatementSpecToJSON(value["spec"]), + status: SqlV1StatementStatusToJSON(value["status"]), + result: SqlV1StatementResultToJSON(value["result"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementException.ts b/src/clients/flinkSql/models/SqlV1StatementException.ts index 913dff2334..dd694bb3ed 100644 --- a/src/clients/flinkSql/models/SqlV1StatementException.ts +++ b/src/clients/flinkSql/models/SqlV1StatementException.ts @@ -12,84 +12,86 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1StatementException */ export interface SqlV1StatementException { - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementException - */ - kind?: SqlV1StatementExceptionKindEnum; - /** - * Name of the SQL statement exception. - * @type {string} - * @memberof SqlV1StatementException - */ - readonly name?: string; - /** - * Error message of the statement exception. - * @type {string} - * @memberof SqlV1StatementException - */ - readonly message?: string; - /** - * The date and time at which the exception occurred. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementException - */ - readonly timestamp?: Date; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementException + */ + kind?: SqlV1StatementExceptionKindEnum; + /** + * Name of the SQL statement exception. + * @type {string} + * @memberof SqlV1StatementException + */ + readonly name?: string; + /** + * Error message of the statement exception. + * @type {string} + * @memberof SqlV1StatementException + */ + readonly message?: string; + /** + * The date and time at which the exception occurred. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementException + */ + readonly timestamp?: Date; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementExceptionKindEnum { - StatementException = 'StatementException' + StatementException = "StatementException", } - /** * Check if a given object implements the SqlV1StatementException interface. */ export function instanceOfSqlV1StatementException(value: object): value is SqlV1StatementException { - return true; + return true; } export function SqlV1StatementExceptionFromJSON(json: any): SqlV1StatementException { - return SqlV1StatementExceptionFromJSONTyped(json, false); + return SqlV1StatementExceptionFromJSONTyped(json, false); } -export function SqlV1StatementExceptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementException { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'] == null ? undefined : json['kind'], - 'name': json['name'] == null ? undefined : json['name'], - 'message': json['message'] == null ? undefined : json['message'], - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - }; +export function SqlV1StatementExceptionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementException { + if (json == null) { + return json; + } + return { + kind: json["kind"] == null ? undefined : json["kind"], + name: json["name"] == null ? undefined : json["name"], + message: json["message"] == null ? undefined : json["message"], + timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), + }; } export function SqlV1StatementExceptionToJSON(json: any): SqlV1StatementException { - return SqlV1StatementExceptionToJSONTyped(json, false); + return SqlV1StatementExceptionToJSONTyped(json, false); } -export function SqlV1StatementExceptionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementExceptionToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - }; + return { + kind: value["kind"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts b/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts index f7a9d429b7..7b0d287808 100644 --- a/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts +++ b/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementException } from './SqlV1StatementException'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementException } from "./SqlV1StatementException"; import { - SqlV1StatementExceptionFromJSON, - SqlV1StatementExceptionFromJSONTyped, - SqlV1StatementExceptionToJSON, - SqlV1StatementExceptionToJSONTyped, -} from './SqlV1StatementException'; -import type { ExceptionListMeta } from './ExceptionListMeta'; + SqlV1StatementExceptionFromJSON, + SqlV1StatementExceptionFromJSONTyped, + SqlV1StatementExceptionToJSON, + SqlV1StatementExceptionToJSONTyped, +} from "./SqlV1StatementException"; +import type { ExceptionListMeta } from "./ExceptionListMeta"; import { - ExceptionListMetaFromJSON, - ExceptionListMetaFromJSONTyped, - ExceptionListMetaToJSON, - ExceptionListMetaToJSONTyped, -} from './ExceptionListMeta'; + ExceptionListMetaFromJSON, + ExceptionListMetaFromJSONTyped, + ExceptionListMetaToJSON, + ExceptionListMetaToJSONTyped, +} from "./ExceptionListMeta"; /** * StatementExceptionList is a list of exceptions coming from FAILED or FAILING Statements created by @@ -35,91 +35,95 @@ import { * @interface SqlV1StatementExceptionList */ export interface SqlV1StatementExceptionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementExceptionList - */ - api_version: SqlV1StatementExceptionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementExceptionList - */ - kind: SqlV1StatementExceptionListKindEnum; - /** - * - * @type {ExceptionListMeta} - * @memberof SqlV1StatementExceptionList - */ - metadata: ExceptionListMeta; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Array} - * @memberof SqlV1StatementExceptionList - */ - data: Array; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementExceptionList + */ + api_version: SqlV1StatementExceptionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementExceptionList + */ + kind: SqlV1StatementExceptionListKindEnum; + /** + * + * @type {ExceptionListMeta} + * @memberof SqlV1StatementExceptionList + */ + metadata: ExceptionListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Array} + * @memberof SqlV1StatementExceptionList + */ + data: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementExceptionListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementExceptionListKindEnum { - StatementExceptionList = 'StatementExceptionList' + StatementExceptionList = "StatementExceptionList", } - /** * Check if a given object implements the SqlV1StatementExceptionList interface. */ -export function instanceOfSqlV1StatementExceptionList(value: object): value is SqlV1StatementExceptionList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfSqlV1StatementExceptionList( + value: object, +): value is SqlV1StatementExceptionList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function SqlV1StatementExceptionListFromJSON(json: any): SqlV1StatementExceptionList { - return SqlV1StatementExceptionListFromJSONTyped(json, false); + return SqlV1StatementExceptionListFromJSONTyped(json, false); } -export function SqlV1StatementExceptionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementExceptionList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ExceptionListMetaFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(SqlV1StatementExceptionFromJSON)), - }; +export function SqlV1StatementExceptionListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementExceptionList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ExceptionListMetaFromJSON(json["metadata"]), + data: (json["data"] as Array).map(SqlV1StatementExceptionFromJSON), + }; } export function SqlV1StatementExceptionListToJSON(json: any): SqlV1StatementExceptionList { - return SqlV1StatementExceptionListToJSONTyped(json, false); + return SqlV1StatementExceptionListToJSONTyped(json, false); } -export function SqlV1StatementExceptionListToJSONTyped(value?: SqlV1StatementExceptionList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementExceptionListToJSONTyped( + value?: SqlV1StatementExceptionList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': ExceptionListMetaToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(SqlV1StatementExceptionToJSON)), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: ExceptionListMetaToJSON(value["metadata"]), + data: (value["data"] as Array).map(SqlV1StatementExceptionToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementList.ts b/src/clients/flinkSql/models/SqlV1StatementList.ts index ac4536def9..1bed829ecd 100644 --- a/src/clients/flinkSql/models/SqlV1StatementList.ts +++ b/src/clients/flinkSql/models/SqlV1StatementList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementListDataInner } from './SqlV1StatementListDataInner'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementListDataInner } from "./SqlV1StatementListDataInner"; import { - SqlV1StatementListDataInnerFromJSON, - SqlV1StatementListDataInnerFromJSONTyped, - SqlV1StatementListDataInnerToJSON, - SqlV1StatementListDataInnerToJSONTyped, -} from './SqlV1StatementListDataInner'; -import type { SqlV1StatementListMetadata } from './SqlV1StatementListMetadata'; + SqlV1StatementListDataInnerFromJSON, + SqlV1StatementListDataInnerFromJSONTyped, + SqlV1StatementListDataInnerToJSON, + SqlV1StatementListDataInnerToJSONTyped, +} from "./SqlV1StatementListDataInner"; +import type { SqlV1StatementListMetadata } from "./SqlV1StatementListMetadata"; import { - SqlV1StatementListMetadataFromJSON, - SqlV1StatementListMetadataFromJSONTyped, - SqlV1StatementListMetadataToJSON, - SqlV1StatementListMetadataToJSONTyped, -} from './SqlV1StatementListMetadata'; + SqlV1StatementListMetadataFromJSON, + SqlV1StatementListMetadataFromJSONTyped, + SqlV1StatementListMetadataToJSON, + SqlV1StatementListMetadataToJSONTyped, +} from "./SqlV1StatementListMetadata"; /** * `Statement` represents a core resource used to model SQL statements for execution. @@ -39,91 +39,93 @@ import { * @interface SqlV1StatementList */ export interface SqlV1StatementList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementList - */ - api_version: SqlV1StatementListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementList - */ - kind: SqlV1StatementListKindEnum; - /** - * - * @type {SqlV1StatementListMetadata} - * @memberof SqlV1StatementList - */ - metadata: SqlV1StatementListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1StatementList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementList + */ + api_version: SqlV1StatementListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementList + */ + kind: SqlV1StatementListKindEnum; + /** + * + * @type {SqlV1StatementListMetadata} + * @memberof SqlV1StatementList + */ + metadata: SqlV1StatementListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1StatementList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementListKindEnum { - StatementList = 'StatementList' + StatementList = "StatementList", } - /** * Check if a given object implements the SqlV1StatementList interface. */ export function instanceOfSqlV1StatementList(value: object): value is SqlV1StatementList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function SqlV1StatementListFromJSON(json: any): SqlV1StatementList { - return SqlV1StatementListFromJSONTyped(json, false); + return SqlV1StatementListFromJSONTyped(json, false); } -export function SqlV1StatementListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1StatementListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(SqlV1StatementListDataInnerFromJSON))), - }; +export function SqlV1StatementListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1StatementListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1StatementListDataInnerFromJSON)), + }; } export function SqlV1StatementListToJSON(json: any): SqlV1StatementList { - return SqlV1StatementListToJSONTyped(json, false); + return SqlV1StatementListToJSONTyped(json, false); } -export function SqlV1StatementListToJSONTyped(value?: SqlV1StatementList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementListToJSONTyped( + value?: SqlV1StatementList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': SqlV1StatementListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(SqlV1StatementListDataInnerToJSON)), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: SqlV1StatementListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1StatementListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts b/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts index 29622c648d..0eb61fa9d5 100644 --- a/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts @@ -12,162 +12,166 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementMetadata } from './SqlV1StatementMetadata'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementMetadata } from "./SqlV1StatementMetadata"; import { - SqlV1StatementMetadataFromJSON, - SqlV1StatementMetadataFromJSONTyped, - SqlV1StatementMetadataToJSON, - SqlV1StatementMetadataToJSONTyped, -} from './SqlV1StatementMetadata'; -import type { SqlV1StatementResult } from './SqlV1StatementResult'; + SqlV1StatementMetadataFromJSON, + SqlV1StatementMetadataFromJSONTyped, + SqlV1StatementMetadataToJSON, + SqlV1StatementMetadataToJSONTyped, +} from "./SqlV1StatementMetadata"; +import type { SqlV1StatementResult } from "./SqlV1StatementResult"; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from './SqlV1StatementResult'; -import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from "./SqlV1StatementResult"; +import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from './SqlV1StatementStatus'; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from "./SqlV1StatementStatus"; /** - * + * * @export * @interface SqlV1StatementListDataInner */ export interface SqlV1StatementListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - readonly api_version: SqlV1StatementListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - readonly kind: SqlV1StatementListDataInnerKindEnum; - /** - * - * @type {SqlV1StatementMetadata} - * @memberof SqlV1StatementListDataInner - */ - metadata: SqlV1StatementMetadata; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof SqlV1StatementListDataInner - */ - environment_id: string; - /** - * - * @type {object} - * @memberof SqlV1StatementListDataInner - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof SqlV1StatementListDataInner - */ - status: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof SqlV1StatementListDataInner - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + readonly api_version: SqlV1StatementListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + readonly kind: SqlV1StatementListDataInnerKindEnum; + /** + * + * @type {SqlV1StatementMetadata} + * @memberof SqlV1StatementListDataInner + */ + metadata: SqlV1StatementMetadata; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1StatementListDataInner + */ + environment_id: string; + /** + * + * @type {object} + * @memberof SqlV1StatementListDataInner + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof SqlV1StatementListDataInner + */ + status: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof SqlV1StatementListDataInner + */ + result?: SqlV1StatementResult; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementListDataInnerApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementListDataInnerKindEnum { - Statement = 'Statement' + Statement = "Statement", } - /** * Check if a given object implements the SqlV1StatementListDataInner interface. */ -export function instanceOfSqlV1StatementListDataInner(value: object): value is SqlV1StatementListDataInner { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; +export function instanceOfSqlV1StatementListDataInner( + value: object, +): value is SqlV1StatementListDataInner { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } export function SqlV1StatementListDataInnerFromJSON(json: any): SqlV1StatementListDataInner { - return SqlV1StatementListDataInnerFromJSONTyped(json, false); + return SqlV1StatementListDataInnerFromJSONTyped(json, false); } -export function SqlV1StatementListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1StatementMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': json['spec'], - 'status': SqlV1StatementStatusFromJSON(json['status']), - 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), - }; +export function SqlV1StatementListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1StatementMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: SqlV1StatementStatusFromJSON(json["status"]), + result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), + }; } export function SqlV1StatementListDataInnerToJSON(json: any): SqlV1StatementListDataInner { - return SqlV1StatementListDataInnerToJSONTyped(json, false); + return SqlV1StatementListDataInnerToJSONTyped(json, false); } -export function SqlV1StatementListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1StatementMetadataToJSON(value['metadata']), - 'name': value['name'], - 'organization_id': value['organization_id'], - 'environment_id': value['environment_id'], - 'spec': value['spec'], - 'status': SqlV1StatementStatusToJSON(value['status']), - 'result': SqlV1StatementResultToJSON(value['result']), - }; + return { + metadata: SqlV1StatementMetadataToJSON(value["metadata"]), + name: value["name"], + organization_id: value["organization_id"], + environment_id: value["environment_id"], + spec: value["spec"], + status: SqlV1StatementStatusToJSON(value["status"]), + result: SqlV1StatementResultToJSON(value["result"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts b/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts index 40d597a4c6..6b5914295d 100644 --- a/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts @@ -12,86 +12,91 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1StatementListMetadata */ export interface SqlV1StatementListMetadata { - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - self?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - next?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementListMetadata - */ - prev?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementListMetadata + */ + prev?: any | null; } /** * Check if a given object implements the SqlV1StatementListMetadata interface. */ -export function instanceOfSqlV1StatementListMetadata(value: object): value is SqlV1StatementListMetadata { - return true; +export function instanceOfSqlV1StatementListMetadata( + value: object, +): value is SqlV1StatementListMetadata { + return true; } export function SqlV1StatementListMetadataFromJSON(json: any): SqlV1StatementListMetadata { - return SqlV1StatementListMetadataFromJSONTyped(json, false); + return SqlV1StatementListMetadataFromJSONTyped(json, false); } -export function SqlV1StatementListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementListMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - }; +export function SqlV1StatementListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementListMetadata { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + }; } export function SqlV1StatementListMetadataToJSON(json: any): SqlV1StatementListMetadata { - return SqlV1StatementListMetadataToJSONTyped(json, false); + return SqlV1StatementListMetadataToJSONTyped(json, false); } -export function SqlV1StatementListMetadataToJSONTyped(value?: SqlV1StatementListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementListMetadataToJSONTyped( + value?: SqlV1StatementListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - }; + return { + self: value["self"], + next: value["next"], + first: value["first"], + last: value["last"], + prev: value["prev"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementMetadata.ts b/src/clients/flinkSql/models/SqlV1StatementMetadata.ts index 6dc2944c32..1f7ff039b2 100644 --- a/src/clients/flinkSql/models/SqlV1StatementMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1StatementMetadata.ts @@ -12,103 +12,106 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1StatementMetadata */ export interface SqlV1StatementMetadata { - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - resource_version?: any | null; - /** - * - * @type {{ [key: string]: string; }} - * @memberof SqlV1StatementMetadata - */ - labels?: { [key: string]: string; }; - /** - * - * @type {any} - * @memberof SqlV1StatementMetadata - */ - resource_name?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + resource_version?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1StatementMetadata + */ + labels?: { [key: string]: string }; + /** + * + * @type {any} + * @memberof SqlV1StatementMetadata + */ + resource_name?: any | null; } /** * Check if a given object implements the SqlV1StatementMetadata interface. */ export function instanceOfSqlV1StatementMetadata(value: object): value is SqlV1StatementMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function SqlV1StatementMetadataFromJSON(json: any): SqlV1StatementMetadata { - return SqlV1StatementMetadataFromJSONTyped(json, false); + return SqlV1StatementMetadataFromJSONTyped(json, false); } -export function SqlV1StatementMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'labels': json['labels'] == null ? undefined : json['labels'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - }; +export function SqlV1StatementMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + labels: json["labels"] == null ? undefined : json["labels"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + }; } export function SqlV1StatementMetadataToJSON(json: any): SqlV1StatementMetadata { - return SqlV1StatementMetadataToJSONTyped(json, false); + return SqlV1StatementMetadataToJSONTyped(json, false); } -export function SqlV1StatementMetadataToJSONTyped(value?: SqlV1StatementMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementMetadataToJSONTyped( + value?: SqlV1StatementMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - 'labels': value['labels'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + labels: value["labels"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementResult.ts b/src/clients/flinkSql/models/SqlV1StatementResult.ts index 6ee5658dbd..9bf0877138 100644 --- a/src/clients/flinkSql/models/SqlV1StatementResult.ts +++ b/src/clients/flinkSql/models/SqlV1StatementResult.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementResultResults } from './SqlV1StatementResultResults'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementResultResults } from "./SqlV1StatementResultResults"; import { - SqlV1StatementResultResultsFromJSON, - SqlV1StatementResultResultsFromJSONTyped, - SqlV1StatementResultResultsToJSON, - SqlV1StatementResultResultsToJSONTyped, -} from './SqlV1StatementResultResults'; -import type { ResultListMeta } from './ResultListMeta'; + SqlV1StatementResultResultsFromJSON, + SqlV1StatementResultResultsFromJSONTyped, + SqlV1StatementResultResultsToJSON, + SqlV1StatementResultResultsToJSONTyped, +} from "./SqlV1StatementResultResults"; +import type { ResultListMeta } from "./ResultListMeta"; import { - ResultListMetaFromJSON, - ResultListMetaFromJSONTyped, - ResultListMetaToJSON, - ResultListMetaToJSONTyped, -} from './ResultListMeta'; + ResultListMetaFromJSON, + ResultListMetaFromJSONTyped, + ResultListMetaToJSON, + ResultListMetaToJSONTyped, +} from "./ResultListMeta"; /** * `Statement Result` represents a resource used to model results of SQL statements. @@ -35,90 +35,93 @@ import { * @interface SqlV1StatementResult */ export interface SqlV1StatementResult { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1StatementResult - */ - api_version: SqlV1StatementResultApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1StatementResult - */ - kind: SqlV1StatementResultKindEnum; - /** - * - * @type {ResultListMeta} - * @memberof SqlV1StatementResult - */ - metadata: ResultListMeta; - /** - * - * @type {SqlV1StatementResultResults} - * @memberof SqlV1StatementResult - */ - results?: SqlV1StatementResultResults; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1StatementResult + */ + api_version: SqlV1StatementResultApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1StatementResult + */ + kind: SqlV1StatementResultKindEnum; + /** + * + * @type {ResultListMeta} + * @memberof SqlV1StatementResult + */ + metadata: ResultListMeta; + /** + * + * @type {SqlV1StatementResultResults} + * @memberof SqlV1StatementResult + */ + results?: SqlV1StatementResultResults; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementResultApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1StatementResultKindEnum { - StatementResult = 'StatementResult' + StatementResult = "StatementResult", } - /** * Check if a given object implements the SqlV1StatementResult interface. */ export function instanceOfSqlV1StatementResult(value: object): value is SqlV1StatementResult { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + return true; } export function SqlV1StatementResultFromJSON(json: any): SqlV1StatementResult { - return SqlV1StatementResultFromJSONTyped(json, false); + return SqlV1StatementResultFromJSONTyped(json, false); } -export function SqlV1StatementResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementResult { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ResultListMetaFromJSON(json['metadata']), - 'results': json['results'] == null ? undefined : SqlV1StatementResultResultsFromJSON(json['results']), - }; +export function SqlV1StatementResultFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementResult { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ResultListMetaFromJSON(json["metadata"]), + results: + json["results"] == null ? undefined : SqlV1StatementResultResultsFromJSON(json["results"]), + }; } export function SqlV1StatementResultToJSON(json: any): SqlV1StatementResult { - return SqlV1StatementResultToJSONTyped(json, false); + return SqlV1StatementResultToJSONTyped(json, false); } -export function SqlV1StatementResultToJSONTyped(value?: SqlV1StatementResult | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementResultToJSONTyped( + value?: SqlV1StatementResult | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': ResultListMetaToJSON(value['metadata']), - 'results': SqlV1StatementResultResultsToJSON(value['results']), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: ResultListMetaToJSON(value["metadata"]), + results: SqlV1StatementResultResultsToJSON(value["results"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementResultResults.ts b/src/clients/flinkSql/models/SqlV1StatementResultResults.ts index b518b1f421..58680c544f 100644 --- a/src/clients/flinkSql/models/SqlV1StatementResultResults.ts +++ b/src/clients/flinkSql/models/SqlV1StatementResultResults.ts @@ -12,73 +12,78 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * A results property that contains a data property that contains an array of results. * @export * @interface SqlV1StatementResultResults */ export interface SqlV1StatementResultResults { - /** - * A data property that contains an array of results. Each entry in the array is a separate result. - * - * The value of `op` attribute (if present) represents the kind of change that a row can describe in a changelog: - * - * `0`: represents `INSERT` (`+I`), i.e. insertion operation; - * - * `1`: represents `UPDATE_BEFORE` (`-U`), i.e. update operation with the previous content of the updated row. - * This kind should occur together with `UPDATE_AFTER` for modelling an update that needs to retract - * the previous row first. It is useful in cases of a non-idempotent update, i.e., an update of a row that is not - * uniquely identifiable by a key; - * - * `2`: represents `UPDATE_AFTER` (`+U`), i.e. update operation with new content of the updated row; - * This kind CAN occur together with `UPDATE_BEFORE` for modelling an update that - * needs to retract the previous row first or it describes an idempotent update, i.e., an - * update of a row that is uniquely identifiable by a key; - * - * `3`: represents `DELETE` (`-D`), i.e. deletion operation; - * - * Defaults to `0`. - * - * @type {Array} - * @memberof SqlV1StatementResultResults - */ - data?: Array; + /** + * A data property that contains an array of results. Each entry in the array is a separate result. + * + * The value of `op` attribute (if present) represents the kind of change that a row can describe in a changelog: + * + * `0`: represents `INSERT` (`+I`), i.e. insertion operation; + * + * `1`: represents `UPDATE_BEFORE` (`-U`), i.e. update operation with the previous content of the updated row. + * This kind should occur together with `UPDATE_AFTER` for modelling an update that needs to retract + * the previous row first. It is useful in cases of a non-idempotent update, i.e., an update of a row that is not + * uniquely identifiable by a key; + * + * `2`: represents `UPDATE_AFTER` (`+U`), i.e. update operation with new content of the updated row; + * This kind CAN occur together with `UPDATE_BEFORE` for modelling an update that + * needs to retract the previous row first or it describes an idempotent update, i.e., an + * update of a row that is uniquely identifiable by a key; + * + * `3`: represents `DELETE` (`-D`), i.e. deletion operation; + * + * Defaults to `0`. + * + * @type {Array} + * @memberof SqlV1StatementResultResults + */ + data?: Array; } /** * Check if a given object implements the SqlV1StatementResultResults interface. */ -export function instanceOfSqlV1StatementResultResults(value: object): value is SqlV1StatementResultResults { - return true; +export function instanceOfSqlV1StatementResultResults( + value: object, +): value is SqlV1StatementResultResults { + return true; } export function SqlV1StatementResultResultsFromJSON(json: any): SqlV1StatementResultResults { - return SqlV1StatementResultResultsFromJSONTyped(json, false); + return SqlV1StatementResultResultsFromJSONTyped(json, false); } -export function SqlV1StatementResultResultsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementResultResults { - if (json == null) { - return json; - } - return { - - 'data': json['data'] == null ? undefined : json['data'], - }; +export function SqlV1StatementResultResultsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementResultResults { + if (json == null) { + return json; + } + return { + data: json["data"] == null ? undefined : json["data"], + }; } export function SqlV1StatementResultResultsToJSON(json: any): SqlV1StatementResultResults { - return SqlV1StatementResultResultsToJSONTyped(json, false); + return SqlV1StatementResultResultsToJSONTyped(json, false); } -export function SqlV1StatementResultResultsToJSONTyped(value?: SqlV1StatementResultResults | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementResultResultsToJSONTyped( + value?: SqlV1StatementResultResults | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'data': value['data'], - }; + return { + data: value["data"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementSpec.ts b/src/clients/flinkSql/models/SqlV1StatementSpec.ts index 23470c8eae..06d67e5234 100644 --- a/src/clients/flinkSql/models/SqlV1StatementSpec.ts +++ b/src/clients/flinkSql/models/SqlV1StatementSpec.ts @@ -12,97 +12,100 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The specs of the Statement * @export * @interface SqlV1StatementSpec */ export interface SqlV1StatementSpec { - /** - * The raw SQL text statement. - * @type {string} - * @memberof SqlV1StatementSpec - */ - statement?: string; - /** - * A map (key-value pairs) of statement properties. - * @type {{ [key: string]: string; }} - * @memberof SqlV1StatementSpec - */ - properties?: { [key: string]: string; }; - /** - * The id associated with the compute pool in context. - * If not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. - * @type {string} - * @memberof SqlV1StatementSpec - */ - compute_pool_id?: string; - /** - * The id of a principal this statement runs as. - * @type {string} - * @memberof SqlV1StatementSpec - */ - principal?: string; - /** - * Indicates whether the statement should be stopped. - * @type {boolean} - * @memberof SqlV1StatementSpec - */ - stopped?: boolean; - /** - * The execution mode of the statement. - * - * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) - * - * @type {string} - * @memberof SqlV1StatementSpec - */ - readonly execution_mode?: string; + /** + * The raw SQL text statement. + * @type {string} + * @memberof SqlV1StatementSpec + */ + statement?: string; + /** + * A map (key-value pairs) of statement properties. + * @type {{ [key: string]: string; }} + * @memberof SqlV1StatementSpec + */ + properties?: { [key: string]: string }; + /** + * The id associated with the compute pool in context. + * If not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. + * @type {string} + * @memberof SqlV1StatementSpec + */ + compute_pool_id?: string; + /** + * The id of a principal this statement runs as. + * @type {string} + * @memberof SqlV1StatementSpec + */ + principal?: string; + /** + * Indicates whether the statement should be stopped. + * @type {boolean} + * @memberof SqlV1StatementSpec + */ + stopped?: boolean; + /** + * The execution mode of the statement. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {string} + * @memberof SqlV1StatementSpec + */ + readonly execution_mode?: string; } /** * Check if a given object implements the SqlV1StatementSpec interface. */ export function instanceOfSqlV1StatementSpec(value: object): value is SqlV1StatementSpec { - return true; + return true; } export function SqlV1StatementSpecFromJSON(json: any): SqlV1StatementSpec { - return SqlV1StatementSpecFromJSONTyped(json, false); + return SqlV1StatementSpecFromJSONTyped(json, false); } -export function SqlV1StatementSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementSpec { - if (json == null) { - return json; - } - return { - - 'statement': json['statement'] == null ? undefined : json['statement'], - 'properties': json['properties'] == null ? undefined : json['properties'], - 'compute_pool_id': json['compute_pool_id'] == null ? undefined : json['compute_pool_id'], - 'principal': json['principal'] == null ? undefined : json['principal'], - 'stopped': json['stopped'] == null ? undefined : json['stopped'], - 'execution_mode': json['execution_mode'] == null ? undefined : json['execution_mode'], - }; +export function SqlV1StatementSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementSpec { + if (json == null) { + return json; + } + return { + statement: json["statement"] == null ? undefined : json["statement"], + properties: json["properties"] == null ? undefined : json["properties"], + compute_pool_id: json["compute_pool_id"] == null ? undefined : json["compute_pool_id"], + principal: json["principal"] == null ? undefined : json["principal"], + stopped: json["stopped"] == null ? undefined : json["stopped"], + execution_mode: json["execution_mode"] == null ? undefined : json["execution_mode"], + }; } export function SqlV1StatementSpecToJSON(json: any): SqlV1StatementSpec { - return SqlV1StatementSpecToJSONTyped(json, false); + return SqlV1StatementSpecToJSONTyped(json, false); } -export function SqlV1StatementSpecToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementSpecToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'statement': value['statement'], - 'properties': value['properties'], - 'compute_pool_id': value['compute_pool_id'], - 'principal': value['principal'], - 'stopped': value['stopped'], - }; + return { + statement: value["statement"], + properties: value["properties"], + compute_pool_id: value["compute_pool_id"], + principal: value["principal"], + stopped: value["stopped"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementStatus.ts b/src/clients/flinkSql/models/SqlV1StatementStatus.ts index d050ff3a5c..d8e3b0221c 100644 --- a/src/clients/flinkSql/models/SqlV1StatementStatus.ts +++ b/src/clients/flinkSql/models/SqlV1StatementStatus.ts @@ -12,42 +12,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementTraits } from './SqlV1StatementTraits'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementTraits } from "./SqlV1StatementTraits"; import { - SqlV1StatementTraitsFromJSON, - SqlV1StatementTraitsFromJSONTyped, - SqlV1StatementTraitsToJSON, - SqlV1StatementTraitsToJSONTyped, -} from './SqlV1StatementTraits'; -import type { SqlV1ScalingStatus } from './SqlV1ScalingStatus'; + SqlV1StatementTraitsFromJSON, + SqlV1StatementTraitsFromJSONTyped, + SqlV1StatementTraitsToJSON, + SqlV1StatementTraitsToJSONTyped, +} from "./SqlV1StatementTraits"; +import type { SqlV1ScalingStatus } from "./SqlV1ScalingStatus"; import { - SqlV1ScalingStatusFromJSON, - SqlV1ScalingStatusFromJSONTyped, - SqlV1ScalingStatusToJSON, - SqlV1ScalingStatusToJSONTyped, -} from './SqlV1ScalingStatus'; -import type { SqlV1StateLimitStatus } from './SqlV1StateLimitStatus'; + SqlV1ScalingStatusFromJSON, + SqlV1ScalingStatusFromJSONTyped, + SqlV1ScalingStatusToJSON, + SqlV1ScalingStatusToJSONTyped, +} from "./SqlV1ScalingStatus"; +import type { SqlV1StateLimitStatus } from "./SqlV1StateLimitStatus"; import { - SqlV1StateLimitStatusFromJSON, - SqlV1StateLimitStatusFromJSONTyped, - SqlV1StateLimitStatusToJSON, - SqlV1StateLimitStatusToJSONTyped, -} from './SqlV1StateLimitStatus'; -import type { SqlV1StatementStatusAffectedResource } from './SqlV1StatementStatusAffectedResource'; + SqlV1StateLimitStatusFromJSON, + SqlV1StateLimitStatusFromJSONTyped, + SqlV1StateLimitStatusToJSON, + SqlV1StateLimitStatusToJSONTyped, +} from "./SqlV1StateLimitStatus"; +import type { SqlV1StatementStatusAffectedResource } from "./SqlV1StatementStatusAffectedResource"; import { - SqlV1StatementStatusAffectedResourceFromJSON, - SqlV1StatementStatusAffectedResourceFromJSONTyped, - SqlV1StatementStatusAffectedResourceToJSON, - SqlV1StatementStatusAffectedResourceToJSONTyped, -} from './SqlV1StatementStatusAffectedResource'; -import type { SqlV1StatementWarning } from './SqlV1StatementWarning'; + SqlV1StatementStatusAffectedResourceFromJSON, + SqlV1StatementStatusAffectedResourceFromJSONTyped, + SqlV1StatementStatusAffectedResourceToJSON, + SqlV1StatementStatusAffectedResourceToJSONTyped, +} from "./SqlV1StatementStatusAffectedResource"; +import type { SqlV1StatementWarning } from "./SqlV1StatementWarning"; import { - SqlV1StatementWarningFromJSON, - SqlV1StatementWarningFromJSONTyped, - SqlV1StatementWarningToJSON, - SqlV1StatementWarningToJSONTyped, -} from './SqlV1StatementWarning'; + SqlV1StatementWarningFromJSON, + SqlV1StatementWarningFromJSONTyped, + SqlV1StatementWarningToJSON, + SqlV1StatementWarningToJSONTyped, +} from "./SqlV1StatementWarning"; /** * The status of the Statement @@ -55,161 +55,182 @@ import { * @interface SqlV1StatementStatus */ export interface SqlV1StatementStatus { - /** - * The lifecycle phase of the submitted SQL statement: - * - * PENDING: SQL statement is pending execution; - * - * RUNNING: SQL statement execution is in progress; - * - * COMPLETED: SQL statement is completed; - * - * DELETING: SQL statement deletion is in progress; - * - * FAILING: SQL statement is failing; - * - * FAILED: SQL statement execution has failed; - * - * STOPPED: SQL statement execution has successfully been stopped; - * - * @type {string} - * @memberof SqlV1StatementStatus - */ - readonly phase: string; - /** - * - * @type {SqlV1ScalingStatus} - * @memberof SqlV1StatementStatus - */ - scaling_status?: SqlV1ScalingStatus; - /** - * - * @type {SqlV1StateLimitStatus} - * @memberof SqlV1StatementStatus - */ - state_limit_status?: SqlV1StateLimitStatus; - /** - * Details about the execution status of this statement. - * @type {string} - * @memberof SqlV1StatementStatus - */ - readonly detail?: string; - /** - * List of warnings encountered during statement execution. - * @type {Array} - * @memberof SqlV1StatementStatus - */ - readonly warnings?: Array; - /** - * - * @type {SqlV1StatementTraits} - * @memberof SqlV1StatementStatus - */ - traits?: SqlV1StatementTraits; - /** - * The networking type used by the submitted SQL statement: - * - * PUBLIC: SQL statement is using public networking; - * - * PRIVATE: SQL statement is using private networking; - * - * @type {string} - * @memberof SqlV1StatementStatus - */ - readonly network_kind?: string; - /** - * The last Kafka offsets that a statement has processed. Represented by a mapping from Kafka topic to a - * string representation of partitions mapped to offsets. - * - * @type {{ [key: string]: string; }} - * @memberof SqlV1StatementStatus - */ - readonly latest_offsets?: { [key: string]: string; }; - /** - * The date and time at which the Kafka topic offsets were added to the statement status. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementStatus - */ - readonly latest_offsets_timestamp?: Date; - /** - * The date and time in UTC (represented as RFC3339 format) at which the statement reached its final terminal state. - * This field is set when the Phase is COMPLETED, FAILED, or STOPPED. - * - * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) - * - * @type {Date} - * @memberof SqlV1StatementStatus - */ - end_time?: Date; - /** - * The total elapsed time (represented as ISO 8601 format) from when the statement transitioned from - * PENDING to RUNNING until it reached a final terminal state. This field is calculated and set when - * the Phase is COMPLETED, FAILED, or STOPPED. - * - * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) - * - * @type {string} - * @memberof SqlV1StatementStatus - */ - duration?: string; - /** - * - * @type {SqlV1StatementStatusAffectedResource} - * @memberof SqlV1StatementStatus - */ - affected_resource?: SqlV1StatementStatusAffectedResource; + /** + * The lifecycle phase of the submitted SQL statement: + * + * PENDING: SQL statement is pending execution; + * + * RUNNING: SQL statement execution is in progress; + * + * COMPLETED: SQL statement is completed; + * + * DELETING: SQL statement deletion is in progress; + * + * FAILING: SQL statement is failing; + * + * FAILED: SQL statement execution has failed; + * + * STOPPED: SQL statement execution has successfully been stopped; + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + readonly phase: string; + /** + * + * @type {SqlV1ScalingStatus} + * @memberof SqlV1StatementStatus + */ + scaling_status?: SqlV1ScalingStatus; + /** + * + * @type {SqlV1StateLimitStatus} + * @memberof SqlV1StatementStatus + */ + state_limit_status?: SqlV1StateLimitStatus; + /** + * Details about the execution status of this statement. + * @type {string} + * @memberof SqlV1StatementStatus + */ + readonly detail?: string; + /** + * List of warnings encountered during statement execution. + * @type {Array} + * @memberof SqlV1StatementStatus + */ + readonly warnings?: Array; + /** + * + * @type {SqlV1StatementTraits} + * @memberof SqlV1StatementStatus + */ + traits?: SqlV1StatementTraits; + /** + * The networking type used by the submitted SQL statement: + * + * PUBLIC: SQL statement is using public networking; + * + * PRIVATE: SQL statement is using private networking; + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + readonly network_kind?: string; + /** + * The last Kafka offsets that a statement has processed. Represented by a mapping from Kafka topic to a + * string representation of partitions mapped to offsets. + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1StatementStatus + */ + readonly latest_offsets?: { [key: string]: string }; + /** + * The date and time at which the Kafka topic offsets were added to the statement status. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementStatus + */ + readonly latest_offsets_timestamp?: Date; + /** + * The date and time in UTC (represented as RFC3339 format) at which the statement reached its final terminal state. + * This field is set when the Phase is COMPLETED, FAILED, or STOPPED. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {Date} + * @memberof SqlV1StatementStatus + */ + end_time?: Date; + /** + * The total elapsed time (represented as ISO 8601 format) from when the statement transitioned from + * PENDING to RUNNING until it reached a final terminal state. This field is calculated and set when + * the Phase is COMPLETED, FAILED, or STOPPED. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + duration?: string; + /** + * + * @type {SqlV1StatementStatusAffectedResource} + * @memberof SqlV1StatementStatus + */ + affected_resource?: SqlV1StatementStatusAffectedResource; } /** * Check if a given object implements the SqlV1StatementStatus interface. */ export function instanceOfSqlV1StatementStatus(value: object): value is SqlV1StatementStatus { - if (!('phase' in value) || value['phase'] === undefined) return false; - return true; + if (!("phase" in value) || value["phase"] === undefined) return false; + return true; } export function SqlV1StatementStatusFromJSON(json: any): SqlV1StatementStatus { - return SqlV1StatementStatusFromJSONTyped(json, false); + return SqlV1StatementStatusFromJSONTyped(json, false); } -export function SqlV1StatementStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementStatus { - if (json == null) { - return json; - } - return { - - 'phase': json['phase'], - 'scaling_status': json['scaling_status'] == null ? undefined : SqlV1ScalingStatusFromJSON(json['scaling_status']), - 'state_limit_status': json['state_limit_status'] == null ? undefined : SqlV1StateLimitStatusFromJSON(json['state_limit_status']), - 'detail': json['detail'] == null ? undefined : json['detail'], - 'warnings': json['warnings'] == null ? undefined : ((json['warnings'] as Array).map(SqlV1StatementWarningFromJSON)), - 'traits': json['traits'] == null ? undefined : SqlV1StatementTraitsFromJSON(json['traits']), - 'network_kind': json['network_kind'] == null ? undefined : json['network_kind'], - 'latest_offsets': json['latest_offsets'] == null ? undefined : json['latest_offsets'], - 'latest_offsets_timestamp': json['latest_offsets_timestamp'] == null ? undefined : (new Date(json['latest_offsets_timestamp'])), - 'end_time': json['end_time'] == null ? undefined : (new Date(json['end_time'])), - 'duration': json['duration'] == null ? undefined : json['duration'], - 'affected_resource': json['affected_resource'] == null ? undefined : SqlV1StatementStatusAffectedResourceFromJSON(json['affected_resource']), - }; +export function SqlV1StatementStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"], + scaling_status: + json["scaling_status"] == null + ? undefined + : SqlV1ScalingStatusFromJSON(json["scaling_status"]), + state_limit_status: + json["state_limit_status"] == null + ? undefined + : SqlV1StateLimitStatusFromJSON(json["state_limit_status"]), + detail: json["detail"] == null ? undefined : json["detail"], + warnings: + json["warnings"] == null + ? undefined + : (json["warnings"] as Array).map(SqlV1StatementWarningFromJSON), + traits: json["traits"] == null ? undefined : SqlV1StatementTraitsFromJSON(json["traits"]), + network_kind: json["network_kind"] == null ? undefined : json["network_kind"], + latest_offsets: json["latest_offsets"] == null ? undefined : json["latest_offsets"], + latest_offsets_timestamp: + json["latest_offsets_timestamp"] == null + ? undefined + : new Date(json["latest_offsets_timestamp"]), + end_time: json["end_time"] == null ? undefined : new Date(json["end_time"]), + duration: json["duration"] == null ? undefined : json["duration"], + affected_resource: + json["affected_resource"] == null + ? undefined + : SqlV1StatementStatusAffectedResourceFromJSON(json["affected_resource"]), + }; } export function SqlV1StatementStatusToJSON(json: any): SqlV1StatementStatus { - return SqlV1StatementStatusToJSONTyped(json, false); + return SqlV1StatementStatusToJSONTyped(json, false); } -export function SqlV1StatementStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementStatusToJSONTyped( + value?: Omit< + SqlV1StatementStatus, + "phase" | "detail" | "warnings" | "network_kind" | "latest_offsets" | "latest_offsets_timestamp" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'scaling_status': SqlV1ScalingStatusToJSON(value['scaling_status']), - 'state_limit_status': SqlV1StateLimitStatusToJSON(value['state_limit_status']), - 'traits': SqlV1StatementTraitsToJSON(value['traits']), - 'end_time': value['end_time'] == null ? undefined : ((value['end_time']).toISOString()), - 'duration': value['duration'], - 'affected_resource': SqlV1StatementStatusAffectedResourceToJSON(value['affected_resource']), - }; + return { + scaling_status: SqlV1ScalingStatusToJSON(value["scaling_status"]), + state_limit_status: SqlV1StateLimitStatusToJSON(value["state_limit_status"]), + traits: SqlV1StatementTraitsToJSON(value["traits"]), + end_time: value["end_time"] == null ? undefined : value["end_time"].toISOString(), + duration: value["duration"], + affected_resource: SqlV1StatementStatusAffectedResourceToJSON(value["affected_resource"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts b/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts index ae179cb284..f8e3728bdd 100644 --- a/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts +++ b/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts @@ -12,87 +12,96 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * A reference to the resource created by this statement, if any. This field is set when a statement * (e.g., CREATE MATERIALIZED TABLE) results in a new user-facing resource. - * + * * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) - * + * * @export * @interface SqlV1StatementStatusAffectedResource */ export interface SqlV1StatementStatusAffectedResource { - /** - * The kind of resource that was created. - * @type {string} - * @memberof SqlV1StatementStatusAffectedResource - */ - kind: string; - /** - * The unique identifier for the environment containing the resource. - * @type {string} - * @memberof SqlV1StatementStatusAffectedResource - */ - environment_id: string; - /** - * The unique identifier for the database containing the resource. - * Only present for resource kinds that are scoped to a database. - * - * @type {string} - * @memberof SqlV1StatementStatusAffectedResource - */ - database_id?: string; - /** - * The name of the created resource, unique within its scope. - * @type {string} - * @memberof SqlV1StatementStatusAffectedResource - */ - resource_name: string; + /** + * The kind of resource that was created. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + kind: string; + /** + * The unique identifier for the environment containing the resource. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + environment_id: string; + /** + * The unique identifier for the database containing the resource. + * Only present for resource kinds that are scoped to a database. + * + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + database_id?: string; + /** + * The name of the created resource, unique within its scope. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + resource_name: string; } /** * Check if a given object implements the SqlV1StatementStatusAffectedResource interface. */ -export function instanceOfSqlV1StatementStatusAffectedResource(value: object): value is SqlV1StatementStatusAffectedResource { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; +export function instanceOfSqlV1StatementStatusAffectedResource( + value: object, +): value is SqlV1StatementStatusAffectedResource { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } -export function SqlV1StatementStatusAffectedResourceFromJSON(json: any): SqlV1StatementStatusAffectedResource { - return SqlV1StatementStatusAffectedResourceFromJSONTyped(json, false); +export function SqlV1StatementStatusAffectedResourceFromJSON( + json: any, +): SqlV1StatementStatusAffectedResource { + return SqlV1StatementStatusAffectedResourceFromJSONTyped(json, false); } -export function SqlV1StatementStatusAffectedResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementStatusAffectedResource { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'environment_id': json['environment_id'], - 'database_id': json['database_id'] == null ? undefined : json['database_id'], - 'resource_name': json['resource_name'], - }; +export function SqlV1StatementStatusAffectedResourceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementStatusAffectedResource { + if (json == null) { + return json; + } + return { + kind: json["kind"], + environment_id: json["environment_id"], + database_id: json["database_id"] == null ? undefined : json["database_id"], + resource_name: json["resource_name"], + }; } -export function SqlV1StatementStatusAffectedResourceToJSON(json: any): SqlV1StatementStatusAffectedResource { - return SqlV1StatementStatusAffectedResourceToJSONTyped(json, false); +export function SqlV1StatementStatusAffectedResourceToJSON( + json: any, +): SqlV1StatementStatusAffectedResource { + return SqlV1StatementStatusAffectedResourceToJSONTyped(json, false); } -export function SqlV1StatementStatusAffectedResourceToJSONTyped(value?: SqlV1StatementStatusAffectedResource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementStatusAffectedResourceToJSONTyped( + value?: SqlV1StatementStatusAffectedResource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'environment_id': value['environment_id'], - 'database_id': value['database_id'], - 'resource_name': value['resource_name'], - }; + return { + kind: value["kind"], + environment_id: value["environment_id"], + database_id: value["database_id"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementTraits.ts b/src/clients/flinkSql/models/SqlV1StatementTraits.ts index 4e859d7b27..553d2f85fc 100644 --- a/src/clients/flinkSql/models/SqlV1StatementTraits.ts +++ b/src/clients/flinkSql/models/SqlV1StatementTraits.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ResultSchema } from './SqlV1ResultSchema'; +import { mapValues } from "../runtime"; +import type { SqlV1ResultSchema } from "./SqlV1ResultSchema"; import { - SqlV1ResultSchemaFromJSON, - SqlV1ResultSchemaFromJSONTyped, - SqlV1ResultSchemaToJSON, - SqlV1ResultSchemaToJSONTyped, -} from './SqlV1ResultSchema'; + SqlV1ResultSchemaFromJSON, + SqlV1ResultSchemaFromJSONTyped, + SqlV1ResultSchemaToJSON, + SqlV1ResultSchemaToJSONTyped, +} from "./SqlV1ResultSchema"; /** * StatementTraits contains detailed information about the properties of a Statement @@ -27,87 +27,90 @@ import { * @interface SqlV1StatementTraits */ export interface SqlV1StatementTraits { - /** - * Categorizes the SQL statement. The result is Confluent-specific but inspired by SQL. It uses underscores for separating concepts e.g. "CREATE_TABLE". - * @type {string} - * @memberof SqlV1StatementTraits - */ - sql_kind?: string; - /** - * Indicates the special case where results of a statement are bounded. - * @type {boolean} - * @memberof SqlV1StatementTraits - */ - is_bounded?: boolean; - /** - * Indicates the special case where results of a statement are insert/append only. - * @type {boolean} - * @memberof SqlV1StatementTraits - */ - is_append_only?: boolean; - /** - * Defines the column indices clients can use as upsert keys. - * @type {Array} - * @memberof SqlV1StatementTraits - */ - upsert_columns?: Array; - /** - * - * @type {SqlV1ResultSchema} - * @memberof SqlV1StatementTraits - */ - schema?: SqlV1ResultSchema; - /** - * The names of connections that the SQL statement references (e.g., in FROM clauses). - * @type {Array} - * @memberof SqlV1StatementTraits - */ - connection_refs?: Array; + /** + * Categorizes the SQL statement. The result is Confluent-specific but inspired by SQL. It uses underscores for separating concepts e.g. "CREATE_TABLE". + * @type {string} + * @memberof SqlV1StatementTraits + */ + sql_kind?: string; + /** + * Indicates the special case where results of a statement are bounded. + * @type {boolean} + * @memberof SqlV1StatementTraits + */ + is_bounded?: boolean; + /** + * Indicates the special case where results of a statement are insert/append only. + * @type {boolean} + * @memberof SqlV1StatementTraits + */ + is_append_only?: boolean; + /** + * Defines the column indices clients can use as upsert keys. + * @type {Array} + * @memberof SqlV1StatementTraits + */ + upsert_columns?: Array; + /** + * + * @type {SqlV1ResultSchema} + * @memberof SqlV1StatementTraits + */ + schema?: SqlV1ResultSchema; + /** + * The names of connections that the SQL statement references (e.g., in FROM clauses). + * @type {Array} + * @memberof SqlV1StatementTraits + */ + connection_refs?: Array; } /** * Check if a given object implements the SqlV1StatementTraits interface. */ export function instanceOfSqlV1StatementTraits(value: object): value is SqlV1StatementTraits { - return true; + return true; } export function SqlV1StatementTraitsFromJSON(json: any): SqlV1StatementTraits { - return SqlV1StatementTraitsFromJSONTyped(json, false); + return SqlV1StatementTraitsFromJSONTyped(json, false); } -export function SqlV1StatementTraitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementTraits { - if (json == null) { - return json; - } - return { - - 'sql_kind': json['sql_kind'] == null ? undefined : json['sql_kind'], - 'is_bounded': json['is_bounded'] == null ? undefined : json['is_bounded'], - 'is_append_only': json['is_append_only'] == null ? undefined : json['is_append_only'], - 'upsert_columns': json['upsert_columns'] == null ? undefined : json['upsert_columns'], - 'schema': json['schema'] == null ? undefined : SqlV1ResultSchemaFromJSON(json['schema']), - 'connection_refs': json['connection_refs'] == null ? undefined : json['connection_refs'], - }; +export function SqlV1StatementTraitsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementTraits { + if (json == null) { + return json; + } + return { + sql_kind: json["sql_kind"] == null ? undefined : json["sql_kind"], + is_bounded: json["is_bounded"] == null ? undefined : json["is_bounded"], + is_append_only: json["is_append_only"] == null ? undefined : json["is_append_only"], + upsert_columns: json["upsert_columns"] == null ? undefined : json["upsert_columns"], + schema: json["schema"] == null ? undefined : SqlV1ResultSchemaFromJSON(json["schema"]), + connection_refs: json["connection_refs"] == null ? undefined : json["connection_refs"], + }; } export function SqlV1StatementTraitsToJSON(json: any): SqlV1StatementTraits { - return SqlV1StatementTraitsToJSONTyped(json, false); + return SqlV1StatementTraitsToJSONTyped(json, false); } -export function SqlV1StatementTraitsToJSONTyped(value?: SqlV1StatementTraits | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementTraitsToJSONTyped( + value?: SqlV1StatementTraits | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'sql_kind': value['sql_kind'], - 'is_bounded': value['is_bounded'], - 'is_append_only': value['is_append_only'], - 'upsert_columns': value['upsert_columns'], - 'schema': SqlV1ResultSchemaToJSON(value['schema']), - 'connection_refs': value['connection_refs'], - }; + return { + sql_kind: value["sql_kind"], + is_bounded: value["is_bounded"], + is_append_only: value["is_append_only"], + upsert_columns: value["upsert_columns"], + schema: SqlV1ResultSchemaToJSON(value["schema"]), + connection_refs: value["connection_refs"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1StatementWarning.ts b/src/clients/flinkSql/models/SqlV1StatementWarning.ts index 30df986131..3ef1410378 100644 --- a/src/clients/flinkSql/models/SqlV1StatementWarning.ts +++ b/src/clients/flinkSql/models/SqlV1StatementWarning.ts @@ -12,88 +12,91 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Represents a non-fatal issue encountered during statement processing. * @export * @interface SqlV1StatementWarning */ export interface SqlV1StatementWarning { - /** - * Indicates the severity of the warning. - * - * LOW: Indicates a low severity warning and for informing the user. - * - * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. - * - * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. - * - * @type {string} - * @memberof SqlV1StatementWarning - */ - severity: string; - /** - * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1StatementWarning - */ - readonly created_at: Date; - /** - * A machine-readable short, upper case summary delimited by underscore. - * @type {string} - * @memberof SqlV1StatementWarning - */ - reason: string; - /** - * A human-readable string containing the description of the warning. - * @type {string} - * @memberof SqlV1StatementWarning - */ - message: string; + /** + * Indicates the severity of the warning. + * + * LOW: Indicates a low severity warning and for informing the user. + * + * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + * + * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + * + * @type {string} + * @memberof SqlV1StatementWarning + */ + severity: string; + /** + * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementWarning + */ + readonly created_at: Date; + /** + * A machine-readable short, upper case summary delimited by underscore. + * @type {string} + * @memberof SqlV1StatementWarning + */ + reason: string; + /** + * A human-readable string containing the description of the warning. + * @type {string} + * @memberof SqlV1StatementWarning + */ + message: string; } /** * Check if a given object implements the SqlV1StatementWarning interface. */ export function instanceOfSqlV1StatementWarning(value: object): value is SqlV1StatementWarning { - if (!('severity' in value) || value['severity'] === undefined) return false; - if (!('created_at' in value) || value['created_at'] === undefined) return false; - if (!('reason' in value) || value['reason'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - return true; + if (!("severity" in value) || value["severity"] === undefined) return false; + if (!("created_at" in value) || value["created_at"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + if (!("message" in value) || value["message"] === undefined) return false; + return true; } export function SqlV1StatementWarningFromJSON(json: any): SqlV1StatementWarning { - return SqlV1StatementWarningFromJSONTyped(json, false); + return SqlV1StatementWarningFromJSONTyped(json, false); } -export function SqlV1StatementWarningFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1StatementWarning { - if (json == null) { - return json; - } - return { - - 'severity': json['severity'], - 'created_at': (new Date(json['created_at'])), - 'reason': json['reason'], - 'message': json['message'], - }; +export function SqlV1StatementWarningFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementWarning { + if (json == null) { + return json; + } + return { + severity: json["severity"], + created_at: new Date(json["created_at"]), + reason: json["reason"], + message: json["message"], + }; } export function SqlV1StatementWarningToJSON(json: any): SqlV1StatementWarning { - return SqlV1StatementWarningToJSONTyped(json, false); + return SqlV1StatementWarningToJSONTyped(json, false); } -export function SqlV1StatementWarningToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1StatementWarningToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'severity': value['severity'], - 'reason': value['reason'], - 'message': value['message'], - }; + return { + severity: value["severity"], + reason: value["reason"], + message: value["message"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1Tool.ts b/src/clients/flinkSql/models/SqlV1Tool.ts index d86647b13d..05dfa8cf62 100644 --- a/src/clients/flinkSql/models/SqlV1Tool.ts +++ b/src/clients/flinkSql/models/SqlV1Tool.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ToolSpec } from './SqlV1ToolSpec'; +import { mapValues } from "../runtime"; +import type { SqlV1ToolSpec } from "./SqlV1ToolSpec"; import { - SqlV1ToolSpecFromJSON, - SqlV1ToolSpecFromJSONTyped, - SqlV1ToolSpecToJSON, - SqlV1ToolSpecToJSONTyped, -} from './SqlV1ToolSpec'; -import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; + SqlV1ToolSpecFromJSON, + SqlV1ToolSpecFromJSONTyped, + SqlV1ToolSpecToJSON, + SqlV1ToolSpecToJSONTyped, +} from "./SqlV1ToolSpec"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; import { - SqlV1ToolStatusFromJSON, - SqlV1ToolStatusFromJSONTyped, - SqlV1ToolStatusToJSON, - SqlV1ToolStatusToJSONTyped, -} from './SqlV1ToolStatus'; -import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; import { - SqlV1ToolMetadataFromJSON, - SqlV1ToolMetadataFromJSONTyped, - SqlV1ToolMetadataToJSON, - SqlV1ToolMetadataToJSONTyped, -} from './SqlV1ToolMetadata'; + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; /** * `Tool` models a reusable tool resource backed by a connection that can be referenced @@ -45,101 +45,100 @@ import { * @interface SqlV1Tool */ export interface SqlV1Tool { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1Tool - */ - readonly api_version?: SqlV1ToolApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1Tool - */ - readonly kind?: SqlV1ToolKindEnum; - /** - * - * @type {SqlV1ToolMetadata} - * @memberof SqlV1Tool - */ - metadata?: SqlV1ToolMetadata; - /** - * The user provided name of the tool, unique within this environment. - * @type {string} - * @memberof SqlV1Tool - */ - name?: string; - /** - * - * @type {SqlV1ToolSpec} - * @memberof SqlV1Tool - */ - spec?: SqlV1ToolSpec; - /** - * - * @type {SqlV1ToolStatus} - * @memberof SqlV1Tool - */ - status?: SqlV1ToolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Tool + */ + readonly api_version?: SqlV1ToolApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Tool + */ + readonly kind?: SqlV1ToolKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof SqlV1Tool + */ + metadata?: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof SqlV1Tool + */ + name?: string; + /** + * + * @type {SqlV1ToolSpec} + * @memberof SqlV1Tool + */ + spec?: SqlV1ToolSpec; + /** + * + * @type {SqlV1ToolStatus} + * @memberof SqlV1Tool + */ + status?: SqlV1ToolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ToolApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ToolKindEnum { - Tool = 'Tool' + Tool = "Tool", } - /** * Check if a given object implements the SqlV1Tool interface. */ export function instanceOfSqlV1Tool(value: object): value is SqlV1Tool { - return true; + return true; } export function SqlV1ToolFromJSON(json: any): SqlV1Tool { - return SqlV1ToolFromJSONTyped(json, false); + return SqlV1ToolFromJSONTyped(json, false); } export function SqlV1ToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Tool { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : SqlV1ToolMetadataFromJSON(json['metadata']), - 'name': json['name'] == null ? undefined : json['name'], - 'spec': json['spec'] == null ? undefined : SqlV1ToolSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1ToolStatusFromJSON(json['status']), - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"] == null ? undefined : SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"] == null ? undefined : SqlV1ToolSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1ToolStatusFromJSON(json["status"]), + }; } export function SqlV1ToolToJSON(json: any): SqlV1Tool { - return SqlV1ToolToJSONTyped(json, false); + return SqlV1ToolToJSONTyped(json, false); } -export function SqlV1ToolToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': SqlV1ToolSpecToJSON(value['spec']), - 'status': SqlV1ToolStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1ToolSpecToJSON(value["spec"]), + status: SqlV1ToolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ToolList.ts b/src/clients/flinkSql/models/SqlV1ToolList.ts index 9167e1d3bb..3f44505b2a 100644 --- a/src/clients/flinkSql/models/SqlV1ToolList.ts +++ b/src/clients/flinkSql/models/SqlV1ToolList.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ToolListDataInner } from './SqlV1ToolListDataInner'; +import { mapValues } from "../runtime"; +import type { SqlV1ToolListDataInner } from "./SqlV1ToolListDataInner"; import { - SqlV1ToolListDataInnerFromJSON, - SqlV1ToolListDataInnerFromJSONTyped, - SqlV1ToolListDataInnerToJSON, - SqlV1ToolListDataInnerToJSONTyped, -} from './SqlV1ToolListDataInner'; -import type { SqlV1ToolListMetadata } from './SqlV1ToolListMetadata'; + SqlV1ToolListDataInnerFromJSON, + SqlV1ToolListDataInnerFromJSONTyped, + SqlV1ToolListDataInnerToJSON, + SqlV1ToolListDataInnerToJSONTyped, +} from "./SqlV1ToolListDataInner"; +import type { SqlV1ToolListMetadata } from "./SqlV1ToolListMetadata"; import { - SqlV1ToolListMetadataFromJSON, - SqlV1ToolListMetadataFromJSONTyped, - SqlV1ToolListMetadataToJSON, - SqlV1ToolListMetadataToJSONTyped, -} from './SqlV1ToolListMetadata'; + SqlV1ToolListMetadataFromJSON, + SqlV1ToolListMetadataFromJSONTyped, + SqlV1ToolListMetadataToJSON, + SqlV1ToolListMetadataToJSONTyped, +} from "./SqlV1ToolListMetadata"; /** * `Tool` models a reusable tool resource backed by a connection that can be referenced @@ -38,91 +38,90 @@ import { * @interface SqlV1ToolList */ export interface SqlV1ToolList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1ToolList - */ - api_version: SqlV1ToolListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1ToolList - */ - kind: SqlV1ToolListKindEnum; - /** - * - * @type {SqlV1ToolListMetadata} - * @memberof SqlV1ToolList - */ - metadata: SqlV1ToolListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof SqlV1ToolList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ToolList + */ + api_version: SqlV1ToolListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ToolList + */ + kind: SqlV1ToolListKindEnum; + /** + * + * @type {SqlV1ToolListMetadata} + * @memberof SqlV1ToolList + */ + metadata: SqlV1ToolListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1ToolList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ToolListApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ToolListKindEnum { - ToolList = 'ToolList' + ToolList = "ToolList", } - /** * Check if a given object implements the SqlV1ToolList interface. */ export function instanceOfSqlV1ToolList(value: object): value is SqlV1ToolList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function SqlV1ToolListFromJSON(json: any): SqlV1ToolList { - return SqlV1ToolListFromJSONTyped(json, false); + return SqlV1ToolListFromJSONTyped(json, false); } export function SqlV1ToolListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1ToolListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(SqlV1ToolListDataInnerFromJSON))), - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ToolListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1ToolListDataInnerFromJSON)), + }; } export function SqlV1ToolListToJSON(json: any): SqlV1ToolList { - return SqlV1ToolListToJSONTyped(json, false); + return SqlV1ToolListToJSONTyped(json, false); } -export function SqlV1ToolListToJSONTyped(value?: SqlV1ToolList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolListToJSONTyped( + value?: SqlV1ToolList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': SqlV1ToolListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(SqlV1ToolListDataInnerToJSON)), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: SqlV1ToolListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1ToolListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts b/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts index f504c9c45e..2dcca45539 100644 --- a/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts @@ -12,129 +12,131 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ToolStatus } from './SqlV1ToolStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; import { - SqlV1ToolStatusFromJSON, - SqlV1ToolStatusFromJSONTyped, - SqlV1ToolStatusToJSON, - SqlV1ToolStatusToJSONTyped, -} from './SqlV1ToolStatus'; -import type { SqlV1ToolMetadata } from './SqlV1ToolMetadata'; + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; import { - SqlV1ToolMetadataFromJSON, - SqlV1ToolMetadataFromJSONTyped, - SqlV1ToolMetadataToJSON, - SqlV1ToolMetadataToJSONTyped, -} from './SqlV1ToolMetadata'; + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; /** - * + * * @export * @interface SqlV1ToolListDataInner */ export interface SqlV1ToolListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof SqlV1ToolListDataInner - */ - readonly api_version: SqlV1ToolListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof SqlV1ToolListDataInner - */ - readonly kind: SqlV1ToolListDataInnerKindEnum; - /** - * - * @type {SqlV1ToolMetadata} - * @memberof SqlV1ToolListDataInner - */ - metadata: SqlV1ToolMetadata; - /** - * The user provided name of the tool, unique within this environment. - * @type {string} - * @memberof SqlV1ToolListDataInner - */ - name: string; - /** - * - * @type {object} - * @memberof SqlV1ToolListDataInner - */ - spec: object; - /** - * - * @type {SqlV1ToolStatus} - * @memberof SqlV1ToolListDataInner - */ - status: SqlV1ToolStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + readonly api_version: SqlV1ToolListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + readonly kind: SqlV1ToolListDataInnerKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof SqlV1ToolListDataInner + */ + metadata: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof SqlV1ToolListDataInner + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof SqlV1ToolListDataInner + */ + status: SqlV1ToolStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ToolListDataInnerApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum SqlV1ToolListDataInnerKindEnum { - Tool = 'Tool' + Tool = "Tool", } - /** * Check if a given object implements the SqlV1ToolListDataInner interface. */ export function instanceOfSqlV1ToolListDataInner(value: object): value is SqlV1ToolListDataInner { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } export function SqlV1ToolListDataInnerFromJSON(json: any): SqlV1ToolListDataInner { - return SqlV1ToolListDataInnerFromJSONTyped(json, false); + return SqlV1ToolListDataInnerFromJSONTyped(json, false); } -export function SqlV1ToolListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': SqlV1ToolMetadataFromJSON(json['metadata']), - 'name': json['name'], - 'spec': json['spec'], - 'status': SqlV1ToolStatusFromJSON(json['status']), - }; +export function SqlV1ToolListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: SqlV1ToolStatusFromJSON(json["status"]), + }; } export function SqlV1ToolListDataInnerToJSON(json: any): SqlV1ToolListDataInner { - return SqlV1ToolListDataInnerToJSONTyped(json, false); + return SqlV1ToolListDataInnerToJSONTyped(json, false); } -export function SqlV1ToolListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': SqlV1ToolMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ToolStatusToJSON(value['status']), - }; + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ToolStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts b/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts index 22a1c589c3..87b6af7896 100644 --- a/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts @@ -12,86 +12,89 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1ToolListMetadata */ export interface SqlV1ToolListMetadata { - /** - * - * @type {any} - * @memberof SqlV1ToolListMetadata - */ - self?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ToolListMetadata - */ - next?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ToolListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ToolListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ToolListMetadata - */ - prev?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + prev?: any | null; } /** * Check if a given object implements the SqlV1ToolListMetadata interface. */ export function instanceOfSqlV1ToolListMetadata(value: object): value is SqlV1ToolListMetadata { - return true; + return true; } export function SqlV1ToolListMetadataFromJSON(json: any): SqlV1ToolListMetadata { - return SqlV1ToolListMetadataFromJSONTyped(json, false); + return SqlV1ToolListMetadataFromJSONTyped(json, false); } -export function SqlV1ToolListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolListMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - }; +export function SqlV1ToolListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolListMetadata { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + }; } export function SqlV1ToolListMetadataToJSON(json: any): SqlV1ToolListMetadata { - return SqlV1ToolListMetadataToJSONTyped(json, false); + return SqlV1ToolListMetadataToJSONTyped(json, false); } -export function SqlV1ToolListMetadataToJSONTyped(value?: SqlV1ToolListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolListMetadataToJSONTyped( + value?: SqlV1ToolListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - }; + return { + self: value["self"], + next: value["next"], + first: value["first"], + last: value["last"], + prev: value["prev"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ToolMetadata.ts b/src/clients/flinkSql/models/SqlV1ToolMetadata.ts index 927febd042..f956cadd23 100644 --- a/src/clients/flinkSql/models/SqlV1ToolMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ToolMetadata.ts @@ -12,95 +12,98 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SqlV1ToolMetadata */ export interface SqlV1ToolMetadata { - /** - * - * @type {any} - * @memberof SqlV1ToolMetadata - */ - self: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1ToolMetadata - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof SqlV1ToolMetadata - */ - updated_at?: Date; - /** - * - * @type {any} - * @memberof SqlV1ToolMetadata - */ - uid?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ToolMetadata - */ - resource_version?: any | null; - /** - * - * @type {any} - * @memberof SqlV1ToolMetadata - */ - resource_name?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ToolMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ToolMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + resource_name?: any | null; } /** * Check if a given object implements the SqlV1ToolMetadata interface. */ export function instanceOfSqlV1ToolMetadata(value: object): value is SqlV1ToolMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function SqlV1ToolMetadataFromJSON(json: any): SqlV1ToolMetadata { - return SqlV1ToolMetadataFromJSONTyped(json, false); + return SqlV1ToolMetadataFromJSONTyped(json, false); } -export function SqlV1ToolMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - }; +export function SqlV1ToolMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + }; } export function SqlV1ToolMetadataToJSON(json: any): SqlV1ToolMetadata { - return SqlV1ToolMetadataToJSONTyped(json, false); + return SqlV1ToolMetadataToJSONTyped(json, false); } -export function SqlV1ToolMetadataToJSONTyped(value?: SqlV1ToolMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolMetadataToJSONTyped( + value?: SqlV1ToolMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ToolSpec.ts b/src/clients/flinkSql/models/SqlV1ToolSpec.ts index 26327a4ba0..b2e287645c 100644 --- a/src/clients/flinkSql/models/SqlV1ToolSpec.ts +++ b/src/clients/flinkSql/models/SqlV1ToolSpec.ts @@ -12,62 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The spec of the Tool * @export * @interface SqlV1ToolSpec */ export interface SqlV1ToolSpec { - /** - * The name of the connection this tool uses. - * @type {string} - * @memberof SqlV1ToolSpec - */ - connection?: string; - /** - * A set of key-value option pairs that configure the tool's behavior. - * @type {{ [key: string]: string; }} - * @memberof SqlV1ToolSpec - */ - options?: { [key: string]: string; }; + /** + * The name of the connection this tool uses. + * @type {string} + * @memberof SqlV1ToolSpec + */ + connection?: string; + /** + * A set of key-value option pairs that configure the tool's behavior. + * @type {{ [key: string]: string; }} + * @memberof SqlV1ToolSpec + */ + options?: { [key: string]: string }; } /** * Check if a given object implements the SqlV1ToolSpec interface. */ export function instanceOfSqlV1ToolSpec(value: object): value is SqlV1ToolSpec { - return true; + return true; } export function SqlV1ToolSpecFromJSON(json: any): SqlV1ToolSpec { - return SqlV1ToolSpecFromJSONTyped(json, false); + return SqlV1ToolSpecFromJSONTyped(json, false); } export function SqlV1ToolSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolSpec { - if (json == null) { - return json; - } - return { - - 'connection': json['connection'] == null ? undefined : json['connection'], - 'options': json['options'] == null ? undefined : json['options'], - }; + if (json == null) { + return json; + } + return { + connection: json["connection"] == null ? undefined : json["connection"], + options: json["options"] == null ? undefined : json["options"], + }; } export function SqlV1ToolSpecToJSON(json: any): SqlV1ToolSpec { - return SqlV1ToolSpecToJSONTyped(json, false); + return SqlV1ToolSpecToJSONTyped(json, false); } -export function SqlV1ToolSpecToJSONTyped(value?: SqlV1ToolSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolSpecToJSONTyped( + value?: SqlV1ToolSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'connection': value['connection'], - 'options': value['options'], - }; + return { + connection: value["connection"], + options: value["options"], + }; } - diff --git a/src/clients/flinkSql/models/SqlV1ToolStatus.ts b/src/clients/flinkSql/models/SqlV1ToolStatus.ts index 7fcc8dbb99..713fbad9e8 100644 --- a/src/clients/flinkSql/models/SqlV1ToolStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ToolStatus.ts @@ -12,68 +12,70 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of the Tool * @export * @interface SqlV1ToolStatus */ export interface SqlV1ToolStatus { - /** - * Describes the status of the tool: - * - * ACTIVE: The Tool is usable; - * - * INACTIVE: The Tool is not currently active; - * - * ERROR: The Tool encountered an error; - * - * @type {string} - * @memberof SqlV1ToolStatus - */ - readonly phase: string; - /** - * Details about why the tool transitioned into a given status. - * @type {string} - * @memberof SqlV1ToolStatus - */ - readonly detail?: string; + /** + * Describes the status of the tool: + * + * ACTIVE: The Tool is usable; + * + * INACTIVE: The Tool is not currently active; + * + * ERROR: The Tool encountered an error; + * + * @type {string} + * @memberof SqlV1ToolStatus + */ + readonly phase: string; + /** + * Details about why the tool transitioned into a given status. + * @type {string} + * @memberof SqlV1ToolStatus + */ + readonly detail?: string; } /** * Check if a given object implements the SqlV1ToolStatus interface. */ export function instanceOfSqlV1ToolStatus(value: object): value is SqlV1ToolStatus { - if (!('phase' in value) || value['phase'] === undefined) return false; - return true; + if (!("phase" in value) || value["phase"] === undefined) return false; + return true; } export function SqlV1ToolStatusFromJSON(json: any): SqlV1ToolStatus { - return SqlV1ToolStatusFromJSONTyped(json, false); + return SqlV1ToolStatusFromJSONTyped(json, false); } -export function SqlV1ToolStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolStatus { - if (json == null) { - return json; - } - return { - - 'phase': json['phase'], - 'detail': json['detail'] == null ? undefined : json['detail'], - }; +export function SqlV1ToolStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"], + detail: json["detail"] == null ? undefined : json["detail"], + }; } export function SqlV1ToolStatusToJSON(json: any): SqlV1ToolStatus { - return SqlV1ToolStatusToJSONTyped(json, false); + return SqlV1ToolStatusToJSONTyped(json, false); } -export function SqlV1ToolStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SqlV1ToolStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkSql/models/StatementObjectMeta.ts b/src/clients/flinkSql/models/StatementObjectMeta.ts index 1bed7aebcd..ebfc33072a 100644 --- a/src/clients/flinkSql/models/StatementObjectMeta.ts +++ b/src/clients/flinkSql/models/StatementObjectMeta.ts @@ -12,95 +12,98 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The metadata of the statement. * @export * @interface StatementObjectMeta */ export interface StatementObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof StatementObjectMeta - */ - self: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof StatementObjectMeta - */ - created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof StatementObjectMeta - */ - updated_at?: Date; - /** - * A system generated globally unique identifier for this resource. - * @type {string} - * @memberof StatementObjectMeta - */ - uid?: string; - /** - * A system generated string that uniquely identifies the version of this resource. - * @type {string} - * @memberof StatementObjectMeta - */ - resource_version?: string; - /** - * A map of key-value pairs that describe the resource. - * @type {{ [key: string]: string; }} - * @memberof StatementObjectMeta - */ - labels?: { [key: string]: string; }; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof StatementObjectMeta + */ + self: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof StatementObjectMeta + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof StatementObjectMeta + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof StatementObjectMeta + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof StatementObjectMeta + */ + resource_version?: string; + /** + * A map of key-value pairs that describe the resource. + * @type {{ [key: string]: string; }} + * @memberof StatementObjectMeta + */ + labels?: { [key: string]: string }; } /** * Check if a given object implements the StatementObjectMeta interface. */ export function instanceOfStatementObjectMeta(value: object): value is StatementObjectMeta { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function StatementObjectMetaFromJSON(json: any): StatementObjectMeta { - return StatementObjectMetaFromJSONTyped(json, false); + return StatementObjectMetaFromJSONTyped(json, false); } -export function StatementObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatementObjectMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'labels': json['labels'] == null ? undefined : json['labels'], - }; +export function StatementObjectMetaFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): StatementObjectMeta { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + labels: json["labels"] == null ? undefined : json["labels"], + }; } export function StatementObjectMetaToJSON(json: any): StatementObjectMeta { - return StatementObjectMetaToJSONTyped(json, false); + return StatementObjectMetaToJSONTyped(json, false); } -export function StatementObjectMetaToJSONTyped(value?: StatementObjectMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function StatementObjectMetaToJSONTyped( + value?: StatementObjectMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString()), - 'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString()), - 'uid': value['uid'], - 'resource_version': value['resource_version'], - 'labels': value['labels'], - }; + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + labels: value["labels"], + }; } - diff --git a/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts index 8fe946e3c9..9802e4c333 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts @@ -12,143 +12,148 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1AgentStatus } from './SqlV1AgentStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1AgentStatus } from "./SqlV1AgentStatus"; import { - SqlV1AgentStatusFromJSON, - SqlV1AgentStatusFromJSONTyped, - SqlV1AgentStatusToJSON, - SqlV1AgentStatusToJSONTyped, -} from './SqlV1AgentStatus'; -import type { SqlV1AgentSpec } from './SqlV1AgentSpec'; + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from "./SqlV1AgentStatus"; +import type { SqlV1AgentSpec } from "./SqlV1AgentSpec"; import { - SqlV1AgentSpecFromJSON, - SqlV1AgentSpecFromJSONTyped, - SqlV1AgentSpecToJSON, - SqlV1AgentSpecToJSONTyped, -} from './SqlV1AgentSpec'; + SqlV1AgentSpecFromJSON, + SqlV1AgentSpecFromJSONTyped, + SqlV1AgentSpecToJSON, + SqlV1AgentSpecToJSONTyped, +} from "./SqlV1AgentSpec"; /** - * + * * @export * @interface UpdateSqlv1AgentRequest */ export interface UpdateSqlv1AgentRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateSqlv1AgentRequest - */ - readonly api_version: UpdateSqlv1AgentRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateSqlv1AgentRequest - */ - readonly kind: UpdateSqlv1AgentRequestKindEnum; - /** - * - * @type {object} - * @memberof UpdateSqlv1AgentRequest - */ - metadata: object; - /** - * The user-provided name of the agent, unique within this environment. - * @type {string} - * @memberof UpdateSqlv1AgentRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof UpdateSqlv1AgentRequest - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof UpdateSqlv1AgentRequest - */ - readonly environment_id: string; - /** - * - * @type {SqlV1AgentSpec} - * @memberof UpdateSqlv1AgentRequest - */ - spec: SqlV1AgentSpec; - /** - * - * @type {SqlV1AgentStatus} - * @memberof UpdateSqlv1AgentRequest - */ - readonly status?: SqlV1AgentStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly api_version: UpdateSqlv1AgentRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly kind: UpdateSqlv1AgentRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1AgentRequest + */ + metadata: object; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly environment_id: string; + /** + * + * @type {SqlV1AgentSpec} + * @memberof UpdateSqlv1AgentRequest + */ + spec: SqlV1AgentSpec; + /** + * + * @type {SqlV1AgentStatus} + * @memberof UpdateSqlv1AgentRequest + */ + readonly status?: SqlV1AgentStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1AgentRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1AgentRequestKindEnum { - Agent = 'Agent' + Agent = "Agent", } - /** * Check if a given object implements the UpdateSqlv1AgentRequest interface. */ export function instanceOfUpdateSqlv1AgentRequest(value: object): value is UpdateSqlv1AgentRequest { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function UpdateSqlv1AgentRequestFromJSON(json: any): UpdateSqlv1AgentRequest { - return UpdateSqlv1AgentRequestFromJSONTyped(json, false); + return UpdateSqlv1AgentRequestFromJSONTyped(json, false); } -export function UpdateSqlv1AgentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1AgentRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'], - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': SqlV1AgentSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1AgentStatusFromJSON(json['status']), - }; +export function UpdateSqlv1AgentRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateSqlv1AgentRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"], + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1AgentSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1AgentStatusFromJSON(json["status"]), + }; } export function UpdateSqlv1AgentRequestToJSON(json: any): UpdateSqlv1AgentRequest { - return UpdateSqlv1AgentRequestToJSONTyped(json, false); + return UpdateSqlv1AgentRequestToJSONTyped(json, false); } -export function UpdateSqlv1AgentRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateSqlv1AgentRequestToJSONTyped( + value?: Omit< + UpdateSqlv1AgentRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'spec': SqlV1AgentSpecToJSON(value['spec']), - }; + return { + metadata: value["metadata"], + name: value["name"], + spec: SqlV1AgentSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts index e543a0219a..f2f39a9ac9 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts @@ -12,119 +12,123 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1ConnectionStatus } from './SqlV1ConnectionStatus'; +import { mapValues } from "../runtime"; +import type { SqlV1ConnectionStatus } from "./SqlV1ConnectionStatus"; import { - SqlV1ConnectionStatusFromJSON, - SqlV1ConnectionStatusFromJSONTyped, - SqlV1ConnectionStatusToJSON, - SqlV1ConnectionStatusToJSONTyped, -} from './SqlV1ConnectionStatus'; + SqlV1ConnectionStatusFromJSON, + SqlV1ConnectionStatusFromJSONTyped, + SqlV1ConnectionStatusToJSON, + SqlV1ConnectionStatusToJSONTyped, +} from "./SqlV1ConnectionStatus"; /** - * + * * @export * @interface UpdateSqlv1ConnectionRequest */ export interface UpdateSqlv1ConnectionRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateSqlv1ConnectionRequest - */ - readonly api_version?: UpdateSqlv1ConnectionRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateSqlv1ConnectionRequest - */ - readonly kind?: UpdateSqlv1ConnectionRequestKindEnum; - /** - * - * @type {object} - * @memberof UpdateSqlv1ConnectionRequest - */ - metadata: object; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof UpdateSqlv1ConnectionRequest - */ - name: string; - /** - * - * @type {object} - * @memberof UpdateSqlv1ConnectionRequest - */ - spec: object; - /** - * - * @type {SqlV1ConnectionStatus} - * @memberof UpdateSqlv1ConnectionRequest - */ - status?: SqlV1ConnectionStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1ConnectionRequest + */ + readonly api_version?: UpdateSqlv1ConnectionRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1ConnectionRequest + */ + readonly kind?: UpdateSqlv1ConnectionRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1ConnectionRequest + */ + metadata: object; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1ConnectionRequest + */ + name: string; + /** + * + * @type {object} + * @memberof UpdateSqlv1ConnectionRequest + */ + spec: object; + /** + * + * @type {SqlV1ConnectionStatus} + * @memberof UpdateSqlv1ConnectionRequest + */ + status?: SqlV1ConnectionStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1ConnectionRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1ConnectionRequestKindEnum { - Connection = 'Connection' + Connection = "Connection", } - /** * Check if a given object implements the UpdateSqlv1ConnectionRequest interface. */ -export function instanceOfUpdateSqlv1ConnectionRequest(value: object): value is UpdateSqlv1ConnectionRequest { - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfUpdateSqlv1ConnectionRequest( + value: object, +): value is UpdateSqlv1ConnectionRequest { + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function UpdateSqlv1ConnectionRequestFromJSON(json: any): UpdateSqlv1ConnectionRequest { - return UpdateSqlv1ConnectionRequestFromJSONTyped(json, false); + return UpdateSqlv1ConnectionRequestFromJSONTyped(json, false); } -export function UpdateSqlv1ConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1ConnectionRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'], - 'name': json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1ConnectionStatusFromJSON(json['status']), - }; +export function UpdateSqlv1ConnectionRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateSqlv1ConnectionRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"], + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ConnectionStatusFromJSON(json["status"]), + }; } export function UpdateSqlv1ConnectionRequestToJSON(json: any): UpdateSqlv1ConnectionRequest { - return UpdateSqlv1ConnectionRequestToJSONTyped(json, false); + return UpdateSqlv1ConnectionRequestToJSONTyped(json, false); } -export function UpdateSqlv1ConnectionRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateSqlv1ConnectionRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'spec': value['spec'], - 'status': SqlV1ConnectionStatusToJSON(value['status']), - }; + return { + metadata: value["metadata"], + name: value["name"], + spec: value["spec"], + status: SqlV1ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts index 964879c275..27864f1d77 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts @@ -12,143 +12,155 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1MaterializedTableSpec } from './SqlV1MaterializedTableSpec'; +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableSpec } from "./SqlV1MaterializedTableSpec"; import { - SqlV1MaterializedTableSpecFromJSON, - SqlV1MaterializedTableSpecFromJSONTyped, - SqlV1MaterializedTableSpecToJSON, - SqlV1MaterializedTableSpecToJSONTyped, -} from './SqlV1MaterializedTableSpec'; -import type { SqlV1MaterializedTableStatus } from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableSpecFromJSON, + SqlV1MaterializedTableSpecFromJSONTyped, + SqlV1MaterializedTableSpecToJSON, + SqlV1MaterializedTableSpecToJSONTyped, +} from "./SqlV1MaterializedTableSpec"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; import { - SqlV1MaterializedTableStatusFromJSON, - SqlV1MaterializedTableStatusFromJSONTyped, - SqlV1MaterializedTableStatusToJSON, - SqlV1MaterializedTableStatusToJSONTyped, -} from './SqlV1MaterializedTableStatus'; + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; /** - * + * * @export * @interface UpdateSqlv1MaterializedTableRequest */ export interface UpdateSqlv1MaterializedTableRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - readonly api_version: UpdateSqlv1MaterializedTableRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - readonly kind: UpdateSqlv1MaterializedTableRequestKindEnum; - /** - * - * @type {object} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - metadata: object; - /** - * The user-provided name of the resource, unique within this environment. - * @type {string} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - readonly organization_id: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - readonly environment_id: string; - /** - * - * @type {SqlV1MaterializedTableSpec} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - spec: SqlV1MaterializedTableSpec; - /** - * - * @type {SqlV1MaterializedTableStatus} - * @memberof UpdateSqlv1MaterializedTableRequest - */ - readonly status?: SqlV1MaterializedTableStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly api_version: UpdateSqlv1MaterializedTableRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly kind: UpdateSqlv1MaterializedTableRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + metadata: object; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableSpec} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + spec: SqlV1MaterializedTableSpec; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly status?: SqlV1MaterializedTableStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1MaterializedTableRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1MaterializedTableRequestKindEnum { - MaterializedTable = 'MaterializedTable' + MaterializedTable = "MaterializedTable", } - /** * Check if a given object implements the UpdateSqlv1MaterializedTableRequest interface. */ -export function instanceOfUpdateSqlv1MaterializedTableRequest(value: object): value is UpdateSqlv1MaterializedTableRequest { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('organization_id' in value) || value['organization_id'] === undefined) return false; - if (!('environment_id' in value) || value['environment_id'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfUpdateSqlv1MaterializedTableRequest( + value: object, +): value is UpdateSqlv1MaterializedTableRequest { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function UpdateSqlv1MaterializedTableRequestFromJSON(json: any): UpdateSqlv1MaterializedTableRequest { - return UpdateSqlv1MaterializedTableRequestFromJSONTyped(json, false); +export function UpdateSqlv1MaterializedTableRequestFromJSON( + json: any, +): UpdateSqlv1MaterializedTableRequest { + return UpdateSqlv1MaterializedTableRequestFromJSONTyped(json, false); } -export function UpdateSqlv1MaterializedTableRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1MaterializedTableRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'], - 'name': json['name'], - 'organization_id': json['organization_id'], - 'environment_id': json['environment_id'], - 'spec': SqlV1MaterializedTableSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json['status']), - }; +export function UpdateSqlv1MaterializedTableRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateSqlv1MaterializedTableRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"], + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1MaterializedTableSpecFromJSON(json["spec"]), + status: + json["status"] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; } -export function UpdateSqlv1MaterializedTableRequestToJSON(json: any): UpdateSqlv1MaterializedTableRequest { - return UpdateSqlv1MaterializedTableRequestToJSONTyped(json, false); +export function UpdateSqlv1MaterializedTableRequestToJSON( + json: any, +): UpdateSqlv1MaterializedTableRequest { + return UpdateSqlv1MaterializedTableRequestToJSONTyped(json, false); } -export function UpdateSqlv1MaterializedTableRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateSqlv1MaterializedTableRequestToJSONTyped( + value?: Omit< + UpdateSqlv1MaterializedTableRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'spec': SqlV1MaterializedTableSpecToJSON(value['spec']), - }; + return { + metadata: value["metadata"], + name: value["name"], + spec: SqlV1MaterializedTableSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts index f6ecce02a8..a6ae65b7e6 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts @@ -12,150 +12,154 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SqlV1StatementResult } from './SqlV1StatementResult'; +import { mapValues } from "../runtime"; +import type { SqlV1StatementResult } from "./SqlV1StatementResult"; import { - SqlV1StatementResultFromJSON, - SqlV1StatementResultFromJSONTyped, - SqlV1StatementResultToJSON, - SqlV1StatementResultToJSONTyped, -} from './SqlV1StatementResult'; -import type { SqlV1StatementStatus } from './SqlV1StatementStatus'; + SqlV1StatementResultFromJSON, + SqlV1StatementResultFromJSONTyped, + SqlV1StatementResultToJSON, + SqlV1StatementResultToJSONTyped, +} from "./SqlV1StatementResult"; +import type { SqlV1StatementStatus } from "./SqlV1StatementStatus"; import { - SqlV1StatementStatusFromJSON, - SqlV1StatementStatusFromJSONTyped, - SqlV1StatementStatusToJSON, - SqlV1StatementStatusToJSONTyped, -} from './SqlV1StatementStatus'; + SqlV1StatementStatusFromJSON, + SqlV1StatementStatusFromJSONTyped, + SqlV1StatementStatusToJSON, + SqlV1StatementStatusToJSONTyped, +} from "./SqlV1StatementStatus"; /** - * + * * @export * @interface UpdateSqlv1StatementRequest */ export interface UpdateSqlv1StatementRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - readonly api_version?: UpdateSqlv1StatementRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - readonly kind?: UpdateSqlv1StatementRequestKindEnum; - /** - * - * @type {object} - * @memberof UpdateSqlv1StatementRequest - */ - metadata: object; - /** - * The user provided name of the resource, unique within this environment. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - name: string; - /** - * The unique identifier for the organization. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - organization_id?: string; - /** - * The unique identifier for the environment. - * @type {string} - * @memberof UpdateSqlv1StatementRequest - */ - environment_id?: string; - /** - * - * @type {object} - * @memberof UpdateSqlv1StatementRequest - */ - spec: object; - /** - * - * @type {SqlV1StatementStatus} - * @memberof UpdateSqlv1StatementRequest - */ - status?: SqlV1StatementStatus; - /** - * - * @type {SqlV1StatementResult} - * @memberof UpdateSqlv1StatementRequest - */ - result?: SqlV1StatementResult; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + readonly api_version?: UpdateSqlv1StatementRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + readonly kind?: UpdateSqlv1StatementRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1StatementRequest + */ + metadata: object; + /** + * The user provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + organization_id?: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1StatementRequest + */ + environment_id?: string; + /** + * + * @type {object} + * @memberof UpdateSqlv1StatementRequest + */ + spec: object; + /** + * + * @type {SqlV1StatementStatus} + * @memberof UpdateSqlv1StatementRequest + */ + status?: SqlV1StatementStatus; + /** + * + * @type {SqlV1StatementResult} + * @memberof UpdateSqlv1StatementRequest + */ + result?: SqlV1StatementResult; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1StatementRequestApiVersionEnum { - SqlV1 = 'sql/v1' + SqlV1 = "sql/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum UpdateSqlv1StatementRequestKindEnum { - Statement = 'Statement' + Statement = "Statement", } - /** * Check if a given object implements the UpdateSqlv1StatementRequest interface. */ -export function instanceOfUpdateSqlv1StatementRequest(value: object): value is UpdateSqlv1StatementRequest { - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfUpdateSqlv1StatementRequest( + value: object, +): value is UpdateSqlv1StatementRequest { + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function UpdateSqlv1StatementRequestFromJSON(json: any): UpdateSqlv1StatementRequest { - return UpdateSqlv1StatementRequestFromJSONTyped(json, false); + return UpdateSqlv1StatementRequestFromJSONTyped(json, false); } -export function UpdateSqlv1StatementRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSqlv1StatementRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'], - 'name': json['name'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : SqlV1StatementStatusFromJSON(json['status']), - 'result': json['result'] == null ? undefined : SqlV1StatementResultFromJSON(json['result']), - }; +export function UpdateSqlv1StatementRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateSqlv1StatementRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"], + name: json["name"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1StatementStatusFromJSON(json["status"]), + result: json["result"] == null ? undefined : SqlV1StatementResultFromJSON(json["result"]), + }; } export function UpdateSqlv1StatementRequestToJSON(json: any): UpdateSqlv1StatementRequest { - return UpdateSqlv1StatementRequestToJSONTyped(json, false); + return UpdateSqlv1StatementRequestToJSONTyped(json, false); } -export function UpdateSqlv1StatementRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateSqlv1StatementRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'organization_id': value['organization_id'], - 'environment_id': value['environment_id'], - 'spec': value['spec'], - 'status': SqlV1StatementStatusToJSON(value['status']), - 'result': SqlV1StatementResultToJSON(value['result']), - }; + return { + metadata: value["metadata"], + name: value["name"], + organization_id: value["organization_id"], + environment_id: value["environment_id"], + spec: value["spec"], + status: SqlV1StatementStatusToJSON(value["status"]), + result: SqlV1StatementResultToJSON(value["result"]), + }; } - diff --git a/src/clients/flinkSql/models/index.ts b/src/clients/flinkSql/models/index.ts index ca5b9067a8..eeecb483ef 100644 --- a/src/clients/flinkSql/models/index.ts +++ b/src/clients/flinkSql/models/index.ts @@ -1,90 +1,90 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ColumnDetails'; -export * from './CreateSqlv1AgentRequest'; -export * from './CreateSqlv1Connection201Response'; -export * from './CreateSqlv1ConnectionRequest'; -export * from './CreateSqlv1MaterializedTable201Response'; -export * from './CreateSqlv1MaterializedTableRequest'; -export * from './CreateSqlv1Statement201Response'; -export * from './CreateSqlv1StatementRequest'; -export * from './CreateSqlv1ToolRequest'; -export * from './DataType'; -export * from './ErrorSource'; -export * from './ExceptionListMeta'; -export * from './Failure'; -export * from './GetSqlv1Connection200Response'; -export * from './GetSqlv1Statement200Response'; -export * from './GetSqlv1StatementResult200Response'; -export * from './GetSqlv1Tool200Response'; -export * from './JsonPatchRequestAddReplace'; -export * from './JsonPatchRequestMoveCopy'; -export * from './JsonPatchRequestRemove'; -export * from './ListMeta'; -export * from './ModelError'; -export * from './ObjectMeta'; -export * from './PatchRequestInner'; -export * from './ResultListMeta'; -export * from './RowFieldType'; -export * from './SqlV1Agent'; -export * from './SqlV1AgentList'; -export * from './SqlV1AgentMetadata'; -export * from './SqlV1AgentSpec'; -export * from './SqlV1AgentStatus'; -export * from './SqlV1ColumnCommon'; -export * from './SqlV1ComputedColumn'; -export * from './SqlV1Connection'; -export * from './SqlV1ConnectionList'; -export * from './SqlV1ConnectionListDataInner'; -export * from './SqlV1ConnectionListMetadata'; -export * from './SqlV1ConnectionMetadata'; -export * from './SqlV1ConnectionSpec'; -export * from './SqlV1ConnectionSpecAuthData'; -export * from './SqlV1ConnectionStatus'; -export * from './SqlV1MaterializedTable'; -export * from './SqlV1MaterializedTableColumnDetails'; -export * from './SqlV1MaterializedTableConstraint'; -export * from './SqlV1MaterializedTableDistribution'; -export * from './SqlV1MaterializedTableList'; -export * from './SqlV1MaterializedTableMetadata'; -export * from './SqlV1MaterializedTableSpec'; -export * from './SqlV1MaterializedTableStatus'; -export * from './SqlV1MaterializedTableVersion'; -export * from './SqlV1MaterializedTableVersionList'; -export * from './SqlV1MaterializedTableVersionMetadata'; -export * from './SqlV1MaterializedTableVersionSpec'; -export * from './SqlV1MaterializedTableWarning'; -export * from './SqlV1MaterializedTableWatermark'; -export * from './SqlV1MetadataColumn'; -export * from './SqlV1PhysicalColumn'; -export * from './SqlV1PlaintextProvider'; -export * from './SqlV1ResourceChange'; -export * from './SqlV1ResultSchema'; -export * from './SqlV1ScalingStatus'; -export * from './SqlV1StateLimitStatus'; -export * from './SqlV1Statement'; -export * from './SqlV1StatementException'; -export * from './SqlV1StatementExceptionList'; -export * from './SqlV1StatementList'; -export * from './SqlV1StatementListDataInner'; -export * from './SqlV1StatementListMetadata'; -export * from './SqlV1StatementMetadata'; -export * from './SqlV1StatementResult'; -export * from './SqlV1StatementResultResults'; -export * from './SqlV1StatementSpec'; -export * from './SqlV1StatementStatus'; -export * from './SqlV1StatementStatusAffectedResource'; -export * from './SqlV1StatementTraits'; -export * from './SqlV1StatementWarning'; -export * from './SqlV1Tool'; -export * from './SqlV1ToolList'; -export * from './SqlV1ToolListDataInner'; -export * from './SqlV1ToolListMetadata'; -export * from './SqlV1ToolMetadata'; -export * from './SqlV1ToolSpec'; -export * from './SqlV1ToolStatus'; -export * from './StatementObjectMeta'; -export * from './UpdateSqlv1AgentRequest'; -export * from './UpdateSqlv1ConnectionRequest'; -export * from './UpdateSqlv1MaterializedTableRequest'; -export * from './UpdateSqlv1StatementRequest'; +export * from "./ColumnDetails"; +export * from "./CreateSqlv1AgentRequest"; +export * from "./CreateSqlv1Connection201Response"; +export * from "./CreateSqlv1ConnectionRequest"; +export * from "./CreateSqlv1MaterializedTable201Response"; +export * from "./CreateSqlv1MaterializedTableRequest"; +export * from "./CreateSqlv1Statement201Response"; +export * from "./CreateSqlv1StatementRequest"; +export * from "./CreateSqlv1ToolRequest"; +export * from "./DataType"; +export * from "./ErrorSource"; +export * from "./ExceptionListMeta"; +export * from "./Failure"; +export * from "./GetSqlv1Connection200Response"; +export * from "./GetSqlv1Statement200Response"; +export * from "./GetSqlv1StatementResult200Response"; +export * from "./GetSqlv1Tool200Response"; +export * from "./JsonPatchRequestAddReplace"; +export * from "./JsonPatchRequestMoveCopy"; +export * from "./JsonPatchRequestRemove"; +export * from "./ListMeta"; +export * from "./ModelError"; +export * from "./ObjectMeta"; +export * from "./PatchRequestInner"; +export * from "./ResultListMeta"; +export * from "./RowFieldType"; +export * from "./SqlV1Agent"; +export * from "./SqlV1AgentList"; +export * from "./SqlV1AgentMetadata"; +export * from "./SqlV1AgentSpec"; +export * from "./SqlV1AgentStatus"; +export * from "./SqlV1ColumnCommon"; +export * from "./SqlV1ComputedColumn"; +export * from "./SqlV1Connection"; +export * from "./SqlV1ConnectionList"; +export * from "./SqlV1ConnectionListDataInner"; +export * from "./SqlV1ConnectionListMetadata"; +export * from "./SqlV1ConnectionMetadata"; +export * from "./SqlV1ConnectionSpec"; +export * from "./SqlV1ConnectionSpecAuthData"; +export * from "./SqlV1ConnectionStatus"; +export * from "./SqlV1MaterializedTable"; +export * from "./SqlV1MaterializedTableColumnDetails"; +export * from "./SqlV1MaterializedTableConstraint"; +export * from "./SqlV1MaterializedTableDistribution"; +export * from "./SqlV1MaterializedTableList"; +export * from "./SqlV1MaterializedTableMetadata"; +export * from "./SqlV1MaterializedTableSpec"; +export * from "./SqlV1MaterializedTableStatus"; +export * from "./SqlV1MaterializedTableVersion"; +export * from "./SqlV1MaterializedTableVersionList"; +export * from "./SqlV1MaterializedTableVersionMetadata"; +export * from "./SqlV1MaterializedTableVersionSpec"; +export * from "./SqlV1MaterializedTableWarning"; +export * from "./SqlV1MaterializedTableWatermark"; +export * from "./SqlV1MetadataColumn"; +export * from "./SqlV1PhysicalColumn"; +export * from "./SqlV1PlaintextProvider"; +export * from "./SqlV1ResourceChange"; +export * from "./SqlV1ResultSchema"; +export * from "./SqlV1ScalingStatus"; +export * from "./SqlV1StateLimitStatus"; +export * from "./SqlV1Statement"; +export * from "./SqlV1StatementException"; +export * from "./SqlV1StatementExceptionList"; +export * from "./SqlV1StatementList"; +export * from "./SqlV1StatementListDataInner"; +export * from "./SqlV1StatementListMetadata"; +export * from "./SqlV1StatementMetadata"; +export * from "./SqlV1StatementResult"; +export * from "./SqlV1StatementResultResults"; +export * from "./SqlV1StatementSpec"; +export * from "./SqlV1StatementStatus"; +export * from "./SqlV1StatementStatusAffectedResource"; +export * from "./SqlV1StatementTraits"; +export * from "./SqlV1StatementWarning"; +export * from "./SqlV1Tool"; +export * from "./SqlV1ToolList"; +export * from "./SqlV1ToolListDataInner"; +export * from "./SqlV1ToolListMetadata"; +export * from "./SqlV1ToolMetadata"; +export * from "./SqlV1ToolSpec"; +export * from "./SqlV1ToolStatus"; +export * from "./StatementObjectMeta"; +export * from "./UpdateSqlv1AgentRequest"; +export * from "./UpdateSqlv1ConnectionRequest"; +export * from "./UpdateSqlv1MaterializedTableRequest"; +export * from "./UpdateSqlv1StatementRequest"; diff --git a/src/clients/flinkSql/runtime.ts b/src/clients/flinkSql/runtime.ts index bb1297e657..3e21cdb8b8 100644 --- a/src/clients/flinkSql/runtime.ts +++ b/src/clients/flinkSql/runtime.ts @@ -12,76 +12,78 @@ * Do not edit the class manually. */ - export const BASE_PATH = "https://flink.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts b/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts index 36ac77420c..e93bc29e19 100644 --- a/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts +++ b/src/clients/flinkWorkspaces/apis/WorkspacesWsV1Api.ts @@ -5,15 +5,14 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateWsV1Workspace201Response, CreateWsV1WorkspaceRequest, @@ -22,390 +21,528 @@ import type { PatchRequestInner, PutWsV1WorkspaceRequest, WsV1WorkspaceList, -} from '../models/index'; +} from "../models/index"; import { - CreateWsV1Workspace201ResponseFromJSON, - CreateWsV1Workspace201ResponseToJSON, - CreateWsV1WorkspaceRequestFromJSON, - CreateWsV1WorkspaceRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetWsV1Workspace200ResponseFromJSON, - GetWsV1Workspace200ResponseToJSON, - PatchRequestInnerFromJSON, - PatchRequestInnerToJSON, - PutWsV1WorkspaceRequestFromJSON, - PutWsV1WorkspaceRequestToJSON, - WsV1WorkspaceListFromJSON, - WsV1WorkspaceListToJSON, -} from '../models/index'; + CreateWsV1Workspace201ResponseFromJSON, + CreateWsV1Workspace201ResponseToJSON, + CreateWsV1WorkspaceRequestFromJSON, + CreateWsV1WorkspaceRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetWsV1Workspace200ResponseFromJSON, + GetWsV1Workspace200ResponseToJSON, + PatchRequestInnerFromJSON, + PatchRequestInnerToJSON, + PutWsV1WorkspaceRequestFromJSON, + PutWsV1WorkspaceRequestToJSON, + WsV1WorkspaceListFromJSON, + WsV1WorkspaceListToJSON, +} from "../models/index"; export interface CreateWsV1WorkspaceOperationRequest { - organization_id: string; - environment_id: string; - CreateWsV1WorkspaceRequest?: CreateWsV1WorkspaceRequest; + organization_id: string; + environment_id: string; + CreateWsV1WorkspaceRequest?: CreateWsV1WorkspaceRequest; } export interface DeleteWsV1WorkspaceRequest { - organization_id: string; - environment_id: string; - name: string; + organization_id: string; + environment_id: string; + name: string; } export interface GetWsV1WorkspaceRequest { - organization_id: string; - environment_id: string; - name: string; + organization_id: string; + environment_id: string; + name: string; } export interface ListWsV1WorkspacesRequest { - organization_id: string; - environment_id: string; - spec_compute_pool?: string; - all?: boolean; - page_size?: number; - page_token?: string; + organization_id: string; + environment_id: string; + spec_compute_pool?: string; + all?: boolean; + page_size?: number; + page_token?: string; } export interface PatchWsV1WorkspaceRequest { - organization_id: string; - environment_id: string; - name: string; - PatchRequestInner?: Array; + organization_id: string; + environment_id: string; + name: string; + PatchRequestInner?: Array; } export interface PutWsV1WorkspaceOperationRequest { - organization_id: string; - environment_id: string; - name: string; - PutWsV1WorkspaceRequest?: PutWsV1WorkspaceRequest; + organization_id: string; + environment_id: string; + name: string; + PutWsV1WorkspaceRequest?: PutWsV1WorkspaceRequest; } /** - * + * */ export class WorkspacesWsV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. + * Create a Workspace + */ + async createWsV1WorkspaceRaw( + requestParameters: CreateWsV1WorkspaceOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createWsV1Workspace().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createWsV1Workspace().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. - * Create a Workspace - */ - async createWsV1WorkspaceRaw(requestParameters: CreateWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling createWsV1Workspace().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling createWsV1Workspace().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateWsV1WorkspaceRequestToJSON(requestParameters['CreateWsV1WorkspaceRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateWsV1Workspace201ResponseFromJSON(jsonValue)); + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateWsV1WorkspaceRequestToJSON(requestParameters["CreateWsV1WorkspaceRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateWsV1Workspace201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. + * Create a Workspace + */ + async createWsV1Workspace( + requestParameters: CreateWsV1WorkspaceOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. + * Delete a Workspace + */ + async deleteWsV1WorkspaceRaw( + requestParameters: DeleteWsV1WorkspaceRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteWsV1Workspace().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a workspace. - * Create a Workspace - */ - async createWsV1Workspace(requestParameters: CreateWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteWsV1Workspace().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. - * Delete a Workspace - */ - async deleteWsV1WorkspaceRaw(requestParameters: DeleteWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling deleteWsV1Workspace().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling deleteWsV1Workspace().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteWsV1Workspace().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteWsV1Workspace().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. - * Delete a Workspace - */ - async deleteWsV1Workspace(requestParameters: DeleteWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteWsV1WorkspaceRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a workspace. + * Delete a Workspace + */ + async deleteWsV1Workspace( + requestParameters: DeleteWsV1WorkspaceRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteWsV1WorkspaceRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. + * Read a Workspace + */ + async getWsV1WorkspaceRaw( + requestParameters: GetWsV1WorkspaceRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getWsV1Workspace().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. - * Read a Workspace - */ - async getWsV1WorkspaceRaw(requestParameters: GetWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling getWsV1Workspace().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling getWsV1Workspace().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getWsV1Workspace().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetWsV1Workspace200ResponseFromJSON(jsonValue)); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getWsV1Workspace().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. - * Read a Workspace - */ - async getWsV1Workspace(requestParameters: GetWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getWsV1Workspace().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. - * List of Workspaces - */ - async listWsV1WorkspacesRaw(requestParameters: ListWsV1WorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling listWsV1Workspaces().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling listWsV1Workspaces().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['spec_compute_pool'] != null) { - queryParameters['spec.compute_pool'] = requestParameters['spec_compute_pool']; - } - - if (requestParameters['all'] != null) { - queryParameters['all'] = requestParameters['all']; - } - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WsV1WorkspaceListFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetWsV1Workspace200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a workspace. + * Read a Workspace + */ + async getWsV1Workspace( + requestParameters: GetWsV1WorkspaceRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. + * List of Workspaces + */ + async listWsV1WorkspacesRaw( + requestParameters: ListWsV1WorkspacesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listWsV1Workspaces().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. - * List of Workspaces - */ - async listWsV1Workspaces(requestParameters: ListWsV1WorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listWsV1WorkspacesRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listWsV1Workspaces().', + ); } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. - * Update a Workspace with patch request - */ - async patchWsV1WorkspaceRaw(requestParameters: PatchWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling patchWsV1Workspace().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling patchWsV1Workspace().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling patchWsV1Workspace().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json-patch+json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: requestParameters['PatchRequestInner']!.map(PatchRequestInnerToJSON), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateWsV1Workspace201ResponseFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["spec_compute_pool"] != null) { + queryParameters["spec.compute_pool"] = requestParameters["spec_compute_pool"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. - * Update a Workspace with patch request - */ - async patchWsV1Workspace(requestParameters: PatchWsV1WorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.patchWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["all"] != null) { + queryParameters["all"] = requestParameters["all"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Workspace - */ - async putWsV1WorkspaceRaw(requestParameters: PutWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['organization_id'] == null) { - throw new runtime.RequiredError( - 'organization_id', - 'Required parameter "organization_id" was null or undefined when calling putWsV1Workspace().' - ); - } - - if (requestParameters['environment_id'] == null) { - throw new runtime.RequiredError( - 'environment_id', - 'Required parameter "environment_id" was null or undefined when calling putWsV1Workspace().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling putWsV1Workspace().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}`.replace(`{${"organization_id"}}`, encodeURIComponent(String(requestParameters['organization_id']))).replace(`{${"environment_id"}}`, encodeURIComponent(String(requestParameters['environment_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: PutWsV1WorkspaceRequestToJSON(requestParameters['PutWsV1WorkspaceRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CreateWsV1Workspace201ResponseFromJSON(jsonValue)); + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. - * Update a Workspace - */ - async putWsV1Workspace(requestParameters: PutWsV1WorkspaceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.putWsV1WorkspaceRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + WsV1WorkspaceListFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of workspaces. By default, only workspaces created by the caller will be returned. See the `all` query parameter for more details. + * List of Workspaces + */ + async listWsV1Workspaces( + requestParameters: ListWsV1WorkspacesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listWsV1WorkspacesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. + * Update a Workspace with patch request + */ + async patchWsV1WorkspaceRaw( + requestParameters: PatchWsV1WorkspaceRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling patchWsV1Workspace().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling patchWsV1Workspace().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling patchWsV1Workspace().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json-patch+json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "PATCH", + headers: headerParameters, + query: queryParameters, + body: requestParameters["PatchRequestInner"]!.map(PatchRequestInnerToJSON), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateWsV1Workspace201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to patch a workspace. + * Update a Workspace with patch request + */ + async patchWsV1Workspace( + requestParameters: PatchWsV1WorkspaceRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.patchWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Workspace + */ + async putWsV1WorkspaceRaw( + requestParameters: PutWsV1WorkspaceOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling putWsV1Workspace().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling putWsV1Workspace().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling putWsV1Workspace().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/ws/v1/organizations/{organization_id}/environments/{environment_id}/workspaces/{name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: PutWsV1WorkspaceRequestToJSON(requestParameters["PutWsV1WorkspaceRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateWsV1Workspace201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a workspace. The request will fail with a 409 Conflict error if the Workspace has changed since it was fetched. In this case, do a GET, reapply the modifications, and try the update again. + * Update a Workspace + */ + async putWsV1Workspace( + requestParameters: PutWsV1WorkspaceOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.putWsV1WorkspaceRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/flinkWorkspaces/apis/index.ts b/src/clients/flinkWorkspaces/apis/index.ts index 6631128ae1..289f5148e8 100644 --- a/src/clients/flinkWorkspaces/apis/index.ts +++ b/src/clients/flinkWorkspaces/apis/index.ts @@ -1,3 +1,3 @@ /* tslint:disable */ /* eslint-disable */ -export * from './WorkspacesWsV1Api'; +export * from "./WorkspacesWsV1Api"; diff --git a/src/clients/flinkWorkspaces/index.ts b/src/clients/flinkWorkspaces/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/flinkWorkspaces/index.ts +++ b/src/clients/flinkWorkspaces/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts b/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts index f498db0e1e..66b8369439 100644 --- a/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts +++ b/src/clients/flinkWorkspaces/models/CreateWsV1Workspace201Response.ts @@ -5,142 +5,149 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; +import { mapValues } from "../runtime"; +import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from './WsV1WorkspaceStatus'; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from "./WsV1WorkspaceStatus"; /** - * + * * @export * @interface CreateWsV1Workspace201Response */ export interface CreateWsV1Workspace201Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly api_version: CreateWsV1Workspace201ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly kind: CreateWsV1Workspace201ResponseKindEnum; - /** - * - * @type {object} - * @memberof CreateWsV1Workspace201Response - */ - metadata: object; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof CreateWsV1Workspace201Response - */ - name: string; - /** - * - * @type {object} - * @memberof CreateWsV1Workspace201Response - */ - spec: object; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof CreateWsV1Workspace201Response - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly api_version: CreateWsV1Workspace201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly kind: CreateWsV1Workspace201ResponseKindEnum; + /** + * + * @type {object} + * @memberof CreateWsV1Workspace201Response + */ + metadata: object; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof CreateWsV1Workspace201Response + */ + name: string; + /** + * + * @type {object} + * @memberof CreateWsV1Workspace201Response + */ + spec: object; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof CreateWsV1Workspace201Response + */ + status?: WsV1WorkspaceStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateWsV1Workspace201ResponseApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateWsV1Workspace201ResponseKindEnum { - Workspace = 'Workspace' + Workspace = "Workspace", } - /** * Check if a given object implements the CreateWsV1Workspace201Response interface. */ -export function instanceOfCreateWsV1Workspace201Response(value: object): value is CreateWsV1Workspace201Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfCreateWsV1Workspace201Response( + value: object, +): value is CreateWsV1Workspace201Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function CreateWsV1Workspace201ResponseFromJSON(json: any): CreateWsV1Workspace201Response { - return CreateWsV1Workspace201ResponseFromJSONTyped(json, false); + return CreateWsV1Workspace201ResponseFromJSONTyped(json, false); } -export function CreateWsV1Workspace201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWsV1Workspace201Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'name': json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), - }; +export function CreateWsV1Workspace201ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateWsV1Workspace201Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), + }; } export function CreateWsV1Workspace201ResponseToJSON(json: any): CreateWsV1Workspace201Response { - return CreateWsV1Workspace201ResponseToJSONTyped(json, false); + return CreateWsV1Workspace201ResponseToJSONTyped(json, false); } -export function CreateWsV1Workspace201ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateWsV1Workspace201ResponseToJSONTyped( + value?: Omit< + CreateWsV1Workspace201Response, + "api_version" | "kind" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'spec': value['spec'], - 'status': WsV1WorkspaceStatusToJSON(value['status']), - }; + return { + metadata: value["metadata"], + name: value["name"], + spec: value["spec"], + status: WsV1WorkspaceStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts index 21f68ad2d5..b2f1b2572a 100644 --- a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts +++ b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequest.ts @@ -5,152 +5,161 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CreateWsV1WorkspaceRequestAllOfSpec } from './CreateWsV1WorkspaceRequestAllOfSpec'; +import { mapValues } from "../runtime"; +import type { CreateWsV1WorkspaceRequestAllOfSpec } from "./CreateWsV1WorkspaceRequestAllOfSpec"; import { - CreateWsV1WorkspaceRequestAllOfSpecFromJSON, - CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped, - CreateWsV1WorkspaceRequestAllOfSpecToJSON, - CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped, -} from './CreateWsV1WorkspaceRequestAllOfSpec'; -import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; + CreateWsV1WorkspaceRequestAllOfSpecFromJSON, + CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped, + CreateWsV1WorkspaceRequestAllOfSpecToJSON, + CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped, +} from "./CreateWsV1WorkspaceRequestAllOfSpec"; +import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from './WsV1WorkspaceStatus'; -import type { WsV1WorkspaceMetadata } from './WsV1WorkspaceMetadata'; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from "./WsV1WorkspaceStatus"; +import type { WsV1WorkspaceMetadata } from "./WsV1WorkspaceMetadata"; import { - WsV1WorkspaceMetadataFromJSON, - WsV1WorkspaceMetadataFromJSONTyped, - WsV1WorkspaceMetadataToJSON, - WsV1WorkspaceMetadataToJSONTyped, -} from './WsV1WorkspaceMetadata'; + WsV1WorkspaceMetadataFromJSON, + WsV1WorkspaceMetadataFromJSONTyped, + WsV1WorkspaceMetadataToJSON, + WsV1WorkspaceMetadataToJSONTyped, +} from "./WsV1WorkspaceMetadata"; /** - * + * * @export * @interface CreateWsV1WorkspaceRequest */ export interface CreateWsV1WorkspaceRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly api_version?: CreateWsV1WorkspaceRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly kind?: CreateWsV1WorkspaceRequestKindEnum; - /** - * - * @type {WsV1WorkspaceMetadata} - * @memberof CreateWsV1WorkspaceRequest - */ - metadata?: WsV1WorkspaceMetadata; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - readonly environment_id?: string; - /** - * The user-supplied name for the workspace, which must be unique across the environment and region. - * @type {string} - * @memberof CreateWsV1WorkspaceRequest - */ - name: string; - /** - * - * @type {CreateWsV1WorkspaceRequestAllOfSpec} - * @memberof CreateWsV1WorkspaceRequest - */ - spec?: CreateWsV1WorkspaceRequestAllOfSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof CreateWsV1WorkspaceRequest - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly api_version?: CreateWsV1WorkspaceRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly kind?: CreateWsV1WorkspaceRequestKindEnum; + /** + * + * @type {WsV1WorkspaceMetadata} + * @memberof CreateWsV1WorkspaceRequest + */ + metadata?: WsV1WorkspaceMetadata; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + readonly environment_id?: string; + /** + * The user-supplied name for the workspace, which must be unique across the environment and region. + * @type {string} + * @memberof CreateWsV1WorkspaceRequest + */ + name: string; + /** + * + * @type {CreateWsV1WorkspaceRequestAllOfSpec} + * @memberof CreateWsV1WorkspaceRequest + */ + spec?: CreateWsV1WorkspaceRequestAllOfSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof CreateWsV1WorkspaceRequest + */ + status?: WsV1WorkspaceStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateWsV1WorkspaceRequestApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateWsV1WorkspaceRequestKindEnum { - Workspace = 'Workspace' + Workspace = "Workspace", } - /** * Check if a given object implements the CreateWsV1WorkspaceRequest interface. */ -export function instanceOfCreateWsV1WorkspaceRequest(value: object): value is CreateWsV1WorkspaceRequest { - if (!('name' in value) || value['name'] === undefined) return false; - return true; +export function instanceOfCreateWsV1WorkspaceRequest( + value: object, +): value is CreateWsV1WorkspaceRequest { + if (!("name" in value) || value["name"] === undefined) return false; + return true; } export function CreateWsV1WorkspaceRequestFromJSON(json: any): CreateWsV1WorkspaceRequest { - return CreateWsV1WorkspaceRequestFromJSONTyped(json, false); + return CreateWsV1WorkspaceRequestFromJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWsV1WorkspaceRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json['metadata']), - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'name': json['name'], - 'spec': json['spec'] == null ? undefined : CreateWsV1WorkspaceRequestAllOfSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), - }; +export function CreateWsV1WorkspaceRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateWsV1WorkspaceRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json["metadata"]), + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + name: json["name"], + spec: + json["spec"] == null ? undefined : CreateWsV1WorkspaceRequestAllOfSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), + }; } export function CreateWsV1WorkspaceRequestToJSON(json: any): CreateWsV1WorkspaceRequest { - return CreateWsV1WorkspaceRequestToJSONTyped(json, false); + return CreateWsV1WorkspaceRequestToJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateWsV1WorkspaceRequestToJSONTyped( + value?: Omit< + CreateWsV1WorkspaceRequest, + "api_version" | "kind" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': WsV1WorkspaceMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': CreateWsV1WorkspaceRequestAllOfSpecToJSON(value['spec']), - 'status': WsV1WorkspaceStatusToJSON(value['status']), - }; + return { + metadata: WsV1WorkspaceMetadataToJSON(value["metadata"]), + name: value["name"], + spec: CreateWsV1WorkspaceRequestAllOfSpecToJSON(value["spec"]), + status: WsV1WorkspaceStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts index 0fcd12351d..9223b07193 100644 --- a/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts +++ b/src/clients/flinkWorkspaces/models/CreateWsV1WorkspaceRequestAllOfSpec.ts @@ -5,93 +5,102 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CreateWsV1WorkspaceRequestAllOfSpec */ export interface CreateWsV1WorkspaceRequestAllOfSpec { - /** - * A human-readable display name for the workspace, or generated if absent. - * @type {string} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - display_name?: string; - /** - * The service account that clients can use to execute the workspace's code blocks. - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - service_account?: any | null; - /** - * The compute pool in the same environment that clients can use to execute the workspace's code blocks. - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - compute_pool?: any | null; - /** - * The ordered blocks for the new workspace - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - blocks?: any | null; - /** - * The key-value pair properties for the new workspace. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {any} - * @memberof CreateWsV1WorkspaceRequestAllOfSpec - */ - properties?: any | null; + /** + * A human-readable display name for the workspace, or generated if absent. + * @type {string} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + display_name?: string; + /** + * The service account that clients can use to execute the workspace's code blocks. + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + service_account?: any | null; + /** + * The compute pool in the same environment that clients can use to execute the workspace's code blocks. + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + compute_pool?: any | null; + /** + * The ordered blocks for the new workspace + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + blocks?: any | null; + /** + * The key-value pair properties for the new workspace. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {any} + * @memberof CreateWsV1WorkspaceRequestAllOfSpec + */ + properties?: any | null; } /** * Check if a given object implements the CreateWsV1WorkspaceRequestAllOfSpec interface. */ -export function instanceOfCreateWsV1WorkspaceRequestAllOfSpec(value: object): value is CreateWsV1WorkspaceRequestAllOfSpec { - return true; +export function instanceOfCreateWsV1WorkspaceRequestAllOfSpec( + value: object, +): value is CreateWsV1WorkspaceRequestAllOfSpec { + return true; } -export function CreateWsV1WorkspaceRequestAllOfSpecFromJSON(json: any): CreateWsV1WorkspaceRequestAllOfSpec { - return CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); +export function CreateWsV1WorkspaceRequestAllOfSpecFromJSON( + json: any, +): CreateWsV1WorkspaceRequestAllOfSpec { + return CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWsV1WorkspaceRequestAllOfSpec { - if (json == null) { - return json; - } - return { - - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - 'service_account': json['service_account'] == null ? undefined : json['service_account'], - 'compute_pool': json['compute_pool'] == null ? undefined : json['compute_pool'], - 'blocks': json['blocks'] == null ? undefined : json['blocks'], - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function CreateWsV1WorkspaceRequestAllOfSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateWsV1WorkspaceRequestAllOfSpec { + if (json == null) { + return json; + } + return { + display_name: json["display_name"] == null ? undefined : json["display_name"], + service_account: json["service_account"] == null ? undefined : json["service_account"], + compute_pool: json["compute_pool"] == null ? undefined : json["compute_pool"], + blocks: json["blocks"] == null ? undefined : json["blocks"], + properties: json["properties"] == null ? undefined : json["properties"], + }; } -export function CreateWsV1WorkspaceRequestAllOfSpecToJSON(json: any): CreateWsV1WorkspaceRequestAllOfSpec { - return CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); +export function CreateWsV1WorkspaceRequestAllOfSpecToJSON( + json: any, +): CreateWsV1WorkspaceRequestAllOfSpec { + return CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); } -export function CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped(value?: CreateWsV1WorkspaceRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateWsV1WorkspaceRequestAllOfSpecToJSONTyped( + value?: CreateWsV1WorkspaceRequestAllOfSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'display_name': value['display_name'], - 'service_account': value['service_account'], - 'compute_pool': value['compute_pool'], - 'blocks': value['blocks'], - 'properties': value['properties'], - }; + return { + display_name: value["display_name"], + service_account: value["service_account"], + compute_pool: value["compute_pool"], + blocks: value["blocks"], + properties: value["properties"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts b/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts index a84437888e..a7b2b748d1 100644 --- a/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts +++ b/src/clients/flinkWorkspaces/models/EnvScopedObjectReference.ts @@ -5,85 +5,90 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface EnvScopedObjectReference */ export interface EnvScopedObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - id: string; - /** - * Environment of the referred resource, which is the same environment as the workspace - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof EnvScopedObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + id: string; + /** + * Environment of the referred resource, which is the same environment as the workspace + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof EnvScopedObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the EnvScopedObjectReference interface. */ -export function instanceOfEnvScopedObjectReference(value: object): value is EnvScopedObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; +export function instanceOfEnvScopedObjectReference( + value: object, +): value is EnvScopedObjectReference { + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function EnvScopedObjectReferenceFromJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceFromJSONTyped(json, false); + return EnvScopedObjectReferenceFromJSONTyped(json, false); } -export function EnvScopedObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvScopedObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'related': json['related'], - 'resource_name': json['resource_name'], - }; +export function EnvScopedObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EnvScopedObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + environment: json["environment"] == null ? undefined : json["environment"], + related: json["related"], + resource_name: json["resource_name"], + }; } export function EnvScopedObjectReferenceToJSON(json: any): EnvScopedObjectReference { - return EnvScopedObjectReferenceToJSONTyped(json, false); + return EnvScopedObjectReferenceToJSONTyped(json, false); } -export function EnvScopedObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EnvScopedObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - }; + return { + id: value["id"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/ErrorSource.ts b/src/clients/flinkWorkspaces/models/ErrorSource.ts index e7214f06ec..8bf8e1fa12 100644 --- a/src/clients/flinkWorkspaces/models/ErrorSource.ts +++ b/src/clients/flinkWorkspaces/models/ErrorSource.ts @@ -5,69 +5,69 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - - 'pointer': json['pointer'] == null ? undefined : json['pointer'], - 'parameter': json['parameter'] == null ? undefined : json['parameter'], - }; + if (json == null) { + return json; + } + return { + pointer: json["pointer"] == null ? undefined : json["pointer"], + parameter: json["parameter"] == null ? undefined : json["parameter"], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped( + value?: ErrorSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'pointer': value['pointer'], - 'parameter': value['parameter'], - }; + return { + pointer: value["pointer"], + parameter: value["parameter"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/Failure.ts b/src/clients/flinkWorkspaces/models/Failure.ts index 128c9045f5..4486f3caa0 100644 --- a/src/clients/flinkWorkspaces/models/Failure.ts +++ b/src/clients/flinkWorkspaces/models/Failure.ts @@ -5,62 +5,62 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!('errors' in value) || value['errors'] === undefined) return false; - return true; + if (!("errors" in value) || value["errors"] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - - 'errors': new Set(json['errors']), - }; + if (json == null) { + return json; + } + return { + errors: new Set(json["errors"]), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped( + value?: Failure | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'errors': Array.from(value['errors'] as Set), - }; + return { + errors: Array.from(value["errors"] as Set), + }; } - diff --git a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts index 8b0d5ea0dc..47135367e0 100644 --- a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts +++ b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200Response.ts @@ -5,149 +5,156 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GetWsV1Workspace200ResponseAllOfSpec } from './GetWsV1Workspace200ResponseAllOfSpec'; +import { mapValues } from "../runtime"; +import type { GetWsV1Workspace200ResponseAllOfSpec } from "./GetWsV1Workspace200ResponseAllOfSpec"; import { - GetWsV1Workspace200ResponseAllOfSpecFromJSON, - GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped, - GetWsV1Workspace200ResponseAllOfSpecToJSON, - GetWsV1Workspace200ResponseAllOfSpecToJSONTyped, -} from './GetWsV1Workspace200ResponseAllOfSpec'; -import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; + GetWsV1Workspace200ResponseAllOfSpecFromJSON, + GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped, + GetWsV1Workspace200ResponseAllOfSpecToJSON, + GetWsV1Workspace200ResponseAllOfSpecToJSONTyped, +} from "./GetWsV1Workspace200ResponseAllOfSpec"; +import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from './WsV1WorkspaceStatus'; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from "./WsV1WorkspaceStatus"; /** - * + * * @export * @interface GetWsV1Workspace200Response */ export interface GetWsV1Workspace200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly api_version: GetWsV1Workspace200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly kind: GetWsV1Workspace200ResponseKindEnum; - /** - * - * @type {object} - * @memberof GetWsV1Workspace200Response - */ - metadata: object; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof GetWsV1Workspace200Response - */ - name: string; - /** - * - * @type {GetWsV1Workspace200ResponseAllOfSpec} - * @memberof GetWsV1Workspace200Response - */ - spec: GetWsV1Workspace200ResponseAllOfSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof GetWsV1Workspace200Response - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly api_version: GetWsV1Workspace200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly kind: GetWsV1Workspace200ResponseKindEnum; + /** + * + * @type {object} + * @memberof GetWsV1Workspace200Response + */ + metadata: object; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof GetWsV1Workspace200Response + */ + name: string; + /** + * + * @type {GetWsV1Workspace200ResponseAllOfSpec} + * @memberof GetWsV1Workspace200Response + */ + spec: GetWsV1Workspace200ResponseAllOfSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof GetWsV1Workspace200Response + */ + status?: WsV1WorkspaceStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetWsV1Workspace200ResponseApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetWsV1Workspace200ResponseKindEnum { - Workspace = 'Workspace' + Workspace = "Workspace", } - /** * Check if a given object implements the GetWsV1Workspace200Response interface. */ -export function instanceOfGetWsV1Workspace200Response(value: object): value is GetWsV1Workspace200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfGetWsV1Workspace200Response( + value: object, +): value is GetWsV1Workspace200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function GetWsV1Workspace200ResponseFromJSON(json: any): GetWsV1Workspace200Response { - return GetWsV1Workspace200ResponseFromJSONTyped(json, false); + return GetWsV1Workspace200ResponseFromJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetWsV1Workspace200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'name': json['name'], - 'spec': GetWsV1Workspace200ResponseAllOfSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), - }; +export function GetWsV1Workspace200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetWsV1Workspace200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + name: json["name"], + spec: GetWsV1Workspace200ResponseAllOfSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), + }; } export function GetWsV1Workspace200ResponseToJSON(json: any): GetWsV1Workspace200Response { - return GetWsV1Workspace200ResponseToJSONTyped(json, false); + return GetWsV1Workspace200ResponseToJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetWsV1Workspace200ResponseToJSONTyped( + value?: Omit< + GetWsV1Workspace200Response, + "api_version" | "kind" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'spec': GetWsV1Workspace200ResponseAllOfSpecToJSON(value['spec']), - 'status': WsV1WorkspaceStatusToJSON(value['status']), - }; + return { + metadata: value["metadata"], + name: value["name"], + spec: GetWsV1Workspace200ResponseAllOfSpecToJSON(value["spec"]), + status: WsV1WorkspaceStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts index cbfd707d16..e841274bfa 100644 --- a/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts +++ b/src/clients/flinkWorkspaces/models/GetWsV1Workspace200ResponseAllOfSpec.ts @@ -5,102 +5,113 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { WsV1Block } from './WsV1Block'; +import { mapValues } from "../runtime"; +import type { WsV1Block } from "./WsV1Block"; import { - WsV1BlockFromJSON, - WsV1BlockFromJSONTyped, - WsV1BlockToJSON, - WsV1BlockToJSONTyped, -} from './WsV1Block'; + WsV1BlockFromJSON, + WsV1BlockFromJSONTyped, + WsV1BlockToJSON, + WsV1BlockToJSONTyped, +} from "./WsV1Block"; /** - * + * * @export * @interface GetWsV1Workspace200ResponseAllOfSpec */ export interface GetWsV1Workspace200ResponseAllOfSpec { - /** - * A human-readable display name for the workspace. - * @type {string} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - display_name: string; - /** - * - * @type {any} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - compute_pool?: any | null; - /** - * - * @type {any} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - service_account?: any | null; - /** - * The ordered blocks for the workspace - * @type {Array} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - blocks?: Array; - /** - * A map (key-value pairs) of workspace-level properties. - * @type {{ [key: string]: string; }} - * @memberof GetWsV1Workspace200ResponseAllOfSpec - */ - properties?: { [key: string]: string; }; + /** + * A human-readable display name for the workspace. + * @type {string} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + display_name: string; + /** + * + * @type {any} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + compute_pool?: any | null; + /** + * + * @type {any} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + service_account?: any | null; + /** + * The ordered blocks for the workspace + * @type {Array} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + blocks?: Array; + /** + * A map (key-value pairs) of workspace-level properties. + * @type {{ [key: string]: string; }} + * @memberof GetWsV1Workspace200ResponseAllOfSpec + */ + properties?: { [key: string]: string }; } /** * Check if a given object implements the GetWsV1Workspace200ResponseAllOfSpec interface. */ -export function instanceOfGetWsV1Workspace200ResponseAllOfSpec(value: object): value is GetWsV1Workspace200ResponseAllOfSpec { - if (!('display_name' in value) || value['display_name'] === undefined) return false; - return true; +export function instanceOfGetWsV1Workspace200ResponseAllOfSpec( + value: object, +): value is GetWsV1Workspace200ResponseAllOfSpec { + if (!("display_name" in value) || value["display_name"] === undefined) return false; + return true; } -export function GetWsV1Workspace200ResponseAllOfSpecFromJSON(json: any): GetWsV1Workspace200ResponseAllOfSpec { - return GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped(json, false); +export function GetWsV1Workspace200ResponseAllOfSpecFromJSON( + json: any, +): GetWsV1Workspace200ResponseAllOfSpec { + return GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetWsV1Workspace200ResponseAllOfSpec { - if (json == null) { - return json; - } - return { - - 'display_name': json['display_name'], - 'compute_pool': json['compute_pool'] == null ? undefined : json['compute_pool'], - 'service_account': json['service_account'] == null ? undefined : json['service_account'], - 'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array).map(WsV1BlockFromJSON)), - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function GetWsV1Workspace200ResponseAllOfSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetWsV1Workspace200ResponseAllOfSpec { + if (json == null) { + return json; + } + return { + display_name: json["display_name"], + compute_pool: json["compute_pool"] == null ? undefined : json["compute_pool"], + service_account: json["service_account"] == null ? undefined : json["service_account"], + blocks: + json["blocks"] == null ? undefined : (json["blocks"] as Array).map(WsV1BlockFromJSON), + properties: json["properties"] == null ? undefined : json["properties"], + }; } -export function GetWsV1Workspace200ResponseAllOfSpecToJSON(json: any): GetWsV1Workspace200ResponseAllOfSpec { - return GetWsV1Workspace200ResponseAllOfSpecToJSONTyped(json, false); +export function GetWsV1Workspace200ResponseAllOfSpecToJSON( + json: any, +): GetWsV1Workspace200ResponseAllOfSpec { + return GetWsV1Workspace200ResponseAllOfSpecToJSONTyped(json, false); } -export function GetWsV1Workspace200ResponseAllOfSpecToJSONTyped(value?: GetWsV1Workspace200ResponseAllOfSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetWsV1Workspace200ResponseAllOfSpecToJSONTyped( + value?: GetWsV1Workspace200ResponseAllOfSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'display_name': value['display_name'], - 'compute_pool': value['compute_pool'], - 'service_account': value['service_account'], - 'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array).map(WsV1BlockToJSON)), - 'properties': value['properties'], - }; + return { + display_name: value["display_name"], + compute_pool: value["compute_pool"], + service_account: value["service_account"], + blocks: + value["blocks"] == null ? undefined : (value["blocks"] as Array).map(WsV1BlockToJSON), + properties: value["properties"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts b/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts index 2fd58ee04b..8c560369ad 100644 --- a/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts +++ b/src/clients/flinkWorkspaces/models/GlobalObjectReference.ts @@ -5,78 +5,81 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface GlobalObjectReference */ export interface GlobalObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - id: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof GlobalObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + id: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof GlobalObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the GlobalObjectReference interface. */ export function instanceOfGlobalObjectReference(value: object): value is GlobalObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function GlobalObjectReferenceFromJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceFromJSONTyped(json, false); + return GlobalObjectReferenceFromJSONTyped(json, false); } -export function GlobalObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'related': json['related'], - 'resource_name': json['resource_name'], - }; +export function GlobalObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GlobalObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + related: json["related"], + resource_name: json["resource_name"], + }; } export function GlobalObjectReferenceToJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceToJSONTyped(json, false); + return GlobalObjectReferenceToJSONTyped(json, false); } -export function GlobalObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GlobalObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - }; + return { + id: value["id"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts b/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts index 748d485f17..fa2442e700 100644 --- a/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts +++ b/src/clients/flinkWorkspaces/models/JSONPatchRequestAddReplace.ts @@ -5,91 +5,95 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * This option is used to add or replace a value for a field * @export * @interface JSONPatchRequestAddReplace */ export interface JSONPatchRequestAddReplace { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestAddReplace - */ - path: string; - /** - * The value to add, replace or test. - * @type {any} - * @memberof JSONPatchRequestAddReplace - */ - value: any | null; - /** - * The operation to perform. - * @type {string} - * @memberof JSONPatchRequestAddReplace - */ - op: JSONPatchRequestAddReplaceOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestAddReplace + */ + path: string; + /** + * The value to add, replace or test. + * @type {any} + * @memberof JSONPatchRequestAddReplace + */ + value: any | null; + /** + * The operation to perform. + * @type {string} + * @memberof JSONPatchRequestAddReplace + */ + op: JSONPatchRequestAddReplaceOpEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum JSONPatchRequestAddReplaceOpEnum { - Add = 'add', - Replace = 'replace', - Test = 'test' + Add = "add", + Replace = "replace", + Test = "test", } - /** * Check if a given object implements the JSONPatchRequestAddReplace interface. */ -export function instanceOfJSONPatchRequestAddReplace(value: object): value is JSONPatchRequestAddReplace { - if (!('path' in value) || value['path'] === undefined) return false; - if (!('value' in value) || value['value'] === undefined) return false; - if (!('op' in value) || value['op'] === undefined) return false; - return true; +export function instanceOfJSONPatchRequestAddReplace( + value: object, +): value is JSONPatchRequestAddReplace { + if (!("path" in value) || value["path"] === undefined) return false; + if (!("value" in value) || value["value"] === undefined) return false; + if (!("op" in value) || value["op"] === undefined) return false; + return true; } export function JSONPatchRequestAddReplaceFromJSON(json: any): JSONPatchRequestAddReplace { - return JSONPatchRequestAddReplaceFromJSONTyped(json, false); + return JSONPatchRequestAddReplaceFromJSONTyped(json, false); } -export function JSONPatchRequestAddReplaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchRequestAddReplace { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'value': json['value'], - 'op': json['op'], - }; +export function JSONPatchRequestAddReplaceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): JSONPatchRequestAddReplace { + if (json == null) { + return json; + } + return { + path: json["path"], + value: json["value"], + op: json["op"], + }; } export function JSONPatchRequestAddReplaceToJSON(json: any): JSONPatchRequestAddReplace { - return JSONPatchRequestAddReplaceToJSONTyped(json, false); + return JSONPatchRequestAddReplaceToJSONTyped(json, false); } -export function JSONPatchRequestAddReplaceToJSONTyped(value?: JSONPatchRequestAddReplace | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JSONPatchRequestAddReplaceToJSONTyped( + value?: JSONPatchRequestAddReplace | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'value': value['value'], - 'op': value['op'], - }; + return { + path: value["path"], + value: value["value"], + op: value["op"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts b/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts index e17cd23b1e..233ccec7b9 100644 --- a/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts +++ b/src/clients/flinkWorkspaces/models/JSONPatchRequestMoveCopy.ts @@ -5,90 +5,94 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * This option is used to move or copy a field * @export * @interface JSONPatchRequestMoveCopy */ export interface JSONPatchRequestMoveCopy { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestMoveCopy - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JSONPatchRequestMoveCopy - */ - op: JSONPatchRequestMoveCopyOpEnum; - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestMoveCopy - */ - from: string; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestMoveCopy + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JSONPatchRequestMoveCopy + */ + op: JSONPatchRequestMoveCopyOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestMoveCopy + */ + from: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum JSONPatchRequestMoveCopyOpEnum { - Move = 'move', - Copy = 'copy' + Move = "move", + Copy = "copy", } - /** * Check if a given object implements the JSONPatchRequestMoveCopy interface. */ -export function instanceOfJSONPatchRequestMoveCopy(value: object): value is JSONPatchRequestMoveCopy { - if (!('path' in value) || value['path'] === undefined) return false; - if (!('op' in value) || value['op'] === undefined) return false; - if (!('from' in value) || value['from'] === undefined) return false; - return true; +export function instanceOfJSONPatchRequestMoveCopy( + value: object, +): value is JSONPatchRequestMoveCopy { + if (!("path" in value) || value["path"] === undefined) return false; + if (!("op" in value) || value["op"] === undefined) return false; + if (!("from" in value) || value["from"] === undefined) return false; + return true; } export function JSONPatchRequestMoveCopyFromJSON(json: any): JSONPatchRequestMoveCopy { - return JSONPatchRequestMoveCopyFromJSONTyped(json, false); + return JSONPatchRequestMoveCopyFromJSONTyped(json, false); } -export function JSONPatchRequestMoveCopyFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchRequestMoveCopy { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'op': json['op'], - 'from': json['from'], - }; +export function JSONPatchRequestMoveCopyFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): JSONPatchRequestMoveCopy { + if (json == null) { + return json; + } + return { + path: json["path"], + op: json["op"], + from: json["from"], + }; } export function JSONPatchRequestMoveCopyToJSON(json: any): JSONPatchRequestMoveCopy { - return JSONPatchRequestMoveCopyToJSONTyped(json, false); + return JSONPatchRequestMoveCopyToJSONTyped(json, false); } -export function JSONPatchRequestMoveCopyToJSONTyped(value?: JSONPatchRequestMoveCopy | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JSONPatchRequestMoveCopyToJSONTyped( + value?: JSONPatchRequestMoveCopy | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'op': value['op'], - 'from': value['from'], - }; + return { + path: value["path"], + op: value["op"], + from: value["from"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts b/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts index 54dd8740cb..40d0815188 100644 --- a/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts +++ b/src/clients/flinkWorkspaces/models/JSONPatchRequestRemove.ts @@ -5,80 +5,82 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * This option is used to remove a field * @export * @interface JSONPatchRequestRemove */ export interface JSONPatchRequestRemove { - /** - * A JSON Pointer path. - * @type {string} - * @memberof JSONPatchRequestRemove - */ - path: string; - /** - * The operation to perform. - * @type {string} - * @memberof JSONPatchRequestRemove - */ - op: JSONPatchRequestRemoveOpEnum; + /** + * A JSON Pointer path. + * @type {string} + * @memberof JSONPatchRequestRemove + */ + path: string; + /** + * The operation to perform. + * @type {string} + * @memberof JSONPatchRequestRemove + */ + op: JSONPatchRequestRemoveOpEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum JSONPatchRequestRemoveOpEnum { - Remove = 'remove' + Remove = "remove", } - /** * Check if a given object implements the JSONPatchRequestRemove interface. */ export function instanceOfJSONPatchRequestRemove(value: object): value is JSONPatchRequestRemove { - if (!('path' in value) || value['path'] === undefined) return false; - if (!('op' in value) || value['op'] === undefined) return false; - return true; + if (!("path" in value) || value["path"] === undefined) return false; + if (!("op" in value) || value["op"] === undefined) return false; + return true; } export function JSONPatchRequestRemoveFromJSON(json: any): JSONPatchRequestRemove { - return JSONPatchRequestRemoveFromJSONTyped(json, false); + return JSONPatchRequestRemoveFromJSONTyped(json, false); } -export function JSONPatchRequestRemoveFromJSONTyped(json: any, ignoreDiscriminator: boolean): JSONPatchRequestRemove { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'op': json['op'], - }; +export function JSONPatchRequestRemoveFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): JSONPatchRequestRemove { + if (json == null) { + return json; + } + return { + path: json["path"], + op: json["op"], + }; } export function JSONPatchRequestRemoveToJSON(json: any): JSONPatchRequestRemove { - return JSONPatchRequestRemoveToJSONTyped(json, false); + return JSONPatchRequestRemoveToJSONTyped(json, false); } -export function JSONPatchRequestRemoveToJSONTyped(value?: JSONPatchRequestRemove | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JSONPatchRequestRemoveToJSONTyped( + value?: JSONPatchRequestRemove | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'op': value['op'], - }; + return { + path: value["path"], + op: value["op"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/ListMeta.ts b/src/clients/flinkWorkspaces/models/ListMeta.ts index 8d544c67b8..e41cfc7e7b 100644 --- a/src/clients/flinkWorkspaces/models/ListMeta.ts +++ b/src/clients/flinkWorkspaces/models/ListMeta.ts @@ -5,69 +5,69 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ListMeta - */ - self?: string; - /** - * A URL that can be followed to get the next batch of results. - * @type {string} - * @memberof ListMeta - */ - next?: string; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ListMeta + */ + self?: string; + /** + * A URL that can be followed to get the next batch of results. + * @type {string} + * @memberof ListMeta + */ + next?: string; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - }; + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped( + value?: ListMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - }; + return { + self: value["self"], + next: value["next"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/ModelError.ts b/src/clients/flinkWorkspaces/models/ModelError.ts index 4ef58c78af..19aa3eb91a 100644 --- a/src/clients/flinkWorkspaces/models/ModelError.ts +++ b/src/clients/flinkWorkspaces/models/ModelError.ts @@ -5,21 +5,21 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorSource } from './ErrorSource'; +import { mapValues } from "../runtime"; +import type { ErrorSource } from "./ErrorSource"; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from './ErrorSource'; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from "./ErrorSource"; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'status': json['status'] == null ? undefined : json['status'], - 'code': json['code'] == null ? undefined : json['code'], - 'title': json['title'] == null ? undefined : json['title'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + status: json["status"] == null ? undefined : json["status"], + code: json["code"] == null ? undefined : json["code"], + title: json["title"] == null ? undefined : json["title"], + detail: json["detail"] == null ? undefined : json["detail"], + source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped( + value?: ModelError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'status': value['status'], - 'code': value['code'], - 'title': value['title'], - 'detail': value['detail'], - 'source': ErrorSourceToJSON(value['source']), - }; + return { + id: value["id"], + status: value["status"], + code: value["code"], + title: value["title"], + detail: value["detail"], + source: ErrorSourceToJSON(value["source"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/ObjectMeta.ts b/src/clients/flinkWorkspaces/models/ObjectMeta.ts index 07cdf1df29..39030c36aa 100644 --- a/src/clients/flinkWorkspaces/models/ObjectMeta.ts +++ b/src/clients/flinkWorkspaces/models/ObjectMeta.ts @@ -5,96 +5,98 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The metadata of the workspace. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * The system-generated identifier of the resource that is unique across space and time. - * @type {string} - * @memberof ObjectMeta - */ - readonly uid?: string; - /** - * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_version?: string; - /** - * The system-generated and managed principal ID of the user who created the workspace. - * @type {string} - * @memberof ObjectMeta - */ - readonly created_by?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * The system-generated identifier of the resource that is unique across space and time. + * @type {string} + * @memberof ObjectMeta + */ + readonly uid?: string; + /** + * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_version?: string; + /** + * The system-generated and managed principal ID of the user who created the workspace. + * @type {string} + * @memberof ObjectMeta + */ + readonly created_by?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'created_by': json['created_by'] == null ? undefined : json['created_by'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - }; + if (json == null) { + return json; + } + return { + self: json["self"], + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + created_by: json["created_by"] == null ? undefined : json["created_by"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped( + value?: Omit< + ObjectMeta, + "self" | "uid" | "resource_version" | "created_by" | "created_at" | "updated_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkWorkspaces/models/PatchRequestInner.ts b/src/clients/flinkWorkspaces/models/PatchRequestInner.ts index 731ce4b8f0..bf1739698d 100644 --- a/src/clients/flinkWorkspaces/models/PatchRequestInner.ts +++ b/src/clients/flinkWorkspaces/models/PatchRequestInner.ts @@ -5,82 +5,90 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import type { JSONPatchRequestAddReplace } from './JSONPatchRequestAddReplace'; +import type { JSONPatchRequestAddReplace } from "./JSONPatchRequestAddReplace"; import { - instanceOfJSONPatchRequestAddReplace, - JSONPatchRequestAddReplaceFromJSON, - JSONPatchRequestAddReplaceFromJSONTyped, - JSONPatchRequestAddReplaceToJSON, -} from './JSONPatchRequestAddReplace'; -import type { JSONPatchRequestMoveCopy } from './JSONPatchRequestMoveCopy'; + instanceOfJSONPatchRequestAddReplace, + JSONPatchRequestAddReplaceFromJSON, + JSONPatchRequestAddReplaceFromJSONTyped, + JSONPatchRequestAddReplaceToJSON, +} from "./JSONPatchRequestAddReplace"; +import type { JSONPatchRequestMoveCopy } from "./JSONPatchRequestMoveCopy"; import { - instanceOfJSONPatchRequestMoveCopy, - JSONPatchRequestMoveCopyFromJSON, - JSONPatchRequestMoveCopyFromJSONTyped, - JSONPatchRequestMoveCopyToJSON, -} from './JSONPatchRequestMoveCopy'; -import type { JSONPatchRequestRemove } from './JSONPatchRequestRemove'; + instanceOfJSONPatchRequestMoveCopy, + JSONPatchRequestMoveCopyFromJSON, + JSONPatchRequestMoveCopyFromJSONTyped, + JSONPatchRequestMoveCopyToJSON, +} from "./JSONPatchRequestMoveCopy"; +import type { JSONPatchRequestRemove } from "./JSONPatchRequestRemove"; import { - instanceOfJSONPatchRequestRemove, - JSONPatchRequestRemoveFromJSON, - JSONPatchRequestRemoveFromJSONTyped, - JSONPatchRequestRemoveToJSON, -} from './JSONPatchRequestRemove'; + instanceOfJSONPatchRequestRemove, + JSONPatchRequestRemoveFromJSON, + JSONPatchRequestRemoveFromJSONTyped, + JSONPatchRequestRemoveToJSON, +} from "./JSONPatchRequestRemove"; /** * @type PatchRequestInner - * + * * @export */ -export type PatchRequestInner = JSONPatchRequestAddReplace | JSONPatchRequestMoveCopy | JSONPatchRequestRemove; +export type PatchRequestInner = + | JSONPatchRequestAddReplace + | JSONPatchRequestMoveCopy + | JSONPatchRequestRemove; export function PatchRequestInnerFromJSON(json: any): PatchRequestInner { - return PatchRequestInnerFromJSONTyped(json, false); + return PatchRequestInnerFromJSONTyped(json, false); } -export function PatchRequestInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchRequestInner { - if (json == null) { - return json; - } - if (instanceOfJSONPatchRequestAddReplace(json)) { - return JSONPatchRequestAddReplaceFromJSONTyped(json, true); - } - if (instanceOfJSONPatchRequestMoveCopy(json)) { - return JSONPatchRequestMoveCopyFromJSONTyped(json, true); - } - if (instanceOfJSONPatchRequestRemove(json)) { - return JSONPatchRequestRemoveFromJSONTyped(json, true); - } +export function PatchRequestInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PatchRequestInner { + if (json == null) { + return json; + } + if (instanceOfJSONPatchRequestAddReplace(json)) { + return JSONPatchRequestAddReplaceFromJSONTyped(json, true); + } + if (instanceOfJSONPatchRequestMoveCopy(json)) { + return JSONPatchRequestMoveCopyFromJSONTyped(json, true); + } + if (instanceOfJSONPatchRequestRemove(json)) { + return JSONPatchRequestRemoveFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function PatchRequestInnerToJSON(json: any): any { - return PatchRequestInnerToJSONTyped(json, false); + return PatchRequestInnerToJSONTyped(json, false); } -export function PatchRequestInnerToJSONTyped(value?: PatchRequestInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PatchRequestInnerToJSONTyped( + value?: PatchRequestInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - if (instanceOfJSONPatchRequestAddReplace(value)) { - return JSONPatchRequestAddReplaceToJSON(value as JSONPatchRequestAddReplace); - } - if (instanceOfJSONPatchRequestMoveCopy(value)) { - return JSONPatchRequestMoveCopyToJSON(value as JSONPatchRequestMoveCopy); - } - if (instanceOfJSONPatchRequestRemove(value)) { - return JSONPatchRequestRemoveToJSON(value as JSONPatchRequestRemove); - } + if (instanceOfJSONPatchRequestAddReplace(value)) { + return JSONPatchRequestAddReplaceToJSON(value as JSONPatchRequestAddReplace); + } + if (instanceOfJSONPatchRequestMoveCopy(value)) { + return JSONPatchRequestMoveCopyToJSON(value as JSONPatchRequestMoveCopy); + } + if (instanceOfJSONPatchRequestRemove(value)) { + return JSONPatchRequestRemoveToJSON(value as JSONPatchRequestRemove); + } - return {}; + return {}; } - diff --git a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts index 88e2bd9221..5f7ba7089a 100644 --- a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts +++ b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequest.ts @@ -5,152 +5,157 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PutWsV1WorkspaceRequestAllOfMetadata } from './PutWsV1WorkspaceRequestAllOfMetadata'; +import { mapValues } from "../runtime"; +import type { PutWsV1WorkspaceRequestAllOfMetadata } from "./PutWsV1WorkspaceRequestAllOfMetadata"; import { - PutWsV1WorkspaceRequestAllOfMetadataFromJSON, - PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped, - PutWsV1WorkspaceRequestAllOfMetadataToJSON, - PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped, -} from './PutWsV1WorkspaceRequestAllOfMetadata'; -import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; + PutWsV1WorkspaceRequestAllOfMetadataFromJSON, + PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped, + PutWsV1WorkspaceRequestAllOfMetadataToJSON, + PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped, +} from "./PutWsV1WorkspaceRequestAllOfMetadata"; +import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from './WsV1WorkspaceStatus'; -import type { PutWsV1WorkspaceRequestAllOfSpec } from './PutWsV1WorkspaceRequestAllOfSpec'; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from "./WsV1WorkspaceStatus"; +import type { PutWsV1WorkspaceRequestAllOfSpec } from "./PutWsV1WorkspaceRequestAllOfSpec"; import { - PutWsV1WorkspaceRequestAllOfSpecFromJSON, - PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped, - PutWsV1WorkspaceRequestAllOfSpecToJSON, - PutWsV1WorkspaceRequestAllOfSpecToJSONTyped, -} from './PutWsV1WorkspaceRequestAllOfSpec'; + PutWsV1WorkspaceRequestAllOfSpecFromJSON, + PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped, + PutWsV1WorkspaceRequestAllOfSpecToJSON, + PutWsV1WorkspaceRequestAllOfSpecToJSONTyped, +} from "./PutWsV1WorkspaceRequestAllOfSpec"; /** - * + * * @export * @interface PutWsV1WorkspaceRequest */ export interface PutWsV1WorkspaceRequest { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly api_version?: PutWsV1WorkspaceRequestApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly kind?: PutWsV1WorkspaceRequestKindEnum; - /** - * - * @type {PutWsV1WorkspaceRequestAllOfMetadata} - * @memberof PutWsV1WorkspaceRequest - */ - metadata: PutWsV1WorkspaceRequestAllOfMetadata; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - readonly environment_id?: string; - /** - * The identifier for the workspace, which may not be changed and any provided value is ignored. - * @type {string} - * @memberof PutWsV1WorkspaceRequest - */ - name?: string; - /** - * - * @type {PutWsV1WorkspaceRequestAllOfSpec} - * @memberof PutWsV1WorkspaceRequest - */ - spec?: PutWsV1WorkspaceRequestAllOfSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof PutWsV1WorkspaceRequest - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly api_version?: PutWsV1WorkspaceRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly kind?: PutWsV1WorkspaceRequestKindEnum; + /** + * + * @type {PutWsV1WorkspaceRequestAllOfMetadata} + * @memberof PutWsV1WorkspaceRequest + */ + metadata: PutWsV1WorkspaceRequestAllOfMetadata; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + readonly environment_id?: string; + /** + * The identifier for the workspace, which may not be changed and any provided value is ignored. + * @type {string} + * @memberof PutWsV1WorkspaceRequest + */ + name?: string; + /** + * + * @type {PutWsV1WorkspaceRequestAllOfSpec} + * @memberof PutWsV1WorkspaceRequest + */ + spec?: PutWsV1WorkspaceRequestAllOfSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof PutWsV1WorkspaceRequest + */ + status?: WsV1WorkspaceStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PutWsV1WorkspaceRequestApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum PutWsV1WorkspaceRequestKindEnum { - Workspace = 'Workspace' + Workspace = "Workspace", } - /** * Check if a given object implements the PutWsV1WorkspaceRequest interface. */ export function instanceOfPutWsV1WorkspaceRequest(value: object): value is PutWsV1WorkspaceRequest { - if (!('metadata' in value) || value['metadata'] === undefined) return false; - return true; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + return true; } export function PutWsV1WorkspaceRequestFromJSON(json: any): PutWsV1WorkspaceRequest { - return PutWsV1WorkspaceRequestFromJSONTyped(json, false); + return PutWsV1WorkspaceRequestFromJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutWsV1WorkspaceRequest { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': PutWsV1WorkspaceRequestAllOfMetadataFromJSON(json['metadata']), - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'name': json['name'] == null ? undefined : json['name'], - 'spec': json['spec'] == null ? undefined : PutWsV1WorkspaceRequestAllOfSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), - }; +export function PutWsV1WorkspaceRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PutWsV1WorkspaceRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: PutWsV1WorkspaceRequestAllOfMetadataFromJSON(json["metadata"]), + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"] == null ? undefined : PutWsV1WorkspaceRequestAllOfSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), + }; } export function PutWsV1WorkspaceRequestToJSON(json: any): PutWsV1WorkspaceRequest { - return PutWsV1WorkspaceRequestToJSONTyped(json, false); + return PutWsV1WorkspaceRequestToJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PutWsV1WorkspaceRequestToJSONTyped( + value?: Omit< + PutWsV1WorkspaceRequest, + "api_version" | "kind" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': PutWsV1WorkspaceRequestAllOfMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': PutWsV1WorkspaceRequestAllOfSpecToJSON(value['spec']), - 'status': WsV1WorkspaceStatusToJSON(value['status']), - }; + return { + metadata: PutWsV1WorkspaceRequestAllOfMetadataToJSON(value["metadata"]), + name: value["name"], + spec: PutWsV1WorkspaceRequestAllOfSpecToJSON(value["spec"]), + status: WsV1WorkspaceStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts index 878163d244..645b7e2241 100644 --- a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts +++ b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfMetadata.ts @@ -5,62 +5,71 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PutWsV1WorkspaceRequestAllOfMetadata */ export interface PutWsV1WorkspaceRequestAllOfMetadata { - /** - * The system-generated opaque version from the workspace representation most recent read by the client before making the update request. It is used for optimistic locking and client-side detection of changes. A client includes this version to instruct the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). If the update fails, the client should re-read the workspace, apply the changes to the new representation while keeping the newer the resource version, and submit another update request. - * @type {any} - * @memberof PutWsV1WorkspaceRequestAllOfMetadata - */ - resource_version: any | null; + /** + * The system-generated opaque version from the workspace representation most recent read by the client before making the update request. It is used for optimistic locking and client-side detection of changes. A client includes this version to instruct the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). If the update fails, the client should re-read the workspace, apply the changes to the new representation while keeping the newer the resource version, and submit another update request. + * @type {any} + * @memberof PutWsV1WorkspaceRequestAllOfMetadata + */ + resource_version: any | null; } /** * Check if a given object implements the PutWsV1WorkspaceRequestAllOfMetadata interface. */ -export function instanceOfPutWsV1WorkspaceRequestAllOfMetadata(value: object): value is PutWsV1WorkspaceRequestAllOfMetadata { - if (!('resource_version' in value) || value['resource_version'] === undefined) return false; - return true; +export function instanceOfPutWsV1WorkspaceRequestAllOfMetadata( + value: object, +): value is PutWsV1WorkspaceRequestAllOfMetadata { + if (!("resource_version" in value) || value["resource_version"] === undefined) return false; + return true; } -export function PutWsV1WorkspaceRequestAllOfMetadataFromJSON(json: any): PutWsV1WorkspaceRequestAllOfMetadata { - return PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfMetadataFromJSON( + json: any, +): PutWsV1WorkspaceRequestAllOfMetadata { + return PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutWsV1WorkspaceRequestAllOfMetadata { - if (json == null) { - return json; - } - return { - - 'resource_version': json['resource_version'], - }; +export function PutWsV1WorkspaceRequestAllOfMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PutWsV1WorkspaceRequestAllOfMetadata { + if (json == null) { + return json; + } + return { + resource_version: json["resource_version"], + }; } -export function PutWsV1WorkspaceRequestAllOfMetadataToJSON(json: any): PutWsV1WorkspaceRequestAllOfMetadata { - return PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfMetadataToJSON( + json: any, +): PutWsV1WorkspaceRequestAllOfMetadata { + return PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped(value?: PutWsV1WorkspaceRequestAllOfMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PutWsV1WorkspaceRequestAllOfMetadataToJSONTyped( + value?: PutWsV1WorkspaceRequestAllOfMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'resource_version': value['resource_version'], - }; + return { + resource_version: value["resource_version"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts index 760df3e445..cdd7654787 100644 --- a/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts +++ b/src/clients/flinkWorkspaces/models/PutWsV1WorkspaceRequestAllOfSpec.ts @@ -5,69 +5,78 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PutWsV1WorkspaceRequestAllOfSpec */ export interface PutWsV1WorkspaceRequestAllOfSpec { - /** - * - * @type {any} - * @memberof PutWsV1WorkspaceRequestAllOfSpec - */ - compute_pool?: any | null; - /** - * - * @type {any} - * @memberof PutWsV1WorkspaceRequestAllOfSpec - */ - service_account?: any | null; + /** + * + * @type {any} + * @memberof PutWsV1WorkspaceRequestAllOfSpec + */ + compute_pool?: any | null; + /** + * + * @type {any} + * @memberof PutWsV1WorkspaceRequestAllOfSpec + */ + service_account?: any | null; } /** * Check if a given object implements the PutWsV1WorkspaceRequestAllOfSpec interface. */ -export function instanceOfPutWsV1WorkspaceRequestAllOfSpec(value: object): value is PutWsV1WorkspaceRequestAllOfSpec { - return true; +export function instanceOfPutWsV1WorkspaceRequestAllOfSpec( + value: object, +): value is PutWsV1WorkspaceRequestAllOfSpec { + return true; } -export function PutWsV1WorkspaceRequestAllOfSpecFromJSON(json: any): PutWsV1WorkspaceRequestAllOfSpec { - return PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfSpecFromJSON( + json: any, +): PutWsV1WorkspaceRequestAllOfSpec { + return PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): PutWsV1WorkspaceRequestAllOfSpec { - if (json == null) { - return json; - } - return { - - 'compute_pool': json['compute_pool'] == null ? undefined : json['compute_pool'], - 'service_account': json['service_account'] == null ? undefined : json['service_account'], - }; +export function PutWsV1WorkspaceRequestAllOfSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PutWsV1WorkspaceRequestAllOfSpec { + if (json == null) { + return json; + } + return { + compute_pool: json["compute_pool"] == null ? undefined : json["compute_pool"], + service_account: json["service_account"] == null ? undefined : json["service_account"], + }; } -export function PutWsV1WorkspaceRequestAllOfSpecToJSON(json: any): PutWsV1WorkspaceRequestAllOfSpec { - return PutWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); +export function PutWsV1WorkspaceRequestAllOfSpecToJSON( + json: any, +): PutWsV1WorkspaceRequestAllOfSpec { + return PutWsV1WorkspaceRequestAllOfSpecToJSONTyped(json, false); } -export function PutWsV1WorkspaceRequestAllOfSpecToJSONTyped(value?: PutWsV1WorkspaceRequestAllOfSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PutWsV1WorkspaceRequestAllOfSpecToJSONTyped( + value?: PutWsV1WorkspaceRequestAllOfSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'compute_pool': value['compute_pool'], - 'service_account': value['service_account'], - }; + return { + compute_pool: value["compute_pool"], + service_account: value["service_account"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1Block.ts b/src/clients/flinkWorkspaces/models/WsV1Block.ts index 207903f5c9..0e1af7f354 100644 --- a/src/clients/flinkWorkspaces/models/WsV1Block.ts +++ b/src/clients/flinkWorkspaces/models/WsV1Block.ts @@ -5,21 +5,21 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { WsV1CodeOptions } from './WsV1CodeOptions'; +import { mapValues } from "../runtime"; +import type { WsV1CodeOptions } from "./WsV1CodeOptions"; import { - WsV1CodeOptionsFromJSON, - WsV1CodeOptionsFromJSONTyped, - WsV1CodeOptionsToJSON, - WsV1CodeOptionsToJSONTyped, -} from './WsV1CodeOptions'; + WsV1CodeOptionsFromJSON, + WsV1CodeOptionsFromJSONTyped, + WsV1CodeOptionsToJSON, + WsV1CodeOptionsToJSONTyped, +} from "./WsV1CodeOptions"; /** * A block within a workspace. @@ -27,72 +27,72 @@ import { * @interface WsV1Block */ export interface WsV1Block { - /** - * The type of block. - * @type {string} - * @memberof WsV1Block - */ - type?: WsV1BlockTypeEnum; - /** - * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {{ [key: string]: string; }} - * @memberof WsV1Block - */ - properties?: { [key: string]: string; }; - /** - * - * @type {WsV1CodeOptions} - * @memberof WsV1Block - */ - code_options?: WsV1CodeOptions; + /** + * The type of block. + * @type {string} + * @memberof WsV1Block + */ + type?: WsV1BlockTypeEnum; + /** + * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {{ [key: string]: string; }} + * @memberof WsV1Block + */ + properties?: { [key: string]: string }; + /** + * + * @type {WsV1CodeOptions} + * @memberof WsV1Block + */ + code_options?: WsV1CodeOptions; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1BlockTypeEnum { - Code = 'CODE' + Code = "CODE", } - /** * Check if a given object implements the WsV1Block interface. */ export function instanceOfWsV1Block(value: object): value is WsV1Block { - return true; + return true; } export function WsV1BlockFromJSON(json: any): WsV1Block { - return WsV1BlockFromJSONTyped(json, false); + return WsV1BlockFromJSONTyped(json, false); } export function WsV1BlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1Block { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'properties': json['properties'] == null ? undefined : json['properties'], - 'code_options': json['code_options'] == null ? undefined : WsV1CodeOptionsFromJSON(json['code_options']), - }; + if (json == null) { + return json; + } + return { + type: json["type"] == null ? undefined : json["type"], + properties: json["properties"] == null ? undefined : json["properties"], + code_options: + json["code_options"] == null ? undefined : WsV1CodeOptionsFromJSON(json["code_options"]), + }; } export function WsV1BlockToJSON(json: any): WsV1Block { - return WsV1BlockToJSONTyped(json, false); + return WsV1BlockToJSONTyped(json, false); } -export function WsV1BlockToJSONTyped(value?: WsV1Block | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1BlockToJSONTyped( + value?: WsV1Block | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'properties': value['properties'], - 'code_options': WsV1CodeOptionsToJSON(value['code_options']), - }; + return { + type: value["type"], + properties: value["properties"], + code_options: WsV1CodeOptionsToJSON(value["code_options"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts b/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts index 9e6c314647..2efd49d157 100644 --- a/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts +++ b/src/clients/flinkWorkspaces/models/WsV1CodeOptions.ts @@ -5,62 +5,65 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The options for a code block * @export * @interface WsV1CodeOptions */ export interface WsV1CodeOptions { - /** - * The lines of source code for this code block. - * @type {Array} - * @memberof WsV1CodeOptions - */ - source: Array; + /** + * The lines of source code for this code block. + * @type {Array} + * @memberof WsV1CodeOptions + */ + source: Array; } /** * Check if a given object implements the WsV1CodeOptions interface. */ export function instanceOfWsV1CodeOptions(value: object): value is WsV1CodeOptions { - if (!('source' in value) || value['source'] === undefined) return false; - return true; + if (!("source" in value) || value["source"] === undefined) return false; + return true; } export function WsV1CodeOptionsFromJSON(json: any): WsV1CodeOptions { - return WsV1CodeOptionsFromJSONTyped(json, false); + return WsV1CodeOptionsFromJSONTyped(json, false); } -export function WsV1CodeOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1CodeOptions { - if (json == null) { - return json; - } - return { - - 'source': json['source'], - }; +export function WsV1CodeOptionsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1CodeOptions { + if (json == null) { + return json; + } + return { + source: json["source"], + }; } export function WsV1CodeOptionsToJSON(json: any): WsV1CodeOptions { - return WsV1CodeOptionsToJSONTyped(json, false); + return WsV1CodeOptionsToJSONTyped(json, false); } -export function WsV1CodeOptionsToJSONTyped(value?: WsV1CodeOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1CodeOptionsToJSONTyped( + value?: WsV1CodeOptions | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'source': value['source'], - }; + return { + source: value["source"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1Workspace.ts b/src/clients/flinkWorkspaces/models/WsV1Workspace.ts index 855e276294..21e057b7a8 100644 --- a/src/clients/flinkWorkspaces/models/WsV1Workspace.ts +++ b/src/clients/flinkWorkspaces/models/WsV1Workspace.ts @@ -5,49 +5,49 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; +import { mapValues } from "../runtime"; +import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from './WsV1WorkspaceStatus'; -import type { WsV1WorkspaceMetadata } from './WsV1WorkspaceMetadata'; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from "./WsV1WorkspaceStatus"; +import type { WsV1WorkspaceMetadata } from "./WsV1WorkspaceMetadata"; import { - WsV1WorkspaceMetadataFromJSON, - WsV1WorkspaceMetadataFromJSONTyped, - WsV1WorkspaceMetadataToJSON, - WsV1WorkspaceMetadataToJSONTyped, -} from './WsV1WorkspaceMetadata'; -import type { WsV1WorkspaceSpec } from './WsV1WorkspaceSpec'; + WsV1WorkspaceMetadataFromJSON, + WsV1WorkspaceMetadataFromJSONTyped, + WsV1WorkspaceMetadataToJSON, + WsV1WorkspaceMetadataToJSONTyped, +} from "./WsV1WorkspaceMetadata"; +import type { WsV1WorkspaceSpec } from "./WsV1WorkspaceSpec"; import { - WsV1WorkspaceSpecFromJSON, - WsV1WorkspaceSpecFromJSONTyped, - WsV1WorkspaceSpecToJSON, - WsV1WorkspaceSpecToJSONTyped, -} from './WsV1WorkspaceSpec'; + WsV1WorkspaceSpecFromJSON, + WsV1WorkspaceSpecFromJSONTyped, + WsV1WorkspaceSpecToJSON, + WsV1WorkspaceSpecToJSONTyped, +} from "./WsV1WorkspaceSpec"; /** * A Workspace represents a named and ordered collection of Flink SQL code blocks. * The API allows you to list, create, read, update and delete your workspaces. - * - * + * + * * Related guide: [Confluent Flink Workspace API](https://docs.confluent.io/cloud/current/flink/workspaces.html). - * + * * ## The Workspaces Model * - * + * * ## Quotas and Limits * This resource is subject to the following quotas: - * + * * | Quota | Description | * | --- | --- | * | `ws.max_workspaces.per_env` | Maximum number of workspaces in a region of a Confluent Cloud environment. | @@ -55,115 +55,115 @@ import { * @interface WsV1Workspace */ export interface WsV1Workspace { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof WsV1Workspace - */ - readonly api_version?: WsV1WorkspaceApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof WsV1Workspace - */ - readonly kind?: WsV1WorkspaceKindEnum; - /** - * - * @type {WsV1WorkspaceMetadata} - * @memberof WsV1Workspace - */ - metadata?: WsV1WorkspaceMetadata; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof WsV1Workspace - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof WsV1Workspace - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof WsV1Workspace - */ - name?: string; - /** - * - * @type {WsV1WorkspaceSpec} - * @memberof WsV1Workspace - */ - spec?: WsV1WorkspaceSpec; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof WsV1Workspace - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof WsV1Workspace + */ + readonly api_version?: WsV1WorkspaceApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof WsV1Workspace + */ + readonly kind?: WsV1WorkspaceKindEnum; + /** + * + * @type {WsV1WorkspaceMetadata} + * @memberof WsV1Workspace + */ + metadata?: WsV1WorkspaceMetadata; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof WsV1Workspace + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof WsV1Workspace + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof WsV1Workspace + */ + name?: string; + /** + * + * @type {WsV1WorkspaceSpec} + * @memberof WsV1Workspace + */ + spec?: WsV1WorkspaceSpec; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof WsV1Workspace + */ + status?: WsV1WorkspaceStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceKindEnum { - Workspace = 'Workspace' + Workspace = "Workspace", } - /** * Check if a given object implements the WsV1Workspace interface. */ export function instanceOfWsV1Workspace(value: object): value is WsV1Workspace { - return true; + return true; } export function WsV1WorkspaceFromJSON(json: any): WsV1Workspace { - return WsV1WorkspaceFromJSONTyped(json, false); + return WsV1WorkspaceFromJSONTyped(json, false); } export function WsV1WorkspaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1Workspace { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json['metadata']), - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'name': json['name'] == null ? undefined : json['name'], - 'spec': json['spec'] == null ? undefined : WsV1WorkspaceSpecFromJSON(json['spec']), - 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : WsV1WorkspaceMetadataFromJSON(json["metadata"]), + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"] == null ? undefined : WsV1WorkspaceSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), + }; } export function WsV1WorkspaceToJSON(json: any): WsV1Workspace { - return WsV1WorkspaceToJSONTyped(json, false); + return WsV1WorkspaceToJSONTyped(json, false); } -export function WsV1WorkspaceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': WsV1WorkspaceMetadataToJSON(value['metadata']), - 'name': value['name'], - 'spec': WsV1WorkspaceSpecToJSON(value['spec']), - 'status': WsV1WorkspaceStatusToJSON(value['status']), - }; + return { + metadata: WsV1WorkspaceMetadataToJSON(value["metadata"]), + name: value["name"], + spec: WsV1WorkspaceSpecToJSON(value["spec"]), + status: WsV1WorkspaceStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts index fbe5a45d3f..bddd66581e 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceList.ts @@ -5,28 +5,28 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ListMeta } from './ListMeta'; +import { mapValues } from "../runtime"; +import type { ListMeta } from "./ListMeta"; import { - ListMetaFromJSON, - ListMetaFromJSONTyped, - ListMetaToJSON, - ListMetaToJSONTyped, -} from './ListMeta'; -import type { WsV1WorkspaceListDataInner } from './WsV1WorkspaceListDataInner'; + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; +import type { WsV1WorkspaceListDataInner } from "./WsV1WorkspaceListDataInner"; import { - WsV1WorkspaceListDataInnerFromJSON, - WsV1WorkspaceListDataInnerFromJSONTyped, - WsV1WorkspaceListDataInnerToJSON, - WsV1WorkspaceListDataInnerToJSONTyped, -} from './WsV1WorkspaceListDataInner'; + WsV1WorkspaceListDataInnerFromJSON, + WsV1WorkspaceListDataInnerFromJSONTyped, + WsV1WorkspaceListDataInnerToJSON, + WsV1WorkspaceListDataInnerToJSONTyped, +} from "./WsV1WorkspaceListDataInner"; /** * `Workspace` represents a named resource with an ordered collection of SQL code blocks. @@ -37,91 +37,93 @@ import { * @interface WsV1WorkspaceList */ export interface WsV1WorkspaceList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof WsV1WorkspaceList - */ - api_version: WsV1WorkspaceListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof WsV1WorkspaceList - */ - kind: WsV1WorkspaceListKindEnum; - /** - * - * @type {ListMeta} - * @memberof WsV1WorkspaceList - */ - metadata: ListMeta; - /** - * The array of workspace resource. - * @type {Set} - * @memberof WsV1WorkspaceList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof WsV1WorkspaceList + */ + api_version: WsV1WorkspaceListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof WsV1WorkspaceList + */ + kind: WsV1WorkspaceListKindEnum; + /** + * + * @type {ListMeta} + * @memberof WsV1WorkspaceList + */ + metadata: ListMeta; + /** + * The array of workspace resource. + * @type {Set} + * @memberof WsV1WorkspaceList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceListApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceListKindEnum { - WorkspaceList = 'WorkspaceList' + WorkspaceList = "WorkspaceList", } - /** * Check if a given object implements the WsV1WorkspaceList interface. */ export function instanceOfWsV1WorkspaceList(value: object): value is WsV1WorkspaceList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function WsV1WorkspaceListFromJSON(json: any): WsV1WorkspaceList { - return WsV1WorkspaceListFromJSONTyped(json, false); + return WsV1WorkspaceListFromJSONTyped(json, false); } -export function WsV1WorkspaceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ListMetaFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(WsV1WorkspaceListDataInnerFromJSON))), - }; +export function WsV1WorkspaceListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1WorkspaceList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(WsV1WorkspaceListDataInnerFromJSON)), + }; } export function WsV1WorkspaceListToJSON(json: any): WsV1WorkspaceList { - return WsV1WorkspaceListToJSONTyped(json, false); + return WsV1WorkspaceListToJSONTyped(json, false); } -export function WsV1WorkspaceListToJSONTyped(value?: WsV1WorkspaceList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceListToJSONTyped( + value?: WsV1WorkspaceList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': ListMetaToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(WsV1WorkspaceListDataInnerToJSON)), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(WsV1WorkspaceListDataInnerToJSON), + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts index ff5f2a298c..875d1e2337 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceListDataInner.ts @@ -5,140 +5,147 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { WsV1WorkspaceStatus } from './WsV1WorkspaceStatus'; +import { mapValues } from "../runtime"; +import type { WsV1WorkspaceStatus } from "./WsV1WorkspaceStatus"; import { - WsV1WorkspaceStatusFromJSON, - WsV1WorkspaceStatusFromJSONTyped, - WsV1WorkspaceStatusToJSON, - WsV1WorkspaceStatusToJSONTyped, -} from './WsV1WorkspaceStatus'; + WsV1WorkspaceStatusFromJSON, + WsV1WorkspaceStatusFromJSONTyped, + WsV1WorkspaceStatusToJSON, + WsV1WorkspaceStatusToJSONTyped, +} from "./WsV1WorkspaceStatus"; /** - * + * * @export * @interface WsV1WorkspaceListDataInner */ export interface WsV1WorkspaceListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly api_version?: WsV1WorkspaceListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly kind?: WsV1WorkspaceListDataInnerKindEnum; - /** - * - * @type {object} - * @memberof WsV1WorkspaceListDataInner - */ - metadata: object; - /** - * The organization in which the workspace exists. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly organization_id?: string; - /** - * The environment in which the workspace exists. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - readonly environment_id?: string; - /** - * The workspace name that is unique across the environment and region. - * @type {string} - * @memberof WsV1WorkspaceListDataInner - */ - name: string; - /** - * - * @type {object} - * @memberof WsV1WorkspaceListDataInner - */ - spec: object; - /** - * - * @type {WsV1WorkspaceStatus} - * @memberof WsV1WorkspaceListDataInner - */ - status?: WsV1WorkspaceStatus; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly api_version?: WsV1WorkspaceListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly kind?: WsV1WorkspaceListDataInnerKindEnum; + /** + * + * @type {object} + * @memberof WsV1WorkspaceListDataInner + */ + metadata: object; + /** + * The organization in which the workspace exists. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly organization_id?: string; + /** + * The environment in which the workspace exists. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + readonly environment_id?: string; + /** + * The workspace name that is unique across the environment and region. + * @type {string} + * @memberof WsV1WorkspaceListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof WsV1WorkspaceListDataInner + */ + spec: object; + /** + * + * @type {WsV1WorkspaceStatus} + * @memberof WsV1WorkspaceListDataInner + */ + status?: WsV1WorkspaceStatus; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceListDataInnerApiVersionEnum { - WsV1 = 'ws/v1' + WsV1 = "ws/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceListDataInnerKindEnum { - Workspace = 'Workspace' + Workspace = "Workspace", } - /** * Check if a given object implements the WsV1WorkspaceListDataInner interface. */ -export function instanceOfWsV1WorkspaceListDataInner(value: object): value is WsV1WorkspaceListDataInner { - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfWsV1WorkspaceListDataInner( + value: object, +): value is WsV1WorkspaceListDataInner { + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function WsV1WorkspaceListDataInnerFromJSON(json: any): WsV1WorkspaceListDataInner { - return WsV1WorkspaceListDataInnerFromJSONTyped(json, false); + return WsV1WorkspaceListDataInnerFromJSONTyped(json, false); } -export function WsV1WorkspaceListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'], - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'environment_id': json['environment_id'] == null ? undefined : json['environment_id'], - 'name': json['name'], - 'spec': json['spec'], - 'status': json['status'] == null ? undefined : WsV1WorkspaceStatusFromJSON(json['status']), - }; +export function WsV1WorkspaceListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1WorkspaceListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"], + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + environment_id: json["environment_id"] == null ? undefined : json["environment_id"], + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : WsV1WorkspaceStatusFromJSON(json["status"]), + }; } export function WsV1WorkspaceListDataInnerToJSON(json: any): WsV1WorkspaceListDataInner { - return WsV1WorkspaceListDataInnerToJSONTyped(json, false); + return WsV1WorkspaceListDataInnerToJSONTyped(json, false); } -export function WsV1WorkspaceListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceListDataInnerToJSONTyped( + value?: Omit< + WsV1WorkspaceListDataInner, + "api_version" | "kind" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': value['metadata'], - 'name': value['name'], - 'spec': value['spec'], - 'status': WsV1WorkspaceStatusToJSON(value['status']), - }; + return { + metadata: value["metadata"], + name: value["name"], + spec: value["spec"], + status: WsV1WorkspaceStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts index 5f793af5c6..1a37ede1eb 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceMetadata.ts @@ -5,97 +5,103 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface WsV1WorkspaceMetadata */ export interface WsV1WorkspaceMetadata { - /** - * - * @type {any} - * @memberof WsV1WorkspaceMetadata - */ - self: any | null; - /** - * The system-generated identifier of the resource that is unique across space and time. - * @type {string} - * @memberof WsV1WorkspaceMetadata - */ - readonly uid?: string; - /** - * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). - * @type {string} - * @memberof WsV1WorkspaceMetadata - */ - readonly resource_version?: string; - /** - * The system-generated and managed principal ID of the user who created the workspace. - * @type {string} - * @memberof WsV1WorkspaceMetadata - */ - readonly created_by?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof WsV1WorkspaceMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof WsV1WorkspaceMetadata - */ - readonly updated_at?: Date; + /** + * + * @type {any} + * @memberof WsV1WorkspaceMetadata + */ + self: any | null; + /** + * The system-generated identifier of the resource that is unique across space and time. + * @type {string} + * @memberof WsV1WorkspaceMetadata + */ + readonly uid?: string; + /** + * The system-generated opaque version used for optimistic locking and client-side detection of changes. A client should include this version in an update request, instructing the update to fail if the workspace has since been modified (i.e., the workspace resource has a different version). + * @type {string} + * @memberof WsV1WorkspaceMetadata + */ + readonly resource_version?: string; + /** + * The system-generated and managed principal ID of the user who created the workspace. + * @type {string} + * @memberof WsV1WorkspaceMetadata + */ + readonly created_by?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof WsV1WorkspaceMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof WsV1WorkspaceMetadata + */ + readonly updated_at?: Date; } /** * Check if a given object implements the WsV1WorkspaceMetadata interface. */ export function instanceOfWsV1WorkspaceMetadata(value: object): value is WsV1WorkspaceMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function WsV1WorkspaceMetadataFromJSON(json: any): WsV1WorkspaceMetadata { - return WsV1WorkspaceMetadataFromJSONTyped(json, false); + return WsV1WorkspaceMetadataFromJSONTyped(json, false); } -export function WsV1WorkspaceMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'uid': json['uid'] == null ? undefined : json['uid'], - 'resource_version': json['resource_version'] == null ? undefined : json['resource_version'], - 'created_by': json['created_by'] == null ? undefined : json['created_by'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - }; +export function WsV1WorkspaceMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1WorkspaceMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + created_by: json["created_by"] == null ? undefined : json["created_by"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + }; } export function WsV1WorkspaceMetadataToJSON(json: any): WsV1WorkspaceMetadata { - return WsV1WorkspaceMetadataToJSONTyped(json, false); + return WsV1WorkspaceMetadataToJSONTyped(json, false); } -export function WsV1WorkspaceMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceMetadataToJSONTyped( + value?: Omit< + WsV1WorkspaceMetadata, + "uid" | "resource_version" | "created_by" | "created_at" | "updated_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - }; + return { + self: value["self"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts index 7a667e7b1f..c6648f3187 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpec.ts @@ -5,35 +5,35 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GlobalObjectReference } from './GlobalObjectReference'; +import { mapValues } from "../runtime"; +import type { GlobalObjectReference } from "./GlobalObjectReference"; import { - GlobalObjectReferenceFromJSON, - GlobalObjectReferenceFromJSONTyped, - GlobalObjectReferenceToJSON, - GlobalObjectReferenceToJSONTyped, -} from './GlobalObjectReference'; -import type { EnvScopedObjectReference } from './EnvScopedObjectReference'; + GlobalObjectReferenceFromJSON, + GlobalObjectReferenceFromJSONTyped, + GlobalObjectReferenceToJSON, + GlobalObjectReferenceToJSONTyped, +} from "./GlobalObjectReference"; +import type { EnvScopedObjectReference } from "./EnvScopedObjectReference"; import { - EnvScopedObjectReferenceFromJSON, - EnvScopedObjectReferenceFromJSONTyped, - EnvScopedObjectReferenceToJSON, - EnvScopedObjectReferenceToJSONTyped, -} from './EnvScopedObjectReference'; -import type { WsV1WorkspaceSpecBlocksInner } from './WsV1WorkspaceSpecBlocksInner'; + EnvScopedObjectReferenceFromJSON, + EnvScopedObjectReferenceFromJSONTyped, + EnvScopedObjectReferenceToJSON, + EnvScopedObjectReferenceToJSONTyped, +} from "./EnvScopedObjectReference"; +import type { WsV1WorkspaceSpecBlocksInner } from "./WsV1WorkspaceSpecBlocksInner"; import { - WsV1WorkspaceSpecBlocksInnerFromJSON, - WsV1WorkspaceSpecBlocksInnerFromJSONTyped, - WsV1WorkspaceSpecBlocksInnerToJSON, - WsV1WorkspaceSpecBlocksInnerToJSONTyped, -} from './WsV1WorkspaceSpecBlocksInner'; + WsV1WorkspaceSpecBlocksInnerFromJSON, + WsV1WorkspaceSpecBlocksInnerFromJSONTyped, + WsV1WorkspaceSpecBlocksInnerToJSON, + WsV1WorkspaceSpecBlocksInnerToJSONTyped, +} from "./WsV1WorkspaceSpecBlocksInner"; /** * The specification for the Workspace @@ -41,79 +41,94 @@ import { * @interface WsV1WorkspaceSpec */ export interface WsV1WorkspaceSpec { - /** - * A human-readable display name for the workspace. - * @type {string} - * @memberof WsV1WorkspaceSpec - */ - display_name?: string; - /** - * - * @type {EnvScopedObjectReference} - * @memberof WsV1WorkspaceSpec - */ - compute_pool?: EnvScopedObjectReference; - /** - * - * @type {GlobalObjectReference} - * @memberof WsV1WorkspaceSpec - */ - service_account?: GlobalObjectReference; - /** - * The ordered blocks for the new workspace - * @type {Array} - * @memberof WsV1WorkspaceSpec - */ - blocks?: Array; - /** - * A map (key-value pairs) of workspace-level properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {{ [key: string]: string; }} - * @memberof WsV1WorkspaceSpec - */ - properties?: { [key: string]: string; }; + /** + * A human-readable display name for the workspace. + * @type {string} + * @memberof WsV1WorkspaceSpec + */ + display_name?: string; + /** + * + * @type {EnvScopedObjectReference} + * @memberof WsV1WorkspaceSpec + */ + compute_pool?: EnvScopedObjectReference; + /** + * + * @type {GlobalObjectReference} + * @memberof WsV1WorkspaceSpec + */ + service_account?: GlobalObjectReference; + /** + * The ordered blocks for the new workspace + * @type {Array} + * @memberof WsV1WorkspaceSpec + */ + blocks?: Array; + /** + * A map (key-value pairs) of workspace-level properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {{ [key: string]: string; }} + * @memberof WsV1WorkspaceSpec + */ + properties?: { [key: string]: string }; } /** * Check if a given object implements the WsV1WorkspaceSpec interface. */ export function instanceOfWsV1WorkspaceSpec(value: object): value is WsV1WorkspaceSpec { - return true; + return true; } export function WsV1WorkspaceSpecFromJSON(json: any): WsV1WorkspaceSpec { - return WsV1WorkspaceSpecFromJSONTyped(json, false); + return WsV1WorkspaceSpecFromJSONTyped(json, false); } -export function WsV1WorkspaceSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceSpec { - if (json == null) { - return json; - } - return { - - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - 'compute_pool': json['compute_pool'] == null ? undefined : EnvScopedObjectReferenceFromJSON(json['compute_pool']), - 'service_account': json['service_account'] == null ? undefined : GlobalObjectReferenceFromJSON(json['service_account']), - 'blocks': json['blocks'] == null ? undefined : ((json['blocks'] as Array).map(WsV1WorkspaceSpecBlocksInnerFromJSON)), - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function WsV1WorkspaceSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1WorkspaceSpec { + if (json == null) { + return json; + } + return { + display_name: json["display_name"] == null ? undefined : json["display_name"], + compute_pool: + json["compute_pool"] == null + ? undefined + : EnvScopedObjectReferenceFromJSON(json["compute_pool"]), + service_account: + json["service_account"] == null + ? undefined + : GlobalObjectReferenceFromJSON(json["service_account"]), + blocks: + json["blocks"] == null + ? undefined + : (json["blocks"] as Array).map(WsV1WorkspaceSpecBlocksInnerFromJSON), + properties: json["properties"] == null ? undefined : json["properties"], + }; } export function WsV1WorkspaceSpecToJSON(json: any): WsV1WorkspaceSpec { - return WsV1WorkspaceSpecToJSONTyped(json, false); + return WsV1WorkspaceSpecToJSONTyped(json, false); } -export function WsV1WorkspaceSpecToJSONTyped(value?: WsV1WorkspaceSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceSpecToJSONTyped( + value?: WsV1WorkspaceSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'display_name': value['display_name'], - 'compute_pool': EnvScopedObjectReferenceToJSON(value['compute_pool']), - 'service_account': GlobalObjectReferenceToJSON(value['service_account']), - 'blocks': value['blocks'] == null ? undefined : ((value['blocks'] as Array).map(WsV1WorkspaceSpecBlocksInnerToJSON)), - 'properties': value['properties'], - }; + return { + display_name: value["display_name"], + compute_pool: EnvScopedObjectReferenceToJSON(value["compute_pool"]), + service_account: GlobalObjectReferenceToJSON(value["service_account"]), + blocks: + value["blocks"] == null + ? undefined + : (value["blocks"] as Array).map(WsV1WorkspaceSpecBlocksInnerToJSON), + properties: value["properties"], + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts index 7510162fc0..8f79c011fd 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceSpecBlocksInner.ts @@ -5,95 +5,100 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { WsV1CodeOptions } from './WsV1CodeOptions'; +import { mapValues } from "../runtime"; +import type { WsV1CodeOptions } from "./WsV1CodeOptions"; import { - WsV1CodeOptionsFromJSON, - WsV1CodeOptionsFromJSONTyped, - WsV1CodeOptionsToJSON, - WsV1CodeOptionsToJSONTyped, -} from './WsV1CodeOptions'; + WsV1CodeOptionsFromJSON, + WsV1CodeOptionsFromJSONTyped, + WsV1CodeOptionsToJSON, + WsV1CodeOptionsToJSONTyped, +} from "./WsV1CodeOptions"; /** - * + * * @export * @interface WsV1WorkspaceSpecBlocksInner */ export interface WsV1WorkspaceSpecBlocksInner { - /** - * The type of block. - * @type {string} - * @memberof WsV1WorkspaceSpecBlocksInner - */ - type: WsV1WorkspaceSpecBlocksInnerTypeEnum; - /** - * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. - * @type {{ [key: string]: string; }} - * @memberof WsV1WorkspaceSpecBlocksInner - */ - properties?: { [key: string]: string; }; - /** - * - * @type {WsV1CodeOptions} - * @memberof WsV1WorkspaceSpecBlocksInner - */ - code_options?: WsV1CodeOptions; + /** + * The type of block. + * @type {string} + * @memberof WsV1WorkspaceSpecBlocksInner + */ + type: WsV1WorkspaceSpecBlocksInnerTypeEnum; + /** + * A map (key-value pairs) of cell properties. All key-value pairs are optional, and clients choose whether and how to use these key-value pairs. + * @type {{ [key: string]: string; }} + * @memberof WsV1WorkspaceSpecBlocksInner + */ + properties?: { [key: string]: string }; + /** + * + * @type {WsV1CodeOptions} + * @memberof WsV1WorkspaceSpecBlocksInner + */ + code_options?: WsV1CodeOptions; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum WsV1WorkspaceSpecBlocksInnerTypeEnum { - Code = 'CODE' + Code = "CODE", } - /** * Check if a given object implements the WsV1WorkspaceSpecBlocksInner interface. */ -export function instanceOfWsV1WorkspaceSpecBlocksInner(value: object): value is WsV1WorkspaceSpecBlocksInner { - if (!('type' in value) || value['type'] === undefined) return false; - return true; +export function instanceOfWsV1WorkspaceSpecBlocksInner( + value: object, +): value is WsV1WorkspaceSpecBlocksInner { + if (!("type" in value) || value["type"] === undefined) return false; + return true; } export function WsV1WorkspaceSpecBlocksInnerFromJSON(json: any): WsV1WorkspaceSpecBlocksInner { - return WsV1WorkspaceSpecBlocksInnerFromJSONTyped(json, false); + return WsV1WorkspaceSpecBlocksInnerFromJSONTyped(json, false); } -export function WsV1WorkspaceSpecBlocksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceSpecBlocksInner { - if (json == null) { - return json; - } - return { - - 'type': json['type'], - 'properties': json['properties'] == null ? undefined : json['properties'], - 'code_options': json['code_options'] == null ? undefined : WsV1CodeOptionsFromJSON(json['code_options']), - }; +export function WsV1WorkspaceSpecBlocksInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1WorkspaceSpecBlocksInner { + if (json == null) { + return json; + } + return { + type: json["type"], + properties: json["properties"] == null ? undefined : json["properties"], + code_options: + json["code_options"] == null ? undefined : WsV1CodeOptionsFromJSON(json["code_options"]), + }; } export function WsV1WorkspaceSpecBlocksInnerToJSON(json: any): WsV1WorkspaceSpecBlocksInner { - return WsV1WorkspaceSpecBlocksInnerToJSONTyped(json, false); + return WsV1WorkspaceSpecBlocksInnerToJSONTyped(json, false); } -export function WsV1WorkspaceSpecBlocksInnerToJSONTyped(value?: WsV1WorkspaceSpecBlocksInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceSpecBlocksInnerToJSONTyped( + value?: WsV1WorkspaceSpecBlocksInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'properties': value['properties'], - 'code_options': WsV1CodeOptionsToJSON(value['code_options']), - }; + return { + type: value["type"], + properties: value["properties"], + code_options: WsV1CodeOptionsToJSON(value["code_options"]), + }; } - diff --git a/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts b/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts index a45b852a86..26b0621b44 100644 --- a/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts +++ b/src/clients/flinkWorkspaces/models/WsV1WorkspaceStatus.ts @@ -5,65 +5,67 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The status of the Workspace * @export * @interface WsV1WorkspaceStatus */ export interface WsV1WorkspaceStatus { - /** - * The networking type used by the Workspace: - * - * PUBLIC: Workspace is using public networking; - * - * PRIVATE: Workspace is using private networking; - * - * @type {string} - * @memberof WsV1WorkspaceStatus - */ - readonly network_kind?: string; + /** + * The networking type used by the Workspace: + * + * PUBLIC: Workspace is using public networking; + * + * PRIVATE: Workspace is using private networking; + * + * @type {string} + * @memberof WsV1WorkspaceStatus + */ + readonly network_kind?: string; } /** * Check if a given object implements the WsV1WorkspaceStatus interface. */ export function instanceOfWsV1WorkspaceStatus(value: object): value is WsV1WorkspaceStatus { - return true; + return true; } export function WsV1WorkspaceStatusFromJSON(json: any): WsV1WorkspaceStatus { - return WsV1WorkspaceStatusFromJSONTyped(json, false); + return WsV1WorkspaceStatusFromJSONTyped(json, false); } -export function WsV1WorkspaceStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): WsV1WorkspaceStatus { - if (json == null) { - return json; - } - return { - - 'network_kind': json['network_kind'] == null ? undefined : json['network_kind'], - }; +export function WsV1WorkspaceStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): WsV1WorkspaceStatus { + if (json == null) { + return json; + } + return { + network_kind: json["network_kind"] == null ? undefined : json["network_kind"], + }; } export function WsV1WorkspaceStatusToJSON(json: any): WsV1WorkspaceStatus { - return WsV1WorkspaceStatusToJSONTyped(json, false); + return WsV1WorkspaceStatusToJSONTyped(json, false); } -export function WsV1WorkspaceStatusToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function WsV1WorkspaceStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/flinkWorkspaces/models/index.ts b/src/clients/flinkWorkspaces/models/index.ts index 2b17e439f1..7e4fc4dd37 100644 --- a/src/clients/flinkWorkspaces/models/index.ts +++ b/src/clients/flinkWorkspaces/models/index.ts @@ -1,30 +1,30 @@ /* tslint:disable */ /* eslint-disable */ -export * from './CreateWsV1Workspace201Response'; -export * from './CreateWsV1WorkspaceRequest'; -export * from './CreateWsV1WorkspaceRequestAllOfSpec'; -export * from './EnvScopedObjectReference'; -export * from './ErrorSource'; -export * from './Failure'; -export * from './GetWsV1Workspace200Response'; -export * from './GetWsV1Workspace200ResponseAllOfSpec'; -export * from './GlobalObjectReference'; -export * from './JSONPatchRequestAddReplace'; -export * from './JSONPatchRequestMoveCopy'; -export * from './JSONPatchRequestRemove'; -export * from './ListMeta'; -export * from './ModelError'; -export * from './ObjectMeta'; -export * from './PatchRequestInner'; -export * from './PutWsV1WorkspaceRequest'; -export * from './PutWsV1WorkspaceRequestAllOfMetadata'; -export * from './PutWsV1WorkspaceRequestAllOfSpec'; -export * from './WsV1Block'; -export * from './WsV1CodeOptions'; -export * from './WsV1Workspace'; -export * from './WsV1WorkspaceList'; -export * from './WsV1WorkspaceListDataInner'; -export * from './WsV1WorkspaceMetadata'; -export * from './WsV1WorkspaceSpec'; -export * from './WsV1WorkspaceSpecBlocksInner'; -export * from './WsV1WorkspaceStatus'; +export * from "./CreateWsV1Workspace201Response"; +export * from "./CreateWsV1WorkspaceRequest"; +export * from "./CreateWsV1WorkspaceRequestAllOfSpec"; +export * from "./EnvScopedObjectReference"; +export * from "./ErrorSource"; +export * from "./Failure"; +export * from "./GetWsV1Workspace200Response"; +export * from "./GetWsV1Workspace200ResponseAllOfSpec"; +export * from "./GlobalObjectReference"; +export * from "./JSONPatchRequestAddReplace"; +export * from "./JSONPatchRequestMoveCopy"; +export * from "./JSONPatchRequestRemove"; +export * from "./ListMeta"; +export * from "./ModelError"; +export * from "./ObjectMeta"; +export * from "./PatchRequestInner"; +export * from "./PutWsV1WorkspaceRequest"; +export * from "./PutWsV1WorkspaceRequestAllOfMetadata"; +export * from "./PutWsV1WorkspaceRequestAllOfSpec"; +export * from "./WsV1Block"; +export * from "./WsV1CodeOptions"; +export * from "./WsV1Workspace"; +export * from "./WsV1WorkspaceList"; +export * from "./WsV1WorkspaceListDataInner"; +export * from "./WsV1WorkspaceMetadata"; +export * from "./WsV1WorkspaceSpec"; +export * from "./WsV1WorkspaceSpecBlocksInner"; +export * from "./WsV1WorkspaceStatus"; diff --git a/src/clients/flinkWorkspaces/runtime.ts b/src/clients/flinkWorkspaces/runtime.ts index 047043ef18..bdbf1b4880 100644 --- a/src/clients/flinkWorkspaces/runtime.ts +++ b/src/clients/flinkWorkspaces/runtime.ts @@ -5,83 +5,85 @@ * The Workspace API for Flink * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://flink.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/kafkaRest/apis/ACLV3Api.ts b/src/clients/kafkaRest/apis/ACLV3Api.ts index ed4d471890..4799b870b2 100644 --- a/src/clients/kafkaRest/apis/ACLV3Api.ts +++ b/src/clients/kafkaRest/apis/ACLV3Api.ts @@ -5,330 +5,405 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { AclDataList, AclResourceType, CreateAclRequestData, CreateAclRequestDataList, DeleteKafkaAcls200Response, -} from '../models/index'; +} from "../models/index"; import { - AclDataListFromJSON, - AclDataListToJSON, - AclResourceTypeFromJSON, - AclResourceTypeToJSON, - CreateAclRequestDataFromJSON, - CreateAclRequestDataToJSON, - CreateAclRequestDataListFromJSON, - CreateAclRequestDataListToJSON, - DeleteKafkaAcls200ResponseFromJSON, - DeleteKafkaAcls200ResponseToJSON, -} from '../models/index'; + AclDataListFromJSON, + AclDataListToJSON, + AclResourceTypeFromJSON, + AclResourceTypeToJSON, + CreateAclRequestDataFromJSON, + CreateAclRequestDataToJSON, + CreateAclRequestDataListFromJSON, + CreateAclRequestDataListToJSON, + DeleteKafkaAcls200ResponseFromJSON, + DeleteKafkaAcls200ResponseToJSON, +} from "../models/index"; export interface BatchCreateKafkaAclsRequest { - cluster_id: string; - CreateAclRequestDataList?: CreateAclRequestDataList; + cluster_id: string; + CreateAclRequestDataList?: CreateAclRequestDataList; } export interface CreateKafkaAclsRequest { - cluster_id: string; - CreateAclRequestData?: CreateAclRequestData; + cluster_id: string; + CreateAclRequestData?: CreateAclRequestData; } export interface DeleteKafkaAclsRequest { - cluster_id: string; - resource_type: AclResourceType; - pattern_type: string; - operation: string; - permission: string; - resource_name?: string; - principal?: string; - host?: string; + cluster_id: string; + resource_type: AclResourceType; + pattern_type: string; + operation: string; + permission: string; + resource_name?: string; + principal?: string; + host?: string; } export interface GetKafkaAclsRequest { - cluster_id: string; - resource_type?: AclResourceType; - resource_name?: string; - pattern_type?: string; - principal?: string; - host?: string; - operation?: string; - permission?: string; + cluster_id: string; + resource_type?: AclResourceType; + resource_name?: string; + pattern_type?: string; + principal?: string; + host?: string; + operation?: string; + permission?: string; } /** - * + * */ export class ACLV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. + * Batch Create ACLs + */ + async batchCreateKafkaAclsRaw( + requestParameters: BatchCreateKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling batchCreateKafkaAcls().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/acls:batch`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateAclRequestDataListToJSON(requestParameters["CreateAclRequestDataList"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. + * Batch Create ACLs + */ + async batchCreateKafkaAcls( + requestParameters: BatchCreateKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.batchCreateKafkaAclsRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. + * Create an ACL + */ + async createKafkaAclsRaw( + requestParameters: CreateKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling createKafkaAcls().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/acls`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateAclRequestDataToJSON(requestParameters["CreateAclRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. + * Create an ACL + */ + async createKafkaAcls( + requestParameters: CreateKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.createKafkaAclsRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. + * Delete ACLs + */ + async deleteKafkaAclsRaw( + requestParameters: DeleteKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaAcls().', + ); + } + + if (requestParameters["resource_type"] == null) { + throw new runtime.RequiredError( + "resource_type", + 'Required parameter "resource_type" was null or undefined when calling deleteKafkaAcls().', + ); + } + + if (requestParameters["pattern_type"] == null) { + throw new runtime.RequiredError( + "pattern_type", + 'Required parameter "pattern_type" was null or undefined when calling deleteKafkaAcls().', + ); + } + + if (requestParameters["operation"] == null) { + throw new runtime.RequiredError( + "operation", + 'Required parameter "operation" was null or undefined when calling deleteKafkaAcls().', + ); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. - * Batch Create ACLs - */ - async batchCreateKafkaAclsRaw(requestParameters: BatchCreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling batchCreateKafkaAcls().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/acls:batch`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateAclRequestDataListToJSON(requestParameters['CreateAclRequestDataList']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["permission"] == null) { + throw new runtime.RequiredError( + "permission", + 'Required parameter "permission" was null or undefined when calling deleteKafkaAcls().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create ACLs. - * Batch Create ACLs - */ - async batchCreateKafkaAcls(requestParameters: BatchCreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.batchCreateKafkaAclsRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + if (requestParameters["resource_type"] != null) { + queryParameters["resource_type"] = requestParameters["resource_type"]; + } + + if (requestParameters["resource_name"] != null) { + queryParameters["resource_name"] = requestParameters["resource_name"]; + } + + if (requestParameters["pattern_type"] != null) { + queryParameters["pattern_type"] = requestParameters["pattern_type"]; + } + + if (requestParameters["principal"] != null) { + queryParameters["principal"] = requestParameters["principal"]; + } + + if (requestParameters["host"] != null) { + queryParameters["host"] = requestParameters["host"]; + } + + if (requestParameters["operation"] != null) { + queryParameters["operation"] = requestParameters["operation"]; + } + + if (requestParameters["permission"] != null) { + queryParameters["permission"] = requestParameters["permission"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. - * Create an ACL - */ - async createKafkaAclsRaw(requestParameters: CreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling createKafkaAcls().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/acls`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateAclRequestDataToJSON(requestParameters['CreateAclRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/acls`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + DeleteKafkaAcls200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. + * Delete ACLs + */ + async deleteKafkaAcls( + requestParameters: DeleteKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.deleteKafkaAclsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. + * List ACLs + */ + async getKafkaAclsRaw( + requestParameters: GetKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaAcls().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["resource_type"] != null) { + queryParameters["resource_type"] = requestParameters["resource_type"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create an ACL. - * Create an ACL - */ - async createKafkaAcls(requestParameters: CreateKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createKafkaAclsRaw(requestParameters, initOverrides); + if (requestParameters["resource_name"] != null) { + queryParameters["resource_name"] = requestParameters["resource_name"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. - * Delete ACLs - */ - async deleteKafkaAclsRaw(requestParameters: DeleteKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaAcls().' - ); - } - - if (requestParameters['resource_type'] == null) { - throw new runtime.RequiredError( - 'resource_type', - 'Required parameter "resource_type" was null or undefined when calling deleteKafkaAcls().' - ); - } - - if (requestParameters['pattern_type'] == null) { - throw new runtime.RequiredError( - 'pattern_type', - 'Required parameter "pattern_type" was null or undefined when calling deleteKafkaAcls().' - ); - } - - if (requestParameters['operation'] == null) { - throw new runtime.RequiredError( - 'operation', - 'Required parameter "operation" was null or undefined when calling deleteKafkaAcls().' - ); - } - - if (requestParameters['permission'] == null) { - throw new runtime.RequiredError( - 'permission', - 'Required parameter "permission" was null or undefined when calling deleteKafkaAcls().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['resource_type'] != null) { - queryParameters['resource_type'] = requestParameters['resource_type']; - } - - if (requestParameters['resource_name'] != null) { - queryParameters['resource_name'] = requestParameters['resource_name']; - } - - if (requestParameters['pattern_type'] != null) { - queryParameters['pattern_type'] = requestParameters['pattern_type']; - } - - if (requestParameters['principal'] != null) { - queryParameters['principal'] = requestParameters['principal']; - } - - if (requestParameters['host'] != null) { - queryParameters['host'] = requestParameters['host']; - } - - if (requestParameters['operation'] != null) { - queryParameters['operation'] = requestParameters['operation']; - } - - if (requestParameters['permission'] != null) { - queryParameters['permission'] = requestParameters['permission']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/acls`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DeleteKafkaAcls200ResponseFromJSON(jsonValue)); + if (requestParameters["pattern_type"] != null) { + queryParameters["pattern_type"] = requestParameters["pattern_type"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the ACLs that match the search criteria. - * Delete ACLs - */ - async deleteKafkaAcls(requestParameters: DeleteKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteKafkaAclsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["principal"] != null) { + queryParameters["principal"] = requestParameters["principal"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. - * List ACLs - */ - async getKafkaAclsRaw(requestParameters: GetKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaAcls().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['resource_type'] != null) { - queryParameters['resource_type'] = requestParameters['resource_type']; - } - - if (requestParameters['resource_name'] != null) { - queryParameters['resource_name'] = requestParameters['resource_name']; - } - - if (requestParameters['pattern_type'] != null) { - queryParameters['pattern_type'] = requestParameters['pattern_type']; - } - - if (requestParameters['principal'] != null) { - queryParameters['principal'] = requestParameters['principal']; - } - - if (requestParameters['host'] != null) { - queryParameters['host'] = requestParameters['host']; - } - - if (requestParameters['operation'] != null) { - queryParameters['operation'] = requestParameters['operation']; - } - - if (requestParameters['permission'] != null) { - queryParameters['permission'] = requestParameters['permission']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/acls`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AclDataListFromJSON(jsonValue)); + if (requestParameters["host"] != null) { + queryParameters["host"] = requestParameters["host"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. - * List ACLs - */ - async getKafkaAcls(requestParameters: GetKafkaAclsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaAclsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["operation"] != null) { + queryParameters["operation"] = requestParameters["operation"]; } + if (requestParameters["permission"] != null) { + queryParameters["permission"] = requestParameters["permission"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/acls`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => AclDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of ACLs that match the search criteria. + * List ACLs + */ + async getKafkaAcls( + requestParameters: GetKafkaAclsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaAclsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts b/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts index 4ebc34a745..ce4dacf380 100644 --- a/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts +++ b/src/clients/kafkaRest/apis/ClusterLinkingV3Api.ts @@ -5,15 +5,14 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { AlterConfigBatchRequestData, AlterMirrorStatusResponseDataList, @@ -28,1213 +27,1608 @@ import type { ListMirrorTopicsResponseDataList, MirrorTopicStatus, UpdateLinkConfigRequestData, -} from '../models/index'; +} from "../models/index"; import { - AlterConfigBatchRequestDataFromJSON, - AlterConfigBatchRequestDataToJSON, - AlterMirrorStatusResponseDataListFromJSON, - AlterMirrorStatusResponseDataListToJSON, - AlterMirrorsRequestDataFromJSON, - AlterMirrorsRequestDataToJSON, - CreateLinkRequestDataFromJSON, - CreateLinkRequestDataToJSON, - CreateMirrorTopicRequestDataFromJSON, - CreateMirrorTopicRequestDataToJSON, - ListLinkConfigsResponseDataFromJSON, - ListLinkConfigsResponseDataToJSON, - ListLinkConfigsResponseDataListFromJSON, - ListLinkConfigsResponseDataListToJSON, - ListLinksResponseDataFromJSON, - ListLinksResponseDataToJSON, - ListLinksResponseDataListFromJSON, - ListLinksResponseDataListToJSON, - ListMirrorTopicsResponseDataFromJSON, - ListMirrorTopicsResponseDataToJSON, - ListMirrorTopicsResponseDataListFromJSON, - ListMirrorTopicsResponseDataListToJSON, - MirrorTopicStatusFromJSON, - MirrorTopicStatusToJSON, - UpdateLinkConfigRequestDataFromJSON, - UpdateLinkConfigRequestDataToJSON, -} from '../models/index'; + AlterConfigBatchRequestDataFromJSON, + AlterConfigBatchRequestDataToJSON, + AlterMirrorStatusResponseDataListFromJSON, + AlterMirrorStatusResponseDataListToJSON, + AlterMirrorsRequestDataFromJSON, + AlterMirrorsRequestDataToJSON, + CreateLinkRequestDataFromJSON, + CreateLinkRequestDataToJSON, + CreateMirrorTopicRequestDataFromJSON, + CreateMirrorTopicRequestDataToJSON, + ListLinkConfigsResponseDataFromJSON, + ListLinkConfigsResponseDataToJSON, + ListLinkConfigsResponseDataListFromJSON, + ListLinkConfigsResponseDataListToJSON, + ListLinksResponseDataFromJSON, + ListLinksResponseDataToJSON, + ListLinksResponseDataListFromJSON, + ListLinksResponseDataListToJSON, + ListMirrorTopicsResponseDataFromJSON, + ListMirrorTopicsResponseDataToJSON, + ListMirrorTopicsResponseDataListFromJSON, + ListMirrorTopicsResponseDataListToJSON, + MirrorTopicStatusFromJSON, + MirrorTopicStatusToJSON, + UpdateLinkConfigRequestDataFromJSON, + UpdateLinkConfigRequestDataToJSON, +} from "../models/index"; export interface CreateKafkaLinkRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - validate_link?: boolean; - CreateLinkRequestData?: CreateLinkRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + validate_link?: boolean; + CreateLinkRequestData?: CreateLinkRequestData; } export interface CreateKafkaMirrorTopicRequest { - cluster_id: string; - link_name: string; - CreateMirrorTopicRequestData?: CreateMirrorTopicRequestData; + cluster_id: string; + link_name: string; + CreateMirrorTopicRequestData?: CreateMirrorTopicRequestData; } export interface DeleteKafkaLinkRequest { - cluster_id: string; - link_name: string; - force?: boolean; - validate_only?: boolean; + cluster_id: string; + link_name: string; + force?: boolean; + validate_only?: boolean; } export interface DeleteKafkaLinkConfigRequest { - cluster_id: string; - link_name: string; - config_name: string; + cluster_id: string; + link_name: string; + config_name: string; } export interface GetKafkaLinkRequest { - cluster_id: string; - link_name: string; - include_tasks?: boolean; + cluster_id: string; + link_name: string; + include_tasks?: boolean; } export interface GetKafkaLinkConfigsRequest { - cluster_id: string; - link_name: string; - config_name: string; + cluster_id: string; + link_name: string; + config_name: string; } export interface ListKafkaLinkConfigsRequest { - cluster_id: string; - link_name: string; + cluster_id: string; + link_name: string; } export interface ListKafkaLinksRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaMirrorTopicsRequest { - cluster_id: string; - mirror_status?: MirrorTopicStatus; + cluster_id: string; + mirror_status?: MirrorTopicStatus; } export interface ListKafkaMirrorTopicsUnderLinkRequest { - cluster_id: string; - link_name: string; - mirror_status?: MirrorTopicStatus; + cluster_id: string; + link_name: string; + mirror_status?: MirrorTopicStatus; } export interface ReadKafkaMirrorTopicRequest { - cluster_id: string; - link_name: string; - mirror_topic_name: string; - include_state_transition_errors?: boolean; + cluster_id: string; + link_name: string; + mirror_topic_name: string; + include_state_transition_errors?: boolean; } export interface UpdateKafkaLinkConfigRequest { - cluster_id: string; - link_name: string; - config_name: string; - UpdateLinkConfigRequestData?: UpdateLinkConfigRequestData; + cluster_id: string; + link_name: string; + config_name: string; + UpdateLinkConfigRequestData?: UpdateLinkConfigRequestData; } export interface UpdateKafkaLinkConfigBatchRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterConfigBatchRequestData?: AlterConfigBatchRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterConfigBatchRequestData?: AlterConfigBatchRequestData; } export interface UpdateKafkaMirrorTopicsFailoverRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsPauseRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsPromoteRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsResumeRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } export interface UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest { - cluster_id: string; - link_name: string; - validate_only?: boolean; - AlterMirrorsRequestData?: AlterMirrorsRequestData; + cluster_id: string; + link_name: string; + validate_only?: boolean; + AlterMirrorsRequestData?: AlterMirrorsRequestData; } /** - * + * */ export class ClusterLinkingV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. + * Create a cluster link + */ + async createKafkaLinkRaw( + requestParameters: CreateKafkaLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling createKafkaLink().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling createKafkaLink().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["link_name"] != null) { + queryParameters["link_name"] = requestParameters["link_name"]; + } + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + if (requestParameters["validate_link"] != null) { + queryParameters["validate_link"] = requestParameters["validate_link"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. - * Create a cluster link - */ - async createKafkaLinkRaw(requestParameters: CreateKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling createKafkaLink().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling createKafkaLink().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['link_name'] != null) { - queryParameters['link_name'] = requestParameters['link_name']; - } - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - if (requestParameters['validate_link'] != null) { - queryParameters['validate_link'] = requestParameters['validate_link']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateLinkRequestDataToJSON(requestParameters['CreateLinkRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. - * Create a cluster link - */ - async createKafkaLink(requestParameters: CreateKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createKafkaLinkRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster - * Create a mirror topic - */ - async createKafkaMirrorTopicRaw(requestParameters: CreateKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling createKafkaMirrorTopic().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling createKafkaMirrorTopic().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateMirrorTopicRequestDataToJSON(requestParameters['CreateMirrorTopicRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster - * Create a mirror topic - */ - async createKafkaMirrorTopic(requestParameters: CreateKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createKafkaMirrorTopicRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Delete the cluster link - */ - async deleteKafkaLinkRaw(requestParameters: DeleteKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLink().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling deleteKafkaLink().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Delete the cluster link - */ - async deleteKafkaLink(requestParameters: DeleteKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteKafkaLinkRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reset the given config to default value - */ - async deleteKafkaLinkConfigRaw(requestParameters: DeleteKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLinkConfig().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling deleteKafkaLinkConfig().' - ); - } - - if (requestParameters['config_name'] == null) { - throw new runtime.RequiredError( - 'config_name', - 'Required parameter "config_name" was null or undefined when calling deleteKafkaLinkConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"config_name"}}`, encodeURIComponent(String(requestParameters['config_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reset the given config to default value - */ - async deleteKafkaLinkConfig(requestParameters: DeleteKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteKafkaLinkConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * Describe the cluster link - */ - async getKafkaLinkRaw(requestParameters: GetKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaLink().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling getKafkaLink().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['include_tasks'] != null) { - queryParameters['include_tasks'] = requestParameters['include_tasks']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListLinksResponseDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * Describe the cluster link - */ - async getKafkaLink(requestParameters: GetKafkaLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaLinkRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the config under the cluster link - */ - async getKafkaLinkConfigsRaw(requestParameters: GetKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaLinkConfigs().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling getKafkaLinkConfigs().' - ); - } - - if (requestParameters['config_name'] == null) { - throw new runtime.RequiredError( - 'config_name', - 'Required parameter "config_name" was null or undefined when calling getKafkaLinkConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"config_name"}}`, encodeURIComponent(String(requestParameters['config_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListLinkConfigsResponseDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the config under the cluster link - */ - async getKafkaLinkConfigs(requestParameters: GetKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaLinkConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * List all configs of the cluster link - */ - async listKafkaLinkConfigsRaw(requestParameters: ListKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinkConfigs().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling listKafkaLinkConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListLinkConfigsResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * List all configs of the cluster link - */ - async listKafkaLinkConfigs(requestParameters: ListKafkaLinkConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaLinkConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * List all cluster links in the dest cluster - */ - async listKafkaLinksRaw(requestParameters: ListKafkaLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinks().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListLinksResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. - * List all cluster links in the dest cluster - */ - async listKafkaLinks(requestParameters: ListKafkaLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaLinksRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster - * List mirror topics - */ - async listKafkaMirrorTopicsRaw(requestParameters: ListKafkaMirrorTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopics().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['mirror_status'] != null) { - queryParameters['mirror_status'] = requestParameters['mirror_status']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/-/mirrors`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListMirrorTopicsResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster - * List mirror topics - */ - async listKafkaMirrorTopics(requestParameters: ListKafkaMirrorTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaMirrorTopicsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link - * List mirror topics - */ - async listKafkaMirrorTopicsUnderLinkRaw(requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopicsUnderLink().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling listKafkaMirrorTopicsUnderLink().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['mirror_status'] != null) { - queryParameters['mirror_status'] = requestParameters['mirror_status']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListMirrorTopicsResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link - * List mirror topics - */ - async listKafkaMirrorTopicsUnderLink(requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaMirrorTopicsUnderLinkRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the mirror topic - */ - async readKafkaMirrorTopicRaw(requestParameters: ReadKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling readKafkaMirrorTopic().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling readKafkaMirrorTopic().' - ); - } - - if (requestParameters['mirror_topic_name'] == null) { - throw new runtime.RequiredError( - 'mirror_topic_name', - 'Required parameter "mirror_topic_name" was null or undefined when calling readKafkaMirrorTopic().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['include_state_transition_errors'] != null) { - queryParameters['include_state_transition_errors'] = requestParameters['include_state_transition_errors']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors/{mirror_topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"mirror_topic_name"}}`, encodeURIComponent(String(requestParameters['mirror_topic_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ListMirrorTopicsResponseDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Describe the mirror topic - */ - async readKafkaMirrorTopic(requestParameters: ReadKafkaMirrorTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.readKafkaMirrorTopicRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Alter the config under the cluster link - */ - async updateKafkaLinkConfigRaw(requestParameters: UpdateKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfig().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfig().' - ); - } - - if (requestParameters['config_name'] == null) { - throw new runtime.RequiredError( - 'config_name', - 'Required parameter "config_name" was null or undefined when calling updateKafkaLinkConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))).replace(`{${"config_name"}}`, encodeURIComponent(String(requestParameters['config_name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateLinkConfigRequestDataToJSON(requestParameters['UpdateLinkConfigRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Alter the config under the cluster link - */ - async updateKafkaLinkConfig(requestParameters: UpdateKafkaLinkConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateKafkaLinkConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs - * Batch Alter Cluster Link Configs - */ - async updateKafkaLinkConfigBatchRaw(requestParameters: UpdateKafkaLinkConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfigBatch().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfigBatch().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs:alter`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: AlterConfigBatchRequestDataToJSON(requestParameters['AlterConfigBatchRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs - * Batch Alter Cluster Link Configs - */ - async updateKafkaLinkConfigBatch(requestParameters: UpdateKafkaLinkConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateKafkaLinkConfigBatchRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Failover the mirror topics - */ - async updateKafkaMirrorTopicsFailoverRaw(requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsFailover().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsFailover().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:failover`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Failover the mirror topics - */ - async updateKafkaMirrorTopicsFailover(requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateKafkaMirrorTopicsFailoverRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Pause the mirror topics - */ - async updateKafkaMirrorTopicsPauseRaw(requestParameters: UpdateKafkaMirrorTopicsPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPause().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPause().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:pause`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Pause the mirror topics - */ - async updateKafkaMirrorTopicsPause(requestParameters: UpdateKafkaMirrorTopicsPauseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateKafkaMirrorTopicsPauseRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Promote the mirror topics - */ - async updateKafkaMirrorTopicsPromoteRaw(requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPromote().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPromote().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:promote`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Promote the mirror topics - */ - async updateKafkaMirrorTopicsPromote(requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateKafkaMirrorTopicsPromoteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Resume the mirror topics - */ - async updateKafkaMirrorTopicsResumeRaw(requestParameters: UpdateKafkaMirrorTopicsResumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsResume().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsResume().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:resume`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Resume the mirror topics - */ - async updateKafkaMirrorTopicsResume(requestParameters: UpdateKafkaMirrorTopicsResumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateKafkaMirrorTopicsResumeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and Pause the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndPauseMirrorRaw(requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-pause-mirror`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and Pause the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndPauseMirror(requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateKafkaMirrorTopicsReverseAndPauseMirrorRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and start the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndStartMirrorRaw(requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().' - ); - } - - if (requestParameters['link_name'] == null) { - throw new runtime.RequiredError( - 'link_name', - 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['validate_only'] != null) { - queryParameters['validate_only'] = requestParameters['validate_only']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-start-mirror`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters['link_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterMirrorsRequestDataToJSON(requestParameters['AlterMirrorsRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AlterMirrorStatusResponseDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) - * Reverse the local mirror topic and start the remote mirror topic - */ - async updateKafkaMirrorTopicsReverseAndStartMirror(requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateKafkaMirrorTopicsReverseAndStartMirrorRaw(requestParameters, initOverrides); - return await response.value(); + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateLinkRequestDataToJSON(requestParameters["CreateLinkRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Cluster link creation requires source cluster security configurations in the configs JSON section of the data request payload. + * Create a cluster link + */ + async createKafkaLink( + requestParameters: CreateKafkaLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.createKafkaLinkRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster + * Create a mirror topic + */ + async createKafkaMirrorTopicRaw( + requestParameters: CreateKafkaMirrorTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling createKafkaMirrorTopic().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling createKafkaMirrorTopic().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateMirrorTopicRequestDataToJSON(requestParameters["CreateMirrorTopicRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic in the destination cluster mirroring a topic in the source cluster + * Create a mirror topic + */ + async createKafkaMirrorTopic( + requestParameters: CreateKafkaMirrorTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.createKafkaMirrorTopicRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Delete the cluster link + */ + async deleteKafkaLinkRaw( + requestParameters: DeleteKafkaLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLink().', + ); } + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling deleteKafkaLink().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; + } + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Delete the cluster link + */ + async deleteKafkaLink( + requestParameters: DeleteKafkaLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteKafkaLinkRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reset the given config to default value + */ + async deleteKafkaLinkConfigRaw( + requestParameters: DeleteKafkaLinkConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaLinkConfig().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling deleteKafkaLinkConfig().', + ); + } + + if (requestParameters["config_name"] == null) { + throw new runtime.RequiredError( + "config_name", + 'Required parameter "config_name" was null or undefined when calling deleteKafkaLinkConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) + .replace( + `{${"config_name"}}`, + encodeURIComponent(String(requestParameters["config_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reset the given config to default value + */ + async deleteKafkaLinkConfig( + requestParameters: DeleteKafkaLinkConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteKafkaLinkConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * Describe the cluster link + */ + async getKafkaLinkRaw( + requestParameters: GetKafkaLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaLink().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling getKafkaLink().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["include_tasks"] != null) { + queryParameters["include_tasks"] = requestParameters["include_tasks"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListLinksResponseDataFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * Describe the cluster link + */ + async getKafkaLink( + requestParameters: GetKafkaLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaLinkRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the config under the cluster link + */ + async getKafkaLinkConfigsRaw( + requestParameters: GetKafkaLinkConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaLinkConfigs().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling getKafkaLinkConfigs().', + ); + } + + if (requestParameters["config_name"] == null) { + throw new runtime.RequiredError( + "config_name", + 'Required parameter "config_name" was null or undefined when calling getKafkaLinkConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) + .replace( + `{${"config_name"}}`, + encodeURIComponent(String(requestParameters["config_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListLinkConfigsResponseDataFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the config under the cluster link + */ + async getKafkaLinkConfigs( + requestParameters: GetKafkaLinkConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaLinkConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * List all configs of the cluster link + */ + async listKafkaLinkConfigsRaw( + requestParameters: ListKafkaLinkConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinkConfigs().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling listKafkaLinkConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListLinkConfigsResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * List all configs of the cluster link + */ + async listKafkaLinkConfigs( + requestParameters: ListKafkaLinkConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaLinkConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * List all cluster links in the dest cluster + */ + async listKafkaLinksRaw( + requestParameters: ListKafkaLinksRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaLinks().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListLinksResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) ``link_id`` in ``ListLinksResponseData`` is deprecated and may be removed in a future release. Use the new ``cluster_link_id`` instead. + * List all cluster links in the dest cluster + */ + async listKafkaLinks( + requestParameters: ListKafkaLinksRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaLinksRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster + * List mirror topics + */ + async listKafkaMirrorTopicsRaw( + requestParameters: ListKafkaMirrorTopicsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopics().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["mirror_status"] != null) { + queryParameters["mirror_status"] = requestParameters["mirror_status"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/-/mirrors`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListMirrorTopicsResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics in the cluster + * List mirror topics + */ + async listKafkaMirrorTopics( + requestParameters: ListKafkaMirrorTopicsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaMirrorTopicsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link + * List mirror topics + */ + async listKafkaMirrorTopicsUnderLinkRaw( + requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaMirrorTopicsUnderLink().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling listKafkaMirrorTopicsUnderLink().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["mirror_status"] != null) { + queryParameters["mirror_status"] = requestParameters["mirror_status"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListMirrorTopicsResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List all mirror topics under the link + * List mirror topics + */ + async listKafkaMirrorTopicsUnderLink( + requestParameters: ListKafkaMirrorTopicsUnderLinkRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaMirrorTopicsUnderLinkRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the mirror topic + */ + async readKafkaMirrorTopicRaw( + requestParameters: ReadKafkaMirrorTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling readKafkaMirrorTopic().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling readKafkaMirrorTopic().', + ); + } + + if (requestParameters["mirror_topic_name"] == null) { + throw new runtime.RequiredError( + "mirror_topic_name", + 'Required parameter "mirror_topic_name" was null or undefined when calling readKafkaMirrorTopic().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["include_state_transition_errors"] != null) { + queryParameters["include_state_transition_errors"] = + requestParameters["include_state_transition_errors"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors/{mirror_topic_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) + .replace( + `{${"mirror_topic_name"}}`, + encodeURIComponent(String(requestParameters["mirror_topic_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ListMirrorTopicsResponseDataFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Describe the mirror topic + */ + async readKafkaMirrorTopic( + requestParameters: ReadKafkaMirrorTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.readKafkaMirrorTopicRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Alter the config under the cluster link + */ + async updateKafkaLinkConfigRaw( + requestParameters: UpdateKafkaLinkConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfig().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfig().', + ); + } + + if (requestParameters["config_name"] == null) { + throw new runtime.RequiredError( + "config_name", + 'Required parameter "config_name" was null or undefined when calling updateKafkaLinkConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs/{config_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))) + .replace( + `{${"config_name"}}`, + encodeURIComponent(String(requestParameters["config_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateLinkConfigRequestDataToJSON(requestParameters["UpdateLinkConfigRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Alter the config under the cluster link + */ + async updateKafkaLinkConfig( + requestParameters: UpdateKafkaLinkConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateKafkaLinkConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs + * Batch Alter Cluster Link Configs + */ + async updateKafkaLinkConfigBatchRaw( + requestParameters: UpdateKafkaLinkConfigBatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaLinkConfigBatch().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaLinkConfigBatch().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/configs:alter` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: AlterConfigBatchRequestDataToJSON(requestParameters["AlterConfigBatchRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Batch Alter Cluster Link Configs + * Batch Alter Cluster Link Configs + */ + async updateKafkaLinkConfigBatch( + requestParameters: UpdateKafkaLinkConfigBatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateKafkaLinkConfigBatchRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Failover the mirror topics + */ + async updateKafkaMirrorTopicsFailoverRaw( + requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsFailover().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsFailover().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:failover` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AlterMirrorStatusResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Failover the mirror topics + */ + async updateKafkaMirrorTopicsFailover( + requestParameters: UpdateKafkaMirrorTopicsFailoverRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateKafkaMirrorTopicsFailoverRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Pause the mirror topics + */ + async updateKafkaMirrorTopicsPauseRaw( + requestParameters: UpdateKafkaMirrorTopicsPauseRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPause().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPause().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:pause` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AlterMirrorStatusResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Pause the mirror topics + */ + async updateKafkaMirrorTopicsPause( + requestParameters: UpdateKafkaMirrorTopicsPauseRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateKafkaMirrorTopicsPauseRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Promote the mirror topics + */ + async updateKafkaMirrorTopicsPromoteRaw( + requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsPromote().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsPromote().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:promote` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AlterMirrorStatusResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Promote the mirror topics + */ + async updateKafkaMirrorTopicsPromote( + requestParameters: UpdateKafkaMirrorTopicsPromoteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateKafkaMirrorTopicsPromoteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Resume the mirror topics + */ + async updateKafkaMirrorTopicsResumeRaw( + requestParameters: UpdateKafkaMirrorTopicsResumeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsResume().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsResume().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:resume` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AlterMirrorStatusResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Resume the mirror topics + */ + async updateKafkaMirrorTopicsResume( + requestParameters: UpdateKafkaMirrorTopicsResumeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateKafkaMirrorTopicsResumeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and Pause the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndPauseMirrorRaw( + requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndPauseMirror().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-pause-mirror` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AlterMirrorStatusResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and Pause the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndPauseMirror( + requestParameters: UpdateKafkaMirrorTopicsReverseAndPauseMirrorRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateKafkaMirrorTopicsReverseAndPauseMirrorRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and start the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndStartMirrorRaw( + requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().', + ); + } + + if (requestParameters["link_name"] == null) { + throw new runtime.RequiredError( + "link_name", + 'Required parameter "link_name" was null or undefined when calling updateKafkaMirrorTopicsReverseAndStartMirror().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["validate_only"] != null) { + queryParameters["validate_only"] = requestParameters["validate_only"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/links/{link_name}/mirrors:reverse-and-start-mirror` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"link_name"}}`, encodeURIComponent(String(requestParameters["link_name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterMirrorsRequestDataToJSON(requestParameters["AlterMirrorsRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AlterMirrorStatusResponseDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) + * Reverse the local mirror topic and start the remote mirror topic + */ + async updateKafkaMirrorTopicsReverseAndStartMirror( + requestParameters: UpdateKafkaMirrorTopicsReverseAndStartMirrorRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateKafkaMirrorTopicsReverseAndStartMirrorRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/ClusterV3Api.ts b/src/clients/kafkaRest/apis/ClusterV3Api.ts index b215ff04d0..985bc0a689 100644 --- a/src/clients/kafkaRest/apis/ClusterV3Api.ts +++ b/src/clients/kafkaRest/apis/ClusterV3Api.ts @@ -5,73 +5,84 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ClusterData, -} from '../models/index'; -import { - ClusterDataFromJSON, - ClusterDataToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ClusterData } from "../models/index"; +import { ClusterDataFromJSON, ClusterDataToJSON } from "../models/index"; export interface GetKafkaClusterRequest { - cluster_id: string; + cluster_id: string; } /** - * + * */ export class ClusterV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. + * Get Cluster + */ + async getKafkaClusterRaw( + requestParameters: GetKafkaClusterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaCluster().', + ); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. - * Get Cluster - */ - async getKafkaClusterRaw(requestParameters: GetKafkaClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaCluster().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } + const queryParameters: any = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => ClusterDataFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. - * Get Cluster - */ - async getKafkaCluster(requestParameters: GetKafkaClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaClusterRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClusterDataFromJSON(jsonValue)); + } + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the Kafka cluster with the specified ``cluster_id``. + * Get Cluster + */ + async getKafkaCluster( + requestParameters: GetKafkaClusterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaClusterRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/ConfigsV3Api.ts b/src/clients/kafkaRest/apis/ConfigsV3Api.ts index ed3714709f..5923a681ee 100644 --- a/src/clients/kafkaRest/apis/ConfigsV3Api.ts +++ b/src/clients/kafkaRest/apis/ConfigsV3Api.ts @@ -5,15 +5,14 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { AlterConfigBatchRequestData, ClusterConfigData, @@ -21,695 +20,934 @@ import type { TopicConfigData, TopicConfigDataList, UpdateConfigRequestData, -} from '../models/index'; +} from "../models/index"; import { - AlterConfigBatchRequestDataFromJSON, - AlterConfigBatchRequestDataToJSON, - ClusterConfigDataFromJSON, - ClusterConfigDataToJSON, - ClusterConfigDataListFromJSON, - ClusterConfigDataListToJSON, - TopicConfigDataFromJSON, - TopicConfigDataToJSON, - TopicConfigDataListFromJSON, - TopicConfigDataListToJSON, - UpdateConfigRequestDataFromJSON, - UpdateConfigRequestDataToJSON, -} from '../models/index'; + AlterConfigBatchRequestDataFromJSON, + AlterConfigBatchRequestDataToJSON, + ClusterConfigDataFromJSON, + ClusterConfigDataToJSON, + ClusterConfigDataListFromJSON, + ClusterConfigDataListToJSON, + TopicConfigDataFromJSON, + TopicConfigDataToJSON, + TopicConfigDataListFromJSON, + TopicConfigDataListToJSON, + UpdateConfigRequestDataFromJSON, + UpdateConfigRequestDataToJSON, +} from "../models/index"; export interface DeleteKafkaClusterConfigRequest { - cluster_id: string; - name: string; + cluster_id: string; + name: string; } export interface DeleteKafkaTopicConfigRequest { - cluster_id: string; - topic_name: string; - name: string; + cluster_id: string; + topic_name: string; + name: string; } export interface GetKafkaClusterConfigRequest { - cluster_id: string; - name: string; + cluster_id: string; + name: string; } export interface GetKafkaTopicConfigRequest { - cluster_id: string; - topic_name: string; - name: string; + cluster_id: string; + topic_name: string; + name: string; } export interface ListKafkaAllTopicConfigsRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaClusterConfigsRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaDefaultTopicConfigsRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } export interface ListKafkaTopicConfigsRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } export interface UpdateKafkaClusterConfigRequest { - cluster_id: string; - name: string; - UpdateConfigRequestData?: UpdateConfigRequestData; + cluster_id: string; + name: string; + UpdateConfigRequestData?: UpdateConfigRequestData; } export interface UpdateKafkaClusterConfigsRequest { - cluster_id: string; - AlterConfigBatchRequestData?: AlterConfigBatchRequestData; + cluster_id: string; + AlterConfigBatchRequestData?: AlterConfigBatchRequestData; } export interface UpdateKafkaTopicConfigRequest { - cluster_id: string; - topic_name: string; - name: string; - UpdateConfigRequestData?: UpdateConfigRequestData; + cluster_id: string; + topic_name: string; + name: string; + UpdateConfigRequestData?: UpdateConfigRequestData; } export interface UpdateKafkaTopicConfigBatchRequest { - cluster_id: string; - topic_name: string; - AlterConfigBatchRequestData?: AlterConfigBatchRequestData; + cluster_id: string; + topic_name: string; + AlterConfigBatchRequestData?: AlterConfigBatchRequestData; } /** - * + * */ export class ConfigsV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. + * Reset Dynamic Broker Config + */ + async deleteKafkaClusterConfigRaw( + requestParameters: DeleteKafkaClusterConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaClusterConfig().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteKafkaClusterConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. + * Reset Dynamic Broker Config + */ + async deleteKafkaClusterConfig( + requestParameters: DeleteKafkaClusterConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteKafkaClusterConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. + * Reset Topic Config + */ + async deleteKafkaTopicConfigRaw( + requestParameters: DeleteKafkaTopicConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopicConfig().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopicConfig().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteKafkaTopicConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. + * Reset Topic Config + */ + async deleteKafkaTopicConfig( + requestParameters: DeleteKafkaTopicConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteKafkaTopicConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Get Dynamic Broker Config + */ + async getKafkaClusterConfigRaw( + requestParameters: GetKafkaClusterConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaClusterConfig().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getKafkaClusterConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ClusterConfigDataFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Get Dynamic Broker Config + */ + async getKafkaClusterConfig( + requestParameters: GetKafkaClusterConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaClusterConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. + * Get Topic Config + */ + async getKafkaTopicConfigRaw( + requestParameters: GetKafkaTopicConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopicConfig().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling getKafkaTopicConfig().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getKafkaTopicConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. + * Get Topic Config + */ + async getKafkaTopicConfig( + requestParameters: GetKafkaTopicConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaTopicConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. + * List All Topic Configs + */ + async listKafkaAllTopicConfigsRaw( + requestParameters: ListKafkaAllTopicConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaAllTopicConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/-/configs`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + TopicConfigDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. + * List All Topic Configs + */ + async listKafkaAllTopicConfigs( + requestParameters: ListKafkaAllTopicConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaAllTopicConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. + * List Dynamic Broker Configs + */ + async listKafkaClusterConfigsRaw( + requestParameters: ListKafkaClusterConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaClusterConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/broker-configs`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ClusterConfigDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. + * List Dynamic Broker Configs + */ + async listKafkaClusterConfigs( + requestParameters: ListKafkaClusterConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaClusterConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. + * List New Topic Default Configs + */ + async listKafkaDefaultTopicConfigsRaw( + requestParameters: ListKafkaDefaultTopicConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaDefaultTopicConfigs().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling listKafkaDefaultTopicConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/default-configs` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + TopicConfigDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. + * List New Topic Default Configs + */ + async listKafkaDefaultTopicConfigs( + requestParameters: ListKafkaDefaultTopicConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaDefaultTopicConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. + * List Topic Configs + */ + async listKafkaTopicConfigsRaw( + requestParameters: ListKafkaTopicConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopicConfigs().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling listKafkaTopicConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + TopicConfigDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. + * List Topic Configs + */ + async listKafkaTopicConfigs( + requestParameters: ListKafkaTopicConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaTopicConfigsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Update Dynamic Broker Config + */ + async updateKafkaClusterConfigRaw( + requestParameters: UpdateKafkaClusterConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfig().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling updateKafkaClusterConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateConfigRequestDataToJSON(requestParameters["UpdateConfigRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. + * Update Dynamic Broker Config + */ + async updateKafkaClusterConfig( + requestParameters: UpdateKafkaClusterConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateKafkaClusterConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. + * Batch Alter Dynamic Broker Configs + */ + async updateKafkaClusterConfigsRaw( + requestParameters: UpdateKafkaClusterConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfigs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/broker-configs:alter`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterConfigBatchRequestDataToJSON(requestParameters["AlterConfigBatchRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. + * Batch Alter Dynamic Broker Configs + */ + async updateKafkaClusterConfigs( + requestParameters: UpdateKafkaClusterConfigsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateKafkaClusterConfigsRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. + * Update Topic Config + */ + async updateKafkaTopicConfigRaw( + requestParameters: UpdateKafkaTopicConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfig().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfig().', + ); + } + + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling updateKafkaTopicConfig().', + ); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. - * Reset Dynamic Broker Config - */ - async deleteKafkaClusterConfigRaw(requestParameters: DeleteKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaClusterConfig().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteKafkaClusterConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter specified by ``name`` to its default value by deleting a dynamic cluster-wide configuration. - * Reset Dynamic Broker Config - */ - async deleteKafkaClusterConfig(requestParameters: DeleteKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteKafkaClusterConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. - * Reset Topic Config - */ - async deleteKafkaTopicConfigRaw(requestParameters: DeleteKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopicConfig().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopicConfig().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteKafkaTopicConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Reset the configuration parameter with given `name` to its default value. - * Reset Topic Config - */ - async deleteKafkaTopicConfig(requestParameters: DeleteKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteKafkaTopicConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Get Dynamic Broker Config - */ - async getKafkaClusterConfigRaw(requestParameters: GetKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaClusterConfig().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getKafkaClusterConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Get Dynamic Broker Config - */ - async getKafkaClusterConfig(requestParameters: GetKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaClusterConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. - * Get Topic Config - */ - async getKafkaTopicConfigRaw(requestParameters: GetKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopicConfig().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling getKafkaTopicConfig().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getKafkaTopicConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the configuration parameter with the given `name`. - * Get Topic Config - */ - async getKafkaTopicConfig(requestParameters: GetKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaTopicConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. - * List All Topic Configs - */ - async listKafkaAllTopicConfigsRaw(requestParameters: ListKafkaAllTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaAllTopicConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/-/configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters for all topics hosted by the specified cluster. - * List All Topic Configs - */ - async listKafkaAllTopicConfigs(requestParameters: ListKafkaAllTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaAllTopicConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. - * List Dynamic Broker Configs - */ - async listKafkaClusterConfigsRaw(requestParameters: ListKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaClusterConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/broker-configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of dynamic cluster-wide broker configuration parameters for the specified Kafka cluster. Returns an empty list if there are no dynamic cluster-wide broker configuration parameters. - * List Dynamic Broker Configs - */ - async listKafkaClusterConfigs(requestParameters: ListKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaClusterConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. - * List New Topic Default Configs - */ - async listKafkaDefaultTopicConfigsRaw(requestParameters: ListKafkaDefaultTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaDefaultTopicConfigs().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling listKafkaDefaultTopicConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/default-configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) List the default configuration parameters used if the topic were to be newly created. - * List New Topic Default Configs - */ - async listKafkaDefaultTopicConfigs(requestParameters: ListKafkaDefaultTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaDefaultTopicConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. - * List Topic Configs - */ - async listKafkaTopicConfigsRaw(requestParameters: ListKafkaTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopicConfigs().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling listKafkaTopicConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicConfigDataListFromJSON(jsonValue)); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of configuration parameters that belong to the specified topic. - * List Topic Configs - */ - async listKafkaTopicConfigs(requestParameters: ListKafkaTopicConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaTopicConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Update Dynamic Broker Config - */ - async updateKafkaClusterConfigRaw(requestParameters: UpdateKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfig().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling updateKafkaClusterConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/broker-configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateConfigRequestDataToJSON(requestParameters['UpdateConfigRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the dynamic cluster-wide broker configuration parameter specified by ``name``. - * Update Dynamic Broker Config - */ - async updateKafkaClusterConfig(requestParameters: UpdateKafkaClusterConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateKafkaClusterConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. - * Batch Alter Dynamic Broker Configs - */ - async updateKafkaClusterConfigsRaw(requestParameters: UpdateKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaClusterConfigs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/broker-configs:alter`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterConfigBatchRequestDataToJSON(requestParameters['AlterConfigBatchRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of dynamic cluster-wide broker configuration parameters. - * Batch Alter Dynamic Broker Configs - */ - async updateKafkaClusterConfigs(requestParameters: UpdateKafkaClusterConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateKafkaClusterConfigsRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. - * Update Topic Config - */ - async updateKafkaTopicConfigRaw(requestParameters: UpdateKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfig().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfig().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling updateKafkaTopicConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateConfigRequestDataToJSON(requestParameters['UpdateConfigRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. - * Update Topic Config - */ - async updateKafkaTopicConfig(requestParameters: UpdateKafkaTopicConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateKafkaTopicConfigRaw(requestParameters, initOverrides); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. - * Batch Alter Topic Configs - */ - async updateKafkaTopicConfigBatchRaw(requestParameters: UpdateKafkaTopicConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfigBatch().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfigBatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs:alter`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: AlterConfigBatchRequestDataToJSON(requestParameters['AlterConfigBatchRequestData']), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. - * Batch Alter Topic Configs - */ - async updateKafkaTopicConfigBatch(requestParameters: UpdateKafkaTopicConfigBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateKafkaTopicConfigBatchRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs/{name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateConfigRequestDataToJSON(requestParameters["UpdateConfigRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update the configuration parameter with given `name`. + * Update Topic Config + */ + async updateKafkaTopicConfig( + requestParameters: UpdateKafkaTopicConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateKafkaTopicConfigRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. + * Batch Alter Topic Configs + */ + async updateKafkaTopicConfigBatchRaw( + requestParameters: UpdateKafkaTopicConfigBatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updateKafkaTopicConfigBatch().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling updateKafkaTopicConfigBatch().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/configs:alter` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: AlterConfigBatchRequestDataToJSON(requestParameters["AlterConfigBatchRequestData"]), + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Update or delete a set of topic configuration parameters. Also supports a dry-run mode that only validates whether the operation would succeed if the ``validate_only`` request property is explicitly specified and set to true. + * Batch Alter Topic Configs + */ + async updateKafkaTopicConfigBatch( + requestParameters: UpdateKafkaTopicConfigBatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.updateKafkaTopicConfigBatchRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts b/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts index ca2624d675..b1f49cec9b 100644 --- a/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts +++ b/src/clients/kafkaRest/apis/ConsumerGroupV3Api.ts @@ -5,15 +5,14 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ConsumerData, ConsumerDataList, @@ -22,428 +21,593 @@ import type { ConsumerGroupLagSummaryData, ConsumerLagData, ConsumerLagDataList, -} from '../models/index'; +} from "../models/index"; import { - ConsumerDataFromJSON, - ConsumerDataToJSON, - ConsumerDataListFromJSON, - ConsumerDataListToJSON, - ConsumerGroupDataFromJSON, - ConsumerGroupDataToJSON, - ConsumerGroupDataListFromJSON, - ConsumerGroupDataListToJSON, - ConsumerGroupLagSummaryDataFromJSON, - ConsumerGroupLagSummaryDataToJSON, - ConsumerLagDataFromJSON, - ConsumerLagDataToJSON, - ConsumerLagDataListFromJSON, - ConsumerLagDataListToJSON, -} from '../models/index'; + ConsumerDataFromJSON, + ConsumerDataToJSON, + ConsumerDataListFromJSON, + ConsumerDataListToJSON, + ConsumerGroupDataFromJSON, + ConsumerGroupDataToJSON, + ConsumerGroupDataListFromJSON, + ConsumerGroupDataListToJSON, + ConsumerGroupLagSummaryDataFromJSON, + ConsumerGroupLagSummaryDataToJSON, + ConsumerLagDataFromJSON, + ConsumerLagDataToJSON, + ConsumerLagDataListFromJSON, + ConsumerLagDataListToJSON, +} from "../models/index"; export interface GetKafkaConsumerRequest { - cluster_id: string; - consumer_group_id: string; - consumer_id: string; + cluster_id: string; + consumer_group_id: string; + consumer_id: string; } export interface GetKafkaConsumerGroupRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } export interface GetKafkaConsumerGroupLagSummaryRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } export interface GetKafkaConsumerLagRequest { - cluster_id: string; - consumer_group_id: string; - topic_name: string; - partition_id: number; + cluster_id: string; + consumer_group_id: string; + topic_name: string; + partition_id: number; } export interface ListKafkaConsumerGroupsRequest { - cluster_id: string; + cluster_id: string; } export interface ListKafkaConsumerLagsRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } export interface ListKafkaConsumersRequest { - cluster_id: string; - consumer_group_id: string; + cluster_id: string; + consumer_group_id: string; } /** - * + * */ export class ConsumerGroupV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. + * Get Consumer + */ + async getKafkaConsumerRaw( + requestParameters: GetKafkaConsumerRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumer().', + ); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. - * Get Consumer - */ - async getKafkaConsumerRaw(requestParameters: GetKafkaConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumer().' - ); - } - - if (requestParameters['consumer_group_id'] == null) { - throw new runtime.RequiredError( - 'consumer_group_id', - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumer().' - ); - } - - if (requestParameters['consumer_id'] == null) { - throw new runtime.RequiredError( - 'consumer_id', - 'Required parameter "consumer_id" was null or undefined when calling getKafkaConsumer().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))).replace(`{${"consumer_id"}}`, encodeURIComponent(String(requestParameters['consumer_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerDataFromJSON(jsonValue)); + if (requestParameters["consumer_group_id"] == null) { + throw new runtime.RequiredError( + "consumer_group_id", + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumer().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. - * Get Consumer - */ - async getKafkaConsumer(requestParameters: GetKafkaConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaConsumerRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["consumer_id"] == null) { + throw new runtime.RequiredError( + "consumer_id", + 'Required parameter "consumer_id" was null or undefined when calling getKafkaConsumer().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. - * Get Consumer Group - */ - async getKafkaConsumerGroupRaw(requestParameters: GetKafkaConsumerGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroup().' - ); - } - - if (requestParameters['consumer_group_id'] == null) { - throw new runtime.RequiredError( - 'consumer_group_id', - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroup().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerGroupDataFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. - * Get Consumer Group - */ - async getKafkaConsumerGroup(requestParameters: GetKafkaConsumerGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaConsumerGroupRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"consumer_group_id"}}`, + encodeURIComponent(String(requestParameters["consumer_group_id"])), + ) + .replace( + `{${"consumer_id"}}`, + encodeURIComponent(String(requestParameters["consumer_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer specified by the ``consumer_id``. + * Get Consumer + */ + async getKafkaConsumer( + requestParameters: GetKafkaConsumerRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaConsumerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. + * Get Consumer Group + */ + async getKafkaConsumerGroupRaw( + requestParameters: GetKafkaConsumerGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroup().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. - * Get Consumer Group Lag Summary - */ - async getKafkaConsumerGroupLagSummaryRaw(requestParameters: GetKafkaConsumerGroupLagSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().' - ); - } - - if (requestParameters['consumer_group_id'] == null) { - throw new runtime.RequiredError( - 'consumer_group_id', - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lag-summary`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerGroupLagSummaryDataFromJSON(jsonValue)); + if (requestParameters["consumer_group_id"] == null) { + throw new runtime.RequiredError( + "consumer_group_id", + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroup().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. - * Get Consumer Group Lag Summary - */ - async getKafkaConsumerGroupLagSummary(requestParameters: GetKafkaConsumerGroupLagSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaConsumerGroupLagSummaryRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. - * Get Consumer Lag - */ - async getKafkaConsumerLagRaw(requestParameters: GetKafkaConsumerLagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerLag().' - ); - } - - if (requestParameters['consumer_group_id'] == null) { - throw new runtime.RequiredError( - 'consumer_group_id', - 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerLag().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling getKafkaConsumerLag().' - ); - } - - if (requestParameters['partition_id'] == null) { - throw new runtime.RequiredError( - 'partition_id', - 'Required parameter "partition_id" was null or undefined when calling getKafkaConsumerLag().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags/{topic_name}/partitions/{partition_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"partition_id"}}`, encodeURIComponent(String(requestParameters['partition_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerLagDataFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"consumer_group_id"}}`, + encodeURIComponent(String(requestParameters["consumer_group_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConsumerGroupDataFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the consumer group specified by the ``consumer_group_id``. + * Get Consumer Group + */ + async getKafkaConsumerGroup( + requestParameters: GetKafkaConsumerGroupRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaConsumerGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. + * Get Consumer Group Lag Summary + */ + async getKafkaConsumerGroupLagSummaryRaw( + requestParameters: GetKafkaConsumerGroupLagSummaryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. - * Get Consumer Lag - */ - async getKafkaConsumerLag(requestParameters: GetKafkaConsumerLagRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaConsumerLagRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["consumer_group_id"] == null) { + throw new runtime.RequiredError( + "consumer_group_id", + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerGroupLagSummary().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. - * List Consumer Groups - */ - async listKafkaConsumerGroupsRaw(requestParameters: ListKafkaConsumerGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerGroups().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerGroupDataListFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. - * List Consumer Groups - */ - async listKafkaConsumerGroups(requestParameters: ListKafkaConsumerGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaConsumerGroupsRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lag-summary` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"consumer_group_id"}}`, + encodeURIComponent(String(requestParameters["consumer_group_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConsumerGroupLagSummaryDataFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the maximum and total lag of the consumers belonging to the specified consumer group. + * Get Consumer Group Lag Summary + */ + async getKafkaConsumerGroupLagSummary( + requestParameters: GetKafkaConsumerGroupLagSummaryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaConsumerGroupLagSummaryRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. + * Get Consumer Lag + */ + async getKafkaConsumerLagRaw( + requestParameters: GetKafkaConsumerLagRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaConsumerLag().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. - * List Consumer Lags - */ - async listKafkaConsumerLagsRaw(requestParameters: ListKafkaConsumerLagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerLags().' - ); - } - - if (requestParameters['consumer_group_id'] == null) { - throw new runtime.RequiredError( - 'consumer_group_id', - 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumerLags().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerLagDataListFromJSON(jsonValue)); + if (requestParameters["consumer_group_id"] == null) { + throw new runtime.RequiredError( + "consumer_group_id", + 'Required parameter "consumer_group_id" was null or undefined when calling getKafkaConsumerLag().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. - * List Consumer Lags - */ - async listKafkaConsumerLags(requestParameters: ListKafkaConsumerLagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaConsumerLagsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling getKafkaConsumerLag().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. - * List Consumers - */ - async listKafkaConsumersRaw(requestParameters: ListKafkaConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumers().' - ); - } - - if (requestParameters['consumer_group_id'] == null) { - throw new runtime.RequiredError( - 'consumer_group_id', - 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumers().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"consumer_group_id"}}`, encodeURIComponent(String(requestParameters['consumer_group_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerDataListFromJSON(jsonValue)); + if (requestParameters["partition_id"] == null) { + throw new runtime.RequiredError( + "partition_id", + 'Required parameter "partition_id" was null or undefined when calling getKafkaConsumerLag().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. - * List Consumers - */ - async listKafkaConsumers(requestParameters: ListKafkaConsumersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaConsumersRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags/{topic_name}/partitions/{partition_id}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"consumer_group_id"}}`, + encodeURIComponent(String(requestParameters["consumer_group_id"])), + ) + .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) + .replace( + `{${"partition_id"}}`, + encodeURIComponent(String(requestParameters["partition_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConsumerLagDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return the consumer lag on a partition with the given `partition_id`. + * Get Consumer Lag + */ + async getKafkaConsumerLag( + requestParameters: GetKafkaConsumerLagRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaConsumerLagRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. + * List Consumer Groups + */ + async listKafkaConsumerGroupsRaw( + requestParameters: ListKafkaConsumerGroupsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerGroups().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConsumerGroupDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of consumer groups that belong to the specified Kafka cluster. + * List Consumer Groups + */ + async listKafkaConsumerGroups( + requestParameters: ListKafkaConsumerGroupsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaConsumerGroupsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. + * List Consumer Lags + */ + async listKafkaConsumerLagsRaw( + requestParameters: ListKafkaConsumerLagsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumerLags().', + ); + } + + if (requestParameters["consumer_group_id"] == null) { + throw new runtime.RequiredError( + "consumer_group_id", + 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumerLags().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"consumer_group_id"}}`, + encodeURIComponent(String(requestParameters["consumer_group_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConsumerLagDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Available in dedicated clusters only](https://img.shields.io/badge/-Available%20in%20dedicated%20clusters%20only-%23bc8540)](https://docs.confluent.io/cloud/current/clusters/cluster-types.html#dedicated-cluster) Return a list of consumer lags of the consumers belonging to the specified consumer group. + * List Consumer Lags + */ + async listKafkaConsumerLags( + requestParameters: ListKafkaConsumerLagsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaConsumerLagsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. + * List Consumers + */ + async listKafkaConsumersRaw( + requestParameters: ListKafkaConsumersRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaConsumers().', + ); + } + + if (requestParameters["consumer_group_id"] == null) { + throw new runtime.RequiredError( + "consumer_group_id", + 'Required parameter "consumer_group_id" was null or undefined when calling listKafkaConsumers().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"consumer_group_id"}}`, + encodeURIComponent(String(requestParameters["consumer_group_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConsumerDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return a list of consumers that belong to the specified consumer group. + * List Consumers + */ + async listKafkaConsumers( + requestParameters: ListKafkaConsumersRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaConsumersRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/PartitionV3Api.ts b/src/clients/kafkaRest/apis/PartitionV3Api.ts index df4c616baf..12495c3f46 100644 --- a/src/clients/kafkaRest/apis/PartitionV3Api.ts +++ b/src/clients/kafkaRest/apis/PartitionV3Api.ts @@ -5,147 +5,186 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - PartitionData, - PartitionDataList, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { PartitionData, PartitionDataList } from "../models/index"; import { - PartitionDataFromJSON, - PartitionDataToJSON, - PartitionDataListFromJSON, - PartitionDataListToJSON, -} from '../models/index'; + PartitionDataFromJSON, + PartitionDataToJSON, + PartitionDataListFromJSON, + PartitionDataListToJSON, +} from "../models/index"; export interface GetKafkaPartitionRequest { - cluster_id: string; - topic_name: string; - partition_id: number; + cluster_id: string; + topic_name: string; + partition_id: number; } export interface ListKafkaPartitionsRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } /** - * + * */ export class PartitionV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. + * Get Partition + */ + async getKafkaPartitionRaw( + requestParameters: GetKafkaPartitionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaPartition().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling getKafkaPartition().', + ); + } + + if (requestParameters["partition_id"] == null) { + throw new runtime.RequiredError( + "partition_id", + 'Required parameter "partition_id" was null or undefined when calling getKafkaPartition().', + ); + } + + const queryParameters: any = {}; - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. - * Get Partition - */ - async getKafkaPartitionRaw(requestParameters: GetKafkaPartitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaPartition().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling getKafkaPartition().' - ); - } - - if (requestParameters['partition_id'] == null) { - throw new runtime.RequiredError( - 'partition_id', - 'Required parameter "partition_id" was null or undefined when calling getKafkaPartition().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions/{partition_id}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))).replace(`{${"partition_id"}}`, encodeURIComponent(String(requestParameters['partition_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PartitionDataFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. - * Get Partition - */ - async getKafkaPartition(requestParameters: GetKafkaPartitionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaPartitionRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions/{partition_id}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters["topic_name"]))) + .replace( + `{${"partition_id"}}`, + encodeURIComponent(String(requestParameters["partition_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => PartitionDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the partition with the given `partition_id`. + * Get Partition + */ + async getKafkaPartition( + requestParameters: GetKafkaPartitionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaPartitionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. + * List Partitions + */ + async listKafkaPartitionsRaw( + requestParameters: ListKafkaPartitionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaPartitions().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. - * List Partitions - */ - async listKafkaPartitionsRaw(requestParameters: ListKafkaPartitionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaPartitions().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling listKafkaPartitions().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PartitionDataListFromJSON(jsonValue)); + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling listKafkaPartitions().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. - * List Partitions - */ - async listKafkaPartitions(requestParameters: ListKafkaPartitionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaPartitionsRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/partitions` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + PartitionDataListFromJSON(jsonValue), + ); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of partitions that belong to the specified topic. + * List Partitions + */ + async listKafkaPartitions( + requestParameters: ListKafkaPartitionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaPartitionsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/RecordsV3Api.ts b/src/clients/kafkaRest/apis/RecordsV3Api.ts index cd09e50923..5c46e361ad 100644 --- a/src/clients/kafkaRest/apis/RecordsV3Api.ts +++ b/src/clients/kafkaRest/apis/RecordsV3Api.ts @@ -5,93 +5,108 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ProduceRequest, - ProduceResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ProduceRequest, ProduceResponse } from "../models/index"; import { - ProduceRequestFromJSON, - ProduceRequestToJSON, - ProduceResponseFromJSON, - ProduceResponseToJSON, -} from '../models/index'; + ProduceRequestFromJSON, + ProduceRequestToJSON, + ProduceResponseFromJSON, + ProduceResponseToJSON, +} from "../models/index"; export interface ProduceRecordRequest { - cluster_id: string; - topic_name: string; - dry_run?: boolean; - ProduceRequest?: ProduceRequest; + cluster_id: string; + topic_name: string; + dry_run?: boolean; + ProduceRequest?: ProduceRequest; } /** - * + * */ export class RecordsV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. + * Produce Records + */ + async produceRecordRaw( + requestParameters: ProduceRecordRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling produceRecord().', + ); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. - * Produce Records - */ - async produceRecordRaw(requestParameters: ProduceRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling produceRecord().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling produceRecord().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['dry_run'] != null) { - queryParameters['dry_run'] = requestParameters['dry_run']; - } + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling produceRecord().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - headerParameters['Content-Type'] = 'application/json'; + if (requestParameters["dry_run"] != null) { + queryParameters["dry_run"] = requestParameters["dry_run"]; + } - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/records`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ProduceRequestToJSON(requestParameters['ProduceRequest']), - }, initOverrides); + headerParameters["Content-Type"] = "application/json"; - return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. - * Produce Records - */ - async produceRecord(requestParameters: ProduceRecordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.produceRecordRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}/records` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ProduceRequestToJSON(requestParameters["ProduceRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); + } + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Produce records to the given topic, returning delivery reports for each record produced. This API can be used in streaming mode by setting \"Transfer-Encoding: chunked\" header. For as long as the connection is kept open, the server will keep accepting records. Records are streamed to and from the server as Concatenated JSON. For each record sent to the server, the server will asynchronously send back a delivery report, in the same order, each with its own error_code. An error_code of 200 indicates success. The HTTP status code will be HTTP 200 OK as long as the connection is successfully established. To identify records that have encountered an error, check the error_code of each delivery report. Note that the cluster_id is validated only when running in Confluent Cloud. This API currently does not support Schema Registry integration. Sending schemas is not supported. Only BINARY, JSON, and STRING formats are supported. + * Produce Records + */ + async produceRecord( + requestParameters: ProduceRecordRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.produceRecordRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/TopicV3Api.ts b/src/clients/kafkaRest/apis/TopicV3Api.ts index 980c212a2c..7e885a0f92 100644 --- a/src/clients/kafkaRest/apis/TopicV3Api.ts +++ b/src/clients/kafkaRest/apis/TopicV3Api.ts @@ -5,311 +5,413 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CreateTopicRequestData, TopicData, TopicDataList, UpdatePartitionCountRequestData, -} from '../models/index'; +} from "../models/index"; import { - CreateTopicRequestDataFromJSON, - CreateTopicRequestDataToJSON, - TopicDataFromJSON, - TopicDataToJSON, - TopicDataListFromJSON, - TopicDataListToJSON, - UpdatePartitionCountRequestDataFromJSON, - UpdatePartitionCountRequestDataToJSON, -} from '../models/index'; + CreateTopicRequestDataFromJSON, + CreateTopicRequestDataToJSON, + TopicDataFromJSON, + TopicDataToJSON, + TopicDataListFromJSON, + TopicDataListToJSON, + UpdatePartitionCountRequestDataFromJSON, + UpdatePartitionCountRequestDataToJSON, +} from "../models/index"; export interface CreateKafkaTopicRequest { - cluster_id: string; - CreateTopicRequestData?: CreateTopicRequestData; + cluster_id: string; + CreateTopicRequestData?: CreateTopicRequestData; } export interface DeleteKafkaTopicRequest { - cluster_id: string; - topic_name: string; + cluster_id: string; + topic_name: string; } export interface GetKafkaTopicRequest { - cluster_id: string; - topic_name: string; - include_authorized_operations?: boolean; + cluster_id: string; + topic_name: string; + include_authorized_operations?: boolean; } export interface ListKafkaTopicsRequest { - cluster_id: string; - includeAuthorizedOperations?: boolean; + cluster_id: string; + includeAuthorizedOperations?: boolean; } export interface UpdatePartitionCountKafkaTopicRequest { - cluster_id: string; - topic_name: string; - UpdatePartitionCountRequestData?: UpdatePartitionCountRequestData; + cluster_id: string; + topic_name: string; + UpdatePartitionCountRequestData?: UpdatePartitionCountRequestData; } /** - * + * */ export class TopicV3Api extends runtime.BaseAPI { + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. + * Create Topic + */ + async createKafkaTopicRaw( + requestParameters: CreateKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling createKafkaTopic().', + ); + } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. - * Create Topic - */ - async createKafkaTopicRaw(requestParameters: CreateKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling createKafkaTopic().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateTopicRequestDataToJSON(requestParameters['CreateTopicRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. - * Create Topic - */ - async createKafkaTopic(requestParameters: CreateKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createKafkaTopicRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateTopicRequestDataToJSON(requestParameters["CreateTopicRequestData"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Create a topic. Also supports a dry-run mode that only validates whether the topic creation would succeed if the ``validate_only`` request property is explicitly specified and set to true. Note that when dry-run mode is being used the response status would be 200 OK instead of 201 Created. + * Create Topic + */ + async createKafkaTopic( + requestParameters: CreateKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createKafkaTopicRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. + * Delete Topic + */ + async deleteKafkaTopicRaw( + requestParameters: DeleteKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopic().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. - * Delete Topic - */ - async deleteKafkaTopicRaw(requestParameters: DeleteKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling deleteKafkaTopic().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopic().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling deleteKafkaTopic().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. - * Delete Topic - */ - async deleteKafkaTopic(requestParameters: DeleteKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteKafkaTopicRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. - * Get Topic - */ - async getKafkaTopicRaw(requestParameters: GetKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopic().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling getKafkaTopic().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['include_authorized_operations'] != null) { - queryParameters['include_authorized_operations'] = requestParameters['include_authorized_operations']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Delete the topic with the given `topic_name`. + * Delete Topic + */ + async deleteKafkaTopic( + requestParameters: DeleteKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteKafkaTopicRaw(requestParameters, initOverrides); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. + * Get Topic + */ + async getKafkaTopicRaw( + requestParameters: GetKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling getKafkaTopic().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. - * Get Topic - */ - async getKafkaTopic(requestParameters: GetKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKafkaTopicRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling getKafkaTopic().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. - * List Topics - */ - async listKafkaTopicsRaw(requestParameters: ListKafkaTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopics().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['includeAuthorizedOperations'] != null) { - queryParameters['includeAuthorizedOperations'] = requestParameters['includeAuthorizedOperations']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataListFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["include_authorized_operations"] != null) { + queryParameters["include_authorized_operations"] = + requestParameters["include_authorized_operations"]; } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. - * List Topics - */ - async listKafkaTopics(requestParameters: ListKafkaTopicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listKafkaTopicsRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. - * Update Partition Count - */ - async updatePartitionCountKafkaTopicRaw(requestParameters: UpdatePartitionCountKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling updatePartitionCountKafkaTopic().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling updatePartitionCountKafkaTopic().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: UpdatePartitionCountRequestDataToJSON(requestParameters['UpdatePartitionCountRequestData']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the topic with the given `topic_name`. + * Get Topic + */ + async getKafkaTopic( + requestParameters: GetKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKafkaTopicRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. + * List Topics + */ + async listKafkaTopicsRaw( + requestParameters: ListKafkaTopicsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling listKafkaTopics().', + ); } - /** - * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. - * Update Partition Count - */ - async updatePartitionCountKafkaTopic(requestParameters: UpdatePartitionCountKafkaTopicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updatePartitionCountKafkaTopicRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["includeAuthorizedOperations"] != null) { + queryParameters["includeAuthorizedOperations"] = + requestParameters["includeAuthorizedOperations"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics`.replace( + `{${"cluster_id"}}`, + encodeURIComponent(String(requestParameters["cluster_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataListFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Return the list of topics that belong to the specified Kafka cluster. + * List Topics + */ + async listKafkaTopics( + requestParameters: ListKafkaTopicsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listKafkaTopicsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. + * Update Partition Count + */ + async updatePartitionCountKafkaTopicRaw( + requestParameters: UpdatePartitionCountKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling updatePartitionCountKafkaTopic().', + ); + } + + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling updatePartitionCountKafkaTopic().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/kafka/v3/clusters/{cluster_id}/topics/{topic_name}` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "PATCH", + headers: headerParameters, + query: queryParameters, + body: UpdatePartitionCountRequestDataToJSON( + requestParameters["UpdatePartitionCountRequestData"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => TopicDataFromJSON(jsonValue)); + } + + /** + * [![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) Increase the number of partitions for a topic. + * Update Partition Count + */ + async updatePartitionCountKafkaTopic( + requestParameters: UpdatePartitionCountKafkaTopicRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updatePartitionCountKafkaTopicRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/kafkaRest/apis/index.ts b/src/clients/kafkaRest/apis/index.ts index ef106ccd1f..c23df0172d 100644 --- a/src/clients/kafkaRest/apis/index.ts +++ b/src/clients/kafkaRest/apis/index.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ACLV3Api'; -export * from './ClusterLinkingV3Api'; -export * from './ClusterV3Api'; -export * from './ConfigsV3Api'; -export * from './ConsumerGroupV3Api'; -export * from './PartitionV3Api'; -export * from './RecordsV3Api'; -export * from './TopicV3Api'; +export * from "./ACLV3Api"; +export * from "./ClusterLinkingV3Api"; +export * from "./ClusterV3Api"; +export * from "./ConfigsV3Api"; +export * from "./ConsumerGroupV3Api"; +export * from "./PartitionV3Api"; +export * from "./RecordsV3Api"; +export * from "./TopicV3Api"; diff --git a/src/clients/kafkaRest/index.ts b/src/clients/kafkaRest/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/kafkaRest/index.ts +++ b/src/clients/kafkaRest/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/kafkaRest/models/AbstractConfigData.ts b/src/clients/kafkaRest/models/AbstractConfigData.ts index b03c697137..a76c9b946e 100644 --- a/src/clients/kafkaRest/models/AbstractConfigData.ts +++ b/src/clients/kafkaRest/models/AbstractConfigData.ts @@ -5,157 +5,160 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigSynonymData } from './ConfigSynonymData'; +import { mapValues } from "../runtime"; +import type { ConfigSynonymData } from "./ConfigSynonymData"; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from './ConfigSynonymData'; -import type { ResourceMetadata } from './ResourceMetadata'; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from "./ConfigSynonymData"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface AbstractConfigData */ export interface AbstractConfigData { - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AbstractConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof AbstractConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof AbstractConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof AbstractConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof AbstractConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof AbstractConfigData - */ - synonyms: Array; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AbstractConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof AbstractConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof AbstractConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof AbstractConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof AbstractConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof AbstractConfigData + */ + synonyms: Array; } /** * Check if a given object implements the AbstractConfigData interface. */ export function instanceOfAbstractConfigData(value: object): value is AbstractConfigData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('is_default' in value) || value['is_default'] === undefined) return false; - if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; - if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; - if (!('source' in value) || value['source'] === undefined) return false; - if (!('synonyms' in value) || value['synonyms'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("is_default" in value) || value["is_default"] === undefined) return false; + if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; + if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; + if (!("source" in value) || value["source"] === undefined) return false; + if (!("synonyms" in value) || value["synonyms"] === undefined) return false; + return true; } export function AbstractConfigDataFromJSON(json: any): AbstractConfigData { - return AbstractConfigDataFromJSONTyped(json, false); + return AbstractConfigDataFromJSONTyped(json, false); } -export function AbstractConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AbstractConfigData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - 'is_default': json['is_default'], - 'is_read_only': json['is_read_only'], - 'is_sensitive': json['is_sensitive'], - 'source': json['source'], - 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), - }; +export function AbstractConfigDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AbstractConfigData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + is_default: json["is_default"], + is_read_only: json["is_read_only"], + is_sensitive: json["is_sensitive"], + source: json["source"], + synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), + }; } export function AbstractConfigDataToJSON(json: any): AbstractConfigData { - return AbstractConfigDataToJSONTyped(json, false); + return AbstractConfigDataToJSONTyped(json, false); } -export function AbstractConfigDataToJSONTyped(value?: AbstractConfigData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AbstractConfigDataToJSONTyped( + value?: AbstractConfigData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'name': value['name'], - 'value': value['value'], - 'is_default': value['is_default'], - 'is_read_only': value['is_read_only'], - 'is_sensitive': value['is_sensitive'], - 'source': value['source'], - 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + name: value["name"], + value: value["value"], + is_default: value["is_default"], + is_read_only: value["is_read_only"], + is_sensitive: value["is_sensitive"], + source: value["source"], + synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/AclData.ts b/src/clients/kafkaRest/models/AclData.ts index 8792e82201..58c8138554 100644 --- a/src/clients/kafkaRest/models/AclData.ts +++ b/src/clients/kafkaRest/models/AclData.ts @@ -5,160 +5,158 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AclResourceType } from './AclResourceType'; +import { mapValues } from "../runtime"; +import type { AclResourceType } from "./AclResourceType"; import { - AclResourceTypeFromJSON, - AclResourceTypeFromJSONTyped, - AclResourceTypeToJSON, - AclResourceTypeToJSONTyped, -} from './AclResourceType'; -import type { ResourceMetadata } from './ResourceMetadata'; + AclResourceTypeFromJSON, + AclResourceTypeFromJSONTyped, + AclResourceTypeToJSON, + AclResourceTypeToJSONTyped, +} from "./AclResourceType"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface AclData */ export interface AclData { - /** - * - * @type {string} - * @memberof AclData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AclData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AclData - */ - cluster_id: string; - /** - * - * @type {AclResourceType} - * @memberof AclData - */ - resource_type: AclResourceType; - /** - * - * @type {string} - * @memberof AclData - */ - resource_name: string; - /** - * - * @type {string} - * @memberof AclData - */ - pattern_type: string; - /** - * - * @type {string} - * @memberof AclData - */ - principal: string; - /** - * - * @type {string} - * @memberof AclData - */ - host: string; - /** - * - * @type {string} - * @memberof AclData - */ - operation: string; - /** - * - * @type {string} - * @memberof AclData - */ - permission: string; + /** + * + * @type {string} + * @memberof AclData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AclData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AclData + */ + cluster_id: string; + /** + * + * @type {AclResourceType} + * @memberof AclData + */ + resource_type: AclResourceType; + /** + * + * @type {string} + * @memberof AclData + */ + resource_name: string; + /** + * + * @type {string} + * @memberof AclData + */ + pattern_type: string; + /** + * + * @type {string} + * @memberof AclData + */ + principal: string; + /** + * + * @type {string} + * @memberof AclData + */ + host: string; + /** + * + * @type {string} + * @memberof AclData + */ + operation: string; + /** + * + * @type {string} + * @memberof AclData + */ + permission: string; } - - /** * Check if a given object implements the AclData interface. */ export function instanceOfAclData(value: object): value is AclData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('resource_type' in value) || value['resource_type'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - if (!('pattern_type' in value) || value['pattern_type'] === undefined) return false; - if (!('principal' in value) || value['principal'] === undefined) return false; - if (!('host' in value) || value['host'] === undefined) return false; - if (!('operation' in value) || value['operation'] === undefined) return false; - if (!('permission' in value) || value['permission'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("resource_type" in value) || value["resource_type"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + if (!("pattern_type" in value) || value["pattern_type"] === undefined) return false; + if (!("principal" in value) || value["principal"] === undefined) return false; + if (!("host" in value) || value["host"] === undefined) return false; + if (!("operation" in value) || value["operation"] === undefined) return false; + if (!("permission" in value) || value["permission"] === undefined) return false; + return true; } export function AclDataFromJSON(json: any): AclData { - return AclDataFromJSONTyped(json, false); + return AclDataFromJSONTyped(json, false); } export function AclDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AclData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'resource_type': AclResourceTypeFromJSON(json['resource_type']), - 'resource_name': json['resource_name'], - 'pattern_type': json['pattern_type'], - 'principal': json['principal'], - 'host': json['host'], - 'operation': json['operation'], - 'permission': json['permission'], - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + resource_type: AclResourceTypeFromJSON(json["resource_type"]), + resource_name: json["resource_name"], + pattern_type: json["pattern_type"], + principal: json["principal"], + host: json["host"], + operation: json["operation"], + permission: json["permission"], + }; } export function AclDataToJSON(json: any): AclData { - return AclDataToJSONTyped(json, false); + return AclDataToJSONTyped(json, false); } -export function AclDataToJSONTyped(value?: AclData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AclDataToJSONTyped( + value?: AclData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'resource_type': AclResourceTypeToJSON(value['resource_type']), - 'resource_name': value['resource_name'], - 'pattern_type': value['pattern_type'], - 'principal': value['principal'], - 'host': value['host'], - 'operation': value['operation'], - 'permission': value['permission'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + resource_type: AclResourceTypeToJSON(value["resource_type"]), + resource_name: value["resource_name"], + pattern_type: value["pattern_type"], + principal: value["principal"], + host: value["host"], + operation: value["operation"], + permission: value["permission"], + }; } - diff --git a/src/clients/kafkaRest/models/AclDataList.ts b/src/clients/kafkaRest/models/AclDataList.ts index a7f0773bb9..6d32a95c60 100644 --- a/src/clients/kafkaRest/models/AclDataList.ts +++ b/src/clients/kafkaRest/models/AclDataList.ts @@ -5,95 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { AclData } from './AclData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { AclData } from "./AclData"; import { - AclDataFromJSON, - AclDataFromJSONTyped, - AclDataToJSON, - AclDataToJSONTyped, -} from './AclData'; + AclDataFromJSON, + AclDataFromJSONTyped, + AclDataToJSON, + AclDataToJSONTyped, +} from "./AclData"; /** - * + * * @export * @interface AclDataList */ export interface AclDataList { - /** - * - * @type {string} - * @memberof AclDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof AclDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof AclDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof AclDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof AclDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof AclDataList + */ + data: Array; } /** * Check if a given object implements the AclDataList interface. */ export function instanceOfAclDataList(value: object): value is AclDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function AclDataListFromJSON(json: any): AclDataList { - return AclDataListFromJSONTyped(json, false); + return AclDataListFromJSONTyped(json, false); } export function AclDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AclDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(AclDataFromJSON)), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(AclDataFromJSON), + }; } export function AclDataListToJSON(json: any): AclDataList { - return AclDataListToJSONTyped(json, false); + return AclDataListToJSONTyped(json, false); } -export function AclDataListToJSONTyped(value?: AclDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AclDataListToJSONTyped( + value?: AclDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(AclDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(AclDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/AclResourceType.ts b/src/clients/kafkaRest/models/AclResourceType.ts index 989c4748e8..c76267451b 100644 --- a/src/clients/kafkaRest/models/AclResourceType.ts +++ b/src/clients/kafkaRest/models/AclResourceType.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,45 +13,49 @@ */ /** - * + * * @export * @enum {string} */ export enum AclResourceType { - Unknown = 'UNKNOWN', - Any = 'ANY', - Topic = 'TOPIC', - Group = 'GROUP', - Cluster = 'CLUSTER', - TransactionalId = 'TRANSACTIONAL_ID', - DelegationToken = 'DELEGATION_TOKEN' + Unknown = "UNKNOWN", + Any = "ANY", + Topic = "TOPIC", + Group = "GROUP", + Cluster = "CLUSTER", + TransactionalId = "TRANSACTIONAL_ID", + DelegationToken = "DELEGATION_TOKEN", } - export function instanceOfAclResourceType(value: any): boolean { - for (const key in AclResourceType) { - if (Object.prototype.hasOwnProperty.call(AclResourceType, key)) { - if (AclResourceType[key as keyof typeof AclResourceType] === value) { - return true; - } - } + for (const key in AclResourceType) { + if (Object.prototype.hasOwnProperty.call(AclResourceType, key)) { + if (AclResourceType[key as keyof typeof AclResourceType] === value) { + return true; + } } - return false; + } + return false; } export function AclResourceTypeFromJSON(json: any): AclResourceType { - return AclResourceTypeFromJSONTyped(json, false); + return AclResourceTypeFromJSONTyped(json, false); } -export function AclResourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AclResourceType { - return json as AclResourceType; +export function AclResourceTypeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AclResourceType { + return json as AclResourceType; } export function AclResourceTypeToJSON(value?: AclResourceType | null): any { - return value as any; + return value as any; } -export function AclResourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): AclResourceType { - return value as AclResourceType; +export function AclResourceTypeToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): AclResourceType { + return value as AclResourceType; } - diff --git a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts index 4c831a97c9..63e6421c9c 100644 --- a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts +++ b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionData.ts @@ -5,147 +5,154 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface AlterBrokerReplicaExclusionData */ export interface AlterBrokerReplicaExclusionData { - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AlterBrokerReplicaExclusionData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof AlterBrokerReplicaExclusionData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - exclusion: string; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - reason: string; - /** - * - * @type {number} - * @memberof AlterBrokerReplicaExclusionData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof AlterBrokerReplicaExclusionData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AlterBrokerReplicaExclusionData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof AlterBrokerReplicaExclusionData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + exclusion: string; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + reason: string; + /** + * + * @type {number} + * @memberof AlterBrokerReplicaExclusionData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof AlterBrokerReplicaExclusionData + */ + broker: Relationship; } /** * Check if a given object implements the AlterBrokerReplicaExclusionData interface. */ -export function instanceOfAlterBrokerReplicaExclusionData(value: object): value is AlterBrokerReplicaExclusionData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('exclusion' in value) || value['exclusion'] === undefined) return false; - if (!('reason' in value) || value['reason'] === undefined) return false; - if (!('broker' in value) || value['broker'] === undefined) return false; - return true; +export function instanceOfAlterBrokerReplicaExclusionData( + value: object, +): value is AlterBrokerReplicaExclusionData { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("exclusion" in value) || value["exclusion"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + if (!("broker" in value) || value["broker"] === undefined) return false; + return true; } -export function AlterBrokerReplicaExclusionDataFromJSON(json: any): AlterBrokerReplicaExclusionData { - return AlterBrokerReplicaExclusionDataFromJSONTyped(json, false); +export function AlterBrokerReplicaExclusionDataFromJSON( + json: any, +): AlterBrokerReplicaExclusionData { + return AlterBrokerReplicaExclusionDataFromJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterBrokerReplicaExclusionData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'broker_id': json['broker_id'], - 'exclusion': json['exclusion'], - 'reason': json['reason'], - 'error_code': json['error_code'] == null ? undefined : json['error_code'], - 'error_message': json['error_message'] == null ? undefined : json['error_message'], - 'broker': RelationshipFromJSON(json['broker']), - }; +export function AlterBrokerReplicaExclusionDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterBrokerReplicaExclusionData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + broker_id: json["broker_id"], + exclusion: json["exclusion"], + reason: json["reason"], + error_code: json["error_code"] == null ? undefined : json["error_code"], + error_message: json["error_message"] == null ? undefined : json["error_message"], + broker: RelationshipFromJSON(json["broker"]), + }; } export function AlterBrokerReplicaExclusionDataToJSON(json: any): AlterBrokerReplicaExclusionData { - return AlterBrokerReplicaExclusionDataToJSONTyped(json, false); + return AlterBrokerReplicaExclusionDataToJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataToJSONTyped(value?: AlterBrokerReplicaExclusionData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterBrokerReplicaExclusionDataToJSONTyped( + value?: AlterBrokerReplicaExclusionData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'broker_id': value['broker_id'], - 'exclusion': value['exclusion'], - 'reason': value['reason'], - 'error_code': value['error_code'], - 'error_message': value['error_message'], - 'broker': RelationshipToJSON(value['broker']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + broker_id: value["broker_id"], + exclusion: value["exclusion"], + reason: value["reason"], + error_code: value["error_code"], + error_message: value["error_message"], + broker: RelationshipToJSON(value["broker"]), + }; } - diff --git a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts index 21d20fdfd5..7d563448eb 100644 --- a/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts +++ b/src/clients/kafkaRest/models/AlterBrokerReplicaExclusionDataList.ts @@ -5,95 +5,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { AlterBrokerReplicaExclusionData } from './AlterBrokerReplicaExclusionData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { AlterBrokerReplicaExclusionData } from "./AlterBrokerReplicaExclusionData"; import { - AlterBrokerReplicaExclusionDataFromJSON, - AlterBrokerReplicaExclusionDataFromJSONTyped, - AlterBrokerReplicaExclusionDataToJSON, - AlterBrokerReplicaExclusionDataToJSONTyped, -} from './AlterBrokerReplicaExclusionData'; + AlterBrokerReplicaExclusionDataFromJSON, + AlterBrokerReplicaExclusionDataFromJSONTyped, + AlterBrokerReplicaExclusionDataToJSON, + AlterBrokerReplicaExclusionDataToJSONTyped, +} from "./AlterBrokerReplicaExclusionData"; /** - * + * * @export * @interface AlterBrokerReplicaExclusionDataList */ export interface AlterBrokerReplicaExclusionDataList { - /** - * - * @type {string} - * @memberof AlterBrokerReplicaExclusionDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof AlterBrokerReplicaExclusionDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof AlterBrokerReplicaExclusionDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof AlterBrokerReplicaExclusionDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof AlterBrokerReplicaExclusionDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof AlterBrokerReplicaExclusionDataList + */ + data: Array; } /** * Check if a given object implements the AlterBrokerReplicaExclusionDataList interface. */ -export function instanceOfAlterBrokerReplicaExclusionDataList(value: object): value is AlterBrokerReplicaExclusionDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfAlterBrokerReplicaExclusionDataList( + value: object, +): value is AlterBrokerReplicaExclusionDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function AlterBrokerReplicaExclusionDataListFromJSON(json: any): AlterBrokerReplicaExclusionDataList { - return AlterBrokerReplicaExclusionDataListFromJSONTyped(json, false); +export function AlterBrokerReplicaExclusionDataListFromJSON( + json: any, +): AlterBrokerReplicaExclusionDataList { + return AlterBrokerReplicaExclusionDataListFromJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterBrokerReplicaExclusionDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(AlterBrokerReplicaExclusionDataFromJSON)), - }; +export function AlterBrokerReplicaExclusionDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterBrokerReplicaExclusionDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(AlterBrokerReplicaExclusionDataFromJSON), + }; } -export function AlterBrokerReplicaExclusionDataListToJSON(json: any): AlterBrokerReplicaExclusionDataList { - return AlterBrokerReplicaExclusionDataListToJSONTyped(json, false); +export function AlterBrokerReplicaExclusionDataListToJSON( + json: any, +): AlterBrokerReplicaExclusionDataList { + return AlterBrokerReplicaExclusionDataListToJSONTyped(json, false); } -export function AlterBrokerReplicaExclusionDataListToJSONTyped(value?: AlterBrokerReplicaExclusionDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterBrokerReplicaExclusionDataListToJSONTyped( + value?: AlterBrokerReplicaExclusionDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(AlterBrokerReplicaExclusionDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(AlterBrokerReplicaExclusionDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts b/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts index f90d4f64bb..fc1a1db3ac 100644 --- a/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts +++ b/src/clients/kafkaRest/models/AlterConfigBatchRequestData.ts @@ -5,78 +5,83 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AlterConfigBatchRequestDataDataInner } from './AlterConfigBatchRequestDataDataInner'; +import { mapValues } from "../runtime"; +import type { AlterConfigBatchRequestDataDataInner } from "./AlterConfigBatchRequestDataDataInner"; import { - AlterConfigBatchRequestDataDataInnerFromJSON, - AlterConfigBatchRequestDataDataInnerFromJSONTyped, - AlterConfigBatchRequestDataDataInnerToJSON, - AlterConfigBatchRequestDataDataInnerToJSONTyped, -} from './AlterConfigBatchRequestDataDataInner'; + AlterConfigBatchRequestDataDataInnerFromJSON, + AlterConfigBatchRequestDataDataInnerFromJSONTyped, + AlterConfigBatchRequestDataDataInnerToJSON, + AlterConfigBatchRequestDataDataInnerToJSONTyped, +} from "./AlterConfigBatchRequestDataDataInner"; /** - * + * * @export * @interface AlterConfigBatchRequestData */ export interface AlterConfigBatchRequestData { - /** - * - * @type {Array} - * @memberof AlterConfigBatchRequestData - */ - data: Array; - /** - * - * @type {boolean} - * @memberof AlterConfigBatchRequestData - */ - validate_only?: boolean; + /** + * + * @type {Array} + * @memberof AlterConfigBatchRequestData + */ + data: Array; + /** + * + * @type {boolean} + * @memberof AlterConfigBatchRequestData + */ + validate_only?: boolean; } /** * Check if a given object implements the AlterConfigBatchRequestData interface. */ -export function instanceOfAlterConfigBatchRequestData(value: object): value is AlterConfigBatchRequestData { - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfAlterConfigBatchRequestData( + value: object, +): value is AlterConfigBatchRequestData { + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function AlterConfigBatchRequestDataFromJSON(json: any): AlterConfigBatchRequestData { - return AlterConfigBatchRequestDataFromJSONTyped(json, false); + return AlterConfigBatchRequestDataFromJSONTyped(json, false); } -export function AlterConfigBatchRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterConfigBatchRequestData { - if (json == null) { - return json; - } - return { - - 'data': ((json['data'] as Array).map(AlterConfigBatchRequestDataDataInnerFromJSON)), - 'validate_only': json['validate_only'] == null ? undefined : json['validate_only'], - }; +export function AlterConfigBatchRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterConfigBatchRequestData { + if (json == null) { + return json; + } + return { + data: (json["data"] as Array).map(AlterConfigBatchRequestDataDataInnerFromJSON), + validate_only: json["validate_only"] == null ? undefined : json["validate_only"], + }; } export function AlterConfigBatchRequestDataToJSON(json: any): AlterConfigBatchRequestData { - return AlterConfigBatchRequestDataToJSONTyped(json, false); + return AlterConfigBatchRequestDataToJSONTyped(json, false); } -export function AlterConfigBatchRequestDataToJSONTyped(value?: AlterConfigBatchRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterConfigBatchRequestDataToJSONTyped( + value?: AlterConfigBatchRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'data': ((value['data'] as Array).map(AlterConfigBatchRequestDataDataInnerToJSON)), - 'validate_only': value['validate_only'], - }; + return { + data: (value["data"] as Array).map(AlterConfigBatchRequestDataDataInnerToJSON), + validate_only: value["validate_only"], + }; } - diff --git a/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts b/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts index f366531af9..7065d5c4ca 100644 --- a/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts +++ b/src/clients/kafkaRest/models/AlterConfigBatchRequestDataDataInner.ts @@ -5,78 +5,87 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface AlterConfigBatchRequestDataDataInner */ export interface AlterConfigBatchRequestDataDataInner { - /** - * - * @type {string} - * @memberof AlterConfigBatchRequestDataDataInner - */ - name: string; - /** - * - * @type {string} - * @memberof AlterConfigBatchRequestDataDataInner - */ - value?: string | null; - /** - * - * @type {string} - * @memberof AlterConfigBatchRequestDataDataInner - */ - operation?: string | null; + /** + * + * @type {string} + * @memberof AlterConfigBatchRequestDataDataInner + */ + name: string; + /** + * + * @type {string} + * @memberof AlterConfigBatchRequestDataDataInner + */ + value?: string | null; + /** + * + * @type {string} + * @memberof AlterConfigBatchRequestDataDataInner + */ + operation?: string | null; } /** * Check if a given object implements the AlterConfigBatchRequestDataDataInner interface. */ -export function instanceOfAlterConfigBatchRequestDataDataInner(value: object): value is AlterConfigBatchRequestDataDataInner { - if (!('name' in value) || value['name'] === undefined) return false; - return true; +export function instanceOfAlterConfigBatchRequestDataDataInner( + value: object, +): value is AlterConfigBatchRequestDataDataInner { + if (!("name" in value) || value["name"] === undefined) return false; + return true; } -export function AlterConfigBatchRequestDataDataInnerFromJSON(json: any): AlterConfigBatchRequestDataDataInner { - return AlterConfigBatchRequestDataDataInnerFromJSONTyped(json, false); +export function AlterConfigBatchRequestDataDataInnerFromJSON( + json: any, +): AlterConfigBatchRequestDataDataInner { + return AlterConfigBatchRequestDataDataInnerFromJSONTyped(json, false); } -export function AlterConfigBatchRequestDataDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterConfigBatchRequestDataDataInner { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - 'operation': json['operation'] == null ? undefined : json['operation'], - }; +export function AlterConfigBatchRequestDataDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterConfigBatchRequestDataDataInner { + if (json == null) { + return json; + } + return { + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + operation: json["operation"] == null ? undefined : json["operation"], + }; } -export function AlterConfigBatchRequestDataDataInnerToJSON(json: any): AlterConfigBatchRequestDataDataInner { - return AlterConfigBatchRequestDataDataInnerToJSONTyped(json, false); +export function AlterConfigBatchRequestDataDataInnerToJSON( + json: any, +): AlterConfigBatchRequestDataDataInner { + return AlterConfigBatchRequestDataDataInnerToJSONTyped(json, false); } -export function AlterConfigBatchRequestDataDataInnerToJSONTyped(value?: AlterConfigBatchRequestDataDataInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterConfigBatchRequestDataDataInnerToJSONTyped( + value?: AlterConfigBatchRequestDataDataInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'value': value['value'], - 'operation': value['operation'], - }; + return { + name: value["name"], + value: value["value"], + operation: value["operation"], + }; } - diff --git a/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts b/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts index ccb52a8e08..d44d669a01 100644 --- a/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts +++ b/src/clients/kafkaRest/models/AlterMirrorStatusResponseData.ts @@ -5,122 +5,127 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { MirrorLag } from './MirrorLag'; +import { mapValues } from "../runtime"; +import type { MirrorLag } from "./MirrorLag"; import { - MirrorLagFromJSON, - MirrorLagFromJSONTyped, - MirrorLagToJSON, - MirrorLagToJSONTyped, -} from './MirrorLag'; -import type { ResourceMetadata } from './ResourceMetadata'; + MirrorLagFromJSON, + MirrorLagFromJSONTyped, + MirrorLagToJSON, + MirrorLagToJSONTyped, +} from "./MirrorLag"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface AlterMirrorStatusResponseData */ export interface AlterMirrorStatusResponseData { - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AlterMirrorStatusResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseData - */ - mirror_topic_name: string; - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseData - */ - error_message: string | null; - /** - * - * @type {number} - * @memberof AlterMirrorStatusResponseData - */ - error_code: number | null; - /** - * - * @type {Array} - * @memberof AlterMirrorStatusResponseData - */ - mirror_lags: Array; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AlterMirrorStatusResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseData + */ + mirror_topic_name: string; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseData + */ + error_message: string | null; + /** + * + * @type {number} + * @memberof AlterMirrorStatusResponseData + */ + error_code: number | null; + /** + * + * @type {Array} + * @memberof AlterMirrorStatusResponseData + */ + mirror_lags: Array; } /** * Check if a given object implements the AlterMirrorStatusResponseData interface. */ -export function instanceOfAlterMirrorStatusResponseData(value: object): value is AlterMirrorStatusResponseData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('mirror_topic_name' in value) || value['mirror_topic_name'] === undefined) return false; - if (!('error_message' in value) || value['error_message'] === undefined) return false; - if (!('error_code' in value) || value['error_code'] === undefined) return false; - if (!('mirror_lags' in value) || value['mirror_lags'] === undefined) return false; - return true; +export function instanceOfAlterMirrorStatusResponseData( + value: object, +): value is AlterMirrorStatusResponseData { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("mirror_topic_name" in value) || value["mirror_topic_name"] === undefined) return false; + if (!("error_message" in value) || value["error_message"] === undefined) return false; + if (!("error_code" in value) || value["error_code"] === undefined) return false; + if (!("mirror_lags" in value) || value["mirror_lags"] === undefined) return false; + return true; } export function AlterMirrorStatusResponseDataFromJSON(json: any): AlterMirrorStatusResponseData { - return AlterMirrorStatusResponseDataFromJSONTyped(json, false); + return AlterMirrorStatusResponseDataFromJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterMirrorStatusResponseData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'mirror_topic_name': json['mirror_topic_name'], - 'error_message': json['error_message'], - 'error_code': json['error_code'], - 'mirror_lags': ((json['mirror_lags'] as Array).map(MirrorLagFromJSON)), - }; +export function AlterMirrorStatusResponseDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterMirrorStatusResponseData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + mirror_topic_name: json["mirror_topic_name"], + error_message: json["error_message"], + error_code: json["error_code"], + mirror_lags: (json["mirror_lags"] as Array).map(MirrorLagFromJSON), + }; } export function AlterMirrorStatusResponseDataToJSON(json: any): AlterMirrorStatusResponseData { - return AlterMirrorStatusResponseDataToJSONTyped(json, false); + return AlterMirrorStatusResponseDataToJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataToJSONTyped(value?: AlterMirrorStatusResponseData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterMirrorStatusResponseDataToJSONTyped( + value?: AlterMirrorStatusResponseData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'mirror_topic_name': value['mirror_topic_name'], - 'error_message': value['error_message'], - 'error_code': value['error_code'], - 'mirror_lags': ((value['mirror_lags'] as Array).map(MirrorLagToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + mirror_topic_name: value["mirror_topic_name"], + error_message: value["error_message"], + error_code: value["error_code"], + mirror_lags: (value["mirror_lags"] as Array).map(MirrorLagToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts b/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts index 5316b07767..2b756f3c37 100644 --- a/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts +++ b/src/clients/kafkaRest/models/AlterMirrorStatusResponseDataList.ts @@ -5,95 +5,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { AlterMirrorStatusResponseData } from './AlterMirrorStatusResponseData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { AlterMirrorStatusResponseData } from "./AlterMirrorStatusResponseData"; import { - AlterMirrorStatusResponseDataFromJSON, - AlterMirrorStatusResponseDataFromJSONTyped, - AlterMirrorStatusResponseDataToJSON, - AlterMirrorStatusResponseDataToJSONTyped, -} from './AlterMirrorStatusResponseData'; + AlterMirrorStatusResponseDataFromJSON, + AlterMirrorStatusResponseDataFromJSONTyped, + AlterMirrorStatusResponseDataToJSON, + AlterMirrorStatusResponseDataToJSONTyped, +} from "./AlterMirrorStatusResponseData"; /** - * + * * @export * @interface AlterMirrorStatusResponseDataList */ export interface AlterMirrorStatusResponseDataList { - /** - * - * @type {string} - * @memberof AlterMirrorStatusResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof AlterMirrorStatusResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof AlterMirrorStatusResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof AlterMirrorStatusResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof AlterMirrorStatusResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof AlterMirrorStatusResponseDataList + */ + data: Array; } /** * Check if a given object implements the AlterMirrorStatusResponseDataList interface. */ -export function instanceOfAlterMirrorStatusResponseDataList(value: object): value is AlterMirrorStatusResponseDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfAlterMirrorStatusResponseDataList( + value: object, +): value is AlterMirrorStatusResponseDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function AlterMirrorStatusResponseDataListFromJSON(json: any): AlterMirrorStatusResponseDataList { - return AlterMirrorStatusResponseDataListFromJSONTyped(json, false); +export function AlterMirrorStatusResponseDataListFromJSON( + json: any, +): AlterMirrorStatusResponseDataList { + return AlterMirrorStatusResponseDataListFromJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterMirrorStatusResponseDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(AlterMirrorStatusResponseDataFromJSON)), - }; +export function AlterMirrorStatusResponseDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterMirrorStatusResponseDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(AlterMirrorStatusResponseDataFromJSON), + }; } -export function AlterMirrorStatusResponseDataListToJSON(json: any): AlterMirrorStatusResponseDataList { - return AlterMirrorStatusResponseDataListToJSONTyped(json, false); +export function AlterMirrorStatusResponseDataListToJSON( + json: any, +): AlterMirrorStatusResponseDataList { + return AlterMirrorStatusResponseDataListToJSONTyped(json, false); } -export function AlterMirrorStatusResponseDataListToJSONTyped(value?: AlterMirrorStatusResponseDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterMirrorStatusResponseDataListToJSONTyped( + value?: AlterMirrorStatusResponseDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(AlterMirrorStatusResponseDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(AlterMirrorStatusResponseDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts b/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts index 1518cd126e..ad44270ab8 100644 --- a/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts +++ b/src/clients/kafkaRest/models/AlterMirrorsRequestData.ts @@ -5,69 +5,73 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface AlterMirrorsRequestData */ export interface AlterMirrorsRequestData { - /** - * The mirror topics specified as a list of topic names. - * @type {Array} - * @memberof AlterMirrorsRequestData - */ - mirror_topic_names?: Array; - /** - * The mirror topics specified as a pattern. - * @type {string} - * @memberof AlterMirrorsRequestData - */ - mirror_topic_name_pattern?: string; + /** + * The mirror topics specified as a list of topic names. + * @type {Array} + * @memberof AlterMirrorsRequestData + */ + mirror_topic_names?: Array; + /** + * The mirror topics specified as a pattern. + * @type {string} + * @memberof AlterMirrorsRequestData + */ + mirror_topic_name_pattern?: string; } /** * Check if a given object implements the AlterMirrorsRequestData interface. */ export function instanceOfAlterMirrorsRequestData(value: object): value is AlterMirrorsRequestData { - return true; + return true; } export function AlterMirrorsRequestDataFromJSON(json: any): AlterMirrorsRequestData { - return AlterMirrorsRequestDataFromJSONTyped(json, false); + return AlterMirrorsRequestDataFromJSONTyped(json, false); } -export function AlterMirrorsRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlterMirrorsRequestData { - if (json == null) { - return json; - } - return { - - 'mirror_topic_names': json['mirror_topic_names'] == null ? undefined : json['mirror_topic_names'], - 'mirror_topic_name_pattern': json['mirror_topic_name_pattern'] == null ? undefined : json['mirror_topic_name_pattern'], - }; +export function AlterMirrorsRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AlterMirrorsRequestData { + if (json == null) { + return json; + } + return { + mirror_topic_names: json["mirror_topic_names"] == null ? undefined : json["mirror_topic_names"], + mirror_topic_name_pattern: + json["mirror_topic_name_pattern"] == null ? undefined : json["mirror_topic_name_pattern"], + }; } export function AlterMirrorsRequestDataToJSON(json: any): AlterMirrorsRequestData { - return AlterMirrorsRequestDataToJSONTyped(json, false); + return AlterMirrorsRequestDataToJSONTyped(json, false); } -export function AlterMirrorsRequestDataToJSONTyped(value?: AlterMirrorsRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AlterMirrorsRequestDataToJSONTyped( + value?: AlterMirrorsRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'mirror_topic_names': value['mirror_topic_names'], - 'mirror_topic_name_pattern': value['mirror_topic_name_pattern'], - }; + return { + mirror_topic_names: value["mirror_topic_names"], + mirror_topic_name_pattern: value["mirror_topic_name_pattern"], + }; } - diff --git a/src/clients/kafkaRest/models/AnyUnevenLoadData.ts b/src/clients/kafkaRest/models/AnyUnevenLoadData.ts index 014a2d1fd9..872a842873 100644 --- a/src/clients/kafkaRest/models/AnyUnevenLoadData.ts +++ b/src/clients/kafkaRest/models/AnyUnevenLoadData.ts @@ -5,154 +5,158 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface AnyUnevenLoadData */ export interface AnyUnevenLoadData { - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof AnyUnevenLoadData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - status: string; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - previous_status: string; - /** - * The date and time at which this task was created. - * @type {Date} - * @memberof AnyUnevenLoadData - */ - readonly status_updated_at: Date; - /** - * The date and time at which this task was created. - * @type {Date} - * @memberof AnyUnevenLoadData - */ - readonly previous_status_updated_at: Date; - /** - * - * @type {number} - * @memberof AnyUnevenLoadData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof AnyUnevenLoadData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof AnyUnevenLoadData - */ - broker_tasks: Relationship; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof AnyUnevenLoadData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + status: string; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + previous_status: string; + /** + * The date and time at which this task was created. + * @type {Date} + * @memberof AnyUnevenLoadData + */ + readonly status_updated_at: Date; + /** + * The date and time at which this task was created. + * @type {Date} + * @memberof AnyUnevenLoadData + */ + readonly previous_status_updated_at: Date; + /** + * + * @type {number} + * @memberof AnyUnevenLoadData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof AnyUnevenLoadData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof AnyUnevenLoadData + */ + broker_tasks: Relationship; } /** * Check if a given object implements the AnyUnevenLoadData interface. */ export function instanceOfAnyUnevenLoadData(value: object): value is AnyUnevenLoadData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - if (!('previous_status' in value) || value['previous_status'] === undefined) return false; - if (!('status_updated_at' in value) || value['status_updated_at'] === undefined) return false; - if (!('previous_status_updated_at' in value) || value['previous_status_updated_at'] === undefined) return false; - if (!('broker_tasks' in value) || value['broker_tasks'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + if (!("previous_status" in value) || value["previous_status"] === undefined) return false; + if (!("status_updated_at" in value) || value["status_updated_at"] === undefined) return false; + if (!("previous_status_updated_at" in value) || value["previous_status_updated_at"] === undefined) + return false; + if (!("broker_tasks" in value) || value["broker_tasks"] === undefined) return false; + return true; } export function AnyUnevenLoadDataFromJSON(json: any): AnyUnevenLoadData { - return AnyUnevenLoadDataFromJSONTyped(json, false); + return AnyUnevenLoadDataFromJSONTyped(json, false); } -export function AnyUnevenLoadDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnyUnevenLoadData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'status': json['status'], - 'previous_status': json['previous_status'], - 'status_updated_at': (new Date(json['status_updated_at'])), - 'previous_status_updated_at': (new Date(json['previous_status_updated_at'])), - 'error_code': json['error_code'] == null ? undefined : json['error_code'], - 'error_message': json['error_message'] == null ? undefined : json['error_message'], - 'broker_tasks': RelationshipFromJSON(json['broker_tasks']), - }; +export function AnyUnevenLoadDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AnyUnevenLoadData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + status: json["status"], + previous_status: json["previous_status"], + status_updated_at: new Date(json["status_updated_at"]), + previous_status_updated_at: new Date(json["previous_status_updated_at"]), + error_code: json["error_code"] == null ? undefined : json["error_code"], + error_message: json["error_message"] == null ? undefined : json["error_message"], + broker_tasks: RelationshipFromJSON(json["broker_tasks"]), + }; } export function AnyUnevenLoadDataToJSON(json: any): AnyUnevenLoadData { - return AnyUnevenLoadDataToJSONTyped(json, false); + return AnyUnevenLoadDataToJSONTyped(json, false); } -export function AnyUnevenLoadDataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AnyUnevenLoadDataToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'status': value['status'], - 'previous_status': value['previous_status'], - 'error_code': value['error_code'], - 'error_message': value['error_message'], - 'broker_tasks': RelationshipToJSON(value['broker_tasks']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + status: value["status"], + previous_status: value["previous_status"], + error_code: value["error_code"], + error_message: value["error_message"], + broker_tasks: RelationshipToJSON(value["broker_tasks"]), + }; } - diff --git a/src/clients/kafkaRest/models/BalancerStatusData.ts b/src/clients/kafkaRest/models/BalancerStatusData.ts index 9e5ea02158..de2efca8e3 100644 --- a/src/clients/kafkaRest/models/BalancerStatusData.ts +++ b/src/clients/kafkaRest/models/BalancerStatusData.ts @@ -5,138 +5,141 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface BalancerStatusData */ export interface BalancerStatusData { - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BalancerStatusData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - status: string; - /** - * - * @type {number} - * @memberof BalancerStatusData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof BalancerStatusData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof BalancerStatusData - */ - any_uneven_load: Relationship; - /** - * - * @type {Relationship} - * @memberof BalancerStatusData - */ - broker_tasks: Relationship; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BalancerStatusData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + status: string; + /** + * + * @type {number} + * @memberof BalancerStatusData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof BalancerStatusData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof BalancerStatusData + */ + any_uneven_load: Relationship; + /** + * + * @type {Relationship} + * @memberof BalancerStatusData + */ + broker_tasks: Relationship; } /** * Check if a given object implements the BalancerStatusData interface. */ export function instanceOfBalancerStatusData(value: object): value is BalancerStatusData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - if (!('any_uneven_load' in value) || value['any_uneven_load'] === undefined) return false; - if (!('broker_tasks' in value) || value['broker_tasks'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + if (!("any_uneven_load" in value) || value["any_uneven_load"] === undefined) return false; + if (!("broker_tasks" in value) || value["broker_tasks"] === undefined) return false; + return true; } export function BalancerStatusDataFromJSON(json: any): BalancerStatusData { - return BalancerStatusDataFromJSONTyped(json, false); + return BalancerStatusDataFromJSONTyped(json, false); } -export function BalancerStatusDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BalancerStatusData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'status': json['status'], - 'error_code': json['error_code'] == null ? undefined : json['error_code'], - 'error_message': json['error_message'] == null ? undefined : json['error_message'], - 'any_uneven_load': RelationshipFromJSON(json['any_uneven_load']), - 'broker_tasks': RelationshipFromJSON(json['broker_tasks']), - }; +export function BalancerStatusDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BalancerStatusData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + status: json["status"], + error_code: json["error_code"] == null ? undefined : json["error_code"], + error_message: json["error_message"] == null ? undefined : json["error_message"], + any_uneven_load: RelationshipFromJSON(json["any_uneven_load"]), + broker_tasks: RelationshipFromJSON(json["broker_tasks"]), + }; } export function BalancerStatusDataToJSON(json: any): BalancerStatusData { - return BalancerStatusDataToJSONTyped(json, false); + return BalancerStatusDataToJSONTyped(json, false); } -export function BalancerStatusDataToJSONTyped(value?: BalancerStatusData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BalancerStatusDataToJSONTyped( + value?: BalancerStatusData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'status': value['status'], - 'error_code': value['error_code'], - 'error_message': value['error_message'], - 'any_uneven_load': RelationshipToJSON(value['any_uneven_load']), - 'broker_tasks': RelationshipToJSON(value['broker_tasks']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + status: value["status"], + error_code: value["error_code"], + error_message: value["error_message"], + any_uneven_load: RelationshipToJSON(value["any_uneven_load"]), + broker_tasks: RelationshipToJSON(value["broker_tasks"]), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerConfigData.ts b/src/clients/kafkaRest/models/BrokerConfigData.ts index 6b38686498..5a5343464e 100644 --- a/src/clients/kafkaRest/models/BrokerConfigData.ts +++ b/src/clients/kafkaRest/models/BrokerConfigData.ts @@ -5,166 +5,169 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigSynonymData } from './ConfigSynonymData'; +import { mapValues } from "../runtime"; +import type { ConfigSynonymData } from "./ConfigSynonymData"; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from './ConfigSynonymData'; -import type { ResourceMetadata } from './ResourceMetadata'; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from "./ConfigSynonymData"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface BrokerConfigData */ export interface BrokerConfigData { - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof BrokerConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof BrokerConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof BrokerConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof BrokerConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof BrokerConfigData - */ - synonyms: Array; - /** - * - * @type {number} - * @memberof BrokerConfigData - */ - broker_id: number; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof BrokerConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof BrokerConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof BrokerConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof BrokerConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof BrokerConfigData + */ + synonyms: Array; + /** + * + * @type {number} + * @memberof BrokerConfigData + */ + broker_id: number; } /** * Check if a given object implements the BrokerConfigData interface. */ export function instanceOfBrokerConfigData(value: object): value is BrokerConfigData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('is_default' in value) || value['is_default'] === undefined) return false; - if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; - if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; - if (!('source' in value) || value['source'] === undefined) return false; - if (!('synonyms' in value) || value['synonyms'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("is_default" in value) || value["is_default"] === undefined) return false; + if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; + if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; + if (!("source" in value) || value["source"] === undefined) return false; + if (!("synonyms" in value) || value["synonyms"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + return true; } export function BrokerConfigDataFromJSON(json: any): BrokerConfigData { - return BrokerConfigDataFromJSONTyped(json, false); + return BrokerConfigDataFromJSONTyped(json, false); } -export function BrokerConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerConfigData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - 'is_default': json['is_default'], - 'is_read_only': json['is_read_only'], - 'is_sensitive': json['is_sensitive'], - 'source': json['source'], - 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), - 'broker_id': json['broker_id'], - }; +export function BrokerConfigDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerConfigData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + is_default: json["is_default"], + is_read_only: json["is_read_only"], + is_sensitive: json["is_sensitive"], + source: json["source"], + synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), + broker_id: json["broker_id"], + }; } export function BrokerConfigDataToJSON(json: any): BrokerConfigData { - return BrokerConfigDataToJSONTyped(json, false); + return BrokerConfigDataToJSONTyped(json, false); } -export function BrokerConfigDataToJSONTyped(value?: BrokerConfigData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerConfigDataToJSONTyped( + value?: BrokerConfigData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'name': value['name'], - 'value': value['value'], - 'is_default': value['is_default'], - 'is_read_only': value['is_read_only'], - 'is_sensitive': value['is_sensitive'], - 'source': value['source'], - 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), - 'broker_id': value['broker_id'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + name: value["name"], + value: value["value"], + is_default: value["is_default"], + is_read_only: value["is_read_only"], + is_sensitive: value["is_sensitive"], + source: value["source"], + synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), + broker_id: value["broker_id"], + }; } - diff --git a/src/clients/kafkaRest/models/BrokerConfigDataList.ts b/src/clients/kafkaRest/models/BrokerConfigDataList.ts index 51070eade9..a8f8062fcc 100644 --- a/src/clients/kafkaRest/models/BrokerConfigDataList.ts +++ b/src/clients/kafkaRest/models/BrokerConfigDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { BrokerConfigData } from './BrokerConfigData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { BrokerConfigData } from "./BrokerConfigData"; import { - BrokerConfigDataFromJSON, - BrokerConfigDataFromJSONTyped, - BrokerConfigDataToJSON, - BrokerConfigDataToJSONTyped, -} from './BrokerConfigData'; + BrokerConfigDataFromJSON, + BrokerConfigDataFromJSONTyped, + BrokerConfigDataToJSON, + BrokerConfigDataToJSONTyped, +} from "./BrokerConfigData"; /** - * + * * @export * @interface BrokerConfigDataList */ export interface BrokerConfigDataList { - /** - * - * @type {string} - * @memberof BrokerConfigDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerConfigDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerConfigDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerConfigDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerConfigDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerConfigDataList + */ + data: Array; } /** * Check if a given object implements the BrokerConfigDataList interface. */ export function instanceOfBrokerConfigDataList(value: object): value is BrokerConfigDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function BrokerConfigDataListFromJSON(json: any): BrokerConfigDataList { - return BrokerConfigDataListFromJSONTyped(json, false); + return BrokerConfigDataListFromJSONTyped(json, false); } -export function BrokerConfigDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerConfigDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(BrokerConfigDataFromJSON)), - }; +export function BrokerConfigDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerConfigDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(BrokerConfigDataFromJSON), + }; } export function BrokerConfigDataListToJSON(json: any): BrokerConfigDataList { - return BrokerConfigDataListToJSONTyped(json, false); + return BrokerConfigDataListToJSONTyped(json, false); } -export function BrokerConfigDataListToJSONTyped(value?: BrokerConfigDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerConfigDataListToJSONTyped( + value?: BrokerConfigDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(BrokerConfigDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(BrokerConfigDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerData.ts b/src/clients/kafkaRest/models/BrokerData.ts index 70a8763a13..4af532a72b 100644 --- a/src/clients/kafkaRest/models/BrokerData.ts +++ b/src/clients/kafkaRest/models/BrokerData.ts @@ -5,146 +5,146 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface BrokerData */ export interface BrokerData { - /** - * - * @type {string} - * @memberof BrokerData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof BrokerData - */ - host?: string | null; - /** - * - * @type {number} - * @memberof BrokerData - */ - port?: number | null; - /** - * - * @type {string} - * @memberof BrokerData - */ - rack?: string | null; - /** - * - * @type {Relationship} - * @memberof BrokerData - */ - configs: Relationship; - /** - * - * @type {Relationship} - * @memberof BrokerData - */ - partition_replicas: Relationship; + /** + * + * @type {string} + * @memberof BrokerData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof BrokerData + */ + host?: string | null; + /** + * + * @type {number} + * @memberof BrokerData + */ + port?: number | null; + /** + * + * @type {string} + * @memberof BrokerData + */ + rack?: string | null; + /** + * + * @type {Relationship} + * @memberof BrokerData + */ + configs: Relationship; + /** + * + * @type {Relationship} + * @memberof BrokerData + */ + partition_replicas: Relationship; } /** * Check if a given object implements the BrokerData interface. */ export function instanceOfBrokerData(value: object): value is BrokerData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('configs' in value) || value['configs'] === undefined) return false; - if (!('partition_replicas' in value) || value['partition_replicas'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("configs" in value) || value["configs"] === undefined) return false; + if (!("partition_replicas" in value) || value["partition_replicas"] === undefined) return false; + return true; } export function BrokerDataFromJSON(json: any): BrokerData { - return BrokerDataFromJSONTyped(json, false); + return BrokerDataFromJSONTyped(json, false); } export function BrokerDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'broker_id': json['broker_id'], - 'host': json['host'] == null ? undefined : json['host'], - 'port': json['port'] == null ? undefined : json['port'], - 'rack': json['rack'] == null ? undefined : json['rack'], - 'configs': RelationshipFromJSON(json['configs']), - 'partition_replicas': RelationshipFromJSON(json['partition_replicas']), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + broker_id: json["broker_id"], + host: json["host"] == null ? undefined : json["host"], + port: json["port"] == null ? undefined : json["port"], + rack: json["rack"] == null ? undefined : json["rack"], + configs: RelationshipFromJSON(json["configs"]), + partition_replicas: RelationshipFromJSON(json["partition_replicas"]), + }; } export function BrokerDataToJSON(json: any): BrokerData { - return BrokerDataToJSONTyped(json, false); + return BrokerDataToJSONTyped(json, false); } -export function BrokerDataToJSONTyped(value?: BrokerData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerDataToJSONTyped( + value?: BrokerData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'broker_id': value['broker_id'], - 'host': value['host'], - 'port': value['port'], - 'rack': value['rack'], - 'configs': RelationshipToJSON(value['configs']), - 'partition_replicas': RelationshipToJSON(value['partition_replicas']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + broker_id: value["broker_id"], + host: value["host"], + port: value["port"], + rack: value["rack"], + configs: RelationshipToJSON(value["configs"]), + partition_replicas: RelationshipToJSON(value["partition_replicas"]), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerDataList.ts b/src/clients/kafkaRest/models/BrokerDataList.ts index 1f7096d78f..9d266acc66 100644 --- a/src/clients/kafkaRest/models/BrokerDataList.ts +++ b/src/clients/kafkaRest/models/BrokerDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { BrokerData } from './BrokerData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { BrokerData } from "./BrokerData"; import { - BrokerDataFromJSON, - BrokerDataFromJSONTyped, - BrokerDataToJSON, - BrokerDataToJSONTyped, -} from './BrokerData'; + BrokerDataFromJSON, + BrokerDataFromJSONTyped, + BrokerDataToJSON, + BrokerDataToJSONTyped, +} from "./BrokerData"; /** - * + * * @export * @interface BrokerDataList */ export interface BrokerDataList { - /** - * - * @type {string} - * @memberof BrokerDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerDataList + */ + data: Array; } /** * Check if a given object implements the BrokerDataList interface. */ export function instanceOfBrokerDataList(value: object): value is BrokerDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function BrokerDataListFromJSON(json: any): BrokerDataList { - return BrokerDataListFromJSONTyped(json, false); + return BrokerDataListFromJSONTyped(json, false); } -export function BrokerDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(BrokerDataFromJSON)), - }; +export function BrokerDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(BrokerDataFromJSON), + }; } export function BrokerDataListToJSON(json: any): BrokerDataList { - return BrokerDataListToJSONTyped(json, false); + return BrokerDataListToJSONTyped(json, false); } -export function BrokerDataListToJSONTyped(value?: BrokerDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerDataListToJSONTyped( + value?: BrokerDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(BrokerDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(BrokerDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerRemovalData.ts b/src/clients/kafkaRest/models/BrokerRemovalData.ts index fe99d1910b..349d39b306 100644 --- a/src/clients/kafkaRest/models/BrokerRemovalData.ts +++ b/src/clients/kafkaRest/models/BrokerRemovalData.ts @@ -5,122 +5,125 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface BrokerRemovalData */ export interface BrokerRemovalData { - /** - * - * @type {string} - * @memberof BrokerRemovalData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerRemovalData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerRemovalData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerRemovalData - */ - broker_id: number; - /** - * - * @type {Relationship} - * @memberof BrokerRemovalData - */ - broker_task: Relationship; - /** - * - * @type {Relationship} - * @memberof BrokerRemovalData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof BrokerRemovalData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerRemovalData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerRemovalData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerRemovalData + */ + broker_id: number; + /** + * + * @type {Relationship} + * @memberof BrokerRemovalData + */ + broker_task: Relationship; + /** + * + * @type {Relationship} + * @memberof BrokerRemovalData + */ + broker: Relationship; } /** * Check if a given object implements the BrokerRemovalData interface. */ export function instanceOfBrokerRemovalData(value: object): value is BrokerRemovalData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('broker_task' in value) || value['broker_task'] === undefined) return false; - if (!('broker' in value) || value['broker'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("broker_task" in value) || value["broker_task"] === undefined) return false; + if (!("broker" in value) || value["broker"] === undefined) return false; + return true; } export function BrokerRemovalDataFromJSON(json: any): BrokerRemovalData { - return BrokerRemovalDataFromJSONTyped(json, false); + return BrokerRemovalDataFromJSONTyped(json, false); } -export function BrokerRemovalDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerRemovalData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'broker_id': json['broker_id'], - 'broker_task': RelationshipFromJSON(json['broker_task']), - 'broker': RelationshipFromJSON(json['broker']), - }; +export function BrokerRemovalDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerRemovalData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + broker_id: json["broker_id"], + broker_task: RelationshipFromJSON(json["broker_task"]), + broker: RelationshipFromJSON(json["broker"]), + }; } export function BrokerRemovalDataToJSON(json: any): BrokerRemovalData { - return BrokerRemovalDataToJSONTyped(json, false); + return BrokerRemovalDataToJSONTyped(json, false); } -export function BrokerRemovalDataToJSONTyped(value?: BrokerRemovalData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerRemovalDataToJSONTyped( + value?: BrokerRemovalData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'broker_id': value['broker_id'], - 'broker_task': RelationshipToJSON(value['broker_task']), - 'broker': RelationshipToJSON(value['broker']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + broker_id: value["broker_id"], + broker_task: RelationshipToJSON(value["broker_task"]), + broker: RelationshipToJSON(value["broker"]), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerRemovalDataList.ts b/src/clients/kafkaRest/models/BrokerRemovalDataList.ts index 4f6f197a50..311ca9d0b0 100644 --- a/src/clients/kafkaRest/models/BrokerRemovalDataList.ts +++ b/src/clients/kafkaRest/models/BrokerRemovalDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { BrokerRemovalData } from './BrokerRemovalData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { BrokerRemovalData } from "./BrokerRemovalData"; import { - BrokerRemovalDataFromJSON, - BrokerRemovalDataFromJSONTyped, - BrokerRemovalDataToJSON, - BrokerRemovalDataToJSONTyped, -} from './BrokerRemovalData'; + BrokerRemovalDataFromJSON, + BrokerRemovalDataFromJSONTyped, + BrokerRemovalDataToJSON, + BrokerRemovalDataToJSONTyped, +} from "./BrokerRemovalData"; /** - * + * * @export * @interface BrokerRemovalDataList */ export interface BrokerRemovalDataList { - /** - * - * @type {string} - * @memberof BrokerRemovalDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerRemovalDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerRemovalDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerRemovalDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerRemovalDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerRemovalDataList + */ + data: Array; } /** * Check if a given object implements the BrokerRemovalDataList interface. */ export function instanceOfBrokerRemovalDataList(value: object): value is BrokerRemovalDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function BrokerRemovalDataListFromJSON(json: any): BrokerRemovalDataList { - return BrokerRemovalDataListFromJSONTyped(json, false); + return BrokerRemovalDataListFromJSONTyped(json, false); } -export function BrokerRemovalDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerRemovalDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(BrokerRemovalDataFromJSON)), - }; +export function BrokerRemovalDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerRemovalDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(BrokerRemovalDataFromJSON), + }; } export function BrokerRemovalDataListToJSON(json: any): BrokerRemovalDataList { - return BrokerRemovalDataListToJSONTyped(json, false); + return BrokerRemovalDataListToJSONTyped(json, false); } -export function BrokerRemovalDataListToJSONTyped(value?: BrokerRemovalDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerRemovalDataListToJSONTyped( + value?: BrokerRemovalDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(BrokerRemovalDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(BrokerRemovalDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts index 24c9af9ecf..8fdbc6bc3e 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionBatchRequestData.ts @@ -5,70 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { BrokerReplicaExclusionRequestData } from './BrokerReplicaExclusionRequestData'; +import { mapValues } from "../runtime"; +import type { BrokerReplicaExclusionRequestData } from "./BrokerReplicaExclusionRequestData"; import { - BrokerReplicaExclusionRequestDataFromJSON, - BrokerReplicaExclusionRequestDataFromJSONTyped, - BrokerReplicaExclusionRequestDataToJSON, - BrokerReplicaExclusionRequestDataToJSONTyped, -} from './BrokerReplicaExclusionRequestData'; + BrokerReplicaExclusionRequestDataFromJSON, + BrokerReplicaExclusionRequestDataFromJSONTyped, + BrokerReplicaExclusionRequestDataToJSON, + BrokerReplicaExclusionRequestDataToJSONTyped, +} from "./BrokerReplicaExclusionRequestData"; /** - * + * * @export * @interface BrokerReplicaExclusionBatchRequestData */ export interface BrokerReplicaExclusionBatchRequestData { - /** - * - * @type {Array} - * @memberof BrokerReplicaExclusionBatchRequestData - */ - data: Array; + /** + * + * @type {Array} + * @memberof BrokerReplicaExclusionBatchRequestData + */ + data: Array; } /** * Check if a given object implements the BrokerReplicaExclusionBatchRequestData interface. */ -export function instanceOfBrokerReplicaExclusionBatchRequestData(value: object): value is BrokerReplicaExclusionBatchRequestData { - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionBatchRequestData( + value: object, +): value is BrokerReplicaExclusionBatchRequestData { + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function BrokerReplicaExclusionBatchRequestDataFromJSON(json: any): BrokerReplicaExclusionBatchRequestData { - return BrokerReplicaExclusionBatchRequestDataFromJSONTyped(json, false); +export function BrokerReplicaExclusionBatchRequestDataFromJSON( + json: any, +): BrokerReplicaExclusionBatchRequestData { + return BrokerReplicaExclusionBatchRequestDataFromJSONTyped(json, false); } -export function BrokerReplicaExclusionBatchRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionBatchRequestData { - if (json == null) { - return json; - } - return { - - 'data': ((json['data'] as Array).map(BrokerReplicaExclusionRequestDataFromJSON)), - }; +export function BrokerReplicaExclusionBatchRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerReplicaExclusionBatchRequestData { + if (json == null) { + return json; + } + return { + data: (json["data"] as Array).map(BrokerReplicaExclusionRequestDataFromJSON), + }; } -export function BrokerReplicaExclusionBatchRequestDataToJSON(json: any): BrokerReplicaExclusionBatchRequestData { - return BrokerReplicaExclusionBatchRequestDataToJSONTyped(json, false); +export function BrokerReplicaExclusionBatchRequestDataToJSON( + json: any, +): BrokerReplicaExclusionBatchRequestData { + return BrokerReplicaExclusionBatchRequestDataToJSONTyped(json, false); } -export function BrokerReplicaExclusionBatchRequestDataToJSONTyped(value?: BrokerReplicaExclusionBatchRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionBatchRequestDataToJSONTyped( + value?: BrokerReplicaExclusionBatchRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'data': ((value['data'] as Array).map(BrokerReplicaExclusionRequestDataToJSON)), - }; + return { + data: (value["data"] as Array).map(BrokerReplicaExclusionRequestDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts index b00b753267..302c4af20e 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionData.ts @@ -5,122 +5,127 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface BrokerReplicaExclusionData */ export interface BrokerReplicaExclusionData { - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerReplicaExclusionData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerReplicaExclusionData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionData - */ - reason: string; - /** - * - * @type {Relationship} - * @memberof BrokerReplicaExclusionData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerReplicaExclusionData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerReplicaExclusionData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionData + */ + reason: string; + /** + * + * @type {Relationship} + * @memberof BrokerReplicaExclusionData + */ + broker: Relationship; } /** * Check if a given object implements the BrokerReplicaExclusionData interface. */ -export function instanceOfBrokerReplicaExclusionData(value: object): value is BrokerReplicaExclusionData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('reason' in value) || value['reason'] === undefined) return false; - if (!('broker' in value) || value['broker'] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionData( + value: object, +): value is BrokerReplicaExclusionData { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + if (!("broker" in value) || value["broker"] === undefined) return false; + return true; } export function BrokerReplicaExclusionDataFromJSON(json: any): BrokerReplicaExclusionData { - return BrokerReplicaExclusionDataFromJSONTyped(json, false); + return BrokerReplicaExclusionDataFromJSONTyped(json, false); } -export function BrokerReplicaExclusionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'broker_id': json['broker_id'], - 'reason': json['reason'], - 'broker': RelationshipFromJSON(json['broker']), - }; +export function BrokerReplicaExclusionDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerReplicaExclusionData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + broker_id: json["broker_id"], + reason: json["reason"], + broker: RelationshipFromJSON(json["broker"]), + }; } export function BrokerReplicaExclusionDataToJSON(json: any): BrokerReplicaExclusionData { - return BrokerReplicaExclusionDataToJSONTyped(json, false); + return BrokerReplicaExclusionDataToJSONTyped(json, false); } -export function BrokerReplicaExclusionDataToJSONTyped(value?: BrokerReplicaExclusionData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionDataToJSONTyped( + value?: BrokerReplicaExclusionData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'broker_id': value['broker_id'], - 'reason': value['reason'], - 'broker': RelationshipToJSON(value['broker']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + broker_id: value["broker_id"], + reason: value["reason"], + broker: RelationshipToJSON(value["broker"]), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts index caa21a8140..bc052d43a2 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionDataList.ts @@ -5,95 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { BrokerReplicaExclusionData } from './BrokerReplicaExclusionData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { BrokerReplicaExclusionData } from "./BrokerReplicaExclusionData"; import { - BrokerReplicaExclusionDataFromJSON, - BrokerReplicaExclusionDataFromJSONTyped, - BrokerReplicaExclusionDataToJSON, - BrokerReplicaExclusionDataToJSONTyped, -} from './BrokerReplicaExclusionData'; + BrokerReplicaExclusionDataFromJSON, + BrokerReplicaExclusionDataFromJSONTyped, + BrokerReplicaExclusionDataToJSON, + BrokerReplicaExclusionDataToJSONTyped, +} from "./BrokerReplicaExclusionData"; /** - * + * * @export * @interface BrokerReplicaExclusionDataList */ export interface BrokerReplicaExclusionDataList { - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerReplicaExclusionDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerReplicaExclusionDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerReplicaExclusionDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerReplicaExclusionDataList + */ + data: Array; } /** * Check if a given object implements the BrokerReplicaExclusionDataList interface. */ -export function instanceOfBrokerReplicaExclusionDataList(value: object): value is BrokerReplicaExclusionDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionDataList( + value: object, +): value is BrokerReplicaExclusionDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function BrokerReplicaExclusionDataListFromJSON(json: any): BrokerReplicaExclusionDataList { - return BrokerReplicaExclusionDataListFromJSONTyped(json, false); + return BrokerReplicaExclusionDataListFromJSONTyped(json, false); } -export function BrokerReplicaExclusionDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(BrokerReplicaExclusionDataFromJSON)), - }; +export function BrokerReplicaExclusionDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerReplicaExclusionDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(BrokerReplicaExclusionDataFromJSON), + }; } export function BrokerReplicaExclusionDataListToJSON(json: any): BrokerReplicaExclusionDataList { - return BrokerReplicaExclusionDataListToJSONTyped(json, false); + return BrokerReplicaExclusionDataListToJSONTyped(json, false); } -export function BrokerReplicaExclusionDataListToJSONTyped(value?: BrokerReplicaExclusionDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionDataListToJSONTyped( + value?: BrokerReplicaExclusionDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(BrokerReplicaExclusionDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(BrokerReplicaExclusionDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts b/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts index b7bdfae077..6047d1ff6e 100644 --- a/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts +++ b/src/clients/kafkaRest/models/BrokerReplicaExclusionRequestData.ts @@ -5,71 +5,80 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface BrokerReplicaExclusionRequestData */ export interface BrokerReplicaExclusionRequestData { - /** - * - * @type {number} - * @memberof BrokerReplicaExclusionRequestData - */ - broker_id: number; - /** - * - * @type {string} - * @memberof BrokerReplicaExclusionRequestData - */ - reason: string; + /** + * + * @type {number} + * @memberof BrokerReplicaExclusionRequestData + */ + broker_id: number; + /** + * + * @type {string} + * @memberof BrokerReplicaExclusionRequestData + */ + reason: string; } /** * Check if a given object implements the BrokerReplicaExclusionRequestData interface. */ -export function instanceOfBrokerReplicaExclusionRequestData(value: object): value is BrokerReplicaExclusionRequestData { - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('reason' in value) || value['reason'] === undefined) return false; - return true; +export function instanceOfBrokerReplicaExclusionRequestData( + value: object, +): value is BrokerReplicaExclusionRequestData { + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + return true; } -export function BrokerReplicaExclusionRequestDataFromJSON(json: any): BrokerReplicaExclusionRequestData { - return BrokerReplicaExclusionRequestDataFromJSONTyped(json, false); +export function BrokerReplicaExclusionRequestDataFromJSON( + json: any, +): BrokerReplicaExclusionRequestData { + return BrokerReplicaExclusionRequestDataFromJSONTyped(json, false); } -export function BrokerReplicaExclusionRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerReplicaExclusionRequestData { - if (json == null) { - return json; - } - return { - - 'broker_id': json['broker_id'], - 'reason': json['reason'], - }; +export function BrokerReplicaExclusionRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerReplicaExclusionRequestData { + if (json == null) { + return json; + } + return { + broker_id: json["broker_id"], + reason: json["reason"], + }; } -export function BrokerReplicaExclusionRequestDataToJSON(json: any): BrokerReplicaExclusionRequestData { - return BrokerReplicaExclusionRequestDataToJSONTyped(json, false); +export function BrokerReplicaExclusionRequestDataToJSON( + json: any, +): BrokerReplicaExclusionRequestData { + return BrokerReplicaExclusionRequestDataToJSONTyped(json, false); } -export function BrokerReplicaExclusionRequestDataToJSONTyped(value?: BrokerReplicaExclusionRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerReplicaExclusionRequestDataToJSONTyped( + value?: BrokerReplicaExclusionRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'broker_id': value['broker_id'], - 'reason': value['reason'], - }; + return { + broker_id: value["broker_id"], + reason: value["reason"], + }; } - diff --git a/src/clients/kafkaRest/models/BrokerTaskData.ts b/src/clients/kafkaRest/models/BrokerTaskData.ts index b62de63864..857356db3f 100644 --- a/src/clients/kafkaRest/models/BrokerTaskData.ts +++ b/src/clients/kafkaRest/models/BrokerTaskData.ts @@ -5,189 +5,190 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { BrokerTaskType } from './BrokerTaskType'; +import { mapValues } from "../runtime"; +import type { BrokerTaskType } from "./BrokerTaskType"; import { - BrokerTaskTypeFromJSON, - BrokerTaskTypeFromJSONTyped, - BrokerTaskTypeToJSON, - BrokerTaskTypeToJSONTyped, -} from './BrokerTaskType'; -import type { Relationship } from './Relationship'; + BrokerTaskTypeFromJSON, + BrokerTaskTypeFromJSONTyped, + BrokerTaskTypeToJSON, + BrokerTaskTypeToJSONTyped, +} from "./BrokerTaskType"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface BrokerTaskData */ export interface BrokerTaskData { - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof BrokerTaskData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof BrokerTaskData - */ - broker_id: number; - /** - * - * @type {BrokerTaskType} - * @memberof BrokerTaskData - */ - task_type: BrokerTaskType; - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - task_status: string; - /** - * - * @type {boolean} - * @memberof BrokerTaskData - */ - shutdown_scheduled?: boolean | null; - /** - * - * @type {{ [key: string]: string; }} - * @memberof BrokerTaskData - */ - sub_task_statuses: { [key: string]: string; }; - /** - * The date and time at which this task was created. - * @type {Date} - * @memberof BrokerTaskData - */ - readonly created_at: Date; - /** - * The date and time at which this task was last updated. - * @type {Date} - * @memberof BrokerTaskData - */ - readonly updated_at: Date; - /** - * - * @type {number} - * @memberof BrokerTaskData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof BrokerTaskData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof BrokerTaskData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof BrokerTaskData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof BrokerTaskData + */ + broker_id: number; + /** + * + * @type {BrokerTaskType} + * @memberof BrokerTaskData + */ + task_type: BrokerTaskType; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + task_status: string; + /** + * + * @type {boolean} + * @memberof BrokerTaskData + */ + shutdown_scheduled?: boolean | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof BrokerTaskData + */ + sub_task_statuses: { [key: string]: string }; + /** + * The date and time at which this task was created. + * @type {Date} + * @memberof BrokerTaskData + */ + readonly created_at: Date; + /** + * The date and time at which this task was last updated. + * @type {Date} + * @memberof BrokerTaskData + */ + readonly updated_at: Date; + /** + * + * @type {number} + * @memberof BrokerTaskData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof BrokerTaskData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof BrokerTaskData + */ + broker: Relationship; } - - /** * Check if a given object implements the BrokerTaskData interface. */ export function instanceOfBrokerTaskData(value: object): value is BrokerTaskData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('task_type' in value) || value['task_type'] === undefined) return false; - if (!('task_status' in value) || value['task_status'] === undefined) return false; - if (!('sub_task_statuses' in value) || value['sub_task_statuses'] === undefined) return false; - if (!('created_at' in value) || value['created_at'] === undefined) return false; - if (!('updated_at' in value) || value['updated_at'] === undefined) return false; - if (!('broker' in value) || value['broker'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("task_type" in value) || value["task_type"] === undefined) return false; + if (!("task_status" in value) || value["task_status"] === undefined) return false; + if (!("sub_task_statuses" in value) || value["sub_task_statuses"] === undefined) return false; + if (!("created_at" in value) || value["created_at"] === undefined) return false; + if (!("updated_at" in value) || value["updated_at"] === undefined) return false; + if (!("broker" in value) || value["broker"] === undefined) return false; + return true; } export function BrokerTaskDataFromJSON(json: any): BrokerTaskData { - return BrokerTaskDataFromJSONTyped(json, false); + return BrokerTaskDataFromJSONTyped(json, false); } -export function BrokerTaskDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerTaskData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'broker_id': json['broker_id'], - 'task_type': BrokerTaskTypeFromJSON(json['task_type']), - 'task_status': json['task_status'], - 'shutdown_scheduled': json['shutdown_scheduled'] == null ? undefined : json['shutdown_scheduled'], - 'sub_task_statuses': json['sub_task_statuses'], - 'created_at': (new Date(json['created_at'])), - 'updated_at': (new Date(json['updated_at'])), - 'error_code': json['error_code'] == null ? undefined : json['error_code'], - 'error_message': json['error_message'] == null ? undefined : json['error_message'], - 'broker': RelationshipFromJSON(json['broker']), - }; +export function BrokerTaskDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerTaskData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + broker_id: json["broker_id"], + task_type: BrokerTaskTypeFromJSON(json["task_type"]), + task_status: json["task_status"], + shutdown_scheduled: json["shutdown_scheduled"] == null ? undefined : json["shutdown_scheduled"], + sub_task_statuses: json["sub_task_statuses"], + created_at: new Date(json["created_at"]), + updated_at: new Date(json["updated_at"]), + error_code: json["error_code"] == null ? undefined : json["error_code"], + error_message: json["error_message"] == null ? undefined : json["error_message"], + broker: RelationshipFromJSON(json["broker"]), + }; } export function BrokerTaskDataToJSON(json: any): BrokerTaskData { - return BrokerTaskDataToJSONTyped(json, false); + return BrokerTaskDataToJSONTyped(json, false); } -export function BrokerTaskDataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerTaskDataToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'broker_id': value['broker_id'], - 'task_type': BrokerTaskTypeToJSON(value['task_type']), - 'task_status': value['task_status'], - 'shutdown_scheduled': value['shutdown_scheduled'], - 'sub_task_statuses': value['sub_task_statuses'], - 'error_code': value['error_code'], - 'error_message': value['error_message'], - 'broker': RelationshipToJSON(value['broker']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + broker_id: value["broker_id"], + task_type: BrokerTaskTypeToJSON(value["task_type"]), + task_status: value["task_status"], + shutdown_scheduled: value["shutdown_scheduled"], + sub_task_statuses: value["sub_task_statuses"], + error_code: value["error_code"], + error_message: value["error_message"], + broker: RelationshipToJSON(value["broker"]), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerTaskDataList.ts b/src/clients/kafkaRest/models/BrokerTaskDataList.ts index aaf2217a42..a3bf582a0a 100644 --- a/src/clients/kafkaRest/models/BrokerTaskDataList.ts +++ b/src/clients/kafkaRest/models/BrokerTaskDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { BrokerTaskData } from './BrokerTaskData'; +import { mapValues } from "../runtime"; +import type { BrokerTaskData } from "./BrokerTaskData"; import { - BrokerTaskDataFromJSON, - BrokerTaskDataFromJSONTyped, - BrokerTaskDataToJSON, - BrokerTaskDataToJSONTyped, -} from './BrokerTaskData'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; + BrokerTaskDataFromJSON, + BrokerTaskDataFromJSONTyped, + BrokerTaskDataToJSON, + BrokerTaskDataToJSONTyped, +} from "./BrokerTaskData"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; /** - * + * * @export * @interface BrokerTaskDataList */ export interface BrokerTaskDataList { - /** - * - * @type {string} - * @memberof BrokerTaskDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof BrokerTaskDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof BrokerTaskDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof BrokerTaskDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof BrokerTaskDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof BrokerTaskDataList + */ + data: Array; } /** * Check if a given object implements the BrokerTaskDataList interface. */ export function instanceOfBrokerTaskDataList(value: object): value is BrokerTaskDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function BrokerTaskDataListFromJSON(json: any): BrokerTaskDataList { - return BrokerTaskDataListFromJSONTyped(json, false); + return BrokerTaskDataListFromJSONTyped(json, false); } -export function BrokerTaskDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerTaskDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(BrokerTaskDataFromJSON)), - }; +export function BrokerTaskDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerTaskDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(BrokerTaskDataFromJSON), + }; } export function BrokerTaskDataListToJSON(json: any): BrokerTaskDataList { - return BrokerTaskDataListToJSONTyped(json, false); + return BrokerTaskDataListToJSONTyped(json, false); } -export function BrokerTaskDataListToJSONTyped(value?: BrokerTaskDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BrokerTaskDataListToJSONTyped( + value?: BrokerTaskDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(BrokerTaskDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(BrokerTaskDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/BrokerTaskType.ts b/src/clients/kafkaRest/models/BrokerTaskType.ts index 2d76cc0bc7..88b347081c 100644 --- a/src/clients/kafkaRest/models/BrokerTaskType.ts +++ b/src/clients/kafkaRest/models/BrokerTaskType.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,40 +13,44 @@ */ /** - * + * * @export * @enum {string} */ export enum BrokerTaskType { - AddBroker = 'add-broker', - RemoveBroker = 'remove-broker' + AddBroker = "add-broker", + RemoveBroker = "remove-broker", } - export function instanceOfBrokerTaskType(value: any): boolean { - for (const key in BrokerTaskType) { - if (Object.prototype.hasOwnProperty.call(BrokerTaskType, key)) { - if (BrokerTaskType[key as keyof typeof BrokerTaskType] === value) { - return true; - } - } + for (const key in BrokerTaskType) { + if (Object.prototype.hasOwnProperty.call(BrokerTaskType, key)) { + if (BrokerTaskType[key as keyof typeof BrokerTaskType] === value) { + return true; + } } - return false; + } + return false; } export function BrokerTaskTypeFromJSON(json: any): BrokerTaskType { - return BrokerTaskTypeFromJSONTyped(json, false); + return BrokerTaskTypeFromJSONTyped(json, false); } -export function BrokerTaskTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): BrokerTaskType { - return json as BrokerTaskType; +export function BrokerTaskTypeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BrokerTaskType { + return json as BrokerTaskType; } export function BrokerTaskTypeToJSON(value?: BrokerTaskType | null): any { - return value as any; + return value as any; } -export function BrokerTaskTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): BrokerTaskType { - return value as BrokerTaskType; +export function BrokerTaskTypeToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): BrokerTaskType { + return value as BrokerTaskType; } - diff --git a/src/clients/kafkaRest/models/ClusterConfigData.ts b/src/clients/kafkaRest/models/ClusterConfigData.ts index 5b6d1b0bcd..875b702db2 100644 --- a/src/clients/kafkaRest/models/ClusterConfigData.ts +++ b/src/clients/kafkaRest/models/ClusterConfigData.ts @@ -5,166 +5,169 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigSynonymData } from './ConfigSynonymData'; +import { mapValues } from "../runtime"; +import type { ConfigSynonymData } from "./ConfigSynonymData"; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from './ConfigSynonymData'; -import type { ResourceMetadata } from './ResourceMetadata'; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from "./ConfigSynonymData"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ClusterConfigData */ export interface ClusterConfigData { - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ClusterConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof ClusterConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof ClusterConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof ClusterConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof ClusterConfigData - */ - synonyms: Array; - /** - * - * @type {string} - * @memberof ClusterConfigData - */ - config_type: string; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ClusterConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof ClusterConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof ClusterConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof ClusterConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof ClusterConfigData + */ + synonyms: Array; + /** + * + * @type {string} + * @memberof ClusterConfigData + */ + config_type: string; } /** * Check if a given object implements the ClusterConfigData interface. */ export function instanceOfClusterConfigData(value: object): value is ClusterConfigData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('is_default' in value) || value['is_default'] === undefined) return false; - if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; - if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; - if (!('source' in value) || value['source'] === undefined) return false; - if (!('synonyms' in value) || value['synonyms'] === undefined) return false; - if (!('config_type' in value) || value['config_type'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("is_default" in value) || value["is_default"] === undefined) return false; + if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; + if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; + if (!("source" in value) || value["source"] === undefined) return false; + if (!("synonyms" in value) || value["synonyms"] === undefined) return false; + if (!("config_type" in value) || value["config_type"] === undefined) return false; + return true; } export function ClusterConfigDataFromJSON(json: any): ClusterConfigData { - return ClusterConfigDataFromJSONTyped(json, false); + return ClusterConfigDataFromJSONTyped(json, false); } -export function ClusterConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterConfigData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - 'is_default': json['is_default'], - 'is_read_only': json['is_read_only'], - 'is_sensitive': json['is_sensitive'], - 'source': json['source'], - 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), - 'config_type': json['config_type'], - }; +export function ClusterConfigDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterConfigData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + is_default: json["is_default"], + is_read_only: json["is_read_only"], + is_sensitive: json["is_sensitive"], + source: json["source"], + synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), + config_type: json["config_type"], + }; } export function ClusterConfigDataToJSON(json: any): ClusterConfigData { - return ClusterConfigDataToJSONTyped(json, false); + return ClusterConfigDataToJSONTyped(json, false); } -export function ClusterConfigDataToJSONTyped(value?: ClusterConfigData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterConfigDataToJSONTyped( + value?: ClusterConfigData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'name': value['name'], - 'value': value['value'], - 'is_default': value['is_default'], - 'is_read_only': value['is_read_only'], - 'is_sensitive': value['is_sensitive'], - 'source': value['source'], - 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), - 'config_type': value['config_type'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + name: value["name"], + value: value["value"], + is_default: value["is_default"], + is_read_only: value["is_read_only"], + is_sensitive: value["is_sensitive"], + source: value["source"], + synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), + config_type: value["config_type"], + }; } - diff --git a/src/clients/kafkaRest/models/ClusterConfigDataList.ts b/src/clients/kafkaRest/models/ClusterConfigDataList.ts index a72aeea1b4..c4bdac0625 100644 --- a/src/clients/kafkaRest/models/ClusterConfigDataList.ts +++ b/src/clients/kafkaRest/models/ClusterConfigDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ClusterConfigData } from './ClusterConfigData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ClusterConfigData } from "./ClusterConfigData"; import { - ClusterConfigDataFromJSON, - ClusterConfigDataFromJSONTyped, - ClusterConfigDataToJSON, - ClusterConfigDataToJSONTyped, -} from './ClusterConfigData'; + ClusterConfigDataFromJSON, + ClusterConfigDataFromJSONTyped, + ClusterConfigDataToJSON, + ClusterConfigDataToJSONTyped, +} from "./ClusterConfigData"; /** - * + * * @export * @interface ClusterConfigDataList */ export interface ClusterConfigDataList { - /** - * - * @type {string} - * @memberof ClusterConfigDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ClusterConfigDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ClusterConfigDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ClusterConfigDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ClusterConfigDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ClusterConfigDataList + */ + data: Array; } /** * Check if a given object implements the ClusterConfigDataList interface. */ export function instanceOfClusterConfigDataList(value: object): value is ClusterConfigDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ClusterConfigDataListFromJSON(json: any): ClusterConfigDataList { - return ClusterConfigDataListFromJSONTyped(json, false); + return ClusterConfigDataListFromJSONTyped(json, false); } -export function ClusterConfigDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterConfigDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ClusterConfigDataFromJSON)), - }; +export function ClusterConfigDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterConfigDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ClusterConfigDataFromJSON), + }; } export function ClusterConfigDataListToJSON(json: any): ClusterConfigDataList { - return ClusterConfigDataListToJSONTyped(json, false); + return ClusterConfigDataListToJSONTyped(json, false); } -export function ClusterConfigDataListToJSONTyped(value?: ClusterConfigDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterConfigDataListToJSONTyped( + value?: ClusterConfigDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ClusterConfigDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ClusterConfigDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ClusterData.ts b/src/clients/kafkaRest/models/ClusterData.ts index 06ccbaa338..b747075d56 100644 --- a/src/clients/kafkaRest/models/ClusterData.ts +++ b/src/clients/kafkaRest/models/ClusterData.ts @@ -5,157 +5,158 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ClusterData */ export interface ClusterData { - /** - * - * @type {string} - * @memberof ClusterData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ClusterData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ClusterData - */ - cluster_id: string; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - controller?: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - acls: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - brokers: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - broker_configs: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - consumer_groups: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - topics: Relationship; - /** - * - * @type {Relationship} - * @memberof ClusterData - */ - partition_reassignments: Relationship; + /** + * + * @type {string} + * @memberof ClusterData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ClusterData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ClusterData + */ + cluster_id: string; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + controller?: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + acls: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + brokers: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + broker_configs: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + consumer_groups: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + topics: Relationship; + /** + * + * @type {Relationship} + * @memberof ClusterData + */ + partition_reassignments: Relationship; } /** * Check if a given object implements the ClusterData interface. */ export function instanceOfClusterData(value: object): value is ClusterData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('acls' in value) || value['acls'] === undefined) return false; - if (!('brokers' in value) || value['brokers'] === undefined) return false; - if (!('broker_configs' in value) || value['broker_configs'] === undefined) return false; - if (!('consumer_groups' in value) || value['consumer_groups'] === undefined) return false; - if (!('topics' in value) || value['topics'] === undefined) return false; - if (!('partition_reassignments' in value) || value['partition_reassignments'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("acls" in value) || value["acls"] === undefined) return false; + if (!("brokers" in value) || value["brokers"] === undefined) return false; + if (!("broker_configs" in value) || value["broker_configs"] === undefined) return false; + if (!("consumer_groups" in value) || value["consumer_groups"] === undefined) return false; + if (!("topics" in value) || value["topics"] === undefined) return false; + if (!("partition_reassignments" in value) || value["partition_reassignments"] === undefined) + return false; + return true; } export function ClusterDataFromJSON(json: any): ClusterData { - return ClusterDataFromJSONTyped(json, false); + return ClusterDataFromJSONTyped(json, false); } export function ClusterDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'controller': json['controller'] == null ? undefined : RelationshipFromJSON(json['controller']), - 'acls': RelationshipFromJSON(json['acls']), - 'brokers': RelationshipFromJSON(json['brokers']), - 'broker_configs': RelationshipFromJSON(json['broker_configs']), - 'consumer_groups': RelationshipFromJSON(json['consumer_groups']), - 'topics': RelationshipFromJSON(json['topics']), - 'partition_reassignments': RelationshipFromJSON(json['partition_reassignments']), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + controller: json["controller"] == null ? undefined : RelationshipFromJSON(json["controller"]), + acls: RelationshipFromJSON(json["acls"]), + brokers: RelationshipFromJSON(json["brokers"]), + broker_configs: RelationshipFromJSON(json["broker_configs"]), + consumer_groups: RelationshipFromJSON(json["consumer_groups"]), + topics: RelationshipFromJSON(json["topics"]), + partition_reassignments: RelationshipFromJSON(json["partition_reassignments"]), + }; } export function ClusterDataToJSON(json: any): ClusterData { - return ClusterDataToJSONTyped(json, false); + return ClusterDataToJSONTyped(json, false); } -export function ClusterDataToJSONTyped(value?: ClusterData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterDataToJSONTyped( + value?: ClusterData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'controller': RelationshipToJSON(value['controller']), - 'acls': RelationshipToJSON(value['acls']), - 'brokers': RelationshipToJSON(value['brokers']), - 'broker_configs': RelationshipToJSON(value['broker_configs']), - 'consumer_groups': RelationshipToJSON(value['consumer_groups']), - 'topics': RelationshipToJSON(value['topics']), - 'partition_reassignments': RelationshipToJSON(value['partition_reassignments']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + controller: RelationshipToJSON(value["controller"]), + acls: RelationshipToJSON(value["acls"]), + brokers: RelationshipToJSON(value["brokers"]), + broker_configs: RelationshipToJSON(value["broker_configs"]), + consumer_groups: RelationshipToJSON(value["consumer_groups"]), + topics: RelationshipToJSON(value["topics"]), + partition_reassignments: RelationshipToJSON(value["partition_reassignments"]), + }; } - diff --git a/src/clients/kafkaRest/models/ClusterDataList.ts b/src/clients/kafkaRest/models/ClusterDataList.ts index 52914c29a9..6036c4d521 100644 --- a/src/clients/kafkaRest/models/ClusterDataList.ts +++ b/src/clients/kafkaRest/models/ClusterDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ClusterData } from './ClusterData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ClusterData } from "./ClusterData"; import { - ClusterDataFromJSON, - ClusterDataFromJSONTyped, - ClusterDataToJSON, - ClusterDataToJSONTyped, -} from './ClusterData'; + ClusterDataFromJSON, + ClusterDataFromJSONTyped, + ClusterDataToJSON, + ClusterDataToJSONTyped, +} from "./ClusterData"; /** - * + * * @export * @interface ClusterDataList */ export interface ClusterDataList { - /** - * - * @type {string} - * @memberof ClusterDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ClusterDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ClusterDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ClusterDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ClusterDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ClusterDataList + */ + data: Array; } /** * Check if a given object implements the ClusterDataList interface. */ export function instanceOfClusterDataList(value: object): value is ClusterDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ClusterDataListFromJSON(json: any): ClusterDataList { - return ClusterDataListFromJSONTyped(json, false); + return ClusterDataListFromJSONTyped(json, false); } -export function ClusterDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ClusterDataFromJSON)), - }; +export function ClusterDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ClusterDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ClusterDataFromJSON), + }; } export function ClusterDataListToJSON(json: any): ClusterDataList { - return ClusterDataListToJSONTyped(json, false); + return ClusterDataListToJSONTyped(json, false); } -export function ClusterDataListToJSONTyped(value?: ClusterDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterDataListToJSONTyped( + value?: ClusterDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ClusterDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ClusterDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ConfigData.ts b/src/clients/kafkaRest/models/ConfigData.ts index aa00883afe..2b3d679c2f 100644 --- a/src/clients/kafkaRest/models/ConfigData.ts +++ b/src/clients/kafkaRest/models/ConfigData.ts @@ -5,71 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ConfigData */ export interface ConfigData { - /** - * - * @type {string} - * @memberof ConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof ConfigData - */ - value: string | null; + /** + * + * @type {string} + * @memberof ConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof ConfigData + */ + value: string | null; } /** * Check if a given object implements the ConfigData interface. */ export function instanceOfConfigData(value: object): value is ConfigData { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('value' in value) || value['value'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("value" in value) || value["value"] === undefined) return false; + return true; } export function ConfigDataFromJSON(json: any): ConfigData { - return ConfigDataFromJSONTyped(json, false); + return ConfigDataFromJSONTyped(json, false); } export function ConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigData { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'value': json['value'], - }; + if (json == null) { + return json; + } + return { + name: json["name"], + value: json["value"], + }; } export function ConfigDataToJSON(json: any): ConfigData { - return ConfigDataToJSONTyped(json, false); + return ConfigDataToJSONTyped(json, false); } -export function ConfigDataToJSONTyped(value?: ConfigData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigDataToJSONTyped( + value?: ConfigData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'value': value['value'], - }; + return { + name: value["name"], + value: value["value"], + }; } - diff --git a/src/clients/kafkaRest/models/ConfigSynonymData.ts b/src/clients/kafkaRest/models/ConfigSynonymData.ts index 5031bc5987..defeaced5a 100644 --- a/src/clients/kafkaRest/models/ConfigSynonymData.ts +++ b/src/clients/kafkaRest/models/ConfigSynonymData.ts @@ -5,79 +5,82 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ConfigSynonymData */ export interface ConfigSynonymData { - /** - * - * @type {string} - * @memberof ConfigSynonymData - */ - name: string; - /** - * - * @type {string} - * @memberof ConfigSynonymData - */ - value?: string | null; - /** - * - * @type {string} - * @memberof ConfigSynonymData - */ - source: string; + /** + * + * @type {string} + * @memberof ConfigSynonymData + */ + name: string; + /** + * + * @type {string} + * @memberof ConfigSynonymData + */ + value?: string | null; + /** + * + * @type {string} + * @memberof ConfigSynonymData + */ + source: string; } /** * Check if a given object implements the ConfigSynonymData interface. */ export function instanceOfConfigSynonymData(value: object): value is ConfigSynonymData { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('source' in value) || value['source'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("source" in value) || value["source"] === undefined) return false; + return true; } export function ConfigSynonymDataFromJSON(json: any): ConfigSynonymData { - return ConfigSynonymDataFromJSONTyped(json, false); + return ConfigSynonymDataFromJSONTyped(json, false); } -export function ConfigSynonymDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigSynonymData { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - 'source': json['source'], - }; +export function ConfigSynonymDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigSynonymData { + if (json == null) { + return json; + } + return { + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + source: json["source"], + }; } export function ConfigSynonymDataToJSON(json: any): ConfigSynonymData { - return ConfigSynonymDataToJSONTyped(json, false); + return ConfigSynonymDataToJSONTyped(json, false); } -export function ConfigSynonymDataToJSONTyped(value?: ConfigSynonymData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigSynonymDataToJSONTyped( + value?: ConfigSynonymData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'value': value['value'], - 'source': value['source'], - }; + return { + name: value["name"], + value: value["value"], + source: value["source"], + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerAssignmentData.ts b/src/clients/kafkaRest/models/ConsumerAssignmentData.ts index 95266ed5b7..f46fc9d06a 100644 --- a/src/clients/kafkaRest/models/ConsumerAssignmentData.ts +++ b/src/clients/kafkaRest/models/ConsumerAssignmentData.ts @@ -5,149 +5,152 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ConsumerAssignmentData */ export interface ConsumerAssignmentData { - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerAssignmentData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerAssignmentData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ConsumerAssignmentData - */ - partition_id: number; - /** - * - * @type {Relationship} - * @memberof ConsumerAssignmentData - */ - partition: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerAssignmentData - */ - lag: Relationship; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerAssignmentData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerAssignmentData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ConsumerAssignmentData + */ + partition_id: number; + /** + * + * @type {Relationship} + * @memberof ConsumerAssignmentData + */ + partition: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerAssignmentData + */ + lag: Relationship; } /** * Check if a given object implements the ConsumerAssignmentData interface. */ export function instanceOfConsumerAssignmentData(value: object): value is ConsumerAssignmentData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; - if (!('consumer_id' in value) || value['consumer_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('partition_id' in value) || value['partition_id'] === undefined) return false; - if (!('partition' in value) || value['partition'] === undefined) return false; - if (!('lag' in value) || value['lag'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; + if (!("consumer_id" in value) || value["consumer_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("partition_id" in value) || value["partition_id"] === undefined) return false; + if (!("partition" in value) || value["partition"] === undefined) return false; + if (!("lag" in value) || value["lag"] === undefined) return false; + return true; } export function ConsumerAssignmentDataFromJSON(json: any): ConsumerAssignmentData { - return ConsumerAssignmentDataFromJSONTyped(json, false); + return ConsumerAssignmentDataFromJSONTyped(json, false); } -export function ConsumerAssignmentDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAssignmentData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'consumer_group_id': json['consumer_group_id'], - 'consumer_id': json['consumer_id'], - 'topic_name': json['topic_name'], - 'partition_id': json['partition_id'], - 'partition': RelationshipFromJSON(json['partition']), - 'lag': RelationshipFromJSON(json['lag']), - }; +export function ConsumerAssignmentDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerAssignmentData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + consumer_group_id: json["consumer_group_id"], + consumer_id: json["consumer_id"], + topic_name: json["topic_name"], + partition_id: json["partition_id"], + partition: RelationshipFromJSON(json["partition"]), + lag: RelationshipFromJSON(json["lag"]), + }; } export function ConsumerAssignmentDataToJSON(json: any): ConsumerAssignmentData { - return ConsumerAssignmentDataToJSONTyped(json, false); + return ConsumerAssignmentDataToJSONTyped(json, false); } -export function ConsumerAssignmentDataToJSONTyped(value?: ConsumerAssignmentData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerAssignmentDataToJSONTyped( + value?: ConsumerAssignmentData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'consumer_group_id': value['consumer_group_id'], - 'consumer_id': value['consumer_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'partition': RelationshipToJSON(value['partition']), - 'lag': RelationshipToJSON(value['lag']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + consumer_group_id: value["consumer_group_id"], + consumer_id: value["consumer_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + partition: RelationshipToJSON(value["partition"]), + lag: RelationshipToJSON(value["lag"]), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts b/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts index 69be74e9ad..12323992c6 100644 --- a/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerAssignmentDataList.ts @@ -5,95 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ConsumerAssignmentData } from './ConsumerAssignmentData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ConsumerAssignmentData } from "./ConsumerAssignmentData"; import { - ConsumerAssignmentDataFromJSON, - ConsumerAssignmentDataFromJSONTyped, - ConsumerAssignmentDataToJSON, - ConsumerAssignmentDataToJSONTyped, -} from './ConsumerAssignmentData'; + ConsumerAssignmentDataFromJSON, + ConsumerAssignmentDataFromJSONTyped, + ConsumerAssignmentDataToJSON, + ConsumerAssignmentDataToJSONTyped, +} from "./ConsumerAssignmentData"; /** - * + * * @export * @interface ConsumerAssignmentDataList */ export interface ConsumerAssignmentDataList { - /** - * - * @type {string} - * @memberof ConsumerAssignmentDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerAssignmentDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerAssignmentDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerAssignmentDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerAssignmentDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerAssignmentDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerAssignmentDataList interface. */ -export function instanceOfConsumerAssignmentDataList(value: object): value is ConsumerAssignmentDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfConsumerAssignmentDataList( + value: object, +): value is ConsumerAssignmentDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ConsumerAssignmentDataListFromJSON(json: any): ConsumerAssignmentDataList { - return ConsumerAssignmentDataListFromJSONTyped(json, false); + return ConsumerAssignmentDataListFromJSONTyped(json, false); } -export function ConsumerAssignmentDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerAssignmentDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ConsumerAssignmentDataFromJSON)), - }; +export function ConsumerAssignmentDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerAssignmentDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ConsumerAssignmentDataFromJSON), + }; } export function ConsumerAssignmentDataListToJSON(json: any): ConsumerAssignmentDataList { - return ConsumerAssignmentDataListToJSONTyped(json, false); + return ConsumerAssignmentDataListToJSONTyped(json, false); } -export function ConsumerAssignmentDataListToJSONTyped(value?: ConsumerAssignmentDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerAssignmentDataListToJSONTyped( + value?: ConsumerAssignmentDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ConsumerAssignmentDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ConsumerAssignmentDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerData.ts b/src/clients/kafkaRest/models/ConsumerData.ts index 4f9489518d..f76096c4d8 100644 --- a/src/clients/kafkaRest/models/ConsumerData.ts +++ b/src/clients/kafkaRest/models/ConsumerData.ts @@ -5,139 +5,139 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ConsumerData */ export interface ConsumerData { - /** - * - * @type {string} - * @memberof ConsumerData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerData - */ - consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerData - */ - instance_id?: string | null; - /** - * - * @type {string} - * @memberof ConsumerData - */ - client_id: string; - /** - * - * @type {Relationship} - * @memberof ConsumerData - */ - assignments: Relationship; + /** + * + * @type {string} + * @memberof ConsumerData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerData + */ + consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerData + */ + instance_id?: string | null; + /** + * + * @type {string} + * @memberof ConsumerData + */ + client_id: string; + /** + * + * @type {Relationship} + * @memberof ConsumerData + */ + assignments: Relationship; } /** * Check if a given object implements the ConsumerData interface. */ export function instanceOfConsumerData(value: object): value is ConsumerData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; - if (!('consumer_id' in value) || value['consumer_id'] === undefined) return false; - if (!('client_id' in value) || value['client_id'] === undefined) return false; - if (!('assignments' in value) || value['assignments'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; + if (!("consumer_id" in value) || value["consumer_id"] === undefined) return false; + if (!("client_id" in value) || value["client_id"] === undefined) return false; + if (!("assignments" in value) || value["assignments"] === undefined) return false; + return true; } export function ConsumerDataFromJSON(json: any): ConsumerData { - return ConsumerDataFromJSONTyped(json, false); + return ConsumerDataFromJSONTyped(json, false); } export function ConsumerDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'consumer_group_id': json['consumer_group_id'], - 'consumer_id': json['consumer_id'], - 'instance_id': json['instance_id'] == null ? undefined : json['instance_id'], - 'client_id': json['client_id'], - 'assignments': RelationshipFromJSON(json['assignments']), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + consumer_group_id: json["consumer_group_id"], + consumer_id: json["consumer_id"], + instance_id: json["instance_id"] == null ? undefined : json["instance_id"], + client_id: json["client_id"], + assignments: RelationshipFromJSON(json["assignments"]), + }; } export function ConsumerDataToJSON(json: any): ConsumerData { - return ConsumerDataToJSONTyped(json, false); + return ConsumerDataToJSONTyped(json, false); } -export function ConsumerDataToJSONTyped(value?: ConsumerData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerDataToJSONTyped( + value?: ConsumerData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'consumer_group_id': value['consumer_group_id'], - 'consumer_id': value['consumer_id'], - 'instance_id': value['instance_id'], - 'client_id': value['client_id'], - 'assignments': RelationshipToJSON(value['assignments']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + consumer_group_id: value["consumer_group_id"], + consumer_id: value["consumer_id"], + instance_id: value["instance_id"], + client_id: value["client_id"], + assignments: RelationshipToJSON(value["assignments"]), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerDataList.ts b/src/clients/kafkaRest/models/ConsumerDataList.ts index 7c95dea31e..3024a916d7 100644 --- a/src/clients/kafkaRest/models/ConsumerDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ConsumerData } from './ConsumerData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ConsumerData } from "./ConsumerData"; import { - ConsumerDataFromJSON, - ConsumerDataFromJSONTyped, - ConsumerDataToJSON, - ConsumerDataToJSONTyped, -} from './ConsumerData'; + ConsumerDataFromJSON, + ConsumerDataFromJSONTyped, + ConsumerDataToJSON, + ConsumerDataToJSONTyped, +} from "./ConsumerData"; /** - * + * * @export * @interface ConsumerDataList */ export interface ConsumerDataList { - /** - * - * @type {string} - * @memberof ConsumerDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerDataList interface. */ export function instanceOfConsumerDataList(value: object): value is ConsumerDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ConsumerDataListFromJSON(json: any): ConsumerDataList { - return ConsumerDataListFromJSONTyped(json, false); + return ConsumerDataListFromJSONTyped(json, false); } -export function ConsumerDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ConsumerDataFromJSON)), - }; +export function ConsumerDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ConsumerDataFromJSON), + }; } export function ConsumerDataListToJSON(json: any): ConsumerDataList { - return ConsumerDataListToJSONTyped(json, false); + return ConsumerDataListToJSONTyped(json, false); } -export function ConsumerDataListToJSONTyped(value?: ConsumerDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerDataListToJSONTyped( + value?: ConsumerDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ConsumerDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ConsumerDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerGroupData.ts b/src/clients/kafkaRest/models/ConsumerGroupData.ts index 8cef088640..688fa17c27 100644 --- a/src/clients/kafkaRest/models/ConsumerGroupData.ts +++ b/src/clients/kafkaRest/models/ConsumerGroupData.ts @@ -5,157 +5,160 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ConsumerGroupData */ export interface ConsumerGroupData { - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerGroupData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - consumer_group_id: string; - /** - * - * @type {boolean} - * @memberof ConsumerGroupData - */ - is_simple: boolean; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - partition_assignor: string; - /** - * - * @type {string} - * @memberof ConsumerGroupData - */ - state: string; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupData - */ - coordinator: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupData - */ - consumer?: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupData - */ - lag_summary: Relationship; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerGroupData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + consumer_group_id: string; + /** + * + * @type {boolean} + * @memberof ConsumerGroupData + */ + is_simple: boolean; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + partition_assignor: string; + /** + * + * @type {string} + * @memberof ConsumerGroupData + */ + state: string; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupData + */ + coordinator: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupData + */ + consumer?: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupData + */ + lag_summary: Relationship; } /** * Check if a given object implements the ConsumerGroupData interface. */ export function instanceOfConsumerGroupData(value: object): value is ConsumerGroupData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; - if (!('is_simple' in value) || value['is_simple'] === undefined) return false; - if (!('partition_assignor' in value) || value['partition_assignor'] === undefined) return false; - if (!('state' in value) || value['state'] === undefined) return false; - if (!('coordinator' in value) || value['coordinator'] === undefined) return false; - if (!('lag_summary' in value) || value['lag_summary'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; + if (!("is_simple" in value) || value["is_simple"] === undefined) return false; + if (!("partition_assignor" in value) || value["partition_assignor"] === undefined) return false; + if (!("state" in value) || value["state"] === undefined) return false; + if (!("coordinator" in value) || value["coordinator"] === undefined) return false; + if (!("lag_summary" in value) || value["lag_summary"] === undefined) return false; + return true; } export function ConsumerGroupDataFromJSON(json: any): ConsumerGroupData { - return ConsumerGroupDataFromJSONTyped(json, false); + return ConsumerGroupDataFromJSONTyped(json, false); } -export function ConsumerGroupDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerGroupData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'consumer_group_id': json['consumer_group_id'], - 'is_simple': json['is_simple'], - 'partition_assignor': json['partition_assignor'], - 'state': json['state'], - 'coordinator': RelationshipFromJSON(json['coordinator']), - 'consumer': json['consumer'] == null ? undefined : RelationshipFromJSON(json['consumer']), - 'lag_summary': RelationshipFromJSON(json['lag_summary']), - }; +export function ConsumerGroupDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerGroupData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + consumer_group_id: json["consumer_group_id"], + is_simple: json["is_simple"], + partition_assignor: json["partition_assignor"], + state: json["state"], + coordinator: RelationshipFromJSON(json["coordinator"]), + consumer: json["consumer"] == null ? undefined : RelationshipFromJSON(json["consumer"]), + lag_summary: RelationshipFromJSON(json["lag_summary"]), + }; } export function ConsumerGroupDataToJSON(json: any): ConsumerGroupData { - return ConsumerGroupDataToJSONTyped(json, false); + return ConsumerGroupDataToJSONTyped(json, false); } -export function ConsumerGroupDataToJSONTyped(value?: ConsumerGroupData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerGroupDataToJSONTyped( + value?: ConsumerGroupData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'consumer_group_id': value['consumer_group_id'], - 'is_simple': value['is_simple'], - 'partition_assignor': value['partition_assignor'], - 'state': value['state'], - 'coordinator': RelationshipToJSON(value['coordinator']), - 'consumer': RelationshipToJSON(value['consumer']), - 'lag_summary': RelationshipToJSON(value['lag_summary']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + consumer_group_id: value["consumer_group_id"], + is_simple: value["is_simple"], + partition_assignor: value["partition_assignor"], + state: value["state"], + coordinator: RelationshipToJSON(value["coordinator"]), + consumer: RelationshipToJSON(value["consumer"]), + lag_summary: RelationshipToJSON(value["lag_summary"]), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerGroupDataList.ts b/src/clients/kafkaRest/models/ConsumerGroupDataList.ts index 5430310eb0..bdd274293c 100644 --- a/src/clients/kafkaRest/models/ConsumerGroupDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerGroupDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ConsumerGroupData } from './ConsumerGroupData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ConsumerGroupData } from "./ConsumerGroupData"; import { - ConsumerGroupDataFromJSON, - ConsumerGroupDataFromJSONTyped, - ConsumerGroupDataToJSON, - ConsumerGroupDataToJSONTyped, -} from './ConsumerGroupData'; + ConsumerGroupDataFromJSON, + ConsumerGroupDataFromJSONTyped, + ConsumerGroupDataToJSON, + ConsumerGroupDataToJSONTyped, +} from "./ConsumerGroupData"; /** - * + * * @export * @interface ConsumerGroupDataList */ export interface ConsumerGroupDataList { - /** - * - * @type {string} - * @memberof ConsumerGroupDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerGroupDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerGroupDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerGroupDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerGroupDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerGroupDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerGroupDataList interface. */ export function instanceOfConsumerGroupDataList(value: object): value is ConsumerGroupDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ConsumerGroupDataListFromJSON(json: any): ConsumerGroupDataList { - return ConsumerGroupDataListFromJSONTyped(json, false); + return ConsumerGroupDataListFromJSONTyped(json, false); } -export function ConsumerGroupDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerGroupDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ConsumerGroupDataFromJSON)), - }; +export function ConsumerGroupDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerGroupDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ConsumerGroupDataFromJSON), + }; } export function ConsumerGroupDataListToJSON(json: any): ConsumerGroupDataList { - return ConsumerGroupDataListToJSONTyped(json, false); + return ConsumerGroupDataListToJSONTyped(json, false); } -export function ConsumerGroupDataListToJSONTyped(value?: ConsumerGroupDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerGroupDataListToJSONTyped( + value?: ConsumerGroupDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ConsumerGroupDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ConsumerGroupDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts b/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts index e8e3909d72..6952123f2c 100644 --- a/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts +++ b/src/clients/kafkaRest/models/ConsumerGroupLagSummaryData.ts @@ -5,184 +5,191 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ConsumerGroupLagSummaryData */ export interface ConsumerGroupLagSummaryData { - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerGroupLagSummaryData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_instance_id?: string | null; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_client_id: string; - /** - * - * @type {string} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_topic_name: string; - /** - * - * @type {number} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_partition_id: number; - /** - * - * @type {number} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag: number; - /** - * - * @type {number} - * @memberof ConsumerGroupLagSummaryData - */ - total_lag: number; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_consumer: Relationship; - /** - * - * @type {Relationship} - * @memberof ConsumerGroupLagSummaryData - */ - max_lag_partition: Relationship; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerGroupLagSummaryData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_instance_id?: string | null; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_client_id: string; + /** + * + * @type {string} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_topic_name: string; + /** + * + * @type {number} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_partition_id: number; + /** + * + * @type {number} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag: number; + /** + * + * @type {number} + * @memberof ConsumerGroupLagSummaryData + */ + total_lag: number; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_consumer: Relationship; + /** + * + * @type {Relationship} + * @memberof ConsumerGroupLagSummaryData + */ + max_lag_partition: Relationship; } /** * Check if a given object implements the ConsumerGroupLagSummaryData interface. */ -export function instanceOfConsumerGroupLagSummaryData(value: object): value is ConsumerGroupLagSummaryData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; - if (!('max_lag_consumer_id' in value) || value['max_lag_consumer_id'] === undefined) return false; - if (!('max_lag_client_id' in value) || value['max_lag_client_id'] === undefined) return false; - if (!('max_lag_topic_name' in value) || value['max_lag_topic_name'] === undefined) return false; - if (!('max_lag_partition_id' in value) || value['max_lag_partition_id'] === undefined) return false; - if (!('max_lag' in value) || value['max_lag'] === undefined) return false; - if (!('total_lag' in value) || value['total_lag'] === undefined) return false; - if (!('max_lag_consumer' in value) || value['max_lag_consumer'] === undefined) return false; - if (!('max_lag_partition' in value) || value['max_lag_partition'] === undefined) return false; - return true; +export function instanceOfConsumerGroupLagSummaryData( + value: object, +): value is ConsumerGroupLagSummaryData { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; + if (!("max_lag_consumer_id" in value) || value["max_lag_consumer_id"] === undefined) return false; + if (!("max_lag_client_id" in value) || value["max_lag_client_id"] === undefined) return false; + if (!("max_lag_topic_name" in value) || value["max_lag_topic_name"] === undefined) return false; + if (!("max_lag_partition_id" in value) || value["max_lag_partition_id"] === undefined) + return false; + if (!("max_lag" in value) || value["max_lag"] === undefined) return false; + if (!("total_lag" in value) || value["total_lag"] === undefined) return false; + if (!("max_lag_consumer" in value) || value["max_lag_consumer"] === undefined) return false; + if (!("max_lag_partition" in value) || value["max_lag_partition"] === undefined) return false; + return true; } export function ConsumerGroupLagSummaryDataFromJSON(json: any): ConsumerGroupLagSummaryData { - return ConsumerGroupLagSummaryDataFromJSONTyped(json, false); + return ConsumerGroupLagSummaryDataFromJSONTyped(json, false); } -export function ConsumerGroupLagSummaryDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerGroupLagSummaryData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'consumer_group_id': json['consumer_group_id'], - 'max_lag_consumer_id': json['max_lag_consumer_id'], - 'max_lag_instance_id': json['max_lag_instance_id'] == null ? undefined : json['max_lag_instance_id'], - 'max_lag_client_id': json['max_lag_client_id'], - 'max_lag_topic_name': json['max_lag_topic_name'], - 'max_lag_partition_id': json['max_lag_partition_id'], - 'max_lag': json['max_lag'], - 'total_lag': json['total_lag'], - 'max_lag_consumer': RelationshipFromJSON(json['max_lag_consumer']), - 'max_lag_partition': RelationshipFromJSON(json['max_lag_partition']), - }; +export function ConsumerGroupLagSummaryDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerGroupLagSummaryData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + consumer_group_id: json["consumer_group_id"], + max_lag_consumer_id: json["max_lag_consumer_id"], + max_lag_instance_id: + json["max_lag_instance_id"] == null ? undefined : json["max_lag_instance_id"], + max_lag_client_id: json["max_lag_client_id"], + max_lag_topic_name: json["max_lag_topic_name"], + max_lag_partition_id: json["max_lag_partition_id"], + max_lag: json["max_lag"], + total_lag: json["total_lag"], + max_lag_consumer: RelationshipFromJSON(json["max_lag_consumer"]), + max_lag_partition: RelationshipFromJSON(json["max_lag_partition"]), + }; } export function ConsumerGroupLagSummaryDataToJSON(json: any): ConsumerGroupLagSummaryData { - return ConsumerGroupLagSummaryDataToJSONTyped(json, false); + return ConsumerGroupLagSummaryDataToJSONTyped(json, false); } -export function ConsumerGroupLagSummaryDataToJSONTyped(value?: ConsumerGroupLagSummaryData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerGroupLagSummaryDataToJSONTyped( + value?: ConsumerGroupLagSummaryData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'consumer_group_id': value['consumer_group_id'], - 'max_lag_consumer_id': value['max_lag_consumer_id'], - 'max_lag_instance_id': value['max_lag_instance_id'], - 'max_lag_client_id': value['max_lag_client_id'], - 'max_lag_topic_name': value['max_lag_topic_name'], - 'max_lag_partition_id': value['max_lag_partition_id'], - 'max_lag': value['max_lag'], - 'total_lag': value['total_lag'], - 'max_lag_consumer': RelationshipToJSON(value['max_lag_consumer']), - 'max_lag_partition': RelationshipToJSON(value['max_lag_partition']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + consumer_group_id: value["consumer_group_id"], + max_lag_consumer_id: value["max_lag_consumer_id"], + max_lag_instance_id: value["max_lag_instance_id"], + max_lag_client_id: value["max_lag_client_id"], + max_lag_topic_name: value["max_lag_topic_name"], + max_lag_partition_id: value["max_lag_partition_id"], + max_lag: value["max_lag"], + total_lag: value["total_lag"], + max_lag_consumer: RelationshipToJSON(value["max_lag_consumer"]), + max_lag_partition: RelationshipToJSON(value["max_lag_partition"]), + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerLagData.ts b/src/clients/kafkaRest/models/ConsumerLagData.ts index 01de1b1bd1..d409a30a3e 100644 --- a/src/clients/kafkaRest/models/ConsumerLagData.ts +++ b/src/clients/kafkaRest/models/ConsumerLagData.ts @@ -5,168 +5,171 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceMetadata } from './ResourceMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ConsumerLagData */ export interface ConsumerLagData { - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ConsumerLagData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - consumer_group_id: string; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - partition_id: number; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - current_offset: number; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - log_end_offset: number; - /** - * - * @type {number} - * @memberof ConsumerLagData - */ - lag: number; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - consumer_id: string; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - instance_id?: string | null; - /** - * - * @type {string} - * @memberof ConsumerLagData - */ - client_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ConsumerLagData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + consumer_group_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + partition_id: number; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + current_offset: number; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + log_end_offset: number; + /** + * + * @type {number} + * @memberof ConsumerLagData + */ + lag: number; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + consumer_id: string; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + instance_id?: string | null; + /** + * + * @type {string} + * @memberof ConsumerLagData + */ + client_id: string; } /** * Check if a given object implements the ConsumerLagData interface. */ export function instanceOfConsumerLagData(value: object): value is ConsumerLagData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('consumer_group_id' in value) || value['consumer_group_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('partition_id' in value) || value['partition_id'] === undefined) return false; - if (!('current_offset' in value) || value['current_offset'] === undefined) return false; - if (!('log_end_offset' in value) || value['log_end_offset'] === undefined) return false; - if (!('lag' in value) || value['lag'] === undefined) return false; - if (!('consumer_id' in value) || value['consumer_id'] === undefined) return false; - if (!('client_id' in value) || value['client_id'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("consumer_group_id" in value) || value["consumer_group_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("partition_id" in value) || value["partition_id"] === undefined) return false; + if (!("current_offset" in value) || value["current_offset"] === undefined) return false; + if (!("log_end_offset" in value) || value["log_end_offset"] === undefined) return false; + if (!("lag" in value) || value["lag"] === undefined) return false; + if (!("consumer_id" in value) || value["consumer_id"] === undefined) return false; + if (!("client_id" in value) || value["client_id"] === undefined) return false; + return true; } export function ConsumerLagDataFromJSON(json: any): ConsumerLagData { - return ConsumerLagDataFromJSONTyped(json, false); + return ConsumerLagDataFromJSONTyped(json, false); } -export function ConsumerLagDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerLagData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'consumer_group_id': json['consumer_group_id'], - 'topic_name': json['topic_name'], - 'partition_id': json['partition_id'], - 'current_offset': json['current_offset'], - 'log_end_offset': json['log_end_offset'], - 'lag': json['lag'], - 'consumer_id': json['consumer_id'], - 'instance_id': json['instance_id'] == null ? undefined : json['instance_id'], - 'client_id': json['client_id'], - }; +export function ConsumerLagDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerLagData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + consumer_group_id: json["consumer_group_id"], + topic_name: json["topic_name"], + partition_id: json["partition_id"], + current_offset: json["current_offset"], + log_end_offset: json["log_end_offset"], + lag: json["lag"], + consumer_id: json["consumer_id"], + instance_id: json["instance_id"] == null ? undefined : json["instance_id"], + client_id: json["client_id"], + }; } export function ConsumerLagDataToJSON(json: any): ConsumerLagData { - return ConsumerLagDataToJSONTyped(json, false); + return ConsumerLagDataToJSONTyped(json, false); } -export function ConsumerLagDataToJSONTyped(value?: ConsumerLagData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerLagDataToJSONTyped( + value?: ConsumerLagData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'consumer_group_id': value['consumer_group_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'current_offset': value['current_offset'], - 'log_end_offset': value['log_end_offset'], - 'lag': value['lag'], - 'consumer_id': value['consumer_id'], - 'instance_id': value['instance_id'], - 'client_id': value['client_id'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + consumer_group_id: value["consumer_group_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + current_offset: value["current_offset"], + log_end_offset: value["log_end_offset"], + lag: value["lag"], + consumer_id: value["consumer_id"], + instance_id: value["instance_id"], + client_id: value["client_id"], + }; } - diff --git a/src/clients/kafkaRest/models/ConsumerLagDataList.ts b/src/clients/kafkaRest/models/ConsumerLagDataList.ts index 38f1bffd30..4f4efd7e4e 100644 --- a/src/clients/kafkaRest/models/ConsumerLagDataList.ts +++ b/src/clients/kafkaRest/models/ConsumerLagDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ConsumerLagData } from './ConsumerLagData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ConsumerLagData } from "./ConsumerLagData"; import { - ConsumerLagDataFromJSON, - ConsumerLagDataFromJSONTyped, - ConsumerLagDataToJSON, - ConsumerLagDataToJSONTyped, -} from './ConsumerLagData'; + ConsumerLagDataFromJSON, + ConsumerLagDataFromJSONTyped, + ConsumerLagDataToJSON, + ConsumerLagDataToJSONTyped, +} from "./ConsumerLagData"; /** - * + * * @export * @interface ConsumerLagDataList */ export interface ConsumerLagDataList { - /** - * - * @type {string} - * @memberof ConsumerLagDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ConsumerLagDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ConsumerLagDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConsumerLagDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ConsumerLagDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ConsumerLagDataList + */ + data: Array; } /** * Check if a given object implements the ConsumerLagDataList interface. */ export function instanceOfConsumerLagDataList(value: object): value is ConsumerLagDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ConsumerLagDataListFromJSON(json: any): ConsumerLagDataList { - return ConsumerLagDataListFromJSONTyped(json, false); + return ConsumerLagDataListFromJSONTyped(json, false); } -export function ConsumerLagDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConsumerLagDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ConsumerLagDataFromJSON)), - }; +export function ConsumerLagDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConsumerLagDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ConsumerLagDataFromJSON), + }; } export function ConsumerLagDataListToJSON(json: any): ConsumerLagDataList { - return ConsumerLagDataListToJSONTyped(json, false); + return ConsumerLagDataListToJSONTyped(json, false); } -export function ConsumerLagDataListToJSONTyped(value?: ConsumerLagDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConsumerLagDataListToJSONTyped( + value?: ConsumerLagDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ConsumerLagDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ConsumerLagDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/CreateAclRequestData.ts b/src/clients/kafkaRest/models/CreateAclRequestData.ts index c99ec856f5..53abb1c9a3 100644 --- a/src/clients/kafkaRest/models/CreateAclRequestData.ts +++ b/src/clients/kafkaRest/models/CreateAclRequestData.ts @@ -5,126 +5,127 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AclResourceType } from './AclResourceType'; +import { mapValues } from "../runtime"; +import type { AclResourceType } from "./AclResourceType"; import { - AclResourceTypeFromJSON, - AclResourceTypeFromJSONTyped, - AclResourceTypeToJSON, - AclResourceTypeToJSONTyped, -} from './AclResourceType'; + AclResourceTypeFromJSON, + AclResourceTypeFromJSONTyped, + AclResourceTypeToJSON, + AclResourceTypeToJSONTyped, +} from "./AclResourceType"; /** - * + * * @export * @interface CreateAclRequestData */ export interface CreateAclRequestData { - /** - * - * @type {AclResourceType} - * @memberof CreateAclRequestData - */ - resource_type: AclResourceType; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - resource_name: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - pattern_type: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - principal: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - host: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - operation: string; - /** - * - * @type {string} - * @memberof CreateAclRequestData - */ - permission: string; + /** + * + * @type {AclResourceType} + * @memberof CreateAclRequestData + */ + resource_type: AclResourceType; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + resource_name: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + pattern_type: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + principal: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + host: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + operation: string; + /** + * + * @type {string} + * @memberof CreateAclRequestData + */ + permission: string; } - - /** * Check if a given object implements the CreateAclRequestData interface. */ export function instanceOfCreateAclRequestData(value: object): value is CreateAclRequestData { - if (!('resource_type' in value) || value['resource_type'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - if (!('pattern_type' in value) || value['pattern_type'] === undefined) return false; - if (!('principal' in value) || value['principal'] === undefined) return false; - if (!('host' in value) || value['host'] === undefined) return false; - if (!('operation' in value) || value['operation'] === undefined) return false; - if (!('permission' in value) || value['permission'] === undefined) return false; - return true; + if (!("resource_type" in value) || value["resource_type"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + if (!("pattern_type" in value) || value["pattern_type"] === undefined) return false; + if (!("principal" in value) || value["principal"] === undefined) return false; + if (!("host" in value) || value["host"] === undefined) return false; + if (!("operation" in value) || value["operation"] === undefined) return false; + if (!("permission" in value) || value["permission"] === undefined) return false; + return true; } export function CreateAclRequestDataFromJSON(json: any): CreateAclRequestData { - return CreateAclRequestDataFromJSONTyped(json, false); + return CreateAclRequestDataFromJSONTyped(json, false); } -export function CreateAclRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAclRequestData { - if (json == null) { - return json; - } - return { - - 'resource_type': AclResourceTypeFromJSON(json['resource_type']), - 'resource_name': json['resource_name'], - 'pattern_type': json['pattern_type'], - 'principal': json['principal'], - 'host': json['host'], - 'operation': json['operation'], - 'permission': json['permission'], - }; +export function CreateAclRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateAclRequestData { + if (json == null) { + return json; + } + return { + resource_type: AclResourceTypeFromJSON(json["resource_type"]), + resource_name: json["resource_name"], + pattern_type: json["pattern_type"], + principal: json["principal"], + host: json["host"], + operation: json["operation"], + permission: json["permission"], + }; } export function CreateAclRequestDataToJSON(json: any): CreateAclRequestData { - return CreateAclRequestDataToJSONTyped(json, false); + return CreateAclRequestDataToJSONTyped(json, false); } -export function CreateAclRequestDataToJSONTyped(value?: CreateAclRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateAclRequestDataToJSONTyped( + value?: CreateAclRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'resource_type': AclResourceTypeToJSON(value['resource_type']), - 'resource_name': value['resource_name'], - 'pattern_type': value['pattern_type'], - 'principal': value['principal'], - 'host': value['host'], - 'operation': value['operation'], - 'permission': value['permission'], - }; + return { + resource_type: AclResourceTypeToJSON(value["resource_type"]), + resource_name: value["resource_name"], + pattern_type: value["pattern_type"], + principal: value["principal"], + host: value["host"], + operation: value["operation"], + permission: value["permission"], + }; } - diff --git a/src/clients/kafkaRest/models/CreateAclRequestDataList.ts b/src/clients/kafkaRest/models/CreateAclRequestDataList.ts index 35495824f4..30966580c2 100644 --- a/src/clients/kafkaRest/models/CreateAclRequestDataList.ts +++ b/src/clients/kafkaRest/models/CreateAclRequestDataList.ts @@ -5,70 +5,75 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CreateAclRequestData } from './CreateAclRequestData'; +import { mapValues } from "../runtime"; +import type { CreateAclRequestData } from "./CreateAclRequestData"; import { - CreateAclRequestDataFromJSON, - CreateAclRequestDataFromJSONTyped, - CreateAclRequestDataToJSON, - CreateAclRequestDataToJSONTyped, -} from './CreateAclRequestData'; + CreateAclRequestDataFromJSON, + CreateAclRequestDataFromJSONTyped, + CreateAclRequestDataToJSON, + CreateAclRequestDataToJSONTyped, +} from "./CreateAclRequestData"; /** - * + * * @export * @interface CreateAclRequestDataList */ export interface CreateAclRequestDataList { - /** - * - * @type {Array} - * @memberof CreateAclRequestDataList - */ - data: Array; + /** + * + * @type {Array} + * @memberof CreateAclRequestDataList + */ + data: Array; } /** * Check if a given object implements the CreateAclRequestDataList interface. */ -export function instanceOfCreateAclRequestDataList(value: object): value is CreateAclRequestDataList { - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfCreateAclRequestDataList( + value: object, +): value is CreateAclRequestDataList { + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function CreateAclRequestDataListFromJSON(json: any): CreateAclRequestDataList { - return CreateAclRequestDataListFromJSONTyped(json, false); + return CreateAclRequestDataListFromJSONTyped(json, false); } -export function CreateAclRequestDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAclRequestDataList { - if (json == null) { - return json; - } - return { - - 'data': ((json['data'] as Array).map(CreateAclRequestDataFromJSON)), - }; +export function CreateAclRequestDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateAclRequestDataList { + if (json == null) { + return json; + } + return { + data: (json["data"] as Array).map(CreateAclRequestDataFromJSON), + }; } export function CreateAclRequestDataListToJSON(json: any): CreateAclRequestDataList { - return CreateAclRequestDataListToJSONTyped(json, false); + return CreateAclRequestDataListToJSONTyped(json, false); } -export function CreateAclRequestDataListToJSONTyped(value?: CreateAclRequestDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateAclRequestDataListToJSONTyped( + value?: CreateAclRequestDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'data': ((value['data'] as Array).map(CreateAclRequestDataToJSON)), - }; + return { + data: (value["data"] as Array).map(CreateAclRequestDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/CreateLinkRequestData.ts b/src/clients/kafkaRest/models/CreateLinkRequestData.ts index 6d4e43c7ce..3bb0e45a39 100644 --- a/src/clients/kafkaRest/models/CreateLinkRequestData.ts +++ b/src/clients/kafkaRest/models/CreateLinkRequestData.ts @@ -5,101 +5,107 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigData } from './ConfigData'; +import { mapValues } from "../runtime"; +import type { ConfigData } from "./ConfigData"; import { - ConfigDataFromJSON, - ConfigDataFromJSONTyped, - ConfigDataToJSON, - ConfigDataToJSONTyped, -} from './ConfigData'; + ConfigDataFromJSON, + ConfigDataFromJSONTyped, + ConfigDataToJSON, + ConfigDataToJSONTyped, +} from "./ConfigData"; /** - * + * * @export * @interface CreateLinkRequestData */ export interface CreateLinkRequestData { - /** - * - * @type {string} - * @memberof CreateLinkRequestData - */ - source_cluster_id?: string; - /** - * - * @type {string} - * @memberof CreateLinkRequestData - */ - destination_cluster_id?: string; - /** - * The expected remote cluster ID. - * @type {string} - * @memberof CreateLinkRequestData - */ - remote_cluster_id?: string; - /** - * The expected cluster link ID. Can be provided when creating the second side of a bidirectional link for validating the link ID is as expected. If it's not provided, it's inferred from the remote cluster. - * @type {string} - * @memberof CreateLinkRequestData - */ - cluster_link_id?: string; - /** - * - * @type {Array} - * @memberof CreateLinkRequestData - */ - configs?: Array; + /** + * + * @type {string} + * @memberof CreateLinkRequestData + */ + source_cluster_id?: string; + /** + * + * @type {string} + * @memberof CreateLinkRequestData + */ + destination_cluster_id?: string; + /** + * The expected remote cluster ID. + * @type {string} + * @memberof CreateLinkRequestData + */ + remote_cluster_id?: string; + /** + * The expected cluster link ID. Can be provided when creating the second side of a bidirectional link for validating the link ID is as expected. If it's not provided, it's inferred from the remote cluster. + * @type {string} + * @memberof CreateLinkRequestData + */ + cluster_link_id?: string; + /** + * + * @type {Array} + * @memberof CreateLinkRequestData + */ + configs?: Array; } /** * Check if a given object implements the CreateLinkRequestData interface. */ export function instanceOfCreateLinkRequestData(value: object): value is CreateLinkRequestData { - return true; + return true; } export function CreateLinkRequestDataFromJSON(json: any): CreateLinkRequestData { - return CreateLinkRequestDataFromJSONTyped(json, false); + return CreateLinkRequestDataFromJSONTyped(json, false); } -export function CreateLinkRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateLinkRequestData { - if (json == null) { - return json; - } - return { - - 'source_cluster_id': json['source_cluster_id'] == null ? undefined : json['source_cluster_id'], - 'destination_cluster_id': json['destination_cluster_id'] == null ? undefined : json['destination_cluster_id'], - 'remote_cluster_id': json['remote_cluster_id'] == null ? undefined : json['remote_cluster_id'], - 'cluster_link_id': json['cluster_link_id'] == null ? undefined : json['cluster_link_id'], - 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(ConfigDataFromJSON)), - }; +export function CreateLinkRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateLinkRequestData { + if (json == null) { + return json; + } + return { + source_cluster_id: json["source_cluster_id"] == null ? undefined : json["source_cluster_id"], + destination_cluster_id: + json["destination_cluster_id"] == null ? undefined : json["destination_cluster_id"], + remote_cluster_id: json["remote_cluster_id"] == null ? undefined : json["remote_cluster_id"], + cluster_link_id: json["cluster_link_id"] == null ? undefined : json["cluster_link_id"], + configs: + json["configs"] == null ? undefined : (json["configs"] as Array).map(ConfigDataFromJSON), + }; } export function CreateLinkRequestDataToJSON(json: any): CreateLinkRequestData { - return CreateLinkRequestDataToJSONTyped(json, false); + return CreateLinkRequestDataToJSONTyped(json, false); } -export function CreateLinkRequestDataToJSONTyped(value?: CreateLinkRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateLinkRequestDataToJSONTyped( + value?: CreateLinkRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'source_cluster_id': value['source_cluster_id'], - 'destination_cluster_id': value['destination_cluster_id'], - 'remote_cluster_id': value['remote_cluster_id'], - 'cluster_link_id': value['cluster_link_id'], - 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(ConfigDataToJSON)), - }; + return { + source_cluster_id: value["source_cluster_id"], + destination_cluster_id: value["destination_cluster_id"], + remote_cluster_id: value["remote_cluster_id"], + cluster_link_id: value["cluster_link_id"], + configs: + value["configs"] == null ? undefined : (value["configs"] as Array).map(ConfigDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts b/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts index 4880f51bec..325032c74b 100644 --- a/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts +++ b/src/clients/kafkaRest/models/CreateMirrorTopicRequestData.ts @@ -5,94 +5,101 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigData } from './ConfigData'; +import { mapValues } from "../runtime"; +import type { ConfigData } from "./ConfigData"; import { - ConfigDataFromJSON, - ConfigDataFromJSONTyped, - ConfigDataToJSON, - ConfigDataToJSONTyped, -} from './ConfigData'; + ConfigDataFromJSON, + ConfigDataFromJSONTyped, + ConfigDataToJSON, + ConfigDataToJSONTyped, +} from "./ConfigData"; /** - * + * * @export * @interface CreateMirrorTopicRequestData */ export interface CreateMirrorTopicRequestData { - /** - * - * @type {string} - * @memberof CreateMirrorTopicRequestData - */ - source_topic_name: string; - /** - * - * @type {string} - * @memberof CreateMirrorTopicRequestData - */ - mirror_topic_name?: string; - /** - * - * @type {number} - * @memberof CreateMirrorTopicRequestData - */ - replication_factor?: number; - /** - * - * @type {Array} - * @memberof CreateMirrorTopicRequestData - */ - configs?: Array; + /** + * + * @type {string} + * @memberof CreateMirrorTopicRequestData + */ + source_topic_name: string; + /** + * + * @type {string} + * @memberof CreateMirrorTopicRequestData + */ + mirror_topic_name?: string; + /** + * + * @type {number} + * @memberof CreateMirrorTopicRequestData + */ + replication_factor?: number; + /** + * + * @type {Array} + * @memberof CreateMirrorTopicRequestData + */ + configs?: Array; } /** * Check if a given object implements the CreateMirrorTopicRequestData interface. */ -export function instanceOfCreateMirrorTopicRequestData(value: object): value is CreateMirrorTopicRequestData { - if (!('source_topic_name' in value) || value['source_topic_name'] === undefined) return false; - return true; +export function instanceOfCreateMirrorTopicRequestData( + value: object, +): value is CreateMirrorTopicRequestData { + if (!("source_topic_name" in value) || value["source_topic_name"] === undefined) return false; + return true; } export function CreateMirrorTopicRequestDataFromJSON(json: any): CreateMirrorTopicRequestData { - return CreateMirrorTopicRequestDataFromJSONTyped(json, false); + return CreateMirrorTopicRequestDataFromJSONTyped(json, false); } -export function CreateMirrorTopicRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateMirrorTopicRequestData { - if (json == null) { - return json; - } - return { - - 'source_topic_name': json['source_topic_name'], - 'mirror_topic_name': json['mirror_topic_name'] == null ? undefined : json['mirror_topic_name'], - 'replication_factor': json['replication_factor'] == null ? undefined : json['replication_factor'], - 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(ConfigDataFromJSON)), - }; +export function CreateMirrorTopicRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateMirrorTopicRequestData { + if (json == null) { + return json; + } + return { + source_topic_name: json["source_topic_name"], + mirror_topic_name: json["mirror_topic_name"] == null ? undefined : json["mirror_topic_name"], + replication_factor: json["replication_factor"] == null ? undefined : json["replication_factor"], + configs: + json["configs"] == null ? undefined : (json["configs"] as Array).map(ConfigDataFromJSON), + }; } export function CreateMirrorTopicRequestDataToJSON(json: any): CreateMirrorTopicRequestData { - return CreateMirrorTopicRequestDataToJSONTyped(json, false); + return CreateMirrorTopicRequestDataToJSONTyped(json, false); } -export function CreateMirrorTopicRequestDataToJSONTyped(value?: CreateMirrorTopicRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateMirrorTopicRequestDataToJSONTyped( + value?: CreateMirrorTopicRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'source_topic_name': value['source_topic_name'], - 'mirror_topic_name': value['mirror_topic_name'], - 'replication_factor': value['replication_factor'], - 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(ConfigDataToJSON)), - }; + return { + source_topic_name: value["source_topic_name"], + mirror_topic_name: value["mirror_topic_name"], + replication_factor: value["replication_factor"], + configs: + value["configs"] == null ? undefined : (value["configs"] as Array).map(ConfigDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/CreateTopicRequestData.ts b/src/clients/kafkaRest/models/CreateTopicRequestData.ts index 70d2d28e98..9c222e2509 100644 --- a/src/clients/kafkaRest/models/CreateTopicRequestData.ts +++ b/src/clients/kafkaRest/models/CreateTopicRequestData.ts @@ -5,102 +5,111 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CreateTopicRequestDataConfigsInner } from './CreateTopicRequestDataConfigsInner'; +import { mapValues } from "../runtime"; +import type { CreateTopicRequestDataConfigsInner } from "./CreateTopicRequestDataConfigsInner"; import { - CreateTopicRequestDataConfigsInnerFromJSON, - CreateTopicRequestDataConfigsInnerFromJSONTyped, - CreateTopicRequestDataConfigsInnerToJSON, - CreateTopicRequestDataConfigsInnerToJSONTyped, -} from './CreateTopicRequestDataConfigsInner'; + CreateTopicRequestDataConfigsInnerFromJSON, + CreateTopicRequestDataConfigsInnerFromJSONTyped, + CreateTopicRequestDataConfigsInnerToJSON, + CreateTopicRequestDataConfigsInnerToJSONTyped, +} from "./CreateTopicRequestDataConfigsInner"; /** - * + * * @export * @interface CreateTopicRequestData */ export interface CreateTopicRequestData { - /** - * - * @type {string} - * @memberof CreateTopicRequestData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof CreateTopicRequestData - */ - partitions_count?: number; - /** - * - * @type {number} - * @memberof CreateTopicRequestData - */ - replication_factor?: number; - /** - * - * @type {Array} - * @memberof CreateTopicRequestData - */ - configs?: Array; - /** - * - * @type {boolean} - * @memberof CreateTopicRequestData - */ - validate_only?: boolean; + /** + * + * @type {string} + * @memberof CreateTopicRequestData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof CreateTopicRequestData + */ + partitions_count?: number; + /** + * + * @type {number} + * @memberof CreateTopicRequestData + */ + replication_factor?: number; + /** + * + * @type {Array} + * @memberof CreateTopicRequestData + */ + configs?: Array; + /** + * + * @type {boolean} + * @memberof CreateTopicRequestData + */ + validate_only?: boolean; } /** * Check if a given object implements the CreateTopicRequestData interface. */ export function instanceOfCreateTopicRequestData(value: object): value is CreateTopicRequestData { - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - return true; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + return true; } export function CreateTopicRequestDataFromJSON(json: any): CreateTopicRequestData { - return CreateTopicRequestDataFromJSONTyped(json, false); + return CreateTopicRequestDataFromJSONTyped(json, false); } -export function CreateTopicRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTopicRequestData { - if (json == null) { - return json; - } - return { - - 'topic_name': json['topic_name'], - 'partitions_count': json['partitions_count'] == null ? undefined : json['partitions_count'], - 'replication_factor': json['replication_factor'] == null ? undefined : json['replication_factor'], - 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(CreateTopicRequestDataConfigsInnerFromJSON)), - 'validate_only': json['validate_only'] == null ? undefined : json['validate_only'], - }; +export function CreateTopicRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateTopicRequestData { + if (json == null) { + return json; + } + return { + topic_name: json["topic_name"], + partitions_count: json["partitions_count"] == null ? undefined : json["partitions_count"], + replication_factor: json["replication_factor"] == null ? undefined : json["replication_factor"], + configs: + json["configs"] == null + ? undefined + : (json["configs"] as Array).map(CreateTopicRequestDataConfigsInnerFromJSON), + validate_only: json["validate_only"] == null ? undefined : json["validate_only"], + }; } export function CreateTopicRequestDataToJSON(json: any): CreateTopicRequestData { - return CreateTopicRequestDataToJSONTyped(json, false); + return CreateTopicRequestDataToJSONTyped(json, false); } -export function CreateTopicRequestDataToJSONTyped(value?: CreateTopicRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateTopicRequestDataToJSONTyped( + value?: CreateTopicRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'topic_name': value['topic_name'], - 'partitions_count': value['partitions_count'], - 'replication_factor': value['replication_factor'], - 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(CreateTopicRequestDataConfigsInnerToJSON)), - 'validate_only': value['validate_only'], - }; + return { + topic_name: value["topic_name"], + partitions_count: value["partitions_count"], + replication_factor: value["replication_factor"], + configs: + value["configs"] == null + ? undefined + : (value["configs"] as Array).map(CreateTopicRequestDataConfigsInnerToJSON), + validate_only: value["validate_only"], + }; } - diff --git a/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts b/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts index 9feb3cbe59..52b3d961a9 100644 --- a/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts +++ b/src/clients/kafkaRest/models/CreateTopicRequestDataConfigsInner.ts @@ -5,70 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CreateTopicRequestDataConfigsInner */ export interface CreateTopicRequestDataConfigsInner { - /** - * - * @type {string} - * @memberof CreateTopicRequestDataConfigsInner - */ - name: string; - /** - * - * @type {string} - * @memberof CreateTopicRequestDataConfigsInner - */ - value?: string | null; + /** + * + * @type {string} + * @memberof CreateTopicRequestDataConfigsInner + */ + name: string; + /** + * + * @type {string} + * @memberof CreateTopicRequestDataConfigsInner + */ + value?: string | null; } /** * Check if a given object implements the CreateTopicRequestDataConfigsInner interface. */ -export function instanceOfCreateTopicRequestDataConfigsInner(value: object): value is CreateTopicRequestDataConfigsInner { - if (!('name' in value) || value['name'] === undefined) return false; - return true; +export function instanceOfCreateTopicRequestDataConfigsInner( + value: object, +): value is CreateTopicRequestDataConfigsInner { + if (!("name" in value) || value["name"] === undefined) return false; + return true; } -export function CreateTopicRequestDataConfigsInnerFromJSON(json: any): CreateTopicRequestDataConfigsInner { - return CreateTopicRequestDataConfigsInnerFromJSONTyped(json, false); +export function CreateTopicRequestDataConfigsInnerFromJSON( + json: any, +): CreateTopicRequestDataConfigsInner { + return CreateTopicRequestDataConfigsInnerFromJSONTyped(json, false); } -export function CreateTopicRequestDataConfigsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTopicRequestDataConfigsInner { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - }; +export function CreateTopicRequestDataConfigsInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateTopicRequestDataConfigsInner { + if (json == null) { + return json; + } + return { + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + }; } -export function CreateTopicRequestDataConfigsInnerToJSON(json: any): CreateTopicRequestDataConfigsInner { - return CreateTopicRequestDataConfigsInnerToJSONTyped(json, false); +export function CreateTopicRequestDataConfigsInnerToJSON( + json: any, +): CreateTopicRequestDataConfigsInner { + return CreateTopicRequestDataConfigsInnerToJSONTyped(json, false); } -export function CreateTopicRequestDataConfigsInnerToJSONTyped(value?: CreateTopicRequestDataConfigsInner | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateTopicRequestDataConfigsInnerToJSONTyped( + value?: CreateTopicRequestDataConfigsInner | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'value': value['value'], - }; + return { + name: value["name"], + value: value["value"], + }; } - diff --git a/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts b/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts index 6a1ee93010..35bb9f89b2 100644 --- a/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts +++ b/src/clients/kafkaRest/models/DeleteKafkaAcls200Response.ts @@ -5,70 +5,75 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AclData } from './AclData'; +import { mapValues } from "../runtime"; +import type { AclData } from "./AclData"; import { - AclDataFromJSON, - AclDataFromJSONTyped, - AclDataToJSON, - AclDataToJSONTyped, -} from './AclData'; + AclDataFromJSON, + AclDataFromJSONTyped, + AclDataToJSON, + AclDataToJSONTyped, +} from "./AclData"; /** - * + * * @export * @interface DeleteKafkaAcls200Response */ export interface DeleteKafkaAcls200Response { - /** - * - * @type {Array} - * @memberof DeleteKafkaAcls200Response - */ - data: Array; + /** + * + * @type {Array} + * @memberof DeleteKafkaAcls200Response + */ + data: Array; } /** * Check if a given object implements the DeleteKafkaAcls200Response interface. */ -export function instanceOfDeleteKafkaAcls200Response(value: object): value is DeleteKafkaAcls200Response { - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfDeleteKafkaAcls200Response( + value: object, +): value is DeleteKafkaAcls200Response { + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function DeleteKafkaAcls200ResponseFromJSON(json: any): DeleteKafkaAcls200Response { - return DeleteKafkaAcls200ResponseFromJSONTyped(json, false); + return DeleteKafkaAcls200ResponseFromJSONTyped(json, false); } -export function DeleteKafkaAcls200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteKafkaAcls200Response { - if (json == null) { - return json; - } - return { - - 'data': ((json['data'] as Array).map(AclDataFromJSON)), - }; +export function DeleteKafkaAcls200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): DeleteKafkaAcls200Response { + if (json == null) { + return json; + } + return { + data: (json["data"] as Array).map(AclDataFromJSON), + }; } export function DeleteKafkaAcls200ResponseToJSON(json: any): DeleteKafkaAcls200Response { - return DeleteKafkaAcls200ResponseToJSONTyped(json, false); + return DeleteKafkaAcls200ResponseToJSONTyped(json, false); } -export function DeleteKafkaAcls200ResponseToJSONTyped(value?: DeleteKafkaAcls200Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DeleteKafkaAcls200ResponseToJSONTyped( + value?: DeleteKafkaAcls200Response | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'data': ((value['data'] as Array).map(AclDataToJSON)), - }; + return { + data: (value["data"] as Array).map(AclDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/LinkTask.ts b/src/clients/kafkaRest/models/LinkTask.ts index 2879c0e553..7a07dd2cac 100644 --- a/src/clients/kafkaRest/models/LinkTask.ts +++ b/src/clients/kafkaRest/models/LinkTask.ts @@ -5,88 +5,88 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { LinkTaskError } from './LinkTaskError'; +import { mapValues } from "../runtime"; +import type { LinkTaskError } from "./LinkTaskError"; import { - LinkTaskErrorFromJSON, - LinkTaskErrorFromJSONTyped, - LinkTaskErrorToJSON, - LinkTaskErrorToJSONTyped, -} from './LinkTaskError'; + LinkTaskErrorFromJSON, + LinkTaskErrorFromJSONTyped, + LinkTaskErrorToJSON, + LinkTaskErrorToJSONTyped, +} from "./LinkTaskError"; /** - * + * * @export * @interface LinkTask */ export interface LinkTask { - /** - * - * @type {string} - * @memberof LinkTask - */ - task_name: string; - /** - * - * @type {string} - * @memberof LinkTask - */ - state: string; - /** - * - * @type {Array} - * @memberof LinkTask - */ - errors: Array; + /** + * + * @type {string} + * @memberof LinkTask + */ + task_name: string; + /** + * + * @type {string} + * @memberof LinkTask + */ + state: string; + /** + * + * @type {Array} + * @memberof LinkTask + */ + errors: Array; } /** * Check if a given object implements the LinkTask interface. */ export function instanceOfLinkTask(value: object): value is LinkTask { - if (!('task_name' in value) || value['task_name'] === undefined) return false; - if (!('state' in value) || value['state'] === undefined) return false; - if (!('errors' in value) || value['errors'] === undefined) return false; - return true; + if (!("task_name" in value) || value["task_name"] === undefined) return false; + if (!("state" in value) || value["state"] === undefined) return false; + if (!("errors" in value) || value["errors"] === undefined) return false; + return true; } export function LinkTaskFromJSON(json: any): LinkTask { - return LinkTaskFromJSONTyped(json, false); + return LinkTaskFromJSONTyped(json, false); } export function LinkTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkTask { - if (json == null) { - return json; - } - return { - - 'task_name': json['task_name'], - 'state': json['state'], - 'errors': ((json['errors'] as Array).map(LinkTaskErrorFromJSON)), - }; + if (json == null) { + return json; + } + return { + task_name: json["task_name"], + state: json["state"], + errors: (json["errors"] as Array).map(LinkTaskErrorFromJSON), + }; } export function LinkTaskToJSON(json: any): LinkTask { - return LinkTaskToJSONTyped(json, false); + return LinkTaskToJSONTyped(json, false); } -export function LinkTaskToJSONTyped(value?: LinkTask | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LinkTaskToJSONTyped( + value?: LinkTask | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'task_name': value['task_name'], - 'state': value['state'], - 'errors': ((value['errors'] as Array).map(LinkTaskErrorToJSON)), - }; + return { + task_name: value["task_name"], + state: value["state"], + errors: (value["errors"] as Array).map(LinkTaskErrorToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/LinkTaskError.ts b/src/clients/kafkaRest/models/LinkTaskError.ts index 64756b2c15..b45ddce6f3 100644 --- a/src/clients/kafkaRest/models/LinkTaskError.ts +++ b/src/clients/kafkaRest/models/LinkTaskError.ts @@ -5,71 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface LinkTaskError */ export interface LinkTaskError { - /** - * - * @type {string} - * @memberof LinkTaskError - */ - error_code: string; - /** - * - * @type {string} - * @memberof LinkTaskError - */ - error_message: string; + /** + * + * @type {string} + * @memberof LinkTaskError + */ + error_code: string; + /** + * + * @type {string} + * @memberof LinkTaskError + */ + error_message: string; } /** * Check if a given object implements the LinkTaskError interface. */ export function instanceOfLinkTaskError(value: object): value is LinkTaskError { - if (!('error_code' in value) || value['error_code'] === undefined) return false; - if (!('error_message' in value) || value['error_message'] === undefined) return false; - return true; + if (!("error_code" in value) || value["error_code"] === undefined) return false; + if (!("error_message" in value) || value["error_message"] === undefined) return false; + return true; } export function LinkTaskErrorFromJSON(json: any): LinkTaskError { - return LinkTaskErrorFromJSONTyped(json, false); + return LinkTaskErrorFromJSONTyped(json, false); } export function LinkTaskErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkTaskError { - if (json == null) { - return json; - } - return { - - 'error_code': json['error_code'], - 'error_message': json['error_message'], - }; + if (json == null) { + return json; + } + return { + error_code: json["error_code"], + error_message: json["error_message"], + }; } export function LinkTaskErrorToJSON(json: any): LinkTaskError { - return LinkTaskErrorToJSONTyped(json, false); + return LinkTaskErrorToJSONTyped(json, false); } -export function LinkTaskErrorToJSONTyped(value?: LinkTaskError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LinkTaskErrorToJSONTyped( + value?: LinkTaskError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error_code': value['error_code'], - 'error_message': value['error_message'], - }; + return { + error_code: value["error_code"], + error_message: value["error_message"], + }; } - diff --git a/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts b/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts index 4652834df2..f58d7b920d 100644 --- a/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts +++ b/src/clients/kafkaRest/models/ListLinkConfigsResponseData.ts @@ -5,151 +5,156 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceMetadata } from './ResourceMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ListLinkConfigsResponseData */ export interface ListLinkConfigsResponseData { - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ListLinkConfigsResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - name: string; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - value: string; - /** - * - * @type {boolean} - * @memberof ListLinkConfigsResponseData - */ - read_only: boolean; - /** - * - * @type {boolean} - * @memberof ListLinkConfigsResponseData - */ - sensitive: boolean; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - source: string; - /** - * - * @type {Array} - * @memberof ListLinkConfigsResponseData - */ - synonyms: Array; - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseData - */ - link_name: string; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ListLinkConfigsResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + name: string; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + value: string; + /** + * + * @type {boolean} + * @memberof ListLinkConfigsResponseData + */ + read_only: boolean; + /** + * + * @type {boolean} + * @memberof ListLinkConfigsResponseData + */ + sensitive: boolean; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + source: string; + /** + * + * @type {Array} + * @memberof ListLinkConfigsResponseData + */ + synonyms: Array; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseData + */ + link_name: string; } /** * Check if a given object implements the ListLinkConfigsResponseData interface. */ -export function instanceOfListLinkConfigsResponseData(value: object): value is ListLinkConfigsResponseData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('value' in value) || value['value'] === undefined) return false; - if (!('read_only' in value) || value['read_only'] === undefined) return false; - if (!('sensitive' in value) || value['sensitive'] === undefined) return false; - if (!('source' in value) || value['source'] === undefined) return false; - if (!('synonyms' in value) || value['synonyms'] === undefined) return false; - if (!('link_name' in value) || value['link_name'] === undefined) return false; - return true; +export function instanceOfListLinkConfigsResponseData( + value: object, +): value is ListLinkConfigsResponseData { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("value" in value) || value["value"] === undefined) return false; + if (!("read_only" in value) || value["read_only"] === undefined) return false; + if (!("sensitive" in value) || value["sensitive"] === undefined) return false; + if (!("source" in value) || value["source"] === undefined) return false; + if (!("synonyms" in value) || value["synonyms"] === undefined) return false; + if (!("link_name" in value) || value["link_name"] === undefined) return false; + return true; } export function ListLinkConfigsResponseDataFromJSON(json: any): ListLinkConfigsResponseData { - return ListLinkConfigsResponseDataFromJSONTyped(json, false); + return ListLinkConfigsResponseDataFromJSONTyped(json, false); } -export function ListLinkConfigsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinkConfigsResponseData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'name': json['name'], - 'value': json['value'], - 'read_only': json['read_only'], - 'sensitive': json['sensitive'], - 'source': json['source'], - 'synonyms': json['synonyms'], - 'link_name': json['link_name'], - }; +export function ListLinkConfigsResponseDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListLinkConfigsResponseData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + name: json["name"], + value: json["value"], + read_only: json["read_only"], + sensitive: json["sensitive"], + source: json["source"], + synonyms: json["synonyms"], + link_name: json["link_name"], + }; } export function ListLinkConfigsResponseDataToJSON(json: any): ListLinkConfigsResponseData { - return ListLinkConfigsResponseDataToJSONTyped(json, false); + return ListLinkConfigsResponseDataToJSONTyped(json, false); } -export function ListLinkConfigsResponseDataToJSONTyped(value?: ListLinkConfigsResponseData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListLinkConfigsResponseDataToJSONTyped( + value?: ListLinkConfigsResponseData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'name': value['name'], - 'value': value['value'], - 'read_only': value['read_only'], - 'sensitive': value['sensitive'], - 'source': value['source'], - 'synonyms': value['synonyms'], - 'link_name': value['link_name'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + name: value["name"], + value: value["value"], + read_only: value["read_only"], + sensitive: value["sensitive"], + source: value["source"], + synonyms: value["synonyms"], + link_name: value["link_name"], + }; } - diff --git a/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts b/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts index 1d85b925f0..589ecce8ec 100644 --- a/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts +++ b/src/clients/kafkaRest/models/ListLinkConfigsResponseDataList.ts @@ -5,95 +5,102 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ListLinkConfigsResponseData } from './ListLinkConfigsResponseData'; +import { mapValues } from "../runtime"; +import type { ListLinkConfigsResponseData } from "./ListLinkConfigsResponseData"; import { - ListLinkConfigsResponseDataFromJSON, - ListLinkConfigsResponseDataFromJSONTyped, - ListLinkConfigsResponseDataToJSON, - ListLinkConfigsResponseDataToJSONTyped, -} from './ListLinkConfigsResponseData'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; + ListLinkConfigsResponseDataFromJSON, + ListLinkConfigsResponseDataFromJSONTyped, + ListLinkConfigsResponseDataToJSON, + ListLinkConfigsResponseDataToJSONTyped, +} from "./ListLinkConfigsResponseData"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; /** - * + * * @export * @interface ListLinkConfigsResponseDataList */ export interface ListLinkConfigsResponseDataList { - /** - * - * @type {string} - * @memberof ListLinkConfigsResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ListLinkConfigsResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ListLinkConfigsResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ListLinkConfigsResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ListLinkConfigsResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ListLinkConfigsResponseDataList + */ + data: Array; } /** * Check if a given object implements the ListLinkConfigsResponseDataList interface. */ -export function instanceOfListLinkConfigsResponseDataList(value: object): value is ListLinkConfigsResponseDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfListLinkConfigsResponseDataList( + value: object, +): value is ListLinkConfigsResponseDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function ListLinkConfigsResponseDataListFromJSON(json: any): ListLinkConfigsResponseDataList { - return ListLinkConfigsResponseDataListFromJSONTyped(json, false); +export function ListLinkConfigsResponseDataListFromJSON( + json: any, +): ListLinkConfigsResponseDataList { + return ListLinkConfigsResponseDataListFromJSONTyped(json, false); } -export function ListLinkConfigsResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinkConfigsResponseDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ListLinkConfigsResponseDataFromJSON)), - }; +export function ListLinkConfigsResponseDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListLinkConfigsResponseDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ListLinkConfigsResponseDataFromJSON), + }; } export function ListLinkConfigsResponseDataListToJSON(json: any): ListLinkConfigsResponseDataList { - return ListLinkConfigsResponseDataListToJSONTyped(json, false); + return ListLinkConfigsResponseDataListToJSONTyped(json, false); } -export function ListLinkConfigsResponseDataListToJSONTyped(value?: ListLinkConfigsResponseDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListLinkConfigsResponseDataListToJSONTyped( + value?: ListLinkConfigsResponseDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ListLinkConfigsResponseDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ListLinkConfigsResponseDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ListLinksResponseData.ts b/src/clients/kafkaRest/models/ListLinksResponseData.ts index 51197b5aaf..48d4a91b68 100644 --- a/src/clients/kafkaRest/models/ListLinksResponseData.ts +++ b/src/clients/kafkaRest/models/ListLinksResponseData.ts @@ -5,178 +5,182 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { LinkTask } from './LinkTask'; +import { mapValues } from "../runtime"; +import type { LinkTask } from "./LinkTask"; import { - LinkTaskFromJSON, - LinkTaskFromJSONTyped, - LinkTaskToJSON, - LinkTaskToJSONTyped, -} from './LinkTask'; -import type { ResourceMetadata } from './ResourceMetadata'; + LinkTaskFromJSON, + LinkTaskFromJSONTyped, + LinkTaskToJSON, + LinkTaskToJSONTyped, +} from "./LinkTask"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ListLinksResponseData */ export interface ListLinksResponseData { - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ListLinksResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - source_cluster_id?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - destination_cluster_id?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - remote_cluster_id?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_name: string; - /** - * - * @type {string} - * @memberof ListLinksResponseData - * @deprecated - */ - link_id?: string; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - cluster_link_id: string; - /** - * - * @type {Array} - * @memberof ListLinksResponseData - */ - topic_names: Array; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_error?: string; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_error_message?: string | null; - /** - * - * @type {string} - * @memberof ListLinksResponseData - */ - link_state?: string; - /** - * - * @type {Array} - * @memberof ListLinksResponseData - */ - tasks?: Array | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ListLinksResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + source_cluster_id?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + destination_cluster_id?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + remote_cluster_id?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_name: string; + /** + * + * @type {string} + * @memberof ListLinksResponseData + * @deprecated + */ + link_id?: string; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + cluster_link_id: string; + /** + * + * @type {Array} + * @memberof ListLinksResponseData + */ + topic_names: Array; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_error?: string; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_error_message?: string | null; + /** + * + * @type {string} + * @memberof ListLinksResponseData + */ + link_state?: string; + /** + * + * @type {Array} + * @memberof ListLinksResponseData + */ + tasks?: Array | null; } /** * Check if a given object implements the ListLinksResponseData interface. */ export function instanceOfListLinksResponseData(value: object): value is ListLinksResponseData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('link_name' in value) || value['link_name'] === undefined) return false; - if (!('cluster_link_id' in value) || value['cluster_link_id'] === undefined) return false; - if (!('topic_names' in value) || value['topic_names'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("link_name" in value) || value["link_name"] === undefined) return false; + if (!("cluster_link_id" in value) || value["cluster_link_id"] === undefined) return false; + if (!("topic_names" in value) || value["topic_names"] === undefined) return false; + return true; } export function ListLinksResponseDataFromJSON(json: any): ListLinksResponseData { - return ListLinksResponseDataFromJSONTyped(json, false); + return ListLinksResponseDataFromJSONTyped(json, false); } -export function ListLinksResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinksResponseData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'source_cluster_id': json['source_cluster_id'] == null ? undefined : json['source_cluster_id'], - 'destination_cluster_id': json['destination_cluster_id'] == null ? undefined : json['destination_cluster_id'], - 'remote_cluster_id': json['remote_cluster_id'] == null ? undefined : json['remote_cluster_id'], - 'link_name': json['link_name'], - 'link_id': json['link_id'] == null ? undefined : json['link_id'], - 'cluster_link_id': json['cluster_link_id'], - 'topic_names': json['topic_names'], - 'link_error': json['link_error'] == null ? undefined : json['link_error'], - 'link_error_message': json['link_error_message'] == null ? undefined : json['link_error_message'], - 'link_state': json['link_state'] == null ? undefined : json['link_state'], - 'tasks': json['tasks'] == null ? undefined : ((json['tasks'] as Array).map(LinkTaskFromJSON)), - }; +export function ListLinksResponseDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListLinksResponseData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + source_cluster_id: json["source_cluster_id"] == null ? undefined : json["source_cluster_id"], + destination_cluster_id: + json["destination_cluster_id"] == null ? undefined : json["destination_cluster_id"], + remote_cluster_id: json["remote_cluster_id"] == null ? undefined : json["remote_cluster_id"], + link_name: json["link_name"], + link_id: json["link_id"] == null ? undefined : json["link_id"], + cluster_link_id: json["cluster_link_id"], + topic_names: json["topic_names"], + link_error: json["link_error"] == null ? undefined : json["link_error"], + link_error_message: json["link_error_message"] == null ? undefined : json["link_error_message"], + link_state: json["link_state"] == null ? undefined : json["link_state"], + tasks: json["tasks"] == null ? undefined : (json["tasks"] as Array).map(LinkTaskFromJSON), + }; } export function ListLinksResponseDataToJSON(json: any): ListLinksResponseData { - return ListLinksResponseDataToJSONTyped(json, false); + return ListLinksResponseDataToJSONTyped(json, false); } -export function ListLinksResponseDataToJSONTyped(value?: ListLinksResponseData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListLinksResponseDataToJSONTyped( + value?: ListLinksResponseData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'source_cluster_id': value['source_cluster_id'], - 'destination_cluster_id': value['destination_cluster_id'], - 'remote_cluster_id': value['remote_cluster_id'], - 'link_name': value['link_name'], - 'link_id': value['link_id'], - 'cluster_link_id': value['cluster_link_id'], - 'topic_names': value['topic_names'], - 'link_error': value['link_error'], - 'link_error_message': value['link_error_message'], - 'link_state': value['link_state'], - 'tasks': value['tasks'] == null ? undefined : ((value['tasks'] as Array).map(LinkTaskToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + source_cluster_id: value["source_cluster_id"], + destination_cluster_id: value["destination_cluster_id"], + remote_cluster_id: value["remote_cluster_id"], + link_name: value["link_name"], + link_id: value["link_id"], + cluster_link_id: value["cluster_link_id"], + topic_names: value["topic_names"], + link_error: value["link_error"], + link_error_message: value["link_error_message"], + link_state: value["link_state"], + tasks: value["tasks"] == null ? undefined : (value["tasks"] as Array).map(LinkTaskToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ListLinksResponseDataList.ts b/src/clients/kafkaRest/models/ListLinksResponseDataList.ts index 4157e6a3c7..d03539e021 100644 --- a/src/clients/kafkaRest/models/ListLinksResponseDataList.ts +++ b/src/clients/kafkaRest/models/ListLinksResponseDataList.ts @@ -5,95 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ListLinksResponseData } from './ListLinksResponseData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ListLinksResponseData } from "./ListLinksResponseData"; import { - ListLinksResponseDataFromJSON, - ListLinksResponseDataFromJSONTyped, - ListLinksResponseDataToJSON, - ListLinksResponseDataToJSONTyped, -} from './ListLinksResponseData'; + ListLinksResponseDataFromJSON, + ListLinksResponseDataFromJSONTyped, + ListLinksResponseDataToJSON, + ListLinksResponseDataToJSONTyped, +} from "./ListLinksResponseData"; /** - * + * * @export * @interface ListLinksResponseDataList */ export interface ListLinksResponseDataList { - /** - * - * @type {string} - * @memberof ListLinksResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ListLinksResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ListLinksResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ListLinksResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ListLinksResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ListLinksResponseDataList + */ + data: Array; } /** * Check if a given object implements the ListLinksResponseDataList interface. */ -export function instanceOfListLinksResponseDataList(value: object): value is ListLinksResponseDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfListLinksResponseDataList( + value: object, +): value is ListLinksResponseDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ListLinksResponseDataListFromJSON(json: any): ListLinksResponseDataList { - return ListLinksResponseDataListFromJSONTyped(json, false); + return ListLinksResponseDataListFromJSONTyped(json, false); } -export function ListLinksResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListLinksResponseDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ListLinksResponseDataFromJSON)), - }; +export function ListLinksResponseDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListLinksResponseDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ListLinksResponseDataFromJSON), + }; } export function ListLinksResponseDataListToJSON(json: any): ListLinksResponseDataList { - return ListLinksResponseDataListToJSONTyped(json, false); + return ListLinksResponseDataListToJSONTyped(json, false); } -export function ListLinksResponseDataListToJSONTyped(value?: ListLinksResponseDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListLinksResponseDataListToJSONTyped( + value?: ListLinksResponseDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ListLinksResponseDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ListLinksResponseDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts b/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts index 636aa69db2..1e0d9cc3fa 100644 --- a/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts +++ b/src/clients/kafkaRest/models/ListMirrorTopicsResponseData.ts @@ -5,173 +5,182 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { MirrorLag } from './MirrorLag'; +import { mapValues } from "../runtime"; +import type { MirrorLag } from "./MirrorLag"; import { - MirrorLagFromJSON, - MirrorLagFromJSONTyped, - MirrorLagToJSON, - MirrorLagToJSONTyped, -} from './MirrorLag'; -import type { MirrorTopicStatus } from './MirrorTopicStatus'; + MirrorLagFromJSON, + MirrorLagFromJSONTyped, + MirrorLagToJSON, + MirrorLagToJSONTyped, +} from "./MirrorLag"; +import type { MirrorTopicStatus } from "./MirrorTopicStatus"; import { - MirrorTopicStatusFromJSON, - MirrorTopicStatusFromJSONTyped, - MirrorTopicStatusToJSON, - MirrorTopicStatusToJSONTyped, -} from './MirrorTopicStatus'; -import type { LinkTaskError } from './LinkTaskError'; + MirrorTopicStatusFromJSON, + MirrorTopicStatusFromJSONTyped, + MirrorTopicStatusToJSON, + MirrorTopicStatusToJSONTyped, +} from "./MirrorTopicStatus"; +import type { LinkTaskError } from "./LinkTaskError"; import { - LinkTaskErrorFromJSON, - LinkTaskErrorFromJSONTyped, - LinkTaskErrorToJSON, - LinkTaskErrorToJSONTyped, -} from './LinkTaskError'; -import type { ResourceMetadata } from './ResourceMetadata'; + LinkTaskErrorFromJSON, + LinkTaskErrorFromJSONTyped, + LinkTaskErrorToJSON, + LinkTaskErrorToJSONTyped, +} from "./LinkTaskError"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ListMirrorTopicsResponseData */ export interface ListMirrorTopicsResponseData { - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ListMirrorTopicsResponseData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - link_name: string; - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - mirror_topic_name: string; - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseData - */ - source_topic_name: string; - /** - * - * @type {number} - * @memberof ListMirrorTopicsResponseData - */ - num_partitions: number; - /** - * - * @type {Array} - * @memberof ListMirrorTopicsResponseData - */ - mirror_lags: Array; - /** - * - * @type {MirrorTopicStatus} - * @memberof ListMirrorTopicsResponseData - */ - mirror_status: MirrorTopicStatus; - /** - * - * @type {number} - * @memberof ListMirrorTopicsResponseData - */ - state_time_ms: number; - /** - * - * @type {Array} - * @memberof ListMirrorTopicsResponseData - */ - mirror_state_transition_errors?: Array; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ListMirrorTopicsResponseData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + link_name: string; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + mirror_topic_name: string; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseData + */ + source_topic_name: string; + /** + * + * @type {number} + * @memberof ListMirrorTopicsResponseData + */ + num_partitions: number; + /** + * + * @type {Array} + * @memberof ListMirrorTopicsResponseData + */ + mirror_lags: Array; + /** + * + * @type {MirrorTopicStatus} + * @memberof ListMirrorTopicsResponseData + */ + mirror_status: MirrorTopicStatus; + /** + * + * @type {number} + * @memberof ListMirrorTopicsResponseData + */ + state_time_ms: number; + /** + * + * @type {Array} + * @memberof ListMirrorTopicsResponseData + */ + mirror_state_transition_errors?: Array; } - - /** * Check if a given object implements the ListMirrorTopicsResponseData interface. */ -export function instanceOfListMirrorTopicsResponseData(value: object): value is ListMirrorTopicsResponseData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('link_name' in value) || value['link_name'] === undefined) return false; - if (!('mirror_topic_name' in value) || value['mirror_topic_name'] === undefined) return false; - if (!('source_topic_name' in value) || value['source_topic_name'] === undefined) return false; - if (!('num_partitions' in value) || value['num_partitions'] === undefined) return false; - if (!('mirror_lags' in value) || value['mirror_lags'] === undefined) return false; - if (!('mirror_status' in value) || value['mirror_status'] === undefined) return false; - if (!('state_time_ms' in value) || value['state_time_ms'] === undefined) return false; - return true; +export function instanceOfListMirrorTopicsResponseData( + value: object, +): value is ListMirrorTopicsResponseData { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("link_name" in value) || value["link_name"] === undefined) return false; + if (!("mirror_topic_name" in value) || value["mirror_topic_name"] === undefined) return false; + if (!("source_topic_name" in value) || value["source_topic_name"] === undefined) return false; + if (!("num_partitions" in value) || value["num_partitions"] === undefined) return false; + if (!("mirror_lags" in value) || value["mirror_lags"] === undefined) return false; + if (!("mirror_status" in value) || value["mirror_status"] === undefined) return false; + if (!("state_time_ms" in value) || value["state_time_ms"] === undefined) return false; + return true; } export function ListMirrorTopicsResponseDataFromJSON(json: any): ListMirrorTopicsResponseData { - return ListMirrorTopicsResponseDataFromJSONTyped(json, false); + return ListMirrorTopicsResponseDataFromJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMirrorTopicsResponseData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'link_name': json['link_name'], - 'mirror_topic_name': json['mirror_topic_name'], - 'source_topic_name': json['source_topic_name'], - 'num_partitions': json['num_partitions'], - 'mirror_lags': ((json['mirror_lags'] as Array).map(MirrorLagFromJSON)), - 'mirror_status': MirrorTopicStatusFromJSON(json['mirror_status']), - 'state_time_ms': json['state_time_ms'], - 'mirror_state_transition_errors': json['mirror_state_transition_errors'] == null ? undefined : ((json['mirror_state_transition_errors'] as Array).map(LinkTaskErrorFromJSON)), - }; +export function ListMirrorTopicsResponseDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListMirrorTopicsResponseData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + link_name: json["link_name"], + mirror_topic_name: json["mirror_topic_name"], + source_topic_name: json["source_topic_name"], + num_partitions: json["num_partitions"], + mirror_lags: (json["mirror_lags"] as Array).map(MirrorLagFromJSON), + mirror_status: MirrorTopicStatusFromJSON(json["mirror_status"]), + state_time_ms: json["state_time_ms"], + mirror_state_transition_errors: + json["mirror_state_transition_errors"] == null + ? undefined + : (json["mirror_state_transition_errors"] as Array).map(LinkTaskErrorFromJSON), + }; } export function ListMirrorTopicsResponseDataToJSON(json: any): ListMirrorTopicsResponseData { - return ListMirrorTopicsResponseDataToJSONTyped(json, false); + return ListMirrorTopicsResponseDataToJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataToJSONTyped(value?: ListMirrorTopicsResponseData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMirrorTopicsResponseDataToJSONTyped( + value?: ListMirrorTopicsResponseData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'link_name': value['link_name'], - 'mirror_topic_name': value['mirror_topic_name'], - 'source_topic_name': value['source_topic_name'], - 'num_partitions': value['num_partitions'], - 'mirror_lags': ((value['mirror_lags'] as Array).map(MirrorLagToJSON)), - 'mirror_status': MirrorTopicStatusToJSON(value['mirror_status']), - 'state_time_ms': value['state_time_ms'], - 'mirror_state_transition_errors': value['mirror_state_transition_errors'] == null ? undefined : ((value['mirror_state_transition_errors'] as Array).map(LinkTaskErrorToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + link_name: value["link_name"], + mirror_topic_name: value["mirror_topic_name"], + source_topic_name: value["source_topic_name"], + num_partitions: value["num_partitions"], + mirror_lags: (value["mirror_lags"] as Array).map(MirrorLagToJSON), + mirror_status: MirrorTopicStatusToJSON(value["mirror_status"]), + state_time_ms: value["state_time_ms"], + mirror_state_transition_errors: + value["mirror_state_transition_errors"] == null + ? undefined + : (value["mirror_state_transition_errors"] as Array).map(LinkTaskErrorToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts b/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts index 315ea8f6ee..a11d8cfa5a 100644 --- a/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts +++ b/src/clients/kafkaRest/models/ListMirrorTopicsResponseDataList.ts @@ -5,95 +5,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ListMirrorTopicsResponseData } from './ListMirrorTopicsResponseData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ListMirrorTopicsResponseData } from "./ListMirrorTopicsResponseData"; import { - ListMirrorTopicsResponseDataFromJSON, - ListMirrorTopicsResponseDataFromJSONTyped, - ListMirrorTopicsResponseDataToJSON, - ListMirrorTopicsResponseDataToJSONTyped, -} from './ListMirrorTopicsResponseData'; + ListMirrorTopicsResponseDataFromJSON, + ListMirrorTopicsResponseDataFromJSONTyped, + ListMirrorTopicsResponseDataToJSON, + ListMirrorTopicsResponseDataToJSONTyped, +} from "./ListMirrorTopicsResponseData"; /** - * + * * @export * @interface ListMirrorTopicsResponseDataList */ export interface ListMirrorTopicsResponseDataList { - /** - * - * @type {string} - * @memberof ListMirrorTopicsResponseDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ListMirrorTopicsResponseDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ListMirrorTopicsResponseDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ListMirrorTopicsResponseDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ListMirrorTopicsResponseDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ListMirrorTopicsResponseDataList + */ + data: Array; } /** * Check if a given object implements the ListMirrorTopicsResponseDataList interface. */ -export function instanceOfListMirrorTopicsResponseDataList(value: object): value is ListMirrorTopicsResponseDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfListMirrorTopicsResponseDataList( + value: object, +): value is ListMirrorTopicsResponseDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function ListMirrorTopicsResponseDataListFromJSON(json: any): ListMirrorTopicsResponseDataList { - return ListMirrorTopicsResponseDataListFromJSONTyped(json, false); +export function ListMirrorTopicsResponseDataListFromJSON( + json: any, +): ListMirrorTopicsResponseDataList { + return ListMirrorTopicsResponseDataListFromJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMirrorTopicsResponseDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ListMirrorTopicsResponseDataFromJSON)), - }; +export function ListMirrorTopicsResponseDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ListMirrorTopicsResponseDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ListMirrorTopicsResponseDataFromJSON), + }; } -export function ListMirrorTopicsResponseDataListToJSON(json: any): ListMirrorTopicsResponseDataList { - return ListMirrorTopicsResponseDataListToJSONTyped(json, false); +export function ListMirrorTopicsResponseDataListToJSON( + json: any, +): ListMirrorTopicsResponseDataList { + return ListMirrorTopicsResponseDataListToJSONTyped(json, false); } -export function ListMirrorTopicsResponseDataListToJSONTyped(value?: ListMirrorTopicsResponseDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMirrorTopicsResponseDataListToJSONTyped( + value?: ListMirrorTopicsResponseDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ListMirrorTopicsResponseDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ListMirrorTopicsResponseDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/MirrorLag.ts b/src/clients/kafkaRest/models/MirrorLag.ts index 36db0cf649..9f5b9574c7 100644 --- a/src/clients/kafkaRest/models/MirrorLag.ts +++ b/src/clients/kafkaRest/models/MirrorLag.ts @@ -5,80 +5,81 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface MirrorLag */ export interface MirrorLag { - /** - * - * @type {number} - * @memberof MirrorLag - */ - partition: number; - /** - * - * @type {number} - * @memberof MirrorLag - */ - lag: number; - /** - * - * @type {number} - * @memberof MirrorLag - */ - last_source_fetch_offset: number; + /** + * + * @type {number} + * @memberof MirrorLag + */ + partition: number; + /** + * + * @type {number} + * @memberof MirrorLag + */ + lag: number; + /** + * + * @type {number} + * @memberof MirrorLag + */ + last_source_fetch_offset: number; } /** * Check if a given object implements the MirrorLag interface. */ export function instanceOfMirrorLag(value: object): value is MirrorLag { - if (!('partition' in value) || value['partition'] === undefined) return false; - if (!('lag' in value) || value['lag'] === undefined) return false; - if (!('last_source_fetch_offset' in value) || value['last_source_fetch_offset'] === undefined) return false; - return true; + if (!("partition" in value) || value["partition"] === undefined) return false; + if (!("lag" in value) || value["lag"] === undefined) return false; + if (!("last_source_fetch_offset" in value) || value["last_source_fetch_offset"] === undefined) + return false; + return true; } export function MirrorLagFromJSON(json: any): MirrorLag { - return MirrorLagFromJSONTyped(json, false); + return MirrorLagFromJSONTyped(json, false); } export function MirrorLagFromJSONTyped(json: any, ignoreDiscriminator: boolean): MirrorLag { - if (json == null) { - return json; - } - return { - - 'partition': json['partition'], - 'lag': json['lag'], - 'last_source_fetch_offset': json['last_source_fetch_offset'], - }; + if (json == null) { + return json; + } + return { + partition: json["partition"], + lag: json["lag"], + last_source_fetch_offset: json["last_source_fetch_offset"], + }; } export function MirrorLagToJSON(json: any): MirrorLag { - return MirrorLagToJSONTyped(json, false); + return MirrorLagToJSONTyped(json, false); } -export function MirrorLagToJSONTyped(value?: MirrorLag | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MirrorLagToJSONTyped( + value?: MirrorLag | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partition': value['partition'], - 'lag': value['lag'], - 'last_source_fetch_offset': value['last_source_fetch_offset'], - }; + return { + partition: value["partition"], + lag: value["lag"], + last_source_fetch_offset: value["last_source_fetch_offset"], + }; } - diff --git a/src/clients/kafkaRest/models/MirrorTopicStatus.ts b/src/clients/kafkaRest/models/MirrorTopicStatus.ts index 208818ce59..05d3be4f2e 100644 --- a/src/clients/kafkaRest/models/MirrorTopicStatus.ts +++ b/src/clients/kafkaRest/models/MirrorTopicStatus.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,48 +13,52 @@ */ /** - * + * * @export * @enum {string} */ export enum MirrorTopicStatus { - Active = 'ACTIVE', - Failed = 'FAILED', - LinkFailed = 'LINK_FAILED', - LinkPaused = 'LINK_PAUSED', - Paused = 'PAUSED', - PendingStopped = 'PENDING_STOPPED', - SourceUnavailable = 'SOURCE_UNAVAILABLE', - Stopped = 'STOPPED', - PendingMirror = 'PENDING_MIRROR', - PendingSynchronize = 'PENDING_SYNCHRONIZE' + Active = "ACTIVE", + Failed = "FAILED", + LinkFailed = "LINK_FAILED", + LinkPaused = "LINK_PAUSED", + Paused = "PAUSED", + PendingStopped = "PENDING_STOPPED", + SourceUnavailable = "SOURCE_UNAVAILABLE", + Stopped = "STOPPED", + PendingMirror = "PENDING_MIRROR", + PendingSynchronize = "PENDING_SYNCHRONIZE", } - export function instanceOfMirrorTopicStatus(value: any): boolean { - for (const key in MirrorTopicStatus) { - if (Object.prototype.hasOwnProperty.call(MirrorTopicStatus, key)) { - if (MirrorTopicStatus[key as keyof typeof MirrorTopicStatus] === value) { - return true; - } - } + for (const key in MirrorTopicStatus) { + if (Object.prototype.hasOwnProperty.call(MirrorTopicStatus, key)) { + if (MirrorTopicStatus[key as keyof typeof MirrorTopicStatus] === value) { + return true; + } } - return false; + } + return false; } export function MirrorTopicStatusFromJSON(json: any): MirrorTopicStatus { - return MirrorTopicStatusFromJSONTyped(json, false); + return MirrorTopicStatusFromJSONTyped(json, false); } -export function MirrorTopicStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): MirrorTopicStatus { - return json as MirrorTopicStatus; +export function MirrorTopicStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): MirrorTopicStatus { + return json as MirrorTopicStatus; } export function MirrorTopicStatusToJSON(value?: MirrorTopicStatus | null): any { - return value as any; + return value as any; } -export function MirrorTopicStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): MirrorTopicStatus { - return value as MirrorTopicStatus; +export function MirrorTopicStatusToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): MirrorTopicStatus { + return value as MirrorTopicStatus; } - diff --git a/src/clients/kafkaRest/models/ModelError.ts b/src/clients/kafkaRest/models/ModelError.ts index 896a62946b..cd81269b36 100644 --- a/src/clients/kafkaRest/models/ModelError.ts +++ b/src/clients/kafkaRest/models/ModelError.ts @@ -5,71 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ModelError */ export interface ModelError { - /** - * - * @type {number} - * @memberof ModelError - */ - error_code: number; - /** - * - * @type {string} - * @memberof ModelError - */ - message: string | null; + /** + * + * @type {number} + * @memberof ModelError + */ + error_code: number; + /** + * + * @type {string} + * @memberof ModelError + */ + message: string | null; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - if (!('error_code' in value) || value['error_code'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - return true; + if (!("error_code" in value) || value["error_code"] === undefined) return false; + if (!("message" in value) || value["message"] === undefined) return false; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - - 'error_code': json['error_code'], - 'message': json['message'], - }; + if (json == null) { + return json; + } + return { + error_code: json["error_code"], + message: json["message"], + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped( + value?: ModelError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error_code': value['error_code'], - 'message': value['message'], - }; + return { + error_code: value["error_code"], + message: value["message"], + }; } - diff --git a/src/clients/kafkaRest/models/PartitionData.ts b/src/clients/kafkaRest/models/PartitionData.ts index 144869b501..27ec738a7a 100644 --- a/src/clients/kafkaRest/models/PartitionData.ts +++ b/src/clients/kafkaRest/models/PartitionData.ts @@ -5,139 +5,139 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface PartitionData */ export interface PartitionData { - /** - * - * @type {string} - * @memberof PartitionData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof PartitionData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof PartitionData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof PartitionData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof PartitionData - */ - partition_id: number; - /** - * - * @type {Relationship} - * @memberof PartitionData - */ - leader?: Relationship; - /** - * - * @type {Relationship} - * @memberof PartitionData - */ - replicas: Relationship; - /** - * - * @type {Relationship} - * @memberof PartitionData - */ - reassignment: Relationship; + /** + * + * @type {string} + * @memberof PartitionData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof PartitionData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof PartitionData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof PartitionData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof PartitionData + */ + partition_id: number; + /** + * + * @type {Relationship} + * @memberof PartitionData + */ + leader?: Relationship; + /** + * + * @type {Relationship} + * @memberof PartitionData + */ + replicas: Relationship; + /** + * + * @type {Relationship} + * @memberof PartitionData + */ + reassignment: Relationship; } /** * Check if a given object implements the PartitionData interface. */ export function instanceOfPartitionData(value: object): value is PartitionData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('partition_id' in value) || value['partition_id'] === undefined) return false; - if (!('replicas' in value) || value['replicas'] === undefined) return false; - if (!('reassignment' in value) || value['reassignment'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("partition_id" in value) || value["partition_id"] === undefined) return false; + if (!("replicas" in value) || value["replicas"] === undefined) return false; + if (!("reassignment" in value) || value["reassignment"] === undefined) return false; + return true; } export function PartitionDataFromJSON(json: any): PartitionData { - return PartitionDataFromJSONTyped(json, false); + return PartitionDataFromJSONTyped(json, false); } export function PartitionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'topic_name': json['topic_name'], - 'partition_id': json['partition_id'], - 'leader': json['leader'] == null ? undefined : RelationshipFromJSON(json['leader']), - 'replicas': RelationshipFromJSON(json['replicas']), - 'reassignment': RelationshipFromJSON(json['reassignment']), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + topic_name: json["topic_name"], + partition_id: json["partition_id"], + leader: json["leader"] == null ? undefined : RelationshipFromJSON(json["leader"]), + replicas: RelationshipFromJSON(json["replicas"]), + reassignment: RelationshipFromJSON(json["reassignment"]), + }; } export function PartitionDataToJSON(json: any): PartitionData { - return PartitionDataToJSONTyped(json, false); + return PartitionDataToJSONTyped(json, false); } -export function PartitionDataToJSONTyped(value?: PartitionData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PartitionDataToJSONTyped( + value?: PartitionData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'leader': RelationshipToJSON(value['leader']), - 'replicas': RelationshipToJSON(value['replicas']), - 'reassignment': RelationshipToJSON(value['reassignment']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + leader: RelationshipToJSON(value["leader"]), + replicas: RelationshipToJSON(value["replicas"]), + reassignment: RelationshipToJSON(value["reassignment"]), + }; } - diff --git a/src/clients/kafkaRest/models/PartitionDataList.ts b/src/clients/kafkaRest/models/PartitionDataList.ts index cab6a045c1..3100b1deb2 100644 --- a/src/clients/kafkaRest/models/PartitionDataList.ts +++ b/src/clients/kafkaRest/models/PartitionDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { PartitionData } from './PartitionData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { PartitionData } from "./PartitionData"; import { - PartitionDataFromJSON, - PartitionDataFromJSONTyped, - PartitionDataToJSON, - PartitionDataToJSONTyped, -} from './PartitionData'; + PartitionDataFromJSON, + PartitionDataFromJSONTyped, + PartitionDataToJSON, + PartitionDataToJSONTyped, +} from "./PartitionData"; /** - * + * * @export * @interface PartitionDataList */ export interface PartitionDataList { - /** - * - * @type {string} - * @memberof PartitionDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof PartitionDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof PartitionDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof PartitionDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof PartitionDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof PartitionDataList + */ + data: Array; } /** * Check if a given object implements the PartitionDataList interface. */ export function instanceOfPartitionDataList(value: object): value is PartitionDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function PartitionDataListFromJSON(json: any): PartitionDataList { - return PartitionDataListFromJSONTyped(json, false); + return PartitionDataListFromJSONTyped(json, false); } -export function PartitionDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(PartitionDataFromJSON)), - }; +export function PartitionDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PartitionDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(PartitionDataFromJSON), + }; } export function PartitionDataListToJSON(json: any): PartitionDataList { - return PartitionDataListToJSONTyped(json, false); + return PartitionDataListToJSONTyped(json, false); } -export function PartitionDataListToJSONTyped(value?: PartitionDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PartitionDataListToJSONTyped( + value?: PartitionDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(PartitionDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(PartitionDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ProduceRequest.ts b/src/clients/kafkaRest/models/ProduceRequest.ts index e6624f5537..0d0d3095ec 100644 --- a/src/clients/kafkaRest/models/ProduceRequest.ts +++ b/src/clients/kafkaRest/models/ProduceRequest.ts @@ -5,108 +5,117 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ProduceRequestHeader } from './ProduceRequestHeader'; +import { mapValues } from "../runtime"; +import type { ProduceRequestHeader } from "./ProduceRequestHeader"; import { - ProduceRequestHeaderFromJSON, - ProduceRequestHeaderFromJSONTyped, - ProduceRequestHeaderToJSON, - ProduceRequestHeaderToJSONTyped, -} from './ProduceRequestHeader'; -import type { ProduceRequestData } from './ProduceRequestData'; + ProduceRequestHeaderFromJSON, + ProduceRequestHeaderFromJSONTyped, + ProduceRequestHeaderToJSON, + ProduceRequestHeaderToJSONTyped, +} from "./ProduceRequestHeader"; +import type { ProduceRequestData } from "./ProduceRequestData"; import { - ProduceRequestDataFromJSON, - ProduceRequestDataFromJSONTyped, - ProduceRequestDataToJSON, - ProduceRequestDataToJSONTyped, -} from './ProduceRequestData'; + ProduceRequestDataFromJSON, + ProduceRequestDataFromJSONTyped, + ProduceRequestDataToJSON, + ProduceRequestDataToJSONTyped, +} from "./ProduceRequestData"; /** - * + * * @export * @interface ProduceRequest */ export interface ProduceRequest { - /** - * - * @type {number} - * @memberof ProduceRequest - */ - partition_id?: number | null; - /** - * - * @type {Array} - * @memberof ProduceRequest - */ - headers?: Array; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - key?: ProduceRequestData | null; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - value?: ProduceRequestData | null; - /** - * - * @type {Date} - * @memberof ProduceRequest - */ - timestamp?: Date | null; + /** + * + * @type {number} + * @memberof ProduceRequest + */ + partition_id?: number | null; + /** + * + * @type {Array} + * @memberof ProduceRequest + */ + headers?: Array; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + key?: ProduceRequestData | null; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + value?: ProduceRequestData | null; + /** + * + * @type {Date} + * @memberof ProduceRequest + */ + timestamp?: Date | null; } /** * Check if a given object implements the ProduceRequest interface. */ export function instanceOfProduceRequest(value: object): value is ProduceRequest { - return true; + return true; } export function ProduceRequestFromJSON(json: any): ProduceRequest { - return ProduceRequestFromJSONTyped(json, false); + return ProduceRequestFromJSONTyped(json, false); } -export function ProduceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequest { - if (json == null) { - return json; - } - return { - - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'headers': json['headers'] == null ? undefined : ((json['headers'] as Array).map(ProduceRequestHeaderFromJSON)), - 'key': json['key'] == null ? undefined : ProduceRequestDataFromJSON(json['key']), - 'value': json['value'] == null ? undefined : ProduceRequestDataFromJSON(json['value']), - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - }; +export function ProduceRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceRequest { + if (json == null) { + return json; + } + return { + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + headers: + json["headers"] == null + ? undefined + : (json["headers"] as Array).map(ProduceRequestHeaderFromJSON), + key: json["key"] == null ? undefined : ProduceRequestDataFromJSON(json["key"]), + value: json["value"] == null ? undefined : ProduceRequestDataFromJSON(json["value"]), + timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), + }; } export function ProduceRequestToJSON(json: any): ProduceRequest { - return ProduceRequestToJSONTyped(json, false); + return ProduceRequestToJSONTyped(json, false); } -export function ProduceRequestToJSONTyped(value?: ProduceRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceRequestToJSONTyped( + value?: ProduceRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partition_id': value['partition_id'], - 'headers': value['headers'] == null ? undefined : ((value['headers'] as Array).map(ProduceRequestHeaderToJSON)), - 'key': ProduceRequestDataToJSON(value['key']), - 'value': ProduceRequestDataToJSON(value['value']), - 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp'] as any).toISOString()), - }; + return { + partition_id: value["partition_id"], + headers: + value["headers"] == null + ? undefined + : (value["headers"] as Array).map(ProduceRequestHeaderToJSON), + key: ProduceRequestDataToJSON(value["key"]), + value: ProduceRequestDataToJSON(value["value"]), + timestamp: value["timestamp"] == null ? undefined : (value["timestamp"] as any).toISOString(), + }; } - diff --git a/src/clients/kafkaRest/models/ProduceRequestData.ts b/src/clients/kafkaRest/models/ProduceRequestData.ts index 1a71365054..66d674c39c 100644 --- a/src/clients/kafkaRest/models/ProduceRequestData.ts +++ b/src/clients/kafkaRest/models/ProduceRequestData.ts @@ -5,93 +5,97 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProduceRequestData */ export interface ProduceRequestData { - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - type?: string; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject?: string | null; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject_name_strategy?: string | null; - /** - * - * @type {number} - * @memberof ProduceRequestData - */ - schema_version?: number | null; - /** - * - * @type {any} - * @memberof ProduceRequestData - */ - data?: any | null; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + type?: string; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject?: string | null; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject_name_strategy?: string | null; + /** + * + * @type {number} + * @memberof ProduceRequestData + */ + schema_version?: number | null; + /** + * + * @type {any} + * @memberof ProduceRequestData + */ + data?: any | null; } /** * Check if a given object implements the ProduceRequestData interface. */ export function instanceOfProduceRequestData(value: object): value is ProduceRequestData { - return true; + return true; } export function ProduceRequestDataFromJSON(json: any): ProduceRequestData { - return ProduceRequestDataFromJSONTyped(json, false); + return ProduceRequestDataFromJSONTyped(json, false); } -export function ProduceRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestData { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'subject': json['subject'] == null ? undefined : json['subject'], - 'subject_name_strategy': json['subject_name_strategy'] == null ? undefined : json['subject_name_strategy'], - 'schema_version': json['schema_version'] == null ? undefined : json['schema_version'], - 'data': json['data'] == null ? undefined : json['data'], - }; +export function ProduceRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceRequestData { + if (json == null) { + return json; + } + return { + type: json["type"] == null ? undefined : json["type"], + subject: json["subject"] == null ? undefined : json["subject"], + subject_name_strategy: + json["subject_name_strategy"] == null ? undefined : json["subject_name_strategy"], + schema_version: json["schema_version"] == null ? undefined : json["schema_version"], + data: json["data"] == null ? undefined : json["data"], + }; } export function ProduceRequestDataToJSON(json: any): ProduceRequestData { - return ProduceRequestDataToJSONTyped(json, false); + return ProduceRequestDataToJSONTyped(json, false); } -export function ProduceRequestDataToJSONTyped(value?: ProduceRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceRequestDataToJSONTyped( + value?: ProduceRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'subject': value['subject'], - 'subject_name_strategy': value['subject_name_strategy'], - 'schema_version': value['schema_version'], - 'data': value['data'], - }; + return { + type: value["type"], + subject: value["subject"], + subject_name_strategy: value["subject_name_strategy"], + schema_version: value["schema_version"], + data: value["data"], + }; } - diff --git a/src/clients/kafkaRest/models/ProduceRequestHeader.ts b/src/clients/kafkaRest/models/ProduceRequestHeader.ts index af27b1353d..6fe917915b 100644 --- a/src/clients/kafkaRest/models/ProduceRequestHeader.ts +++ b/src/clients/kafkaRest/models/ProduceRequestHeader.ts @@ -5,70 +5,73 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProduceRequestHeader */ export interface ProduceRequestHeader { - /** - * - * @type {string} - * @memberof ProduceRequestHeader - */ - name: string; - /** - * - * @type {string} - * @memberof ProduceRequestHeader - */ - value?: string | null; + /** + * + * @type {string} + * @memberof ProduceRequestHeader + */ + name: string; + /** + * + * @type {string} + * @memberof ProduceRequestHeader + */ + value?: string | null; } /** * Check if a given object implements the ProduceRequestHeader interface. */ export function instanceOfProduceRequestHeader(value: object): value is ProduceRequestHeader { - if (!('name' in value) || value['name'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + return true; } export function ProduceRequestHeaderFromJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderFromJSONTyped(json, false); + return ProduceRequestHeaderFromJSONTyped(json, false); } -export function ProduceRequestHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestHeader { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - }; +export function ProduceRequestHeaderFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceRequestHeader { + if (json == null) { + return json; + } + return { + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + }; } export function ProduceRequestHeaderToJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderToJSONTyped(json, false); + return ProduceRequestHeaderToJSONTyped(json, false); } -export function ProduceRequestHeaderToJSONTyped(value?: ProduceRequestHeader | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceRequestHeaderToJSONTyped( + value?: ProduceRequestHeader | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'value': value['value'], - }; + return { + name: value["name"], + value: value["value"], + }; } - diff --git a/src/clients/kafkaRest/models/ProduceResponse.ts b/src/clients/kafkaRest/models/ProduceResponse.ts index e2bb21cd78..f19b561258 100644 --- a/src/clients/kafkaRest/models/ProduceResponse.ts +++ b/src/clients/kafkaRest/models/ProduceResponse.ts @@ -5,134 +5,137 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ProduceResponseData } from './ProduceResponseData'; +import { mapValues } from "../runtime"; +import type { ProduceResponseData } from "./ProduceResponseData"; import { - ProduceResponseDataFromJSON, - ProduceResponseDataFromJSONTyped, - ProduceResponseDataToJSON, - ProduceResponseDataToJSONTyped, -} from './ProduceResponseData'; + ProduceResponseDataFromJSON, + ProduceResponseDataFromJSONTyped, + ProduceResponseDataToJSON, + ProduceResponseDataToJSONTyped, +} from "./ProduceResponseData"; /** - * + * * @export * @interface ProduceResponse */ export interface ProduceResponse { - /** - * - * @type {number} - * @memberof ProduceResponse - */ - error_code: number; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - message?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - cluster_id?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - topic_name?: string; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - offset?: number; - /** - * - * @type {Date} - * @memberof ProduceResponse - */ - timestamp?: Date | null; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - key?: ProduceResponseData | null; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - value?: ProduceResponseData | null; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + error_code: number; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + cluster_id?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + topic_name?: string; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + offset?: number; + /** + * + * @type {Date} + * @memberof ProduceResponse + */ + timestamp?: Date | null; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + key?: ProduceResponseData | null; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + value?: ProduceResponseData | null; } /** * Check if a given object implements the ProduceResponse interface. */ export function instanceOfProduceResponse(value: object): value is ProduceResponse { - if (!('error_code' in value) || value['error_code'] === undefined) return false; - return true; + if (!("error_code" in value) || value["error_code"] === undefined) return false; + return true; } export function ProduceResponseFromJSON(json: any): ProduceResponse { - return ProduceResponseFromJSONTyped(json, false); + return ProduceResponseFromJSONTyped(json, false); } -export function ProduceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponse { - if (json == null) { - return json; - } - return { - - 'error_code': json['error_code'], - 'message': json['message'] == null ? undefined : json['message'], - 'cluster_id': json['cluster_id'] == null ? undefined : json['cluster_id'], - 'topic_name': json['topic_name'] == null ? undefined : json['topic_name'], - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'offset': json['offset'] == null ? undefined : json['offset'], - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - 'key': json['key'] == null ? undefined : ProduceResponseDataFromJSON(json['key']), - 'value': json['value'] == null ? undefined : ProduceResponseDataFromJSON(json['value']), - }; +export function ProduceResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceResponse { + if (json == null) { + return json; + } + return { + error_code: json["error_code"], + message: json["message"] == null ? undefined : json["message"], + cluster_id: json["cluster_id"] == null ? undefined : json["cluster_id"], + topic_name: json["topic_name"] == null ? undefined : json["topic_name"], + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + offset: json["offset"] == null ? undefined : json["offset"], + timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), + key: json["key"] == null ? undefined : ProduceResponseDataFromJSON(json["key"]), + value: json["value"] == null ? undefined : ProduceResponseDataFromJSON(json["value"]), + }; } export function ProduceResponseToJSON(json: any): ProduceResponse { - return ProduceResponseToJSONTyped(json, false); + return ProduceResponseToJSONTyped(json, false); } -export function ProduceResponseToJSONTyped(value?: ProduceResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceResponseToJSONTyped( + value?: ProduceResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error_code': value['error_code'], - 'message': value['message'], - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'offset': value['offset'], - 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp'] as any).toISOString()), - 'key': ProduceResponseDataToJSON(value['key']), - 'value': ProduceResponseDataToJSON(value['value']), - }; + return { + error_code: value["error_code"], + message: value["message"], + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + offset: value["offset"], + timestamp: value["timestamp"] == null ? undefined : (value["timestamp"] as any).toISOString(), + key: ProduceResponseDataToJSON(value["key"]), + value: ProduceResponseDataToJSON(value["value"]), + }; } - diff --git a/src/clients/kafkaRest/models/ProduceResponseData.ts b/src/clients/kafkaRest/models/ProduceResponseData.ts index 6e130d2c62..2a961c9e15 100644 --- a/src/clients/kafkaRest/models/ProduceResponseData.ts +++ b/src/clients/kafkaRest/models/ProduceResponseData.ts @@ -5,71 +5,74 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProduceResponseData */ export interface ProduceResponseData { - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - size: number; - /** - * - * @type {string} - * @memberof ProduceResponseData - */ - type: string; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + size: number; + /** + * + * @type {string} + * @memberof ProduceResponseData + */ + type: string; } /** * Check if a given object implements the ProduceResponseData interface. */ export function instanceOfProduceResponseData(value: object): value is ProduceResponseData { - if (!('size' in value) || value['size'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; + if (!("size" in value) || value["size"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + return true; } export function ProduceResponseDataFromJSON(json: any): ProduceResponseData { - return ProduceResponseDataFromJSONTyped(json, false); + return ProduceResponseDataFromJSONTyped(json, false); } -export function ProduceResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponseData { - if (json == null) { - return json; - } - return { - - 'size': json['size'], - 'type': json['type'], - }; +export function ProduceResponseDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceResponseData { + if (json == null) { + return json; + } + return { + size: json["size"], + type: json["type"], + }; } export function ProduceResponseDataToJSON(json: any): ProduceResponseData { - return ProduceResponseDataToJSONTyped(json, false); + return ProduceResponseDataToJSONTyped(json, false); } -export function ProduceResponseDataToJSONTyped(value?: ProduceResponseData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceResponseDataToJSONTyped( + value?: ProduceResponseData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'size': value['size'], - 'type': value['type'], - }; + return { + size: value["size"], + type: value["type"], + }; } - diff --git a/src/clients/kafkaRest/models/ReassignmentData.ts b/src/clients/kafkaRest/models/ReassignmentData.ts index c9d28f20fc..f1ca2abe0e 100644 --- a/src/clients/kafkaRest/models/ReassignmentData.ts +++ b/src/clients/kafkaRest/models/ReassignmentData.ts @@ -5,140 +5,143 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ReassignmentData */ export interface ReassignmentData { - /** - * - * @type {string} - * @memberof ReassignmentData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ReassignmentData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ReassignmentData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ReassignmentData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ReassignmentData - */ - partition_id: number; - /** - * - * @type {Array} - * @memberof ReassignmentData - */ - adding_replicas: Array; - /** - * - * @type {Array} - * @memberof ReassignmentData - */ - removing_replicas: Array; - /** - * - * @type {Relationship} - * @memberof ReassignmentData - */ - replicas: Relationship; + /** + * + * @type {string} + * @memberof ReassignmentData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ReassignmentData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ReassignmentData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ReassignmentData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ReassignmentData + */ + partition_id: number; + /** + * + * @type {Array} + * @memberof ReassignmentData + */ + adding_replicas: Array; + /** + * + * @type {Array} + * @memberof ReassignmentData + */ + removing_replicas: Array; + /** + * + * @type {Relationship} + * @memberof ReassignmentData + */ + replicas: Relationship; } /** * Check if a given object implements the ReassignmentData interface. */ export function instanceOfReassignmentData(value: object): value is ReassignmentData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('partition_id' in value) || value['partition_id'] === undefined) return false; - if (!('adding_replicas' in value) || value['adding_replicas'] === undefined) return false; - if (!('removing_replicas' in value) || value['removing_replicas'] === undefined) return false; - if (!('replicas' in value) || value['replicas'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("partition_id" in value) || value["partition_id"] === undefined) return false; + if (!("adding_replicas" in value) || value["adding_replicas"] === undefined) return false; + if (!("removing_replicas" in value) || value["removing_replicas"] === undefined) return false; + if (!("replicas" in value) || value["replicas"] === undefined) return false; + return true; } export function ReassignmentDataFromJSON(json: any): ReassignmentData { - return ReassignmentDataFromJSONTyped(json, false); + return ReassignmentDataFromJSONTyped(json, false); } -export function ReassignmentDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReassignmentData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'topic_name': json['topic_name'], - 'partition_id': json['partition_id'], - 'adding_replicas': json['adding_replicas'], - 'removing_replicas': json['removing_replicas'], - 'replicas': RelationshipFromJSON(json['replicas']), - }; +export function ReassignmentDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ReassignmentData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + topic_name: json["topic_name"], + partition_id: json["partition_id"], + adding_replicas: json["adding_replicas"], + removing_replicas: json["removing_replicas"], + replicas: RelationshipFromJSON(json["replicas"]), + }; } export function ReassignmentDataToJSON(json: any): ReassignmentData { - return ReassignmentDataToJSONTyped(json, false); + return ReassignmentDataToJSONTyped(json, false); } -export function ReassignmentDataToJSONTyped(value?: ReassignmentData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ReassignmentDataToJSONTyped( + value?: ReassignmentData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'adding_replicas': value['adding_replicas'], - 'removing_replicas': value['removing_replicas'], - 'replicas': RelationshipToJSON(value['replicas']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + adding_replicas: value["adding_replicas"], + removing_replicas: value["removing_replicas"], + replicas: RelationshipToJSON(value["replicas"]), + }; } - diff --git a/src/clients/kafkaRest/models/ReassignmentDataList.ts b/src/clients/kafkaRest/models/ReassignmentDataList.ts index 7efbc0ad14..99d60cddec 100644 --- a/src/clients/kafkaRest/models/ReassignmentDataList.ts +++ b/src/clients/kafkaRest/models/ReassignmentDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ReassignmentData } from './ReassignmentData'; +import { mapValues } from "../runtime"; +import type { ReassignmentData } from "./ReassignmentData"; import { - ReassignmentDataFromJSON, - ReassignmentDataFromJSONTyped, - ReassignmentDataToJSON, - ReassignmentDataToJSONTyped, -} from './ReassignmentData'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; + ReassignmentDataFromJSON, + ReassignmentDataFromJSONTyped, + ReassignmentDataToJSON, + ReassignmentDataToJSONTyped, +} from "./ReassignmentData"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; /** - * + * * @export * @interface ReassignmentDataList */ export interface ReassignmentDataList { - /** - * - * @type {string} - * @memberof ReassignmentDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ReassignmentDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ReassignmentDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ReassignmentDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ReassignmentDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ReassignmentDataList + */ + data: Array; } /** * Check if a given object implements the ReassignmentDataList interface. */ export function instanceOfReassignmentDataList(value: object): value is ReassignmentDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ReassignmentDataListFromJSON(json: any): ReassignmentDataList { - return ReassignmentDataListFromJSONTyped(json, false); + return ReassignmentDataListFromJSONTyped(json, false); } -export function ReassignmentDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReassignmentDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ReassignmentDataFromJSON)), - }; +export function ReassignmentDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ReassignmentDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ReassignmentDataFromJSON), + }; } export function ReassignmentDataListToJSON(json: any): ReassignmentDataList { - return ReassignmentDataListToJSONTyped(json, false); + return ReassignmentDataListToJSONTyped(json, false); } -export function ReassignmentDataListToJSONTyped(value?: ReassignmentDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ReassignmentDataListToJSONTyped( + value?: ReassignmentDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ReassignmentDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ReassignmentDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/Relationship.ts b/src/clients/kafkaRest/models/Relationship.ts index 3ba58e415b..247e57b8f5 100644 --- a/src/clients/kafkaRest/models/Relationship.ts +++ b/src/clients/kafkaRest/models/Relationship.ts @@ -5,62 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface Relationship */ export interface Relationship { - /** - * - * @type {string} - * @memberof Relationship - */ - related: string; + /** + * + * @type {string} + * @memberof Relationship + */ + related: string; } /** * Check if a given object implements the Relationship interface. */ export function instanceOfRelationship(value: object): value is Relationship { - if (!('related' in value) || value['related'] === undefined) return false; - return true; + if (!("related" in value) || value["related"] === undefined) return false; + return true; } export function RelationshipFromJSON(json: any): Relationship { - return RelationshipFromJSONTyped(json, false); + return RelationshipFromJSONTyped(json, false); } export function RelationshipFromJSONTyped(json: any, ignoreDiscriminator: boolean): Relationship { - if (json == null) { - return json; - } - return { - - 'related': json['related'], - }; + if (json == null) { + return json; + } + return { + related: json["related"], + }; } export function RelationshipToJSON(json: any): Relationship { - return RelationshipToJSONTyped(json, false); + return RelationshipToJSONTyped(json, false); } -export function RelationshipToJSONTyped(value?: Relationship | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RelationshipToJSONTyped( + value?: Relationship | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'related': value['related'], - }; + return { + related: value["related"], + }; } - diff --git a/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts b/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts index a43db07234..c25b8dff04 100644 --- a/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts +++ b/src/clients/kafkaRest/models/RemoveBrokerTaskData.ts @@ -5,165 +5,177 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface RemoveBrokerTaskData */ export interface RemoveBrokerTaskData { - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof RemoveBrokerTaskData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - cluster_id: string; - /** - * - * @type {number} - * @memberof RemoveBrokerTaskData - */ - broker_id: number; - /** - * - * @type {boolean} - * @memberof RemoveBrokerTaskData - */ - shutdown_scheduled: boolean; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - broker_replica_exclusion_status: string; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - partition_reassignment_status: string; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - broker_shutdown_status: string; - /** - * - * @type {number} - * @memberof RemoveBrokerTaskData - */ - error_code?: number | null; - /** - * - * @type {string} - * @memberof RemoveBrokerTaskData - */ - error_message?: string | null; - /** - * - * @type {Relationship} - * @memberof RemoveBrokerTaskData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof RemoveBrokerTaskData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + cluster_id: string; + /** + * + * @type {number} + * @memberof RemoveBrokerTaskData + */ + broker_id: number; + /** + * + * @type {boolean} + * @memberof RemoveBrokerTaskData + */ + shutdown_scheduled: boolean; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + broker_replica_exclusion_status: string; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + partition_reassignment_status: string; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + broker_shutdown_status: string; + /** + * + * @type {number} + * @memberof RemoveBrokerTaskData + */ + error_code?: number | null; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskData + */ + error_message?: string | null; + /** + * + * @type {Relationship} + * @memberof RemoveBrokerTaskData + */ + broker: Relationship; } /** * Check if a given object implements the RemoveBrokerTaskData interface. */ export function instanceOfRemoveBrokerTaskData(value: object): value is RemoveBrokerTaskData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('shutdown_scheduled' in value) || value['shutdown_scheduled'] === undefined) return false; - if (!('broker_replica_exclusion_status' in value) || value['broker_replica_exclusion_status'] === undefined) return false; - if (!('partition_reassignment_status' in value) || value['partition_reassignment_status'] === undefined) return false; - if (!('broker_shutdown_status' in value) || value['broker_shutdown_status'] === undefined) return false; - if (!('broker' in value) || value['broker'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("shutdown_scheduled" in value) || value["shutdown_scheduled"] === undefined) return false; + if ( + !("broker_replica_exclusion_status" in value) || + value["broker_replica_exclusion_status"] === undefined + ) + return false; + if ( + !("partition_reassignment_status" in value) || + value["partition_reassignment_status"] === undefined + ) + return false; + if (!("broker_shutdown_status" in value) || value["broker_shutdown_status"] === undefined) + return false; + if (!("broker" in value) || value["broker"] === undefined) return false; + return true; } export function RemoveBrokerTaskDataFromJSON(json: any): RemoveBrokerTaskData { - return RemoveBrokerTaskDataFromJSONTyped(json, false); + return RemoveBrokerTaskDataFromJSONTyped(json, false); } -export function RemoveBrokerTaskDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveBrokerTaskData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'broker_id': json['broker_id'], - 'shutdown_scheduled': json['shutdown_scheduled'], - 'broker_replica_exclusion_status': json['broker_replica_exclusion_status'], - 'partition_reassignment_status': json['partition_reassignment_status'], - 'broker_shutdown_status': json['broker_shutdown_status'], - 'error_code': json['error_code'] == null ? undefined : json['error_code'], - 'error_message': json['error_message'] == null ? undefined : json['error_message'], - 'broker': RelationshipFromJSON(json['broker']), - }; +export function RemoveBrokerTaskDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RemoveBrokerTaskData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + broker_id: json["broker_id"], + shutdown_scheduled: json["shutdown_scheduled"], + broker_replica_exclusion_status: json["broker_replica_exclusion_status"], + partition_reassignment_status: json["partition_reassignment_status"], + broker_shutdown_status: json["broker_shutdown_status"], + error_code: json["error_code"] == null ? undefined : json["error_code"], + error_message: json["error_message"] == null ? undefined : json["error_message"], + broker: RelationshipFromJSON(json["broker"]), + }; } export function RemoveBrokerTaskDataToJSON(json: any): RemoveBrokerTaskData { - return RemoveBrokerTaskDataToJSONTyped(json, false); + return RemoveBrokerTaskDataToJSONTyped(json, false); } -export function RemoveBrokerTaskDataToJSONTyped(value?: RemoveBrokerTaskData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RemoveBrokerTaskDataToJSONTyped( + value?: RemoveBrokerTaskData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'broker_id': value['broker_id'], - 'shutdown_scheduled': value['shutdown_scheduled'], - 'broker_replica_exclusion_status': value['broker_replica_exclusion_status'], - 'partition_reassignment_status': value['partition_reassignment_status'], - 'broker_shutdown_status': value['broker_shutdown_status'], - 'error_code': value['error_code'], - 'error_message': value['error_message'], - 'broker': RelationshipToJSON(value['broker']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + broker_id: value["broker_id"], + shutdown_scheduled: value["shutdown_scheduled"], + broker_replica_exclusion_status: value["broker_replica_exclusion_status"], + partition_reassignment_status: value["partition_reassignment_status"], + broker_shutdown_status: value["broker_shutdown_status"], + error_code: value["error_code"], + error_message: value["error_message"], + broker: RelationshipToJSON(value["broker"]), + }; } - diff --git a/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts b/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts index 312290e6da..dbe76500f7 100644 --- a/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts +++ b/src/clients/kafkaRest/models/RemoveBrokerTaskDataList.ts @@ -5,95 +5,100 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { RemoveBrokerTaskData } from './RemoveBrokerTaskData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { RemoveBrokerTaskData } from "./RemoveBrokerTaskData"; import { - RemoveBrokerTaskDataFromJSON, - RemoveBrokerTaskDataFromJSONTyped, - RemoveBrokerTaskDataToJSON, - RemoveBrokerTaskDataToJSONTyped, -} from './RemoveBrokerTaskData'; + RemoveBrokerTaskDataFromJSON, + RemoveBrokerTaskDataFromJSONTyped, + RemoveBrokerTaskDataToJSON, + RemoveBrokerTaskDataToJSONTyped, +} from "./RemoveBrokerTaskData"; /** - * + * * @export * @interface RemoveBrokerTaskDataList */ export interface RemoveBrokerTaskDataList { - /** - * - * @type {string} - * @memberof RemoveBrokerTaskDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof RemoveBrokerTaskDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof RemoveBrokerTaskDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof RemoveBrokerTaskDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof RemoveBrokerTaskDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof RemoveBrokerTaskDataList + */ + data: Array; } /** * Check if a given object implements the RemoveBrokerTaskDataList interface. */ -export function instanceOfRemoveBrokerTaskDataList(value: object): value is RemoveBrokerTaskDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfRemoveBrokerTaskDataList( + value: object, +): value is RemoveBrokerTaskDataList { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function RemoveBrokerTaskDataListFromJSON(json: any): RemoveBrokerTaskDataList { - return RemoveBrokerTaskDataListFromJSONTyped(json, false); + return RemoveBrokerTaskDataListFromJSONTyped(json, false); } -export function RemoveBrokerTaskDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveBrokerTaskDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(RemoveBrokerTaskDataFromJSON)), - }; +export function RemoveBrokerTaskDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RemoveBrokerTaskDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(RemoveBrokerTaskDataFromJSON), + }; } export function RemoveBrokerTaskDataListToJSON(json: any): RemoveBrokerTaskDataList { - return RemoveBrokerTaskDataListToJSONTyped(json, false); + return RemoveBrokerTaskDataListToJSONTyped(json, false); } -export function RemoveBrokerTaskDataListToJSONTyped(value?: RemoveBrokerTaskDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RemoveBrokerTaskDataListToJSONTyped( + value?: RemoveBrokerTaskDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(RemoveBrokerTaskDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(RemoveBrokerTaskDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts b/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts index bbbdc57b99..0496d66ec1 100644 --- a/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts +++ b/src/clients/kafkaRest/models/RemoveBrokersRequestData.ts @@ -5,62 +5,67 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface RemoveBrokersRequestData */ export interface RemoveBrokersRequestData { - /** - * - * @type {Array} - * @memberof RemoveBrokersRequestData - */ - broker_ids: Array; + /** + * + * @type {Array} + * @memberof RemoveBrokersRequestData + */ + broker_ids: Array; } /** * Check if a given object implements the RemoveBrokersRequestData interface. */ -export function instanceOfRemoveBrokersRequestData(value: object): value is RemoveBrokersRequestData { - if (!('broker_ids' in value) || value['broker_ids'] === undefined) return false; - return true; +export function instanceOfRemoveBrokersRequestData( + value: object, +): value is RemoveBrokersRequestData { + if (!("broker_ids" in value) || value["broker_ids"] === undefined) return false; + return true; } export function RemoveBrokersRequestDataFromJSON(json: any): RemoveBrokersRequestData { - return RemoveBrokersRequestDataFromJSONTyped(json, false); + return RemoveBrokersRequestDataFromJSONTyped(json, false); } -export function RemoveBrokersRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RemoveBrokersRequestData { - if (json == null) { - return json; - } - return { - - 'broker_ids': json['broker_ids'], - }; +export function RemoveBrokersRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RemoveBrokersRequestData { + if (json == null) { + return json; + } + return { + broker_ids: json["broker_ids"], + }; } export function RemoveBrokersRequestDataToJSON(json: any): RemoveBrokersRequestData { - return RemoveBrokersRequestDataToJSONTyped(json, false); + return RemoveBrokersRequestDataToJSONTyped(json, false); } -export function RemoveBrokersRequestDataToJSONTyped(value?: RemoveBrokersRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RemoveBrokersRequestDataToJSONTyped( + value?: RemoveBrokersRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'broker_ids': value['broker_ids'], - }; + return { + broker_ids: value["broker_ids"], + }; } - diff --git a/src/clients/kafkaRest/models/ReplicaData.ts b/src/clients/kafkaRest/models/ReplicaData.ts index 3ef5b073ed..ab8db7c9ac 100644 --- a/src/clients/kafkaRest/models/ReplicaData.ts +++ b/src/clients/kafkaRest/models/ReplicaData.ts @@ -5,149 +5,149 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ReplicaData */ export interface ReplicaData { - /** - * - * @type {string} - * @memberof ReplicaData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ReplicaData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ReplicaData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ReplicaData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ReplicaData - */ - partition_id: number; - /** - * - * @type {number} - * @memberof ReplicaData - */ - broker_id: number; - /** - * - * @type {boolean} - * @memberof ReplicaData - */ - is_leader: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaData - */ - is_in_sync: boolean; - /** - * - * @type {Relationship} - * @memberof ReplicaData - */ - broker: Relationship; + /** + * + * @type {string} + * @memberof ReplicaData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ReplicaData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ReplicaData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ReplicaData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ReplicaData + */ + partition_id: number; + /** + * + * @type {number} + * @memberof ReplicaData + */ + broker_id: number; + /** + * + * @type {boolean} + * @memberof ReplicaData + */ + is_leader: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaData + */ + is_in_sync: boolean; + /** + * + * @type {Relationship} + * @memberof ReplicaData + */ + broker: Relationship; } /** * Check if a given object implements the ReplicaData interface. */ export function instanceOfReplicaData(value: object): value is ReplicaData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('partition_id' in value) || value['partition_id'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('is_leader' in value) || value['is_leader'] === undefined) return false; - if (!('is_in_sync' in value) || value['is_in_sync'] === undefined) return false; - if (!('broker' in value) || value['broker'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("partition_id" in value) || value["partition_id"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("is_leader" in value) || value["is_leader"] === undefined) return false; + if (!("is_in_sync" in value) || value["is_in_sync"] === undefined) return false; + if (!("broker" in value) || value["broker"] === undefined) return false; + return true; } export function ReplicaDataFromJSON(json: any): ReplicaData { - return ReplicaDataFromJSONTyped(json, false); + return ReplicaDataFromJSONTyped(json, false); } export function ReplicaDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'topic_name': json['topic_name'], - 'partition_id': json['partition_id'], - 'broker_id': json['broker_id'], - 'is_leader': json['is_leader'], - 'is_in_sync': json['is_in_sync'], - 'broker': RelationshipFromJSON(json['broker']), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + topic_name: json["topic_name"], + partition_id: json["partition_id"], + broker_id: json["broker_id"], + is_leader: json["is_leader"], + is_in_sync: json["is_in_sync"], + broker: RelationshipFromJSON(json["broker"]), + }; } export function ReplicaDataToJSON(json: any): ReplicaData { - return ReplicaDataToJSONTyped(json, false); + return ReplicaDataToJSONTyped(json, false); } -export function ReplicaDataToJSONTyped(value?: ReplicaData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ReplicaDataToJSONTyped( + value?: ReplicaData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'broker_id': value['broker_id'], - 'is_leader': value['is_leader'], - 'is_in_sync': value['is_in_sync'], - 'broker': RelationshipToJSON(value['broker']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + broker_id: value["broker_id"], + is_leader: value["is_leader"], + is_in_sync: value["is_in_sync"], + broker: RelationshipToJSON(value["broker"]), + }; } - diff --git a/src/clients/kafkaRest/models/ReplicaDataList.ts b/src/clients/kafkaRest/models/ReplicaDataList.ts index 76af28903a..52f44c562f 100644 --- a/src/clients/kafkaRest/models/ReplicaDataList.ts +++ b/src/clients/kafkaRest/models/ReplicaDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ReplicaData } from './ReplicaData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ReplicaData } from "./ReplicaData"; import { - ReplicaDataFromJSON, - ReplicaDataFromJSONTyped, - ReplicaDataToJSON, - ReplicaDataToJSONTyped, -} from './ReplicaData'; + ReplicaDataFromJSON, + ReplicaDataFromJSONTyped, + ReplicaDataToJSON, + ReplicaDataToJSONTyped, +} from "./ReplicaData"; /** - * + * * @export * @interface ReplicaDataList */ export interface ReplicaDataList { - /** - * - * @type {string} - * @memberof ReplicaDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ReplicaDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ReplicaDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ReplicaDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ReplicaDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ReplicaDataList + */ + data: Array; } /** * Check if a given object implements the ReplicaDataList interface. */ export function instanceOfReplicaDataList(value: object): value is ReplicaDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ReplicaDataListFromJSON(json: any): ReplicaDataList { - return ReplicaDataListFromJSONTyped(json, false); + return ReplicaDataListFromJSONTyped(json, false); } -export function ReplicaDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ReplicaDataFromJSON)), - }; +export function ReplicaDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ReplicaDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ReplicaDataFromJSON), + }; } export function ReplicaDataListToJSON(json: any): ReplicaDataList { - return ReplicaDataListToJSONTyped(json, false); + return ReplicaDataListToJSONTyped(json, false); } -export function ReplicaDataListToJSONTyped(value?: ReplicaDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ReplicaDataListToJSONTyped( + value?: ReplicaDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ReplicaDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ReplicaDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/ReplicaStatusData.ts b/src/clients/kafkaRest/models/ReplicaStatusData.ts index ac06cea07e..2536b85543 100644 --- a/src/clients/kafkaRest/models/ReplicaStatusData.ts +++ b/src/clients/kafkaRest/models/ReplicaStatusData.ts @@ -5,204 +5,208 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceMetadata } from './ResourceMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface ReplicaStatusData */ export interface ReplicaStatusData { - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof ReplicaStatusData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - topic_name: string; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - broker_id: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - partition_id: number; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_leader: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_observer: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_isr_eligible: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_in_isr: boolean; - /** - * - * @type {boolean} - * @memberof ReplicaStatusData - */ - is_caught_up: boolean; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - log_start_offset: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - log_end_offset: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - last_caught_up_time_ms: number; - /** - * - * @type {number} - * @memberof ReplicaStatusData - */ - last_fetch_time_ms: number; - /** - * - * @type {string} - * @memberof ReplicaStatusData - */ - link_name?: string; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof ReplicaStatusData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + topic_name: string; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + broker_id: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + partition_id: number; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_leader: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_observer: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_isr_eligible: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_in_isr: boolean; + /** + * + * @type {boolean} + * @memberof ReplicaStatusData + */ + is_caught_up: boolean; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + log_start_offset: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + log_end_offset: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + last_caught_up_time_ms: number; + /** + * + * @type {number} + * @memberof ReplicaStatusData + */ + last_fetch_time_ms: number; + /** + * + * @type {string} + * @memberof ReplicaStatusData + */ + link_name?: string; } /** * Check if a given object implements the ReplicaStatusData interface. */ export function instanceOfReplicaStatusData(value: object): value is ReplicaStatusData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('broker_id' in value) || value['broker_id'] === undefined) return false; - if (!('partition_id' in value) || value['partition_id'] === undefined) return false; - if (!('is_leader' in value) || value['is_leader'] === undefined) return false; - if (!('is_observer' in value) || value['is_observer'] === undefined) return false; - if (!('is_isr_eligible' in value) || value['is_isr_eligible'] === undefined) return false; - if (!('is_in_isr' in value) || value['is_in_isr'] === undefined) return false; - if (!('is_caught_up' in value) || value['is_caught_up'] === undefined) return false; - if (!('log_start_offset' in value) || value['log_start_offset'] === undefined) return false; - if (!('log_end_offset' in value) || value['log_end_offset'] === undefined) return false; - if (!('last_caught_up_time_ms' in value) || value['last_caught_up_time_ms'] === undefined) return false; - if (!('last_fetch_time_ms' in value) || value['last_fetch_time_ms'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("broker_id" in value) || value["broker_id"] === undefined) return false; + if (!("partition_id" in value) || value["partition_id"] === undefined) return false; + if (!("is_leader" in value) || value["is_leader"] === undefined) return false; + if (!("is_observer" in value) || value["is_observer"] === undefined) return false; + if (!("is_isr_eligible" in value) || value["is_isr_eligible"] === undefined) return false; + if (!("is_in_isr" in value) || value["is_in_isr"] === undefined) return false; + if (!("is_caught_up" in value) || value["is_caught_up"] === undefined) return false; + if (!("log_start_offset" in value) || value["log_start_offset"] === undefined) return false; + if (!("log_end_offset" in value) || value["log_end_offset"] === undefined) return false; + if (!("last_caught_up_time_ms" in value) || value["last_caught_up_time_ms"] === undefined) + return false; + if (!("last_fetch_time_ms" in value) || value["last_fetch_time_ms"] === undefined) return false; + return true; } export function ReplicaStatusDataFromJSON(json: any): ReplicaStatusData { - return ReplicaStatusDataFromJSONTyped(json, false); + return ReplicaStatusDataFromJSONTyped(json, false); } -export function ReplicaStatusDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaStatusData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'topic_name': json['topic_name'], - 'broker_id': json['broker_id'], - 'partition_id': json['partition_id'], - 'is_leader': json['is_leader'], - 'is_observer': json['is_observer'], - 'is_isr_eligible': json['is_isr_eligible'], - 'is_in_isr': json['is_in_isr'], - 'is_caught_up': json['is_caught_up'], - 'log_start_offset': json['log_start_offset'], - 'log_end_offset': json['log_end_offset'], - 'last_caught_up_time_ms': json['last_caught_up_time_ms'], - 'last_fetch_time_ms': json['last_fetch_time_ms'], - 'link_name': json['link_name'] == null ? undefined : json['link_name'], - }; +export function ReplicaStatusDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ReplicaStatusData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + topic_name: json["topic_name"], + broker_id: json["broker_id"], + partition_id: json["partition_id"], + is_leader: json["is_leader"], + is_observer: json["is_observer"], + is_isr_eligible: json["is_isr_eligible"], + is_in_isr: json["is_in_isr"], + is_caught_up: json["is_caught_up"], + log_start_offset: json["log_start_offset"], + log_end_offset: json["log_end_offset"], + last_caught_up_time_ms: json["last_caught_up_time_ms"], + last_fetch_time_ms: json["last_fetch_time_ms"], + link_name: json["link_name"] == null ? undefined : json["link_name"], + }; } export function ReplicaStatusDataToJSON(json: any): ReplicaStatusData { - return ReplicaStatusDataToJSONTyped(json, false); + return ReplicaStatusDataToJSONTyped(json, false); } -export function ReplicaStatusDataToJSONTyped(value?: ReplicaStatusData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ReplicaStatusDataToJSONTyped( + value?: ReplicaStatusData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'broker_id': value['broker_id'], - 'partition_id': value['partition_id'], - 'is_leader': value['is_leader'], - 'is_observer': value['is_observer'], - 'is_isr_eligible': value['is_isr_eligible'], - 'is_in_isr': value['is_in_isr'], - 'is_caught_up': value['is_caught_up'], - 'log_start_offset': value['log_start_offset'], - 'log_end_offset': value['log_end_offset'], - 'last_caught_up_time_ms': value['last_caught_up_time_ms'], - 'last_fetch_time_ms': value['last_fetch_time_ms'], - 'link_name': value['link_name'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + broker_id: value["broker_id"], + partition_id: value["partition_id"], + is_leader: value["is_leader"], + is_observer: value["is_observer"], + is_isr_eligible: value["is_isr_eligible"], + is_in_isr: value["is_in_isr"], + is_caught_up: value["is_caught_up"], + log_start_offset: value["log_start_offset"], + log_end_offset: value["log_end_offset"], + last_caught_up_time_ms: value["last_caught_up_time_ms"], + last_fetch_time_ms: value["last_fetch_time_ms"], + link_name: value["link_name"], + }; } - diff --git a/src/clients/kafkaRest/models/ReplicaStatusDataList.ts b/src/clients/kafkaRest/models/ReplicaStatusDataList.ts index 40195fc5b6..04ba94a6e9 100644 --- a/src/clients/kafkaRest/models/ReplicaStatusDataList.ts +++ b/src/clients/kafkaRest/models/ReplicaStatusDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { ReplicaStatusData } from './ReplicaStatusData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { ReplicaStatusData } from "./ReplicaStatusData"; import { - ReplicaStatusDataFromJSON, - ReplicaStatusDataFromJSONTyped, - ReplicaStatusDataToJSON, - ReplicaStatusDataToJSONTyped, -} from './ReplicaStatusData'; + ReplicaStatusDataFromJSON, + ReplicaStatusDataFromJSONTyped, + ReplicaStatusDataToJSON, + ReplicaStatusDataToJSONTyped, +} from "./ReplicaStatusData"; /** - * + * * @export * @interface ReplicaStatusDataList */ export interface ReplicaStatusDataList { - /** - * - * @type {string} - * @memberof ReplicaStatusDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ReplicaStatusDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof ReplicaStatusDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof ReplicaStatusDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ReplicaStatusDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof ReplicaStatusDataList + */ + data: Array; } /** * Check if a given object implements the ReplicaStatusDataList interface. */ export function instanceOfReplicaStatusDataList(value: object): value is ReplicaStatusDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ReplicaStatusDataListFromJSON(json: any): ReplicaStatusDataList { - return ReplicaStatusDataListFromJSONTyped(json, false); + return ReplicaStatusDataListFromJSONTyped(json, false); } -export function ReplicaStatusDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReplicaStatusDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ReplicaStatusDataFromJSON)), - }; +export function ReplicaStatusDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ReplicaStatusDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ReplicaStatusDataFromJSON), + }; } export function ReplicaStatusDataListToJSON(json: any): ReplicaStatusDataList { - return ReplicaStatusDataListToJSONTyped(json, false); + return ReplicaStatusDataListToJSONTyped(json, false); } -export function ReplicaStatusDataListToJSONTyped(value?: ReplicaStatusDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ReplicaStatusDataListToJSONTyped( + value?: ReplicaStatusDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ReplicaStatusDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ReplicaStatusDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/Resource.ts b/src/clients/kafkaRest/models/Resource.ts index 0431f5b0ab..60f351435b 100644 --- a/src/clients/kafkaRest/models/Resource.ts +++ b/src/clients/kafkaRest/models/Resource.ts @@ -5,79 +5,79 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceMetadata } from './ResourceMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface Resource */ export interface Resource { - /** - * - * @type {string} - * @memberof Resource - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof Resource - */ - metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof Resource + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof Resource + */ + metadata: ResourceMetadata; } /** * Check if a given object implements the Resource interface. */ export function instanceOfResource(value: object): value is Resource { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + return true; } export function ResourceFromJSON(json: any): Resource { - return ResourceFromJSONTyped(json, false); + return ResourceFromJSONTyped(json, false); } export function ResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Resource { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + }; } export function ResourceToJSON(json: any): Resource { - return ResourceToJSONTyped(json, false); + return ResourceToJSONTyped(json, false); } -export function ResourceToJSONTyped(value?: Resource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourceToJSONTyped( + value?: Resource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + }; } - diff --git a/src/clients/kafkaRest/models/ResourceCollection.ts b/src/clients/kafkaRest/models/ResourceCollection.ts index 14378fd2e6..64a415fdbf 100644 --- a/src/clients/kafkaRest/models/ResourceCollection.ts +++ b/src/clients/kafkaRest/models/ResourceCollection.ts @@ -5,79 +5,82 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; /** - * + * * @export * @interface ResourceCollection */ export interface ResourceCollection { - /** - * - * @type {string} - * @memberof ResourceCollection - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof ResourceCollection - */ - metadata: ResourceCollectionMetadata; + /** + * + * @type {string} + * @memberof ResourceCollection + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof ResourceCollection + */ + metadata: ResourceCollectionMetadata; } /** * Check if a given object implements the ResourceCollection interface. */ export function instanceOfResourceCollection(value: object): value is ResourceCollection { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + return true; } export function ResourceCollectionFromJSON(json: any): ResourceCollection { - return ResourceCollectionFromJSONTyped(json, false); + return ResourceCollectionFromJSONTyped(json, false); } -export function ResourceCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceCollection { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - }; +export function ResourceCollectionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResourceCollection { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + }; } export function ResourceCollectionToJSON(json: any): ResourceCollection { - return ResourceCollectionToJSONTyped(json, false); + return ResourceCollectionToJSONTyped(json, false); } -export function ResourceCollectionToJSONTyped(value?: ResourceCollection | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourceCollectionToJSONTyped( + value?: ResourceCollection | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + }; } - diff --git a/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts b/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts index c5bf137aef..cb7a7f06fb 100644 --- a/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts +++ b/src/clients/kafkaRest/models/ResourceCollectionMetadata.ts @@ -5,70 +5,75 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ResourceCollectionMetadata */ export interface ResourceCollectionMetadata { - /** - * - * @type {string} - * @memberof ResourceCollectionMetadata - */ - self: string; - /** - * - * @type {string} - * @memberof ResourceCollectionMetadata - */ - next?: string | null; + /** + * + * @type {string} + * @memberof ResourceCollectionMetadata + */ + self: string; + /** + * + * @type {string} + * @memberof ResourceCollectionMetadata + */ + next?: string | null; } /** * Check if a given object implements the ResourceCollectionMetadata interface. */ -export function instanceOfResourceCollectionMetadata(value: object): value is ResourceCollectionMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfResourceCollectionMetadata( + value: object, +): value is ResourceCollectionMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ResourceCollectionMetadataFromJSON(json: any): ResourceCollectionMetadata { - return ResourceCollectionMetadataFromJSONTyped(json, false); + return ResourceCollectionMetadataFromJSONTyped(json, false); } -export function ResourceCollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceCollectionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'next': json['next'] == null ? undefined : json['next'], - }; +export function ResourceCollectionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResourceCollectionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + next: json["next"] == null ? undefined : json["next"], + }; } export function ResourceCollectionMetadataToJSON(json: any): ResourceCollectionMetadata { - return ResourceCollectionMetadataToJSONTyped(json, false); + return ResourceCollectionMetadataToJSONTyped(json, false); } -export function ResourceCollectionMetadataToJSONTyped(value?: ResourceCollectionMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourceCollectionMetadataToJSONTyped( + value?: ResourceCollectionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - }; + return { + self: value["self"], + next: value["next"], + }; } - diff --git a/src/clients/kafkaRest/models/ResourceMetadata.ts b/src/clients/kafkaRest/models/ResourceMetadata.ts index ecb8a8601f..8929d03a36 100644 --- a/src/clients/kafkaRest/models/ResourceMetadata.ts +++ b/src/clients/kafkaRest/models/ResourceMetadata.ts @@ -5,70 +5,73 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ResourceMetadata */ export interface ResourceMetadata { - /** - * - * @type {string} - * @memberof ResourceMetadata - */ - self: string; - /** - * - * @type {string} - * @memberof ResourceMetadata - */ - resource_name?: string | null; + /** + * + * @type {string} + * @memberof ResourceMetadata + */ + self: string; + /** + * + * @type {string} + * @memberof ResourceMetadata + */ + resource_name?: string | null; } /** * Check if a given object implements the ResourceMetadata interface. */ export function instanceOfResourceMetadata(value: object): value is ResourceMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ResourceMetadataFromJSON(json: any): ResourceMetadata { - return ResourceMetadataFromJSONTyped(json, false); + return ResourceMetadataFromJSONTyped(json, false); } -export function ResourceMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - }; +export function ResourceMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ResourceMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + }; } export function ResourceMetadataToJSON(json: any): ResourceMetadata { - return ResourceMetadataToJSONTyped(json, false); + return ResourceMetadataToJSONTyped(json, false); } -export function ResourceMetadataToJSONTyped(value?: ResourceMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ResourceMetadataToJSONTyped( + value?: ResourceMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/kafkaRest/models/TopicConfigData.ts b/src/clients/kafkaRest/models/TopicConfigData.ts index 50bd54ec7b..5c2b7ee908 100644 --- a/src/clients/kafkaRest/models/TopicConfigData.ts +++ b/src/clients/kafkaRest/models/TopicConfigData.ts @@ -5,166 +5,169 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigSynonymData } from './ConfigSynonymData'; +import { mapValues } from "../runtime"; +import type { ConfigSynonymData } from "./ConfigSynonymData"; import { - ConfigSynonymDataFromJSON, - ConfigSynonymDataFromJSONTyped, - ConfigSynonymDataToJSON, - ConfigSynonymDataToJSONTyped, -} from './ConfigSynonymData'; -import type { ResourceMetadata } from './ResourceMetadata'; + ConfigSynonymDataFromJSON, + ConfigSynonymDataFromJSONTyped, + ConfigSynonymDataToJSON, + ConfigSynonymDataToJSONTyped, +} from "./ConfigSynonymData"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface TopicConfigData */ export interface TopicConfigData { - /** - * - * @type {string} - * @memberof TopicConfigData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof TopicConfigData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - name: string; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - value?: string | null; - /** - * - * @type {boolean} - * @memberof TopicConfigData - */ - is_default: boolean; - /** - * - * @type {boolean} - * @memberof TopicConfigData - */ - is_read_only: boolean; - /** - * - * @type {boolean} - * @memberof TopicConfigData - */ - is_sensitive: boolean; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - source: string; - /** - * - * @type {Array} - * @memberof TopicConfigData - */ - synonyms: Array; - /** - * - * @type {string} - * @memberof TopicConfigData - */ - topic_name: string; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof TopicConfigData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + name: string; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + value?: string | null; + /** + * + * @type {boolean} + * @memberof TopicConfigData + */ + is_default: boolean; + /** + * + * @type {boolean} + * @memberof TopicConfigData + */ + is_read_only: boolean; + /** + * + * @type {boolean} + * @memberof TopicConfigData + */ + is_sensitive: boolean; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + source: string; + /** + * + * @type {Array} + * @memberof TopicConfigData + */ + synonyms: Array; + /** + * + * @type {string} + * @memberof TopicConfigData + */ + topic_name: string; } /** * Check if a given object implements the TopicConfigData interface. */ export function instanceOfTopicConfigData(value: object): value is TopicConfigData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('is_default' in value) || value['is_default'] === undefined) return false; - if (!('is_read_only' in value) || value['is_read_only'] === undefined) return false; - if (!('is_sensitive' in value) || value['is_sensitive'] === undefined) return false; - if (!('source' in value) || value['source'] === undefined) return false; - if (!('synonyms' in value) || value['synonyms'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("is_default" in value) || value["is_default"] === undefined) return false; + if (!("is_read_only" in value) || value["is_read_only"] === undefined) return false; + if (!("is_sensitive" in value) || value["is_sensitive"] === undefined) return false; + if (!("source" in value) || value["source"] === undefined) return false; + if (!("synonyms" in value) || value["synonyms"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + return true; } export function TopicConfigDataFromJSON(json: any): TopicConfigData { - return TopicConfigDataFromJSONTyped(json, false); + return TopicConfigDataFromJSONTyped(json, false); } -export function TopicConfigDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicConfigData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - 'is_default': json['is_default'], - 'is_read_only': json['is_read_only'], - 'is_sensitive': json['is_sensitive'], - 'source': json['source'], - 'synonyms': ((json['synonyms'] as Array).map(ConfigSynonymDataFromJSON)), - 'topic_name': json['topic_name'], - }; +export function TopicConfigDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TopicConfigData { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + is_default: json["is_default"], + is_read_only: json["is_read_only"], + is_sensitive: json["is_sensitive"], + source: json["source"], + synonyms: (json["synonyms"] as Array).map(ConfigSynonymDataFromJSON), + topic_name: json["topic_name"], + }; } export function TopicConfigDataToJSON(json: any): TopicConfigData { - return TopicConfigDataToJSONTyped(json, false); + return TopicConfigDataToJSONTyped(json, false); } -export function TopicConfigDataToJSONTyped(value?: TopicConfigData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TopicConfigDataToJSONTyped( + value?: TopicConfigData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'name': value['name'], - 'value': value['value'], - 'is_default': value['is_default'], - 'is_read_only': value['is_read_only'], - 'is_sensitive': value['is_sensitive'], - 'source': value['source'], - 'synonyms': ((value['synonyms'] as Array).map(ConfigSynonymDataToJSON)), - 'topic_name': value['topic_name'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + name: value["name"], + value: value["value"], + is_default: value["is_default"], + is_read_only: value["is_read_only"], + is_sensitive: value["is_sensitive"], + source: value["source"], + synonyms: (value["synonyms"] as Array).map(ConfigSynonymDataToJSON), + topic_name: value["topic_name"], + }; } - diff --git a/src/clients/kafkaRest/models/TopicConfigDataList.ts b/src/clients/kafkaRest/models/TopicConfigDataList.ts index 301d1b810f..e6ab5763a1 100644 --- a/src/clients/kafkaRest/models/TopicConfigDataList.ts +++ b/src/clients/kafkaRest/models/TopicConfigDataList.ts @@ -5,95 +5,98 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { TopicConfigData } from './TopicConfigData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { TopicConfigData } from "./TopicConfigData"; import { - TopicConfigDataFromJSON, - TopicConfigDataFromJSONTyped, - TopicConfigDataToJSON, - TopicConfigDataToJSONTyped, -} from './TopicConfigData'; + TopicConfigDataFromJSON, + TopicConfigDataFromJSONTyped, + TopicConfigDataToJSON, + TopicConfigDataToJSONTyped, +} from "./TopicConfigData"; /** - * + * * @export * @interface TopicConfigDataList */ export interface TopicConfigDataList { - /** - * - * @type {string} - * @memberof TopicConfigDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof TopicConfigDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof TopicConfigDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof TopicConfigDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof TopicConfigDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof TopicConfigDataList + */ + data: Array; } /** * Check if a given object implements the TopicConfigDataList interface. */ export function instanceOfTopicConfigDataList(value: object): value is TopicConfigDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function TopicConfigDataListFromJSON(json: any): TopicConfigDataList { - return TopicConfigDataListFromJSONTyped(json, false); + return TopicConfigDataListFromJSONTyped(json, false); } -export function TopicConfigDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicConfigDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(TopicConfigDataFromJSON)), - }; +export function TopicConfigDataListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): TopicConfigDataList { + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(TopicConfigDataFromJSON), + }; } export function TopicConfigDataListToJSON(json: any): TopicConfigDataList { - return TopicConfigDataListToJSONTyped(json, false); + return TopicConfigDataListToJSONTyped(json, false); } -export function TopicConfigDataListToJSONTyped(value?: TopicConfigDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TopicConfigDataListToJSONTyped( + value?: TopicConfigDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(TopicConfigDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(TopicConfigDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/TopicData.ts b/src/clients/kafkaRest/models/TopicData.ts index bbc4fb8282..e95c76eb29 100644 --- a/src/clients/kafkaRest/models/TopicData.ts +++ b/src/clients/kafkaRest/models/TopicData.ts @@ -5,166 +5,168 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Relationship } from './Relationship'; +import { mapValues } from "../runtime"; +import type { Relationship } from "./Relationship"; import { - RelationshipFromJSON, - RelationshipFromJSONTyped, - RelationshipToJSON, - RelationshipToJSONTyped, -} from './Relationship'; -import type { ResourceMetadata } from './ResourceMetadata'; + RelationshipFromJSON, + RelationshipFromJSONTyped, + RelationshipToJSON, + RelationshipToJSONTyped, +} from "./Relationship"; +import type { ResourceMetadata } from "./ResourceMetadata"; import { - ResourceMetadataFromJSON, - ResourceMetadataFromJSONTyped, - ResourceMetadataToJSON, - ResourceMetadataToJSONTyped, -} from './ResourceMetadata'; + ResourceMetadataFromJSON, + ResourceMetadataFromJSONTyped, + ResourceMetadataToJSON, + ResourceMetadataToJSONTyped, +} from "./ResourceMetadata"; /** - * + * * @export * @interface TopicData */ export interface TopicData { - /** - * - * @type {string} - * @memberof TopicData - */ - kind: string; - /** - * - * @type {ResourceMetadata} - * @memberof TopicData - */ - metadata: ResourceMetadata; - /** - * - * @type {string} - * @memberof TopicData - */ - cluster_id: string; - /** - * - * @type {string} - * @memberof TopicData - */ - topic_name: string; - /** - * - * @type {boolean} - * @memberof TopicData - */ - is_internal: boolean; - /** - * - * @type {number} - * @memberof TopicData - */ - replication_factor: number; - /** - * - * @type {number} - * @memberof TopicData - */ - partitions_count: number; - /** - * - * @type {Relationship} - * @memberof TopicData - */ - partitions: Relationship; - /** - * - * @type {Relationship} - * @memberof TopicData - */ - configs: Relationship; - /** - * - * @type {Relationship} - * @memberof TopicData - */ - partition_reassignments: Relationship; - /** - * - * @type {Array} - * @memberof TopicData - */ - authorized_operations?: Array; + /** + * + * @type {string} + * @memberof TopicData + */ + kind: string; + /** + * + * @type {ResourceMetadata} + * @memberof TopicData + */ + metadata: ResourceMetadata; + /** + * + * @type {string} + * @memberof TopicData + */ + cluster_id: string; + /** + * + * @type {string} + * @memberof TopicData + */ + topic_name: string; + /** + * + * @type {boolean} + * @memberof TopicData + */ + is_internal: boolean; + /** + * + * @type {number} + * @memberof TopicData + */ + replication_factor: number; + /** + * + * @type {number} + * @memberof TopicData + */ + partitions_count: number; + /** + * + * @type {Relationship} + * @memberof TopicData + */ + partitions: Relationship; + /** + * + * @type {Relationship} + * @memberof TopicData + */ + configs: Relationship; + /** + * + * @type {Relationship} + * @memberof TopicData + */ + partition_reassignments: Relationship; + /** + * + * @type {Array} + * @memberof TopicData + */ + authorized_operations?: Array; } /** * Check if a given object implements the TopicData interface. */ export function instanceOfTopicData(value: object): value is TopicData { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('cluster_id' in value) || value['cluster_id'] === undefined) return false; - if (!('topic_name' in value) || value['topic_name'] === undefined) return false; - if (!('is_internal' in value) || value['is_internal'] === undefined) return false; - if (!('replication_factor' in value) || value['replication_factor'] === undefined) return false; - if (!('partitions_count' in value) || value['partitions_count'] === undefined) return false; - if (!('partitions' in value) || value['partitions'] === undefined) return false; - if (!('configs' in value) || value['configs'] === undefined) return false; - if (!('partition_reassignments' in value) || value['partition_reassignments'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("cluster_id" in value) || value["cluster_id"] === undefined) return false; + if (!("topic_name" in value) || value["topic_name"] === undefined) return false; + if (!("is_internal" in value) || value["is_internal"] === undefined) return false; + if (!("replication_factor" in value) || value["replication_factor"] === undefined) return false; + if (!("partitions_count" in value) || value["partitions_count"] === undefined) return false; + if (!("partitions" in value) || value["partitions"] === undefined) return false; + if (!("configs" in value) || value["configs"] === undefined) return false; + if (!("partition_reassignments" in value) || value["partition_reassignments"] === undefined) + return false; + return true; } export function TopicDataFromJSON(json: any): TopicData { - return TopicDataFromJSONTyped(json, false); + return TopicDataFromJSONTyped(json, false); } export function TopicDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicData { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceMetadataFromJSON(json['metadata']), - 'cluster_id': json['cluster_id'], - 'topic_name': json['topic_name'], - 'is_internal': json['is_internal'], - 'replication_factor': json['replication_factor'], - 'partitions_count': json['partitions_count'], - 'partitions': RelationshipFromJSON(json['partitions']), - 'configs': RelationshipFromJSON(json['configs']), - 'partition_reassignments': RelationshipFromJSON(json['partition_reassignments']), - 'authorized_operations': json['authorized_operations'] == null ? undefined : json['authorized_operations'], - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceMetadataFromJSON(json["metadata"]), + cluster_id: json["cluster_id"], + topic_name: json["topic_name"], + is_internal: json["is_internal"], + replication_factor: json["replication_factor"], + partitions_count: json["partitions_count"], + partitions: RelationshipFromJSON(json["partitions"]), + configs: RelationshipFromJSON(json["configs"]), + partition_reassignments: RelationshipFromJSON(json["partition_reassignments"]), + authorized_operations: + json["authorized_operations"] == null ? undefined : json["authorized_operations"], + }; } export function TopicDataToJSON(json: any): TopicData { - return TopicDataToJSONTyped(json, false); + return TopicDataToJSONTyped(json, false); } -export function TopicDataToJSONTyped(value?: TopicData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TopicDataToJSONTyped( + value?: TopicData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceMetadataToJSON(value['metadata']), - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'is_internal': value['is_internal'], - 'replication_factor': value['replication_factor'], - 'partitions_count': value['partitions_count'], - 'partitions': RelationshipToJSON(value['partitions']), - 'configs': RelationshipToJSON(value['configs']), - 'partition_reassignments': RelationshipToJSON(value['partition_reassignments']), - 'authorized_operations': value['authorized_operations'], - }; + return { + kind: value["kind"], + metadata: ResourceMetadataToJSON(value["metadata"]), + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + is_internal: value["is_internal"], + replication_factor: value["replication_factor"], + partitions_count: value["partitions_count"], + partitions: RelationshipToJSON(value["partitions"]), + configs: RelationshipToJSON(value["configs"]), + partition_reassignments: RelationshipToJSON(value["partition_reassignments"]), + authorized_operations: value["authorized_operations"], + }; } - diff --git a/src/clients/kafkaRest/models/TopicDataList.ts b/src/clients/kafkaRest/models/TopicDataList.ts index b4af2e7b25..56262f1743 100644 --- a/src/clients/kafkaRest/models/TopicDataList.ts +++ b/src/clients/kafkaRest/models/TopicDataList.ts @@ -5,95 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ResourceCollectionMetadata } from './ResourceCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ResourceCollectionMetadata } from "./ResourceCollectionMetadata"; import { - ResourceCollectionMetadataFromJSON, - ResourceCollectionMetadataFromJSONTyped, - ResourceCollectionMetadataToJSON, - ResourceCollectionMetadataToJSONTyped, -} from './ResourceCollectionMetadata'; -import type { TopicData } from './TopicData'; + ResourceCollectionMetadataFromJSON, + ResourceCollectionMetadataFromJSONTyped, + ResourceCollectionMetadataToJSON, + ResourceCollectionMetadataToJSONTyped, +} from "./ResourceCollectionMetadata"; +import type { TopicData } from "./TopicData"; import { - TopicDataFromJSON, - TopicDataFromJSONTyped, - TopicDataToJSON, - TopicDataToJSONTyped, -} from './TopicData'; + TopicDataFromJSON, + TopicDataFromJSONTyped, + TopicDataToJSON, + TopicDataToJSONTyped, +} from "./TopicData"; /** - * + * * @export * @interface TopicDataList */ export interface TopicDataList { - /** - * - * @type {string} - * @memberof TopicDataList - */ - kind: string; - /** - * - * @type {ResourceCollectionMetadata} - * @memberof TopicDataList - */ - metadata: ResourceCollectionMetadata; - /** - * - * @type {Array} - * @memberof TopicDataList - */ - data: Array; + /** + * + * @type {string} + * @memberof TopicDataList + */ + kind: string; + /** + * + * @type {ResourceCollectionMetadata} + * @memberof TopicDataList + */ + metadata: ResourceCollectionMetadata; + /** + * + * @type {Array} + * @memberof TopicDataList + */ + data: Array; } /** * Check if a given object implements the TopicDataList interface. */ export function instanceOfTopicDataList(value: object): value is TopicDataList { - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function TopicDataListFromJSON(json: any): TopicDataList { - return TopicDataListFromJSONTyped(json, false); + return TopicDataListFromJSONTyped(json, false); } export function TopicDataListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicDataList { - if (json == null) { - return json; - } - return { - - 'kind': json['kind'], - 'metadata': ResourceCollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(TopicDataFromJSON)), - }; + if (json == null) { + return json; + } + return { + kind: json["kind"], + metadata: ResourceCollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(TopicDataFromJSON), + }; } export function TopicDataListToJSON(json: any): TopicDataList { - return TopicDataListToJSONTyped(json, false); + return TopicDataListToJSONTyped(json, false); } -export function TopicDataListToJSONTyped(value?: TopicDataList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TopicDataListToJSONTyped( + value?: TopicDataList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kind': value['kind'], - 'metadata': ResourceCollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(TopicDataToJSON)), - }; + return { + kind: value["kind"], + metadata: ResourceCollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(TopicDataToJSON), + }; } - diff --git a/src/clients/kafkaRest/models/UpdateConfigRequestData.ts b/src/clients/kafkaRest/models/UpdateConfigRequestData.ts index 1a7b32ff7e..be0eb508de 100644 --- a/src/clients/kafkaRest/models/UpdateConfigRequestData.ts +++ b/src/clients/kafkaRest/models/UpdateConfigRequestData.ts @@ -5,61 +5,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UpdateConfigRequestData */ export interface UpdateConfigRequestData { - /** - * - * @type {string} - * @memberof UpdateConfigRequestData - */ - value?: string | null; + /** + * + * @type {string} + * @memberof UpdateConfigRequestData + */ + value?: string | null; } /** * Check if a given object implements the UpdateConfigRequestData interface. */ export function instanceOfUpdateConfigRequestData(value: object): value is UpdateConfigRequestData { - return true; + return true; } export function UpdateConfigRequestDataFromJSON(json: any): UpdateConfigRequestData { - return UpdateConfigRequestDataFromJSONTyped(json, false); + return UpdateConfigRequestDataFromJSONTyped(json, false); } -export function UpdateConfigRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateConfigRequestData { - if (json == null) { - return json; - } - return { - - 'value': json['value'] == null ? undefined : json['value'], - }; +export function UpdateConfigRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateConfigRequestData { + if (json == null) { + return json; + } + return { + value: json["value"] == null ? undefined : json["value"], + }; } export function UpdateConfigRequestDataToJSON(json: any): UpdateConfigRequestData { - return UpdateConfigRequestDataToJSONTyped(json, false); + return UpdateConfigRequestDataToJSONTyped(json, false); } -export function UpdateConfigRequestDataToJSONTyped(value?: UpdateConfigRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateConfigRequestDataToJSONTyped( + value?: UpdateConfigRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'value': value['value'], - }; + return { + value: value["value"], + }; } - diff --git a/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts b/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts index 4cc1762c73..50fe7e8a05 100644 --- a/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts +++ b/src/clients/kafkaRest/models/UpdateLinkConfigRequestData.ts @@ -5,62 +5,67 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UpdateLinkConfigRequestData */ export interface UpdateLinkConfigRequestData { - /** - * - * @type {string} - * @memberof UpdateLinkConfigRequestData - */ - value: string; + /** + * + * @type {string} + * @memberof UpdateLinkConfigRequestData + */ + value: string; } /** * Check if a given object implements the UpdateLinkConfigRequestData interface. */ -export function instanceOfUpdateLinkConfigRequestData(value: object): value is UpdateLinkConfigRequestData { - if (!('value' in value) || value['value'] === undefined) return false; - return true; +export function instanceOfUpdateLinkConfigRequestData( + value: object, +): value is UpdateLinkConfigRequestData { + if (!("value" in value) || value["value"] === undefined) return false; + return true; } export function UpdateLinkConfigRequestDataFromJSON(json: any): UpdateLinkConfigRequestData { - return UpdateLinkConfigRequestDataFromJSONTyped(json, false); + return UpdateLinkConfigRequestDataFromJSONTyped(json, false); } -export function UpdateLinkConfigRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateLinkConfigRequestData { - if (json == null) { - return json; - } - return { - - 'value': json['value'], - }; +export function UpdateLinkConfigRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateLinkConfigRequestData { + if (json == null) { + return json; + } + return { + value: json["value"], + }; } export function UpdateLinkConfigRequestDataToJSON(json: any): UpdateLinkConfigRequestData { - return UpdateLinkConfigRequestDataToJSONTyped(json, false); + return UpdateLinkConfigRequestDataToJSONTyped(json, false); } -export function UpdateLinkConfigRequestDataToJSONTyped(value?: UpdateLinkConfigRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateLinkConfigRequestDataToJSONTyped( + value?: UpdateLinkConfigRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'value': value['value'], - }; + return { + value: value["value"], + }; } - diff --git a/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts b/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts index 452a57d9e6..018f8a2975 100644 --- a/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts +++ b/src/clients/kafkaRest/models/UpdatePartitionCountRequestData.ts @@ -5,62 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UpdatePartitionCountRequestData */ export interface UpdatePartitionCountRequestData { - /** - * - * @type {number} - * @memberof UpdatePartitionCountRequestData - */ - partitions_count: number; + /** + * + * @type {number} + * @memberof UpdatePartitionCountRequestData + */ + partitions_count: number; } /** * Check if a given object implements the UpdatePartitionCountRequestData interface. */ -export function instanceOfUpdatePartitionCountRequestData(value: object): value is UpdatePartitionCountRequestData { - if (!('partitions_count' in value) || value['partitions_count'] === undefined) return false; - return true; +export function instanceOfUpdatePartitionCountRequestData( + value: object, +): value is UpdatePartitionCountRequestData { + if (!("partitions_count" in value) || value["partitions_count"] === undefined) return false; + return true; } -export function UpdatePartitionCountRequestDataFromJSON(json: any): UpdatePartitionCountRequestData { - return UpdatePartitionCountRequestDataFromJSONTyped(json, false); +export function UpdatePartitionCountRequestDataFromJSON( + json: any, +): UpdatePartitionCountRequestData { + return UpdatePartitionCountRequestDataFromJSONTyped(json, false); } -export function UpdatePartitionCountRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePartitionCountRequestData { - if (json == null) { - return json; - } - return { - - 'partitions_count': json['partitions_count'], - }; +export function UpdatePartitionCountRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdatePartitionCountRequestData { + if (json == null) { + return json; + } + return { + partitions_count: json["partitions_count"], + }; } export function UpdatePartitionCountRequestDataToJSON(json: any): UpdatePartitionCountRequestData { - return UpdatePartitionCountRequestDataToJSONTyped(json, false); + return UpdatePartitionCountRequestDataToJSONTyped(json, false); } -export function UpdatePartitionCountRequestDataToJSONTyped(value?: UpdatePartitionCountRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdatePartitionCountRequestDataToJSONTyped( + value?: UpdatePartitionCountRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partitions_count': value['partitions_count'], - }; + return { + partitions_count: value["partitions_count"], + }; } - diff --git a/src/clients/kafkaRest/models/index.ts b/src/clients/kafkaRest/models/index.ts index 0d4af59ad8..6081a0bec1 100644 --- a/src/clients/kafkaRest/models/index.ts +++ b/src/clients/kafkaRest/models/index.ts @@ -1,89 +1,89 @@ /* tslint:disable */ /* eslint-disable */ -export * from './AbstractConfigData'; -export * from './AclData'; -export * from './AclDataList'; -export * from './AclResourceType'; -export * from './AlterBrokerReplicaExclusionData'; -export * from './AlterBrokerReplicaExclusionDataList'; -export * from './AlterConfigBatchRequestData'; -export * from './AlterConfigBatchRequestDataDataInner'; -export * from './AlterMirrorStatusResponseData'; -export * from './AlterMirrorStatusResponseDataList'; -export * from './AlterMirrorsRequestData'; -export * from './AnyUnevenLoadData'; -export * from './BalancerStatusData'; -export * from './BrokerConfigData'; -export * from './BrokerConfigDataList'; -export * from './BrokerData'; -export * from './BrokerDataList'; -export * from './BrokerRemovalData'; -export * from './BrokerRemovalDataList'; -export * from './BrokerReplicaExclusionBatchRequestData'; -export * from './BrokerReplicaExclusionData'; -export * from './BrokerReplicaExclusionDataList'; -export * from './BrokerReplicaExclusionRequestData'; -export * from './BrokerTaskData'; -export * from './BrokerTaskDataList'; -export * from './BrokerTaskType'; -export * from './ClusterConfigData'; -export * from './ClusterConfigDataList'; -export * from './ClusterData'; -export * from './ClusterDataList'; -export * from './ConfigData'; -export * from './ConfigSynonymData'; -export * from './ConsumerAssignmentData'; -export * from './ConsumerAssignmentDataList'; -export * from './ConsumerData'; -export * from './ConsumerDataList'; -export * from './ConsumerGroupData'; -export * from './ConsumerGroupDataList'; -export * from './ConsumerGroupLagSummaryData'; -export * from './ConsumerLagData'; -export * from './ConsumerLagDataList'; -export * from './CreateAclRequestData'; -export * from './CreateAclRequestDataList'; -export * from './CreateLinkRequestData'; -export * from './CreateMirrorTopicRequestData'; -export * from './CreateTopicRequestData'; -export * from './CreateTopicRequestDataConfigsInner'; -export * from './DeleteKafkaAcls200Response'; -export * from './LinkTask'; -export * from './LinkTaskError'; -export * from './ListLinkConfigsResponseData'; -export * from './ListLinkConfigsResponseDataList'; -export * from './ListLinksResponseData'; -export * from './ListLinksResponseDataList'; -export * from './ListMirrorTopicsResponseData'; -export * from './ListMirrorTopicsResponseDataList'; -export * from './MirrorLag'; -export * from './MirrorTopicStatus'; -export * from './ModelError'; -export * from './PartitionData'; -export * from './PartitionDataList'; -export * from './ProduceRequest'; -export * from './ProduceRequestData'; -export * from './ProduceRequestHeader'; -export * from './ProduceResponse'; -export * from './ProduceResponseData'; -export * from './ReassignmentData'; -export * from './ReassignmentDataList'; -export * from './Relationship'; -export * from './RemoveBrokerTaskData'; -export * from './RemoveBrokerTaskDataList'; -export * from './RemoveBrokersRequestData'; -export * from './ReplicaData'; -export * from './ReplicaDataList'; -export * from './ReplicaStatusData'; -export * from './ReplicaStatusDataList'; -export * from './Resource'; -export * from './ResourceCollection'; -export * from './ResourceCollectionMetadata'; -export * from './ResourceMetadata'; -export * from './TopicConfigData'; -export * from './TopicConfigDataList'; -export * from './TopicData'; -export * from './TopicDataList'; -export * from './UpdateConfigRequestData'; -export * from './UpdateLinkConfigRequestData'; -export * from './UpdatePartitionCountRequestData'; +export * from "./AbstractConfigData"; +export * from "./AclData"; +export * from "./AclDataList"; +export * from "./AclResourceType"; +export * from "./AlterBrokerReplicaExclusionData"; +export * from "./AlterBrokerReplicaExclusionDataList"; +export * from "./AlterConfigBatchRequestData"; +export * from "./AlterConfigBatchRequestDataDataInner"; +export * from "./AlterMirrorStatusResponseData"; +export * from "./AlterMirrorStatusResponseDataList"; +export * from "./AlterMirrorsRequestData"; +export * from "./AnyUnevenLoadData"; +export * from "./BalancerStatusData"; +export * from "./BrokerConfigData"; +export * from "./BrokerConfigDataList"; +export * from "./BrokerData"; +export * from "./BrokerDataList"; +export * from "./BrokerRemovalData"; +export * from "./BrokerRemovalDataList"; +export * from "./BrokerReplicaExclusionBatchRequestData"; +export * from "./BrokerReplicaExclusionData"; +export * from "./BrokerReplicaExclusionDataList"; +export * from "./BrokerReplicaExclusionRequestData"; +export * from "./BrokerTaskData"; +export * from "./BrokerTaskDataList"; +export * from "./BrokerTaskType"; +export * from "./ClusterConfigData"; +export * from "./ClusterConfigDataList"; +export * from "./ClusterData"; +export * from "./ClusterDataList"; +export * from "./ConfigData"; +export * from "./ConfigSynonymData"; +export * from "./ConsumerAssignmentData"; +export * from "./ConsumerAssignmentDataList"; +export * from "./ConsumerData"; +export * from "./ConsumerDataList"; +export * from "./ConsumerGroupData"; +export * from "./ConsumerGroupDataList"; +export * from "./ConsumerGroupLagSummaryData"; +export * from "./ConsumerLagData"; +export * from "./ConsumerLagDataList"; +export * from "./CreateAclRequestData"; +export * from "./CreateAclRequestDataList"; +export * from "./CreateLinkRequestData"; +export * from "./CreateMirrorTopicRequestData"; +export * from "./CreateTopicRequestData"; +export * from "./CreateTopicRequestDataConfigsInner"; +export * from "./DeleteKafkaAcls200Response"; +export * from "./LinkTask"; +export * from "./LinkTaskError"; +export * from "./ListLinkConfigsResponseData"; +export * from "./ListLinkConfigsResponseDataList"; +export * from "./ListLinksResponseData"; +export * from "./ListLinksResponseDataList"; +export * from "./ListMirrorTopicsResponseData"; +export * from "./ListMirrorTopicsResponseDataList"; +export * from "./MirrorLag"; +export * from "./MirrorTopicStatus"; +export * from "./ModelError"; +export * from "./PartitionData"; +export * from "./PartitionDataList"; +export * from "./ProduceRequest"; +export * from "./ProduceRequestData"; +export * from "./ProduceRequestHeader"; +export * from "./ProduceResponse"; +export * from "./ProduceResponseData"; +export * from "./ReassignmentData"; +export * from "./ReassignmentDataList"; +export * from "./Relationship"; +export * from "./RemoveBrokerTaskData"; +export * from "./RemoveBrokerTaskDataList"; +export * from "./RemoveBrokersRequestData"; +export * from "./ReplicaData"; +export * from "./ReplicaDataList"; +export * from "./ReplicaStatusData"; +export * from "./ReplicaStatusDataList"; +export * from "./Resource"; +export * from "./ResourceCollection"; +export * from "./ResourceCollectionMetadata"; +export * from "./ResourceMetadata"; +export * from "./TopicConfigData"; +export * from "./TopicConfigDataList"; +export * from "./TopicData"; +export * from "./TopicDataList"; +export * from "./UpdateConfigRequestData"; +export * from "./UpdateLinkConfigRequestData"; +export * from "./UpdatePartitionCountRequestData"; diff --git a/src/clients/kafkaRest/runtime.ts b/src/clients/kafkaRest/runtime.ts index e8b3d25d7a..068388de1a 100644 --- a/src/clients/kafkaRest/runtime.ts +++ b/src/clients/kafkaRest/runtime.ts @@ -5,83 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 3.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://pkc-00000.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/medusa/apis/BatchManagementApi.ts b/src/clients/medusa/apis/BatchManagementApi.ts index 392ba17015..5031c4eb78 100644 --- a/src/clients/medusa/apis/BatchManagementApi.ts +++ b/src/clients/medusa/apis/BatchManagementApi.ts @@ -5,136 +5,151 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - DatasetDTO, - EventMessageList, - EventStreamSimulationList, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { DatasetDTO, EventMessageList, EventStreamSimulationList } from "../models/index"; import { - DatasetDTOFromJSON, - DatasetDTOToJSON, - EventMessageListFromJSON, - EventMessageListToJSON, - EventStreamSimulationListFromJSON, - EventStreamSimulationListToJSON, -} from '../models/index'; + DatasetDTOFromJSON, + DatasetDTOToJSON, + EventMessageListFromJSON, + EventMessageListToJSON, + EventStreamSimulationListFromJSON, + EventStreamSimulationListToJSON, +} from "../models/index"; export interface GenerateEventMessageBatchRequest { - DatasetDTO: DatasetDTO; - event_name?: string; - count?: number; + DatasetDTO: DatasetDTO; + event_name?: string; + count?: number; } export interface StreamSimulationRequest { - DatasetDTO: DatasetDTO; - event_name?: string; - simulation_length_minutes?: number; + DatasetDTO: DatasetDTO; + event_name?: string; + simulation_length_minutes?: number; } /** - * + * */ export class BatchManagementApi extends runtime.BaseAPI { + /** + * Generates a batch of event messages based on the provided configuration + * Generate batch events + */ + async generateEventMessageBatchRaw( + requestParameters: GenerateEventMessageBatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["DatasetDTO"] == null) { + throw new runtime.RequiredError( + "DatasetDTO", + 'Required parameter "DatasetDTO" was null or undefined when calling generateEventMessageBatch().', + ); + } - /** - * Generates a batch of event messages based on the provided configuration - * Generate batch events - */ - async generateEventMessageBatchRaw(requestParameters: GenerateEventMessageBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['DatasetDTO'] == null) { - throw new runtime.RequiredError( - 'DatasetDTO', - 'Required parameter "DatasetDTO" was null or undefined when calling generateEventMessageBatch().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['event_name'] != null) { - queryParameters['event_name'] = requestParameters['event_name']; - } - - if (requestParameters['count'] != null) { - queryParameters['count'] = requestParameters['count']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/v1/batch`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters['DatasetDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => EventMessageListFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["event_name"] != null) { + queryParameters["event_name"] = requestParameters["event_name"]; + } + + if (requestParameters["count"] != null) { + queryParameters["count"] = requestParameters["count"]; } - /** - * Generates a batch of event messages based on the provided configuration - * Generate batch events - */ - async generateEventMessageBatch(requestParameters: GenerateEventMessageBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.generateEventMessageBatchRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/v1/batch`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + EventMessageListFromJSON(jsonValue), + ); + } + + /** + * Generates a batch of event messages based on the provided configuration + * Generate batch events + */ + async generateEventMessageBatch( + requestParameters: GenerateEventMessageBatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.generateEventMessageBatchRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Simulates stream behavior over a specified time period + * Simulate stream + */ + async streamSimulationRaw( + requestParameters: StreamSimulationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["DatasetDTO"] == null) { + throw new runtime.RequiredError( + "DatasetDTO", + 'Required parameter "DatasetDTO" was null or undefined when calling streamSimulation().', + ); } - /** - * Simulates stream behavior over a specified time period - * Simulate stream - */ - async streamSimulationRaw(requestParameters: StreamSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['DatasetDTO'] == null) { - throw new runtime.RequiredError( - 'DatasetDTO', - 'Required parameter "DatasetDTO" was null or undefined when calling streamSimulation().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['event_name'] != null) { - queryParameters['event_name'] = requestParameters['event_name']; - } - - if (requestParameters['simulation_length_minutes'] != null) { - queryParameters['simulation_length_minutes'] = requestParameters['simulation_length_minutes']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/v1/batch/stream-simulation`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters['DatasetDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => EventStreamSimulationListFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["event_name"] != null) { + queryParameters["event_name"] = requestParameters["event_name"]; } - /** - * Simulates stream behavior over a specified time period - * Simulate stream - */ - async streamSimulation(requestParameters: StreamSimulationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.streamSimulationRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["simulation_length_minutes"] != null) { + queryParameters["simulation_length_minutes"] = requestParameters["simulation_length_minutes"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/v1/batch/stream-simulation`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + EventStreamSimulationListFromJSON(jsonValue), + ); + } + + /** + * Simulates stream behavior over a specified time period + * Simulate stream + */ + async streamSimulation( + requestParameters: StreamSimulationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.streamSimulationRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/ConfluentProducerControllerApi.ts b/src/clients/medusa/apis/ConfluentProducerControllerApi.ts index e3d4b13006..b1505d15d6 100644 --- a/src/clients/medusa/apis/ConfluentProducerControllerApi.ts +++ b/src/clients/medusa/apis/ConfluentProducerControllerApi.ts @@ -5,50 +5,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ProducerHealth, -} from '../models/index'; -import { - ProducerHealthFromJSON, - ProducerHealthToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ProducerHealth } from "../models/index"; +import { ProducerHealthFromJSON, ProducerHealthToJSON } from "../models/index"; /** - * + * */ export class ConfluentProducerControllerApi extends runtime.BaseAPI { - - /** - */ - async producersStartedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/confluent-producer/health`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProducerHealthFromJSON(jsonValue)); - } - - /** - */ - async producersStarted(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.producersStartedRaw(initOverrides); - return await response.value(); - } - + /** + */ + async producersStartedRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/confluent-producer/health`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProducerHealthFromJSON(jsonValue)); + } + + /** + */ + async producersStarted( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.producersStartedRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/EventThrottlersApi.ts b/src/clients/medusa/apis/EventThrottlersApi.ts index 454a6a70b5..09550ba1ec 100644 --- a/src/clients/medusa/apis/EventThrottlersApi.ts +++ b/src/clients/medusa/apis/EventThrottlersApi.ts @@ -5,54 +5,58 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - EventThrottlerDetailsList, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { EventThrottlerDetailsList } from "../models/index"; import { - EventThrottlerDetailsListFromJSON, - EventThrottlerDetailsListToJSON, -} from '../models/index'; + EventThrottlerDetailsListFromJSON, + EventThrottlerDetailsListToJSON, +} from "../models/index"; /** - * + * */ export class EventThrottlersApi extends runtime.BaseAPI { - - /** - * Returns a list of all available event throttlers and their details - * Get all event throttlers - */ - async getAllEventThrottlerDetailsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/event-throttlers`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => EventThrottlerDetailsListFromJSON(jsonValue)); - } - - /** - * Returns a list of all available event throttlers and their details - * Get all event throttlers - */ - async getAllEventThrottlerDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAllEventThrottlerDetailsRaw(initOverrides); - return await response.value(); - } - + /** + * Returns a list of all available event throttlers and their details + * Get all event throttlers + */ + async getAllEventThrottlerDetailsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/event-throttlers`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + EventThrottlerDetailsListFromJSON(jsonValue), + ); + } + + /** + * Returns a list of all available event throttlers and their details + * Get all event throttlers + */ + async getAllEventThrottlerDetails( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getAllEventThrottlerDetailsRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/ExampleDatasetsApi.ts b/src/clients/medusa/apis/ExampleDatasetsApi.ts index bfedaab82e..5ffdcdf414 100644 --- a/src/clients/medusa/apis/ExampleDatasetsApi.ts +++ b/src/clients/medusa/apis/ExampleDatasetsApi.ts @@ -5,54 +5,55 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ExampleDatasetList, -} from '../models/index'; -import { - ExampleDatasetListFromJSON, - ExampleDatasetListToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ExampleDatasetList } from "../models/index"; +import { ExampleDatasetListFromJSON, ExampleDatasetListToJSON } from "../models/index"; /** - * + * */ export class ExampleDatasetsApi extends runtime.BaseAPI { - - /** - * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios - * Get all example datasets - */ - async getAllExampleDatasetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/examples/datasets`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExampleDatasetListFromJSON(jsonValue)); - } - - /** - * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios - * Get all example datasets - */ - async getAllExampleDatasets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAllExampleDatasetsRaw(initOverrides); - return await response.value(); - } - + /** + * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios + * Get all example datasets + */ + async getAllExampleDatasetsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/examples/datasets`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExampleDatasetListFromJSON(jsonValue), + ); + } + + /** + * Returns a list of pre-configured example datasets that demonstrate various data generation scenarios + * Get all example datasets + */ + async getAllExampleDatasets( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getAllExampleDatasetsRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/SchemaManagementApi.ts b/src/clients/medusa/apis/SchemaManagementApi.ts index 8b213b6035..37d6b59972 100644 --- a/src/clients/medusa/apis/SchemaManagementApi.ts +++ b/src/clients/medusa/apis/SchemaManagementApi.ts @@ -5,162 +5,190 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - AvroSchemaResponseList, - DatasetDTO, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { AvroSchemaResponseList, DatasetDTO } from "../models/index"; import { - AvroSchemaResponseListFromJSON, - AvroSchemaResponseListToJSON, - DatasetDTOFromJSON, - DatasetDTOToJSON, -} from '../models/index'; + AvroSchemaResponseListFromJSON, + AvroSchemaResponseListToJSON, + DatasetDTOFromJSON, + DatasetDTOToJSON, +} from "../models/index"; export interface ConvertAvroSchemaToDatasetRequest { - body: string; + body: string; } export interface GetAvroSchemaRequest { - DatasetDTO: DatasetDTO; - event_name?: string; + DatasetDTO: DatasetDTO; + event_name?: string; } export interface GetAvroSchemasForStreamRequest { - streamId: string; - event_name?: string; + streamId: string; + event_name?: string; } /** - * + * */ export class SchemaManagementApi extends runtime.BaseAPI { - - /** - * Converts an Avro schema into a streaming dataset configuration - * Convert Avro schema to dataset - */ - async convertAvroSchemaToDatasetRaw(requestParameters: ConvertAvroSchemaToDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling convertAvroSchemaToDataset().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/v1/schemas/avro/convert`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body'] as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DatasetDTOFromJSON(jsonValue)); + /** + * Converts an Avro schema into a streaming dataset configuration + * Convert Avro schema to dataset + */ + async convertAvroSchemaToDatasetRaw( + requestParameters: ConvertAvroSchemaToDatasetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling convertAvroSchemaToDataset().', + ); } - /** - * Converts an Avro schema into a streaming dataset configuration - * Convert Avro schema to dataset - */ - async convertAvroSchemaToDataset(requestParameters: ConvertAvroSchemaToDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.convertAvroSchemaToDatasetRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/v1/schemas/avro/convert`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: requestParameters["body"] as any, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DatasetDTOFromJSON(jsonValue)); + } + + /** + * Converts an Avro schema into a streaming dataset configuration + * Convert Avro schema to dataset + */ + async convertAvroSchemaToDataset( + requestParameters: ConvertAvroSchemaToDatasetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.convertAvroSchemaToDatasetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns Avro schemas for a Dataset + * Get Avro schemas for a Dataset + */ + async getAvroSchemaRaw( + requestParameters: GetAvroSchemaRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["DatasetDTO"] == null) { + throw new runtime.RequiredError( + "DatasetDTO", + 'Required parameter "DatasetDTO" was null or undefined when calling getAvroSchema().', + ); } - /** - * Returns Avro schemas for a Dataset - * Get Avro schemas for a Dataset - */ - async getAvroSchemaRaw(requestParameters: GetAvroSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['DatasetDTO'] == null) { - throw new runtime.RequiredError( - 'DatasetDTO', - 'Required parameter "DatasetDTO" was null or undefined when calling getAvroSchema().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['event_name'] != null) { - queryParameters['event_name'] = requestParameters['event_name']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/v1/schemas/avro`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters['DatasetDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AvroSchemaResponseListFromJSON(jsonValue)); - } + const queryParameters: any = {}; - /** - * Returns Avro schemas for a Dataset - * Get Avro schemas for a Dataset - */ - async getAvroSchema(requestParameters: GetAvroSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAvroSchemaRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["event_name"] != null) { + queryParameters["event_name"] = requestParameters["event_name"]; } - /** - * Returns Avro schemas for an existing stream - * Get Avro schemas for existing stream - */ - async getAvroSchemasForStreamRaw(requestParameters: GetAvroSchemasForStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['streamId'] == null) { - throw new runtime.RequiredError( - 'streamId', - 'Required parameter "streamId" was null or undefined when calling getAvroSchemasForStream().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['event_name'] != null) { - queryParameters['event_name'] = requestParameters['event_name']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/schemas/avro/stream/{streamId}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AvroSchemaResponseListFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/v1/schemas/avro`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AvroSchemaResponseListFromJSON(jsonValue), + ); + } + + /** + * Returns Avro schemas for a Dataset + * Get Avro schemas for a Dataset + */ + async getAvroSchema( + requestParameters: GetAvroSchemaRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getAvroSchemaRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns Avro schemas for an existing stream + * Get Avro schemas for existing stream + */ + async getAvroSchemasForStreamRaw( + requestParameters: GetAvroSchemasForStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["streamId"] == null) { + throw new runtime.RequiredError( + "streamId", + 'Required parameter "streamId" was null or undefined when calling getAvroSchemasForStream().', + ); } - /** - * Returns Avro schemas for an existing stream - * Get Avro schemas for existing stream - */ - async getAvroSchemasForStream(requestParameters: GetAvroSchemasForStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAvroSchemasForStreamRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["event_name"] != null) { + queryParameters["event_name"] = requestParameters["event_name"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/schemas/avro/stream/{streamId}`.replace( + `{${"streamId"}}`, + encodeURIComponent(String(requestParameters["streamId"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + AvroSchemaResponseListFromJSON(jsonValue), + ); + } + + /** + * Returns Avro schemas for an existing stream + * Get Avro schemas for existing stream + */ + async getAvroSchemasForStream( + requestParameters: GetAvroSchemasForStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getAvroSchemasForStreamRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/StreamManagementApi.ts b/src/clients/medusa/apis/StreamManagementApi.ts index 9b3d0f60a1..5ec9e9ff82 100644 --- a/src/clients/medusa/apis/StreamManagementApi.ts +++ b/src/clients/medusa/apis/StreamManagementApi.ts @@ -5,201 +5,240 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - DatasetDTO, - StreamDetails, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { DatasetDTO, StreamDetails } from "../models/index"; import { - DatasetDTOFromJSON, - DatasetDTOToJSON, - StreamDetailsFromJSON, - StreamDetailsToJSON, -} from '../models/index'; + DatasetDTOFromJSON, + DatasetDTOToJSON, + StreamDetailsFromJSON, + StreamDetailsToJSON, +} from "../models/index"; export interface BuildStreamRequest { - DatasetDTO: DatasetDTO; + DatasetDTO: DatasetDTO; } export interface BuildStreamWithIdRequest { - streamId: string; - DatasetDTO: DatasetDTO; + streamId: string; + DatasetDTO: DatasetDTO; } export interface GetDatasetStreamRequest { - streamId: string; - event_name?: string; + streamId: string; + event_name?: string; } export interface StartDatasetStreamRequest { - streamId: string; + streamId: string; } /** - * + * */ export class StreamManagementApi extends runtime.BaseAPI { - - /** - * Build a new stream - */ - async buildStreamRaw(requestParameters: BuildStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['DatasetDTO'] == null) { - throw new runtime.RequiredError( - 'DatasetDTO', - 'Required parameter "DatasetDTO" was null or undefined when calling buildStream().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/v1/streams`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters['DatasetDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); + /** + * Build a new stream + */ + async buildStreamRaw( + requestParameters: BuildStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["DatasetDTO"] == null) { + throw new runtime.RequiredError( + "DatasetDTO", + 'Required parameter "DatasetDTO" was null or undefined when calling buildStream().', + ); } - /** - * Build a new stream - */ - async buildStream(requestParameters: BuildStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.buildStreamRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/v1/streams`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); + } + + /** + * Build a new stream + */ + async buildStream( + requestParameters: BuildStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.buildStreamRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a new stream with a provided ID + * Build a stream with specific ID + */ + async buildStreamWithIdRaw( + requestParameters: BuildStreamWithIdRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["streamId"] == null) { + throw new runtime.RequiredError( + "streamId", + 'Required parameter "streamId" was null or undefined when calling buildStreamWithId().', + ); } - /** - * Creates a new stream with a provided ID - * Build a stream with specific ID - */ - async buildStreamWithIdRaw(requestParameters: BuildStreamWithIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['streamId'] == null) { - throw new runtime.RequiredError( - 'streamId', - 'Required parameter "streamId" was null or undefined when calling buildStreamWithId().' - ); - } - - if (requestParameters['DatasetDTO'] == null) { - throw new runtime.RequiredError( - 'DatasetDTO', - 'Required parameter "DatasetDTO" was null or undefined when calling buildStreamWithId().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/v1/streams/{streamId}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DatasetDTOToJSON(requestParameters['DatasetDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); + if (requestParameters["DatasetDTO"] == null) { + throw new runtime.RequiredError( + "DatasetDTO", + 'Required parameter "DatasetDTO" was null or undefined when calling buildStreamWithId().', + ); } - /** - * Creates a new stream with a provided ID - * Build a stream with specific ID - */ - async buildStreamWithId(requestParameters: BuildStreamWithIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.buildStreamWithIdRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/v1/streams/{streamId}`.replace( + `{${"streamId"}}`, + encodeURIComponent(String(requestParameters["streamId"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: DatasetDTOToJSON(requestParameters["DatasetDTO"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); + } + + /** + * Creates a new stream with a provided ID + * Build a stream with specific ID + */ + async buildStreamWithId( + requestParameters: BuildStreamWithIdRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.buildStreamWithIdRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` + * Subscribe to stream events + */ + async getDatasetStreamRaw( + requestParameters: GetDatasetStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["streamId"] == null) { + throw new runtime.RequiredError( + "streamId", + 'Required parameter "streamId" was null or undefined when calling getDatasetStream().', + ); } - /** - * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` - * Subscribe to stream events - */ - async getDatasetStreamRaw(requestParameters: GetDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['streamId'] == null) { - throw new runtime.RequiredError( - 'streamId', - 'Required parameter "streamId" was null or undefined when calling getDatasetStream().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['event_name'] != null) { - queryParameters['event_name'] = requestParameters['event_name']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/streams/{streamId}`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` - * Subscribe to stream events - */ - async getDatasetStream(requestParameters: GetDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.getDatasetStreamRaw(requestParameters, initOverrides); - } + const queryParameters: any = {}; - /** - * Initiates data streaming for the specified stream - * Start a stream - */ - async startDatasetStreamRaw(requestParameters: StartDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['streamId'] == null) { - throw new runtime.RequiredError( - 'streamId', - 'Required parameter "streamId" was null or undefined when calling startDatasetStream().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/streams/{streamId}/start`.replace(`{${"streamId"}}`, encodeURIComponent(String(requestParameters['streamId']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); + if (requestParameters["event_name"] != null) { + queryParameters["event_name"] = requestParameters["event_name"]; } - /** - * Initiates data streaming for the specified stream - * Start a stream - */ - async startDatasetStream(requestParameters: StartDatasetStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.startDatasetStreamRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/streams/{streamId}`.replace( + `{${"streamId"}}`, + encodeURIComponent(String(requestParameters["streamId"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Returns a Server-Sent Events (SSE) connection for real-time data. **Note:** This endpoint cannot be tested in Swagger UI as it uses Server-Sent Events. **Example usage with curl:** ```bash curl http://localhost:8082/stream/{streamId} ``` + * Subscribe to stream events + */ + async getDatasetStream( + requestParameters: GetDatasetStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.getDatasetStreamRaw(requestParameters, initOverrides); + } + + /** + * Initiates data streaming for the specified stream + * Start a stream + */ + async startDatasetStreamRaw( + requestParameters: StartDatasetStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["streamId"] == null) { + throw new runtime.RequiredError( + "streamId", + 'Required parameter "streamId" was null or undefined when calling startDatasetStream().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/streams/{streamId}/start`.replace( + `{${"streamId"}}`, + encodeURIComponent(String(requestParameters["streamId"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => StreamDetailsFromJSON(jsonValue)); + } + + /** + * Initiates data streaming for the specified stream + * Start a stream + */ + async startDatasetStream( + requestParameters: StartDatasetStreamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.startDatasetStreamRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/ValueGeneratorsApi.ts b/src/clients/medusa/apis/ValueGeneratorsApi.ts index 9ffb9cf61f..04e1f8f512 100644 --- a/src/clients/medusa/apis/ValueGeneratorsApi.ts +++ b/src/clients/medusa/apis/ValueGeneratorsApi.ts @@ -5,166 +5,207 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CategoryList, ValueGeneratorDetails, ValueGeneratorDetailsList, -} from '../models/index'; +} from "../models/index"; import { - CategoryListFromJSON, - CategoryListToJSON, - ValueGeneratorDetailsFromJSON, - ValueGeneratorDetailsToJSON, - ValueGeneratorDetailsListFromJSON, - ValueGeneratorDetailsListToJSON, -} from '../models/index'; + CategoryListFromJSON, + CategoryListToJSON, + ValueGeneratorDetailsFromJSON, + ValueGeneratorDetailsToJSON, + ValueGeneratorDetailsListFromJSON, + ValueGeneratorDetailsListToJSON, +} from "../models/index"; export interface GetValueGeneratorDetailsRequest { - valueGeneratorName: string; + valueGeneratorName: string; } export interface GetValueGeneratorsByCategoryRequest { - category: string; + category: string; } /** - * + * */ export class ValueGeneratorsApi extends runtime.BaseAPI { - - /** - * Returns a list of all available value generators and their details - * Get all value generators - */ - async getAllValueGeneratorDetailsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/generators`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ValueGeneratorDetailsListFromJSON(jsonValue)); - } - - /** - * Returns a list of all available value generators and their details - * Get all value generators - */ - async getAllValueGeneratorDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAllValueGeneratorDetailsRaw(initOverrides); - return await response.value(); - } - - /** - * Returns a list of all available value generator categories - * Get all generator categories - */ - async getValueGeneratorCategoriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/generators/categories`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CategoryListFromJSON(jsonValue)); - } - - /** - * Returns a list of all available value generator categories - * Get all generator categories - */ - async getValueGeneratorCategories(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getValueGeneratorCategoriesRaw(initOverrides); - return await response.value(); - } - - /** - * Returns details for a specific value generator - * Get value generator by name - */ - async getValueGeneratorDetailsRaw(requestParameters: GetValueGeneratorDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['valueGeneratorName'] == null) { - throw new runtime.RequiredError( - 'valueGeneratorName', - 'Required parameter "valueGeneratorName" was null or undefined when calling getValueGeneratorDetails().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/generators/{valueGeneratorName}`.replace(`{${"valueGeneratorName"}}`, encodeURIComponent(String(requestParameters['valueGeneratorName']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ValueGeneratorDetailsFromJSON(jsonValue)); - } - - /** - * Returns details for a specific value generator - * Get value generator by name - */ - async getValueGeneratorDetails(requestParameters: GetValueGeneratorDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getValueGeneratorDetailsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Returns all value generators for a specific category - * Get generators by category - */ - async getValueGeneratorsByCategoryRaw(requestParameters: GetValueGeneratorsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['category'] == null) { - throw new runtime.RequiredError( - 'category', - 'Required parameter "category" was null or undefined when calling getValueGeneratorsByCategory().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/v1/generators/categories/{category}`.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters['category']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ValueGeneratorDetailsListFromJSON(jsonValue)); + /** + * Returns a list of all available value generators and their details + * Get all value generators + */ + async getAllValueGeneratorDetailsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/generators`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ValueGeneratorDetailsListFromJSON(jsonValue), + ); + } + + /** + * Returns a list of all available value generators and their details + * Get all value generators + */ + async getAllValueGeneratorDetails( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getAllValueGeneratorDetailsRaw(initOverrides); + return await response.value(); + } + + /** + * Returns a list of all available value generator categories + * Get all generator categories + */ + async getValueGeneratorCategoriesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/generators/categories`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => CategoryListFromJSON(jsonValue)); + } + + /** + * Returns a list of all available value generator categories + * Get all generator categories + */ + async getValueGeneratorCategories( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getValueGeneratorCategoriesRaw(initOverrides); + return await response.value(); + } + + /** + * Returns details for a specific value generator + * Get value generator by name + */ + async getValueGeneratorDetailsRaw( + requestParameters: GetValueGeneratorDetailsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["valueGeneratorName"] == null) { + throw new runtime.RequiredError( + "valueGeneratorName", + 'Required parameter "valueGeneratorName" was null or undefined when calling getValueGeneratorDetails().', + ); } - /** - * Returns all value generators for a specific category - * Get generators by category - */ - async getValueGeneratorsByCategory(requestParameters: GetValueGeneratorsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getValueGeneratorsByCategoryRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/generators/{valueGeneratorName}`.replace( + `{${"valueGeneratorName"}}`, + encodeURIComponent(String(requestParameters["valueGeneratorName"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ValueGeneratorDetailsFromJSON(jsonValue), + ); + } + + /** + * Returns details for a specific value generator + * Get value generator by name + */ + async getValueGeneratorDetails( + requestParameters: GetValueGeneratorDetailsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getValueGeneratorDetailsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Returns all value generators for a specific category + * Get generators by category + */ + async getValueGeneratorsByCategoryRaw( + requestParameters: GetValueGeneratorsByCategoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["category"] == null) { + throw new runtime.RequiredError( + "category", + 'Required parameter "category" was null or undefined when calling getValueGeneratorsByCategory().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/v1/generators/categories/{category}`.replace( + `{${"category"}}`, + encodeURIComponent(String(requestParameters["category"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ValueGeneratorDetailsListFromJSON(jsonValue), + ); + } + + /** + * Returns all value generators for a specific category + * Get generators by category + */ + async getValueGeneratorsByCategory( + requestParameters: GetValueGeneratorsByCategoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getValueGeneratorsByCategoryRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/medusa/apis/index.ts b/src/clients/medusa/apis/index.ts index bda2603bec..fea6561302 100644 --- a/src/clients/medusa/apis/index.ts +++ b/src/clients/medusa/apis/index.ts @@ -1,9 +1,9 @@ /* tslint:disable */ /* eslint-disable */ -export * from './BatchManagementApi'; -export * from './ConfluentProducerControllerApi'; -export * from './EventThrottlersApi'; -export * from './ExampleDatasetsApi'; -export * from './SchemaManagementApi'; -export * from './StreamManagementApi'; -export * from './ValueGeneratorsApi'; +export * from "./BatchManagementApi"; +export * from "./ConfluentProducerControllerApi"; +export * from "./EventThrottlersApi"; +export * from "./ExampleDatasetsApi"; +export * from "./SchemaManagementApi"; +export * from "./StreamManagementApi"; +export * from "./ValueGeneratorsApi"; diff --git a/src/clients/medusa/index.ts b/src/clients/medusa/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/medusa/index.ts +++ b/src/clients/medusa/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/medusa/models/AvroSchemaResponse.ts b/src/clients/medusa/models/AvroSchemaResponse.ts index dc4fa29e2a..45dbf4821b 100644 --- a/src/clients/medusa/models/AvroSchemaResponse.ts +++ b/src/clients/medusa/models/AvroSchemaResponse.ts @@ -5,61 +5,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface AvroSchemaResponse */ export interface AvroSchemaResponse { - /** - * - * @type {object} - * @memberof AvroSchemaResponse - */ - schema?: object; + /** + * + * @type {object} + * @memberof AvroSchemaResponse + */ + schema?: object; } /** * Check if a given object implements the AvroSchemaResponse interface. */ export function instanceOfAvroSchemaResponse(value: object): value is AvroSchemaResponse { - return true; + return true; } export function AvroSchemaResponseFromJSON(json: any): AvroSchemaResponse { - return AvroSchemaResponseFromJSONTyped(json, false); + return AvroSchemaResponseFromJSONTyped(json, false); } -export function AvroSchemaResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AvroSchemaResponse { - if (json == null) { - return json; - } - return { - - 'schema': json['schema'] == null ? undefined : json['schema'], - }; +export function AvroSchemaResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AvroSchemaResponse { + if (json == null) { + return json; + } + return { + schema: json["schema"] == null ? undefined : json["schema"], + }; } export function AvroSchemaResponseToJSON(json: any): AvroSchemaResponse { - return AvroSchemaResponseToJSONTyped(json, false); + return AvroSchemaResponseToJSONTyped(json, false); } -export function AvroSchemaResponseToJSONTyped(value?: AvroSchemaResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AvroSchemaResponseToJSONTyped( + value?: AvroSchemaResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'schema': value['schema'], - }; + return { + schema: value["schema"], + }; } - diff --git a/src/clients/medusa/models/AvroSchemaResponseList.ts b/src/clients/medusa/models/AvroSchemaResponseList.ts index 39d529eb4f..6db0f747ba 100644 --- a/src/clients/medusa/models/AvroSchemaResponseList.ts +++ b/src/clients/medusa/models/AvroSchemaResponseList.ts @@ -5,100 +5,109 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { AvroSchemaResponse } from './AvroSchemaResponse'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { AvroSchemaResponse } from "./AvroSchemaResponse"; import { - AvroSchemaResponseFromJSON, - AvroSchemaResponseFromJSONTyped, - AvroSchemaResponseToJSON, - AvroSchemaResponseToJSONTyped, -} from './AvroSchemaResponse'; + AvroSchemaResponseFromJSON, + AvroSchemaResponseFromJSONTyped, + AvroSchemaResponseToJSON, + AvroSchemaResponseToJSONTyped, +} from "./AvroSchemaResponse"; /** - * + * * @export * @interface AvroSchemaResponseList */ export interface AvroSchemaResponseList { - /** - * - * @type {CollectionMetadata} - * @memberof AvroSchemaResponseList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof AvroSchemaResponseList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof AvroSchemaResponseList - */ - data?: Array; - /** - * - * @type {string} - * @memberof AvroSchemaResponseList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof AvroSchemaResponseList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof AvroSchemaResponseList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof AvroSchemaResponseList + */ + data?: Array; + /** + * + * @type {string} + * @memberof AvroSchemaResponseList + */ + kind?: string; } /** * Check if a given object implements the AvroSchemaResponseList interface. */ export function instanceOfAvroSchemaResponseList(value: object): value is AvroSchemaResponseList { - return true; + return true; } export function AvroSchemaResponseListFromJSON(json: any): AvroSchemaResponseList { - return AvroSchemaResponseListFromJSONTyped(json, false); + return AvroSchemaResponseListFromJSONTyped(json, false); } -export function AvroSchemaResponseListFromJSONTyped(json: any, ignoreDiscriminator: boolean): AvroSchemaResponseList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(AvroSchemaResponseFromJSON)), - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function AvroSchemaResponseListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): AvroSchemaResponseList { + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: + json["data"] == null + ? undefined + : (json["data"] as Array).map(AvroSchemaResponseFromJSON), + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function AvroSchemaResponseListToJSON(json: any): AvroSchemaResponseList { - return AvroSchemaResponseListToJSONTyped(json, false); + return AvroSchemaResponseListToJSONTyped(json, false); } -export function AvroSchemaResponseListToJSONTyped(value?: AvroSchemaResponseList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AvroSchemaResponseListToJSONTyped( + value?: AvroSchemaResponseList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(AvroSchemaResponseToJSON)), - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: + value["data"] == null + ? undefined + : (value["data"] as Array).map(AvroSchemaResponseToJSON), + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/CategoryList.ts b/src/clients/medusa/models/CategoryList.ts index 383b5dae60..faff1c7c8f 100644 --- a/src/clients/medusa/models/CategoryList.ts +++ b/src/clients/medusa/models/CategoryList.ts @@ -5,120 +5,119 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; /** - * + * * @export * @interface CategoryList */ export interface CategoryList { - /** - * - * @type {CollectionMetadata} - * @memberof CategoryList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof CategoryList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof CategoryList - */ - data?: Array; - /** - * - * @type {string} - * @memberof CategoryList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof CategoryList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof CategoryList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof CategoryList + */ + data?: Array; + /** + * + * @type {string} + * @memberof CategoryList + */ + kind?: string; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CategoryListDataEnum { - Location = 'Location', - Boolean = 'Boolean', - Commerce = 'Commerce', - Company = 'Company', - Conditional = 'Conditional', - Date = 'Date', - Device = 'Device', - Finance = 'Finance', - Healthcare = 'Healthcare', - Internet = 'Internet', - Number = 'Number', - Person = 'Person', - Phone = 'Phone', - String = 'String', - Struct = 'Struct', - Reference = 'Reference', - Util = 'Util', - Table = 'Table', - Vehicle = 'Vehicle' + Location = "Location", + Boolean = "Boolean", + Commerce = "Commerce", + Company = "Company", + Conditional = "Conditional", + Date = "Date", + Device = "Device", + Finance = "Finance", + Healthcare = "Healthcare", + Internet = "Internet", + Number = "Number", + Person = "Person", + Phone = "Phone", + String = "String", + Struct = "Struct", + Reference = "Reference", + Util = "Util", + Table = "Table", + Vehicle = "Vehicle", } - /** * Check if a given object implements the CategoryList interface. */ export function instanceOfCategoryList(value: object): value is CategoryList { - return true; + return true; } export function CategoryListFromJSON(json: any): CategoryList { - return CategoryListFromJSONTyped(json, false); + return CategoryListFromJSONTyped(json, false); } export function CategoryListFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : json['data'], - 'kind': json['kind'] == null ? undefined : json['kind'], - }; + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: json["data"] == null ? undefined : json["data"], + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function CategoryListToJSON(json: any): CategoryList { - return CategoryListToJSONTyped(json, false); + return CategoryListToJSONTyped(json, false); } -export function CategoryListToJSONTyped(value?: CategoryList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CategoryListToJSONTyped( + value?: CategoryList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'], - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: value["data"], + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/CollectionMetadata.ts b/src/clients/medusa/models/CollectionMetadata.ts index 8cf21120a4..a4f6c9ab5c 100644 --- a/src/clients/medusa/models/CollectionMetadata.ts +++ b/src/clients/medusa/models/CollectionMetadata.ts @@ -5,69 +5,72 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CollectionMetadata */ export interface CollectionMetadata { - /** - * - * @type {number} - * @memberof CollectionMetadata - */ - total_size?: number; - /** - * - * @type {string} - * @memberof CollectionMetadata - */ - self?: string; + /** + * + * @type {number} + * @memberof CollectionMetadata + */ + total_size?: number; + /** + * + * @type {string} + * @memberof CollectionMetadata + */ + self?: string; } /** * Check if a given object implements the CollectionMetadata interface. */ export function instanceOfCollectionMetadata(value: object): value is CollectionMetadata { - return true; + return true; } export function CollectionMetadataFromJSON(json: any): CollectionMetadata { - return CollectionMetadataFromJSONTyped(json, false); + return CollectionMetadataFromJSONTyped(json, false); } -export function CollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionMetadata { - if (json == null) { - return json; - } - return { - - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - 'self': json['self'] == null ? undefined : json['self'], - }; +export function CollectionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CollectionMetadata { + if (json == null) { + return json; + } + return { + total_size: json["total_size"] == null ? undefined : json["total_size"], + self: json["self"] == null ? undefined : json["self"], + }; } export function CollectionMetadataToJSON(json: any): CollectionMetadata { - return CollectionMetadataToJSONTyped(json, false); + return CollectionMetadataToJSONTyped(json, false); } -export function CollectionMetadataToJSONTyped(value?: CollectionMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CollectionMetadataToJSONTyped( + value?: CollectionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'total_size': value['total_size'], - 'self': value['self'], - }; + return { + total_size: value["total_size"], + self: value["self"], + }; } - diff --git a/src/clients/medusa/models/ColumnDTO.ts b/src/clients/medusa/models/ColumnDTO.ts index 0a3ab590af..2ed9ee7151 100644 --- a/src/clients/medusa/models/ColumnDTO.ts +++ b/src/clients/medusa/models/ColumnDTO.ts @@ -5,85 +5,84 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ColumnDTO */ export interface ColumnDTO { - /** - * - * @type {string} - * @memberof ColumnDTO - */ - name: string; - /** - * - * @type {string} - * @memberof ColumnDTO - */ - type: ColumnDTOTypeEnum; + /** + * + * @type {string} + * @memberof ColumnDTO + */ + name: string; + /** + * + * @type {string} + * @memberof ColumnDTO + */ + type: ColumnDTOTypeEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ColumnDTOTypeEnum { - String = 'STRING', - Integer = 'INTEGER', - Long = 'LONG', - Double = 'DOUBLE', - Float = 'FLOAT', - Boolean = 'BOOLEAN' + String = "STRING", + Integer = "INTEGER", + Long = "LONG", + Double = "DOUBLE", + Float = "FLOAT", + Boolean = "BOOLEAN", } - /** * Check if a given object implements the ColumnDTO interface. */ export function instanceOfColumnDTO(value: object): value is ColumnDTO { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + return true; } export function ColumnDTOFromJSON(json: any): ColumnDTO { - return ColumnDTOFromJSONTyped(json, false); + return ColumnDTOFromJSONTyped(json, false); } export function ColumnDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ColumnDTO { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'type': json['type'], - }; + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + }; } export function ColumnDTOToJSON(json: any): ColumnDTO { - return ColumnDTOToJSONTyped(json, false); + return ColumnDTOToJSONTyped(json, false); } -export function ColumnDTOToJSONTyped(value?: ColumnDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ColumnDTOToJSONTyped( + value?: ColumnDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'type': value['type'], - }; + return { + name: value["name"], + type: value["type"], + }; } - diff --git a/src/clients/medusa/models/DatasetDTO.ts b/src/clients/medusa/models/DatasetDTO.ts index 644306416a..9d4bf81c9d 100644 --- a/src/clients/medusa/models/DatasetDTO.ts +++ b/src/clients/medusa/models/DatasetDTO.ts @@ -5,85 +5,87 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { EventDTO } from './EventDTO'; +import { mapValues } from "../runtime"; +import type { EventDTO } from "./EventDTO"; import { - EventDTOFromJSON, - EventDTOFromJSONTyped, - EventDTOToJSON, - EventDTOToJSONTyped, -} from './EventDTO'; -import type { TableDTO } from './TableDTO'; + EventDTOFromJSON, + EventDTOFromJSONTyped, + EventDTOToJSON, + EventDTOToJSONTyped, +} from "./EventDTO"; +import type { TableDTO } from "./TableDTO"; import { - TableDTOFromJSON, - TableDTOFromJSONTyped, - TableDTOToJSON, - TableDTOToJSONTyped, -} from './TableDTO'; + TableDTOFromJSON, + TableDTOFromJSONTyped, + TableDTOToJSON, + TableDTOToJSONTyped, +} from "./TableDTO"; /** - * + * * @export * @interface DatasetDTO */ export interface DatasetDTO { - /** - * - * @type {Array} - * @memberof DatasetDTO - */ - events: Array; - /** - * - * @type {Array} - * @memberof DatasetDTO - */ - tables?: Array; + /** + * + * @type {Array} + * @memberof DatasetDTO + */ + events: Array; + /** + * + * @type {Array} + * @memberof DatasetDTO + */ + tables?: Array; } /** * Check if a given object implements the DatasetDTO interface. */ export function instanceOfDatasetDTO(value: object): value is DatasetDTO { - if (!('events' in value) || value['events'] === undefined) return false; - return true; + if (!("events" in value) || value["events"] === undefined) return false; + return true; } export function DatasetDTOFromJSON(json: any): DatasetDTO { - return DatasetDTOFromJSONTyped(json, false); + return DatasetDTOFromJSONTyped(json, false); } export function DatasetDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatasetDTO { - if (json == null) { - return json; - } - return { - - 'events': ((json['events'] as Array).map(EventDTOFromJSON)), - 'tables': json['tables'] == null ? undefined : ((json['tables'] as Array).map(TableDTOFromJSON)), - }; + if (json == null) { + return json; + } + return { + events: (json["events"] as Array).map(EventDTOFromJSON), + tables: + json["tables"] == null ? undefined : (json["tables"] as Array).map(TableDTOFromJSON), + }; } export function DatasetDTOToJSON(json: any): DatasetDTO { - return DatasetDTOToJSONTyped(json, false); + return DatasetDTOToJSONTyped(json, false); } -export function DatasetDTOToJSONTyped(value?: DatasetDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function DatasetDTOToJSONTyped( + value?: DatasetDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'events': ((value['events'] as Array).map(EventDTOToJSON)), - 'tables': value['tables'] == null ? undefined : ((value['tables'] as Array).map(TableDTOToJSON)), - }; + return { + events: (value["events"] as Array).map(EventDTOToJSON), + tables: + value["tables"] == null ? undefined : (value["tables"] as Array).map(TableDTOToJSON), + }; } - diff --git a/src/clients/medusa/models/EventDTO.ts b/src/clients/medusa/models/EventDTO.ts index 20af904bb5..35e1b0e3fe 100644 --- a/src/clients/medusa/models/EventDTO.ts +++ b/src/clients/medusa/models/EventDTO.ts @@ -5,118 +5,121 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TableLinkDTO } from './TableLinkDTO'; +import { mapValues } from "../runtime"; +import type { TableLinkDTO } from "./TableLinkDTO"; import { - TableLinkDTOFromJSON, - TableLinkDTOFromJSONTyped, - TableLinkDTOToJSON, - TableLinkDTOToJSONTyped, -} from './TableLinkDTO'; -import type { EventThrottlerDTO } from './EventThrottlerDTO'; + TableLinkDTOFromJSON, + TableLinkDTOFromJSONTyped, + TableLinkDTOToJSON, + TableLinkDTOToJSONTyped, +} from "./TableLinkDTO"; +import type { EventThrottlerDTO } from "./EventThrottlerDTO"; import { - EventThrottlerDTOFromJSON, - EventThrottlerDTOFromJSONTyped, - EventThrottlerDTOToJSON, - EventThrottlerDTOToJSONTyped, -} from './EventThrottlerDTO'; -import type { FieldDTO } from './FieldDTO'; + EventThrottlerDTOFromJSON, + EventThrottlerDTOFromJSONTyped, + EventThrottlerDTOToJSON, + EventThrottlerDTOToJSONTyped, +} from "./EventThrottlerDTO"; +import type { FieldDTO } from "./FieldDTO"; import { - FieldDTOFromJSON, - FieldDTOFromJSONTyped, - FieldDTOToJSON, - FieldDTOToJSONTyped, -} from './FieldDTO'; + FieldDTOFromJSON, + FieldDTOFromJSONTyped, + FieldDTOToJSON, + FieldDTOToJSONTyped, +} from "./FieldDTO"; /** - * + * * @export * @interface EventDTO */ export interface EventDTO { - /** - * - * @type {EventThrottlerDTO} - * @memberof EventDTO - */ - event_throttler?: EventThrottlerDTO; - /** - * - * @type {TableLinkDTO} - * @memberof EventDTO - */ - table_link?: TableLinkDTO; - /** - * - * @type {string} - * @memberof EventDTO - */ - key_field_name: string; - /** - * - * @type {string} - * @memberof EventDTO - */ - event_name: string; - /** - * - * @type {Array} - * @memberof EventDTO - */ - fields: Array; + /** + * + * @type {EventThrottlerDTO} + * @memberof EventDTO + */ + event_throttler?: EventThrottlerDTO; + /** + * + * @type {TableLinkDTO} + * @memberof EventDTO + */ + table_link?: TableLinkDTO; + /** + * + * @type {string} + * @memberof EventDTO + */ + key_field_name: string; + /** + * + * @type {string} + * @memberof EventDTO + */ + event_name: string; + /** + * + * @type {Array} + * @memberof EventDTO + */ + fields: Array; } /** * Check if a given object implements the EventDTO interface. */ export function instanceOfEventDTO(value: object): value is EventDTO { - if (!('key_field_name' in value) || value['key_field_name'] === undefined) return false; - if (!('event_name' in value) || value['event_name'] === undefined) return false; - if (!('fields' in value) || value['fields'] === undefined) return false; - return true; + if (!("key_field_name" in value) || value["key_field_name"] === undefined) return false; + if (!("event_name" in value) || value["event_name"] === undefined) return false; + if (!("fields" in value) || value["fields"] === undefined) return false; + return true; } export function EventDTOFromJSON(json: any): EventDTO { - return EventDTOFromJSONTyped(json, false); + return EventDTOFromJSONTyped(json, false); } export function EventDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventDTO { - if (json == null) { - return json; - } - return { - - 'event_throttler': json['event_throttler'] == null ? undefined : EventThrottlerDTOFromJSON(json['event_throttler']), - 'table_link': json['table_link'] == null ? undefined : TableLinkDTOFromJSON(json['table_link']), - 'key_field_name': json['key_field_name'], - 'event_name': json['event_name'], - 'fields': ((json['fields'] as Array).map(FieldDTOFromJSON)), - }; + if (json == null) { + return json; + } + return { + event_throttler: + json["event_throttler"] == null + ? undefined + : EventThrottlerDTOFromJSON(json["event_throttler"]), + table_link: json["table_link"] == null ? undefined : TableLinkDTOFromJSON(json["table_link"]), + key_field_name: json["key_field_name"], + event_name: json["event_name"], + fields: (json["fields"] as Array).map(FieldDTOFromJSON), + }; } export function EventDTOToJSON(json: any): EventDTO { - return EventDTOToJSONTyped(json, false); + return EventDTOToJSONTyped(json, false); } -export function EventDTOToJSONTyped(value?: EventDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventDTOToJSONTyped( + value?: EventDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'event_throttler': EventThrottlerDTOToJSON(value['event_throttler']), - 'table_link': TableLinkDTOToJSON(value['table_link']), - 'key_field_name': value['key_field_name'], - 'event_name': value['event_name'], - 'fields': ((value['fields'] as Array).map(FieldDTOToJSON)), - }; + return { + event_throttler: EventThrottlerDTOToJSON(value["event_throttler"]), + table_link: TableLinkDTOToJSON(value["table_link"]), + key_field_name: value["key_field_name"], + event_name: value["event_name"], + fields: (value["fields"] as Array).map(FieldDTOToJSON), + }; } - diff --git a/src/clients/medusa/models/EventMessage.ts b/src/clients/medusa/models/EventMessage.ts index ad8f453db6..88421e0173 100644 --- a/src/clients/medusa/models/EventMessage.ts +++ b/src/clients/medusa/models/EventMessage.ts @@ -5,69 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface EventMessage */ export interface EventMessage { - /** - * - * @type {string} - * @memberof EventMessage - */ - event_name?: string; - /** - * - * @type {{ [key: string]: object; }} - * @memberof EventMessage - */ - data?: { [key: string]: object; }; + /** + * + * @type {string} + * @memberof EventMessage + */ + event_name?: string; + /** + * + * @type {{ [key: string]: object; }} + * @memberof EventMessage + */ + data?: { [key: string]: object }; } /** * Check if a given object implements the EventMessage interface. */ export function instanceOfEventMessage(value: object): value is EventMessage { - return true; + return true; } export function EventMessageFromJSON(json: any): EventMessage { - return EventMessageFromJSONTyped(json, false); + return EventMessageFromJSONTyped(json, false); } export function EventMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMessage { - if (json == null) { - return json; - } - return { - - 'event_name': json['event_name'] == null ? undefined : json['event_name'], - 'data': json['data'] == null ? undefined : json['data'], - }; + if (json == null) { + return json; + } + return { + event_name: json["event_name"] == null ? undefined : json["event_name"], + data: json["data"] == null ? undefined : json["data"], + }; } export function EventMessageToJSON(json: any): EventMessage { - return EventMessageToJSONTyped(json, false); + return EventMessageToJSONTyped(json, false); } -export function EventMessageToJSONTyped(value?: EventMessage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventMessageToJSONTyped( + value?: EventMessage | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'event_name': value['event_name'], - 'data': value['data'], - }; + return { + event_name: value["event_name"], + data: value["data"], + }; } - diff --git a/src/clients/medusa/models/EventMessageList.ts b/src/clients/medusa/models/EventMessageList.ts index 61877af072..e1158aa82f 100644 --- a/src/clients/medusa/models/EventMessageList.ts +++ b/src/clients/medusa/models/EventMessageList.ts @@ -5,100 +5,103 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { EventMessage } from './EventMessage'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { EventMessage } from "./EventMessage"; import { - EventMessageFromJSON, - EventMessageFromJSONTyped, - EventMessageToJSON, - EventMessageToJSONTyped, -} from './EventMessage'; + EventMessageFromJSON, + EventMessageFromJSONTyped, + EventMessageToJSON, + EventMessageToJSONTyped, +} from "./EventMessage"; /** - * + * * @export * @interface EventMessageList */ export interface EventMessageList { - /** - * - * @type {CollectionMetadata} - * @memberof EventMessageList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof EventMessageList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof EventMessageList - */ - data?: Array; - /** - * - * @type {string} - * @memberof EventMessageList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof EventMessageList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof EventMessageList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof EventMessageList + */ + data?: Array; + /** + * + * @type {string} + * @memberof EventMessageList + */ + kind?: string; } /** * Check if a given object implements the EventMessageList interface. */ export function instanceOfEventMessageList(value: object): value is EventMessageList { - return true; + return true; } export function EventMessageListFromJSON(json: any): EventMessageList { - return EventMessageListFromJSONTyped(json, false); + return EventMessageListFromJSONTyped(json, false); } -export function EventMessageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventMessageList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(EventMessageFromJSON)), - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function EventMessageListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EventMessageList { + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: json["data"] == null ? undefined : (json["data"] as Array).map(EventMessageFromJSON), + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function EventMessageListToJSON(json: any): EventMessageList { - return EventMessageListToJSONTyped(json, false); + return EventMessageListToJSONTyped(json, false); } -export function EventMessageListToJSONTyped(value?: EventMessageList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventMessageListToJSONTyped( + value?: EventMessageList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(EventMessageToJSON)), - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: value["data"] == null ? undefined : (value["data"] as Array).map(EventMessageToJSON), + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/EventStreamSimulation.ts b/src/clients/medusa/models/EventStreamSimulation.ts index 2ba298e1db..417c9e4f76 100644 --- a/src/clients/medusa/models/EventStreamSimulation.ts +++ b/src/clients/medusa/models/EventStreamSimulation.ts @@ -5,77 +5,81 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface EventStreamSimulation */ export interface EventStreamSimulation { - /** - * - * @type {string} - * @memberof EventStreamSimulation - */ - event_name?: string; - /** - * - * @type {number} - * @memberof EventStreamSimulation - */ - simulation_minutes_length?: number; - /** - * - * @type {Array} - * @memberof EventStreamSimulation - */ - sleep_intervals?: Array; + /** + * + * @type {string} + * @memberof EventStreamSimulation + */ + event_name?: string; + /** + * + * @type {number} + * @memberof EventStreamSimulation + */ + simulation_minutes_length?: number; + /** + * + * @type {Array} + * @memberof EventStreamSimulation + */ + sleep_intervals?: Array; } /** * Check if a given object implements the EventStreamSimulation interface. */ export function instanceOfEventStreamSimulation(value: object): value is EventStreamSimulation { - return true; + return true; } export function EventStreamSimulationFromJSON(json: any): EventStreamSimulation { - return EventStreamSimulationFromJSONTyped(json, false); + return EventStreamSimulationFromJSONTyped(json, false); } -export function EventStreamSimulationFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventStreamSimulation { - if (json == null) { - return json; - } - return { - - 'event_name': json['event_name'] == null ? undefined : json['event_name'], - 'simulation_minutes_length': json['simulation_minutes_length'] == null ? undefined : json['simulation_minutes_length'], - 'sleep_intervals': json['sleep_intervals'] == null ? undefined : json['sleep_intervals'], - }; +export function EventStreamSimulationFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EventStreamSimulation { + if (json == null) { + return json; + } + return { + event_name: json["event_name"] == null ? undefined : json["event_name"], + simulation_minutes_length: + json["simulation_minutes_length"] == null ? undefined : json["simulation_minutes_length"], + sleep_intervals: json["sleep_intervals"] == null ? undefined : json["sleep_intervals"], + }; } export function EventStreamSimulationToJSON(json: any): EventStreamSimulation { - return EventStreamSimulationToJSONTyped(json, false); + return EventStreamSimulationToJSONTyped(json, false); } -export function EventStreamSimulationToJSONTyped(value?: EventStreamSimulation | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventStreamSimulationToJSONTyped( + value?: EventStreamSimulation | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'event_name': value['event_name'], - 'simulation_minutes_length': value['simulation_minutes_length'], - 'sleep_intervals': value['sleep_intervals'], - }; + return { + event_name: value["event_name"], + simulation_minutes_length: value["simulation_minutes_length"], + sleep_intervals: value["sleep_intervals"], + }; } - diff --git a/src/clients/medusa/models/EventStreamSimulationList.ts b/src/clients/medusa/models/EventStreamSimulationList.ts index 28029774ae..e05397e860 100644 --- a/src/clients/medusa/models/EventStreamSimulationList.ts +++ b/src/clients/medusa/models/EventStreamSimulationList.ts @@ -5,100 +5,111 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { EventStreamSimulation } from './EventStreamSimulation'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { EventStreamSimulation } from "./EventStreamSimulation"; import { - EventStreamSimulationFromJSON, - EventStreamSimulationFromJSONTyped, - EventStreamSimulationToJSON, - EventStreamSimulationToJSONTyped, -} from './EventStreamSimulation'; + EventStreamSimulationFromJSON, + EventStreamSimulationFromJSONTyped, + EventStreamSimulationToJSON, + EventStreamSimulationToJSONTyped, +} from "./EventStreamSimulation"; /** - * + * * @export * @interface EventStreamSimulationList */ export interface EventStreamSimulationList { - /** - * - * @type {CollectionMetadata} - * @memberof EventStreamSimulationList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof EventStreamSimulationList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof EventStreamSimulationList - */ - data?: Array; - /** - * - * @type {string} - * @memberof EventStreamSimulationList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof EventStreamSimulationList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof EventStreamSimulationList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof EventStreamSimulationList + */ + data?: Array; + /** + * + * @type {string} + * @memberof EventStreamSimulationList + */ + kind?: string; } /** * Check if a given object implements the EventStreamSimulationList interface. */ -export function instanceOfEventStreamSimulationList(value: object): value is EventStreamSimulationList { - return true; +export function instanceOfEventStreamSimulationList( + value: object, +): value is EventStreamSimulationList { + return true; } export function EventStreamSimulationListFromJSON(json: any): EventStreamSimulationList { - return EventStreamSimulationListFromJSONTyped(json, false); + return EventStreamSimulationListFromJSONTyped(json, false); } -export function EventStreamSimulationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventStreamSimulationList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(EventStreamSimulationFromJSON)), - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function EventStreamSimulationListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EventStreamSimulationList { + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: + json["data"] == null + ? undefined + : (json["data"] as Array).map(EventStreamSimulationFromJSON), + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function EventStreamSimulationListToJSON(json: any): EventStreamSimulationList { - return EventStreamSimulationListToJSONTyped(json, false); + return EventStreamSimulationListToJSONTyped(json, false); } -export function EventStreamSimulationListToJSONTyped(value?: EventStreamSimulationList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventStreamSimulationListToJSONTyped( + value?: EventStreamSimulationList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(EventStreamSimulationToJSON)), - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: + value["data"] == null + ? undefined + : (value["data"] as Array).map(EventStreamSimulationToJSON), + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/EventThrottlerDTO.ts b/src/clients/medusa/models/EventThrottlerDTO.ts index 9db7e6eaa6..07ea56711b 100644 --- a/src/clients/medusa/models/EventThrottlerDTO.ts +++ b/src/clients/medusa/models/EventThrottlerDTO.ts @@ -5,79 +5,81 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface EventThrottlerDTO */ export interface EventThrottlerDTO { - /** - * - * @type {Array} - * @memberof EventThrottlerDTO - */ - arguments?: Array; - /** - * - * @type {string} - * @memberof EventThrottlerDTO - */ - throttle_type: EventThrottlerDTOThrottleTypeEnum; + /** + * + * @type {Array} + * @memberof EventThrottlerDTO + */ + arguments?: Array; + /** + * + * @type {string} + * @memberof EventThrottlerDTO + */ + throttle_type: EventThrottlerDTOThrottleTypeEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum EventThrottlerDTOThrottleTypeEnum { - Graph = 'graph' + Graph = "graph", } - /** * Check if a given object implements the EventThrottlerDTO interface. */ export function instanceOfEventThrottlerDTO(value: object): value is EventThrottlerDTO { - if (!('throttle_type' in value) || value['throttle_type'] === undefined) return false; - return true; + if (!("throttle_type" in value) || value["throttle_type"] === undefined) return false; + return true; } export function EventThrottlerDTOFromJSON(json: any): EventThrottlerDTO { - return EventThrottlerDTOFromJSONTyped(json, false); + return EventThrottlerDTOFromJSONTyped(json, false); } -export function EventThrottlerDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventThrottlerDTO { - if (json == null) { - return json; - } - return { - - 'arguments': json['arguments'] == null ? undefined : json['arguments'], - 'throttle_type': json['throttle_type'], - }; +export function EventThrottlerDTOFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EventThrottlerDTO { + if (json == null) { + return json; + } + return { + arguments: json["arguments"] == null ? undefined : json["arguments"], + throttle_type: json["throttle_type"], + }; } export function EventThrottlerDTOToJSON(json: any): EventThrottlerDTO { - return EventThrottlerDTOToJSONTyped(json, false); + return EventThrottlerDTOToJSONTyped(json, false); } -export function EventThrottlerDTOToJSONTyped(value?: EventThrottlerDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventThrottlerDTOToJSONTyped( + value?: EventThrottlerDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'arguments': value['arguments'], - 'throttle_type': value['throttle_type'], - }; + return { + arguments: value["arguments"], + throttle_type: value["throttle_type"], + }; } - diff --git a/src/clients/medusa/models/EventThrottlerDetails.ts b/src/clients/medusa/models/EventThrottlerDetails.ts index 1d205e4bd2..37ba7d3b31 100644 --- a/src/clients/medusa/models/EventThrottlerDetails.ts +++ b/src/clients/medusa/models/EventThrottlerDetails.ts @@ -5,85 +5,94 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ExpectedArgumentDetails } from './ExpectedArgumentDetails'; +import { mapValues } from "../runtime"; +import type { ExpectedArgumentDetails } from "./ExpectedArgumentDetails"; import { - ExpectedArgumentDetailsFromJSON, - ExpectedArgumentDetailsFromJSONTyped, - ExpectedArgumentDetailsToJSON, - ExpectedArgumentDetailsToJSONTyped, -} from './ExpectedArgumentDetails'; + ExpectedArgumentDetailsFromJSON, + ExpectedArgumentDetailsFromJSONTyped, + ExpectedArgumentDetailsToJSON, + ExpectedArgumentDetailsToJSONTyped, +} from "./ExpectedArgumentDetails"; /** - * + * * @export * @interface EventThrottlerDetails */ export interface EventThrottlerDetails { - /** - * - * @type {string} - * @memberof EventThrottlerDetails - */ - name?: string; - /** - * - * @type {string} - * @memberof EventThrottlerDetails - */ - description?: string; - /** - * - * @type {Array} - * @memberof EventThrottlerDetails - */ - arguments?: Array; + /** + * + * @type {string} + * @memberof EventThrottlerDetails + */ + name?: string; + /** + * + * @type {string} + * @memberof EventThrottlerDetails + */ + description?: string; + /** + * + * @type {Array} + * @memberof EventThrottlerDetails + */ + arguments?: Array; } /** * Check if a given object implements the EventThrottlerDetails interface. */ export function instanceOfEventThrottlerDetails(value: object): value is EventThrottlerDetails { - return true; + return true; } export function EventThrottlerDetailsFromJSON(json: any): EventThrottlerDetails { - return EventThrottlerDetailsFromJSONTyped(json, false); + return EventThrottlerDetailsFromJSONTyped(json, false); } -export function EventThrottlerDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventThrottlerDetails { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'arguments': json['arguments'] == null ? undefined : ((json['arguments'] as Array).map(ExpectedArgumentDetailsFromJSON)), - }; +export function EventThrottlerDetailsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EventThrottlerDetails { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + description: json["description"] == null ? undefined : json["description"], + arguments: + json["arguments"] == null + ? undefined + : (json["arguments"] as Array).map(ExpectedArgumentDetailsFromJSON), + }; } export function EventThrottlerDetailsToJSON(json: any): EventThrottlerDetails { - return EventThrottlerDetailsToJSONTyped(json, false); + return EventThrottlerDetailsToJSONTyped(json, false); } -export function EventThrottlerDetailsToJSONTyped(value?: EventThrottlerDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventThrottlerDetailsToJSONTyped( + value?: EventThrottlerDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'description': value['description'], - 'arguments': value['arguments'] == null ? undefined : ((value['arguments'] as Array).map(ExpectedArgumentDetailsToJSON)), - }; + return { + name: value["name"], + description: value["description"], + arguments: + value["arguments"] == null + ? undefined + : (value["arguments"] as Array).map(ExpectedArgumentDetailsToJSON), + }; } - diff --git a/src/clients/medusa/models/EventThrottlerDetailsList.ts b/src/clients/medusa/models/EventThrottlerDetailsList.ts index 7ccbe65be5..dc8bea1b35 100644 --- a/src/clients/medusa/models/EventThrottlerDetailsList.ts +++ b/src/clients/medusa/models/EventThrottlerDetailsList.ts @@ -5,100 +5,111 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { EventThrottlerDetails } from './EventThrottlerDetails'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { EventThrottlerDetails } from "./EventThrottlerDetails"; import { - EventThrottlerDetailsFromJSON, - EventThrottlerDetailsFromJSONTyped, - EventThrottlerDetailsToJSON, - EventThrottlerDetailsToJSONTyped, -} from './EventThrottlerDetails'; + EventThrottlerDetailsFromJSON, + EventThrottlerDetailsFromJSONTyped, + EventThrottlerDetailsToJSON, + EventThrottlerDetailsToJSONTyped, +} from "./EventThrottlerDetails"; /** - * + * * @export * @interface EventThrottlerDetailsList */ export interface EventThrottlerDetailsList { - /** - * - * @type {CollectionMetadata} - * @memberof EventThrottlerDetailsList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof EventThrottlerDetailsList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof EventThrottlerDetailsList - */ - data?: Array; - /** - * - * @type {string} - * @memberof EventThrottlerDetailsList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof EventThrottlerDetailsList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof EventThrottlerDetailsList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof EventThrottlerDetailsList + */ + data?: Array; + /** + * + * @type {string} + * @memberof EventThrottlerDetailsList + */ + kind?: string; } /** * Check if a given object implements the EventThrottlerDetailsList interface. */ -export function instanceOfEventThrottlerDetailsList(value: object): value is EventThrottlerDetailsList { - return true; +export function instanceOfEventThrottlerDetailsList( + value: object, +): value is EventThrottlerDetailsList { + return true; } export function EventThrottlerDetailsListFromJSON(json: any): EventThrottlerDetailsList { - return EventThrottlerDetailsListFromJSONTyped(json, false); + return EventThrottlerDetailsListFromJSONTyped(json, false); } -export function EventThrottlerDetailsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventThrottlerDetailsList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(EventThrottlerDetailsFromJSON)), - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function EventThrottlerDetailsListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): EventThrottlerDetailsList { + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: + json["data"] == null + ? undefined + : (json["data"] as Array).map(EventThrottlerDetailsFromJSON), + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function EventThrottlerDetailsListToJSON(json: any): EventThrottlerDetailsList { - return EventThrottlerDetailsListToJSONTyped(json, false); + return EventThrottlerDetailsListToJSONTyped(json, false); } -export function EventThrottlerDetailsListToJSONTyped(value?: EventThrottlerDetailsList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function EventThrottlerDetailsListToJSONTyped( + value?: EventThrottlerDetailsList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(EventThrottlerDetailsToJSON)), - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: + value["data"] == null + ? undefined + : (value["data"] as Array).map(EventThrottlerDetailsToJSON), + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/ExampleDataset.ts b/src/clients/medusa/models/ExampleDataset.ts index d5229b727f..f47a41387c 100644 --- a/src/clients/medusa/models/ExampleDataset.ts +++ b/src/clients/medusa/models/ExampleDataset.ts @@ -5,85 +5,88 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { DatasetDTO } from './DatasetDTO'; +import { mapValues } from "../runtime"; +import type { DatasetDTO } from "./DatasetDTO"; import { - DatasetDTOFromJSON, - DatasetDTOFromJSONTyped, - DatasetDTOToJSON, - DatasetDTOToJSONTyped, -} from './DatasetDTO'; + DatasetDTOFromJSON, + DatasetDTOFromJSONTyped, + DatasetDTOToJSON, + DatasetDTOToJSONTyped, +} from "./DatasetDTO"; /** - * + * * @export * @interface ExampleDataset */ export interface ExampleDataset { - /** - * - * @type {string} - * @memberof ExampleDataset - */ - name?: string; - /** - * - * @type {string} - * @memberof ExampleDataset - */ - description?: string; - /** - * - * @type {DatasetDTO} - * @memberof ExampleDataset - */ - dataset?: DatasetDTO; + /** + * + * @type {string} + * @memberof ExampleDataset + */ + name?: string; + /** + * + * @type {string} + * @memberof ExampleDataset + */ + description?: string; + /** + * + * @type {DatasetDTO} + * @memberof ExampleDataset + */ + dataset?: DatasetDTO; } /** * Check if a given object implements the ExampleDataset interface. */ export function instanceOfExampleDataset(value: object): value is ExampleDataset { - return true; + return true; } export function ExampleDatasetFromJSON(json: any): ExampleDataset { - return ExampleDatasetFromJSONTyped(json, false); + return ExampleDatasetFromJSONTyped(json, false); } -export function ExampleDatasetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExampleDataset { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'dataset': json['dataset'] == null ? undefined : DatasetDTOFromJSON(json['dataset']), - }; +export function ExampleDatasetFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExampleDataset { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + description: json["description"] == null ? undefined : json["description"], + dataset: json["dataset"] == null ? undefined : DatasetDTOFromJSON(json["dataset"]), + }; } export function ExampleDatasetToJSON(json: any): ExampleDataset { - return ExampleDatasetToJSONTyped(json, false); + return ExampleDatasetToJSONTyped(json, false); } -export function ExampleDatasetToJSONTyped(value?: ExampleDataset | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExampleDatasetToJSONTyped( + value?: ExampleDataset | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'description': value['description'], - 'dataset': DatasetDTOToJSON(value['dataset']), - }; + return { + name: value["name"], + description: value["description"], + dataset: DatasetDTOToJSON(value["dataset"]), + }; } - diff --git a/src/clients/medusa/models/ExampleDatasetList.ts b/src/clients/medusa/models/ExampleDatasetList.ts index 8d2ed97157..d62f86526d 100644 --- a/src/clients/medusa/models/ExampleDatasetList.ts +++ b/src/clients/medusa/models/ExampleDatasetList.ts @@ -5,100 +5,105 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { ExampleDataset } from './ExampleDataset'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { ExampleDataset } from "./ExampleDataset"; import { - ExampleDatasetFromJSON, - ExampleDatasetFromJSONTyped, - ExampleDatasetToJSON, - ExampleDatasetToJSONTyped, -} from './ExampleDataset'; + ExampleDatasetFromJSON, + ExampleDatasetFromJSONTyped, + ExampleDatasetToJSON, + ExampleDatasetToJSONTyped, +} from "./ExampleDataset"; /** - * + * * @export * @interface ExampleDatasetList */ export interface ExampleDatasetList { - /** - * - * @type {CollectionMetadata} - * @memberof ExampleDatasetList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof ExampleDatasetList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof ExampleDatasetList - */ - data?: Array; - /** - * - * @type {string} - * @memberof ExampleDatasetList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof ExampleDatasetList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof ExampleDatasetList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof ExampleDatasetList + */ + data?: Array; + /** + * + * @type {string} + * @memberof ExampleDatasetList + */ + kind?: string; } /** * Check if a given object implements the ExampleDatasetList interface. */ export function instanceOfExampleDatasetList(value: object): value is ExampleDatasetList { - return true; + return true; } export function ExampleDatasetListFromJSON(json: any): ExampleDatasetList { - return ExampleDatasetListFromJSONTyped(json, false); + return ExampleDatasetListFromJSONTyped(json, false); } -export function ExampleDatasetListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExampleDatasetList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(ExampleDatasetFromJSON)), - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function ExampleDatasetListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExampleDatasetList { + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: + json["data"] == null ? undefined : (json["data"] as Array).map(ExampleDatasetFromJSON), + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function ExampleDatasetListToJSON(json: any): ExampleDatasetList { - return ExampleDatasetListToJSONTyped(json, false); + return ExampleDatasetListToJSONTyped(json, false); } -export function ExampleDatasetListToJSONTyped(value?: ExampleDatasetList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExampleDatasetListToJSONTyped( + value?: ExampleDatasetList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(ExampleDatasetToJSON)), - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: + value["data"] == null ? undefined : (value["data"] as Array).map(ExampleDatasetToJSON), + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/ExpectedArgumentDetails.ts b/src/clients/medusa/models/ExpectedArgumentDetails.ts index 974b885d10..73a0bbd7ba 100644 --- a/src/clients/medusa/models/ExpectedArgumentDetails.ts +++ b/src/clients/medusa/models/ExpectedArgumentDetails.ts @@ -5,85 +5,88 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ExpectedArgumentDetails */ export interface ExpectedArgumentDetails { - /** - * - * @type {string} - * @memberof ExpectedArgumentDetails - */ - name?: string; - /** - * - * @type {string} - * @memberof ExpectedArgumentDetails - */ - description?: string; - /** - * - * @type {string} - * @memberof ExpectedArgumentDetails - */ - type?: string; - /** - * - * @type {Array} - * @memberof ExpectedArgumentDetails - */ - options?: Array; + /** + * + * @type {string} + * @memberof ExpectedArgumentDetails + */ + name?: string; + /** + * + * @type {string} + * @memberof ExpectedArgumentDetails + */ + description?: string; + /** + * + * @type {string} + * @memberof ExpectedArgumentDetails + */ + type?: string; + /** + * + * @type {Array} + * @memberof ExpectedArgumentDetails + */ + options?: Array; } /** * Check if a given object implements the ExpectedArgumentDetails interface. */ export function instanceOfExpectedArgumentDetails(value: object): value is ExpectedArgumentDetails { - return true; + return true; } export function ExpectedArgumentDetailsFromJSON(json: any): ExpectedArgumentDetails { - return ExpectedArgumentDetailsFromJSONTyped(json, false); + return ExpectedArgumentDetailsFromJSONTyped(json, false); } -export function ExpectedArgumentDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpectedArgumentDetails { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'description': json['description'] == null ? undefined : json['description'], - 'type': json['type'] == null ? undefined : json['type'], - 'options': json['options'] == null ? undefined : json['options'], - }; +export function ExpectedArgumentDetailsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExpectedArgumentDetails { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + description: json["description"] == null ? undefined : json["description"], + type: json["type"] == null ? undefined : json["type"], + options: json["options"] == null ? undefined : json["options"], + }; } export function ExpectedArgumentDetailsToJSON(json: any): ExpectedArgumentDetails { - return ExpectedArgumentDetailsToJSONTyped(json, false); + return ExpectedArgumentDetailsToJSONTyped(json, false); } -export function ExpectedArgumentDetailsToJSONTyped(value?: ExpectedArgumentDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExpectedArgumentDetailsToJSONTyped( + value?: ExpectedArgumentDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'description': value['description'], - 'type': value['type'], - 'options': value['options'], - }; + return { + name: value["name"], + description: value["description"], + type: value["type"], + options: value["options"], + }; } - diff --git a/src/clients/medusa/models/FieldDTO.ts b/src/clients/medusa/models/FieldDTO.ts index 384e17c2f7..1c5388ca2f 100644 --- a/src/clients/medusa/models/FieldDTO.ts +++ b/src/clients/medusa/models/FieldDTO.ts @@ -5,87 +5,87 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GenerationDTO } from './GenerationDTO'; +import { mapValues } from "../runtime"; +import type { GenerationDTO } from "./GenerationDTO"; import { - GenerationDTOFromJSON, - GenerationDTOFromJSONTyped, - GenerationDTOToJSON, - GenerationDTOToJSONTyped, -} from './GenerationDTO'; + GenerationDTOFromJSON, + GenerationDTOFromJSONTyped, + GenerationDTOToJSON, + GenerationDTOToJSONTyped, +} from "./GenerationDTO"; /** - * + * * @export * @interface FieldDTO */ export interface FieldDTO { - /** - * - * @type {string} - * @memberof FieldDTO - */ - name: string; - /** - * - * @type {GenerationDTO} - * @memberof FieldDTO - */ - generation: GenerationDTO; - /** - * - * @type {boolean} - * @memberof FieldDTO - */ - ignored?: boolean; + /** + * + * @type {string} + * @memberof FieldDTO + */ + name: string; + /** + * + * @type {GenerationDTO} + * @memberof FieldDTO + */ + generation: GenerationDTO; + /** + * + * @type {boolean} + * @memberof FieldDTO + */ + ignored?: boolean; } /** * Check if a given object implements the FieldDTO interface. */ export function instanceOfFieldDTO(value: object): value is FieldDTO { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('generation' in value) || value['generation'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("generation" in value) || value["generation"] === undefined) return false; + return true; } export function FieldDTOFromJSON(json: any): FieldDTO { - return FieldDTOFromJSONTyped(json, false); + return FieldDTOFromJSONTyped(json, false); } export function FieldDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): FieldDTO { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'generation': GenerationDTOFromJSON(json['generation']), - 'ignored': json['ignored'] == null ? undefined : json['ignored'], - }; + if (json == null) { + return json; + } + return { + name: json["name"], + generation: GenerationDTOFromJSON(json["generation"]), + ignored: json["ignored"] == null ? undefined : json["ignored"], + }; } export function FieldDTOToJSON(json: any): FieldDTO { - return FieldDTOToJSONTyped(json, false); + return FieldDTOToJSONTyped(json, false); } -export function FieldDTOToJSONTyped(value?: FieldDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FieldDTOToJSONTyped( + value?: FieldDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'generation': GenerationDTOToJSON(value['generation']), - 'ignored': value['ignored'], - }; + return { + name: value["name"], + generation: GenerationDTOToJSON(value["generation"]), + ignored: value["ignored"], + }; } - diff --git a/src/clients/medusa/models/GenerationDTO.ts b/src/clients/medusa/models/GenerationDTO.ts index f5a39c2a0d..505ded1ea4 100644 --- a/src/clients/medusa/models/GenerationDTO.ts +++ b/src/clients/medusa/models/GenerationDTO.ts @@ -5,154 +5,153 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface GenerationDTO */ export interface GenerationDTO { - /** - * - * @type {string} - * @memberof GenerationDTO - */ - generator: GenerationDTOGeneratorEnum; - /** - * - * @type {Array} - * @memberof GenerationDTO - */ - arguments?: Array; + /** + * + * @type {string} + * @memberof GenerationDTO + */ + generator: GenerationDTOGeneratorEnum; + /** + * + * @type {Array} + * @memberof GenerationDTO + */ + arguments?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GenerationDTOGeneratorEnum { - LocationState = 'Location.state', - LocationCountry = 'Location.country', - LocationPostcode = 'Location.postcode', - LocationCity = 'Location.city', - LocationStreetAddress = 'Location.street-address', - LocationFullAddress = 'Location.full-address', - LocationLongitude = 'Location.longitude', - LocationLatitude = 'Location.latitude', - DatePast = 'Date.past', - DateTimestampUtc = 'Date.timestamp-utc', - DateNow = 'Date.now', - DateFuture = 'Date.future', - NumberDigits = 'Number.digits', - NumberIteratingInteger = 'Number.iterating-integer', - NumberIteratingLong = 'Number.iterating-long', - NumberNumberSelect = 'Number.number-select', - NumberNumberBetween = 'Number.number-between', - NumberCastNumber = 'Number.cast-number', - PersonFirstName = 'Person.first-name', - PersonLastName = 'Person.last-name', - PersonFullName = 'Person.full-name', - PersonSsn = 'Person.ssn', - InternetEmailAddress = 'Internet.email-address', - InternetCustomEmailAddress = 'Internet.custom-email-address', - InternetIpv4Address = 'Internet.ipv4-address', - InternetMacAddress = 'Internet.mac-address', - InternetPassword = 'Internet.password', - InternetWebDomain = 'Internet.web-domain', - InternetUserAgent = 'Internet.user-agent', - InternetUsername = 'Internet.username', - VehicleVin = 'Vehicle.vin', - VehicleManufacturer = 'Vehicle.manufacturer', - VehicleLicensePlate = 'Vehicle.license-plate', - DeviceManufacturer = 'Device.manufacturer', - DeviceModelName = 'Device.model-name', - DevicePlatform = 'Device.platform', - CommerceBarcodeEan8 = 'Commerce.barcode-ean8', - CommerceProductName = 'Commerce.product-name', - CommerceBrand = 'Commerce.brand', - CommerceVendor = 'Commerce.vendor', - CommerceMaterial = 'Commerce.material', - CompanyName = 'Company.name', - CompanyIndustry = 'Company.industry', - CompanyProfession = 'Company.profession', - PhoneExtension = 'Phone.extension', - PhoneNumber = 'Phone.number', - FinanceCreditCard = 'Finance.credit-card', - FinanceIban = 'Finance.iban', - FinanceStockTicker = 'Finance.stock-ticker', - FinanceCurrencyCode = 'Finance.currency-code', - FinanceCurrencyName = 'Finance.currency-name', - FinanceBic = 'Finance.bic', - HealthcareMedication = 'Healthcare.medication', - HealthcareDisease = 'Healthcare.disease', - HealthcareDiagnosisCode = 'Healthcare.diagnosis-code', - HealthcareSymptom = 'Healthcare.symptom', - HealthcareHospital = 'Healthcare.hospital', - HealthcareProfession = 'Healthcare.profession', - StructArray = 'Struct.array', - StructNestedRecord = 'Struct.nested-record', - ReferenceExpression = 'Reference.expression', - ReferenceCache = 'Reference.cache', - ReferenceCacheByKey = 'Reference.cache-by-key', - ReferencePreviousStateByKey = 'Reference.previous-state-by-key', - ReferenceLinkedTableColumn = 'Reference.linked-table-column', - ReferenceTableCell = 'Reference.table-cell', - StringSelect = 'String.select', - StringUuid = 'String.uuid', - StringToString = 'String.to-string', - StringSelectText = 'String.select-text', - StringSelectWeightedText = 'String.select-weighted-text', - BooleanPercentTrue = 'Boolean.percent-true', - BooleanRegex = 'Boolean.regex', - ConditionalExpressionIfElse = 'Conditional.expression-if-else', - ConditionalGeneratorIfElse = 'Conditional.generator-if-else', - UtilCustomVariable = 'Util.custom-variable' + LocationState = "Location.state", + LocationCountry = "Location.country", + LocationPostcode = "Location.postcode", + LocationCity = "Location.city", + LocationStreetAddress = "Location.street-address", + LocationFullAddress = "Location.full-address", + LocationLongitude = "Location.longitude", + LocationLatitude = "Location.latitude", + DatePast = "Date.past", + DateTimestampUtc = "Date.timestamp-utc", + DateNow = "Date.now", + DateFuture = "Date.future", + NumberDigits = "Number.digits", + NumberIteratingInteger = "Number.iterating-integer", + NumberIteratingLong = "Number.iterating-long", + NumberNumberSelect = "Number.number-select", + NumberNumberBetween = "Number.number-between", + NumberCastNumber = "Number.cast-number", + PersonFirstName = "Person.first-name", + PersonLastName = "Person.last-name", + PersonFullName = "Person.full-name", + PersonSsn = "Person.ssn", + InternetEmailAddress = "Internet.email-address", + InternetCustomEmailAddress = "Internet.custom-email-address", + InternetIpv4Address = "Internet.ipv4-address", + InternetMacAddress = "Internet.mac-address", + InternetPassword = "Internet.password", + InternetWebDomain = "Internet.web-domain", + InternetUserAgent = "Internet.user-agent", + InternetUsername = "Internet.username", + VehicleVin = "Vehicle.vin", + VehicleManufacturer = "Vehicle.manufacturer", + VehicleLicensePlate = "Vehicle.license-plate", + DeviceManufacturer = "Device.manufacturer", + DeviceModelName = "Device.model-name", + DevicePlatform = "Device.platform", + CommerceBarcodeEan8 = "Commerce.barcode-ean8", + CommerceProductName = "Commerce.product-name", + CommerceBrand = "Commerce.brand", + CommerceVendor = "Commerce.vendor", + CommerceMaterial = "Commerce.material", + CompanyName = "Company.name", + CompanyIndustry = "Company.industry", + CompanyProfession = "Company.profession", + PhoneExtension = "Phone.extension", + PhoneNumber = "Phone.number", + FinanceCreditCard = "Finance.credit-card", + FinanceIban = "Finance.iban", + FinanceStockTicker = "Finance.stock-ticker", + FinanceCurrencyCode = "Finance.currency-code", + FinanceCurrencyName = "Finance.currency-name", + FinanceBic = "Finance.bic", + HealthcareMedication = "Healthcare.medication", + HealthcareDisease = "Healthcare.disease", + HealthcareDiagnosisCode = "Healthcare.diagnosis-code", + HealthcareSymptom = "Healthcare.symptom", + HealthcareHospital = "Healthcare.hospital", + HealthcareProfession = "Healthcare.profession", + StructArray = "Struct.array", + StructNestedRecord = "Struct.nested-record", + ReferenceExpression = "Reference.expression", + ReferenceCache = "Reference.cache", + ReferenceCacheByKey = "Reference.cache-by-key", + ReferencePreviousStateByKey = "Reference.previous-state-by-key", + ReferenceLinkedTableColumn = "Reference.linked-table-column", + ReferenceTableCell = "Reference.table-cell", + StringSelect = "String.select", + StringUuid = "String.uuid", + StringToString = "String.to-string", + StringSelectText = "String.select-text", + StringSelectWeightedText = "String.select-weighted-text", + BooleanPercentTrue = "Boolean.percent-true", + BooleanRegex = "Boolean.regex", + ConditionalExpressionIfElse = "Conditional.expression-if-else", + ConditionalGeneratorIfElse = "Conditional.generator-if-else", + UtilCustomVariable = "Util.custom-variable", } - /** * Check if a given object implements the GenerationDTO interface. */ export function instanceOfGenerationDTO(value: object): value is GenerationDTO { - if (!('generator' in value) || value['generator'] === undefined) return false; - return true; + if (!("generator" in value) || value["generator"] === undefined) return false; + return true; } export function GenerationDTOFromJSON(json: any): GenerationDTO { - return GenerationDTOFromJSONTyped(json, false); + return GenerationDTOFromJSONTyped(json, false); } export function GenerationDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): GenerationDTO { - if (json == null) { - return json; - } - return { - - 'generator': json['generator'], - 'arguments': json['arguments'] == null ? undefined : json['arguments'], - }; + if (json == null) { + return json; + } + return { + generator: json["generator"], + arguments: json["arguments"] == null ? undefined : json["arguments"], + }; } export function GenerationDTOToJSON(json: any): GenerationDTO { - return GenerationDTOToJSONTyped(json, false); + return GenerationDTOToJSONTyped(json, false); } -export function GenerationDTOToJSONTyped(value?: GenerationDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GenerationDTOToJSONTyped( + value?: GenerationDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'generator': value['generator'], - 'arguments': value['arguments'], - }; + return { + generator: value["generator"], + arguments: value["arguments"], + }; } - diff --git a/src/clients/medusa/models/ProducerHealth.ts b/src/clients/medusa/models/ProducerHealth.ts index 20c8b495f6..681e104ab4 100644 --- a/src/clients/medusa/models/ProducerHealth.ts +++ b/src/clients/medusa/models/ProducerHealth.ts @@ -5,61 +5,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProducerHealth */ export interface ProducerHealth { - /** - * - * @type {boolean} - * @memberof ProducerHealth - */ - started?: boolean; + /** + * + * @type {boolean} + * @memberof ProducerHealth + */ + started?: boolean; } /** * Check if a given object implements the ProducerHealth interface. */ export function instanceOfProducerHealth(value: object): value is ProducerHealth { - return true; + return true; } export function ProducerHealthFromJSON(json: any): ProducerHealth { - return ProducerHealthFromJSONTyped(json, false); + return ProducerHealthFromJSONTyped(json, false); } -export function ProducerHealthFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProducerHealth { - if (json == null) { - return json; - } - return { - - 'started': json['started'] == null ? undefined : json['started'], - }; +export function ProducerHealthFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProducerHealth { + if (json == null) { + return json; + } + return { + started: json["started"] == null ? undefined : json["started"], + }; } export function ProducerHealthToJSON(json: any): ProducerHealth { - return ProducerHealthToJSONTyped(json, false); + return ProducerHealthToJSONTyped(json, false); } -export function ProducerHealthToJSONTyped(value?: ProducerHealth | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProducerHealthToJSONTyped( + value?: ProducerHealth | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'started': value['started'], - }; + return { + started: value["started"], + }; } - diff --git a/src/clients/medusa/models/RowDTO.ts b/src/clients/medusa/models/RowDTO.ts index 71256d2e7f..aef20c3ca4 100644 --- a/src/clients/medusa/models/RowDTO.ts +++ b/src/clients/medusa/models/RowDTO.ts @@ -5,62 +5,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface RowDTO */ export interface RowDTO { - /** - * - * @type {{ [key: string]: object; }} - * @memberof RowDTO - */ - values: { [key: string]: object; }; + /** + * + * @type {{ [key: string]: object; }} + * @memberof RowDTO + */ + values: { [key: string]: object }; } /** * Check if a given object implements the RowDTO interface. */ export function instanceOfRowDTO(value: object): value is RowDTO { - if (!('values' in value) || value['values'] === undefined) return false; - return true; + if (!("values" in value) || value["values"] === undefined) return false; + return true; } export function RowDTOFromJSON(json: any): RowDTO { - return RowDTOFromJSONTyped(json, false); + return RowDTOFromJSONTyped(json, false); } export function RowDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): RowDTO { - if (json == null) { - return json; - } - return { - - 'values': json['values'], - }; + if (json == null) { + return json; + } + return { + values: json["values"], + }; } export function RowDTOToJSON(json: any): RowDTO { - return RowDTOToJSONTyped(json, false); + return RowDTOToJSONTyped(json, false); } -export function RowDTOToJSONTyped(value?: RowDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RowDTOToJSONTyped( + value?: RowDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'values': value['values'], - }; + return { + values: value["values"], + }; } - diff --git a/src/clients/medusa/models/StreamDetails.ts b/src/clients/medusa/models/StreamDetails.ts index 24619159d2..7348e9c994 100644 --- a/src/clients/medusa/models/StreamDetails.ts +++ b/src/clients/medusa/models/StreamDetails.ts @@ -5,61 +5,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface StreamDetails */ export interface StreamDetails { - /** - * - * @type {string} - * @memberof StreamDetails - */ - stream_id?: string; + /** + * + * @type {string} + * @memberof StreamDetails + */ + stream_id?: string; } /** * Check if a given object implements the StreamDetails interface. */ export function instanceOfStreamDetails(value: object): value is StreamDetails { - return true; + return true; } export function StreamDetailsFromJSON(json: any): StreamDetails { - return StreamDetailsFromJSONTyped(json, false); + return StreamDetailsFromJSONTyped(json, false); } export function StreamDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): StreamDetails { - if (json == null) { - return json; - } - return { - - 'stream_id': json['stream_id'] == null ? undefined : json['stream_id'], - }; + if (json == null) { + return json; + } + return { + stream_id: json["stream_id"] == null ? undefined : json["stream_id"], + }; } export function StreamDetailsToJSON(json: any): StreamDetails { - return StreamDetailsToJSONTyped(json, false); + return StreamDetailsToJSONTyped(json, false); } -export function StreamDetailsToJSONTyped(value?: StreamDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function StreamDetailsToJSONTyped( + value?: StreamDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'stream_id': value['stream_id'], - }; + return { + stream_id: value["stream_id"], + }; } - diff --git a/src/clients/medusa/models/TableDTO.ts b/src/clients/medusa/models/TableDTO.ts index 9fe54bd171..bca30509bd 100644 --- a/src/clients/medusa/models/TableDTO.ts +++ b/src/clients/medusa/models/TableDTO.ts @@ -5,104 +5,99 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { RowDTO } from './RowDTO'; -import { - RowDTOFromJSON, - RowDTOFromJSONTyped, - RowDTOToJSON, - RowDTOToJSONTyped, -} from './RowDTO'; -import type { ColumnDTO } from './ColumnDTO'; +import { mapValues } from "../runtime"; +import type { RowDTO } from "./RowDTO"; +import { RowDTOFromJSON, RowDTOFromJSONTyped, RowDTOToJSON, RowDTOToJSONTyped } from "./RowDTO"; +import type { ColumnDTO } from "./ColumnDTO"; import { - ColumnDTOFromJSON, - ColumnDTOFromJSONTyped, - ColumnDTOToJSON, - ColumnDTOToJSONTyped, -} from './ColumnDTO'; + ColumnDTOFromJSON, + ColumnDTOFromJSONTyped, + ColumnDTOToJSON, + ColumnDTOToJSONTyped, +} from "./ColumnDTO"; /** - * + * * @export * @interface TableDTO */ export interface TableDTO { - /** - * - * @type {string} - * @memberof TableDTO - */ - table_name: string; - /** - * - * @type {Array} - * @memberof TableDTO - */ - columns: Array; - /** - * - * @type {Array} - * @memberof TableDTO - */ - rows: Array; - /** - * - * @type {string} - * @memberof TableDTO - */ - key_column_name: string; + /** + * + * @type {string} + * @memberof TableDTO + */ + table_name: string; + /** + * + * @type {Array} + * @memberof TableDTO + */ + columns: Array; + /** + * + * @type {Array} + * @memberof TableDTO + */ + rows: Array; + /** + * + * @type {string} + * @memberof TableDTO + */ + key_column_name: string; } /** * Check if a given object implements the TableDTO interface. */ export function instanceOfTableDTO(value: object): value is TableDTO { - if (!('table_name' in value) || value['table_name'] === undefined) return false; - if (!('columns' in value) || value['columns'] === undefined) return false; - if (!('rows' in value) || value['rows'] === undefined) return false; - if (!('key_column_name' in value) || value['key_column_name'] === undefined) return false; - return true; + if (!("table_name" in value) || value["table_name"] === undefined) return false; + if (!("columns" in value) || value["columns"] === undefined) return false; + if (!("rows" in value) || value["rows"] === undefined) return false; + if (!("key_column_name" in value) || value["key_column_name"] === undefined) return false; + return true; } export function TableDTOFromJSON(json: any): TableDTO { - return TableDTOFromJSONTyped(json, false); + return TableDTOFromJSONTyped(json, false); } export function TableDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): TableDTO { - if (json == null) { - return json; - } - return { - - 'table_name': json['table_name'], - 'columns': ((json['columns'] as Array).map(ColumnDTOFromJSON)), - 'rows': ((json['rows'] as Array).map(RowDTOFromJSON)), - 'key_column_name': json['key_column_name'], - }; + if (json == null) { + return json; + } + return { + table_name: json["table_name"], + columns: (json["columns"] as Array).map(ColumnDTOFromJSON), + rows: (json["rows"] as Array).map(RowDTOFromJSON), + key_column_name: json["key_column_name"], + }; } export function TableDTOToJSON(json: any): TableDTO { - return TableDTOToJSONTyped(json, false); + return TableDTOToJSONTyped(json, false); } -export function TableDTOToJSONTyped(value?: TableDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TableDTOToJSONTyped( + value?: TableDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'table_name': value['table_name'], - 'columns': ((value['columns'] as Array).map(ColumnDTOToJSON)), - 'rows': ((value['rows'] as Array).map(RowDTOToJSON)), - 'key_column_name': value['key_column_name'], - }; + return { + table_name: value["table_name"], + columns: (value["columns"] as Array).map(ColumnDTOToJSON), + rows: (value["rows"] as Array).map(RowDTOToJSON), + key_column_name: value["key_column_name"], + }; } - diff --git a/src/clients/medusa/models/TableLinkDTO.ts b/src/clients/medusa/models/TableLinkDTO.ts index 2901d1c2ed..7fa24c3370 100644 --- a/src/clients/medusa/models/TableLinkDTO.ts +++ b/src/clients/medusa/models/TableLinkDTO.ts @@ -5,82 +5,81 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface TableLinkDTO */ export interface TableLinkDTO { - /** - * - * @type {string} - * @memberof TableLinkDTO - */ - table_name: string; - /** - * - * @type {string} - * @memberof TableLinkDTO - */ - link_type: TableLinkDTOLinkTypeEnum; + /** + * + * @type {string} + * @memberof TableLinkDTO + */ + table_name: string; + /** + * + * @type {string} + * @memberof TableLinkDTO + */ + link_type: TableLinkDTOLinkTypeEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum TableLinkDTOLinkTypeEnum { - Random = 'random', - Sequential = 'sequential', - Custom = 'custom' + Random = "random", + Sequential = "sequential", + Custom = "custom", } - /** * Check if a given object implements the TableLinkDTO interface. */ export function instanceOfTableLinkDTO(value: object): value is TableLinkDTO { - if (!('table_name' in value) || value['table_name'] === undefined) return false; - if (!('link_type' in value) || value['link_type'] === undefined) return false; - return true; + if (!("table_name" in value) || value["table_name"] === undefined) return false; + if (!("link_type" in value) || value["link_type"] === undefined) return false; + return true; } export function TableLinkDTOFromJSON(json: any): TableLinkDTO { - return TableLinkDTOFromJSONTyped(json, false); + return TableLinkDTOFromJSONTyped(json, false); } export function TableLinkDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): TableLinkDTO { - if (json == null) { - return json; - } - return { - - 'table_name': json['table_name'], - 'link_type': json['link_type'], - }; + if (json == null) { + return json; + } + return { + table_name: json["table_name"], + link_type: json["link_type"], + }; } export function TableLinkDTOToJSON(json: any): TableLinkDTO { - return TableLinkDTOToJSONTyped(json, false); + return TableLinkDTOToJSONTyped(json, false); } -export function TableLinkDTOToJSONTyped(value?: TableLinkDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TableLinkDTOToJSONTyped( + value?: TableLinkDTO | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'table_name': value['table_name'], - 'link_type': value['link_type'], - }; + return { + table_name: value["table_name"], + link_type: value["link_type"], + }; } - diff --git a/src/clients/medusa/models/ValueGeneratorDetails.ts b/src/clients/medusa/models/ValueGeneratorDetails.ts index 5ec4a47750..23233fcc84 100644 --- a/src/clients/medusa/models/ValueGeneratorDetails.ts +++ b/src/clients/medusa/models/ValueGeneratorDetails.ts @@ -5,128 +5,136 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ExpectedArgumentDetails } from './ExpectedArgumentDetails'; +import { mapValues } from "../runtime"; +import type { ExpectedArgumentDetails } from "./ExpectedArgumentDetails"; import { - ExpectedArgumentDetailsFromJSON, - ExpectedArgumentDetailsFromJSONTyped, - ExpectedArgumentDetailsToJSON, - ExpectedArgumentDetailsToJSONTyped, -} from './ExpectedArgumentDetails'; + ExpectedArgumentDetailsFromJSON, + ExpectedArgumentDetailsFromJSONTyped, + ExpectedArgumentDetailsToJSON, + ExpectedArgumentDetailsToJSONTyped, +} from "./ExpectedArgumentDetails"; /** - * + * * @export * @interface ValueGeneratorDetails */ export interface ValueGeneratorDetails { - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - name?: string; - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - category?: ValueGeneratorDetailsCategoryEnum; - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - description?: string; - /** - * - * @type {string} - * @memberof ValueGeneratorDetails - */ - return_type?: string; - /** - * - * @type {Array} - * @memberof ValueGeneratorDetails - */ - arguments?: Array; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + name?: string; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + category?: ValueGeneratorDetailsCategoryEnum; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + description?: string; + /** + * + * @type {string} + * @memberof ValueGeneratorDetails + */ + return_type?: string; + /** + * + * @type {Array} + * @memberof ValueGeneratorDetails + */ + arguments?: Array; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ValueGeneratorDetailsCategoryEnum { - Location = 'Location', - Boolean = 'Boolean', - Commerce = 'Commerce', - Company = 'Company', - Conditional = 'Conditional', - Date = 'Date', - Device = 'Device', - Finance = 'Finance', - Healthcare = 'Healthcare', - Internet = 'Internet', - Number = 'Number', - Person = 'Person', - Phone = 'Phone', - String = 'String', - Struct = 'Struct', - Reference = 'Reference', - Util = 'Util', - Table = 'Table', - Vehicle = 'Vehicle' + Location = "Location", + Boolean = "Boolean", + Commerce = "Commerce", + Company = "Company", + Conditional = "Conditional", + Date = "Date", + Device = "Device", + Finance = "Finance", + Healthcare = "Healthcare", + Internet = "Internet", + Number = "Number", + Person = "Person", + Phone = "Phone", + String = "String", + Struct = "Struct", + Reference = "Reference", + Util = "Util", + Table = "Table", + Vehicle = "Vehicle", } - /** * Check if a given object implements the ValueGeneratorDetails interface. */ export function instanceOfValueGeneratorDetails(value: object): value is ValueGeneratorDetails { - return true; + return true; } export function ValueGeneratorDetailsFromJSON(json: any): ValueGeneratorDetails { - return ValueGeneratorDetailsFromJSONTyped(json, false); + return ValueGeneratorDetailsFromJSONTyped(json, false); } -export function ValueGeneratorDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValueGeneratorDetails { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'category': json['category'] == null ? undefined : json['category'], - 'description': json['description'] == null ? undefined : json['description'], - 'return_type': json['return_type'] == null ? undefined : json['return_type'], - 'arguments': json['arguments'] == null ? undefined : ((json['arguments'] as Array).map(ExpectedArgumentDetailsFromJSON)), - }; +export function ValueGeneratorDetailsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ValueGeneratorDetails { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + category: json["category"] == null ? undefined : json["category"], + description: json["description"] == null ? undefined : json["description"], + return_type: json["return_type"] == null ? undefined : json["return_type"], + arguments: + json["arguments"] == null + ? undefined + : (json["arguments"] as Array).map(ExpectedArgumentDetailsFromJSON), + }; } export function ValueGeneratorDetailsToJSON(json: any): ValueGeneratorDetails { - return ValueGeneratorDetailsToJSONTyped(json, false); + return ValueGeneratorDetailsToJSONTyped(json, false); } -export function ValueGeneratorDetailsToJSONTyped(value?: ValueGeneratorDetails | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ValueGeneratorDetailsToJSONTyped( + value?: ValueGeneratorDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'category': value['category'], - 'description': value['description'], - 'return_type': value['return_type'], - 'arguments': value['arguments'] == null ? undefined : ((value['arguments'] as Array).map(ExpectedArgumentDetailsToJSON)), - }; + return { + name: value["name"], + category: value["category"], + description: value["description"], + return_type: value["return_type"], + arguments: + value["arguments"] == null + ? undefined + : (value["arguments"] as Array).map(ExpectedArgumentDetailsToJSON), + }; } - diff --git a/src/clients/medusa/models/ValueGeneratorDetailsList.ts b/src/clients/medusa/models/ValueGeneratorDetailsList.ts index b7710ca6fe..0b4ed0984f 100644 --- a/src/clients/medusa/models/ValueGeneratorDetailsList.ts +++ b/src/clients/medusa/models/ValueGeneratorDetailsList.ts @@ -5,100 +5,111 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { ValueGeneratorDetails } from './ValueGeneratorDetails'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { ValueGeneratorDetails } from "./ValueGeneratorDetails"; import { - ValueGeneratorDetailsFromJSON, - ValueGeneratorDetailsFromJSONTyped, - ValueGeneratorDetailsToJSON, - ValueGeneratorDetailsToJSONTyped, -} from './ValueGeneratorDetails'; + ValueGeneratorDetailsFromJSON, + ValueGeneratorDetailsFromJSONTyped, + ValueGeneratorDetailsToJSON, + ValueGeneratorDetailsToJSONTyped, +} from "./ValueGeneratorDetails"; /** - * + * * @export * @interface ValueGeneratorDetailsList */ export interface ValueGeneratorDetailsList { - /** - * - * @type {CollectionMetadata} - * @memberof ValueGeneratorDetailsList - */ - metadata?: CollectionMetadata; - /** - * - * @type {string} - * @memberof ValueGeneratorDetailsList - */ - api_version?: string; - /** - * - * @type {Array} - * @memberof ValueGeneratorDetailsList - */ - data?: Array; - /** - * - * @type {string} - * @memberof ValueGeneratorDetailsList - */ - kind?: string; + /** + * + * @type {CollectionMetadata} + * @memberof ValueGeneratorDetailsList + */ + metadata?: CollectionMetadata; + /** + * + * @type {string} + * @memberof ValueGeneratorDetailsList + */ + api_version?: string; + /** + * + * @type {Array} + * @memberof ValueGeneratorDetailsList + */ + data?: Array; + /** + * + * @type {string} + * @memberof ValueGeneratorDetailsList + */ + kind?: string; } /** * Check if a given object implements the ValueGeneratorDetailsList interface. */ -export function instanceOfValueGeneratorDetailsList(value: object): value is ValueGeneratorDetailsList { - return true; +export function instanceOfValueGeneratorDetailsList( + value: object, +): value is ValueGeneratorDetailsList { + return true; } export function ValueGeneratorDetailsListFromJSON(json: any): ValueGeneratorDetailsList { - return ValueGeneratorDetailsListFromJSONTyped(json, false); + return ValueGeneratorDetailsListFromJSONTyped(json, false); } -export function ValueGeneratorDetailsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValueGeneratorDetailsList { - if (json == null) { - return json; - } - return { - - 'metadata': json['metadata'] == null ? undefined : CollectionMetadataFromJSON(json['metadata']), - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'data': json['data'] == null ? undefined : ((json['data'] as Array).map(ValueGeneratorDetailsFromJSON)), - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function ValueGeneratorDetailsListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ValueGeneratorDetailsList { + if (json == null) { + return json; + } + return { + metadata: json["metadata"] == null ? undefined : CollectionMetadataFromJSON(json["metadata"]), + api_version: json["api_version"] == null ? undefined : json["api_version"], + data: + json["data"] == null + ? undefined + : (json["data"] as Array).map(ValueGeneratorDetailsFromJSON), + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function ValueGeneratorDetailsListToJSON(json: any): ValueGeneratorDetailsList { - return ValueGeneratorDetailsListToJSONTyped(json, false); + return ValueGeneratorDetailsListToJSONTyped(json, false); } -export function ValueGeneratorDetailsListToJSONTyped(value?: ValueGeneratorDetailsList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ValueGeneratorDetailsListToJSONTyped( + value?: ValueGeneratorDetailsList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'api_version': value['api_version'], - 'data': value['data'] == null ? undefined : ((value['data'] as Array).map(ValueGeneratorDetailsToJSON)), - 'kind': value['kind'], - }; + return { + metadata: CollectionMetadataToJSON(value["metadata"]), + api_version: value["api_version"], + data: + value["data"] == null + ? undefined + : (value["data"] as Array).map(ValueGeneratorDetailsToJSON), + kind: value["kind"], + }; } - diff --git a/src/clients/medusa/models/index.ts b/src/clients/medusa/models/index.ts index 753dfc29a3..7f70f5fa97 100644 --- a/src/clients/medusa/models/index.ts +++ b/src/clients/medusa/models/index.ts @@ -1,28 +1,28 @@ /* tslint:disable */ /* eslint-disable */ -export * from './AvroSchemaResponse'; -export * from './AvroSchemaResponseList'; -export * from './CategoryList'; -export * from './CollectionMetadata'; -export * from './ColumnDTO'; -export * from './DatasetDTO'; -export * from './EventDTO'; -export * from './EventMessage'; -export * from './EventMessageList'; -export * from './EventStreamSimulation'; -export * from './EventStreamSimulationList'; -export * from './EventThrottlerDTO'; -export * from './EventThrottlerDetails'; -export * from './EventThrottlerDetailsList'; -export * from './ExampleDataset'; -export * from './ExampleDatasetList'; -export * from './ExpectedArgumentDetails'; -export * from './FieldDTO'; -export * from './GenerationDTO'; -export * from './ProducerHealth'; -export * from './RowDTO'; -export * from './StreamDetails'; -export * from './TableDTO'; -export * from './TableLinkDTO'; -export * from './ValueGeneratorDetails'; -export * from './ValueGeneratorDetailsList'; +export * from "./AvroSchemaResponse"; +export * from "./AvroSchemaResponseList"; +export * from "./CategoryList"; +export * from "./CollectionMetadata"; +export * from "./ColumnDTO"; +export * from "./DatasetDTO"; +export * from "./EventDTO"; +export * from "./EventMessage"; +export * from "./EventMessageList"; +export * from "./EventStreamSimulation"; +export * from "./EventStreamSimulationList"; +export * from "./EventThrottlerDTO"; +export * from "./EventThrottlerDetails"; +export * from "./EventThrottlerDetailsList"; +export * from "./ExampleDataset"; +export * from "./ExampleDatasetList"; +export * from "./ExpectedArgumentDetails"; +export * from "./FieldDTO"; +export * from "./GenerationDTO"; +export * from "./ProducerHealth"; +export * from "./RowDTO"; +export * from "./StreamDetails"; +export * from "./TableDTO"; +export * from "./TableLinkDTO"; +export * from "./ValueGeneratorDetails"; +export * from "./ValueGeneratorDetailsList"; diff --git a/src/clients/medusa/runtime.ts b/src/clients/medusa/runtime.ts index fb8bed9ee0..171ae8c04e 100644 --- a/src/clients/medusa/runtime.ts +++ b/src/clients/medusa/runtime.ts @@ -5,83 +5,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "http://localhost:8082".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts b/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts index b7bded3732..b06403b7d8 100644 --- a/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts +++ b/src/clients/scaffoldingService/apis/TemplateCollectionsScaffoldV1Api.ts @@ -2,115 +2,143 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { Failure, GetScaffoldV1TemplateCollection200Response, ScaffoldV1TemplateCollectionList, -} from '../models/index'; +} from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - GetScaffoldV1TemplateCollection200ResponseFromJSON, - GetScaffoldV1TemplateCollection200ResponseToJSON, - ScaffoldV1TemplateCollectionListFromJSON, - ScaffoldV1TemplateCollectionListToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + GetScaffoldV1TemplateCollection200ResponseFromJSON, + GetScaffoldV1TemplateCollection200ResponseToJSON, + ScaffoldV1TemplateCollectionListFromJSON, + ScaffoldV1TemplateCollectionListToJSON, +} from "../models/index"; export interface GetScaffoldV1TemplateCollectionRequest { - name: string; + name: string; } export interface ListScaffoldV1TemplateCollectionsRequest { - page_size?: number; - page_token?: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class TemplateCollectionsScaffoldV1Api extends runtime.BaseAPI { - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. - * Read a Template Collection - */ - async getScaffoldV1TemplateCollectionRaw(requestParameters: GetScaffoldV1TemplateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getScaffoldV1TemplateCollection().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/scaffold/v1/template-collections/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetScaffoldV1TemplateCollection200ResponseFromJSON(jsonValue)); - } - - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. - * Read a Template Collection - */ - async getScaffoldV1TemplateCollection(requestParameters: GetScaffoldV1TemplateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getScaffoldV1TemplateCollectionRaw(requestParameters, initOverrides); - return await response.value(); + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. + * Read a Template Collection + */ + async getScaffoldV1TemplateCollectionRaw( + requestParameters: GetScaffoldV1TemplateCollectionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getScaffoldV1TemplateCollection().', + ); } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. - * List of Template Collections - */ - async listScaffoldV1TemplateCollectionsRaw(requestParameters: ListScaffoldV1TemplateCollectionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/scaffold/v1/template-collections`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ScaffoldV1TemplateCollectionListFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/scaffold/v1/template-collections/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetScaffoldV1TemplateCollection200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template collection. + * Read a Template Collection + */ + async getScaffoldV1TemplateCollection( + requestParameters: GetScaffoldV1TemplateCollectionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getScaffoldV1TemplateCollectionRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. + * List of Template Collections + */ + async listScaffoldV1TemplateCollectionsRaw( + requestParameters: ListScaffoldV1TemplateCollectionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. - * List of Template Collections - */ - async listScaffoldV1TemplateCollections(requestParameters: ListScaffoldV1TemplateCollectionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listScaffoldV1TemplateCollectionsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/scaffold/v1/template-collections`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ScaffoldV1TemplateCollectionListFromJSON(jsonValue), + ); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all template collections. + * List of Template Collections + */ + async listScaffoldV1TemplateCollections( + requestParameters: ListScaffoldV1TemplateCollectionsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listScaffoldV1TemplateCollectionsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts b/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts index 71b680be83..86bfcea8fd 100644 --- a/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts +++ b/src/clients/scaffoldingService/apis/TemplatesScaffoldV1Api.ts @@ -2,185 +2,228 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ApplyScaffoldV1TemplateRequest, Failure, GetScaffoldV1Template200Response, ScaffoldV1TemplateList, -} from '../models/index'; +} from "../models/index"; import { - ApplyScaffoldV1TemplateRequestFromJSON, - ApplyScaffoldV1TemplateRequestToJSON, - FailureFromJSON, - FailureToJSON, - GetScaffoldV1Template200ResponseFromJSON, - GetScaffoldV1Template200ResponseToJSON, - ScaffoldV1TemplateListFromJSON, - ScaffoldV1TemplateListToJSON, -} from '../models/index'; + ApplyScaffoldV1TemplateRequestFromJSON, + ApplyScaffoldV1TemplateRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetScaffoldV1Template200ResponseFromJSON, + GetScaffoldV1Template200ResponseToJSON, + ScaffoldV1TemplateListFromJSON, + ScaffoldV1TemplateListToJSON, +} from "../models/index"; export interface ApplyScaffoldV1TemplateOperationRequest { - template_collection_name: string; - name: string; - ApplyScaffoldV1TemplateRequest?: ApplyScaffoldV1TemplateRequest; + template_collection_name: string; + name: string; + ApplyScaffoldV1TemplateRequest?: ApplyScaffoldV1TemplateRequest; } export interface GetScaffoldV1TemplateRequest { - template_collection_name: string; - name: string; + template_collection_name: string; + name: string; } export interface ListScaffoldV1TemplatesRequest { - template_collection_name: string; - page_size?: number; - page_token?: string; + template_collection_name: string; + page_size?: number; + page_token?: string; } /** - * + * */ export class TemplatesScaffoldV1Api extends runtime.BaseAPI { + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. + * Apply a Template + */ + async applyScaffoldV1TemplateRaw( + requestParameters: ApplyScaffoldV1TemplateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["template_collection_name"] == null) { + throw new runtime.RequiredError( + "template_collection_name", + 'Required parameter "template_collection_name" was null or undefined when calling applyScaffoldV1Template().', + ); + } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. - * Apply a Template - */ - async applyScaffoldV1TemplateRaw(requestParameters: ApplyScaffoldV1TemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['template_collection_name'] == null) { - throw new runtime.RequiredError( - 'template_collection_name', - 'Required parameter "template_collection_name" was null or undefined when calling applyScaffoldV1Template().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling applyScaffoldV1Template().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}/apply`.replace(`{${"template-collection-name"}}`, encodeURIComponent(String(requestParameters['template_collection_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ApplyScaffoldV1TemplateRequestToJSON(requestParameters['ApplyScaffoldV1TemplateRequest']), - }, initOverrides); - - return new runtime.BlobApiResponse(response); + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling applyScaffoldV1Template().', + ); } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. - * Apply a Template - */ - async applyScaffoldV1Template(requestParameters: ApplyScaffoldV1TemplateOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.applyScaffoldV1TemplateRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}/apply` + .replace( + `{${"template-collection-name"}}`, + encodeURIComponent(String(requestParameters["template_collection_name"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ApplyScaffoldV1TemplateRequestToJSON( + requestParameters["ApplyScaffoldV1TemplateRequest"], + ), + }, + initOverrides, + ); + + return new runtime.BlobApiResponse(response); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Generates an application project from a template using provided option values. + * Apply a Template + */ + async applyScaffoldV1Template( + requestParameters: ApplyScaffoldV1TemplateOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.applyScaffoldV1TemplateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. + * Read a Template + */ + async getScaffoldV1TemplateRaw( + requestParameters: GetScaffoldV1TemplateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["template_collection_name"] == null) { + throw new runtime.RequiredError( + "template_collection_name", + 'Required parameter "template_collection_name" was null or undefined when calling getScaffoldV1Template().', + ); } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. - * Read a Template - */ - async getScaffoldV1TemplateRaw(requestParameters: GetScaffoldV1TemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['template_collection_name'] == null) { - throw new runtime.RequiredError( - 'template_collection_name', - 'Required parameter "template_collection_name" was null or undefined when calling getScaffoldV1Template().' - ); - } - - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getScaffoldV1Template().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}`.replace(`{${"template-collection-name"}}`, encodeURIComponent(String(requestParameters['template_collection_name']))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GetScaffoldV1Template200ResponseFromJSON(jsonValue)); + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getScaffoldV1Template().', + ); } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. - * Read a Template - */ - async getScaffoldV1Template(requestParameters: GetScaffoldV1TemplateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getScaffoldV1TemplateRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/scaffold/v1/template-collections/{template-collection-name}/templates/{name}` + .replace( + `{${"template-collection-name"}}`, + encodeURIComponent(String(requestParameters["template_collection_name"])), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetScaffoldV1Template200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Make a request to read a template. + * Read a Template + */ + async getScaffoldV1Template( + requestParameters: GetScaffoldV1TemplateRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getScaffoldV1TemplateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. + * List of Templates + */ + async listScaffoldV1TemplatesRaw( + requestParameters: ListScaffoldV1TemplatesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["template_collection_name"] == null) { + throw new runtime.RequiredError( + "template_collection_name", + 'Required parameter "template_collection_name" was null or undefined when calling listScaffoldV1Templates().', + ); } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. - * List of Templates - */ - async listScaffoldV1TemplatesRaw(requestParameters: ListScaffoldV1TemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['template_collection_name'] == null) { - throw new runtime.RequiredError( - 'template_collection_name', - 'Required parameter "template_collection_name" was null or undefined when calling listScaffoldV1Templates().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page_size'] != null) { - queryParameters['page_size'] = requestParameters['page_size']; - } - - if (requestParameters['page_token'] != null) { - queryParameters['page_token'] = requestParameters['page_token']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/scaffold/v1/template-collections/{template-collection-name}/templates`.replace(`{${"template-collection-name"}}`, encodeURIComponent(String(requestParameters['template_collection_name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ScaffoldV1TemplateListFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; } - /** - * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. - * List of Templates - */ - async listScaffoldV1Templates(requestParameters: ListScaffoldV1TemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listScaffoldV1TemplatesRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/scaffold/v1/template-collections/{template-collection-name}/templates`.replace( + `{${"template-collection-name"}}`, + encodeURIComponent(String(requestParameters["template_collection_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ScaffoldV1TemplateListFromJSON(jsonValue), + ); + } + + /** + * [![Early Access](https://img.shields.io/badge/Lifecycle%20Stage-Early%20Access-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy) [![Request Access To Scaffolding API v1](https://img.shields.io/badge/-Request%20Access%20To%20Scaffolding%20API%20v1-%23bc8540)](mailto:ccloud-api-access+scaffold-v1-early-access@confluent.io?subject=Request%20to%20join%20scaffold/v1%20API%20Early%20Access&body=I%E2%80%99d%20like%20to%20join%20the%20Confluent%20Cloud%20API%20Early%20Access%20for%20scaffold/v1%20to%20provide%20early%20feedback%21%20My%20Cloud%20Organization%20ID%20is%20%3Cretrieve%20from%20https%3A//confluent.cloud/settings/billing/payment%3E.) Retrieve a sorted, filtered, paginated list of all templates. + * List of Templates + */ + async listScaffoldV1Templates( + requestParameters: ListScaffoldV1TemplatesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listScaffoldV1TemplatesRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/scaffoldingService/apis/index.ts b/src/clients/scaffoldingService/apis/index.ts index a91888af83..c12cefab03 100644 --- a/src/clients/scaffoldingService/apis/index.ts +++ b/src/clients/scaffoldingService/apis/index.ts @@ -1,4 +1,4 @@ /* tslint:disable */ /* eslint-disable */ -export * from './TemplateCollectionsScaffoldV1Api'; -export * from './TemplatesScaffoldV1Api'; +export * from "./TemplateCollectionsScaffoldV1Api"; +export * from "./TemplatesScaffoldV1Api"; diff --git a/src/clients/scaffoldingService/index.ts b/src/clients/scaffoldingService/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/scaffoldingService/index.ts +++ b/src/clients/scaffoldingService/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts b/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts index 82af6a5dad..032f0ec45c 100644 --- a/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts +++ b/src/clients/scaffoldingService/models/ApplyScaffoldV1TemplateRequest.ts @@ -2,65 +2,70 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Request payload for the endpoint that applies a template. * @export * @interface ApplyScaffoldV1TemplateRequest */ export interface ApplyScaffoldV1TemplateRequest { - /** - * Values for the options of the template. - * @type {{ [key: string]: string; }} - * @memberof ApplyScaffoldV1TemplateRequest - */ - options: { [key: string]: string; }; + /** + * Values for the options of the template. + * @type {{ [key: string]: string; }} + * @memberof ApplyScaffoldV1TemplateRequest + */ + options: { [key: string]: string }; } /** * Check if a given object implements the ApplyScaffoldV1TemplateRequest interface. */ -export function instanceOfApplyScaffoldV1TemplateRequest(value: object): value is ApplyScaffoldV1TemplateRequest { - if (!('options' in value) || value['options'] === undefined) return false; - return true; +export function instanceOfApplyScaffoldV1TemplateRequest( + value: object, +): value is ApplyScaffoldV1TemplateRequest { + if (!("options" in value) || value["options"] === undefined) return false; + return true; } export function ApplyScaffoldV1TemplateRequestFromJSON(json: any): ApplyScaffoldV1TemplateRequest { - return ApplyScaffoldV1TemplateRequestFromJSONTyped(json, false); + return ApplyScaffoldV1TemplateRequestFromJSONTyped(json, false); } -export function ApplyScaffoldV1TemplateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplyScaffoldV1TemplateRequest { - if (json == null) { - return json; - } - return { - - 'options': json['options'], - }; +export function ApplyScaffoldV1TemplateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ApplyScaffoldV1TemplateRequest { + if (json == null) { + return json; + } + return { + options: json["options"], + }; } export function ApplyScaffoldV1TemplateRequestToJSON(json: any): ApplyScaffoldV1TemplateRequest { - return ApplyScaffoldV1TemplateRequestToJSONTyped(json, false); + return ApplyScaffoldV1TemplateRequestToJSONTyped(json, false); } -export function ApplyScaffoldV1TemplateRequestToJSONTyped(value?: ApplyScaffoldV1TemplateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ApplyScaffoldV1TemplateRequestToJSONTyped( + value?: ApplyScaffoldV1TemplateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'options': value['options'], - }; + return { + options: value["options"], + }; } - diff --git a/src/clients/scaffoldingService/models/ErrorSource.ts b/src/clients/scaffoldingService/models/ErrorSource.ts index 524c31562f..695826529d 100644 --- a/src/clients/scaffoldingService/models/ErrorSource.ts +++ b/src/clients/scaffoldingService/models/ErrorSource.ts @@ -2,72 +2,72 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * If this error was caused by a particular part of the API request, the source will point to the query string parameter or request body property that caused it. * @export * @interface ErrorSource */ export interface ErrorSource { - /** - * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. - * @type {string} - * @memberof ErrorSource - */ - pointer?: string; - /** - * A string indicating which query parameter caused the error. - * @type {string} - * @memberof ErrorSource - */ - parameter?: string; + /** + * A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/spec" for a spec object, or "/spec/title" for a specific field]. + * @type {string} + * @memberof ErrorSource + */ + pointer?: string; + /** + * A string indicating which query parameter caused the error. + * @type {string} + * @memberof ErrorSource + */ + parameter?: string; } /** * Check if a given object implements the ErrorSource interface. */ export function instanceOfErrorSource(value: object): value is ErrorSource { - return true; + return true; } export function ErrorSourceFromJSON(json: any): ErrorSource { - return ErrorSourceFromJSONTyped(json, false); + return ErrorSourceFromJSONTyped(json, false); } export function ErrorSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorSource { - if (json == null) { - return json; - } - return { - - 'pointer': json['pointer'] == null ? undefined : json['pointer'], - 'parameter': json['parameter'] == null ? undefined : json['parameter'], - }; + if (json == null) { + return json; + } + return { + pointer: json["pointer"] == null ? undefined : json["pointer"], + parameter: json["parameter"] == null ? undefined : json["parameter"], + }; } export function ErrorSourceToJSON(json: any): ErrorSource { - return ErrorSourceToJSONTyped(json, false); + return ErrorSourceToJSONTyped(json, false); } -export function ErrorSourceToJSONTyped(value?: ErrorSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorSourceToJSONTyped( + value?: ErrorSource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'pointer': value['pointer'], - 'parameter': value['parameter'], - }; + return { + pointer: value["pointer"], + parameter: value["parameter"], + }; } - diff --git a/src/clients/scaffoldingService/models/Failure.ts b/src/clients/scaffoldingService/models/Failure.ts index abc12b67fd..ff1c43fcee 100644 --- a/src/clients/scaffoldingService/models/Failure.ts +++ b/src/clients/scaffoldingService/models/Failure.ts @@ -2,65 +2,65 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Provides information about problems encountered while performing an operation. * @export * @interface Failure */ export interface Failure { - /** - * List of errors which caused this operation to fail - * @type {Set} - * @memberof Failure - */ - errors: Set; + /** + * List of errors which caused this operation to fail + * @type {Set} + * @memberof Failure + */ + errors: Set; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - if (!('errors' in value) || value['errors'] === undefined) return false; - return true; + if (!("errors" in value) || value["errors"] === undefined) return false; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - - 'errors': new Set(json['errors']), - }; + if (json == null) { + return json; + } + return { + errors: new Set(json["errors"]), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped( + value?: Failure | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'errors': Array.from(value['errors'] as Set), - }; + return { + errors: Array.from(value["errors"] as Set), + }; } - diff --git a/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts b/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts index ca5921fc6d..5d99498c76 100644 --- a/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts +++ b/src/clients/scaffoldingService/models/GetScaffoldV1Template200Response.ts @@ -2,113 +2,122 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateMetadata } from './ScaffoldV1TemplateMetadata'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateMetadata } from "./ScaffoldV1TemplateMetadata"; import { - ScaffoldV1TemplateMetadataFromJSON, - ScaffoldV1TemplateMetadataFromJSONTyped, - ScaffoldV1TemplateMetadataToJSON, - ScaffoldV1TemplateMetadataToJSONTyped, -} from './ScaffoldV1TemplateMetadata'; + ScaffoldV1TemplateMetadataFromJSON, + ScaffoldV1TemplateMetadataFromJSONTyped, + ScaffoldV1TemplateMetadataToJSON, + ScaffoldV1TemplateMetadataToJSONTyped, +} from "./ScaffoldV1TemplateMetadata"; /** - * + * * @export * @interface GetScaffoldV1Template200Response */ export interface GetScaffoldV1Template200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetScaffoldV1Template200Response - */ - readonly api_version: GetScaffoldV1Template200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetScaffoldV1Template200Response - */ - readonly kind: GetScaffoldV1Template200ResponseKindEnum; - /** - * - * @type {ScaffoldV1TemplateMetadata} - * @memberof GetScaffoldV1Template200Response - */ - metadata?: ScaffoldV1TemplateMetadata; - /** - * - * @type {object} - * @memberof GetScaffoldV1Template200Response - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetScaffoldV1Template200Response + */ + readonly api_version: GetScaffoldV1Template200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetScaffoldV1Template200Response + */ + readonly kind: GetScaffoldV1Template200ResponseKindEnum; + /** + * + * @type {ScaffoldV1TemplateMetadata} + * @memberof GetScaffoldV1Template200Response + */ + metadata?: ScaffoldV1TemplateMetadata; + /** + * + * @type {object} + * @memberof GetScaffoldV1Template200Response + */ + spec: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetScaffoldV1Template200ResponseApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetScaffoldV1Template200ResponseKindEnum { - Template = 'Template' + Template = "Template", } - /** * Check if a given object implements the GetScaffoldV1Template200Response interface. */ -export function instanceOfGetScaffoldV1Template200Response(value: object): value is GetScaffoldV1Template200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfGetScaffoldV1Template200Response( + value: object, +): value is GetScaffoldV1Template200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function GetScaffoldV1Template200ResponseFromJSON(json: any): GetScaffoldV1Template200Response { - return GetScaffoldV1Template200ResponseFromJSONTyped(json, false); +export function GetScaffoldV1Template200ResponseFromJSON( + json: any, +): GetScaffoldV1Template200Response { + return GetScaffoldV1Template200ResponseFromJSONTyped(json, false); } -export function GetScaffoldV1Template200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetScaffoldV1Template200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json['metadata']), - 'spec': json['spec'], - }; +export function GetScaffoldV1Template200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetScaffoldV1Template200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: + json["metadata"] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json["metadata"]), + spec: json["spec"], + }; } -export function GetScaffoldV1Template200ResponseToJSON(json: any): GetScaffoldV1Template200Response { - return GetScaffoldV1Template200ResponseToJSONTyped(json, false); +export function GetScaffoldV1Template200ResponseToJSON( + json: any, +): GetScaffoldV1Template200Response { + return GetScaffoldV1Template200ResponseToJSONTyped(json, false); } -export function GetScaffoldV1Template200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetScaffoldV1Template200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateMetadataToJSON(value['metadata']), - 'spec': value['spec'], - }; + return { + metadata: ScaffoldV1TemplateMetadataToJSON(value["metadata"]), + spec: value["spec"], + }; } - diff --git a/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts b/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts index 62f6741c07..73ac40fdcc 100644 --- a/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts +++ b/src/clients/scaffoldingService/models/GetScaffoldV1TemplateCollection200Response.ts @@ -2,113 +2,124 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateCollectionMetadata } from './ScaffoldV1TemplateCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateCollectionMetadata } from "./ScaffoldV1TemplateCollectionMetadata"; import { - ScaffoldV1TemplateCollectionMetadataFromJSON, - ScaffoldV1TemplateCollectionMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionMetadataToJSON, - ScaffoldV1TemplateCollectionMetadataToJSONTyped, -} from './ScaffoldV1TemplateCollectionMetadata'; + ScaffoldV1TemplateCollectionMetadataFromJSON, + ScaffoldV1TemplateCollectionMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionMetadataToJSON, + ScaffoldV1TemplateCollectionMetadataToJSONTyped, +} from "./ScaffoldV1TemplateCollectionMetadata"; /** - * + * * @export * @interface GetScaffoldV1TemplateCollection200Response */ export interface GetScaffoldV1TemplateCollection200Response { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - readonly api_version: GetScaffoldV1TemplateCollection200ResponseApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - readonly kind: GetScaffoldV1TemplateCollection200ResponseKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionMetadata} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - metadata?: ScaffoldV1TemplateCollectionMetadata; - /** - * - * @type {object} - * @memberof GetScaffoldV1TemplateCollection200Response - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + readonly api_version: GetScaffoldV1TemplateCollection200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + readonly kind: GetScaffoldV1TemplateCollection200ResponseKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionMetadata} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + metadata?: ScaffoldV1TemplateCollectionMetadata; + /** + * + * @type {object} + * @memberof GetScaffoldV1TemplateCollection200Response + */ + spec: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetScaffoldV1TemplateCollection200ResponseApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum GetScaffoldV1TemplateCollection200ResponseKindEnum { - TemplateCollection = 'TemplateCollection' + TemplateCollection = "TemplateCollection", } - /** * Check if a given object implements the GetScaffoldV1TemplateCollection200Response interface. */ -export function instanceOfGetScaffoldV1TemplateCollection200Response(value: object): value is GetScaffoldV1TemplateCollection200Response { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfGetScaffoldV1TemplateCollection200Response( + value: object, +): value is GetScaffoldV1TemplateCollection200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function GetScaffoldV1TemplateCollection200ResponseFromJSON(json: any): GetScaffoldV1TemplateCollection200Response { - return GetScaffoldV1TemplateCollection200ResponseFromJSONTyped(json, false); +export function GetScaffoldV1TemplateCollection200ResponseFromJSON( + json: any, +): GetScaffoldV1TemplateCollection200Response { + return GetScaffoldV1TemplateCollection200ResponseFromJSONTyped(json, false); } -export function GetScaffoldV1TemplateCollection200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetScaffoldV1TemplateCollection200Response { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateCollectionMetadataFromJSON(json['metadata']), - 'spec': json['spec'], - }; +export function GetScaffoldV1TemplateCollection200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetScaffoldV1TemplateCollection200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: + json["metadata"] == null + ? undefined + : ScaffoldV1TemplateCollectionMetadataFromJSON(json["metadata"]), + spec: json["spec"], + }; } -export function GetScaffoldV1TemplateCollection200ResponseToJSON(json: any): GetScaffoldV1TemplateCollection200Response { - return GetScaffoldV1TemplateCollection200ResponseToJSONTyped(json, false); +export function GetScaffoldV1TemplateCollection200ResponseToJSON( + json: any, +): GetScaffoldV1TemplateCollection200Response { + return GetScaffoldV1TemplateCollection200ResponseToJSONTyped(json, false); } -export function GetScaffoldV1TemplateCollection200ResponseToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GetScaffoldV1TemplateCollection200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateCollectionMetadataToJSON(value['metadata']), - 'spec': value['spec'], - }; + return { + metadata: ScaffoldV1TemplateCollectionMetadataToJSON(value["metadata"]), + spec: value["spec"], + }; } - diff --git a/src/clients/scaffoldingService/models/GlobalObjectReference.ts b/src/clients/scaffoldingService/models/GlobalObjectReference.ts index 55dc04abd5..9b7eafe73e 100644 --- a/src/clients/scaffoldingService/models/GlobalObjectReference.ts +++ b/src/clients/scaffoldingService/models/GlobalObjectReference.ts @@ -2,81 +2,84 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface GlobalObjectReference */ export interface GlobalObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - id: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof GlobalObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof GlobalObjectReference - */ - readonly resource_name: string; + /** + * ID of the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + id: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof GlobalObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof GlobalObjectReference + */ + readonly resource_name: string; } /** * Check if a given object implements the GlobalObjectReference interface. */ export function instanceOfGlobalObjectReference(value: object): value is GlobalObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function GlobalObjectReferenceFromJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceFromJSONTyped(json, false); + return GlobalObjectReferenceFromJSONTyped(json, false); } -export function GlobalObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GlobalObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'related': json['related'], - 'resource_name': json['resource_name'], - }; +export function GlobalObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GlobalObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + related: json["related"], + resource_name: json["resource_name"], + }; } export function GlobalObjectReferenceToJSON(json: any): GlobalObjectReference { - return GlobalObjectReferenceToJSONTyped(json, false); + return GlobalObjectReferenceToJSONTyped(json, false); } -export function GlobalObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function GlobalObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - }; + return { + id: value["id"], + }; } - diff --git a/src/clients/scaffoldingService/models/ListMeta.ts b/src/clients/scaffoldingService/models/ListMeta.ts index 8665d768bf..f180cb3f67 100644 --- a/src/clients/scaffoldingService/models/ListMeta.ts +++ b/src/clients/scaffoldingService/models/ListMeta.ts @@ -2,96 +2,96 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ListMeta describes metadata that resource collections may have * @export * @interface ListMeta */ export interface ListMeta { - /** - * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. - * @type {string} - * @memberof ListMeta - */ - first?: string | null; - /** - * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. - * @type {string} - * @memberof ListMeta - */ - last?: string | null; - /** - * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. - * @type {string} - * @memberof ListMeta - */ - prev?: string | null; - /** - * A link to the next page of results. If a response does not contain a next link, then there is no more data available. - * @type {string} - * @memberof ListMeta - */ - next?: string | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ListMeta - */ - total_size?: number; + /** + * A link to the first page of results. If a response does not contain a first link, then direct navigation to the first page is not supported. + * @type {string} + * @memberof ListMeta + */ + first?: string | null; + /** + * A link to the last page of results. If a response does not contain a last link, then direct navigation to the last page is not supported. + * @type {string} + * @memberof ListMeta + */ + last?: string | null; + /** + * A link to the previous page of results. If a response does not contain a prev link, then either there is no previous data or backwards traversal through the result set is not supported. + * @type {string} + * @memberof ListMeta + */ + prev?: string | null; + /** + * A link to the next page of results. If a response does not contain a next link, then there is no more data available. + * @type {string} + * @memberof ListMeta + */ + next?: string | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ListMeta + */ + total_size?: number; } /** * Check if a given object implements the ListMeta interface. */ export function instanceOfListMeta(value: object): value is ListMeta { - return true; + return true; } export function ListMetaFromJSON(json: any): ListMeta { - return ListMetaFromJSONTyped(json, false); + return ListMetaFromJSONTyped(json, false); } export function ListMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMeta { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function ListMetaToJSON(json: any): ListMeta { - return ListMetaToJSONTyped(json, false); + return ListMetaToJSONTyped(json, false); } -export function ListMetaToJSONTyped(value?: ListMeta | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ListMetaToJSONTyped( + value?: ListMeta | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/scaffoldingService/models/ModelError.ts b/src/clients/scaffoldingService/models/ModelError.ts index dfcb5416d2..491e79c615 100644 --- a/src/clients/scaffoldingService/models/ModelError.ts +++ b/src/clients/scaffoldingService/models/ModelError.ts @@ -2,24 +2,24 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ErrorSource } from './ErrorSource'; +import { mapValues } from "../runtime"; +import type { ErrorSource } from "./ErrorSource"; import { - ErrorSourceFromJSON, - ErrorSourceFromJSONTyped, - ErrorSourceToJSON, - ErrorSourceToJSONTyped, -} from './ErrorSource'; + ErrorSourceFromJSON, + ErrorSourceFromJSONTyped, + ErrorSourceToJSON, + ErrorSourceToJSONTyped, +} from "./ErrorSource"; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface ModelError */ export interface ModelError { - /** - * A unique identifier for this particular occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - id?: string; - /** - * The HTTP status code applicable to this problem, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - status?: string; - /** - * An application-specific error code, expressed as a string value. - * @type {string} - * @memberof ModelError - */ - code?: string; - /** - * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. - * @type {string} - * @memberof ModelError - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the problem. - * @type {string} - * @memberof ModelError - */ - detail?: string; - /** - * - * @type {ErrorSource} - * @memberof ModelError - */ - source?: ErrorSource; + /** + * A unique identifier for this particular occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + id?: string; + /** + * The HTTP status code applicable to this problem, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + status?: string; + /** + * An application-specific error code, expressed as a string value. + * @type {string} + * @memberof ModelError + */ + code?: string; + /** + * A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization. + * @type {string} + * @memberof ModelError + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the problem. + * @type {string} + * @memberof ModelError + */ + detail?: string; + /** + * + * @type {ErrorSource} + * @memberof ModelError + */ + source?: ErrorSource; } /** * Check if a given object implements the ModelError interface. */ export function instanceOfModelError(value: object): value is ModelError { - return true; + return true; } export function ModelErrorFromJSON(json: any): ModelError { - return ModelErrorFromJSONTyped(json, false); + return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'status': json['status'] == null ? undefined : json['status'], - 'code': json['code'] == null ? undefined : json['code'], - 'title': json['title'] == null ? undefined : json['title'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'source': json['source'] == null ? undefined : ErrorSourceFromJSON(json['source']), - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + status: json["status"] == null ? undefined : json["status"], + code: json["code"] == null ? undefined : json["code"], + title: json["title"] == null ? undefined : json["title"], + detail: json["detail"] == null ? undefined : json["detail"], + source: json["source"] == null ? undefined : ErrorSourceFromJSON(json["source"]), + }; } export function ModelErrorToJSON(json: any): ModelError { - return ModelErrorToJSONTyped(json, false); + return ModelErrorToJSONTyped(json, false); } -export function ModelErrorToJSONTyped(value?: ModelError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModelErrorToJSONTyped( + value?: ModelError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'status': value['status'], - 'code': value['code'], - 'title': value['title'], - 'detail': value['detail'], - 'source': ErrorSourceToJSON(value['source']), - }; + return { + id: value["id"], + status: value["status"], + code: value["code"], + title: value["title"], + detail: value["detail"], + source: ErrorSourceToJSON(value["source"]), + }; } - diff --git a/src/clients/scaffoldingService/models/ObjectMeta.ts b/src/clients/scaffoldingService/models/ObjectMeta.ts index 699980b452..738cb766eb 100644 --- a/src/clients/scaffoldingService/models/ObjectMeta.ts +++ b/src/clients/scaffoldingService/models/ObjectMeta.ts @@ -2,92 +2,94 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. * @export * @interface ObjectMeta */ export interface ObjectMeta { - /** - * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time - * @type {string} - * @memberof ObjectMeta - */ - readonly self: string; - /** - * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name - * @type {string} - * @memberof ObjectMeta - */ - readonly resource_name?: string; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ObjectMeta - */ - readonly deleted_at?: Date; + /** + * Self is a Uniform Resource Locator (URL) at which an object can be addressed. This URL encodes the service location, API version, and other particulars necessary to locate the resource at a point in time + * @type {string} + * @memberof ObjectMeta + */ + readonly self: string; + /** + * Resource Name is a Uniform Resource Identifier (URI) that is globally unique across space and time. It is represented as a Confluent Resource Name + * @type {string} + * @memberof ObjectMeta + */ + readonly resource_name?: string; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ObjectMeta + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ObjectMeta interface. */ export function instanceOfObjectMeta(value: object): value is ObjectMeta { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ObjectMetaFromJSON(json: any): ObjectMeta { - return ObjectMetaFromJSONTyped(json, false); + return ObjectMetaFromJSONTyped(json, false); } export function ObjectMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectMeta { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function ObjectMetaToJSON(json: any): ObjectMeta { - return ObjectMetaToJSONTyped(json, false); + return ObjectMetaToJSONTyped(json, false); } -export function ObjectMetaToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectMetaToJSONTyped( + value?: Omit< + ObjectMeta, + "self" | "resource_name" | "created_at" | "updated_at" | "deleted_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - }; + return {}; } - diff --git a/src/clients/scaffoldingService/models/ObjectReference.ts b/src/clients/scaffoldingService/models/ObjectReference.ts index 728a5e54b6..3d60cead87 100644 --- a/src/clients/scaffoldingService/models/ObjectReference.ts +++ b/src/clients/scaffoldingService/models/ObjectReference.ts @@ -2,103 +2,106 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * ObjectReference provides information for you to locate the referred object * @export * @interface ObjectReference */ export interface ObjectReference { - /** - * ID of the referred resource - * @type {string} - * @memberof ObjectReference - */ - id: string; - /** - * Environment of the referred resource, if env-scoped - * @type {string} - * @memberof ObjectReference - */ - environment?: string; - /** - * API URL for accessing or modifying the referred object - * @type {string} - * @memberof ObjectReference - */ - readonly related: string; - /** - * CRN reference to the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly resource_name: string; - /** - * API group and version of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly api_version?: string; - /** - * Kind of the referred resource - * @type {string} - * @memberof ObjectReference - */ - readonly kind?: string; + /** + * ID of the referred resource + * @type {string} + * @memberof ObjectReference + */ + id: string; + /** + * Environment of the referred resource, if env-scoped + * @type {string} + * @memberof ObjectReference + */ + environment?: string; + /** + * API URL for accessing or modifying the referred object + * @type {string} + * @memberof ObjectReference + */ + readonly related: string; + /** + * CRN reference to the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly resource_name: string; + /** + * API group and version of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly api_version?: string; + /** + * Kind of the referred resource + * @type {string} + * @memberof ObjectReference + */ + readonly kind?: string; } /** * Check if a given object implements the ObjectReference interface. */ export function instanceOfObjectReference(value: object): value is ObjectReference { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('related' in value) || value['related'] === undefined) return false; - if (!('resource_name' in value) || value['resource_name'] === undefined) return false; - return true; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("related" in value) || value["related"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; } export function ObjectReferenceFromJSON(json: any): ObjectReference { - return ObjectReferenceFromJSONTyped(json, false); + return ObjectReferenceFromJSONTyped(json, false); } -export function ObjectReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ObjectReference { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'environment': json['environment'] == null ? undefined : json['environment'], - 'related': json['related'], - 'resource_name': json['resource_name'], - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - }; +export function ObjectReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ObjectReference { + if (json == null) { + return json; + } + return { + id: json["id"], + environment: json["environment"] == null ? undefined : json["environment"], + related: json["related"], + resource_name: json["resource_name"], + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + }; } export function ObjectReferenceToJSON(json: any): ObjectReference { - return ObjectReferenceToJSONTyped(json, false); + return ObjectReferenceToJSONTyped(json, false); } -export function ObjectReferenceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ObjectReferenceToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'environment': value['environment'], - }; + return { + id: value["id"], + environment: value["environment"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1Template.ts b/src/clients/scaffoldingService/models/ScaffoldV1Template.ts index dc8977c9a8..561f775fe9 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1Template.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1Template.ts @@ -2,120 +2,123 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateMetadata } from './ScaffoldV1TemplateMetadata'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateMetadata } from "./ScaffoldV1TemplateMetadata"; import { - ScaffoldV1TemplateMetadataFromJSON, - ScaffoldV1TemplateMetadataFromJSONTyped, - ScaffoldV1TemplateMetadataToJSON, - ScaffoldV1TemplateMetadataToJSONTyped, -} from './ScaffoldV1TemplateMetadata'; -import type { ScaffoldV1TemplateSpec } from './ScaffoldV1TemplateSpec'; + ScaffoldV1TemplateMetadataFromJSON, + ScaffoldV1TemplateMetadataFromJSONTyped, + ScaffoldV1TemplateMetadataToJSON, + ScaffoldV1TemplateMetadataToJSONTyped, +} from "./ScaffoldV1TemplateMetadata"; +import type { ScaffoldV1TemplateSpec } from "./ScaffoldV1TemplateSpec"; import { - ScaffoldV1TemplateSpecFromJSON, - ScaffoldV1TemplateSpecFromJSONTyped, - ScaffoldV1TemplateSpecToJSON, - ScaffoldV1TemplateSpecToJSONTyped, -} from './ScaffoldV1TemplateSpec'; + ScaffoldV1TemplateSpecFromJSON, + ScaffoldV1TemplateSpecFromJSONTyped, + ScaffoldV1TemplateSpecToJSON, + ScaffoldV1TemplateSpecToJSONTyped, +} from "./ScaffoldV1TemplateSpec"; /** * Templates can be used to generate application projects. - * + * * ## The Templates Model * * @export * @interface ScaffoldV1Template */ export interface ScaffoldV1Template { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1Template - */ - readonly api_version?: ScaffoldV1TemplateApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1Template - */ - readonly kind?: ScaffoldV1TemplateKindEnum; - /** - * - * @type {ScaffoldV1TemplateMetadata} - * @memberof ScaffoldV1Template - */ - metadata?: ScaffoldV1TemplateMetadata; - /** - * - * @type {ScaffoldV1TemplateSpec} - * @memberof ScaffoldV1Template - */ - spec?: ScaffoldV1TemplateSpec; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1Template + */ + readonly api_version?: ScaffoldV1TemplateApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1Template + */ + readonly kind?: ScaffoldV1TemplateKindEnum; + /** + * + * @type {ScaffoldV1TemplateMetadata} + * @memberof ScaffoldV1Template + */ + metadata?: ScaffoldV1TemplateMetadata; + /** + * + * @type {ScaffoldV1TemplateSpec} + * @memberof ScaffoldV1Template + */ + spec?: ScaffoldV1TemplateSpec; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateKindEnum { - Template = 'Template' + Template = "Template", } - /** * Check if a given object implements the ScaffoldV1Template interface. */ export function instanceOfScaffoldV1Template(value: object): value is ScaffoldV1Template { - return true; + return true; } export function ScaffoldV1TemplateFromJSON(json: any): ScaffoldV1Template { - return ScaffoldV1TemplateFromJSONTyped(json, false); + return ScaffoldV1TemplateFromJSONTyped(json, false); } -export function ScaffoldV1TemplateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1Template { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json['metadata']), - 'spec': json['spec'] == null ? undefined : ScaffoldV1TemplateSpecFromJSON(json['spec']), - }; +export function ScaffoldV1TemplateFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1Template { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null ? undefined : ScaffoldV1TemplateMetadataFromJSON(json["metadata"]), + spec: json["spec"] == null ? undefined : ScaffoldV1TemplateSpecFromJSON(json["spec"]), + }; } export function ScaffoldV1TemplateToJSON(json: any): ScaffoldV1Template { - return ScaffoldV1TemplateToJSONTyped(json, false); + return ScaffoldV1TemplateToJSONTyped(json, false); } -export function ScaffoldV1TemplateToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateMetadataToJSON(value['metadata']), - 'spec': ScaffoldV1TemplateSpecToJSON(value['spec']), - }; + return { + metadata: ScaffoldV1TemplateMetadataToJSON(value["metadata"]), + spec: ScaffoldV1TemplateSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts index 15ccfd6324..934f049d11 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollection.ts @@ -2,120 +2,127 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateCollectionMetadata } from './ScaffoldV1TemplateCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateCollectionMetadata } from "./ScaffoldV1TemplateCollectionMetadata"; import { - ScaffoldV1TemplateCollectionMetadataFromJSON, - ScaffoldV1TemplateCollectionMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionMetadataToJSON, - ScaffoldV1TemplateCollectionMetadataToJSONTyped, -} from './ScaffoldV1TemplateCollectionMetadata'; -import type { ScaffoldV1TemplateCollectionSpec } from './ScaffoldV1TemplateCollectionSpec'; + ScaffoldV1TemplateCollectionMetadataFromJSON, + ScaffoldV1TemplateCollectionMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionMetadataToJSON, + ScaffoldV1TemplateCollectionMetadataToJSONTyped, +} from "./ScaffoldV1TemplateCollectionMetadata"; +import type { ScaffoldV1TemplateCollectionSpec } from "./ScaffoldV1TemplateCollectionSpec"; import { - ScaffoldV1TemplateCollectionSpecFromJSON, - ScaffoldV1TemplateCollectionSpecFromJSONTyped, - ScaffoldV1TemplateCollectionSpecToJSON, - ScaffoldV1TemplateCollectionSpecToJSONTyped, -} from './ScaffoldV1TemplateCollectionSpec'; + ScaffoldV1TemplateCollectionSpecFromJSON, + ScaffoldV1TemplateCollectionSpecFromJSONTyped, + ScaffoldV1TemplateCollectionSpecToJSON, + ScaffoldV1TemplateCollectionSpecToJSONTyped, +} from "./ScaffoldV1TemplateCollectionSpec"; /** * Template collections curate sets of templates. - * + * * ## The Template Collections Model * * @export * @interface ScaffoldV1TemplateCollection */ export interface ScaffoldV1TemplateCollection { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateCollection - */ - readonly api_version?: ScaffoldV1TemplateCollectionApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateCollection - */ - readonly kind?: ScaffoldV1TemplateCollectionKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionMetadata} - * @memberof ScaffoldV1TemplateCollection - */ - metadata?: ScaffoldV1TemplateCollectionMetadata; - /** - * - * @type {ScaffoldV1TemplateCollectionSpec} - * @memberof ScaffoldV1TemplateCollection - */ - spec?: ScaffoldV1TemplateCollectionSpec; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateCollection + */ + readonly api_version?: ScaffoldV1TemplateCollectionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateCollection + */ + readonly kind?: ScaffoldV1TemplateCollectionKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionMetadata} + * @memberof ScaffoldV1TemplateCollection + */ + metadata?: ScaffoldV1TemplateCollectionMetadata; + /** + * + * @type {ScaffoldV1TemplateCollectionSpec} + * @memberof ScaffoldV1TemplateCollection + */ + spec?: ScaffoldV1TemplateCollectionSpec; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateCollectionApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateCollectionKindEnum { - TemplateCollection = 'TemplateCollection' + TemplateCollection = "TemplateCollection", } - /** * Check if a given object implements the ScaffoldV1TemplateCollection interface. */ -export function instanceOfScaffoldV1TemplateCollection(value: object): value is ScaffoldV1TemplateCollection { - return true; +export function instanceOfScaffoldV1TemplateCollection( + value: object, +): value is ScaffoldV1TemplateCollection { + return true; } export function ScaffoldV1TemplateCollectionFromJSON(json: any): ScaffoldV1TemplateCollection { - return ScaffoldV1TemplateCollectionFromJSONTyped(json, false); + return ScaffoldV1TemplateCollectionFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollection { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': json['metadata'] == null ? undefined : ScaffoldV1TemplateCollectionMetadataFromJSON(json['metadata']), - 'spec': json['spec'] == null ? undefined : ScaffoldV1TemplateCollectionSpecFromJSON(json['spec']), - }; +export function ScaffoldV1TemplateCollectionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateCollection { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: + json["metadata"] == null + ? undefined + : ScaffoldV1TemplateCollectionMetadataFromJSON(json["metadata"]), + spec: json["spec"] == null ? undefined : ScaffoldV1TemplateCollectionSpecFromJSON(json["spec"]), + }; } export function ScaffoldV1TemplateCollectionToJSON(json: any): ScaffoldV1TemplateCollection { - return ScaffoldV1TemplateCollectionToJSONTyped(json, false); + return ScaffoldV1TemplateCollectionToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateCollectionMetadataToJSON(value['metadata']), - 'spec': ScaffoldV1TemplateCollectionSpecToJSON(value['spec']), - }; + return { + metadata: ScaffoldV1TemplateCollectionMetadataToJSON(value["metadata"]), + spec: ScaffoldV1TemplateCollectionSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts index 578188b29a..ba6ededc20 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionList.ts @@ -2,124 +2,136 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateCollectionListDataInner } from './ScaffoldV1TemplateCollectionListDataInner'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateCollectionListDataInner } from "./ScaffoldV1TemplateCollectionListDataInner"; import { - ScaffoldV1TemplateCollectionListDataInnerFromJSON, - ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped, - ScaffoldV1TemplateCollectionListDataInnerToJSON, - ScaffoldV1TemplateCollectionListDataInnerToJSONTyped, -} from './ScaffoldV1TemplateCollectionListDataInner'; -import type { ScaffoldV1TemplateCollectionListMetadata } from './ScaffoldV1TemplateCollectionListMetadata'; + ScaffoldV1TemplateCollectionListDataInnerFromJSON, + ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped, + ScaffoldV1TemplateCollectionListDataInnerToJSON, + ScaffoldV1TemplateCollectionListDataInnerToJSONTyped, +} from "./ScaffoldV1TemplateCollectionListDataInner"; +import type { ScaffoldV1TemplateCollectionListMetadata } from "./ScaffoldV1TemplateCollectionListMetadata"; import { - ScaffoldV1TemplateCollectionListMetadataFromJSON, - ScaffoldV1TemplateCollectionListMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionListMetadataToJSON, - ScaffoldV1TemplateCollectionListMetadataToJSONTyped, -} from './ScaffoldV1TemplateCollectionListMetadata'; + ScaffoldV1TemplateCollectionListMetadataFromJSON, + ScaffoldV1TemplateCollectionListMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionListMetadataToJSON, + ScaffoldV1TemplateCollectionListMetadataToJSONTyped, +} from "./ScaffoldV1TemplateCollectionListMetadata"; /** * Template collections curate sets of templates. - * + * * ## The Template Collections Model * * @export * @interface ScaffoldV1TemplateCollectionList */ export interface ScaffoldV1TemplateCollectionList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionList - */ - readonly api_version: ScaffoldV1TemplateCollectionListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionList - */ - readonly kind: ScaffoldV1TemplateCollectionListKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionListMetadata} - * @memberof ScaffoldV1TemplateCollectionList - */ - metadata: ScaffoldV1TemplateCollectionListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof ScaffoldV1TemplateCollectionList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionList + */ + readonly api_version: ScaffoldV1TemplateCollectionListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionList + */ + readonly kind: ScaffoldV1TemplateCollectionListKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionListMetadata} + * @memberof ScaffoldV1TemplateCollectionList + */ + metadata: ScaffoldV1TemplateCollectionListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof ScaffoldV1TemplateCollectionList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateCollectionListApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateCollectionListKindEnum { - TemplateCollectionList = 'TemplateCollectionList' + TemplateCollectionList = "TemplateCollectionList", } - /** * Check if a given object implements the ScaffoldV1TemplateCollectionList interface. */ -export function instanceOfScaffoldV1TemplateCollectionList(value: object): value is ScaffoldV1TemplateCollectionList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateCollectionList( + value: object, +): value is ScaffoldV1TemplateCollectionList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } -export function ScaffoldV1TemplateCollectionListFromJSON(json: any): ScaffoldV1TemplateCollectionList { - return ScaffoldV1TemplateCollectionListFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListFromJSON( + json: any, +): ScaffoldV1TemplateCollectionList { + return ScaffoldV1TemplateCollectionListFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ScaffoldV1TemplateCollectionListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(ScaffoldV1TemplateCollectionListDataInnerFromJSON))), - }; +export function ScaffoldV1TemplateCollectionListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateCollectionList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ScaffoldV1TemplateCollectionListMetadataFromJSON(json["metadata"]), + data: new Set( + (json["data"] as Array).map(ScaffoldV1TemplateCollectionListDataInnerFromJSON), + ), + }; } -export function ScaffoldV1TemplateCollectionListToJSON(json: any): ScaffoldV1TemplateCollectionList { - return ScaffoldV1TemplateCollectionListToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListToJSON( + json: any, +): ScaffoldV1TemplateCollectionList { + return ScaffoldV1TemplateCollectionListToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateCollectionListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(ScaffoldV1TemplateCollectionListDataInnerToJSON)), - }; + return { + metadata: ScaffoldV1TemplateCollectionListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map( + ScaffoldV1TemplateCollectionListDataInnerToJSON, + ), + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts index f004cf46e6..5df61112a5 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListDataInner.ts @@ -2,112 +2,120 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateCollectionMetadata } from './ScaffoldV1TemplateCollectionMetadata'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateCollectionMetadata } from "./ScaffoldV1TemplateCollectionMetadata"; import { - ScaffoldV1TemplateCollectionMetadataFromJSON, - ScaffoldV1TemplateCollectionMetadataFromJSONTyped, - ScaffoldV1TemplateCollectionMetadataToJSON, - ScaffoldV1TemplateCollectionMetadataToJSONTyped, -} from './ScaffoldV1TemplateCollectionMetadata'; + ScaffoldV1TemplateCollectionMetadataFromJSON, + ScaffoldV1TemplateCollectionMetadataFromJSONTyped, + ScaffoldV1TemplateCollectionMetadataToJSON, + ScaffoldV1TemplateCollectionMetadataToJSONTyped, +} from "./ScaffoldV1TemplateCollectionMetadata"; /** - * + * * @export * @interface ScaffoldV1TemplateCollectionListDataInner */ export interface ScaffoldV1TemplateCollectionListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - readonly api_version?: ScaffoldV1TemplateCollectionListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - readonly kind?: ScaffoldV1TemplateCollectionListDataInnerKindEnum; - /** - * - * @type {ScaffoldV1TemplateCollectionMetadata} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - metadata: ScaffoldV1TemplateCollectionMetadata; - /** - * - * @type {object} - * @memberof ScaffoldV1TemplateCollectionListDataInner - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + readonly api_version?: ScaffoldV1TemplateCollectionListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + readonly kind?: ScaffoldV1TemplateCollectionListDataInnerKindEnum; + /** + * + * @type {ScaffoldV1TemplateCollectionMetadata} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + metadata: ScaffoldV1TemplateCollectionMetadata; + /** + * + * @type {object} + * @memberof ScaffoldV1TemplateCollectionListDataInner + */ + spec: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateCollectionListDataInnerApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateCollectionListDataInnerKindEnum { - TemplateCollection = 'TemplateCollection' + TemplateCollection = "TemplateCollection", } - /** * Check if a given object implements the ScaffoldV1TemplateCollectionListDataInner interface. */ -export function instanceOfScaffoldV1TemplateCollectionListDataInner(value: object): value is ScaffoldV1TemplateCollectionListDataInner { - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateCollectionListDataInner( + value: object, +): value is ScaffoldV1TemplateCollectionListDataInner { + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function ScaffoldV1TemplateCollectionListDataInnerFromJSON(json: any): ScaffoldV1TemplateCollectionListDataInner { - return ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListDataInnerFromJSON( + json: any, +): ScaffoldV1TemplateCollectionListDataInner { + return ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': ScaffoldV1TemplateCollectionMetadataFromJSON(json['metadata']), - 'spec': json['spec'], - }; +export function ScaffoldV1TemplateCollectionListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateCollectionListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: ScaffoldV1TemplateCollectionMetadataFromJSON(json["metadata"]), + spec: json["spec"], + }; } -export function ScaffoldV1TemplateCollectionListDataInnerToJSON(json: any): ScaffoldV1TemplateCollectionListDataInner { - return ScaffoldV1TemplateCollectionListDataInnerToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListDataInnerToJSON( + json: any, +): ScaffoldV1TemplateCollectionListDataInner { + return ScaffoldV1TemplateCollectionListDataInnerToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateCollectionMetadataToJSON(value['metadata']), - 'spec': value['spec'], - }; + return { + metadata: ScaffoldV1TemplateCollectionMetadataToJSON(value["metadata"]), + spec: value["spec"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts index 354bf5a5ce..96e007006c 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionListMetadata.ts @@ -2,96 +2,105 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ScaffoldV1TemplateCollectionListMetadata */ export interface ScaffoldV1TemplateCollectionListMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ScaffoldV1TemplateCollectionListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ScaffoldV1TemplateCollectionListMetadata + */ + total_size?: number; } /** * Check if a given object implements the ScaffoldV1TemplateCollectionListMetadata interface. */ -export function instanceOfScaffoldV1TemplateCollectionListMetadata(value: object): value is ScaffoldV1TemplateCollectionListMetadata { - return true; +export function instanceOfScaffoldV1TemplateCollectionListMetadata( + value: object, +): value is ScaffoldV1TemplateCollectionListMetadata { + return true; } -export function ScaffoldV1TemplateCollectionListMetadataFromJSON(json: any): ScaffoldV1TemplateCollectionListMetadata { - return ScaffoldV1TemplateCollectionListMetadataFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListMetadataFromJSON( + json: any, +): ScaffoldV1TemplateCollectionListMetadata { + return ScaffoldV1TemplateCollectionListMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionListMetadata { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; +export function ScaffoldV1TemplateCollectionListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateCollectionListMetadata { + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } -export function ScaffoldV1TemplateCollectionListMetadataToJSON(json: any): ScaffoldV1TemplateCollectionListMetadata { - return ScaffoldV1TemplateCollectionListMetadataToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionListMetadataToJSON( + json: any, +): ScaffoldV1TemplateCollectionListMetadata { + return ScaffoldV1TemplateCollectionListMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionListMetadataToJSONTyped(value?: ScaffoldV1TemplateCollectionListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionListMetadataToJSONTyped( + value?: ScaffoldV1TemplateCollectionListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts index 2095a901dc..0ef144d378 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionMetadata.ts @@ -2,94 +2,106 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ScaffoldV1TemplateCollectionMetadata */ export interface ScaffoldV1TemplateCollectionMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateCollectionMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateCollectionMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ScaffoldV1TemplateCollectionMetadata interface. */ -export function instanceOfScaffoldV1TemplateCollectionMetadata(value: object): value is ScaffoldV1TemplateCollectionMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateCollectionMetadata( + value: object, +): value is ScaffoldV1TemplateCollectionMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } -export function ScaffoldV1TemplateCollectionMetadataFromJSON(json: any): ScaffoldV1TemplateCollectionMetadata { - return ScaffoldV1TemplateCollectionMetadataFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionMetadataFromJSON( + json: any, +): ScaffoldV1TemplateCollectionMetadata { + return ScaffoldV1TemplateCollectionMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function ScaffoldV1TemplateCollectionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateCollectionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } -export function ScaffoldV1TemplateCollectionMetadataToJSON(json: any): ScaffoldV1TemplateCollectionMetadata { - return ScaffoldV1TemplateCollectionMetadataToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionMetadataToJSON( + json: any, +): ScaffoldV1TemplateCollectionMetadata { + return ScaffoldV1TemplateCollectionMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionMetadataToJSONTyped( + value?: Omit< + ScaffoldV1TemplateCollectionMetadata, + "created_at" | "updated_at" | "deleted_at" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts index eef7d2d352..6eaf449e1f 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateCollectionSpec.ts @@ -2,80 +2,89 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The desired state of the Template Collection * @export * @interface ScaffoldV1TemplateCollectionSpec */ export interface ScaffoldV1TemplateCollectionSpec { - /** - * The name of the template collection. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionSpec - */ - name?: string; - /** - * The display name of the template collection. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionSpec - */ - display_name?: string; - /** - * The description of the template collection. - * @type {string} - * @memberof ScaffoldV1TemplateCollectionSpec - */ - description?: string; + /** + * The name of the template collection. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionSpec + */ + name?: string; + /** + * The display name of the template collection. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionSpec + */ + display_name?: string; + /** + * The description of the template collection. + * @type {string} + * @memberof ScaffoldV1TemplateCollectionSpec + */ + description?: string; } /** * Check if a given object implements the ScaffoldV1TemplateCollectionSpec interface. */ -export function instanceOfScaffoldV1TemplateCollectionSpec(value: object): value is ScaffoldV1TemplateCollectionSpec { - return true; +export function instanceOfScaffoldV1TemplateCollectionSpec( + value: object, +): value is ScaffoldV1TemplateCollectionSpec { + return true; } -export function ScaffoldV1TemplateCollectionSpecFromJSON(json: any): ScaffoldV1TemplateCollectionSpec { - return ScaffoldV1TemplateCollectionSpecFromJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionSpecFromJSON( + json: any, +): ScaffoldV1TemplateCollectionSpec { + return ScaffoldV1TemplateCollectionSpecFromJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateCollectionSpec { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - 'description': json['description'] == null ? undefined : json['description'], - }; +export function ScaffoldV1TemplateCollectionSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateCollectionSpec { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + display_name: json["display_name"] == null ? undefined : json["display_name"], + description: json["description"] == null ? undefined : json["description"], + }; } -export function ScaffoldV1TemplateCollectionSpecToJSON(json: any): ScaffoldV1TemplateCollectionSpec { - return ScaffoldV1TemplateCollectionSpecToJSONTyped(json, false); +export function ScaffoldV1TemplateCollectionSpecToJSON( + json: any, +): ScaffoldV1TemplateCollectionSpec { + return ScaffoldV1TemplateCollectionSpecToJSONTyped(json, false); } -export function ScaffoldV1TemplateCollectionSpecToJSONTyped(value?: ScaffoldV1TemplateCollectionSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateCollectionSpecToJSONTyped( + value?: ScaffoldV1TemplateCollectionSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'display_name': value['display_name'], - 'description': value['description'], - }; + return { + name: value["name"], + display_name: value["display_name"], + description: value["description"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts index 3f739b36ff..ab70c7cd56 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateList.ts @@ -2,124 +2,126 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateListDataInner } from './ScaffoldV1TemplateListDataInner'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateListDataInner } from "./ScaffoldV1TemplateListDataInner"; import { - ScaffoldV1TemplateListDataInnerFromJSON, - ScaffoldV1TemplateListDataInnerFromJSONTyped, - ScaffoldV1TemplateListDataInnerToJSON, - ScaffoldV1TemplateListDataInnerToJSONTyped, -} from './ScaffoldV1TemplateListDataInner'; -import type { ScaffoldV1TemplateListMetadata } from './ScaffoldV1TemplateListMetadata'; + ScaffoldV1TemplateListDataInnerFromJSON, + ScaffoldV1TemplateListDataInnerFromJSONTyped, + ScaffoldV1TemplateListDataInnerToJSON, + ScaffoldV1TemplateListDataInnerToJSONTyped, +} from "./ScaffoldV1TemplateListDataInner"; +import type { ScaffoldV1TemplateListMetadata } from "./ScaffoldV1TemplateListMetadata"; import { - ScaffoldV1TemplateListMetadataFromJSON, - ScaffoldV1TemplateListMetadataFromJSONTyped, - ScaffoldV1TemplateListMetadataToJSON, - ScaffoldV1TemplateListMetadataToJSONTyped, -} from './ScaffoldV1TemplateListMetadata'; + ScaffoldV1TemplateListMetadataFromJSON, + ScaffoldV1TemplateListMetadataFromJSONTyped, + ScaffoldV1TemplateListMetadataToJSON, + ScaffoldV1TemplateListMetadataToJSONTyped, +} from "./ScaffoldV1TemplateListMetadata"; /** * Templates can be used to generate application projects. - * + * * ## The Templates Model * * @export * @interface ScaffoldV1TemplateList */ export interface ScaffoldV1TemplateList { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateList - */ - readonly api_version: ScaffoldV1TemplateListApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateList - */ - readonly kind: ScaffoldV1TemplateListKindEnum; - /** - * - * @type {ScaffoldV1TemplateListMetadata} - * @memberof ScaffoldV1TemplateList - */ - metadata: ScaffoldV1TemplateListMetadata; - /** - * A data property that contains an array of resource items. Each entry in the array is a separate resource. - * @type {Set} - * @memberof ScaffoldV1TemplateList - */ - data: Set; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateList + */ + readonly api_version: ScaffoldV1TemplateListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateList + */ + readonly kind: ScaffoldV1TemplateListKindEnum; + /** + * + * @type {ScaffoldV1TemplateListMetadata} + * @memberof ScaffoldV1TemplateList + */ + metadata: ScaffoldV1TemplateListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof ScaffoldV1TemplateList + */ + data: Set; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateListApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateListKindEnum { - TemplateList = 'TemplateList' + TemplateList = "TemplateList", } - /** * Check if a given object implements the ScaffoldV1TemplateList interface. */ export function instanceOfScaffoldV1TemplateList(value: object): value is ScaffoldV1TemplateList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ScaffoldV1TemplateListFromJSON(json: any): ScaffoldV1TemplateList { - return ScaffoldV1TemplateListFromJSONTyped(json, false); + return ScaffoldV1TemplateListFromJSONTyped(json, false); } -export function ScaffoldV1TemplateListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': ScaffoldV1TemplateListMetadataFromJSON(json['metadata']), - 'data': (new Set((json['data'] as Array).map(ScaffoldV1TemplateListDataInnerFromJSON))), - }; +export function ScaffoldV1TemplateListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ScaffoldV1TemplateListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(ScaffoldV1TemplateListDataInnerFromJSON)), + }; } export function ScaffoldV1TemplateListToJSON(json: any): ScaffoldV1TemplateList { - return ScaffoldV1TemplateListToJSONTyped(json, false); + return ScaffoldV1TemplateListToJSONTyped(json, false); } -export function ScaffoldV1TemplateListToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateListMetadataToJSON(value['metadata']), - 'data': (Array.from(value['data'] as Set).map(ScaffoldV1TemplateListDataInnerToJSON)), - }; + return { + metadata: ScaffoldV1TemplateListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(ScaffoldV1TemplateListDataInnerToJSON), + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts index 9c457c40ef..8d311cc286 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListDataInner.ts @@ -2,112 +2,118 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ScaffoldV1TemplateMetadata } from './ScaffoldV1TemplateMetadata'; +import { mapValues } from "../runtime"; +import type { ScaffoldV1TemplateMetadata } from "./ScaffoldV1TemplateMetadata"; import { - ScaffoldV1TemplateMetadataFromJSON, - ScaffoldV1TemplateMetadataFromJSONTyped, - ScaffoldV1TemplateMetadataToJSON, - ScaffoldV1TemplateMetadataToJSONTyped, -} from './ScaffoldV1TemplateMetadata'; + ScaffoldV1TemplateMetadataFromJSON, + ScaffoldV1TemplateMetadataFromJSONTyped, + ScaffoldV1TemplateMetadataToJSON, + ScaffoldV1TemplateMetadataToJSONTyped, +} from "./ScaffoldV1TemplateMetadata"; /** - * + * * @export * @interface ScaffoldV1TemplateListDataInner */ export interface ScaffoldV1TemplateListDataInner { - /** - * APIVersion defines the schema version of this representation of a resource. - * @type {string} - * @memberof ScaffoldV1TemplateListDataInner - */ - readonly api_version?: ScaffoldV1TemplateListDataInnerApiVersionEnum; - /** - * Kind defines the object this REST resource represents. - * @type {string} - * @memberof ScaffoldV1TemplateListDataInner - */ - readonly kind?: ScaffoldV1TemplateListDataInnerKindEnum; - /** - * - * @type {ScaffoldV1TemplateMetadata} - * @memberof ScaffoldV1TemplateListDataInner - */ - metadata: ScaffoldV1TemplateMetadata; - /** - * - * @type {object} - * @memberof ScaffoldV1TemplateListDataInner - */ - spec: object; + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof ScaffoldV1TemplateListDataInner + */ + readonly api_version?: ScaffoldV1TemplateListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof ScaffoldV1TemplateListDataInner + */ + readonly kind?: ScaffoldV1TemplateListDataInnerKindEnum; + /** + * + * @type {ScaffoldV1TemplateMetadata} + * @memberof ScaffoldV1TemplateListDataInner + */ + metadata: ScaffoldV1TemplateMetadata; + /** + * + * @type {object} + * @memberof ScaffoldV1TemplateListDataInner + */ + spec: object; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateListDataInnerApiVersionEnum { - ScaffoldV1 = 'scaffold/v1' + ScaffoldV1 = "scaffold/v1", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum ScaffoldV1TemplateListDataInnerKindEnum { - Template = 'Template' + Template = "Template", } - /** * Check if a given object implements the ScaffoldV1TemplateListDataInner interface. */ -export function instanceOfScaffoldV1TemplateListDataInner(value: object): value is ScaffoldV1TemplateListDataInner { - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateListDataInner( + value: object, +): value is ScaffoldV1TemplateListDataInner { + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } -export function ScaffoldV1TemplateListDataInnerFromJSON(json: any): ScaffoldV1TemplateListDataInner { - return ScaffoldV1TemplateListDataInnerFromJSONTyped(json, false); +export function ScaffoldV1TemplateListDataInnerFromJSON( + json: any, +): ScaffoldV1TemplateListDataInner { + return ScaffoldV1TemplateListDataInnerFromJSONTyped(json, false); } -export function ScaffoldV1TemplateListDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateListDataInner { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'] == null ? undefined : json['api_version'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'metadata': ScaffoldV1TemplateMetadataFromJSON(json['metadata']), - 'spec': json['spec'], - }; +export function ScaffoldV1TemplateListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: ScaffoldV1TemplateMetadataFromJSON(json["metadata"]), + spec: json["spec"], + }; } export function ScaffoldV1TemplateListDataInnerToJSON(json: any): ScaffoldV1TemplateListDataInner { - return ScaffoldV1TemplateListDataInnerToJSONTyped(json, false); + return ScaffoldV1TemplateListDataInnerToJSONTyped(json, false); } -export function ScaffoldV1TemplateListDataInnerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'metadata': ScaffoldV1TemplateMetadataToJSON(value['metadata']), - 'spec': value['spec'], - }; + return { + metadata: ScaffoldV1TemplateMetadataToJSON(value["metadata"]), + spec: value["spec"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts index 210d2d608f..3614b44b91 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateListMetadata.ts @@ -2,96 +2,101 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ScaffoldV1TemplateListMetadata */ export interface ScaffoldV1TemplateListMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - first?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - last?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - prev?: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateListMetadata - */ - next?: any | null; - /** - * Number of records in the full result set. This response may be paginated and have a smaller number of records. - * @type {number} - * @memberof ScaffoldV1TemplateListMetadata - */ - total_size?: number; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + prev?: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateListMetadata + */ + next?: any | null; + /** + * Number of records in the full result set. This response may be paginated and have a smaller number of records. + * @type {number} + * @memberof ScaffoldV1TemplateListMetadata + */ + total_size?: number; } /** * Check if a given object implements the ScaffoldV1TemplateListMetadata interface. */ -export function instanceOfScaffoldV1TemplateListMetadata(value: object): value is ScaffoldV1TemplateListMetadata { - return true; +export function instanceOfScaffoldV1TemplateListMetadata( + value: object, +): value is ScaffoldV1TemplateListMetadata { + return true; } export function ScaffoldV1TemplateListMetadataFromJSON(json: any): ScaffoldV1TemplateListMetadata { - return ScaffoldV1TemplateListMetadataFromJSONTyped(json, false); + return ScaffoldV1TemplateListMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateListMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateListMetadata { - if (json == null) { - return json; - } - return { - - 'first': json['first'] == null ? undefined : json['first'], - 'last': json['last'] == null ? undefined : json['last'], - 'prev': json['prev'] == null ? undefined : json['prev'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; +export function ScaffoldV1TemplateListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateListMetadata { + if (json == null) { + return json; + } + return { + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function ScaffoldV1TemplateListMetadataToJSON(json: any): ScaffoldV1TemplateListMetadata { - return ScaffoldV1TemplateListMetadataToJSONTyped(json, false); + return ScaffoldV1TemplateListMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateListMetadataToJSONTyped(value?: ScaffoldV1TemplateListMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateListMetadataToJSONTyped( + value?: ScaffoldV1TemplateListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'first': value['first'], - 'last': value['last'], - 'prev': value['prev'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + first: value["first"], + last: value["last"], + prev: value["prev"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts index b5a7783362..3d889667dd 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateMetadata.ts @@ -2,94 +2,99 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ScaffoldV1TemplateMetadata */ export interface ScaffoldV1TemplateMetadata { - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateMetadata - */ - self: any | null; - /** - * - * @type {any} - * @memberof ScaffoldV1TemplateMetadata - */ - resource_name?: any | null; - /** - * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateMetadata - */ - readonly created_at?: Date; - /** - * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateMetadata - */ - readonly updated_at?: Date; - /** - * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. - * @type {Date} - * @memberof ScaffoldV1TemplateMetadata - */ - readonly deleted_at?: Date; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateMetadata + */ + self: any | null; + /** + * + * @type {any} + * @memberof ScaffoldV1TemplateMetadata + */ + resource_name?: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateMetadata + */ + readonly created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateMetadata + */ + readonly updated_at?: Date; + /** + * The date and time at which this object was (or will be) deleted. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof ScaffoldV1TemplateMetadata + */ + readonly deleted_at?: Date; } /** * Check if a given object implements the ScaffoldV1TemplateMetadata interface. */ -export function instanceOfScaffoldV1TemplateMetadata(value: object): value is ScaffoldV1TemplateMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateMetadata( + value: object, +): value is ScaffoldV1TemplateMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function ScaffoldV1TemplateMetadataFromJSON(json: any): ScaffoldV1TemplateMetadata { - return ScaffoldV1TemplateMetadataFromJSONTyped(json, false); + return ScaffoldV1TemplateMetadataFromJSONTyped(json, false); } -export function ScaffoldV1TemplateMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), - 'deleted_at': json['deleted_at'] == null ? undefined : (new Date(json['deleted_at'])), - }; +export function ScaffoldV1TemplateMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + deleted_at: json["deleted_at"] == null ? undefined : new Date(json["deleted_at"]), + }; } export function ScaffoldV1TemplateMetadataToJSON(json: any): ScaffoldV1TemplateMetadata { - return ScaffoldV1TemplateMetadataToJSONTyped(json, false); + return ScaffoldV1TemplateMetadataToJSONTyped(json, false); } -export function ScaffoldV1TemplateMetadataToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateMetadataToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts index fa77efbcf3..d63c31f603 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateOption.ts @@ -2,146 +2,152 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * An option of a template. * @export * @interface ScaffoldV1TemplateOption */ export interface ScaffoldV1TemplateOption { - /** - * A few words that accurately and concisely represent the human readable form of the option's key. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - display_name: string; - /** - * 1-2 sentences that describe the option. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - description: string; - /** - * An optional description or example of the information required for a form field, typically rendered within the entry field of a form. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - hint?: string; - /** - * An optional format modifer that serves as a hint for UI presentation. If specified, the only allowed value at this time is `password` to hint the UI to mask the input. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - format?: string; - /** - * An optional regular expression pattern such that only values matched by this pattern will be accepted. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - pattern?: string; - /** - * An optional human-readable description of the pattern property; should be provided only if the pattern is provided. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - pattern_description?: string; - /** - * An optional attribute that specifies possible values for this option. - * @type {Array} - * @memberof ScaffoldV1TemplateOption - */ - _enum?: Array; - /** - * Initial value of the form field for this option. - * @type {string} - * @memberof ScaffoldV1TemplateOption - */ - initial_value?: string; - /** - * The minimum number of characters that must be provided for an option. - * @type {number} - * @memberof ScaffoldV1TemplateOption - */ - min_length?: number; - /** - * Examples of valid values for this option. - * @type {Array} - * @memberof ScaffoldV1TemplateOption - */ - examples?: Array; - /** - * An optional field that specifies the order of the template option in the UI. Template options with a lower order value should be displayed before template options with a higher order value. Template options with the same order value should be displayed in alphanumerical order. - * @type {number} - * @memberof ScaffoldV1TemplateOption - */ - order?: number; + /** + * A few words that accurately and concisely represent the human readable form of the option's key. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + display_name: string; + /** + * 1-2 sentences that describe the option. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + description: string; + /** + * An optional description or example of the information required for a form field, typically rendered within the entry field of a form. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + hint?: string; + /** + * An optional format modifer that serves as a hint for UI presentation. If specified, the only allowed value at this time is `password` to hint the UI to mask the input. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + format?: string; + /** + * An optional regular expression pattern such that only values matched by this pattern will be accepted. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + pattern?: string; + /** + * An optional human-readable description of the pattern property; should be provided only if the pattern is provided. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + pattern_description?: string; + /** + * An optional attribute that specifies possible values for this option. + * @type {Array} + * @memberof ScaffoldV1TemplateOption + */ + _enum?: Array; + /** + * Initial value of the form field for this option. + * @type {string} + * @memberof ScaffoldV1TemplateOption + */ + initial_value?: string; + /** + * The minimum number of characters that must be provided for an option. + * @type {number} + * @memberof ScaffoldV1TemplateOption + */ + min_length?: number; + /** + * Examples of valid values for this option. + * @type {Array} + * @memberof ScaffoldV1TemplateOption + */ + examples?: Array; + /** + * An optional field that specifies the order of the template option in the UI. Template options with a lower order value should be displayed before template options with a higher order value. Template options with the same order value should be displayed in alphanumerical order. + * @type {number} + * @memberof ScaffoldV1TemplateOption + */ + order?: number; } /** * Check if a given object implements the ScaffoldV1TemplateOption interface. */ -export function instanceOfScaffoldV1TemplateOption(value: object): value is ScaffoldV1TemplateOption { - if (!('display_name' in value) || value['display_name'] === undefined) return false; - if (!('description' in value) || value['description'] === undefined) return false; - return true; +export function instanceOfScaffoldV1TemplateOption( + value: object, +): value is ScaffoldV1TemplateOption { + if (!("display_name" in value) || value["display_name"] === undefined) return false; + if (!("description" in value) || value["description"] === undefined) return false; + return true; } export function ScaffoldV1TemplateOptionFromJSON(json: any): ScaffoldV1TemplateOption { - return ScaffoldV1TemplateOptionFromJSONTyped(json, false); + return ScaffoldV1TemplateOptionFromJSONTyped(json, false); } -export function ScaffoldV1TemplateOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateOption { - if (json == null) { - return json; - } - return { - - 'display_name': json['display_name'], - 'description': json['description'], - 'hint': json['hint'] == null ? undefined : json['hint'], - 'format': json['format'] == null ? undefined : json['format'], - 'pattern': json['pattern'] == null ? undefined : json['pattern'], - 'pattern_description': json['pattern_description'] == null ? undefined : json['pattern_description'], - '_enum': json['enum'] == null ? undefined : json['enum'], - 'initial_value': json['initial_value'] == null ? undefined : json['initial_value'], - 'min_length': json['min_length'] == null ? undefined : json['min_length'], - 'examples': json['examples'] == null ? undefined : json['examples'], - 'order': json['order'] == null ? undefined : json['order'], - }; +export function ScaffoldV1TemplateOptionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateOption { + if (json == null) { + return json; + } + return { + display_name: json["display_name"], + description: json["description"], + hint: json["hint"] == null ? undefined : json["hint"], + format: json["format"] == null ? undefined : json["format"], + pattern: json["pattern"] == null ? undefined : json["pattern"], + pattern_description: + json["pattern_description"] == null ? undefined : json["pattern_description"], + _enum: json["enum"] == null ? undefined : json["enum"], + initial_value: json["initial_value"] == null ? undefined : json["initial_value"], + min_length: json["min_length"] == null ? undefined : json["min_length"], + examples: json["examples"] == null ? undefined : json["examples"], + order: json["order"] == null ? undefined : json["order"], + }; } export function ScaffoldV1TemplateOptionToJSON(json: any): ScaffoldV1TemplateOption { - return ScaffoldV1TemplateOptionToJSONTyped(json, false); + return ScaffoldV1TemplateOptionToJSONTyped(json, false); } -export function ScaffoldV1TemplateOptionToJSONTyped(value?: ScaffoldV1TemplateOption | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateOptionToJSONTyped( + value?: ScaffoldV1TemplateOption | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'display_name': value['display_name'], - 'description': value['description'], - 'hint': value['hint'], - 'format': value['format'], - 'pattern': value['pattern'], - 'pattern_description': value['pattern_description'], - 'enum': value['_enum'], - 'initial_value': value['initial_value'], - 'min_length': value['min_length'], - 'examples': value['examples'], - 'order': value['order'], - }; + return { + display_name: value["display_name"], + description: value["description"], + hint: value["hint"], + format: value["format"], + pattern: value["pattern"], + pattern_description: value["pattern_description"], + enum: value["_enum"], + initial_value: value["initial_value"], + min_length: value["min_length"], + examples: value["examples"], + order: value["order"], + }; } - diff --git a/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts b/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts index 8732398bf5..7cea1e7233 100644 --- a/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts +++ b/src/clients/scaffoldingService/models/ScaffoldV1TemplateSpec.ts @@ -2,31 +2,31 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { GlobalObjectReference } from './GlobalObjectReference'; +import { mapValues } from "../runtime"; +import type { GlobalObjectReference } from "./GlobalObjectReference"; import { - GlobalObjectReferenceFromJSON, - GlobalObjectReferenceFromJSONTyped, - GlobalObjectReferenceToJSON, - GlobalObjectReferenceToJSONTyped, -} from './GlobalObjectReference'; -import type { ScaffoldV1TemplateOption } from './ScaffoldV1TemplateOption'; + GlobalObjectReferenceFromJSON, + GlobalObjectReferenceFromJSONTyped, + GlobalObjectReferenceToJSON, + GlobalObjectReferenceToJSONTyped, +} from "./GlobalObjectReference"; +import type { ScaffoldV1TemplateOption } from "./ScaffoldV1TemplateOption"; import { - ScaffoldV1TemplateOptionFromJSON, - ScaffoldV1TemplateOptionFromJSONTyped, - ScaffoldV1TemplateOptionToJSON, - ScaffoldV1TemplateOptionToJSONTyped, -} from './ScaffoldV1TemplateOption'; + ScaffoldV1TemplateOptionFromJSON, + ScaffoldV1TemplateOptionFromJSONTyped, + ScaffoldV1TemplateOptionToJSON, + ScaffoldV1TemplateOptionToJSONTyped, +} from "./ScaffoldV1TemplateOption"; /** * The desired state of the Template @@ -34,103 +34,115 @@ import { * @interface ScaffoldV1TemplateSpec */ export interface ScaffoldV1TemplateSpec { - /** - * The name of the template. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - name?: string; - /** - * The display name of the template. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - display_name?: string; - /** - * The description of the template. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - description?: string; - /** - * The semantic version of the template, of the form ... Bump the version with each non-trivial change. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - version?: string; - /** - * The primary programming language that projects generated from the template will use. - * @type {string} - * @memberof ScaffoldV1TemplateSpec - */ - language?: string; - /** - * Tags are keywords or very short phrases (1-3 words) that apply to the template and that help with search and organization. Use lowercase characters and numbers in each word, and separate words with a space. - * @type {Array} - * @memberof ScaffoldV1TemplateSpec - */ - tags?: Array; - /** - * Options of the template. - * @type {{ [key: string]: ScaffoldV1TemplateOption; }} - * @memberof ScaffoldV1TemplateSpec - */ - options?: { [key: string]: ScaffoldV1TemplateOption; }; - /** - * The template_collection to which this belongs. - * @type {GlobalObjectReference} - * @memberof ScaffoldV1TemplateSpec - */ - template_collection?: GlobalObjectReference; + /** + * The name of the template. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + name?: string; + /** + * The display name of the template. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + display_name?: string; + /** + * The description of the template. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + description?: string; + /** + * The semantic version of the template, of the form ... Bump the version with each non-trivial change. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + version?: string; + /** + * The primary programming language that projects generated from the template will use. + * @type {string} + * @memberof ScaffoldV1TemplateSpec + */ + language?: string; + /** + * Tags are keywords or very short phrases (1-3 words) that apply to the template and that help with search and organization. Use lowercase characters and numbers in each word, and separate words with a space. + * @type {Array} + * @memberof ScaffoldV1TemplateSpec + */ + tags?: Array; + /** + * Options of the template. + * @type {{ [key: string]: ScaffoldV1TemplateOption; }} + * @memberof ScaffoldV1TemplateSpec + */ + options?: { [key: string]: ScaffoldV1TemplateOption }; + /** + * The template_collection to which this belongs. + * @type {GlobalObjectReference} + * @memberof ScaffoldV1TemplateSpec + */ + template_collection?: GlobalObjectReference; } /** * Check if a given object implements the ScaffoldV1TemplateSpec interface. */ export function instanceOfScaffoldV1TemplateSpec(value: object): value is ScaffoldV1TemplateSpec { - return true; + return true; } export function ScaffoldV1TemplateSpecFromJSON(json: any): ScaffoldV1TemplateSpec { - return ScaffoldV1TemplateSpecFromJSONTyped(json, false); + return ScaffoldV1TemplateSpecFromJSONTyped(json, false); } -export function ScaffoldV1TemplateSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScaffoldV1TemplateSpec { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'display_name': json['display_name'] == null ? undefined : json['display_name'], - 'description': json['description'] == null ? undefined : json['description'], - 'version': json['version'] == null ? undefined : json['version'], - 'language': json['language'] == null ? undefined : json['language'], - 'tags': json['tags'] == null ? undefined : json['tags'], - 'options': json['options'] == null ? undefined : (mapValues(json['options'], ScaffoldV1TemplateOptionFromJSON)), - 'template_collection': json['template_collection'] == null ? undefined : GlobalObjectReferenceFromJSON(json['template_collection']), - }; +export function ScaffoldV1TemplateSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScaffoldV1TemplateSpec { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + display_name: json["display_name"] == null ? undefined : json["display_name"], + description: json["description"] == null ? undefined : json["description"], + version: json["version"] == null ? undefined : json["version"], + language: json["language"] == null ? undefined : json["language"], + tags: json["tags"] == null ? undefined : json["tags"], + options: + json["options"] == null + ? undefined + : mapValues(json["options"], ScaffoldV1TemplateOptionFromJSON), + template_collection: + json["template_collection"] == null + ? undefined + : GlobalObjectReferenceFromJSON(json["template_collection"]), + }; } export function ScaffoldV1TemplateSpecToJSON(json: any): ScaffoldV1TemplateSpec { - return ScaffoldV1TemplateSpecToJSONTyped(json, false); + return ScaffoldV1TemplateSpecToJSONTyped(json, false); } -export function ScaffoldV1TemplateSpecToJSONTyped(value?: ScaffoldV1TemplateSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScaffoldV1TemplateSpecToJSONTyped( + value?: ScaffoldV1TemplateSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'display_name': value['display_name'], - 'description': value['description'], - 'version': value['version'], - 'language': value['language'], - 'tags': value['tags'], - 'options': value['options'] == null ? undefined : (mapValues(value['options'], ScaffoldV1TemplateOptionToJSON)), - 'template_collection': GlobalObjectReferenceToJSON(value['template_collection']), - }; + return { + name: value["name"], + display_name: value["display_name"], + description: value["description"], + version: value["version"], + language: value["language"], + tags: value["tags"], + options: + value["options"] == null + ? undefined + : mapValues(value["options"], ScaffoldV1TemplateOptionToJSON), + template_collection: GlobalObjectReferenceToJSON(value["template_collection"]), + }; } - diff --git a/src/clients/scaffoldingService/models/index.ts b/src/clients/scaffoldingService/models/index.ts index 8dcde81a76..0ee2076375 100644 --- a/src/clients/scaffoldingService/models/index.ts +++ b/src/clients/scaffoldingService/models/index.ts @@ -1,25 +1,25 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ApplyScaffoldV1TemplateRequest'; -export * from './ErrorSource'; -export * from './Failure'; -export * from './GetScaffoldV1Template200Response'; -export * from './GetScaffoldV1TemplateCollection200Response'; -export * from './GlobalObjectReference'; -export * from './ListMeta'; -export * from './ModelError'; -export * from './ObjectMeta'; -export * from './ObjectReference'; -export * from './ScaffoldV1Template'; -export * from './ScaffoldV1TemplateCollection'; -export * from './ScaffoldV1TemplateCollectionList'; -export * from './ScaffoldV1TemplateCollectionListDataInner'; -export * from './ScaffoldV1TemplateCollectionListMetadata'; -export * from './ScaffoldV1TemplateCollectionMetadata'; -export * from './ScaffoldV1TemplateCollectionSpec'; -export * from './ScaffoldV1TemplateList'; -export * from './ScaffoldV1TemplateListDataInner'; -export * from './ScaffoldV1TemplateListMetadata'; -export * from './ScaffoldV1TemplateMetadata'; -export * from './ScaffoldV1TemplateOption'; -export * from './ScaffoldV1TemplateSpec'; +export * from "./ApplyScaffoldV1TemplateRequest"; +export * from "./ErrorSource"; +export * from "./Failure"; +export * from "./GetScaffoldV1Template200Response"; +export * from "./GetScaffoldV1TemplateCollection200Response"; +export * from "./GlobalObjectReference"; +export * from "./ListMeta"; +export * from "./ModelError"; +export * from "./ObjectMeta"; +export * from "./ObjectReference"; +export * from "./ScaffoldV1Template"; +export * from "./ScaffoldV1TemplateCollection"; +export * from "./ScaffoldV1TemplateCollectionList"; +export * from "./ScaffoldV1TemplateCollectionListDataInner"; +export * from "./ScaffoldV1TemplateCollectionListMetadata"; +export * from "./ScaffoldV1TemplateCollectionMetadata"; +export * from "./ScaffoldV1TemplateCollectionSpec"; +export * from "./ScaffoldV1TemplateList"; +export * from "./ScaffoldV1TemplateListDataInner"; +export * from "./ScaffoldV1TemplateListMetadata"; +export * from "./ScaffoldV1TemplateMetadata"; +export * from "./ScaffoldV1TemplateOption"; +export * from "./ScaffoldV1TemplateSpec"; diff --git a/src/clients/scaffoldingService/runtime.ts b/src/clients/scaffoldingService/runtime.ts index 23f76aec2c..aa992e30d8 100644 --- a/src/clients/scaffoldingService/runtime.ts +++ b/src/clients/scaffoldingService/runtime.ts @@ -2,86 +2,88 @@ /* eslint-disable */ /** * Scaffolding API - * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. + * The Scaffolding Service exposes collections of templates that can be applied to generate application projects. * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://api.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts b/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts index 27274cfbec..c84a81f8b3 100644 --- a/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/CompatibilityV1Api.ts @@ -5,166 +5,204 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { CompatibilityCheckResponse, ErrorMessage, RegisterSchemaRequest, -} from '../models/index'; +} from "../models/index"; import { - CompatibilityCheckResponseFromJSON, - CompatibilityCheckResponseToJSON, - ErrorMessageFromJSON, - ErrorMessageToJSON, - RegisterSchemaRequestFromJSON, - RegisterSchemaRequestToJSON, -} from '../models/index'; + CompatibilityCheckResponseFromJSON, + CompatibilityCheckResponseToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, + RegisterSchemaRequestFromJSON, + RegisterSchemaRequestToJSON, +} from "../models/index"; export interface TestCompatibilityBySubjectNameRequest { - subject: string; - version: string; - RegisterSchemaRequest: RegisterSchemaRequest; - verbose?: boolean; + subject: string; + version: string; + RegisterSchemaRequest: RegisterSchemaRequest; + verbose?: boolean; } export interface TestCompatibilityForSubjectRequest { - subject: string; - RegisterSchemaRequest: RegisterSchemaRequest; - verbose?: boolean; + subject: string; + RegisterSchemaRequest: RegisterSchemaRequest; + verbose?: boolean; } /** - * + * */ export class CompatibilityV1Api extends runtime.BaseAPI { + /** + * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against a particular schema subject-version + */ + async testCompatibilityBySubjectNameRaw( + requestParameters: TestCompatibilityBySubjectNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling testCompatibilityBySubjectName().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling testCompatibilityBySubjectName().', + ); + } + + if (requestParameters["RegisterSchemaRequest"] == null) { + throw new runtime.RequiredError( + "RegisterSchemaRequest", + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityBySubjectName().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["verbose"] != null) { + queryParameters["verbose"] = requestParameters["verbose"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } - /** - * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against a particular schema subject-version - */ - async testCompatibilityBySubjectNameRaw(requestParameters: TestCompatibilityBySubjectNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling testCompatibilityBySubjectName().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling testCompatibilityBySubjectName().' - ); - } - - if (requestParameters['RegisterSchemaRequest'] == null) { - throw new runtime.RequiredError( - 'RegisterSchemaRequest', - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityBySubjectName().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['verbose'] != null) { - queryParameters['verbose'] = requestParameters['verbose']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/compatibility/subjects/{subject}/versions/{version}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompatibilityCheckResponseFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/compatibility/subjects/{subject}/versions/{version}` + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CompatibilityCheckResponseFromJSON(jsonValue), + ); + } + + /** + * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against a particular schema subject-version + */ + async testCompatibilityBySubjectName( + requestParameters: TestCompatibilityBySubjectNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.testCompatibilityBySubjectNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against all schemas under a subject + */ + async testCompatibilityForSubjectRaw( + requestParameters: TestCompatibilityForSubjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling testCompatibilityForSubject().', + ); } - /** - * Test input schema against a particular version of a subject\'s schema for compatibility. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against a particular schema subject-version - */ - async testCompatibilityBySubjectName(requestParameters: TestCompatibilityBySubjectNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.testCompatibilityBySubjectNameRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["RegisterSchemaRequest"] == null) { + throw new runtime.RequiredError( + "RegisterSchemaRequest", + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityForSubject().', + ); } - /** - * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against all schemas under a subject - */ - async testCompatibilityForSubjectRaw(requestParameters: TestCompatibilityForSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling testCompatibilityForSubject().' - ); - } - - if (requestParameters['RegisterSchemaRequest'] == null) { - throw new runtime.RequiredError( - 'RegisterSchemaRequest', - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling testCompatibilityForSubject().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['verbose'] != null) { - queryParameters['verbose'] = requestParameters['verbose']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/compatibility/subjects/{subject}/versions`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompatibilityCheckResponseFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["verbose"] != null) { + queryParameters["verbose"] = requestParameters["verbose"]; } - /** - * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). - * Test schema compatibility against all schemas under a subject - */ - async testCompatibilityForSubject(requestParameters: TestCompatibilityForSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.testCompatibilityForSubjectRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/compatibility/subjects/{subject}/versions`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CompatibilityCheckResponseFromJSON(jsonValue), + ); + } + + /** + * Test input schema against a subject\'s schemas for compatibility, based on the configured compatibility level of the subject. In other words, it will perform the same compatibility check as register for that subject. The compatibility level applied for the check is the configured compatibility level for the subject (http:get:: /config/(string: subject)). If this subject\'s compatibility level was never changed, then the global compatibility level applies (http:get:: /config). + * Test schema compatibility against all schemas under a subject + */ + async testCompatibilityForSubject( + requestParameters: TestCompatibilityForSubjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.testCompatibilityForSubjectRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts b/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts index bbb51ecf75..312cbe271c 100644 --- a/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ConfigV1Api.ts @@ -5,358 +5,469 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ClusterConfig, - Config, - ConfigUpdateRequest, - ErrorMessage, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ClusterConfig, Config, ConfigUpdateRequest, ErrorMessage } from "../models/index"; import { - ClusterConfigFromJSON, - ClusterConfigToJSON, - ConfigFromJSON, - ConfigToJSON, - ConfigUpdateRequestFromJSON, - ConfigUpdateRequestToJSON, - ErrorMessageFromJSON, - ErrorMessageToJSON, -} from '../models/index'; + ClusterConfigFromJSON, + ClusterConfigToJSON, + ConfigFromJSON, + ConfigToJSON, + ConfigUpdateRequestFromJSON, + ConfigUpdateRequestToJSON, + ErrorMessageFromJSON, + ErrorMessageToJSON, +} from "../models/index"; export interface DeleteSubjectConfigRequest { - subject: string; + subject: string; } export interface GetSubjectLevelConfigRequest { - subject: string; - defaultToGlobal?: boolean; + subject: string; + defaultToGlobal?: boolean; } export interface UpdateSubjectLevelConfigRequest { - subject: string; - ConfigUpdateRequest: ConfigUpdateRequest; + subject: string; + ConfigUpdateRequest: ConfigUpdateRequest; } export interface UpdateTopLevelConfigRequest { - ConfigUpdateRequest: ConfigUpdateRequest; + ConfigUpdateRequest: ConfigUpdateRequest; } /** - * + * */ export class ConfigV1Api extends runtime.BaseAPI { - - /** - * Deletes the specified subject-level compatibility level config and reverts to the global default. - * Delete subject compatibility level - */ - async deleteSubjectConfigRaw(requestParameters: DeleteSubjectConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling deleteSubjectConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/config/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + /** + * Deletes the specified subject-level compatibility level config and reverts to the global default. + * Delete subject compatibility level + */ + async deleteSubjectConfigRaw( + requestParameters: DeleteSubjectConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling deleteSubjectConfig().', + ); } - /** - * Deletes the specified subject-level compatibility level config and reverts to the global default. - * Delete subject compatibility level - */ - async deleteSubjectConfig(requestParameters: DeleteSubjectConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteSubjectConfigRaw(requestParameters, initOverrides); - return await response.value(); - } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Deletes the global compatibility level config and reverts to the default. - * Delete global compatibility level - */ - async deleteTopLevelConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/config`, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Deletes the global compatibility level config and reverts to the default. - * Delete global compatibility level - */ - async deleteTopLevelConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteTopLevelConfigRaw(initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/config/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Deletes the specified subject-level compatibility level config and reverts to the global default. + * Delete subject compatibility level + */ + async deleteSubjectConfig( + requestParameters: DeleteSubjectConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.deleteSubjectConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes the global compatibility level config and reverts to the default. + * Delete global compatibility level + */ + async deleteTopLevelConfigRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves cluster config information. - * Get cluster config - */ - async getClusterConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/clusterconfig`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/config`, + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Deletes the global compatibility level config and reverts to the default. + * Delete global compatibility level + */ + async deleteTopLevelConfig( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.deleteTopLevelConfigRaw(initOverrides); + return await response.value(); + } + + /** + * Retrieves cluster config information. + * Get cluster config + */ + async getClusterConfigRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves cluster config information. - * Get cluster config - */ - async getClusterConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getClusterConfigRaw(initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/clusterconfig`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ClusterConfigFromJSON(jsonValue)); + } + + /** + * Retrieves cluster config information. + * Get cluster config + */ + async getClusterConfig( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getClusterConfigRaw(initOverrides); + return await response.value(); + } + + /** + * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. + * Get subject compatibility level + */ + async getSubjectLevelConfigRaw( + requestParameters: GetSubjectLevelConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getSubjectLevelConfig().', + ); } - /** - * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. - * Get subject compatibility level - */ - async getSubjectLevelConfigRaw(requestParameters: GetSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getSubjectLevelConfig().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['defaultToGlobal'] != null) { - queryParameters['defaultToGlobal'] = requestParameters['defaultToGlobal']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/config/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + const queryParameters: any = {}; + + if (requestParameters["defaultToGlobal"] != null) { + queryParameters["defaultToGlobal"] = requestParameters["defaultToGlobal"]; } - /** - * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. - * Get subject compatibility level - */ - async getSubjectLevelConfig(requestParameters: GetSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSubjectLevelConfigRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. - * Get global compatibility level - */ - async getTopLevelConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/config`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/config/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + } + + /** + * Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. + * Get subject compatibility level + */ + async getSubjectLevelConfig( + requestParameters: GetSubjectLevelConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSubjectLevelConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. + * Get global compatibility level + */ + async getTopLevelConfigRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. - * Get global compatibility level - */ - async getTopLevelConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTopLevelConfigRaw(initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/config`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConfigFromJSON(jsonValue)); + } + + /** + * Retrieves the global compatibility level, compatibility group, normalization, default metadata, and rule set. + * Get global compatibility level + */ + async getTopLevelConfig( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTopLevelConfigRaw(initOverrides); + return await response.value(); + } + + /** + * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. + * Update subject compatibility level + */ + async updateSubjectLevelConfigRaw( + requestParameters: UpdateSubjectLevelConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling updateSubjectLevelConfig().', + ); } - /** - * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. - * Update subject compatibility level - */ - async updateSubjectLevelConfigRaw(requestParameters: UpdateSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling updateSubjectLevelConfig().' - ); - } - - if (requestParameters['ConfigUpdateRequest'] == null) { - throw new runtime.RequiredError( - 'ConfigUpdateRequest', - 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateSubjectLevelConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/config/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ConfigUpdateRequestToJSON(requestParameters['ConfigUpdateRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigUpdateRequestFromJSON(jsonValue)); + if (requestParameters["ConfigUpdateRequest"] == null) { + throw new runtime.RequiredError( + "ConfigUpdateRequest", + 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateSubjectLevelConfig().', + ); } - /** - * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. - * Update subject compatibility level - */ - async updateSubjectLevelConfig(requestParameters: UpdateSubjectLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateSubjectLevelConfigRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. - * Update global compatibility level - */ - async updateTopLevelConfigRaw(requestParameters: UpdateTopLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['ConfigUpdateRequest'] == null) { - throw new runtime.RequiredError( - 'ConfigUpdateRequest', - 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateTopLevelConfig().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/config`, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ConfigUpdateRequestToJSON(requestParameters['ConfigUpdateRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConfigUpdateRequestFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/config/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ConfigUpdateRequestToJSON(requestParameters["ConfigUpdateRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConfigUpdateRequestFromJSON(jsonValue), + ); + } + + /** + * Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. + * Update subject compatibility level + */ + async updateSubjectLevelConfig( + requestParameters: UpdateSubjectLevelConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateSubjectLevelConfigRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. + * Update global compatibility level + */ + async updateTopLevelConfigRaw( + requestParameters: UpdateTopLevelConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["ConfigUpdateRequest"] == null) { + throw new runtime.RequiredError( + "ConfigUpdateRequest", + 'Required parameter "ConfigUpdateRequest" was null or undefined when calling updateTopLevelConfig().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. - * Update global compatibility level - */ - async updateTopLevelConfig(requestParameters: UpdateTopLevelConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateTopLevelConfigRaw(requestParameters, initOverrides); - return await response.value(); + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/config`, + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ConfigUpdateRequestToJSON(requestParameters["ConfigUpdateRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ConfigUpdateRequestFromJSON(jsonValue), + ); + } + + /** + * Updates the global compatibility level, compatibility group, schema normalization, default metadata, and rule set. On success, echoes the original request back to the client. + * Update global compatibility level + */ + async updateTopLevelConfig( + requestParameters: UpdateTopLevelConfigRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateTopLevelConfigRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts b/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts index cb91caa794..0a76fc45ee 100644 --- a/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ContextsV1Api.ts @@ -5,62 +5,68 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorMessage, -} from '../models/index'; -import { - ErrorMessageFromJSON, - ErrorMessageToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorMessage } from "../models/index"; +import { ErrorMessageFromJSON, ErrorMessageToJSON } from "../models/index"; /** - * + * */ export class ContextsV1Api extends runtime.BaseAPI { + /** + * Retrieves a list of contexts. + * List contexts + */ + async listContextsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; - /** - * Retrieves a list of contexts. - * List contexts - */ - async listContextsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/contexts`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves a list of contexts. - * List contexts - */ - async listContexts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.listContextsRaw(initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/contexts`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + /** + * Retrieves a list of contexts. + * List contexts + */ + async listContexts( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.listContextsRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts b/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts index 82ad950a9b..2dca6b2d11 100644 --- a/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/DataEncryptionKeysV1Api.ts @@ -5,650 +5,811 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - CreateDekRequest, - Dek, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { CreateDekRequest, Dek } from "../models/index"; import { - CreateDekRequestFromJSON, - CreateDekRequestToJSON, - DekFromJSON, - DekToJSON, -} from '../models/index'; + CreateDekRequestFromJSON, + CreateDekRequestToJSON, + DekFromJSON, + DekToJSON, +} from "../models/index"; export interface CreateDekOperationRequest { - name: string; - CreateDekRequest: CreateDekRequest; + name: string; + CreateDekRequest: CreateDekRequest; } export interface DeleteDekVersionRequest { - name: string; - subject: string; - version: string; - algorithm?: DeleteDekVersionAlgorithmEnum; - permanent?: boolean; + name: string; + subject: string; + version: string; + algorithm?: DeleteDekVersionAlgorithmEnum; + permanent?: boolean; } export interface DeleteDekVersionsRequest { - name: string; - subject: string; - algorithm?: DeleteDekVersionsAlgorithmEnum; - permanent?: boolean; + name: string; + subject: string; + algorithm?: DeleteDekVersionsAlgorithmEnum; + permanent?: boolean; } export interface GetDekRequest { - name: string; - subject: string; - algorithm?: GetDekAlgorithmEnum; - deleted?: boolean; + name: string; + subject: string; + algorithm?: GetDekAlgorithmEnum; + deleted?: boolean; } export interface GetDekByVersionRequest { - name: string; - subject: string; - version: string; - algorithm?: GetDekByVersionAlgorithmEnum; - deleted?: boolean; + name: string; + subject: string; + version: string; + algorithm?: GetDekByVersionAlgorithmEnum; + deleted?: boolean; } export interface GetDekSubjectsRequest { - name: string; - deleted?: boolean; + name: string; + deleted?: boolean; } export interface GetDekVersionsRequest { - name: string; - subject: string; - algorithm?: GetDekVersionsAlgorithmEnum; - deleted?: boolean; + name: string; + subject: string; + algorithm?: GetDekVersionsAlgorithmEnum; + deleted?: boolean; } export interface UndeleteDekVersionRequest { - name: string; - subject: string; - version: string; - algorithm?: UndeleteDekVersionAlgorithmEnum; + name: string; + subject: string; + version: string; + algorithm?: UndeleteDekVersionAlgorithmEnum; } export interface UndeleteDekVersionsRequest { - name: string; - subject: string; - algorithm?: UndeleteDekVersionsAlgorithmEnum; + name: string; + subject: string; + algorithm?: UndeleteDekVersionsAlgorithmEnum; } /** - * + * */ export class DataEncryptionKeysV1Api extends runtime.BaseAPI { + /** + * Create a dek + */ + async createDekRaw( + requestParameters: CreateDekOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling createDek().', + ); + } + + if (requestParameters["CreateDekRequest"] == null) { + throw new runtime.RequiredError( + "CreateDekRequest", + 'Required parameter "CreateDekRequest" was null or undefined when calling createDek().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateDekRequestToJSON(requestParameters["CreateDekRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); + } + + /** + * Create a dek + */ + async createDek( + requestParameters: CreateDekOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createDekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a dek version + */ + async deleteDekVersionRaw( + requestParameters: DeleteDekVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteDekVersion().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling deleteDekVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling deleteDekVersion().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; + } + + if (requestParameters["permanent"] != null) { + queryParameters["permanent"] = requestParameters["permanent"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a dek version + */ + async deleteDekVersion( + requestParameters: DeleteDekVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteDekVersionRaw(requestParameters, initOverrides); + } + + /** + * Delete all versions of a dek + */ + async deleteDekVersionsRaw( + requestParameters: DeleteDekVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteDekVersions().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling deleteDekVersions().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; + } + + if (requestParameters["permanent"] != null) { + queryParameters["permanent"] = requestParameters["permanent"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete all versions of a dek + */ + async deleteDekVersions( + requestParameters: DeleteDekVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteDekVersionsRaw(requestParameters, initOverrides); + } + + /** + * Get a dek by subject + */ + async getDekRaw( + requestParameters: GetDekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getDek().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getDek().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; + } + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); + } + + /** + * Get a dek by subject + */ + async getDek( + requestParameters: GetDekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getDekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a dek by subject and version + */ + async getDekByVersionRaw( + requestParameters: GetDekByVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getDekByVersion().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getDekByVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling getDekByVersion().', + ); + } + + const queryParameters: any = {}; - /** - * Create a dek - */ - async createDekRaw(requestParameters: CreateDekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling createDek().' - ); - } - - if (requestParameters['CreateDekRequest'] == null) { - throw new runtime.RequiredError( - 'CreateDekRequest', - 'Required parameter "CreateDekRequest" was null or undefined when calling createDek().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateDekRequestToJSON(requestParameters['CreateDekRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); - } - - /** - * Create a dek - */ - async createDek(requestParameters: CreateDekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createDekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Delete a dek version - */ - async deleteDekVersionRaw(requestParameters: DeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteDekVersion().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling deleteDekVersion().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling deleteDekVersion().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - if (requestParameters['permanent'] != null) { - queryParameters['permanent'] = requestParameters['permanent']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete a dek version - */ - async deleteDekVersion(requestParameters: DeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteDekVersionRaw(requestParameters, initOverrides); - } - - /** - * Delete all versions of a dek - */ - async deleteDekVersionsRaw(requestParameters: DeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteDekVersions().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling deleteDekVersions().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - if (requestParameters['permanent'] != null) { - queryParameters['permanent'] = requestParameters['permanent']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Delete all versions of a dek - */ - async deleteDekVersions(requestParameters: DeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteDekVersionsRaw(requestParameters, initOverrides); - } - - /** - * Get a dek by subject - */ - async getDekRaw(requestParameters: GetDekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getDek().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getDek().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); - } - - /** - * Get a dek by subject - */ - async getDek(requestParameters: GetDekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDekRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get a dek by subject and version - */ - async getDekByVersionRaw(requestParameters: GetDekByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getDekByVersion().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getDekByVersion().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling getDekByVersion().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); - } - - /** - * Get a dek by subject and version - */ - async getDekByVersion(requestParameters: GetDekByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDekByVersionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Get a list of dek subjects - */ - async getDekSubjectsRaw(requestParameters: GetDekSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getDekSubjects().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Get a list of dek subjects - */ - async getDekSubjects(requestParameters: GetDekSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getDekSubjectsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * List versions of dek - */ - async getDekVersionsRaw(requestParameters: GetDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getDekVersions().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getDekVersions().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * List versions of dek - */ - async getDekVersions(requestParameters: GetDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getDekVersionsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Undelete a dek version - */ - async undeleteDekVersionRaw(requestParameters: UndeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling undeleteDekVersion().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling undeleteDekVersion().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling undeleteDekVersion().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}/undelete`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Undelete a dek version - */ - async undeleteDekVersion(requestParameters: UndeleteDekVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.undeleteDekVersionRaw(requestParameters, initOverrides); - } - - /** - * Undelete all versions of a dek - */ - async undeleteDekVersionsRaw(requestParameters: UndeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling undeleteDekVersions().' - ); - } - - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling undeleteDekVersions().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['algorithm'] != null) { - queryParameters['algorithm'] = requestParameters['algorithm']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/deks/{subject}/undelete`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))).replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Undelete all versions of a dek - */ - async undeleteDekVersions(requestParameters: UndeleteDekVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.undeleteDekVersionsRaw(requestParameters, initOverrides); + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; } + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => DekFromJSON(jsonValue)); + } + + /** + * Get a dek by subject and version + */ + async getDekByVersion( + requestParameters: GetDekByVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getDekByVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of dek subjects + */ + async getDekSubjectsRaw( + requestParameters: GetDekSubjectsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getDekSubjects().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get a list of dek subjects + */ + async getDekSubjects( + requestParameters: GetDekSubjectsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getDekSubjectsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List versions of dek + */ + async getDekVersionsRaw( + requestParameters: GetDekVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getDekVersions().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getDekVersions().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; + } + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * List versions of dek + */ + async getDekVersions( + requestParameters: GetDekVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getDekVersionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Undelete a dek version + */ + async undeleteDekVersionRaw( + requestParameters: UndeleteDekVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling undeleteDekVersion().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling undeleteDekVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling undeleteDekVersion().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}/versions/{version}/undelete` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Undelete a dek version + */ + async undeleteDekVersion( + requestParameters: UndeleteDekVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.undeleteDekVersionRaw(requestParameters, initOverrides); + } + + /** + * Undelete all versions of a dek + */ + async undeleteDekVersionsRaw( + requestParameters: UndeleteDekVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling undeleteDekVersions().', + ); + } + + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling undeleteDekVersions().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["algorithm"] != null) { + queryParameters["algorithm"] = requestParameters["algorithm"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/deks/{subject}/undelete` + .replace(`{${"name"}}`, encodeURIComponent(String(requestParameters["name"]))) + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Undelete all versions of a dek + */ + async undeleteDekVersions( + requestParameters: UndeleteDekVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.undeleteDekVersionsRaw(requestParameters, initOverrides); + } } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum DeleteDekVersionAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum DeleteDekVersionsAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum GetDekAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum GetDekByVersionAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum GetDekVersionsAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum UndeleteDekVersionAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } /** - * @export - * @enum {string} - */ + * @export + * @enum {string} + */ export enum UndeleteDekVersionsAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } diff --git a/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts b/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts index 28857fd734..22dd24fa25 100644 --- a/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ExportersV1Api.ts @@ -5,15 +5,14 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorMessage, ExporterConfigResponse, @@ -21,555 +20,772 @@ import type { ExporterResponse, ExporterStatusResponse, ExporterUpdateRequest, -} from '../models/index'; +} from "../models/index"; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - ExporterConfigResponseFromJSON, - ExporterConfigResponseToJSON, - ExporterReferenceFromJSON, - ExporterReferenceToJSON, - ExporterResponseFromJSON, - ExporterResponseToJSON, - ExporterStatusResponseFromJSON, - ExporterStatusResponseToJSON, - ExporterUpdateRequestFromJSON, - ExporterUpdateRequestToJSON, -} from '../models/index'; + ErrorMessageFromJSON, + ErrorMessageToJSON, + ExporterConfigResponseFromJSON, + ExporterConfigResponseToJSON, + ExporterReferenceFromJSON, + ExporterReferenceToJSON, + ExporterResponseFromJSON, + ExporterResponseToJSON, + ExporterStatusResponseFromJSON, + ExporterStatusResponseToJSON, + ExporterUpdateRequestFromJSON, + ExporterUpdateRequestToJSON, +} from "../models/index"; export interface DeleteExporterRequest { - name: string; + name: string; } export interface GetExporterConfigByNameRequest { - name: string; + name: string; } export interface GetExporterInfoByNameRequest { - name: string; + name: string; } export interface GetExporterStatusByNameRequest { - name: string; + name: string; } export interface PauseExporterByNameRequest { - name: string; + name: string; } export interface RegisterExporterRequest { - ExporterReference: ExporterReference; + ExporterReference: ExporterReference; } export interface ResetExporterByNameRequest { - name: string; + name: string; } export interface ResumeExporterByNameRequest { - name: string; + name: string; } export interface UpdateExporterConfigByNameRequest { - name: string; - ExporterConfigResponse: ExporterConfigResponse; + name: string; + ExporterConfigResponse: ExporterConfigResponse; } export interface UpdateExporterInfoRequest { - name: string; - ExporterUpdateRequest: ExporterUpdateRequest; + name: string; + ExporterUpdateRequest: ExporterUpdateRequest; } /** - * + * */ export class ExportersV1Api extends runtime.BaseAPI { + /** + * Deletes the schema exporter. + * Delete schema exporter by name + */ + async deleteExporterRaw( + requestParameters: DeleteExporterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteExporter().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Deletes the schema exporter. + * Delete schema exporter by name + */ + async deleteExporter( + requestParameters: DeleteExporterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteExporterRaw(requestParameters, initOverrides); + } + + /** + * Retrieves the config of the schema exporter. + * Gets schema exporter config by name + */ + async getExporterConfigByNameRaw( + requestParameters: GetExporterConfigByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getExporterConfigByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}/config`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterConfigResponseFromJSON(jsonValue), + ); + } + + /** + * Retrieves the config of the schema exporter. + * Gets schema exporter config by name + */ + async getExporterConfigByName( + requestParameters: GetExporterConfigByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getExporterConfigByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the information of the schema exporter. + * Gets schema exporter by name + */ + async getExporterInfoByNameRaw( + requestParameters: GetExporterInfoByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getExporterInfoByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterReferenceFromJSON(jsonValue), + ); + } + + /** + * Retrieves the information of the schema exporter. + * Gets schema exporter by name + */ + async getExporterInfoByName( + requestParameters: GetExporterInfoByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getExporterInfoByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the status of the schema exporter. + * Gets schema exporter status by name + */ + async getExporterStatusByNameRaw( + requestParameters: GetExporterStatusByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getExporterStatusByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}/status`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterStatusResponseFromJSON(jsonValue), + ); + } + + /** + * Retrieves the status of the schema exporter. + * Gets schema exporter status by name + */ + async getExporterStatusByName( + requestParameters: GetExporterStatusByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getExporterStatusByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of schema exporters that have been created. + * Gets all schema exporters + */ + async listExportersRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves a list of schema exporters that have been created. + * Gets all schema exporters + */ + async listExporters( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.listExportersRaw(initOverrides); + return await response.value(); + } + + /** + * Pauses the state of the schema exporter. + * Pause schema exporter by name + */ + async pauseExporterByNameRaw( + requestParameters: PauseExporterByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling pauseExporterByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}/pause`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterResponseFromJSON(jsonValue), + ); + } + + /** + * Pauses the state of the schema exporter. + * Pause schema exporter by name + */ + async pauseExporterByName( + requestParameters: PauseExporterByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.pauseExporterByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a new schema exporter. All attributes in request body are optional except config. + * Creates a new schema exporter + */ + async registerExporterRaw( + requestParameters: RegisterExporterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["ExporterReference"] == null) { + throw new runtime.RequiredError( + "ExporterReference", + 'Required parameter "ExporterReference" was null or undefined when calling registerExporter().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ExporterReferenceToJSON(requestParameters["ExporterReference"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterResponseFromJSON(jsonValue), + ); + } + + /** + * Creates a new schema exporter. All attributes in request body are optional except config. + * Creates a new schema exporter + */ + async registerExporter( + requestParameters: RegisterExporterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.registerExporterRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Reset the state of the schema exporter. + * Reset schema exporter by name + */ + async resetExporterByNameRaw( + requestParameters: ResetExporterByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling resetExporterByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}/reset`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterResponseFromJSON(jsonValue), + ); + } + + /** + * Reset the state of the schema exporter. + * Reset schema exporter by name + */ + async resetExporterByName( + requestParameters: ResetExporterByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.resetExporterByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Resume running of the schema exporter. + * Resume schema exporter by name + */ + async resumeExporterByNameRaw( + requestParameters: ResumeExporterByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling resumeExporterByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}/resume`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterResponseFromJSON(jsonValue), + ); + } + + /** + * Resume running of the schema exporter. + * Resume schema exporter by name + */ + async resumeExporterByName( + requestParameters: ResumeExporterByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.resumeExporterByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the config of the schema exporter. + * Update schema exporter config by name + */ + async updateExporterConfigByNameRaw( + requestParameters: UpdateExporterConfigByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling updateExporterConfigByName().', + ); + } + + if (requestParameters["ExporterConfigResponse"] == null) { + throw new runtime.RequiredError( + "ExporterConfigResponse", + 'Required parameter "ExporterConfigResponse" was null or undefined when calling updateExporterConfigByName().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}/config`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ExporterConfigResponseToJSON(requestParameters["ExporterConfigResponse"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterResponseFromJSON(jsonValue), + ); + } + + /** + * Retrieves the config of the schema exporter. + * Update schema exporter config by name + */ + async updateExporterConfigByName( + requestParameters: UpdateExporterConfigByNameRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateExporterConfigByNameRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates the information or configurations of the schema exporter. All attributes in request body are optional. + * Update schema exporter by name + */ + async updateExporterInfoRaw( + requestParameters: UpdateExporterInfoRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling updateExporterInfo().', + ); + } + + if (requestParameters["ExporterUpdateRequest"] == null) { + throw new runtime.RequiredError( + "ExporterUpdateRequest", + 'Required parameter "ExporterUpdateRequest" was null or undefined when calling updateExporterInfo().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Deletes the schema exporter. - * Delete schema exporter by name - */ - async deleteExporterRaw(requestParameters: DeleteExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteExporter().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Deletes the schema exporter. - * Delete schema exporter by name - */ - async deleteExporter(requestParameters: DeleteExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteExporterRaw(requestParameters, initOverrides); - } - - /** - * Retrieves the config of the schema exporter. - * Gets schema exporter config by name - */ - async getExporterConfigByNameRaw(requestParameters: GetExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getExporterConfigByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}/config`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterConfigResponseFromJSON(jsonValue)); - } - - /** - * Retrieves the config of the schema exporter. - * Gets schema exporter config by name - */ - async getExporterConfigByName(requestParameters: GetExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getExporterConfigByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the information of the schema exporter. - * Gets schema exporter by name - */ - async getExporterInfoByNameRaw(requestParameters: GetExporterInfoByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getExporterInfoByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterReferenceFromJSON(jsonValue)); - } - - /** - * Retrieves the information of the schema exporter. - * Gets schema exporter by name - */ - async getExporterInfoByName(requestParameters: GetExporterInfoByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getExporterInfoByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the status of the schema exporter. - * Gets schema exporter status by name - */ - async getExporterStatusByNameRaw(requestParameters: GetExporterStatusByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getExporterStatusByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}/status`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterStatusResponseFromJSON(jsonValue)); - } - - /** - * Retrieves the status of the schema exporter. - * Gets schema exporter status by name - */ - async getExporterStatusByName(requestParameters: GetExporterStatusByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getExporterStatusByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a list of schema exporters that have been created. - * Gets all schema exporters - */ - async listExportersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves a list of schema exporters that have been created. - * Gets all schema exporters - */ - async listExporters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.listExportersRaw(initOverrides); - return await response.value(); - } - - /** - * Pauses the state of the schema exporter. - * Pause schema exporter by name - */ - async pauseExporterByNameRaw(requestParameters: PauseExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling pauseExporterByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}/pause`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); - } - - /** - * Pauses the state of the schema exporter. - * Pause schema exporter by name - */ - async pauseExporterByName(requestParameters: PauseExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.pauseExporterByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates a new schema exporter. All attributes in request body are optional except config. - * Creates a new schema exporter - */ - async registerExporterRaw(requestParameters: RegisterExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['ExporterReference'] == null) { - throw new runtime.RequiredError( - 'ExporterReference', - 'Required parameter "ExporterReference" was null or undefined when calling registerExporter().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ExporterReferenceToJSON(requestParameters['ExporterReference']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); - } - - /** - * Creates a new schema exporter. All attributes in request body are optional except config. - * Creates a new schema exporter - */ - async registerExporter(requestParameters: RegisterExporterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.registerExporterRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Reset the state of the schema exporter. - * Reset schema exporter by name - */ - async resetExporterByNameRaw(requestParameters: ResetExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling resetExporterByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}/reset`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); - } - - /** - * Reset the state of the schema exporter. - * Reset schema exporter by name - */ - async resetExporterByName(requestParameters: ResetExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.resetExporterByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Resume running of the schema exporter. - * Resume schema exporter by name - */ - async resumeExporterByNameRaw(requestParameters: ResumeExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling resumeExporterByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}/resume`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); - } - - /** - * Resume running of the schema exporter. - * Resume schema exporter by name - */ - async resumeExporterByName(requestParameters: ResumeExporterByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.resumeExporterByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the config of the schema exporter. - * Update schema exporter config by name - */ - async updateExporterConfigByNameRaw(requestParameters: UpdateExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling updateExporterConfigByName().' - ); - } - - if (requestParameters['ExporterConfigResponse'] == null) { - throw new runtime.RequiredError( - 'ExporterConfigResponse', - 'Required parameter "ExporterConfigResponse" was null or undefined when calling updateExporterConfigByName().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}/config`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ExporterConfigResponseToJSON(requestParameters['ExporterConfigResponse']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); - } - - /** - * Retrieves the config of the schema exporter. - * Update schema exporter config by name - */ - async updateExporterConfigByName(requestParameters: UpdateExporterConfigByNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateExporterConfigByNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Updates the information or configurations of the schema exporter. All attributes in request body are optional. - * Update schema exporter by name - */ - async updateExporterInfoRaw(requestParameters: UpdateExporterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling updateExporterInfo().' - ); - } - - if (requestParameters['ExporterUpdateRequest'] == null) { - throw new runtime.RequiredError( - 'ExporterUpdateRequest', - 'Required parameter "ExporterUpdateRequest" was null or undefined when calling updateExporterInfo().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/exporters/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ExporterUpdateRequestToJSON(requestParameters['ExporterUpdateRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExporterResponseFromJSON(jsonValue)); - } - - /** - * Updates the information or configurations of the schema exporter. All attributes in request body are optional. - * Update schema exporter by name - */ - async updateExporterInfo(requestParameters: UpdateExporterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateExporterInfoRaw(requestParameters, initOverrides); - return await response.value(); + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/exporters/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ExporterUpdateRequestToJSON(requestParameters["ExporterUpdateRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ExporterResponseFromJSON(jsonValue), + ); + } + + /** + * Updates the information or configurations of the schema exporter. All attributes in request body are optional. + * Update schema exporter by name + */ + async updateExporterInfo( + requestParameters: UpdateExporterInfoRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateExporterInfoRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts b/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts index d477e7577a..af92d112c9 100644 --- a/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/KeyEncryptionKeysV1Api.ts @@ -5,321 +5,422 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - CreateKekRequest, - Kek, - UpdateKekRequest, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { CreateKekRequest, Kek, UpdateKekRequest } from "../models/index"; import { - CreateKekRequestFromJSON, - CreateKekRequestToJSON, - KekFromJSON, - KekToJSON, - UpdateKekRequestFromJSON, - UpdateKekRequestToJSON, -} from '../models/index'; + CreateKekRequestFromJSON, + CreateKekRequestToJSON, + KekFromJSON, + KekToJSON, + UpdateKekRequestFromJSON, + UpdateKekRequestToJSON, +} from "../models/index"; export interface CreateKekOperationRequest { - CreateKekRequest: CreateKekRequest; + CreateKekRequest: CreateKekRequest; } export interface DeleteKekRequest { - name: string; - permanent?: boolean; + name: string; + permanent?: boolean; } export interface GetKekRequest { - name: string; - deleted?: boolean; + name: string; + deleted?: boolean; } export interface GetKekNamesRequest { - deleted?: boolean; + deleted?: boolean; } export interface PutKekRequest { - name: string; - UpdateKekRequest: UpdateKekRequest; + name: string; + UpdateKekRequest: UpdateKekRequest; } export interface UndeleteKekRequest { - name: string; + name: string; } /** - * + * */ export class KeyEncryptionKeysV1Api extends runtime.BaseAPI { + /** + * Create a kek + */ + async createKekRaw( + requestParameters: CreateKekOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["CreateKekRequest"] == null) { + throw new runtime.RequiredError( + "CreateKekRequest", + 'Required parameter "CreateKekRequest" was null or undefined when calling createKek().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; - /** - * Create a kek - */ - async createKekRaw(requestParameters: CreateKekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['CreateKekRequest'] == null) { - throw new runtime.RequiredError( - 'CreateKekRequest', - 'Required parameter "CreateKekRequest" was null or undefined when calling createKek().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CreateKekRequestToJSON(requestParameters['CreateKekRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Create a kek - */ - async createKek(requestParameters: CreateKekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createKekRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/dek-registry/v1/keks`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateKekRequestToJSON(requestParameters["CreateKekRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); + } + + /** + * Create a kek + */ + async createKek( + requestParameters: CreateKekOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createKekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a kek + */ + async deleteKekRaw( + requestParameters: DeleteKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling deleteKek().', + ); + } + + const queryParameters: any = {}; - /** - * Delete a kek - */ - async deleteKekRaw(requestParameters: DeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling deleteKek().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['permanent'] != null) { - queryParameters['permanent'] = requestParameters['permanent']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["permanent"] != null) { + queryParameters["permanent"] = requestParameters["permanent"]; } - /** - * Delete a kek - */ - async deleteKek(requestParameters: DeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteKekRaw(requestParameters, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Get a kek by name - */ - async getKekRaw(requestParameters: GetKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling getKek().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a kek + */ + async deleteKek( + requestParameters: DeleteKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteKekRaw(requestParameters, initOverrides); + } + + /** + * Get a kek by name + */ + async getKekRaw( + requestParameters: GetKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling getKek().', + ); } - /** - * Get a kek by name - */ - async getKek(requestParameters: GetKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getKekRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; } - /** - * Get a list of kek names - */ - async getKekNamesRaw(requestParameters: GetKekNamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Get a list of kek names - */ - async getKekNames(requestParameters: GetKekNamesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getKekNamesRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); + } + + /** + * Get a kek by name + */ + async getKek( + requestParameters: GetKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getKekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a list of kek names + */ + async getKekNamesRaw( + requestParameters: GetKekNamesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; } - /** - * Alters a kek - */ - async putKekRaw(requestParameters: PutKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling putKek().' - ); - } - - if (requestParameters['UpdateKekRequest'] == null) { - throw new runtime.RequiredError( - 'UpdateKekRequest', - 'Required parameter "UpdateKekRequest" was null or undefined when calling putKek().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: UpdateKekRequestToJSON(requestParameters['UpdateKekRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Alters a kek - */ - async putKek(requestParameters: PutKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.putKekRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Get a list of kek names + */ + async getKekNames( + requestParameters: GetKekNamesRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getKekNamesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Alters a kek + */ + async putKekRaw( + requestParameters: PutKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling putKek().', + ); } - /** - * Undelete a kek - */ - async undeleteKekRaw(requestParameters: UndeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['name'] == null) { - throw new runtime.RequiredError( - 'name', - 'Required parameter "name" was null or undefined when calling undeleteKek().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/dek-registry/v1/keks/{name}/undelete`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + if (requestParameters["UpdateKekRequest"] == null) { + throw new runtime.RequiredError( + "UpdateKekRequest", + 'Required parameter "UpdateKekRequest" was null or undefined when calling putKek().', + ); } - /** - * Undelete a kek - */ - async undeleteKek(requestParameters: UndeleteKekRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.undeleteKekRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateKekRequestToJSON(requestParameters["UpdateKekRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => KekFromJSON(jsonValue)); + } + + /** + * Alters a kek + */ + async putKek( + requestParameters: PutKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.putKekRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Undelete a kek + */ + async undeleteKekRaw( + requestParameters: UndeleteKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["name"] == null) { + throw new runtime.RequiredError( + "name", + 'Required parameter "name" was null or undefined when calling undeleteKek().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/dek-registry/v1/keks/{name}/undelete`.replace( + `{${"name"}}`, + encodeURIComponent(String(requestParameters["name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Undelete a kek + */ + async undeleteKek( + requestParameters: UndeleteKekRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.undeleteKekRaw(requestParameters, initOverrides); + } } diff --git a/src/clients/schemaRegistryRest/apis/ModesV1Api.ts b/src/clients/schemaRegistryRest/apis/ModesV1Api.ts index 75f6520491..a4853d61f9 100644 --- a/src/clients/schemaRegistryRest/apis/ModesV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/ModesV1Api.ts @@ -5,285 +5,367 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorMessage, - Mode, - ModeUpdateRequest, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorMessage, Mode, ModeUpdateRequest } from "../models/index"; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - ModeFromJSON, - ModeToJSON, - ModeUpdateRequestFromJSON, - ModeUpdateRequestToJSON, -} from '../models/index'; + ErrorMessageFromJSON, + ErrorMessageToJSON, + ModeFromJSON, + ModeToJSON, + ModeUpdateRequestFromJSON, + ModeUpdateRequestToJSON, +} from "../models/index"; export interface DeleteSubjectModeRequest { - subject: string; + subject: string; } export interface GetModeRequest { - subject: string; - defaultToGlobal?: boolean; + subject: string; + defaultToGlobal?: boolean; } export interface UpdateModeRequest { - subject: string; - ModeUpdateRequest: ModeUpdateRequest; - force?: boolean; + subject: string; + ModeUpdateRequest: ModeUpdateRequest; + force?: boolean; } export interface UpdateTopLevelModeRequest { - ModeUpdateRequest: ModeUpdateRequest; - force?: boolean; + ModeUpdateRequest: ModeUpdateRequest; + force?: boolean; } /** - * + * */ export class ModesV1Api extends runtime.BaseAPI { + /** + * Deletes the specified subject-level mode and reverts to the global default. + * Delete subject mode + */ + async deleteSubjectModeRaw( + requestParameters: DeleteSubjectModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling deleteSubjectMode().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Deletes the specified subject-level mode and reverts to the global default. - * Delete subject mode - */ - async deleteSubjectModeRaw(requestParameters: DeleteSubjectModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling deleteSubjectMode().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/mode/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Deletes the specified subject-level mode and reverts to the global default. - * Delete subject mode - */ - async deleteSubjectMode(requestParameters: DeleteSubjectModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteSubjectModeRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/mode/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); + } + + /** + * Deletes the specified subject-level mode and reverts to the global default. + * Delete subject mode + */ + async deleteSubjectMode( + requestParameters: DeleteSubjectModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.deleteSubjectModeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the subject mode. + * Get subject mode + */ + async getModeRaw( + requestParameters: GetModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getMode().', + ); + } + + const queryParameters: any = {}; - /** - * Retrieves the subject mode. - * Get subject mode - */ - async getModeRaw(requestParameters: GetModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getMode().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['defaultToGlobal'] != null) { - queryParameters['defaultToGlobal'] = requestParameters['defaultToGlobal']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/mode/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); + if (requestParameters["defaultToGlobal"] != null) { + queryParameters["defaultToGlobal"] = requestParameters["defaultToGlobal"]; } - /** - * Retrieves the subject mode. - * Get subject mode - */ - async getMode(requestParameters: GetModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getModeRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves global mode. - * Get global mode - */ - async getTopLevelModeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/mode`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/mode/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); + } + + /** + * Retrieves the subject mode. + * Get subject mode + */ + async getMode( + requestParameters: GetModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getModeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves global mode. + * Get global mode + */ + async getTopLevelModeRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves global mode. - * Get global mode - */ - async getTopLevelMode(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTopLevelModeRaw(initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/mode`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ModeFromJSON(jsonValue)); + } + + /** + * Retrieves global mode. + * Get global mode + */ + async getTopLevelMode(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getTopLevelModeRaw(initOverrides); + return await response.value(); + } + + /** + * Update mode for the specified subject. On success, echoes the original request back to the client. + * Update subject mode + */ + async updateModeRaw( + requestParameters: UpdateModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling updateMode().', + ); } - /** - * Update mode for the specified subject. On success, echoes the original request back to the client. - * Update subject mode - */ - async updateModeRaw(requestParameters: UpdateModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling updateMode().' - ); - } - - if (requestParameters['ModeUpdateRequest'] == null) { - throw new runtime.RequiredError( - 'ModeUpdateRequest', - 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateMode().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/mode/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ModeUpdateRequestToJSON(requestParameters['ModeUpdateRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeUpdateRequestFromJSON(jsonValue)); + if (requestParameters["ModeUpdateRequest"] == null) { + throw new runtime.RequiredError( + "ModeUpdateRequest", + 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateMode().', + ); } - /** - * Update mode for the specified subject. On success, echoes the original request back to the client. - * Update subject mode - */ - async updateMode(requestParameters: UpdateModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateModeRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } - /** - * Update global mode. On success, echoes the original request back to the client. - * Update global mode - */ - async updateTopLevelModeRaw(requestParameters: UpdateTopLevelModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['ModeUpdateRequest'] == null) { - throw new runtime.RequiredError( - 'ModeUpdateRequest', - 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateTopLevelMode().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['force'] != null) { - queryParameters['force'] = requestParameters['force']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/mode`, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ModeUpdateRequestToJSON(requestParameters['ModeUpdateRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ModeUpdateRequestFromJSON(jsonValue)); + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/mode/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ModeUpdateRequestToJSON(requestParameters["ModeUpdateRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ModeUpdateRequestFromJSON(jsonValue), + ); + } + + /** + * Update mode for the specified subject. On success, echoes the original request back to the client. + * Update subject mode + */ + async updateMode( + requestParameters: UpdateModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateModeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update global mode. On success, echoes the original request back to the client. + * Update global mode + */ + async updateTopLevelModeRaw( + requestParameters: UpdateTopLevelModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["ModeUpdateRequest"] == null) { + throw new runtime.RequiredError( + "ModeUpdateRequest", + 'Required parameter "ModeUpdateRequest" was null or undefined when calling updateTopLevelMode().', + ); } - /** - * Update global mode. On success, echoes the original request back to the client. - * Update global mode - */ - async updateTopLevelMode(requestParameters: UpdateTopLevelModeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateTopLevelModeRaw(requestParameters, initOverrides); - return await response.value(); + const queryParameters: any = {}; + + if (requestParameters["force"] != null) { + queryParameters["force"] = requestParameters["force"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/mode`, + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ModeUpdateRequestToJSON(requestParameters["ModeUpdateRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + ModeUpdateRequestFromJSON(jsonValue), + ); + } + + /** + * Update global mode. On success, echoes the original request back to the client. + * Update global mode + */ + async updateTopLevelMode( + requestParameters: UpdateTopLevelModeRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateTopLevelModeRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts b/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts index fa0d7eb963..1e66413dc9 100644 --- a/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/SchemasV1Api.ts @@ -5,372 +5,472 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorMessage, - Schema, - SchemaString, - SubjectVersion, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorMessage, Schema, SchemaString, SubjectVersion } from "../models/index"; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - SchemaFromJSON, - SchemaToJSON, - SchemaStringFromJSON, - SchemaStringToJSON, - SubjectVersionFromJSON, - SubjectVersionToJSON, -} from '../models/index'; + ErrorMessageFromJSON, + ErrorMessageToJSON, + SchemaFromJSON, + SchemaToJSON, + SchemaStringFromJSON, + SchemaStringToJSON, + SubjectVersionFromJSON, + SubjectVersionToJSON, +} from "../models/index"; export interface GetSchemaRequest { - id: number; - subject?: string; - format?: string; - fetchMaxId?: boolean; + id: number; + subject?: string; + format?: string; + fetchMaxId?: boolean; } export interface GetSchemaOnlyRequest { - id: number; - subject?: string; - format?: string; + id: number; + subject?: string; + format?: string; } export interface GetSchemasRequest { - subjectPrefix?: string; - deleted?: boolean; - latestOnly?: boolean; - offset?: number; - limit?: number; + subjectPrefix?: string; + deleted?: boolean; + latestOnly?: boolean; + offset?: number; + limit?: number; } export interface GetSubjectsRequest { - id: number; - subject?: string; - deleted?: boolean; + id: number; + subject?: string; + deleted?: boolean; } export interface GetVersionsRequest { - id: number; - subject?: string; - deleted?: boolean; + id: number; + subject?: string; + deleted?: boolean; } /** - * + * */ export class SchemasV1Api extends runtime.BaseAPI { + /** + * Retrieves the schema string identified by the input ID. + * Get schema string by ID + */ + async getSchemaRaw( + requestParameters: GetSchemaRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling getSchema().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["subject"] != null) { + queryParameters["subject"] = requestParameters["subject"]; + } + + if (requestParameters["format"] != null) { + queryParameters["format"] = requestParameters["format"]; + } + + if (requestParameters["fetchMaxId"] != null) { + queryParameters["fetchMaxId"] = requestParameters["fetchMaxId"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/schemas/ids/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SchemaStringFromJSON(jsonValue)); + } + + /** + * Retrieves the schema string identified by the input ID. + * Get schema string by ID + */ + async getSchema( + requestParameters: GetSchemaRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSchemaRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the schema identified by the input ID. + * Get schema by ID + */ + async getSchemaOnlyRaw( + requestParameters: GetSchemaOnlyRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling getSchemaOnly().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["subject"] != null) { + queryParameters["subject"] = requestParameters["subject"]; + } + + if (requestParameters["format"] != null) { + queryParameters["format"] = requestParameters["format"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; - /** - * Retrieves the schema string identified by the input ID. - * Get schema string by ID - */ - async getSchemaRaw(requestParameters: GetSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getSchema().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['subject'] != null) { - queryParameters['subject'] = requestParameters['subject']; - } - - if (requestParameters['format'] != null) { - queryParameters['format'] = requestParameters['format']; - } - - if (requestParameters['fetchMaxId'] != null) { - queryParameters['fetchMaxId'] = requestParameters['fetchMaxId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/schemas/ids/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SchemaStringFromJSON(jsonValue)); + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves the schema string identified by the input ID. - * Get schema string by ID - */ - async getSchema(requestParameters: GetSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSchemaRaw(requestParameters, initOverrides); - return await response.value(); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/schemas/ids/{id}/schema`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Retrieves the schema identified by the input ID. + * Get schema by ID + */ + async getSchemaOnly( + requestParameters: GetSchemaOnlyRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSchemaOnlyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieve the schema types supported by this registry. + * List supported schema types + */ + async getSchemaTypesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves the schema identified by the input ID. - * Get schema by ID - */ - async getSchemaOnlyRaw(requestParameters: GetSchemaOnlyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getSchemaOnly().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['subject'] != null) { - queryParameters['subject'] = requestParameters['subject']; - } - - if (requestParameters['format'] != null) { - queryParameters['format'] = requestParameters['format']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/schemas/ids/{id}/schema`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/schemas/types`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieve the schema types supported by this registry. + * List supported schema types + */ + async getSchemaTypes( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getSchemaTypesRaw(initOverrides); + return await response.value(); + } + + /** + * Get the schemas matching the specified parameters. + * List schemas + */ + async getSchemasRaw( + requestParameters: GetSchemasRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["subjectPrefix"] != null) { + queryParameters["subjectPrefix"] = requestParameters["subjectPrefix"]; } - /** - * Retrieves the schema identified by the input ID. - * Get schema by ID - */ - async getSchemaOnly(requestParameters: GetSchemaOnlyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSchemaOnlyRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; } - /** - * Retrieve the schema types supported by this registry. - * List supported schema types - */ - async getSchemaTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/schemas/types`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); + if (requestParameters["latestOnly"] != null) { + queryParameters["latestOnly"] = requestParameters["latestOnly"]; } - /** - * Retrieve the schema types supported by this registry. - * List supported schema types - */ - async getSchemaTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getSchemaTypesRaw(initOverrides); - return await response.value(); + if (requestParameters["offset"] != null) { + queryParameters["offset"] = requestParameters["offset"]; } - /** - * Get the schemas matching the specified parameters. - * List schemas - */ - async getSchemasRaw(requestParameters: GetSchemasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['subjectPrefix'] != null) { - queryParameters['subjectPrefix'] = requestParameters['subjectPrefix']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - if (requestParameters['latestOnly'] != null) { - queryParameters['latestOnly'] = requestParameters['latestOnly']; - } - - if (requestParameters['offset'] != null) { - queryParameters['offset'] = requestParameters['offset']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/schemas`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SchemaFromJSON)); + if (requestParameters["limit"] != null) { + queryParameters["limit"] = requestParameters["limit"]; } - /** - * Get the schemas matching the specified parameters. - * List schemas - */ - async getSchemas(requestParameters: GetSchemasRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getSchemasRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } - /** - * Retrieves all the subjects associated with a particular schema ID. - * List subjects associated to schema ID - */ - async getSubjectsRaw(requestParameters: GetSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getSubjects().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['subject'] != null) { - queryParameters['subject'] = requestParameters['subject']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/schemas/ids/{id}/subjects`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); } + const response = await this.request( + { + path: `/schemas`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SchemaFromJSON)); + } + + /** + * Get the schemas matching the specified parameters. + * List schemas + */ + async getSchemas( + requestParameters: GetSchemasRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getSchemasRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves all the subjects associated with a particular schema ID. + * List subjects associated to schema ID + */ + async getSubjectsRaw( + requestParameters: GetSubjectsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling getSubjects().', + ); + } + + const queryParameters: any = {}; - /** - * Retrieves all the subjects associated with a particular schema ID. - * List subjects associated to schema ID - */ - async getSubjects(requestParameters: GetSubjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getSubjectsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["subject"] != null) { + queryParameters["subject"] = requestParameters["subject"]; } - /** - * Get all the subject-version pairs associated with the input ID. - * List subject-versions associated to schema ID - */ - async getVersionsRaw(requestParameters: GetVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling getVersions().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['subject'] != null) { - queryParameters['subject'] = requestParameters['subject']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/schemas/ids/{id}/versions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubjectVersionFromJSON)); + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; } - /** - * Get all the subject-version pairs associated with the input ID. - * List subject-versions associated to schema ID - */ - async getVersions(requestParameters: GetVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getVersionsRaw(requestParameters, initOverrides); - return await response.value(); + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); } + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/schemas/ids/{id}/subjects`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves all the subjects associated with a particular schema ID. + * List subjects associated to schema ID + */ + async getSubjects( + requestParameters: GetSubjectsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getSubjectsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get all the subject-version pairs associated with the input ID. + * List subject-versions associated to schema ID + */ + async getVersionsRaw( + requestParameters: GetVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling getVersions().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["subject"] != null) { + queryParameters["subject"] = requestParameters["subject"]; + } + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/schemas/ids/{id}/versions`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + jsonValue.map(SubjectVersionFromJSON), + ); + } + + /** + * Get all the subject-version pairs associated with the input ID. + * List subject-versions associated to schema ID + */ + async getVersions( + requestParameters: GetVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getVersionsRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts b/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts index f492520e81..1876479154 100644 --- a/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts +++ b/src/clients/schemaRegistryRest/apis/SubjectsV1Api.ts @@ -5,562 +5,725 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorMessage, RegisterSchemaRequest, RegisterSchemaResponse, Schema, -} from '../models/index'; +} from "../models/index"; import { - ErrorMessageFromJSON, - ErrorMessageToJSON, - RegisterSchemaRequestFromJSON, - RegisterSchemaRequestToJSON, - RegisterSchemaResponseFromJSON, - RegisterSchemaResponseToJSON, - SchemaFromJSON, - SchemaToJSON, -} from '../models/index'; + ErrorMessageFromJSON, + ErrorMessageToJSON, + RegisterSchemaRequestFromJSON, + RegisterSchemaRequestToJSON, + RegisterSchemaResponseFromJSON, + RegisterSchemaResponseToJSON, + SchemaFromJSON, + SchemaToJSON, +} from "../models/index"; export interface DeleteSchemaVersionRequest { - subject: string; - version: string; - permanent?: boolean; + subject: string; + version: string; + permanent?: boolean; } export interface DeleteSubjectRequest { - subject: string; - permanent?: boolean; + subject: string; + permanent?: boolean; } export interface GetReferencedByRequest { - subject: string; - version: string; + subject: string; + version: string; } export interface GetSchemaByVersionRequest { - subject: string; - version: string; - deleted?: boolean; + subject: string; + version: string; + deleted?: boolean; } export interface GetSchemaOnly1Request { - subject: string; - version: string; - deleted?: boolean; + subject: string; + version: string; + deleted?: boolean; } export interface ListRequest { - subjectPrefix?: string; - deleted?: boolean; + subjectPrefix?: string; + deleted?: boolean; } export interface ListVersionsRequest { - subject: string; - deleted?: boolean; + subject: string; + deleted?: boolean; } export interface LookUpSchemaUnderSubjectRequest { - subject: string; - RegisterSchemaRequest: RegisterSchemaRequest; - normalize?: boolean; - deleted?: boolean; + subject: string; + RegisterSchemaRequest: RegisterSchemaRequest; + normalize?: boolean; + deleted?: boolean; } export interface RegisterRequest { - subject: string; - RegisterSchemaRequest: RegisterSchemaRequest; - normalize?: boolean; + subject: string; + RegisterSchemaRequest: RegisterSchemaRequest; + normalize?: boolean; } /** - * + * */ export class SubjectsV1Api extends runtime.BaseAPI { + /** + * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. + * Delete schema version + */ + async deleteSchemaVersionRaw( + requestParameters: DeleteSchemaVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling deleteSchemaVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling deleteSchemaVersion().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["permanent"] != null) { + queryParameters["permanent"] = requestParameters["permanent"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}/versions/{version}` + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. + * Delete schema version + */ + async deleteSchemaVersion( + requestParameters: DeleteSchemaVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.deleteSchemaVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. + * Delete subject + */ + async deleteSubjectRaw( + requestParameters: DeleteSubjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling deleteSubject().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["permanent"] != null) { + queryParameters["permanent"] = requestParameters["permanent"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. + * Delete subject + */ + async deleteSubject( + requestParameters: DeleteSubjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.deleteSubjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the IDs of schemas that reference the specified schema. + * List schemas referencing a schema + */ + async getReferencedByRaw( + requestParameters: GetReferencedByRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getReferencedBy().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling getReferencedBy().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}/versions/{version}/referencedby` + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves the IDs of schemas that reference the specified schema. + * List schemas referencing a schema + */ + async getReferencedBy( + requestParameters: GetReferencedByRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.getReferencedByRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a specific version of the schema registered under this subject. + * Get schema by version + */ + async getSchemaByVersionRaw( + requestParameters: GetSchemaByVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getSchemaByVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling getSchemaByVersion().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}/versions/{version}` + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); + } + + /** + * Retrieves a specific version of the schema registered under this subject. + * Get schema by version + */ + async getSchemaByVersion( + requestParameters: GetSchemaByVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSchemaByVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. + * Get schema string by version + */ + async getSchemaOnly1Raw( + requestParameters: GetSchemaOnly1Request, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling getSchemaOnly1().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling getSchemaOnly1().', + ); + } + + const queryParameters: any = {}; - /** - * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. - * Delete schema version - */ - async deleteSchemaVersionRaw(requestParameters: DeleteSchemaVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling deleteSchemaVersion().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling deleteSchemaVersion().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['permanent'] != null) { - queryParameters['permanent'] = requestParameters['permanent']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}/versions/{version}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Deletes a specific version of the schema registered under this subject. This only deletes the version and the schema ID remains intact making it still possible to decode data using the schema ID. This API is recommended to be used only in development environments or under extreme circumstances where-in, its required to delete a previously registered schema for compatibility purposes or re-register previously registered schema. - * Delete schema version - */ - async deleteSchemaVersion(requestParameters: DeleteSchemaVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteSchemaVersionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. - * Delete subject - */ - async deleteSubjectRaw(requestParameters: DeleteSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling deleteSubject().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['permanent'] != null) { - queryParameters['permanent'] = requestParameters['permanent']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. - * Delete subject - */ - async deleteSubject(requestParameters: DeleteSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.deleteSubjectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the IDs of schemas that reference the specified schema. - * List schemas referencing a schema - */ - async getReferencedByRaw(requestParameters: GetReferencedByRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getReferencedBy().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling getReferencedBy().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}/versions/{version}/referencedby`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves the IDs of schemas that reference the specified schema. - * List schemas referencing a schema - */ - async getReferencedBy(requestParameters: GetReferencedByRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getReferencedByRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a specific version of the schema registered under this subject. - * Get schema by version - */ - async getSchemaByVersionRaw(requestParameters: GetSchemaByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getSchemaByVersion().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling getSchemaByVersion().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}/versions/{version}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); - } - - /** - * Retrieves a specific version of the schema registered under this subject. - * Get schema by version - */ - async getSchemaByVersion(requestParameters: GetSchemaByVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSchemaByVersionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. - * Get schema string by version - */ - async getSchemaOnly1Raw(requestParameters: GetSchemaOnly1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling getSchemaOnly1().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling getSchemaOnly1().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}/versions/{version}/schema`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))).replace(`{${"version"}}`, encodeURIComponent(String(requestParameters['version']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. - * Get schema string by version - */ - async getSchemaOnly1(requestParameters: GetSchemaOnly1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSchemaOnly1Raw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a list of registered subjects matching specified parameters. - * List subjects - */ - async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['subjectPrefix'] != null) { - queryParameters['subjectPrefix'] = requestParameters['subjectPrefix']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves a list of registered subjects matching specified parameters. - * List subjects - */ - async list(requestParameters: ListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.listRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Retrieves a list of versions registered under the specified subject. - * List versions under subject - */ - async listVersionsRaw(requestParameters: ListVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling listVersions().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}/versions`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Retrieves a list of versions registered under the specified subject. - * List versions under subject - */ - async listVersions(requestParameters: ListVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.listVersionsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. - * Lookup schema under subject - */ - async lookUpSchemaUnderSubjectRaw(requestParameters: LookUpSchemaUnderSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling lookUpSchemaUnderSubject().' - ); - } - - if (requestParameters['RegisterSchemaRequest'] == null) { - throw new runtime.RequiredError( - 'RegisterSchemaRequest', - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling lookUpSchemaUnderSubject().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['normalize'] != null) { - queryParameters['normalize'] = requestParameters['normalize']; - } - - if (requestParameters['deleted'] != null) { - queryParameters['deleted'] = requestParameters['deleted']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); - } - - /** - * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. - * Lookup schema under subject - */ - async lookUpSchemaUnderSubject(requestParameters: LookUpSchemaUnderSubjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.lookUpSchemaUnderSubjectRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. - * Register schema under a subject - */ - async registerRaw(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subject'] == null) { - throw new runtime.RequiredError( - 'subject', - 'Required parameter "subject" was null or undefined when calling register().' - ); - } - - if (requestParameters['RegisterSchemaRequest'] == null) { - throw new runtime.RequiredError( - 'RegisterSchemaRequest', - 'Required parameter "RegisterSchemaRequest" was null or undefined when calling register().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['normalize'] != null) { - queryParameters['normalize'] = requestParameters['normalize']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/vnd.schemaregistry.v1+json'; - - if (this.configuration && this.configuration.accessToken) { - // oauth required - headerParameters["Authorization"] = await this.configuration.accessToken("external-access-token", []); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - const response = await this.request({ - path: `/subjects/{subject}/versions`.replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters['subject']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: RegisterSchemaRequestToJSON(requestParameters['RegisterSchemaRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RegisterSchemaResponseFromJSON(jsonValue)); - } - - /** - * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. - * Register schema under a subject - */ - async register(requestParameters: RegisterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.registerRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}/versions/{version}/schema` + .replace(`{${"subject"}}`, encodeURIComponent(String(requestParameters["subject"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. + * Get schema string by version + */ + async getSchemaOnly1( + requestParameters: GetSchemaOnly1Request, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSchemaOnly1Raw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of registered subjects matching specified parameters. + * List subjects + */ + async listRaw( + requestParameters: ListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + const queryParameters: any = {}; + + if (requestParameters["subjectPrefix"] != null) { + queryParameters["subjectPrefix"] = requestParameters["subjectPrefix"]; + } + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves a list of registered subjects matching specified parameters. + * List subjects + */ + async list( + requestParameters: ListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.listRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves a list of versions registered under the specified subject. + * List versions under subject + */ + async listVersionsRaw( + requestParameters: ListVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise>> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling listVersions().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}/versions`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + * Retrieves a list of versions registered under the specified subject. + * List versions under subject + */ + async listVersions( + requestParameters: ListVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const response = await this.listVersionsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. + * Lookup schema under subject + */ + async lookUpSchemaUnderSubjectRaw( + requestParameters: LookUpSchemaUnderSubjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling lookUpSchemaUnderSubject().', + ); + } + + if (requestParameters["RegisterSchemaRequest"] == null) { + throw new runtime.RequiredError( + "RegisterSchemaRequest", + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling lookUpSchemaUnderSubject().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["normalize"] != null) { + queryParameters["normalize"] = requestParameters["normalize"]; + } + + if (requestParameters["deleted"] != null) { + queryParameters["deleted"] = requestParameters["deleted"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SchemaFromJSON(jsonValue)); + } + + /** + * Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. + * Lookup schema under subject + */ + async lookUpSchemaUnderSubject( + requestParameters: LookUpSchemaUnderSubjectRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.lookUpSchemaUnderSubjectRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. + * Register schema under a subject + */ + async registerRaw( + requestParameters: RegisterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subject"] == null) { + throw new runtime.RequiredError( + "subject", + 'Required parameter "subject" was null or undefined when calling register().', + ); + } + + if (requestParameters["RegisterSchemaRequest"] == null) { + throw new runtime.RequiredError( + "RegisterSchemaRequest", + 'Required parameter "RegisterSchemaRequest" was null or undefined when calling register().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["normalize"] != null) { + queryParameters["normalize"] = requestParameters["normalize"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/vnd.schemaregistry.v1+json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/subjects/{subject}/versions`.replace( + `{${"subject"}}`, + encodeURIComponent(String(requestParameters["subject"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: RegisterSchemaRequestToJSON(requestParameters["RegisterSchemaRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + RegisterSchemaResponseFromJSON(jsonValue), + ); + } + + /** + * Register a new schema under the specified subject. If successfully registered, this returns the unique identifier of this schema in the registry. The returned identifier should be used to retrieve this schema from the schemas resource and is different from the schema\'s version which is associated with the subject. If the same schema is registered under a different subject, the same identifier will be returned. However, the version of the schema may be different under different subjects. A schema should be compatible with the previously registered schema or schemas (if there are any) as per the configured compatibility level. The configured compatibility level can be obtained by issuing a GET http:get:: /config/(string: subject). If that returns null, then GET http:get:: /config When there are multiple instances of Schema Registry running in the same cluster, the schema registration request will be forwarded to one of the instances designated as the primary. If the primary is not available, the client will get an error code indicating that the forwarding has failed. + * Register schema under a subject + */ + async register( + requestParameters: RegisterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.registerRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/schemaRegistryRest/apis/index.ts b/src/clients/schemaRegistryRest/apis/index.ts index 4b8313e148..177817e069 100644 --- a/src/clients/schemaRegistryRest/apis/index.ts +++ b/src/clients/schemaRegistryRest/apis/index.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ -export * from './CompatibilityV1Api'; -export * from './ConfigV1Api'; -export * from './ContextsV1Api'; -export * from './DataEncryptionKeysV1Api'; -export * from './ExportersV1Api'; -export * from './KeyEncryptionKeysV1Api'; -export * from './ModesV1Api'; -export * from './SchemasV1Api'; -export * from './SubjectsV1Api'; +export * from "./CompatibilityV1Api"; +export * from "./ConfigV1Api"; +export * from "./ContextsV1Api"; +export * from "./DataEncryptionKeysV1Api"; +export * from "./ExportersV1Api"; +export * from "./KeyEncryptionKeysV1Api"; +export * from "./ModesV1Api"; +export * from "./SchemasV1Api"; +export * from "./SubjectsV1Api"; diff --git a/src/clients/schemaRegistryRest/index.ts b/src/clients/schemaRegistryRest/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/schemaRegistryRest/index.ts +++ b/src/clients/schemaRegistryRest/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/schemaRegistryRest/models/ClusterConfig.ts b/src/clients/schemaRegistryRest/models/ClusterConfig.ts index 4d477f79af..901f277071 100644 --- a/src/clients/schemaRegistryRest/models/ClusterConfig.ts +++ b/src/clients/schemaRegistryRest/models/ClusterConfig.ts @@ -5,69 +5,69 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Cluster Config * @export * @interface ClusterConfig */ export interface ClusterConfig { - /** - * Maximum number of registered schemas allowed - * @type {number} - * @memberof ClusterConfig - */ - maxSchemas?: number; - /** - * Maximum number of allowed requests per second - * @type {number} - * @memberof ClusterConfig - */ - maxRequestsPerSec?: number; + /** + * Maximum number of registered schemas allowed + * @type {number} + * @memberof ClusterConfig + */ + maxSchemas?: number; + /** + * Maximum number of allowed requests per second + * @type {number} + * @memberof ClusterConfig + */ + maxRequestsPerSec?: number; } /** * Check if a given object implements the ClusterConfig interface. */ export function instanceOfClusterConfig(value: object): value is ClusterConfig { - return true; + return true; } export function ClusterConfigFromJSON(json: any): ClusterConfig { - return ClusterConfigFromJSONTyped(json, false); + return ClusterConfigFromJSONTyped(json, false); } export function ClusterConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterConfig { - if (json == null) { - return json; - } - return { - - 'maxSchemas': json['maxSchemas'] == null ? undefined : json['maxSchemas'], - 'maxRequestsPerSec': json['maxRequestsPerSec'] == null ? undefined : json['maxRequestsPerSec'], - }; + if (json == null) { + return json; + } + return { + maxSchemas: json["maxSchemas"] == null ? undefined : json["maxSchemas"], + maxRequestsPerSec: json["maxRequestsPerSec"] == null ? undefined : json["maxRequestsPerSec"], + }; } export function ClusterConfigToJSON(json: any): ClusterConfig { - return ClusterConfigToJSONTyped(json, false); + return ClusterConfigToJSONTyped(json, false); } -export function ClusterConfigToJSONTyped(value?: ClusterConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ClusterConfigToJSONTyped( + value?: ClusterConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'maxSchemas': value['maxSchemas'], - 'maxRequestsPerSec': value['maxRequestsPerSec'], - }; + return { + maxSchemas: value["maxSchemas"], + maxRequestsPerSec: value["maxRequestsPerSec"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts b/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts index 78736df246..f53eb5417a 100644 --- a/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts +++ b/src/clients/schemaRegistryRest/models/CompatibilityCheckResponse.ts @@ -5,69 +5,74 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Compatibility check response * @export * @interface CompatibilityCheckResponse */ export interface CompatibilityCheckResponse { - /** - * Whether the compared schemas are compatible - * @type {boolean} - * @memberof CompatibilityCheckResponse - */ - is_compatible?: boolean; - /** - * Error messages - * @type {Array} - * @memberof CompatibilityCheckResponse - */ - messages?: Array; + /** + * Whether the compared schemas are compatible + * @type {boolean} + * @memberof CompatibilityCheckResponse + */ + is_compatible?: boolean; + /** + * Error messages + * @type {Array} + * @memberof CompatibilityCheckResponse + */ + messages?: Array; } /** * Check if a given object implements the CompatibilityCheckResponse interface. */ -export function instanceOfCompatibilityCheckResponse(value: object): value is CompatibilityCheckResponse { - return true; +export function instanceOfCompatibilityCheckResponse( + value: object, +): value is CompatibilityCheckResponse { + return true; } export function CompatibilityCheckResponseFromJSON(json: any): CompatibilityCheckResponse { - return CompatibilityCheckResponseFromJSONTyped(json, false); + return CompatibilityCheckResponseFromJSONTyped(json, false); } -export function CompatibilityCheckResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompatibilityCheckResponse { - if (json == null) { - return json; - } - return { - - 'is_compatible': json['is_compatible'] == null ? undefined : json['is_compatible'], - 'messages': json['messages'] == null ? undefined : json['messages'], - }; +export function CompatibilityCheckResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CompatibilityCheckResponse { + if (json == null) { + return json; + } + return { + is_compatible: json["is_compatible"] == null ? undefined : json["is_compatible"], + messages: json["messages"] == null ? undefined : json["messages"], + }; } export function CompatibilityCheckResponseToJSON(json: any): CompatibilityCheckResponse { - return CompatibilityCheckResponseToJSONTyped(json, false); + return CompatibilityCheckResponseToJSONTyped(json, false); } -export function CompatibilityCheckResponseToJSONTyped(value?: CompatibilityCheckResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CompatibilityCheckResponseToJSONTyped( + value?: CompatibilityCheckResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'is_compatible': value['is_compatible'], - 'messages': value['messages'], - }; + return { + is_compatible: value["is_compatible"], + messages: value["messages"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/Config.ts b/src/clients/schemaRegistryRest/models/Config.ts index 5f96c707c6..c1633c1af4 100644 --- a/src/clients/schemaRegistryRest/models/Config.ts +++ b/src/clients/schemaRegistryRest/models/Config.ts @@ -5,42 +5,42 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigDefaultMetadata } from './ConfigDefaultMetadata'; +import { mapValues } from "../runtime"; +import type { ConfigDefaultMetadata } from "./ConfigDefaultMetadata"; import { - ConfigDefaultMetadataFromJSON, - ConfigDefaultMetadataFromJSONTyped, - ConfigDefaultMetadataToJSON, - ConfigDefaultMetadataToJSONTyped, -} from './ConfigDefaultMetadata'; -import type { ConfigOverrideMetadata } from './ConfigOverrideMetadata'; + ConfigDefaultMetadataFromJSON, + ConfigDefaultMetadataFromJSONTyped, + ConfigDefaultMetadataToJSON, + ConfigDefaultMetadataToJSONTyped, +} from "./ConfigDefaultMetadata"; +import type { ConfigOverrideMetadata } from "./ConfigOverrideMetadata"; import { - ConfigOverrideMetadataFromJSON, - ConfigOverrideMetadataFromJSONTyped, - ConfigOverrideMetadataToJSON, - ConfigOverrideMetadataToJSONTyped, -} from './ConfigOverrideMetadata'; -import type { ConfigDefaultRuleSet } from './ConfigDefaultRuleSet'; + ConfigOverrideMetadataFromJSON, + ConfigOverrideMetadataFromJSONTyped, + ConfigOverrideMetadataToJSON, + ConfigOverrideMetadataToJSONTyped, +} from "./ConfigOverrideMetadata"; +import type { ConfigDefaultRuleSet } from "./ConfigDefaultRuleSet"; import { - ConfigDefaultRuleSetFromJSON, - ConfigDefaultRuleSetFromJSONTyped, - ConfigDefaultRuleSetToJSON, - ConfigDefaultRuleSetToJSONTyped, -} from './ConfigDefaultRuleSet'; -import type { ConfigOverrideRuleSet } from './ConfigOverrideRuleSet'; + ConfigDefaultRuleSetFromJSON, + ConfigDefaultRuleSetFromJSONTyped, + ConfigDefaultRuleSetToJSON, + ConfigDefaultRuleSetToJSONTyped, +} from "./ConfigDefaultRuleSet"; +import type { ConfigOverrideRuleSet } from "./ConfigOverrideRuleSet"; import { - ConfigOverrideRuleSetFromJSON, - ConfigOverrideRuleSetFromJSONTyped, - ConfigOverrideRuleSetToJSON, - ConfigOverrideRuleSetToJSONTyped, -} from './ConfigOverrideRuleSet'; + ConfigOverrideRuleSetFromJSON, + ConfigOverrideRuleSetFromJSONTyped, + ConfigOverrideRuleSetToJSON, + ConfigOverrideRuleSetToJSONTyped, +} from "./ConfigOverrideRuleSet"; /** * Config @@ -48,108 +48,120 @@ import { * @interface Config */ export interface Config { - /** - * If alias is specified, then this subject is an alias for the subject - * named by the alias. That means that any reference to this subject - * will be replaced by the alias. - * @type {string} - * @memberof Config - */ - alias?: string; - /** - * If true, then schemas are automatically normalized when registered or - * when passed during lookups. This means that clients do not have to - * pass the "normalize" query parameter to have normalization occur. - * @type {boolean} - * @memberof Config - */ - normalize?: boolean; - /** - * Compatibility Level - * @type {string} - * @memberof Config - */ - compatibilityLevel?: string; - /** - * Only schemas that belong to the same compatibility group will be - * checked for compatibility. - * @type {string} - * @memberof Config - */ - compatibilityGroup?: string; - /** - * - * @type {ConfigDefaultMetadata} - * @memberof Config - */ - defaultMetadata?: ConfigDefaultMetadata; - /** - * - * @type {ConfigOverrideMetadata} - * @memberof Config - */ - overrideMetadata?: ConfigOverrideMetadata; - /** - * - * @type {ConfigDefaultRuleSet} - * @memberof Config - */ - defaultRuleSet?: ConfigDefaultRuleSet; - /** - * - * @type {ConfigOverrideRuleSet} - * @memberof Config - */ - overrideRuleSet?: ConfigOverrideRuleSet; + /** + * If alias is specified, then this subject is an alias for the subject + * named by the alias. That means that any reference to this subject + * will be replaced by the alias. + * @type {string} + * @memberof Config + */ + alias?: string; + /** + * If true, then schemas are automatically normalized when registered or + * when passed during lookups. This means that clients do not have to + * pass the "normalize" query parameter to have normalization occur. + * @type {boolean} + * @memberof Config + */ + normalize?: boolean; + /** + * Compatibility Level + * @type {string} + * @memberof Config + */ + compatibilityLevel?: string; + /** + * Only schemas that belong to the same compatibility group will be + * checked for compatibility. + * @type {string} + * @memberof Config + */ + compatibilityGroup?: string; + /** + * + * @type {ConfigDefaultMetadata} + * @memberof Config + */ + defaultMetadata?: ConfigDefaultMetadata; + /** + * + * @type {ConfigOverrideMetadata} + * @memberof Config + */ + overrideMetadata?: ConfigOverrideMetadata; + /** + * + * @type {ConfigDefaultRuleSet} + * @memberof Config + */ + defaultRuleSet?: ConfigDefaultRuleSet; + /** + * + * @type {ConfigOverrideRuleSet} + * @memberof Config + */ + overrideRuleSet?: ConfigOverrideRuleSet; } /** * Check if a given object implements the Config interface. */ export function instanceOfConfig(value: object): value is Config { - return true; + return true; } export function ConfigFromJSON(json: any): Config { - return ConfigFromJSONTyped(json, false); + return ConfigFromJSONTyped(json, false); } export function ConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): Config { - if (json == null) { - return json; - } - return { - - 'alias': json['alias'] == null ? undefined : json['alias'], - 'normalize': json['normalize'] == null ? undefined : json['normalize'], - 'compatibilityLevel': json['compatibilityLevel'] == null ? undefined : json['compatibilityLevel'], - 'compatibilityGroup': json['compatibilityGroup'] == null ? undefined : json['compatibilityGroup'], - 'defaultMetadata': json['defaultMetadata'] == null ? undefined : ConfigDefaultMetadataFromJSON(json['defaultMetadata']), - 'overrideMetadata': json['overrideMetadata'] == null ? undefined : ConfigOverrideMetadataFromJSON(json['overrideMetadata']), - 'defaultRuleSet': json['defaultRuleSet'] == null ? undefined : ConfigDefaultRuleSetFromJSON(json['defaultRuleSet']), - 'overrideRuleSet': json['overrideRuleSet'] == null ? undefined : ConfigOverrideRuleSetFromJSON(json['overrideRuleSet']), - }; + if (json == null) { + return json; + } + return { + alias: json["alias"] == null ? undefined : json["alias"], + normalize: json["normalize"] == null ? undefined : json["normalize"], + compatibilityLevel: json["compatibilityLevel"] == null ? undefined : json["compatibilityLevel"], + compatibilityGroup: json["compatibilityGroup"] == null ? undefined : json["compatibilityGroup"], + defaultMetadata: + json["defaultMetadata"] == null + ? undefined + : ConfigDefaultMetadataFromJSON(json["defaultMetadata"]), + overrideMetadata: + json["overrideMetadata"] == null + ? undefined + : ConfigOverrideMetadataFromJSON(json["overrideMetadata"]), + defaultRuleSet: + json["defaultRuleSet"] == null + ? undefined + : ConfigDefaultRuleSetFromJSON(json["defaultRuleSet"]), + overrideRuleSet: + json["overrideRuleSet"] == null + ? undefined + : ConfigOverrideRuleSetFromJSON(json["overrideRuleSet"]), + }; } export function ConfigToJSON(json: any): Config { - return ConfigToJSONTyped(json, false); + return ConfigToJSONTyped(json, false); } -export function ConfigToJSONTyped(value?: Config | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigToJSONTyped( + value?: Config | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'alias': value['alias'], - 'normalize': value['normalize'], - 'compatibilityLevel': value['compatibilityLevel'], - 'compatibilityGroup': value['compatibilityGroup'], - 'defaultMetadata': ConfigDefaultMetadataToJSON(value['defaultMetadata']), - 'overrideMetadata': ConfigOverrideMetadataToJSON(value['overrideMetadata']), - 'defaultRuleSet': ConfigDefaultRuleSetToJSON(value['defaultRuleSet']), - 'overrideRuleSet': ConfigOverrideRuleSetToJSON(value['overrideRuleSet']), - }; + return { + alias: value["alias"], + normalize: value["normalize"], + compatibilityLevel: value["compatibilityLevel"], + compatibilityGroup: value["compatibilityGroup"], + defaultMetadata: ConfigDefaultMetadataToJSON(value["defaultMetadata"]), + overrideMetadata: ConfigOverrideMetadataToJSON(value["overrideMetadata"]), + defaultRuleSet: ConfigDefaultRuleSetToJSON(value["defaultRuleSet"]), + overrideRuleSet: ConfigOverrideRuleSetToJSON(value["overrideRuleSet"]), + }; } - diff --git a/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts b/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts index 4bccf18541..57da683e95 100644 --- a/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts +++ b/src/clients/schemaRegistryRest/models/ConfigDefaultMetadata.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Default value for the metadata to be used during schema registration. * @export * @interface ConfigDefaultMetadata */ export interface ConfigDefaultMetadata { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigDefaultMetadata - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigDefaultMetadata + */ + properties?: object; } /** * Check if a given object implements the ConfigDefaultMetadata interface. */ export function instanceOfConfigDefaultMetadata(value: object): value is ConfigDefaultMetadata { - return true; + return true; } export function ConfigDefaultMetadataFromJSON(json: any): ConfigDefaultMetadata { - return ConfigDefaultMetadataFromJSONTyped(json, false); + return ConfigDefaultMetadataFromJSONTyped(json, false); } -export function ConfigDefaultMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigDefaultMetadata { - if (json == null) { - return json; - } - return { - - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function ConfigDefaultMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigDefaultMetadata { + if (json == null) { + return json; + } + return { + properties: json["properties"] == null ? undefined : json["properties"], + }; } export function ConfigDefaultMetadataToJSON(json: any): ConfigDefaultMetadata { - return ConfigDefaultMetadataToJSONTyped(json, false); + return ConfigDefaultMetadataToJSONTyped(json, false); } -export function ConfigDefaultMetadataToJSONTyped(value?: ConfigDefaultMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigDefaultMetadataToJSONTyped( + value?: ConfigDefaultMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'properties': value['properties'], - }; + return { + properties: value["properties"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts b/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts index cb0883d57e..550902816e 100644 --- a/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts +++ b/src/clients/schemaRegistryRest/models/ConfigDefaultRuleSet.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Default value for the ruleSet to be used during schema registration. * @export * @interface ConfigDefaultRuleSet */ export interface ConfigDefaultRuleSet { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigDefaultRuleSet - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigDefaultRuleSet + */ + properties?: object; } /** * Check if a given object implements the ConfigDefaultRuleSet interface. */ export function instanceOfConfigDefaultRuleSet(value: object): value is ConfigDefaultRuleSet { - return true; + return true; } export function ConfigDefaultRuleSetFromJSON(json: any): ConfigDefaultRuleSet { - return ConfigDefaultRuleSetFromJSONTyped(json, false); + return ConfigDefaultRuleSetFromJSONTyped(json, false); } -export function ConfigDefaultRuleSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigDefaultRuleSet { - if (json == null) { - return json; - } - return { - - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function ConfigDefaultRuleSetFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigDefaultRuleSet { + if (json == null) { + return json; + } + return { + properties: json["properties"] == null ? undefined : json["properties"], + }; } export function ConfigDefaultRuleSetToJSON(json: any): ConfigDefaultRuleSet { - return ConfigDefaultRuleSetToJSONTyped(json, false); + return ConfigDefaultRuleSetToJSONTyped(json, false); } -export function ConfigDefaultRuleSetToJSONTyped(value?: ConfigDefaultRuleSet | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigDefaultRuleSetToJSONTyped( + value?: ConfigDefaultRuleSet | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'properties': value['properties'], - }; + return { + properties: value["properties"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts b/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts index f3e1349231..41af20371c 100644 --- a/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts +++ b/src/clients/schemaRegistryRest/models/ConfigOverrideMetadata.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Override value for the metadata to be used during schema registration. * @export * @interface ConfigOverrideMetadata */ export interface ConfigOverrideMetadata { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigOverrideMetadata - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigOverrideMetadata + */ + properties?: object; } /** * Check if a given object implements the ConfigOverrideMetadata interface. */ export function instanceOfConfigOverrideMetadata(value: object): value is ConfigOverrideMetadata { - return true; + return true; } export function ConfigOverrideMetadataFromJSON(json: any): ConfigOverrideMetadata { - return ConfigOverrideMetadataFromJSONTyped(json, false); + return ConfigOverrideMetadataFromJSONTyped(json, false); } -export function ConfigOverrideMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigOverrideMetadata { - if (json == null) { - return json; - } - return { - - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function ConfigOverrideMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigOverrideMetadata { + if (json == null) { + return json; + } + return { + properties: json["properties"] == null ? undefined : json["properties"], + }; } export function ConfigOverrideMetadataToJSON(json: any): ConfigOverrideMetadata { - return ConfigOverrideMetadataToJSONTyped(json, false); + return ConfigOverrideMetadataToJSONTyped(json, false); } -export function ConfigOverrideMetadataToJSONTyped(value?: ConfigOverrideMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigOverrideMetadataToJSONTyped( + value?: ConfigOverrideMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'properties': value['properties'], - }; + return { + properties: value["properties"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts b/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts index ecb5f0e095..873294fb69 100644 --- a/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts +++ b/src/clients/schemaRegistryRest/models/ConfigOverrideRuleSet.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Override value for the ruleSet to be used during schema registration. * @export * @interface ConfigOverrideRuleSet */ export interface ConfigOverrideRuleSet { - /** - * The metadata properties and their new values - * @type {object} - * @memberof ConfigOverrideRuleSet - */ - properties?: object; + /** + * The metadata properties and their new values + * @type {object} + * @memberof ConfigOverrideRuleSet + */ + properties?: object; } /** * Check if a given object implements the ConfigOverrideRuleSet interface. */ export function instanceOfConfigOverrideRuleSet(value: object): value is ConfigOverrideRuleSet { - return true; + return true; } export function ConfigOverrideRuleSetFromJSON(json: any): ConfigOverrideRuleSet { - return ConfigOverrideRuleSetFromJSONTyped(json, false); + return ConfigOverrideRuleSetFromJSONTyped(json, false); } -export function ConfigOverrideRuleSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigOverrideRuleSet { - if (json == null) { - return json; - } - return { - - 'properties': json['properties'] == null ? undefined : json['properties'], - }; +export function ConfigOverrideRuleSetFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigOverrideRuleSet { + if (json == null) { + return json; + } + return { + properties: json["properties"] == null ? undefined : json["properties"], + }; } export function ConfigOverrideRuleSetToJSON(json: any): ConfigOverrideRuleSet { - return ConfigOverrideRuleSetToJSONTyped(json, false); + return ConfigOverrideRuleSetToJSONTyped(json, false); } -export function ConfigOverrideRuleSetToJSONTyped(value?: ConfigOverrideRuleSet | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigOverrideRuleSetToJSONTyped( + value?: ConfigOverrideRuleSet | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'properties': value['properties'], - }; + return { + properties: value["properties"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts b/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts index 8e444c9da6..ddac731a9c 100644 --- a/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts +++ b/src/clients/schemaRegistryRest/models/ConfigUpdateRequest.ts @@ -5,42 +5,42 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConfigDefaultMetadata } from './ConfigDefaultMetadata'; +import { mapValues } from "../runtime"; +import type { ConfigDefaultMetadata } from "./ConfigDefaultMetadata"; import { - ConfigDefaultMetadataFromJSON, - ConfigDefaultMetadataFromJSONTyped, - ConfigDefaultMetadataToJSON, - ConfigDefaultMetadataToJSONTyped, -} from './ConfigDefaultMetadata'; -import type { ConfigOverrideMetadata } from './ConfigOverrideMetadata'; + ConfigDefaultMetadataFromJSON, + ConfigDefaultMetadataFromJSONTyped, + ConfigDefaultMetadataToJSON, + ConfigDefaultMetadataToJSONTyped, +} from "./ConfigDefaultMetadata"; +import type { ConfigOverrideMetadata } from "./ConfigOverrideMetadata"; import { - ConfigOverrideMetadataFromJSON, - ConfigOverrideMetadataFromJSONTyped, - ConfigOverrideMetadataToJSON, - ConfigOverrideMetadataToJSONTyped, -} from './ConfigOverrideMetadata'; -import type { ConfigDefaultRuleSet } from './ConfigDefaultRuleSet'; + ConfigOverrideMetadataFromJSON, + ConfigOverrideMetadataFromJSONTyped, + ConfigOverrideMetadataToJSON, + ConfigOverrideMetadataToJSONTyped, +} from "./ConfigOverrideMetadata"; +import type { ConfigDefaultRuleSet } from "./ConfigDefaultRuleSet"; import { - ConfigDefaultRuleSetFromJSON, - ConfigDefaultRuleSetFromJSONTyped, - ConfigDefaultRuleSetToJSON, - ConfigDefaultRuleSetToJSONTyped, -} from './ConfigDefaultRuleSet'; -import type { ConfigOverrideRuleSet } from './ConfigOverrideRuleSet'; + ConfigDefaultRuleSetFromJSON, + ConfigDefaultRuleSetFromJSONTyped, + ConfigDefaultRuleSetToJSON, + ConfigDefaultRuleSetToJSONTyped, +} from "./ConfigDefaultRuleSet"; +import type { ConfigOverrideRuleSet } from "./ConfigOverrideRuleSet"; import { - ConfigOverrideRuleSetFromJSON, - ConfigOverrideRuleSetFromJSONTyped, - ConfigOverrideRuleSetToJSON, - ConfigOverrideRuleSetToJSONTyped, -} from './ConfigOverrideRuleSet'; + ConfigOverrideRuleSetFromJSON, + ConfigOverrideRuleSetFromJSONTyped, + ConfigOverrideRuleSetToJSON, + ConfigOverrideRuleSetToJSONTyped, +} from "./ConfigOverrideRuleSet"; /** * Config update request @@ -48,108 +48,123 @@ import { * @interface ConfigUpdateRequest */ export interface ConfigUpdateRequest { - /** - * If alias is specified, then this subject is an alias for the subject - * named by the alias. That means that any reference to this subject - * will be replaced by the alias. - * @type {string} - * @memberof ConfigUpdateRequest - */ - alias?: string; - /** - * If true, then schemas are automatically normalized when registered - * or when passed during lookups. This means that clients do not have - * to pass the "normalize" query parameter to have normalization occur. - * @type {boolean} - * @memberof ConfigUpdateRequest - */ - normalize?: boolean; - /** - * Compatibility Level - * @type {string} - * @memberof ConfigUpdateRequest - */ - compatibility?: string; - /** - * Only schemas that belong to the same compatibility group will be - * checked for compatibility. - * @type {string} - * @memberof ConfigUpdateRequest - */ - compatibilityGroup?: string; - /** - * - * @type {ConfigDefaultMetadata} - * @memberof ConfigUpdateRequest - */ - defaultMetadata?: ConfigDefaultMetadata; - /** - * - * @type {ConfigOverrideMetadata} - * @memberof ConfigUpdateRequest - */ - overrideMetadata?: ConfigOverrideMetadata; - /** - * - * @type {ConfigDefaultRuleSet} - * @memberof ConfigUpdateRequest - */ - defaultRuleSet?: ConfigDefaultRuleSet; - /** - * - * @type {ConfigOverrideRuleSet} - * @memberof ConfigUpdateRequest - */ - overrideRuleSet?: ConfigOverrideRuleSet; + /** + * If alias is specified, then this subject is an alias for the subject + * named by the alias. That means that any reference to this subject + * will be replaced by the alias. + * @type {string} + * @memberof ConfigUpdateRequest + */ + alias?: string; + /** + * If true, then schemas are automatically normalized when registered + * or when passed during lookups. This means that clients do not have + * to pass the "normalize" query parameter to have normalization occur. + * @type {boolean} + * @memberof ConfigUpdateRequest + */ + normalize?: boolean; + /** + * Compatibility Level + * @type {string} + * @memberof ConfigUpdateRequest + */ + compatibility?: string; + /** + * Only schemas that belong to the same compatibility group will be + * checked for compatibility. + * @type {string} + * @memberof ConfigUpdateRequest + */ + compatibilityGroup?: string; + /** + * + * @type {ConfigDefaultMetadata} + * @memberof ConfigUpdateRequest + */ + defaultMetadata?: ConfigDefaultMetadata; + /** + * + * @type {ConfigOverrideMetadata} + * @memberof ConfigUpdateRequest + */ + overrideMetadata?: ConfigOverrideMetadata; + /** + * + * @type {ConfigDefaultRuleSet} + * @memberof ConfigUpdateRequest + */ + defaultRuleSet?: ConfigDefaultRuleSet; + /** + * + * @type {ConfigOverrideRuleSet} + * @memberof ConfigUpdateRequest + */ + overrideRuleSet?: ConfigOverrideRuleSet; } /** * Check if a given object implements the ConfigUpdateRequest interface. */ export function instanceOfConfigUpdateRequest(value: object): value is ConfigUpdateRequest { - return true; + return true; } export function ConfigUpdateRequestFromJSON(json: any): ConfigUpdateRequest { - return ConfigUpdateRequestFromJSONTyped(json, false); + return ConfigUpdateRequestFromJSONTyped(json, false); } -export function ConfigUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigUpdateRequest { - if (json == null) { - return json; - } - return { - - 'alias': json['alias'] == null ? undefined : json['alias'], - 'normalize': json['normalize'] == null ? undefined : json['normalize'], - 'compatibility': json['compatibility'] == null ? undefined : json['compatibility'], - 'compatibilityGroup': json['compatibilityGroup'] == null ? undefined : json['compatibilityGroup'], - 'defaultMetadata': json['defaultMetadata'] == null ? undefined : ConfigDefaultMetadataFromJSON(json['defaultMetadata']), - 'overrideMetadata': json['overrideMetadata'] == null ? undefined : ConfigOverrideMetadataFromJSON(json['overrideMetadata']), - 'defaultRuleSet': json['defaultRuleSet'] == null ? undefined : ConfigDefaultRuleSetFromJSON(json['defaultRuleSet']), - 'overrideRuleSet': json['overrideRuleSet'] == null ? undefined : ConfigOverrideRuleSetFromJSON(json['overrideRuleSet']), - }; +export function ConfigUpdateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConfigUpdateRequest { + if (json == null) { + return json; + } + return { + alias: json["alias"] == null ? undefined : json["alias"], + normalize: json["normalize"] == null ? undefined : json["normalize"], + compatibility: json["compatibility"] == null ? undefined : json["compatibility"], + compatibilityGroup: json["compatibilityGroup"] == null ? undefined : json["compatibilityGroup"], + defaultMetadata: + json["defaultMetadata"] == null + ? undefined + : ConfigDefaultMetadataFromJSON(json["defaultMetadata"]), + overrideMetadata: + json["overrideMetadata"] == null + ? undefined + : ConfigOverrideMetadataFromJSON(json["overrideMetadata"]), + defaultRuleSet: + json["defaultRuleSet"] == null + ? undefined + : ConfigDefaultRuleSetFromJSON(json["defaultRuleSet"]), + overrideRuleSet: + json["overrideRuleSet"] == null + ? undefined + : ConfigOverrideRuleSetFromJSON(json["overrideRuleSet"]), + }; } export function ConfigUpdateRequestToJSON(json: any): ConfigUpdateRequest { - return ConfigUpdateRequestToJSONTyped(json, false); + return ConfigUpdateRequestToJSONTyped(json, false); } -export function ConfigUpdateRequestToJSONTyped(value?: ConfigUpdateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConfigUpdateRequestToJSONTyped( + value?: ConfigUpdateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'alias': value['alias'], - 'normalize': value['normalize'], - 'compatibility': value['compatibility'], - 'compatibilityGroup': value['compatibilityGroup'], - 'defaultMetadata': ConfigDefaultMetadataToJSON(value['defaultMetadata']), - 'overrideMetadata': ConfigOverrideMetadataToJSON(value['overrideMetadata']), - 'defaultRuleSet': ConfigDefaultRuleSetToJSON(value['defaultRuleSet']), - 'overrideRuleSet': ConfigOverrideRuleSetToJSON(value['overrideRuleSet']), - }; + return { + alias: value["alias"], + normalize: value["normalize"], + compatibility: value["compatibility"], + compatibilityGroup: value["compatibilityGroup"], + defaultMetadata: ConfigDefaultMetadataToJSON(value["defaultMetadata"]), + overrideMetadata: ConfigOverrideMetadataToJSON(value["overrideMetadata"]), + defaultRuleSet: ConfigDefaultRuleSetToJSON(value["defaultRuleSet"]), + overrideRuleSet: ConfigOverrideRuleSetToJSON(value["overrideRuleSet"]), + }; } - diff --git a/src/clients/schemaRegistryRest/models/CreateDekRequest.ts b/src/clients/schemaRegistryRest/models/CreateDekRequest.ts index 130c0ba9b5..9b6c974929 100644 --- a/src/clients/schemaRegistryRest/models/CreateDekRequest.ts +++ b/src/clients/schemaRegistryRest/models/CreateDekRequest.ts @@ -5,104 +5,107 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CreateDekRequest */ export interface CreateDekRequest { - /** - * Subject of the dek - * @type {string} - * @memberof CreateDekRequest - */ - subject?: string; - /** - * Version of the dek - * @type {number} - * @memberof CreateDekRequest - */ - version?: number; - /** - * Algorithm of the dek - * @type {string} - * @memberof CreateDekRequest - */ - algorithm?: CreateDekRequestAlgorithmEnum; - /** - * Encrypted key material of the dek - * @type {string} - * @memberof CreateDekRequest - */ - encryptedKeyMaterial?: string; - /** - * Whether the dek is deleted - * @type {boolean} - * @memberof CreateDekRequest - */ - deleted?: boolean; + /** + * Subject of the dek + * @type {string} + * @memberof CreateDekRequest + */ + subject?: string; + /** + * Version of the dek + * @type {number} + * @memberof CreateDekRequest + */ + version?: number; + /** + * Algorithm of the dek + * @type {string} + * @memberof CreateDekRequest + */ + algorithm?: CreateDekRequestAlgorithmEnum; + /** + * Encrypted key material of the dek + * @type {string} + * @memberof CreateDekRequest + */ + encryptedKeyMaterial?: string; + /** + * Whether the dek is deleted + * @type {boolean} + * @memberof CreateDekRequest + */ + deleted?: boolean; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum CreateDekRequestAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } - /** * Check if a given object implements the CreateDekRequest interface. */ export function instanceOfCreateDekRequest(value: object): value is CreateDekRequest { - return true; + return true; } export function CreateDekRequestFromJSON(json: any): CreateDekRequest { - return CreateDekRequestFromJSONTyped(json, false); + return CreateDekRequestFromJSONTyped(json, false); } -export function CreateDekRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDekRequest { - if (json == null) { - return json; - } - return { - - 'subject': json['subject'] == null ? undefined : json['subject'], - 'version': json['version'] == null ? undefined : json['version'], - 'algorithm': json['algorithm'] == null ? undefined : json['algorithm'], - 'encryptedKeyMaterial': json['encryptedKeyMaterial'] == null ? undefined : json['encryptedKeyMaterial'], - 'deleted': json['deleted'] == null ? undefined : json['deleted'], - }; +export function CreateDekRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateDekRequest { + if (json == null) { + return json; + } + return { + subject: json["subject"] == null ? undefined : json["subject"], + version: json["version"] == null ? undefined : json["version"], + algorithm: json["algorithm"] == null ? undefined : json["algorithm"], + encryptedKeyMaterial: + json["encryptedKeyMaterial"] == null ? undefined : json["encryptedKeyMaterial"], + deleted: json["deleted"] == null ? undefined : json["deleted"], + }; } export function CreateDekRequestToJSON(json: any): CreateDekRequest { - return CreateDekRequestToJSONTyped(json, false); + return CreateDekRequestToJSONTyped(json, false); } -export function CreateDekRequestToJSONTyped(value?: CreateDekRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateDekRequestToJSONTyped( + value?: CreateDekRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'subject': value['subject'], - 'version': value['version'], - 'algorithm': value['algorithm'], - 'encryptedKeyMaterial': value['encryptedKeyMaterial'], - 'deleted': value['deleted'], - }; + return { + subject: value["subject"], + version: value["version"], + algorithm: value["algorithm"], + encryptedKeyMaterial: value["encryptedKeyMaterial"], + deleted: value["deleted"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/CreateKekRequest.ts b/src/clients/schemaRegistryRest/models/CreateKekRequest.ts index 8045899400..872db50a5a 100644 --- a/src/clients/schemaRegistryRest/models/CreateKekRequest.ts +++ b/src/clients/schemaRegistryRest/models/CreateKekRequest.ts @@ -5,109 +5,112 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CreateKekRequest */ export interface CreateKekRequest { - /** - * Name of the kek - * @type {string} - * @memberof CreateKekRequest - */ - name?: string; - /** - * KMS type of the kek - * @type {string} - * @memberof CreateKekRequest - */ - kmsType?: string; - /** - * KMS key ID of the kek - * @type {string} - * @memberof CreateKekRequest - */ - kmsKeyId?: string; - /** - * Properties of the kek - * @type {{ [key: string]: string; }} - * @memberof CreateKekRequest - */ - kmsProps?: { [key: string]: string; }; - /** - * Description of the kek - * @type {string} - * @memberof CreateKekRequest - */ - doc?: string; - /** - * Whether the kek is shared - * @type {boolean} - * @memberof CreateKekRequest - */ - shared?: boolean; - /** - * Whether the kek is deleted - * @type {boolean} - * @memberof CreateKekRequest - */ - deleted?: boolean; + /** + * Name of the kek + * @type {string} + * @memberof CreateKekRequest + */ + name?: string; + /** + * KMS type of the kek + * @type {string} + * @memberof CreateKekRequest + */ + kmsType?: string; + /** + * KMS key ID of the kek + * @type {string} + * @memberof CreateKekRequest + */ + kmsKeyId?: string; + /** + * Properties of the kek + * @type {{ [key: string]: string; }} + * @memberof CreateKekRequest + */ + kmsProps?: { [key: string]: string }; + /** + * Description of the kek + * @type {string} + * @memberof CreateKekRequest + */ + doc?: string; + /** + * Whether the kek is shared + * @type {boolean} + * @memberof CreateKekRequest + */ + shared?: boolean; + /** + * Whether the kek is deleted + * @type {boolean} + * @memberof CreateKekRequest + */ + deleted?: boolean; } /** * Check if a given object implements the CreateKekRequest interface. */ export function instanceOfCreateKekRequest(value: object): value is CreateKekRequest { - return true; + return true; } export function CreateKekRequestFromJSON(json: any): CreateKekRequest { - return CreateKekRequestFromJSONTyped(json, false); + return CreateKekRequestFromJSONTyped(json, false); } -export function CreateKekRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateKekRequest { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'kmsType': json['kmsType'] == null ? undefined : json['kmsType'], - 'kmsKeyId': json['kmsKeyId'] == null ? undefined : json['kmsKeyId'], - 'kmsProps': json['kmsProps'] == null ? undefined : json['kmsProps'], - 'doc': json['doc'] == null ? undefined : json['doc'], - 'shared': json['shared'] == null ? undefined : json['shared'], - 'deleted': json['deleted'] == null ? undefined : json['deleted'], - }; +export function CreateKekRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateKekRequest { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + kmsType: json["kmsType"] == null ? undefined : json["kmsType"], + kmsKeyId: json["kmsKeyId"] == null ? undefined : json["kmsKeyId"], + kmsProps: json["kmsProps"] == null ? undefined : json["kmsProps"], + doc: json["doc"] == null ? undefined : json["doc"], + shared: json["shared"] == null ? undefined : json["shared"], + deleted: json["deleted"] == null ? undefined : json["deleted"], + }; } export function CreateKekRequestToJSON(json: any): CreateKekRequest { - return CreateKekRequestToJSONTyped(json, false); + return CreateKekRequestToJSONTyped(json, false); } -export function CreateKekRequestToJSONTyped(value?: CreateKekRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CreateKekRequestToJSONTyped( + value?: CreateKekRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'kmsType': value['kmsType'], - 'kmsKeyId': value['kmsKeyId'], - 'kmsProps': value['kmsProps'], - 'doc': value['doc'], - 'shared': value['shared'], - 'deleted': value['deleted'], - }; + return { + name: value["name"], + kmsType: value["kmsType"], + kmsKeyId: value["kmsKeyId"], + kmsProps: value["kmsProps"], + doc: value["doc"], + shared: value["shared"], + deleted: value["deleted"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/Dek.ts b/src/clients/schemaRegistryRest/models/Dek.ts index 1195502ea3..7a4ffa4838 100644 --- a/src/clients/schemaRegistryRest/models/Dek.ts +++ b/src/clients/schemaRegistryRest/models/Dek.ts @@ -5,128 +5,125 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface Dek */ export interface Dek { - /** - * Kek name of the dek - * @type {string} - * @memberof Dek - */ - kekName?: string; - /** - * Subject of the dek - * @type {string} - * @memberof Dek - */ - subject?: string; - /** - * Version of the dek - * @type {number} - * @memberof Dek - */ - version?: number; - /** - * Algorithm of the dek - * @type {string} - * @memberof Dek - */ - algorithm?: DekAlgorithmEnum; - /** - * Encrypted key material of the dek - * @type {string} - * @memberof Dek - */ - encryptedKeyMaterial?: string; - /** - * Raw key material of the dek - * @type {string} - * @memberof Dek - */ - keyMaterial?: string; - /** - * Timestamp of the dek - * @type {number} - * @memberof Dek - */ - ts?: number; - /** - * Whether the dek is deleted - * @type {boolean} - * @memberof Dek - */ - deleted?: boolean; + /** + * Kek name of the dek + * @type {string} + * @memberof Dek + */ + kekName?: string; + /** + * Subject of the dek + * @type {string} + * @memberof Dek + */ + subject?: string; + /** + * Version of the dek + * @type {number} + * @memberof Dek + */ + version?: number; + /** + * Algorithm of the dek + * @type {string} + * @memberof Dek + */ + algorithm?: DekAlgorithmEnum; + /** + * Encrypted key material of the dek + * @type {string} + * @memberof Dek + */ + encryptedKeyMaterial?: string; + /** + * Raw key material of the dek + * @type {string} + * @memberof Dek + */ + keyMaterial?: string; + /** + * Timestamp of the dek + * @type {number} + * @memberof Dek + */ + ts?: number; + /** + * Whether the dek is deleted + * @type {boolean} + * @memberof Dek + */ + deleted?: boolean; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum DekAlgorithmEnum { - Aes128Gcm = 'AES128_GCM', - Aes256Gcm = 'AES256_GCM', - Aes256Siv = 'AES256_SIV' + Aes128Gcm = "AES128_GCM", + Aes256Gcm = "AES256_GCM", + Aes256Siv = "AES256_SIV", } - /** * Check if a given object implements the Dek interface. */ export function instanceOfDek(value: object): value is Dek { - return true; + return true; } export function DekFromJSON(json: any): Dek { - return DekFromJSONTyped(json, false); + return DekFromJSONTyped(json, false); } export function DekFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dek { - if (json == null) { - return json; - } - return { - - 'kekName': json['kekName'] == null ? undefined : json['kekName'], - 'subject': json['subject'] == null ? undefined : json['subject'], - 'version': json['version'] == null ? undefined : json['version'], - 'algorithm': json['algorithm'] == null ? undefined : json['algorithm'], - 'encryptedKeyMaterial': json['encryptedKeyMaterial'] == null ? undefined : json['encryptedKeyMaterial'], - 'keyMaterial': json['keyMaterial'] == null ? undefined : json['keyMaterial'], - 'ts': json['ts'] == null ? undefined : json['ts'], - 'deleted': json['deleted'] == null ? undefined : json['deleted'], - }; + if (json == null) { + return json; + } + return { + kekName: json["kekName"] == null ? undefined : json["kekName"], + subject: json["subject"] == null ? undefined : json["subject"], + version: json["version"] == null ? undefined : json["version"], + algorithm: json["algorithm"] == null ? undefined : json["algorithm"], + encryptedKeyMaterial: + json["encryptedKeyMaterial"] == null ? undefined : json["encryptedKeyMaterial"], + keyMaterial: json["keyMaterial"] == null ? undefined : json["keyMaterial"], + ts: json["ts"] == null ? undefined : json["ts"], + deleted: json["deleted"] == null ? undefined : json["deleted"], + }; } export function DekToJSON(json: any): Dek { - return DekToJSONTyped(json, false); + return DekToJSONTyped(json, false); } export function DekToJSONTyped(value?: Dek | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'kekName': value['kekName'], - 'subject': value['subject'], - 'version': value['version'], - 'algorithm': value['algorithm'], - 'encryptedKeyMaterial': value['encryptedKeyMaterial'], - 'keyMaterial': value['keyMaterial'], - 'ts': value['ts'], - 'deleted': value['deleted'], - }; + return { + kekName: value["kekName"], + subject: value["subject"], + version: value["version"], + algorithm: value["algorithm"], + encryptedKeyMaterial: value["encryptedKeyMaterial"], + keyMaterial: value["keyMaterial"], + ts: value["ts"], + deleted: value["deleted"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ErrorMessage.ts b/src/clients/schemaRegistryRest/models/ErrorMessage.ts index 261bc9afcc..d92c08a1d1 100644 --- a/src/clients/schemaRegistryRest/models/ErrorMessage.ts +++ b/src/clients/schemaRegistryRest/models/ErrorMessage.ts @@ -5,69 +5,69 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Error message * @export * @interface ErrorMessage */ export interface ErrorMessage { - /** - * Error code - * @type {number} - * @memberof ErrorMessage - */ - error_code?: number; - /** - * Detailed error message - * @type {string} - * @memberof ErrorMessage - */ - message?: string; + /** + * Error code + * @type {number} + * @memberof ErrorMessage + */ + error_code?: number; + /** + * Detailed error message + * @type {string} + * @memberof ErrorMessage + */ + message?: string; } /** * Check if a given object implements the ErrorMessage interface. */ export function instanceOfErrorMessage(value: object): value is ErrorMessage { - return true; + return true; } export function ErrorMessageFromJSON(json: any): ErrorMessage { - return ErrorMessageFromJSONTyped(json, false); + return ErrorMessageFromJSONTyped(json, false); } export function ErrorMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorMessage { - if (json == null) { - return json; - } - return { - - 'error_code': json['error_code'] == null ? undefined : json['error_code'], - 'message': json['message'] == null ? undefined : json['message'], - }; + if (json == null) { + return json; + } + return { + error_code: json["error_code"] == null ? undefined : json["error_code"], + message: json["message"] == null ? undefined : json["message"], + }; } export function ErrorMessageToJSON(json: any): ErrorMessage { - return ErrorMessageToJSONTyped(json, false); + return ErrorMessageToJSONTyped(json, false); } -export function ErrorMessageToJSONTyped(value?: ErrorMessage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorMessageToJSONTyped( + value?: ErrorMessage | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error_code': value['error_code'], - 'message': value['message'], - }; + return { + error_code: value["error_code"], + message: value["message"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts b/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts index 99e3e4315c..c404febdf3 100644 --- a/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts +++ b/src/clients/schemaRegistryRest/models/ExporterConfigResponse.ts @@ -5,77 +5,85 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The map containing exporter’s configurations * @export * @interface ExporterConfigResponse */ export interface ExporterConfigResponse { - /** - * Config SR URL - * @type {string} - * @memberof ExporterConfigResponse - */ - schema_registry_url?: string; - /** - * Config SR Auth - * @type {string} - * @memberof ExporterConfigResponse - */ - basic_auth_credentials_source?: string; - /** - * Config SR User Info - * @type {string} - * @memberof ExporterConfigResponse - */ - basic_auth_user_info?: string; + /** + * Config SR URL + * @type {string} + * @memberof ExporterConfigResponse + */ + schema_registry_url?: string; + /** + * Config SR Auth + * @type {string} + * @memberof ExporterConfigResponse + */ + basic_auth_credentials_source?: string; + /** + * Config SR User Info + * @type {string} + * @memberof ExporterConfigResponse + */ + basic_auth_user_info?: string; } /** * Check if a given object implements the ExporterConfigResponse interface. */ export function instanceOfExporterConfigResponse(value: object): value is ExporterConfigResponse { - return true; + return true; } export function ExporterConfigResponseFromJSON(json: any): ExporterConfigResponse { - return ExporterConfigResponseFromJSONTyped(json, false); + return ExporterConfigResponseFromJSONTyped(json, false); } -export function ExporterConfigResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterConfigResponse { - if (json == null) { - return json; - } - return { - - 'schema_registry_url': json['schema.registry.url'] == null ? undefined : json['schema.registry.url'], - 'basic_auth_credentials_source': json['basic.auth.credentials.source'] == null ? undefined : json['basic.auth.credentials.source'], - 'basic_auth_user_info': json['basic.auth.user.info'] == null ? undefined : json['basic.auth.user.info'], - }; +export function ExporterConfigResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExporterConfigResponse { + if (json == null) { + return json; + } + return { + schema_registry_url: + json["schema.registry.url"] == null ? undefined : json["schema.registry.url"], + basic_auth_credentials_source: + json["basic.auth.credentials.source"] == null + ? undefined + : json["basic.auth.credentials.source"], + basic_auth_user_info: + json["basic.auth.user.info"] == null ? undefined : json["basic.auth.user.info"], + }; } export function ExporterConfigResponseToJSON(json: any): ExporterConfigResponse { - return ExporterConfigResponseToJSONTyped(json, false); + return ExporterConfigResponseToJSONTyped(json, false); } -export function ExporterConfigResponseToJSONTyped(value?: ExporterConfigResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExporterConfigResponseToJSONTyped( + value?: ExporterConfigResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'schema.registry.url': value['schema_registry_url'], - 'basic.auth.credentials.source': value['basic_auth_credentials_source'], - 'basic.auth.user.info': value['basic_auth_user_info'], - }; + return { + "schema.registry.url": value["schema_registry_url"], + "basic.auth.credentials.source": value["basic_auth_credentials_source"], + "basic.auth.user.info": value["basic_auth_user_info"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ExporterReference.ts b/src/clients/schemaRegistryRest/models/ExporterReference.ts index 4761dd6133..d14158ed3d 100644 --- a/src/clients/schemaRegistryRest/models/ExporterReference.ts +++ b/src/clients/schemaRegistryRest/models/ExporterReference.ts @@ -5,101 +5,105 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * The format for a typical exporter object * @export * @interface ExporterReference */ export interface ExporterReference { - /** - * Name of the exporter - * @type {string} - * @memberof ExporterReference - */ - name?: string; - /** - * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) - * @type {string} - * @memberof ExporterReference - */ - contextType?: string; - /** - * Customized context of the exporter if contextType equals CUSTOM. - * @type {string} - * @memberof ExporterReference - */ - context?: string; - /** - * Name of each exporter subject - * @type {Array} - * @memberof ExporterReference - */ - subjects?: Array; - /** - * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. - * @type {string} - * @memberof ExporterReference - */ - subjectRenameFormat?: string; - /** - * The map containing exporter’s configurations - * @type {{ [key: string]: string; }} - * @memberof ExporterReference - */ - config?: { [key: string]: string; }; + /** + * Name of the exporter + * @type {string} + * @memberof ExporterReference + */ + name?: string; + /** + * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) + * @type {string} + * @memberof ExporterReference + */ + contextType?: string; + /** + * Customized context of the exporter if contextType equals CUSTOM. + * @type {string} + * @memberof ExporterReference + */ + context?: string; + /** + * Name of each exporter subject + * @type {Array} + * @memberof ExporterReference + */ + subjects?: Array; + /** + * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. + * @type {string} + * @memberof ExporterReference + */ + subjectRenameFormat?: string; + /** + * The map containing exporter’s configurations + * @type {{ [key: string]: string; }} + * @memberof ExporterReference + */ + config?: { [key: string]: string }; } /** * Check if a given object implements the ExporterReference interface. */ export function instanceOfExporterReference(value: object): value is ExporterReference { - return true; + return true; } export function ExporterReferenceFromJSON(json: any): ExporterReference { - return ExporterReferenceFromJSONTyped(json, false); + return ExporterReferenceFromJSONTyped(json, false); } -export function ExporterReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterReference { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'contextType': json['contextType'] == null ? undefined : json['contextType'], - 'context': json['context'] == null ? undefined : json['context'], - 'subjects': json['subjects'] == null ? undefined : json['subjects'], - 'subjectRenameFormat': json['subjectRenameFormat'] == null ? undefined : json['subjectRenameFormat'], - 'config': json['config'] == null ? undefined : json['config'], - }; +export function ExporterReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExporterReference { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + contextType: json["contextType"] == null ? undefined : json["contextType"], + context: json["context"] == null ? undefined : json["context"], + subjects: json["subjects"] == null ? undefined : json["subjects"], + subjectRenameFormat: + json["subjectRenameFormat"] == null ? undefined : json["subjectRenameFormat"], + config: json["config"] == null ? undefined : json["config"], + }; } export function ExporterReferenceToJSON(json: any): ExporterReference { - return ExporterReferenceToJSONTyped(json, false); + return ExporterReferenceToJSONTyped(json, false); } -export function ExporterReferenceToJSONTyped(value?: ExporterReference | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExporterReferenceToJSONTyped( + value?: ExporterReference | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'contextType': value['contextType'], - 'context': value['context'], - 'subjects': value['subjects'], - 'subjectRenameFormat': value['subjectRenameFormat'], - 'config': value['config'], - }; + return { + name: value["name"], + contextType: value["contextType"], + context: value["context"], + subjects: value["subjects"], + subjectRenameFormat: value["subjectRenameFormat"], + config: value["config"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ExporterResponse.ts b/src/clients/schemaRegistryRest/models/ExporterResponse.ts index 79ca83464b..71389a95d7 100644 --- a/src/clients/schemaRegistryRest/models/ExporterResponse.ts +++ b/src/clients/schemaRegistryRest/models/ExporterResponse.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Exporter register response * @export * @interface ExporterResponse */ export interface ExporterResponse { - /** - * Name of the exporter - * @type {string} - * @memberof ExporterResponse - */ - name?: string; + /** + * Name of the exporter + * @type {string} + * @memberof ExporterResponse + */ + name?: string; } /** * Check if a given object implements the ExporterResponse interface. */ export function instanceOfExporterResponse(value: object): value is ExporterResponse { - return true; + return true; } export function ExporterResponseFromJSON(json: any): ExporterResponse { - return ExporterResponseFromJSONTyped(json, false); + return ExporterResponseFromJSONTyped(json, false); } -export function ExporterResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterResponse { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - }; +export function ExporterResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExporterResponse { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + }; } export function ExporterResponseToJSON(json: any): ExporterResponse { - return ExporterResponseToJSONTyped(json, false); + return ExporterResponseToJSONTyped(json, false); } -export function ExporterResponseToJSONTyped(value?: ExporterResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExporterResponseToJSONTyped( + value?: ExporterResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - }; + return { + name: value["name"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts b/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts index b3b5eed74e..62ca2eeb35 100644 --- a/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts +++ b/src/clients/schemaRegistryRest/models/ExporterStatusResponse.ts @@ -5,93 +5,96 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Exporter status get request * @export * @interface ExporterStatusResponse */ export interface ExporterStatusResponse { - /** - * Name of exporter. - * @type {string} - * @memberof ExporterStatusResponse - */ - name?: string; - /** - * State of the exporter. Could be STARTING, RUNNING or PAUSED - * @type {string} - * @memberof ExporterStatusResponse - */ - state?: string; - /** - * Offset of the exporter - * @type {number} - * @memberof ExporterStatusResponse - */ - offset?: number; - /** - * Timestamp of the exporter - * @type {number} - * @memberof ExporterStatusResponse - */ - ts?: number; - /** - * Error trace of the exporter - * @type {string} - * @memberof ExporterStatusResponse - */ - trace?: string; + /** + * Name of exporter. + * @type {string} + * @memberof ExporterStatusResponse + */ + name?: string; + /** + * State of the exporter. Could be STARTING, RUNNING or PAUSED + * @type {string} + * @memberof ExporterStatusResponse + */ + state?: string; + /** + * Offset of the exporter + * @type {number} + * @memberof ExporterStatusResponse + */ + offset?: number; + /** + * Timestamp of the exporter + * @type {number} + * @memberof ExporterStatusResponse + */ + ts?: number; + /** + * Error trace of the exporter + * @type {string} + * @memberof ExporterStatusResponse + */ + trace?: string; } /** * Check if a given object implements the ExporterStatusResponse interface. */ export function instanceOfExporterStatusResponse(value: object): value is ExporterStatusResponse { - return true; + return true; } export function ExporterStatusResponseFromJSON(json: any): ExporterStatusResponse { - return ExporterStatusResponseFromJSONTyped(json, false); + return ExporterStatusResponseFromJSONTyped(json, false); } -export function ExporterStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterStatusResponse { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'state': json['state'] == null ? undefined : json['state'], - 'offset': json['offset'] == null ? undefined : json['offset'], - 'ts': json['ts'] == null ? undefined : json['ts'], - 'trace': json['trace'] == null ? undefined : json['trace'], - }; +export function ExporterStatusResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExporterStatusResponse { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + state: json["state"] == null ? undefined : json["state"], + offset: json["offset"] == null ? undefined : json["offset"], + ts: json["ts"] == null ? undefined : json["ts"], + trace: json["trace"] == null ? undefined : json["trace"], + }; } export function ExporterStatusResponseToJSON(json: any): ExporterStatusResponse { - return ExporterStatusResponseToJSONTyped(json, false); + return ExporterStatusResponseToJSONTyped(json, false); } -export function ExporterStatusResponseToJSONTyped(value?: ExporterStatusResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExporterStatusResponseToJSONTyped( + value?: ExporterStatusResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'state': value['state'], - 'offset': value['offset'], - 'ts': value['ts'], - 'trace': value['trace'], - }; + return { + name: value["name"], + state: value["state"], + offset: value["offset"], + ts: value["ts"], + trace: value["trace"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts b/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts index 5c42ec56b9..f206c8b80c 100644 --- a/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts +++ b/src/clients/schemaRegistryRest/models/ExporterUpdateRequest.ts @@ -5,93 +5,97 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Exporter update request * @export * @interface ExporterUpdateRequest */ export interface ExporterUpdateRequest { - /** - * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) - * @type {string} - * @memberof ExporterUpdateRequest - */ - contextType?: string; - /** - * Customized context of the exporter if contextType equals CUSTOM. - * @type {string} - * @memberof ExporterUpdateRequest - */ - context?: string; - /** - * Name of each exporter subject - * @type {Array} - * @memberof ExporterUpdateRequest - */ - subjects?: Array; - /** - * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. - * @type {string} - * @memberof ExporterUpdateRequest - */ - subjectRenameFormat?: string; - /** - * The map containing exporter’s configurations - * @type {{ [key: string]: string; }} - * @memberof ExporterUpdateRequest - */ - config?: { [key: string]: string; }; + /** + * Context type of the exporter. One of CUSTOM, NONE or AUTO (default) + * @type {string} + * @memberof ExporterUpdateRequest + */ + contextType?: string; + /** + * Customized context of the exporter if contextType equals CUSTOM. + * @type {string} + * @memberof ExporterUpdateRequest + */ + context?: string; + /** + * Name of each exporter subject + * @type {Array} + * @memberof ExporterUpdateRequest + */ + subjects?: Array; + /** + * Format string for the subject name in the destination cluster, which may contain ${subject} as a placeholder for the originating subject name. For example, dc_${subject} for the subject orders will map to the destination subject name dc_orders. + * @type {string} + * @memberof ExporterUpdateRequest + */ + subjectRenameFormat?: string; + /** + * The map containing exporter’s configurations + * @type {{ [key: string]: string; }} + * @memberof ExporterUpdateRequest + */ + config?: { [key: string]: string }; } /** * Check if a given object implements the ExporterUpdateRequest interface. */ export function instanceOfExporterUpdateRequest(value: object): value is ExporterUpdateRequest { - return true; + return true; } export function ExporterUpdateRequestFromJSON(json: any): ExporterUpdateRequest { - return ExporterUpdateRequestFromJSONTyped(json, false); + return ExporterUpdateRequestFromJSONTyped(json, false); } -export function ExporterUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExporterUpdateRequest { - if (json == null) { - return json; - } - return { - - 'contextType': json['contextType'] == null ? undefined : json['contextType'], - 'context': json['context'] == null ? undefined : json['context'], - 'subjects': json['subjects'] == null ? undefined : json['subjects'], - 'subjectRenameFormat': json['subjectRenameFormat'] == null ? undefined : json['subjectRenameFormat'], - 'config': json['config'] == null ? undefined : json['config'], - }; +export function ExporterUpdateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExporterUpdateRequest { + if (json == null) { + return json; + } + return { + contextType: json["contextType"] == null ? undefined : json["contextType"], + context: json["context"] == null ? undefined : json["context"], + subjects: json["subjects"] == null ? undefined : json["subjects"], + subjectRenameFormat: + json["subjectRenameFormat"] == null ? undefined : json["subjectRenameFormat"], + config: json["config"] == null ? undefined : json["config"], + }; } export function ExporterUpdateRequestToJSON(json: any): ExporterUpdateRequest { - return ExporterUpdateRequestToJSONTyped(json, false); + return ExporterUpdateRequestToJSONTyped(json, false); } -export function ExporterUpdateRequestToJSONTyped(value?: ExporterUpdateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExporterUpdateRequestToJSONTyped( + value?: ExporterUpdateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'contextType': value['contextType'], - 'context': value['context'], - 'subjects': value['subjects'], - 'subjectRenameFormat': value['subjectRenameFormat'], - 'config': value['config'], - }; + return { + contextType: value["contextType"], + context: value["context"], + subjects: value["subjects"], + subjectRenameFormat: value["subjectRenameFormat"], + config: value["config"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/Kek.ts b/src/clients/schemaRegistryRest/models/Kek.ts index 84556afc60..af77d45bcc 100644 --- a/src/clients/schemaRegistryRest/models/Kek.ts +++ b/src/clients/schemaRegistryRest/models/Kek.ts @@ -5,117 +5,114 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface Kek */ export interface Kek { - /** - * Name of the kek - * @type {string} - * @memberof Kek - */ - name?: string; - /** - * KMS type of the kek - * @type {string} - * @memberof Kek - */ - kmsType?: string; - /** - * KMS key ID of the kek - * @type {string} - * @memberof Kek - */ - kmsKeyId?: string; - /** - * Properties of the kek - * @type {{ [key: string]: string; }} - * @memberof Kek - */ - kmsProps?: { [key: string]: string; }; - /** - * Description of the kek - * @type {string} - * @memberof Kek - */ - doc?: string; - /** - * Whether the kek is shared - * @type {boolean} - * @memberof Kek - */ - shared?: boolean; - /** - * Timestamp of the kek - * @type {number} - * @memberof Kek - */ - ts?: number; - /** - * Whether the kek is deleted - * @type {boolean} - * @memberof Kek - */ - deleted?: boolean; + /** + * Name of the kek + * @type {string} + * @memberof Kek + */ + name?: string; + /** + * KMS type of the kek + * @type {string} + * @memberof Kek + */ + kmsType?: string; + /** + * KMS key ID of the kek + * @type {string} + * @memberof Kek + */ + kmsKeyId?: string; + /** + * Properties of the kek + * @type {{ [key: string]: string; }} + * @memberof Kek + */ + kmsProps?: { [key: string]: string }; + /** + * Description of the kek + * @type {string} + * @memberof Kek + */ + doc?: string; + /** + * Whether the kek is shared + * @type {boolean} + * @memberof Kek + */ + shared?: boolean; + /** + * Timestamp of the kek + * @type {number} + * @memberof Kek + */ + ts?: number; + /** + * Whether the kek is deleted + * @type {boolean} + * @memberof Kek + */ + deleted?: boolean; } /** * Check if a given object implements the Kek interface. */ export function instanceOfKek(value: object): value is Kek { - return true; + return true; } export function KekFromJSON(json: any): Kek { - return KekFromJSONTyped(json, false); + return KekFromJSONTyped(json, false); } export function KekFromJSONTyped(json: any, ignoreDiscriminator: boolean): Kek { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'kmsType': json['kmsType'] == null ? undefined : json['kmsType'], - 'kmsKeyId': json['kmsKeyId'] == null ? undefined : json['kmsKeyId'], - 'kmsProps': json['kmsProps'] == null ? undefined : json['kmsProps'], - 'doc': json['doc'] == null ? undefined : json['doc'], - 'shared': json['shared'] == null ? undefined : json['shared'], - 'ts': json['ts'] == null ? undefined : json['ts'], - 'deleted': json['deleted'] == null ? undefined : json['deleted'], - }; + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + kmsType: json["kmsType"] == null ? undefined : json["kmsType"], + kmsKeyId: json["kmsKeyId"] == null ? undefined : json["kmsKeyId"], + kmsProps: json["kmsProps"] == null ? undefined : json["kmsProps"], + doc: json["doc"] == null ? undefined : json["doc"], + shared: json["shared"] == null ? undefined : json["shared"], + ts: json["ts"] == null ? undefined : json["ts"], + deleted: json["deleted"] == null ? undefined : json["deleted"], + }; } export function KekToJSON(json: any): Kek { - return KekToJSONTyped(json, false); + return KekToJSONTyped(json, false); } export function KekToJSONTyped(value?: Kek | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'kmsType': value['kmsType'], - 'kmsKeyId': value['kmsKeyId'], - 'kmsProps': value['kmsProps'], - 'doc': value['doc'], - 'shared': value['shared'], - 'ts': value['ts'], - 'deleted': value['deleted'], - }; + return { + name: value["name"], + kmsType: value["kmsType"], + kmsKeyId: value["kmsKeyId"], + kmsProps: value["kmsProps"], + doc: value["doc"], + shared: value["shared"], + ts: value["ts"], + deleted: value["deleted"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/Metadata.ts b/src/clients/schemaRegistryRest/models/Metadata.ts index 5e2dd397a1..d62594e048 100644 --- a/src/clients/schemaRegistryRest/models/Metadata.ts +++ b/src/clients/schemaRegistryRest/models/Metadata.ts @@ -5,77 +5,77 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * User-defined metadata * @export * @interface Metadata */ export interface Metadata { - /** - * - * @type {{ [key: string]: Set; }} - * @memberof Metadata - */ - tags?: { [key: string]: Set; }; - /** - * - * @type {{ [key: string]: string; }} - * @memberof Metadata - */ - properties?: { [key: string]: string; }; - /** - * - * @type {Set} - * @memberof Metadata - */ - sensitive?: Set; + /** + * + * @type {{ [key: string]: Set; }} + * @memberof Metadata + */ + tags?: { [key: string]: Set }; + /** + * + * @type {{ [key: string]: string; }} + * @memberof Metadata + */ + properties?: { [key: string]: string }; + /** + * + * @type {Set} + * @memberof Metadata + */ + sensitive?: Set; } /** * Check if a given object implements the Metadata interface. */ export function instanceOfMetadata(value: object): value is Metadata { - return true; + return true; } export function MetadataFromJSON(json: any): Metadata { - return MetadataFromJSONTyped(json, false); + return MetadataFromJSONTyped(json, false); } export function MetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): Metadata { - if (json == null) { - return json; - } - return { - - 'tags': json['tags'] == null ? undefined : json['tags'], - 'properties': json['properties'] == null ? undefined : json['properties'], - 'sensitive': json['sensitive'] == null ? undefined : new Set(json['sensitive']), - }; + if (json == null) { + return json; + } + return { + tags: json["tags"] == null ? undefined : json["tags"], + properties: json["properties"] == null ? undefined : json["properties"], + sensitive: json["sensitive"] == null ? undefined : new Set(json["sensitive"]), + }; } export function MetadataToJSON(json: any): Metadata { - return MetadataToJSONTyped(json, false); + return MetadataToJSONTyped(json, false); } -export function MetadataToJSONTyped(value?: Metadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function MetadataToJSONTyped( + value?: Metadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'tags': value['tags'], - 'properties': value['properties'], - 'sensitive': value['sensitive'] == null ? undefined : Array.from(value['sensitive'] as Set), - }; + return { + tags: value["tags"], + properties: value["properties"], + sensitive: value["sensitive"] == null ? undefined : Array.from(value["sensitive"] as Set), + }; } - diff --git a/src/clients/schemaRegistryRest/models/Mode.ts b/src/clients/schemaRegistryRest/models/Mode.ts index 26cc10e9d6..d8e1738cf6 100644 --- a/src/clients/schemaRegistryRest/models/Mode.ts +++ b/src/clients/schemaRegistryRest/models/Mode.ts @@ -5,61 +5,58 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Schema Registry operating mode * @export * @interface Mode */ export interface Mode { - /** - * Schema Registry operating mode - * @type {string} - * @memberof Mode - */ - mode?: string; + /** + * Schema Registry operating mode + * @type {string} + * @memberof Mode + */ + mode?: string; } /** * Check if a given object implements the Mode interface. */ export function instanceOfMode(value: object): value is Mode { - return true; + return true; } export function ModeFromJSON(json: any): Mode { - return ModeFromJSONTyped(json, false); + return ModeFromJSONTyped(json, false); } export function ModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mode { - if (json == null) { - return json; - } - return { - - 'mode': json['mode'] == null ? undefined : json['mode'], - }; + if (json == null) { + return json; + } + return { + mode: json["mode"] == null ? undefined : json["mode"], + }; } export function ModeToJSON(json: any): Mode { - return ModeToJSONTyped(json, false); + return ModeToJSONTyped(json, false); } export function ModeToJSONTyped(value?: Mode | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'mode': value['mode'], - }; + return { + mode: value["mode"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts b/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts index ca5254d472..6ffbfaeadf 100644 --- a/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts +++ b/src/clients/schemaRegistryRest/models/ModeUpdateRequest.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Mode update request * @export * @interface ModeUpdateRequest */ export interface ModeUpdateRequest { - /** - * Schema Registry operating mode - * @type {string} - * @memberof ModeUpdateRequest - */ - mode?: string; + /** + * Schema Registry operating mode + * @type {string} + * @memberof ModeUpdateRequest + */ + mode?: string; } /** * Check if a given object implements the ModeUpdateRequest interface. */ export function instanceOfModeUpdateRequest(value: object): value is ModeUpdateRequest { - return true; + return true; } export function ModeUpdateRequestFromJSON(json: any): ModeUpdateRequest { - return ModeUpdateRequestFromJSONTyped(json, false); + return ModeUpdateRequestFromJSONTyped(json, false); } -export function ModeUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModeUpdateRequest { - if (json == null) { - return json; - } - return { - - 'mode': json['mode'] == null ? undefined : json['mode'], - }; +export function ModeUpdateRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ModeUpdateRequest { + if (json == null) { + return json; + } + return { + mode: json["mode"] == null ? undefined : json["mode"], + }; } export function ModeUpdateRequestToJSON(json: any): ModeUpdateRequest { - return ModeUpdateRequestToJSONTyped(json, false); + return ModeUpdateRequestToJSONTyped(json, false); } -export function ModeUpdateRequestToJSONTyped(value?: ModeUpdateRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ModeUpdateRequestToJSONTyped( + value?: ModeUpdateRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'mode': value['mode'], - }; + return { + mode: value["mode"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts b/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts index 7defa60d5a..292e47f991 100644 --- a/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts +++ b/src/clients/schemaRegistryRest/models/RegisterExporterRequest.ts @@ -5,21 +5,21 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ExporterReference } from './ExporterReference'; +import { mapValues } from "../runtime"; +import type { ExporterReference } from "./ExporterReference"; import { - ExporterReferenceFromJSON, - ExporterReferenceFromJSONTyped, - ExporterReferenceToJSON, - ExporterReferenceToJSONTyped, -} from './ExporterReference'; + ExporterReferenceFromJSON, + ExporterReferenceFromJSONTyped, + ExporterReferenceToJSON, + ExporterReferenceToJSONTyped, +} from "./ExporterReference"; /** * Exporter register request @@ -27,47 +27,56 @@ import { * @interface RegisterExporterRequest */ export interface RegisterExporterRequest { - /** - * References to other schemas - * @type {Array} - * @memberof RegisterExporterRequest - */ - references?: Array; + /** + * References to other schemas + * @type {Array} + * @memberof RegisterExporterRequest + */ + references?: Array; } /** * Check if a given object implements the RegisterExporterRequest interface. */ export function instanceOfRegisterExporterRequest(value: object): value is RegisterExporterRequest { - return true; + return true; } export function RegisterExporterRequestFromJSON(json: any): RegisterExporterRequest { - return RegisterExporterRequestFromJSONTyped(json, false); + return RegisterExporterRequestFromJSONTyped(json, false); } -export function RegisterExporterRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterExporterRequest { - if (json == null) { - return json; - } - return { - - 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(ExporterReferenceFromJSON)), - }; +export function RegisterExporterRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RegisterExporterRequest { + if (json == null) { + return json; + } + return { + references: + json["references"] == null + ? undefined + : (json["references"] as Array).map(ExporterReferenceFromJSON), + }; } export function RegisterExporterRequestToJSON(json: any): RegisterExporterRequest { - return RegisterExporterRequestToJSONTyped(json, false); + return RegisterExporterRequestToJSONTyped(json, false); } -export function RegisterExporterRequestToJSONTyped(value?: RegisterExporterRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RegisterExporterRequestToJSONTyped( + value?: RegisterExporterRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(ExporterReferenceToJSON)), - }; + return { + references: + value["references"] == null + ? undefined + : (value["references"] as Array).map(ExporterReferenceToJSON), + }; } - diff --git a/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts b/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts index d3fd7974d6..68648b6999 100644 --- a/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts +++ b/src/clients/schemaRegistryRest/models/RegisterSchemaRequest.ts @@ -5,35 +5,35 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SchemaReference } from './SchemaReference'; +import { mapValues } from "../runtime"; +import type { SchemaReference } from "./SchemaReference"; import { - SchemaReferenceFromJSON, - SchemaReferenceFromJSONTyped, - SchemaReferenceToJSON, - SchemaReferenceToJSONTyped, -} from './SchemaReference'; -import type { RuleSet } from './RuleSet'; + SchemaReferenceFromJSON, + SchemaReferenceFromJSONTyped, + SchemaReferenceToJSON, + SchemaReferenceToJSONTyped, +} from "./SchemaReference"; +import type { RuleSet } from "./RuleSet"; import { - RuleSetFromJSON, - RuleSetFromJSONTyped, - RuleSetToJSON, - RuleSetToJSONTyped, -} from './RuleSet'; -import type { Metadata } from './Metadata'; + RuleSetFromJSON, + RuleSetFromJSONTyped, + RuleSetToJSON, + RuleSetToJSONTyped, +} from "./RuleSet"; +import type { Metadata } from "./Metadata"; import { - MetadataFromJSON, - MetadataFromJSONTyped, - MetadataToJSON, - MetadataToJSONTyped, -} from './Metadata'; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from "./Metadata"; /** * Schema register request @@ -41,95 +41,104 @@ import { * @interface RegisterSchemaRequest */ export interface RegisterSchemaRequest { - /** - * Version number - * @type {number} - * @memberof RegisterSchemaRequest - */ - version?: number; - /** - * Globally unique identifier of the schema - * @type {number} - * @memberof RegisterSchemaRequest - */ - id?: number; - /** - * Schema type - * @type {string} - * @memberof RegisterSchemaRequest - */ - schemaType?: string; - /** - * References to other schemas - * @type {Array} - * @memberof RegisterSchemaRequest - */ - references?: Array; - /** - * Schema definition string - * @type {string} - * @memberof RegisterSchemaRequest - */ - schema?: string; - /** - * - * @type {Metadata} - * @memberof RegisterSchemaRequest - */ - metadata?: Metadata | null; - /** - * - * @type {RuleSet} - * @memberof RegisterSchemaRequest - */ - ruleSet?: RuleSet | null; + /** + * Version number + * @type {number} + * @memberof RegisterSchemaRequest + */ + version?: number; + /** + * Globally unique identifier of the schema + * @type {number} + * @memberof RegisterSchemaRequest + */ + id?: number; + /** + * Schema type + * @type {string} + * @memberof RegisterSchemaRequest + */ + schemaType?: string; + /** + * References to other schemas + * @type {Array} + * @memberof RegisterSchemaRequest + */ + references?: Array; + /** + * Schema definition string + * @type {string} + * @memberof RegisterSchemaRequest + */ + schema?: string; + /** + * + * @type {Metadata} + * @memberof RegisterSchemaRequest + */ + metadata?: Metadata | null; + /** + * + * @type {RuleSet} + * @memberof RegisterSchemaRequest + */ + ruleSet?: RuleSet | null; } /** * Check if a given object implements the RegisterSchemaRequest interface. */ export function instanceOfRegisterSchemaRequest(value: object): value is RegisterSchemaRequest { - return true; + return true; } export function RegisterSchemaRequestFromJSON(json: any): RegisterSchemaRequest { - return RegisterSchemaRequestFromJSONTyped(json, false); + return RegisterSchemaRequestFromJSONTyped(json, false); } -export function RegisterSchemaRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterSchemaRequest { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : json['version'], - 'id': json['id'] == null ? undefined : json['id'], - 'schemaType': json['schemaType'] == null ? undefined : json['schemaType'], - 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(SchemaReferenceFromJSON)), - 'schema': json['schema'] == null ? undefined : json['schema'], - 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), - 'ruleSet': json['ruleSet'] == null ? undefined : RuleSetFromJSON(json['ruleSet']), - }; +export function RegisterSchemaRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RegisterSchemaRequest { + if (json == null) { + return json; + } + return { + version: json["version"] == null ? undefined : json["version"], + id: json["id"] == null ? undefined : json["id"], + schemaType: json["schemaType"] == null ? undefined : json["schemaType"], + references: + json["references"] == null + ? undefined + : (json["references"] as Array).map(SchemaReferenceFromJSON), + schema: json["schema"] == null ? undefined : json["schema"], + metadata: json["metadata"] == null ? undefined : MetadataFromJSON(json["metadata"]), + ruleSet: json["ruleSet"] == null ? undefined : RuleSetFromJSON(json["ruleSet"]), + }; } export function RegisterSchemaRequestToJSON(json: any): RegisterSchemaRequest { - return RegisterSchemaRequestToJSONTyped(json, false); + return RegisterSchemaRequestToJSONTyped(json, false); } -export function RegisterSchemaRequestToJSONTyped(value?: RegisterSchemaRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RegisterSchemaRequestToJSONTyped( + value?: RegisterSchemaRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'version': value['version'], - 'id': value['id'], - 'schemaType': value['schemaType'], - 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(SchemaReferenceToJSON)), - 'schema': value['schema'], - 'metadata': MetadataToJSON(value['metadata']), - 'ruleSet': RuleSetToJSON(value['ruleSet']), - }; + return { + version: value["version"], + id: value["id"], + schemaType: value["schemaType"], + references: + value["references"] == null + ? undefined + : (value["references"] as Array).map(SchemaReferenceToJSON), + schema: value["schema"], + metadata: MetadataToJSON(value["metadata"]), + ruleSet: RuleSetToJSON(value["ruleSet"]), + }; } - diff --git a/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts b/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts index cb29904d18..7c0367efaa 100644 --- a/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts +++ b/src/clients/schemaRegistryRest/models/RegisterSchemaResponse.ts @@ -5,61 +5,64 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Schema register response * @export * @interface RegisterSchemaResponse */ export interface RegisterSchemaResponse { - /** - * Globally unique identifier of the schema - * @type {number} - * @memberof RegisterSchemaResponse - */ - id?: number; + /** + * Globally unique identifier of the schema + * @type {number} + * @memberof RegisterSchemaResponse + */ + id?: number; } /** * Check if a given object implements the RegisterSchemaResponse interface. */ export function instanceOfRegisterSchemaResponse(value: object): value is RegisterSchemaResponse { - return true; + return true; } export function RegisterSchemaResponseFromJSON(json: any): RegisterSchemaResponse { - return RegisterSchemaResponseFromJSONTyped(json, false); + return RegisterSchemaResponseFromJSONTyped(json, false); } -export function RegisterSchemaResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterSchemaResponse { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - }; +export function RegisterSchemaResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RegisterSchemaResponse { + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + }; } export function RegisterSchemaResponseToJSON(json: any): RegisterSchemaResponse { - return RegisterSchemaResponseToJSONTyped(json, false); + return RegisterSchemaResponseToJSONTyped(json, false); } -export function RegisterSchemaResponseToJSONTyped(value?: RegisterSchemaResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RegisterSchemaResponseToJSONTyped( + value?: RegisterSchemaResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - }; + return { + id: value["id"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/Rule.ts b/src/clients/schemaRegistryRest/models/Rule.ts index 97f50a54b8..c71ae14f85 100644 --- a/src/clients/schemaRegistryRest/models/Rule.ts +++ b/src/clients/schemaRegistryRest/models/Rule.ts @@ -5,163 +5,159 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Rule * @export * @interface Rule */ export interface Rule { - /** - * Rule name - * @type {string} - * @memberof Rule - */ - name?: string; - /** - * Rule doc - * @type {string} - * @memberof Rule - */ - doc?: string; - /** - * Rule kind - * @type {string} - * @memberof Rule - */ - kind?: RuleKindEnum; - /** - * Rule mode - * @type {string} - * @memberof Rule - */ - mode?: RuleModeEnum; - /** - * Rule type - * @type {string} - * @memberof Rule - */ - type?: string; - /** - * The tags to which this rule applies - * @type {Set} - * @memberof Rule - */ - tags?: Set; - /** - * Optional params for the rule - * @type {{ [key: string]: string; }} - * @memberof Rule - */ - params?: { [key: string]: string; }; - /** - * Rule expression - * @type {string} - * @memberof Rule - */ - expr?: string; - /** - * Rule action on success - * @type {string} - * @memberof Rule - */ - onSuccess?: string; - /** - * Rule action on failure - * @type {string} - * @memberof Rule - */ - onFailure?: string; - /** - * Whether the rule is disabled - * @type {boolean} - * @memberof Rule - */ - disabled?: boolean; + /** + * Rule name + * @type {string} + * @memberof Rule + */ + name?: string; + /** + * Rule doc + * @type {string} + * @memberof Rule + */ + doc?: string; + /** + * Rule kind + * @type {string} + * @memberof Rule + */ + kind?: RuleKindEnum; + /** + * Rule mode + * @type {string} + * @memberof Rule + */ + mode?: RuleModeEnum; + /** + * Rule type + * @type {string} + * @memberof Rule + */ + type?: string; + /** + * The tags to which this rule applies + * @type {Set} + * @memberof Rule + */ + tags?: Set; + /** + * Optional params for the rule + * @type {{ [key: string]: string; }} + * @memberof Rule + */ + params?: { [key: string]: string }; + /** + * Rule expression + * @type {string} + * @memberof Rule + */ + expr?: string; + /** + * Rule action on success + * @type {string} + * @memberof Rule + */ + onSuccess?: string; + /** + * Rule action on failure + * @type {string} + * @memberof Rule + */ + onFailure?: string; + /** + * Whether the rule is disabled + * @type {boolean} + * @memberof Rule + */ + disabled?: boolean; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum RuleKindEnum { - Transform = 'TRANSFORM', - Condition = 'CONDITION' + Transform = "TRANSFORM", + Condition = "CONDITION", } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum RuleModeEnum { - Upgrade = 'UPGRADE', - Downgrade = 'DOWNGRADE', - Updown = 'UPDOWN', - Write = 'WRITE', - Read = 'READ', - Writeread = 'WRITEREAD' + Upgrade = "UPGRADE", + Downgrade = "DOWNGRADE", + Updown = "UPDOWN", + Write = "WRITE", + Read = "READ", + Writeread = "WRITEREAD", } - /** * Check if a given object implements the Rule interface. */ export function instanceOfRule(value: object): value is Rule { - return true; + return true; } export function RuleFromJSON(json: any): Rule { - return RuleFromJSONTyped(json, false); + return RuleFromJSONTyped(json, false); } export function RuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Rule { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'doc': json['doc'] == null ? undefined : json['doc'], - 'kind': json['kind'] == null ? undefined : json['kind'], - 'mode': json['mode'] == null ? undefined : json['mode'], - 'type': json['type'] == null ? undefined : json['type'], - 'tags': json['tags'] == null ? undefined : new Set(json['tags']), - 'params': json['params'] == null ? undefined : json['params'], - 'expr': json['expr'] == null ? undefined : json['expr'], - 'onSuccess': json['onSuccess'] == null ? undefined : json['onSuccess'], - 'onFailure': json['onFailure'] == null ? undefined : json['onFailure'], - 'disabled': json['disabled'] == null ? undefined : json['disabled'], - }; + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + doc: json["doc"] == null ? undefined : json["doc"], + kind: json["kind"] == null ? undefined : json["kind"], + mode: json["mode"] == null ? undefined : json["mode"], + type: json["type"] == null ? undefined : json["type"], + tags: json["tags"] == null ? undefined : new Set(json["tags"]), + params: json["params"] == null ? undefined : json["params"], + expr: json["expr"] == null ? undefined : json["expr"], + onSuccess: json["onSuccess"] == null ? undefined : json["onSuccess"], + onFailure: json["onFailure"] == null ? undefined : json["onFailure"], + disabled: json["disabled"] == null ? undefined : json["disabled"], + }; } export function RuleToJSON(json: any): Rule { - return RuleToJSONTyped(json, false); + return RuleToJSONTyped(json, false); } export function RuleToJSONTyped(value?: Rule | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'doc': value['doc'], - 'kind': value['kind'], - 'mode': value['mode'], - 'type': value['type'], - 'tags': value['tags'] == null ? undefined : Array.from(value['tags'] as Set), - 'params': value['params'], - 'expr': value['expr'], - 'onSuccess': value['onSuccess'], - 'onFailure': value['onFailure'], - 'disabled': value['disabled'], - }; + return { + name: value["name"], + doc: value["doc"], + kind: value["kind"], + mode: value["mode"], + type: value["type"], + tags: value["tags"] == null ? undefined : Array.from(value["tags"] as Set), + params: value["params"], + expr: value["expr"], + onSuccess: value["onSuccess"], + onFailure: value["onFailure"], + disabled: value["disabled"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/RuleSet.ts b/src/clients/schemaRegistryRest/models/RuleSet.ts index b06ed896de..ea644bb892 100644 --- a/src/clients/schemaRegistryRest/models/RuleSet.ts +++ b/src/clients/schemaRegistryRest/models/RuleSet.ts @@ -5,21 +5,16 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { Rule } from './Rule'; -import { - RuleFromJSON, - RuleFromJSONTyped, - RuleToJSON, - RuleToJSONTyped, -} from './Rule'; +import { mapValues } from "../runtime"; +import type { Rule } from "./Rule"; +import { RuleFromJSON, RuleFromJSONTyped, RuleToJSON, RuleToJSONTyped } from "./Rule"; /** * Schema rule set @@ -27,55 +22,67 @@ import { * @interface RuleSet */ export interface RuleSet { - /** - * - * @type {Array} - * @memberof RuleSet - */ - migrationRules?: Array; - /** - * - * @type {Array} - * @memberof RuleSet - */ - domainRules?: Array; + /** + * + * @type {Array} + * @memberof RuleSet + */ + migrationRules?: Array; + /** + * + * @type {Array} + * @memberof RuleSet + */ + domainRules?: Array; } /** * Check if a given object implements the RuleSet interface. */ export function instanceOfRuleSet(value: object): value is RuleSet { - return true; + return true; } export function RuleSetFromJSON(json: any): RuleSet { - return RuleSetFromJSONTyped(json, false); + return RuleSetFromJSONTyped(json, false); } export function RuleSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): RuleSet { - if (json == null) { - return json; - } - return { - - 'migrationRules': json['migrationRules'] == null ? undefined : ((json['migrationRules'] as Array).map(RuleFromJSON)), - 'domainRules': json['domainRules'] == null ? undefined : ((json['domainRules'] as Array).map(RuleFromJSON)), - }; + if (json == null) { + return json; + } + return { + migrationRules: + json["migrationRules"] == null + ? undefined + : (json["migrationRules"] as Array).map(RuleFromJSON), + domainRules: + json["domainRules"] == null + ? undefined + : (json["domainRules"] as Array).map(RuleFromJSON), + }; } export function RuleSetToJSON(json: any): RuleSet { - return RuleSetToJSONTyped(json, false); + return RuleSetToJSONTyped(json, false); } -export function RuleSetToJSONTyped(value?: RuleSet | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RuleSetToJSONTyped( + value?: RuleSet | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'migrationRules': value['migrationRules'] == null ? undefined : ((value['migrationRules'] as Array).map(RuleToJSON)), - 'domainRules': value['domainRules'] == null ? undefined : ((value['domainRules'] as Array).map(RuleToJSON)), - }; + return { + migrationRules: + value["migrationRules"] == null + ? undefined + : (value["migrationRules"] as Array).map(RuleToJSON), + domainRules: + value["domainRules"] == null + ? undefined + : (value["domainRules"] as Array).map(RuleToJSON), + }; } - diff --git a/src/clients/schemaRegistryRest/models/Schema.ts b/src/clients/schemaRegistryRest/models/Schema.ts index 37cd97653b..fa3b5fcb64 100644 --- a/src/clients/schemaRegistryRest/models/Schema.ts +++ b/src/clients/schemaRegistryRest/models/Schema.ts @@ -5,35 +5,35 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SchemaReference } from './SchemaReference'; +import { mapValues } from "../runtime"; +import type { SchemaReference } from "./SchemaReference"; import { - SchemaReferenceFromJSON, - SchemaReferenceFromJSONTyped, - SchemaReferenceToJSON, - SchemaReferenceToJSONTyped, -} from './SchemaReference'; -import type { RuleSet } from './RuleSet'; + SchemaReferenceFromJSON, + SchemaReferenceFromJSONTyped, + SchemaReferenceToJSON, + SchemaReferenceToJSONTyped, +} from "./SchemaReference"; +import type { RuleSet } from "./RuleSet"; import { - RuleSetFromJSON, - RuleSetFromJSONTyped, - RuleSetToJSON, - RuleSetToJSONTyped, -} from './RuleSet'; -import type { Metadata } from './Metadata'; + RuleSetFromJSON, + RuleSetFromJSONTyped, + RuleSetToJSON, + RuleSetToJSONTyped, +} from "./RuleSet"; +import type { Metadata } from "./Metadata"; import { - MetadataFromJSON, - MetadataFromJSONTyped, - MetadataToJSON, - MetadataToJSONTyped, -} from './Metadata'; + MetadataFromJSON, + MetadataFromJSONTyped, + MetadataToJSON, + MetadataToJSONTyped, +} from "./Metadata"; /** * Schema @@ -41,103 +41,109 @@ import { * @interface Schema */ export interface Schema { - /** - * Name of the subject - * @type {string} - * @memberof Schema - */ - subject?: string; - /** - * Version number - * @type {number} - * @memberof Schema - */ - version?: number; - /** - * Globally unique identifier of the schema - * @type {number} - * @memberof Schema - */ - id?: number; - /** - * Schema type - * @type {string} - * @memberof Schema - */ - schemaType?: string; - /** - * References to other schemas - * @type {Array} - * @memberof Schema - */ - references?: Array; - /** - * Schema definition string - * @type {string} - * @memberof Schema - */ - schema?: string; - /** - * - * @type {Metadata} - * @memberof Schema - */ - metadata?: Metadata | null; - /** - * - * @type {RuleSet} - * @memberof Schema - */ - ruleSet?: RuleSet | null; + /** + * Name of the subject + * @type {string} + * @memberof Schema + */ + subject?: string; + /** + * Version number + * @type {number} + * @memberof Schema + */ + version?: number; + /** + * Globally unique identifier of the schema + * @type {number} + * @memberof Schema + */ + id?: number; + /** + * Schema type + * @type {string} + * @memberof Schema + */ + schemaType?: string; + /** + * References to other schemas + * @type {Array} + * @memberof Schema + */ + references?: Array; + /** + * Schema definition string + * @type {string} + * @memberof Schema + */ + schema?: string; + /** + * + * @type {Metadata} + * @memberof Schema + */ + metadata?: Metadata | null; + /** + * + * @type {RuleSet} + * @memberof Schema + */ + ruleSet?: RuleSet | null; } /** * Check if a given object implements the Schema interface. */ export function instanceOfSchema(value: object): value is Schema { - return true; + return true; } export function SchemaFromJSON(json: any): Schema { - return SchemaFromJSONTyped(json, false); + return SchemaFromJSONTyped(json, false); } export function SchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): Schema { - if (json == null) { - return json; - } - return { - - 'subject': json['subject'] == null ? undefined : json['subject'], - 'version': json['version'] == null ? undefined : json['version'], - 'id': json['id'] == null ? undefined : json['id'], - 'schemaType': json['schemaType'] == null ? undefined : json['schemaType'], - 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(SchemaReferenceFromJSON)), - 'schema': json['schema'] == null ? undefined : json['schema'], - 'metadata': json['metadata'] == null ? undefined : MetadataFromJSON(json['metadata']), - 'ruleSet': json['ruleSet'] == null ? undefined : RuleSetFromJSON(json['ruleSet']), - }; + if (json == null) { + return json; + } + return { + subject: json["subject"] == null ? undefined : json["subject"], + version: json["version"] == null ? undefined : json["version"], + id: json["id"] == null ? undefined : json["id"], + schemaType: json["schemaType"] == null ? undefined : json["schemaType"], + references: + json["references"] == null + ? undefined + : (json["references"] as Array).map(SchemaReferenceFromJSON), + schema: json["schema"] == null ? undefined : json["schema"], + metadata: json["metadata"] == null ? undefined : MetadataFromJSON(json["metadata"]), + ruleSet: json["ruleSet"] == null ? undefined : RuleSetFromJSON(json["ruleSet"]), + }; } export function SchemaToJSON(json: any): Schema { - return SchemaToJSONTyped(json, false); + return SchemaToJSONTyped(json, false); } -export function SchemaToJSONTyped(value?: Schema | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SchemaToJSONTyped( + value?: Schema | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'subject': value['subject'], - 'version': value['version'], - 'id': value['id'], - 'schemaType': value['schemaType'], - 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(SchemaReferenceToJSON)), - 'schema': value['schema'], - 'metadata': MetadataToJSON(value['metadata']), - 'ruleSet': RuleSetToJSON(value['ruleSet']), - }; + return { + subject: value["subject"], + version: value["version"], + id: value["id"], + schemaType: value["schemaType"], + references: + value["references"] == null + ? undefined + : (value["references"] as Array).map(SchemaReferenceToJSON), + schema: value["schema"], + metadata: MetadataToJSON(value["metadata"]), + ruleSet: RuleSetToJSON(value["ruleSet"]), + }; } - diff --git a/src/clients/schemaRegistryRest/models/SchemaReference.ts b/src/clients/schemaRegistryRest/models/SchemaReference.ts index 09b79b9f32..22f25ef9c8 100644 --- a/src/clients/schemaRegistryRest/models/SchemaReference.ts +++ b/src/clients/schemaRegistryRest/models/SchemaReference.ts @@ -5,77 +5,80 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Schema reference * @export * @interface SchemaReference */ export interface SchemaReference { - /** - * Reference name - * @type {string} - * @memberof SchemaReference - */ - name?: string; - /** - * Name of the referenced subject - * @type {string} - * @memberof SchemaReference - */ - subject?: string; - /** - * Version number of the referenced subject - * @type {number} - * @memberof SchemaReference - */ - version?: number; + /** + * Reference name + * @type {string} + * @memberof SchemaReference + */ + name?: string; + /** + * Name of the referenced subject + * @type {string} + * @memberof SchemaReference + */ + subject?: string; + /** + * Version number of the referenced subject + * @type {number} + * @memberof SchemaReference + */ + version?: number; } /** * Check if a given object implements the SchemaReference interface. */ export function instanceOfSchemaReference(value: object): value is SchemaReference { - return true; + return true; } export function SchemaReferenceFromJSON(json: any): SchemaReference { - return SchemaReferenceFromJSONTyped(json, false); + return SchemaReferenceFromJSONTyped(json, false); } -export function SchemaReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaReference { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'subject': json['subject'] == null ? undefined : json['subject'], - 'version': json['version'] == null ? undefined : json['version'], - }; +export function SchemaReferenceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SchemaReference { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + subject: json["subject"] == null ? undefined : json["subject"], + version: json["version"] == null ? undefined : json["version"], + }; } export function SchemaReferenceToJSON(json: any): SchemaReference { - return SchemaReferenceToJSONTyped(json, false); + return SchemaReferenceToJSONTyped(json, false); } -export function SchemaReferenceToJSONTyped(value?: SchemaReference | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SchemaReferenceToJSONTyped( + value?: SchemaReference | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'subject': value['subject'], - 'version': value['version'], - }; + return { + name: value["name"], + subject: value["subject"], + version: value["version"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/SchemaString.ts b/src/clients/schemaRegistryRest/models/SchemaString.ts index 9a4c3560a2..94d50e6379 100644 --- a/src/clients/schemaRegistryRest/models/SchemaString.ts +++ b/src/clients/schemaRegistryRest/models/SchemaString.ts @@ -5,21 +5,21 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SchemaReference } from './SchemaReference'; +import { mapValues } from "../runtime"; +import type { SchemaReference } from "./SchemaReference"; import { - SchemaReferenceFromJSON, - SchemaReferenceFromJSONTyped, - SchemaReferenceToJSON, - SchemaReferenceToJSONTyped, -} from './SchemaReference'; + SchemaReferenceFromJSON, + SchemaReferenceFromJSONTyped, + SchemaReferenceToJSON, + SchemaReferenceToJSONTyped, +} from "./SchemaReference"; /** * Schema definition @@ -27,71 +27,77 @@ import { * @interface SchemaString */ export interface SchemaString { - /** - * Schema type - * @type {string} - * @memberof SchemaString - */ - schemaType?: string; - /** - * Schema string identified by the ID - * @type {string} - * @memberof SchemaString - */ - schema?: string; - /** - * References to other schemas - * @type {Array} - * @memberof SchemaString - */ - references?: Array; - /** - * Maximum ID - * @type {number} - * @memberof SchemaString - */ - maxId?: number; + /** + * Schema type + * @type {string} + * @memberof SchemaString + */ + schemaType?: string; + /** + * Schema string identified by the ID + * @type {string} + * @memberof SchemaString + */ + schema?: string; + /** + * References to other schemas + * @type {Array} + * @memberof SchemaString + */ + references?: Array; + /** + * Maximum ID + * @type {number} + * @memberof SchemaString + */ + maxId?: number; } /** * Check if a given object implements the SchemaString interface. */ export function instanceOfSchemaString(value: object): value is SchemaString { - return true; + return true; } export function SchemaStringFromJSON(json: any): SchemaString { - return SchemaStringFromJSONTyped(json, false); + return SchemaStringFromJSONTyped(json, false); } export function SchemaStringFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaString { - if (json == null) { - return json; - } - return { - - 'schemaType': json['schemaType'] == null ? undefined : json['schemaType'], - 'schema': json['schema'] == null ? undefined : json['schema'], - 'references': json['references'] == null ? undefined : ((json['references'] as Array).map(SchemaReferenceFromJSON)), - 'maxId': json['maxId'] == null ? undefined : json['maxId'], - }; + if (json == null) { + return json; + } + return { + schemaType: json["schemaType"] == null ? undefined : json["schemaType"], + schema: json["schema"] == null ? undefined : json["schema"], + references: + json["references"] == null + ? undefined + : (json["references"] as Array).map(SchemaReferenceFromJSON), + maxId: json["maxId"] == null ? undefined : json["maxId"], + }; } export function SchemaStringToJSON(json: any): SchemaString { - return SchemaStringToJSONTyped(json, false); + return SchemaStringToJSONTyped(json, false); } -export function SchemaStringToJSONTyped(value?: SchemaString | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SchemaStringToJSONTyped( + value?: SchemaString | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'schemaType': value['schemaType'], - 'schema': value['schema'], - 'references': value['references'] == null ? undefined : ((value['references'] as Array).map(SchemaReferenceToJSON)), - 'maxId': value['maxId'], - }; + return { + schemaType: value["schemaType"], + schema: value["schema"], + references: + value["references"] == null + ? undefined + : (value["references"] as Array).map(SchemaReferenceToJSON), + maxId: value["maxId"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/SubjectVersion.ts b/src/clients/schemaRegistryRest/models/SubjectVersion.ts index 2fec622fc9..22101e773d 100644 --- a/src/clients/schemaRegistryRest/models/SubjectVersion.ts +++ b/src/clients/schemaRegistryRest/models/SubjectVersion.ts @@ -5,69 +5,72 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Subject version pair * @export * @interface SubjectVersion */ export interface SubjectVersion { - /** - * Name of the subject - * @type {string} - * @memberof SubjectVersion - */ - subject?: string; - /** - * Version number - * @type {number} - * @memberof SubjectVersion - */ - version?: number; + /** + * Name of the subject + * @type {string} + * @memberof SubjectVersion + */ + subject?: string; + /** + * Version number + * @type {number} + * @memberof SubjectVersion + */ + version?: number; } /** * Check if a given object implements the SubjectVersion interface. */ export function instanceOfSubjectVersion(value: object): value is SubjectVersion { - return true; + return true; } export function SubjectVersionFromJSON(json: any): SubjectVersion { - return SubjectVersionFromJSONTyped(json, false); + return SubjectVersionFromJSONTyped(json, false); } -export function SubjectVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubjectVersion { - if (json == null) { - return json; - } - return { - - 'subject': json['subject'] == null ? undefined : json['subject'], - 'version': json['version'] == null ? undefined : json['version'], - }; +export function SubjectVersionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SubjectVersion { + if (json == null) { + return json; + } + return { + subject: json["subject"] == null ? undefined : json["subject"], + version: json["version"] == null ? undefined : json["version"], + }; } export function SubjectVersionToJSON(json: any): SubjectVersion { - return SubjectVersionToJSONTyped(json, false); + return SubjectVersionToJSONTyped(json, false); } -export function SubjectVersionToJSONTyped(value?: SubjectVersion | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SubjectVersionToJSONTyped( + value?: SubjectVersion | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'subject': value['subject'], - 'version': value['version'], - }; + return { + subject: value["subject"], + version: value["version"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts b/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts index 206febbb8f..a4d566e671 100644 --- a/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts +++ b/src/clients/schemaRegistryRest/models/UpdateKekRequest.ts @@ -5,77 +5,80 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UpdateKekRequest */ export interface UpdateKekRequest { - /** - * Properties of the kek - * @type {{ [key: string]: string; }} - * @memberof UpdateKekRequest - */ - kmsProps?: { [key: string]: string; }; - /** - * Description of the kek - * @type {string} - * @memberof UpdateKekRequest - */ - doc?: string; - /** - * Whether the kek is shared - * @type {boolean} - * @memberof UpdateKekRequest - */ - shared?: boolean; + /** + * Properties of the kek + * @type {{ [key: string]: string; }} + * @memberof UpdateKekRequest + */ + kmsProps?: { [key: string]: string }; + /** + * Description of the kek + * @type {string} + * @memberof UpdateKekRequest + */ + doc?: string; + /** + * Whether the kek is shared + * @type {boolean} + * @memberof UpdateKekRequest + */ + shared?: boolean; } /** * Check if a given object implements the UpdateKekRequest interface. */ export function instanceOfUpdateKekRequest(value: object): value is UpdateKekRequest { - return true; + return true; } export function UpdateKekRequestFromJSON(json: any): UpdateKekRequest { - return UpdateKekRequestFromJSONTyped(json, false); + return UpdateKekRequestFromJSONTyped(json, false); } -export function UpdateKekRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateKekRequest { - if (json == null) { - return json; - } - return { - - 'kmsProps': json['kmsProps'] == null ? undefined : json['kmsProps'], - 'doc': json['doc'] == null ? undefined : json['doc'], - 'shared': json['shared'] == null ? undefined : json['shared'], - }; +export function UpdateKekRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateKekRequest { + if (json == null) { + return json; + } + return { + kmsProps: json["kmsProps"] == null ? undefined : json["kmsProps"], + doc: json["doc"] == null ? undefined : json["doc"], + shared: json["shared"] == null ? undefined : json["shared"], + }; } export function UpdateKekRequestToJSON(json: any): UpdateKekRequest { - return UpdateKekRequestToJSONTyped(json, false); + return UpdateKekRequestToJSONTyped(json, false); } -export function UpdateKekRequestToJSONTyped(value?: UpdateKekRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UpdateKekRequestToJSONTyped( + value?: UpdateKekRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kmsProps': value['kmsProps'], - 'doc': value['doc'], - 'shared': value['shared'], - }; + return { + kmsProps: value["kmsProps"], + doc: value["doc"], + shared: value["shared"], + }; } - diff --git a/src/clients/schemaRegistryRest/models/index.ts b/src/clients/schemaRegistryRest/models/index.ts index e8902c5498..3882144773 100644 --- a/src/clients/schemaRegistryRest/models/index.ts +++ b/src/clients/schemaRegistryRest/models/index.ts @@ -1,33 +1,33 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ClusterConfig'; -export * from './CompatibilityCheckResponse'; -export * from './Config'; -export * from './ConfigDefaultMetadata'; -export * from './ConfigDefaultRuleSet'; -export * from './ConfigOverrideMetadata'; -export * from './ConfigOverrideRuleSet'; -export * from './ConfigUpdateRequest'; -export * from './CreateDekRequest'; -export * from './CreateKekRequest'; -export * from './Dek'; -export * from './ErrorMessage'; -export * from './ExporterConfigResponse'; -export * from './ExporterReference'; -export * from './ExporterResponse'; -export * from './ExporterStatusResponse'; -export * from './ExporterUpdateRequest'; -export * from './Kek'; -export * from './Metadata'; -export * from './Mode'; -export * from './ModeUpdateRequest'; -export * from './RegisterExporterRequest'; -export * from './RegisterSchemaRequest'; -export * from './RegisterSchemaResponse'; -export * from './Rule'; -export * from './RuleSet'; -export * from './Schema'; -export * from './SchemaReference'; -export * from './SchemaString'; -export * from './SubjectVersion'; -export * from './UpdateKekRequest'; +export * from "./ClusterConfig"; +export * from "./CompatibilityCheckResponse"; +export * from "./Config"; +export * from "./ConfigDefaultMetadata"; +export * from "./ConfigDefaultRuleSet"; +export * from "./ConfigOverrideMetadata"; +export * from "./ConfigOverrideRuleSet"; +export * from "./ConfigUpdateRequest"; +export * from "./CreateDekRequest"; +export * from "./CreateKekRequest"; +export * from "./Dek"; +export * from "./ErrorMessage"; +export * from "./ExporterConfigResponse"; +export * from "./ExporterReference"; +export * from "./ExporterResponse"; +export * from "./ExporterStatusResponse"; +export * from "./ExporterUpdateRequest"; +export * from "./Kek"; +export * from "./Metadata"; +export * from "./Mode"; +export * from "./ModeUpdateRequest"; +export * from "./RegisterExporterRequest"; +export * from "./RegisterSchemaRequest"; +export * from "./RegisterSchemaResponse"; +export * from "./Rule"; +export * from "./RuleSet"; +export * from "./Schema"; +export * from "./SchemaReference"; +export * from "./SchemaString"; +export * from "./SubjectVersion"; +export * from "./UpdateKekRequest"; diff --git a/src/clients/schemaRegistryRest/runtime.ts b/src/clients/schemaRegistryRest/runtime.ts index ded6f84996..0b1335049f 100644 --- a/src/clients/schemaRegistryRest/runtime.ts +++ b/src/clients/schemaRegistryRest/runtime.ts @@ -5,83 +5,85 @@ * REST API for the Schema Registry * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://psrc-00000.region.provider.confluent.cloud".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts b/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts index 69d7b9a988..5624662793 100644 --- a/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts +++ b/src/clients/sidecar/apis/ConfluentCloudProduceRecordsResourceApi.ts @@ -12,95 +12,106 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ProduceRequest, - ProduceResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ProduceRequest, ProduceResponse } from "../models/index"; import { - ProduceRequestFromJSON, - ProduceRequestToJSON, - ProduceResponseFromJSON, - ProduceResponseToJSON, -} from '../models/index'; + ProduceRequestFromJSON, + ProduceRequestToJSON, + ProduceResponseFromJSON, + ProduceResponseToJSON, +} from "../models/index"; export interface GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest { - cluster_id: string; - topic_name: string; - x_connection_id: string; - ProduceRequest: ProduceRequest; - dry_run?: boolean; + cluster_id: string; + topic_name: string; + x_connection_id: string; + ProduceRequest: ProduceRequest; + dry_run?: boolean; } /** - * + * */ export class ConfluentCloudProduceRecordsResourceApi extends runtime.BaseAPI { + /** + * Produce Record + */ + async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw( + requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', + ); + } - /** - * Produce Record - */ - async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' - ); - } - - if (requestParameters['x_connection_id'] == null) { - throw new runtime.RequiredError( - 'x_connection_id', - 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' - ); - } - - if (requestParameters['ProduceRequest'] == null) { - throw new runtime.RequiredError( - 'ProduceRequest', - 'Required parameter "ProduceRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().' - ); - } - - const queryParameters: any = {}; + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', + ); + } - if (requestParameters['dry_run'] != null) { - queryParameters['dry_run'] = requestParameters['dry_run']; - } + if (requestParameters["x_connection_id"] == null) { + throw new runtime.RequiredError( + "x_connection_id", + 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["ProduceRequest"] == null) { + throw new runtime.RequiredError( + "ProduceRequest", + 'Required parameter "ProduceRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost().', + ); + } - headerParameters['Content-Type'] = 'application/json'; + const queryParameters: any = {}; - if (requestParameters['x_connection_id'] != null) { - headerParameters['x-connection-id'] = String(requestParameters['x_connection_id']); - } + if (requestParameters["dry_run"] != null) { + queryParameters["dry_run"] = requestParameters["dry_run"]; + } - const response = await this.request({ - path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/records`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ProduceRequestToJSON(requestParameters['ProduceRequest']), - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); - } + headerParameters["Content-Type"] = "application/json"; - /** - * Produce Record - */ - async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["x_connection_id"] != null) { + headerParameters["x-connection-id"] = String(requestParameters["x_connection_id"]); } + const response = await this.request( + { + path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/records` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ProduceRequestToJSON(requestParameters["ProduceRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProduceResponseFromJSON(jsonValue)); + } + + /** + * Produce Record + */ + async gatewayV1ClustersClusterIdTopicsTopicNameRecordsPost( + requestParameters: GatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ClustersClusterIdTopicsTopicNameRecordsPostRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/ConnectionsResourceApi.ts b/src/clients/sidecar/apis/ConnectionsResourceApi.ts index 1b6a0a884b..e298ea3c0c 100644 --- a/src/clients/sidecar/apis/ConnectionsResourceApi.ts +++ b/src/clients/sidecar/apis/ConnectionsResourceApi.ts @@ -12,268 +12,324 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - Connection, - ConnectionSpec, - ConnectionsList, - Failure, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { Connection, ConnectionSpec, ConnectionsList, Failure } from "../models/index"; import { - ConnectionFromJSON, - ConnectionToJSON, - ConnectionSpecFromJSON, - ConnectionSpecToJSON, - ConnectionsListFromJSON, - ConnectionsListToJSON, - FailureFromJSON, - FailureToJSON, -} from '../models/index'; + ConnectionFromJSON, + ConnectionToJSON, + ConnectionSpecFromJSON, + ConnectionSpecToJSON, + ConnectionsListFromJSON, + ConnectionsListToJSON, + FailureFromJSON, + FailureToJSON, +} from "../models/index"; export interface GatewayV1ConnectionsIdDeleteRequest { - id: string; + id: string; } export interface GatewayV1ConnectionsIdGetRequest { - id: string; + id: string; } export interface GatewayV1ConnectionsIdPatchRequest { - id: string; - body: object; + id: string; + body: object; } export interface GatewayV1ConnectionsIdPutRequest { - id: string; - ConnectionSpec: ConnectionSpec; + id: string; + ConnectionSpec: ConnectionSpec; } export interface GatewayV1ConnectionsPostRequest { - ConnectionSpec: ConnectionSpec; - dry_run?: boolean; + ConnectionSpec: ConnectionSpec; + dry_run?: boolean; } /** - * + * */ export class ConnectionsResourceApi extends runtime.BaseAPI { - - /** - * List Connections - */ - async gatewayV1ConnectionsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/connections`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionsListFromJSON(jsonValue)); - } - - /** - * List Connections - */ - async gatewayV1ConnectionsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ConnectionsGetRaw(initOverrides); - return await response.value(); - } - - /** - * Delete Connection - */ - async gatewayV1ConnectionsIdDeleteRaw(requestParameters: GatewayV1ConnectionsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); + /** + * List Connections + */ + async gatewayV1ConnectionsGetRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/connections`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionsListFromJSON(jsonValue)); + } + + /** + * List Connections + */ + async gatewayV1ConnectionsGet( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ConnectionsGetRaw(initOverrides); + return await response.value(); + } + + /** + * Delete Connection + */ + async gatewayV1ConnectionsIdDeleteRaw( + requestParameters: GatewayV1ConnectionsIdDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdDelete().', + ); } - /** - * Delete Connection - */ - async gatewayV1ConnectionsIdDelete(requestParameters: GatewayV1ConnectionsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.gatewayV1ConnectionsIdDeleteRaw(requestParameters, initOverrides); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/connections/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete Connection + */ + async gatewayV1ConnectionsIdDelete( + requestParameters: GatewayV1ConnectionsIdDeleteRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.gatewayV1ConnectionsIdDeleteRaw(requestParameters, initOverrides); + } + + /** + * Get Connection + */ + async gatewayV1ConnectionsIdGetRaw( + requestParameters: GatewayV1ConnectionsIdGetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdGet().', + ); } - /** - * Get Connection - */ - async gatewayV1ConnectionsIdGetRaw(requestParameters: GatewayV1ConnectionsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/connections/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * Get Connection + */ + async gatewayV1ConnectionsIdGet( + requestParameters: GatewayV1ConnectionsIdGetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ConnectionsIdGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Patch Connection + */ + async gatewayV1ConnectionsIdPatchRaw( + requestParameters: GatewayV1ConnectionsIdPatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPatch().', + ); } - /** - * Get Connection - */ - async gatewayV1ConnectionsIdGet(requestParameters: GatewayV1ConnectionsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ConnectionsIdGetRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["body"] == null) { + throw new runtime.RequiredError( + "body", + 'Required parameter "body" was null or undefined when calling gatewayV1ConnectionsIdPatch().', + ); } - /** - * Patch Connection - */ - async gatewayV1ConnectionsIdPatchRaw(requestParameters: GatewayV1ConnectionsIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPatch().' - ); - } - - if (requestParameters['body'] == null) { - throw new runtime.RequiredError( - 'body', - 'Required parameter "body" was null or undefined when calling gatewayV1ConnectionsIdPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: requestParameters['body'] as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/gateway/v1/connections/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "PATCH", + headers: headerParameters, + query: queryParameters, + body: requestParameters["body"] as any, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * Patch Connection + */ + async gatewayV1ConnectionsIdPatch( + requestParameters: GatewayV1ConnectionsIdPatchRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ConnectionsIdPatchRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update Connection + */ + async gatewayV1ConnectionsIdPutRaw( + requestParameters: GatewayV1ConnectionsIdPutRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["id"] == null) { + throw new runtime.RequiredError( + "id", + 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPut().', + ); } - /** - * Patch Connection - */ - async gatewayV1ConnectionsIdPatch(requestParameters: GatewayV1ConnectionsIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ConnectionsIdPatchRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["ConnectionSpec"] == null) { + throw new runtime.RequiredError( + "ConnectionSpec", + 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsIdPut().', + ); } - /** - * Update Connection - */ - async gatewayV1ConnectionsIdPutRaw(requestParameters: GatewayV1ConnectionsIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['id'] == null) { - throw new runtime.RequiredError( - 'id', - 'Required parameter "id" was null or undefined when calling gatewayV1ConnectionsIdPut().' - ); - } - - if (requestParameters['ConnectionSpec'] == null) { - throw new runtime.RequiredError( - 'ConnectionSpec', - 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsIdPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/gateway/v1/connections/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ConnectionSpecToJSON(requestParameters['ConnectionSpec']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/gateway/v1/connections/{id}`.replace( + `{${"id"}}`, + encodeURIComponent(String(requestParameters["id"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: ConnectionSpecToJSON(requestParameters["ConnectionSpec"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * Update Connection + */ + async gatewayV1ConnectionsIdPut( + requestParameters: GatewayV1ConnectionsIdPutRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ConnectionsIdPutRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create Connection + */ + async gatewayV1ConnectionsPostRaw( + requestParameters: GatewayV1ConnectionsPostRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["ConnectionSpec"] == null) { + throw new runtime.RequiredError( + "ConnectionSpec", + 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsPost().', + ); } - /** - * Update Connection - */ - async gatewayV1ConnectionsIdPut(requestParameters: GatewayV1ConnectionsIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ConnectionsIdPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Create Connection - */ - async gatewayV1ConnectionsPostRaw(requestParameters: GatewayV1ConnectionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['ConnectionSpec'] == null) { - throw new runtime.RequiredError( - 'ConnectionSpec', - 'Required parameter "ConnectionSpec" was null or undefined when calling gatewayV1ConnectionsPost().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['dry_run'] != null) { - queryParameters['dry_run'] = requestParameters['dry_run']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/gateway/v1/connections`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ConnectionSpecToJSON(requestParameters['ConnectionSpec']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); - } + const queryParameters: any = {}; - /** - * Create Connection - */ - async gatewayV1ConnectionsPost(requestParameters: GatewayV1ConnectionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ConnectionsPostRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["dry_run"] != null) { + queryParameters["dry_run"] = requestParameters["dry_run"]; } + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/gateway/v1/connections`, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: ConnectionSpecToJSON(requestParameters["ConnectionSpec"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => ConnectionFromJSON(jsonValue)); + } + + /** + * Create Connection + */ + async gatewayV1ConnectionsPost( + requestParameters: GatewayV1ConnectionsPostRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ConnectionsPostRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/HandshakeResourceApi.ts b/src/clients/sidecar/apis/HandshakeResourceApi.ts index daf83d686c..e9cf2e1ccd 100644 --- a/src/clients/sidecar/apis/HandshakeResourceApi.ts +++ b/src/clients/sidecar/apis/HandshakeResourceApi.ts @@ -12,45 +12,46 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - SidecarAccessToken, -} from '../models/index'; -import { - SidecarAccessTokenFromJSON, - SidecarAccessTokenToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { SidecarAccessToken } from "../models/index"; +import { SidecarAccessTokenFromJSON, SidecarAccessTokenToJSON } from "../models/index"; /** - * + * */ export class HandshakeResourceApi extends runtime.BaseAPI { - - /** - * Handshake - */ - async gatewayV1HandshakeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/handshake`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SidecarAccessTokenFromJSON(jsonValue)); - } - - /** - * Handshake - */ - async gatewayV1HandshakeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1HandshakeGetRaw(initOverrides); - return await response.value(); - } - + /** + * Handshake + */ + async gatewayV1HandshakeGetRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/handshake`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SidecarAccessTokenFromJSON(jsonValue), + ); + } + + /** + * Handshake + */ + async gatewayV1HandshakeGet( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1HandshakeGetRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts b/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts index 438f173709..9dad00a91d 100644 --- a/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts +++ b/src/clients/sidecar/apis/KafkaConsumeResourceApi.ts @@ -12,90 +12,108 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { SimpleConsumeMultiPartitionRequest, SimpleConsumeMultiPartitionResponse, -} from '../models/index'; +} from "../models/index"; import { - SimpleConsumeMultiPartitionRequestFromJSON, - SimpleConsumeMultiPartitionRequestToJSON, - SimpleConsumeMultiPartitionResponseFromJSON, - SimpleConsumeMultiPartitionResponseToJSON, -} from '../models/index'; + SimpleConsumeMultiPartitionRequestFromJSON, + SimpleConsumeMultiPartitionRequestToJSON, + SimpleConsumeMultiPartitionResponseFromJSON, + SimpleConsumeMultiPartitionResponseToJSON, +} from "../models/index"; export interface GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest { - cluster_id: string; - topic_name: string; - x_connection_id: string; - SimpleConsumeMultiPartitionRequest: SimpleConsumeMultiPartitionRequest; + cluster_id: string; + topic_name: string; + x_connection_id: string; + SimpleConsumeMultiPartitionRequest: SimpleConsumeMultiPartitionRequest; } /** - * + * */ export class KafkaConsumeResourceApi extends runtime.BaseAPI { + /** + * Message Viewer + */ + async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw( + requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cluster_id"] == null) { + throw new runtime.RequiredError( + "cluster_id", + 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', + ); + } - /** - * Message Viewer - */ - async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cluster_id'] == null) { - throw new runtime.RequiredError( - 'cluster_id', - 'Required parameter "cluster_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' - ); - } - - if (requestParameters['topic_name'] == null) { - throw new runtime.RequiredError( - 'topic_name', - 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' - ); - } - - if (requestParameters['x_connection_id'] == null) { - throw new runtime.RequiredError( - 'x_connection_id', - 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' - ); - } - - if (requestParameters['SimpleConsumeMultiPartitionRequest'] == null) { - throw new runtime.RequiredError( - 'SimpleConsumeMultiPartitionRequest', - 'Required parameter "SimpleConsumeMultiPartitionRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().' - ); - } - - const queryParameters: any = {}; + if (requestParameters["topic_name"] == null) { + throw new runtime.RequiredError( + "topic_name", + 'Required parameter "topic_name" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["x_connection_id"] == null) { + throw new runtime.RequiredError( + "x_connection_id", + 'Required parameter "x_connection_id" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', + ); + } - headerParameters['Content-Type'] = 'application/json'; + if (requestParameters["SimpleConsumeMultiPartitionRequest"] == null) { + throw new runtime.RequiredError( + "SimpleConsumeMultiPartitionRequest", + 'Required parameter "SimpleConsumeMultiPartitionRequest" was null or undefined when calling gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost().', + ); + } - if (requestParameters['x_connection_id'] != null) { - headerParameters['x-connection-id'] = String(requestParameters['x_connection_id']); - } + const queryParameters: any = {}; - const response = await this.request({ - path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/partitions/-/consume`.replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters['cluster_id']))).replace(`{${"topic_name"}}`, encodeURIComponent(String(requestParameters['topic_name']))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: SimpleConsumeMultiPartitionRequestToJSON(requestParameters['SimpleConsumeMultiPartitionRequest']), - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => SimpleConsumeMultiPartitionResponseFromJSON(jsonValue)); - } + headerParameters["Content-Type"] = "application/json"; - /** - * Message Viewer - */ - async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost(requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["x_connection_id"] != null) { + headerParameters["x-connection-id"] = String(requestParameters["x_connection_id"]); } + const response = await this.request( + { + path: `/gateway/v1/clusters/{cluster_id}/topics/{topic_name}/partitions/-/consume` + .replace(`{${"cluster_id"}}`, encodeURIComponent(String(requestParameters["cluster_id"]))) + .replace( + `{${"topic_name"}}`, + encodeURIComponent(String(requestParameters["topic_name"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: SimpleConsumeMultiPartitionRequestToJSON( + requestParameters["SimpleConsumeMultiPartitionRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SimpleConsumeMultiPartitionResponseFromJSON(jsonValue), + ); + } + + /** + * Message Viewer + */ + async gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePost( + requestParameters: GatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1ClustersClusterIdTopicsTopicNamePartitionsConsumePostRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/LoginRealmResourceApi.ts b/src/clients/sidecar/apis/LoginRealmResourceApi.ts index 71f794033e..0fa0b50ee3 100644 --- a/src/clients/sidecar/apis/LoginRealmResourceApi.ts +++ b/src/clients/sidecar/apis/LoginRealmResourceApi.ts @@ -12,37 +12,41 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; /** - * + * */ export class LoginRealmResourceApi extends runtime.BaseAPI { - - /** - * Proxy Login Realm Request - */ - async apiLoginRealmGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/api/login/realm`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Proxy Login Realm Request - */ - async apiLoginRealmGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.apiLoginRealmGetRaw(initOverrides); - } - + /** + * Proxy Login Realm Request + */ + async apiLoginRealmGetRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/api/login/realm`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * Proxy Login Realm Request + */ + async apiLoginRealmGet( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.apiLoginRealmGetRaw(initOverrides); + } } diff --git a/src/clients/sidecar/apis/MicroProfileHealthApi.ts b/src/clients/sidecar/apis/MicroProfileHealthApi.ts index eb96bb8198..bb9e1bcac6 100644 --- a/src/clients/sidecar/apis/MicroProfileHealthApi.ts +++ b/src/clients/sidecar/apis/MicroProfileHealthApi.ts @@ -12,131 +12,151 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - HealthResponse, -} from '../models/index'; -import { - HealthResponseFromJSON, - HealthResponseToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { HealthResponse } from "../models/index"; +import { HealthResponseFromJSON, HealthResponseToJSON } from "../models/index"; /** - * + * */ export class MicroProfileHealthApi extends runtime.BaseAPI { - - /** - * Check the liveness of the application - * The Liveness check of this application - */ - async microprofileHealthLivenessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/health/live`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the liveness of the application - * The Liveness check of this application - */ - async microprofileHealthLiveness(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.microprofileHealthLivenessRaw(initOverrides); - return await response.value(); - } - - /** - * Check the readiness of the application - * The Readiness check of this application - */ - async microprofileHealthReadinessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/health/ready`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the readiness of the application - * The Readiness check of this application - */ - async microprofileHealthReadiness(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.microprofileHealthReadinessRaw(initOverrides); - return await response.value(); - } - - /** - * Check the health of the application - * An aggregated view of the Liveness, Readiness and Startup of this application - */ - async microprofileHealthRootRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/health`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the health of the application - * An aggregated view of the Liveness, Readiness and Startup of this application - */ - async microprofileHealthRoot(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.microprofileHealthRootRaw(initOverrides); - return await response.value(); - } - - /** - * Check the startup of the application - * The Startup check of this application - */ - async microprofileHealthStartupRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/health/started`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); - } - - /** - * Check the startup of the application - * The Startup check of this application - */ - async microprofileHealthStartup(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.microprofileHealthStartupRaw(initOverrides); - return await response.value(); - } - + /** + * Check the liveness of the application + * The Liveness check of this application + */ + async microprofileHealthLivenessRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/health/live`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the liveness of the application + * The Liveness check of this application + */ + async microprofileHealthLiveness( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.microprofileHealthLivenessRaw(initOverrides); + return await response.value(); + } + + /** + * Check the readiness of the application + * The Readiness check of this application + */ + async microprofileHealthReadinessRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/health/ready`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the readiness of the application + * The Readiness check of this application + */ + async microprofileHealthReadiness( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.microprofileHealthReadinessRaw(initOverrides); + return await response.value(); + } + + /** + * Check the health of the application + * An aggregated view of the Liveness, Readiness and Startup of this application + */ + async microprofileHealthRootRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/health`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the health of the application + * An aggregated view of the Liveness, Readiness and Startup of this application + */ + async microprofileHealthRoot( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.microprofileHealthRootRaw(initOverrides); + return await response.value(); + } + + /** + * Check the startup of the application + * The Startup check of this application + */ + async microprofileHealthStartupRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/health/started`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue)); + } + + /** + * Check the startup of the application + * The Startup check of this application + */ + async microprofileHealthStartup( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.microprofileHealthStartupRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts b/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts index 498f3e1f1f..d78a63afab 100644 --- a/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts +++ b/src/clients/sidecar/apis/OAuthCallbackResourceApi.ts @@ -12,55 +12,61 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; export interface GatewayV1CallbackVscodeDocsGetRequest { - code?: string; - state?: string; + code?: string; + state?: string; } /** - * + * */ export class OAuthCallbackResourceApi extends runtime.BaseAPI { + /** + * Callback + */ + async gatewayV1CallbackVscodeDocsGetRaw( + requestParameters: GatewayV1CallbackVscodeDocsGetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; - /** - * Callback - */ - async gatewayV1CallbackVscodeDocsGetRaw(requestParameters: GatewayV1CallbackVscodeDocsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['code'] != null) { - queryParameters['code'] = requestParameters['code']; - } - - if (requestParameters['state'] != null) { - queryParameters['state'] = requestParameters['state']; - } + if (requestParameters["code"] != null) { + queryParameters["code"] = requestParameters["code"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["state"] != null) { + queryParameters["state"] = requestParameters["state"]; + } - const response = await this.request({ - path: `/gateway/v1/callback-vscode-docs`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } + const response = await this.request( + { + path: `/gateway/v1/callback-vscode-docs`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - * Callback - */ - async gatewayV1CallbackVscodeDocsGet(requestParameters: GatewayV1CallbackVscodeDocsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1CallbackVscodeDocsGetRaw(requestParameters, initOverrides); - return await response.value(); + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; } + } + /** + * Callback + */ + async gatewayV1CallbackVscodeDocsGet( + requestParameters: GatewayV1CallbackVscodeDocsGetRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1CallbackVscodeDocsGetRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts b/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts index 19823df13d..029119c6e5 100644 --- a/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts +++ b/src/clients/sidecar/apis/PasswordResetCallbackResourceApi.ts @@ -12,60 +12,66 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; export interface RootGetRequest { - email?: string; - message?: string; - success?: boolean; + email?: string; + message?: string; + success?: boolean; } /** - * + * */ export class PasswordResetCallbackResourceApi extends runtime.BaseAPI { + /** + * Password Reset Callback + */ + async rootGetRaw( + requestParameters: RootGetRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; - /** - * Password Reset Callback - */ - async rootGetRaw(requestParameters: RootGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['email'] != null) { - queryParameters['email'] = requestParameters['email']; - } - - if (requestParameters['message'] != null) { - queryParameters['message'] = requestParameters['message']; - } + if (requestParameters["email"] != null) { + queryParameters["email"] = requestParameters["email"]; + } - if (requestParameters['success'] != null) { - queryParameters['success'] = requestParameters['success']; - } + if (requestParameters["message"] != null) { + queryParameters["message"] = requestParameters["message"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["success"] != null) { + queryParameters["success"] = requestParameters["success"]; + } - const response = await this.request({ - path: `/`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } + const response = await this.request( + { + path: `/`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - * Password Reset Callback - */ - async rootGet(requestParameters: RootGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.rootGetRaw(requestParameters, initOverrides); - return await response.value(); + if (this.isJsonMime(response.headers.get("content-type"))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; } + } + /** + * Password Reset Callback + */ + async rootGet( + requestParameters: RootGetRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.rootGetRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/PreferencesResourceApi.ts b/src/clients/sidecar/apis/PreferencesResourceApi.ts index 0d1a747e78..bf763a3e59 100644 --- a/src/clients/sidecar/apis/PreferencesResourceApi.ts +++ b/src/clients/sidecar/apis/PreferencesResourceApi.ts @@ -12,88 +12,98 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - Failure, - Preferences, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { Failure, Preferences } from "../models/index"; import { - FailureFromJSON, - FailureToJSON, - PreferencesFromJSON, - PreferencesToJSON, -} from '../models/index'; + FailureFromJSON, + FailureToJSON, + PreferencesFromJSON, + PreferencesToJSON, +} from "../models/index"; export interface GatewayV1PreferencesPutRequest { - Preferences: Preferences; + Preferences: Preferences; } /** - * + * */ export class PreferencesResourceApi extends runtime.BaseAPI { - - /** - * Get Preferences - */ - async gatewayV1PreferencesGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/preferences`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); - } - - /** - * Get Preferences - */ - async gatewayV1PreferencesGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1PreferencesGetRaw(initOverrides); - return await response.value(); - } - - /** - * Update Preferences - */ - async gatewayV1PreferencesPutRaw(requestParameters: GatewayV1PreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['Preferences'] == null) { - throw new runtime.RequiredError( - 'Preferences', - 'Required parameter "Preferences" was null or undefined when calling gatewayV1PreferencesPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - const response = await this.request({ - path: `/gateway/v1/preferences`, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: PreferencesToJSON(requestParameters['Preferences']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); - } - - /** - * Update Preferences - */ - async gatewayV1PreferencesPut(requestParameters: GatewayV1PreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1PreferencesPutRaw(requestParameters, initOverrides); - return await response.value(); + /** + * Get Preferences + */ + async gatewayV1PreferencesGetRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/preferences`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); + } + + /** + * Get Preferences + */ + async gatewayV1PreferencesGet( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1PreferencesGetRaw(initOverrides); + return await response.value(); + } + + /** + * Update Preferences + */ + async gatewayV1PreferencesPutRaw( + requestParameters: GatewayV1PreferencesPutRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["Preferences"] == null) { + throw new runtime.RequiredError( + "Preferences", + 'Required parameter "Preferences" was null or undefined when calling gatewayV1PreferencesPut().', + ); } + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + const response = await this.request( + { + path: `/gateway/v1/preferences`, + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: PreferencesToJSON(requestParameters["Preferences"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => PreferencesFromJSON(jsonValue)); + } + + /** + * Update Preferences + */ + async gatewayV1PreferencesPut( + requestParameters: GatewayV1PreferencesPutRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1PreferencesPutRaw(requestParameters, initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/VersionResourceApi.ts b/src/clients/sidecar/apis/VersionResourceApi.ts index 63e0ed6857..b029b9a896 100644 --- a/src/clients/sidecar/apis/VersionResourceApi.ts +++ b/src/clients/sidecar/apis/VersionResourceApi.ts @@ -12,45 +12,46 @@ * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - SidecarVersionResponse, -} from '../models/index'; -import { - SidecarVersionResponseFromJSON, - SidecarVersionResponseToJSON, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { SidecarVersionResponse } from "../models/index"; +import { SidecarVersionResponseFromJSON, SidecarVersionResponseToJSON } from "../models/index"; /** - * + * */ export class VersionResourceApi extends runtime.BaseAPI { - - /** - * Version - */ - async gatewayV1VersionGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const response = await this.request({ - path: `/gateway/v1/version`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SidecarVersionResponseFromJSON(jsonValue)); - } - - /** - * Version - */ - async gatewayV1VersionGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.gatewayV1VersionGetRaw(initOverrides); - return await response.value(); - } - + /** + * Version + */ + async gatewayV1VersionGetRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request( + { + path: `/gateway/v1/version`, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SidecarVersionResponseFromJSON(jsonValue), + ); + } + + /** + * Version + */ + async gatewayV1VersionGet( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.gatewayV1VersionGetRaw(initOverrides); + return await response.value(); + } } diff --git a/src/clients/sidecar/apis/index.ts b/src/clients/sidecar/apis/index.ts index d0c88cd8a3..4e286c5872 100644 --- a/src/clients/sidecar/apis/index.ts +++ b/src/clients/sidecar/apis/index.ts @@ -1,12 +1,12 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ConfluentCloudProduceRecordsResourceApi'; -export * from './ConnectionsResourceApi'; -export * from './HandshakeResourceApi'; -export * from './KafkaConsumeResourceApi'; -export * from './LoginRealmResourceApi'; -export * from './MicroProfileHealthApi'; -export * from './OAuthCallbackResourceApi'; -export * from './PasswordResetCallbackResourceApi'; -export * from './PreferencesResourceApi'; -export * from './VersionResourceApi'; +export * from "./ConfluentCloudProduceRecordsResourceApi"; +export * from "./ConnectionsResourceApi"; +export * from "./HandshakeResourceApi"; +export * from "./KafkaConsumeResourceApi"; +export * from "./LoginRealmResourceApi"; +export * from "./MicroProfileHealthApi"; +export * from "./OAuthCallbackResourceApi"; +export * from "./PasswordResetCallbackResourceApi"; +export * from "./PreferencesResourceApi"; +export * from "./VersionResourceApi"; diff --git a/src/clients/sidecar/index.ts b/src/clients/sidecar/index.ts index bebe8bbbe2..ee2637724a 100644 --- a/src/clients/sidecar/index.ts +++ b/src/clients/sidecar/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/src/clients/sidecar/models/ApiKeyAndSecret.ts b/src/clients/sidecar/models/ApiKeyAndSecret.ts index 0127a9950f..181c793dd6 100644 --- a/src/clients/sidecar/models/ApiKeyAndSecret.ts +++ b/src/clients/sidecar/models/ApiKeyAndSecret.ts @@ -12,64 +12,67 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * API key and secret authentication credentials * @export * @interface ApiKeyAndSecret */ export interface ApiKeyAndSecret { - /** - * The API key to use when connecting to the external service. - * @type {string} - * @memberof ApiKeyAndSecret - */ - api_key: string; - /** - * The API secret to use when connecting to the external service. - * @type {string} - * @memberof ApiKeyAndSecret - */ - api_secret: string; + /** + * The API key to use when connecting to the external service. + * @type {string} + * @memberof ApiKeyAndSecret + */ + api_key: string; + /** + * The API secret to use when connecting to the external service. + * @type {string} + * @memberof ApiKeyAndSecret + */ + api_secret: string; } /** * Check if a given object implements the ApiKeyAndSecret interface. */ export function instanceOfApiKeyAndSecret(value: object): value is ApiKeyAndSecret { - if (!('api_key' in value) || value['api_key'] === undefined) return false; - if (!('api_secret' in value) || value['api_secret'] === undefined) return false; - return true; + if (!("api_key" in value) || value["api_key"] === undefined) return false; + if (!("api_secret" in value) || value["api_secret"] === undefined) return false; + return true; } export function ApiKeyAndSecretFromJSON(json: any): ApiKeyAndSecret { - return ApiKeyAndSecretFromJSONTyped(json, false); + return ApiKeyAndSecretFromJSONTyped(json, false); } -export function ApiKeyAndSecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyAndSecret { - if (json == null) { - return json; - } - return { - - 'api_key': json['api_key'], - 'api_secret': json['api_secret'], - }; +export function ApiKeyAndSecretFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ApiKeyAndSecret { + if (json == null) { + return json; + } + return { + api_key: json["api_key"], + api_secret: json["api_secret"], + }; } export function ApiKeyAndSecretToJSON(json: any): ApiKeyAndSecret { - return ApiKeyAndSecretToJSONTyped(json, false); + return ApiKeyAndSecretToJSONTyped(json, false); } -export function ApiKeyAndSecretToJSONTyped(value?: ApiKeyAndSecret | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ApiKeyAndSecretToJSONTyped( + value?: ApiKeyAndSecret | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_key': value['api_key'], - 'api_secret': value['api_secret'], - }; + return { + api_key: value["api_key"], + api_secret: value["api_secret"], + }; } - diff --git a/src/clients/sidecar/models/AuthError.ts b/src/clients/sidecar/models/AuthError.ts index 557fb733a1..a523e0a591 100644 --- a/src/clients/sidecar/models/AuthError.ts +++ b/src/clients/sidecar/models/AuthError.ts @@ -12,62 +12,62 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface AuthError */ export interface AuthError { - /** - * - * @type {string} - * @memberof AuthError - */ - message?: string; - /** - * - * @type {boolean} - * @memberof AuthError - */ - is_transient?: boolean; + /** + * + * @type {string} + * @memberof AuthError + */ + message?: string; + /** + * + * @type {boolean} + * @memberof AuthError + */ + is_transient?: boolean; } /** * Check if a given object implements the AuthError interface. */ export function instanceOfAuthError(value: object): value is AuthError { - return true; + return true; } export function AuthErrorFromJSON(json: any): AuthError { - return AuthErrorFromJSONTyped(json, false); + return AuthErrorFromJSONTyped(json, false); } export function AuthErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthError { - if (json == null) { - return json; - } - return { - - 'message': json['message'] == null ? undefined : json['message'], - 'is_transient': json['is_transient'] == null ? undefined : json['is_transient'], - }; + if (json == null) { + return json; + } + return { + message: json["message"] == null ? undefined : json["message"], + is_transient: json["is_transient"] == null ? undefined : json["is_transient"], + }; } export function AuthErrorToJSON(json: any): AuthError { - return AuthErrorToJSONTyped(json, false); + return AuthErrorToJSONTyped(json, false); } -export function AuthErrorToJSONTyped(value?: AuthError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AuthErrorToJSONTyped( + value?: AuthError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'message': value['message'], - 'is_transient': value['is_transient'], - }; + return { + message: value["message"], + is_transient: value["is_transient"], + }; } - diff --git a/src/clients/sidecar/models/AuthErrors.ts b/src/clients/sidecar/models/AuthErrors.ts index a773163c37..a5020c082b 100644 --- a/src/clients/sidecar/models/AuthErrors.ts +++ b/src/clients/sidecar/models/AuthErrors.ts @@ -12,78 +12,80 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AuthError } from './AuthError'; +import { mapValues } from "../runtime"; +import type { AuthError } from "./AuthError"; import { - AuthErrorFromJSON, - AuthErrorFromJSONTyped, - AuthErrorToJSON, - AuthErrorToJSONTyped, -} from './AuthError'; + AuthErrorFromJSON, + AuthErrorFromJSONTyped, + AuthErrorToJSON, + AuthErrorToJSONTyped, +} from "./AuthError"; /** - * + * * @export * @interface AuthErrors */ export interface AuthErrors { - /** - * - * @type {AuthError} - * @memberof AuthErrors - */ - auth_status_check?: AuthError; - /** - * - * @type {AuthError} - * @memberof AuthErrors - */ - sign_in?: AuthError; - /** - * - * @type {AuthError} - * @memberof AuthErrors - */ - token_refresh?: AuthError; + /** + * + * @type {AuthError} + * @memberof AuthErrors + */ + auth_status_check?: AuthError; + /** + * + * @type {AuthError} + * @memberof AuthErrors + */ + sign_in?: AuthError; + /** + * + * @type {AuthError} + * @memberof AuthErrors + */ + token_refresh?: AuthError; } /** * Check if a given object implements the AuthErrors interface. */ export function instanceOfAuthErrors(value: object): value is AuthErrors { - return true; + return true; } export function AuthErrorsFromJSON(json: any): AuthErrors { - return AuthErrorsFromJSONTyped(json, false); + return AuthErrorsFromJSONTyped(json, false); } export function AuthErrorsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthErrors { - if (json == null) { - return json; - } - return { - - 'auth_status_check': json['auth_status_check'] == null ? undefined : AuthErrorFromJSON(json['auth_status_check']), - 'sign_in': json['sign_in'] == null ? undefined : AuthErrorFromJSON(json['sign_in']), - 'token_refresh': json['token_refresh'] == null ? undefined : AuthErrorFromJSON(json['token_refresh']), - }; + if (json == null) { + return json; + } + return { + auth_status_check: + json["auth_status_check"] == null ? undefined : AuthErrorFromJSON(json["auth_status_check"]), + sign_in: json["sign_in"] == null ? undefined : AuthErrorFromJSON(json["sign_in"]), + token_refresh: + json["token_refresh"] == null ? undefined : AuthErrorFromJSON(json["token_refresh"]), + }; } export function AuthErrorsToJSON(json: any): AuthErrors { - return AuthErrorsToJSONTyped(json, false); + return AuthErrorsToJSONTyped(json, false); } -export function AuthErrorsToJSONTyped(value?: AuthErrors | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function AuthErrorsToJSONTyped( + value?: AuthErrors | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'auth_status_check': AuthErrorToJSON(value['auth_status_check']), - 'sign_in': AuthErrorToJSON(value['sign_in']), - 'token_refresh': AuthErrorToJSON(value['token_refresh']), - }; + return { + auth_status_check: AuthErrorToJSON(value["auth_status_check"]), + sign_in: AuthErrorToJSON(value["sign_in"]), + token_refresh: AuthErrorToJSON(value["token_refresh"]), + }; } - diff --git a/src/clients/sidecar/models/BasicCredentials.ts b/src/clients/sidecar/models/BasicCredentials.ts index 6f3f454cbe..902c17b3ce 100644 --- a/src/clients/sidecar/models/BasicCredentials.ts +++ b/src/clients/sidecar/models/BasicCredentials.ts @@ -12,64 +12,67 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Basic authentication credentials * @export * @interface BasicCredentials */ export interface BasicCredentials { - /** - * The username to use when connecting to the external service. - * @type {string} - * @memberof BasicCredentials - */ - username: string; - /** - * The password to use when connecting to the external service. - * @type {string} - * @memberof BasicCredentials - */ - password: string; + /** + * The username to use when connecting to the external service. + * @type {string} + * @memberof BasicCredentials + */ + username: string; + /** + * The password to use when connecting to the external service. + * @type {string} + * @memberof BasicCredentials + */ + password: string; } /** * Check if a given object implements the BasicCredentials interface. */ export function instanceOfBasicCredentials(value: object): value is BasicCredentials { - if (!('username' in value) || value['username'] === undefined) return false; - if (!('password' in value) || value['password'] === undefined) return false; - return true; + if (!("username" in value) || value["username"] === undefined) return false; + if (!("password" in value) || value["password"] === undefined) return false; + return true; } export function BasicCredentialsFromJSON(json: any): BasicCredentials { - return BasicCredentialsFromJSONTyped(json, false); + return BasicCredentialsFromJSONTyped(json, false); } -export function BasicCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BasicCredentials { - if (json == null) { - return json; - } - return { - - 'username': json['username'], - 'password': json['password'], - }; +export function BasicCredentialsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): BasicCredentials { + if (json == null) { + return json; + } + return { + username: json["username"], + password: json["password"], + }; } export function BasicCredentialsToJSON(json: any): BasicCredentials { - return BasicCredentialsToJSONTyped(json, false); + return BasicCredentialsToJSONTyped(json, false); } -export function BasicCredentialsToJSONTyped(value?: BasicCredentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function BasicCredentialsToJSONTyped( + value?: BasicCredentials | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'username': value['username'], - 'password': value['password'], - }; + return { + username: value["username"], + password: value["password"], + }; } - diff --git a/src/clients/sidecar/models/CCloudConfig.ts b/src/clients/sidecar/models/CCloudConfig.ts index f1841b5e98..e4114c24b4 100644 --- a/src/clients/sidecar/models/CCloudConfig.ts +++ b/src/clients/sidecar/models/CCloudConfig.ts @@ -12,62 +12,63 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Configuration for Confluent Cloud connections * @export * @interface CCloudConfig */ export interface CCloudConfig { - /** - * The identifier of the CCloud organization to use. The user's default organization is used when absent. - * @type {string} - * @memberof CCloudConfig - */ - organization_id?: string; - /** - * The URI that users will be redirected to after successfully completing the authentication flow with Confluent Cloud. - * @type {string} - * @memberof CCloudConfig - */ - ide_auth_callback_uri?: string; + /** + * The identifier of the CCloud organization to use. The user's default organization is used when absent. + * @type {string} + * @memberof CCloudConfig + */ + organization_id?: string; + /** + * The URI that users will be redirected to after successfully completing the authentication flow with Confluent Cloud. + * @type {string} + * @memberof CCloudConfig + */ + ide_auth_callback_uri?: string; } /** * Check if a given object implements the CCloudConfig interface. */ export function instanceOfCCloudConfig(value: object): value is CCloudConfig { - return true; + return true; } export function CCloudConfigFromJSON(json: any): CCloudConfig { - return CCloudConfigFromJSONTyped(json, false); + return CCloudConfigFromJSONTyped(json, false); } export function CCloudConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): CCloudConfig { - if (json == null) { - return json; - } - return { - - 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'], - 'ide_auth_callback_uri': json['ide_auth_callback_uri'] == null ? undefined : json['ide_auth_callback_uri'], - }; + if (json == null) { + return json; + } + return { + organization_id: json["organization_id"] == null ? undefined : json["organization_id"], + ide_auth_callback_uri: + json["ide_auth_callback_uri"] == null ? undefined : json["ide_auth_callback_uri"], + }; } export function CCloudConfigToJSON(json: any): CCloudConfig { - return CCloudConfigToJSONTyped(json, false); + return CCloudConfigToJSONTyped(json, false); } -export function CCloudConfigToJSONTyped(value?: CCloudConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CCloudConfigToJSONTyped( + value?: CCloudConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'organization_id': value['organization_id'], - 'ide_auth_callback_uri': value['ide_auth_callback_uri'], - }; + return { + organization_id: value["organization_id"], + ide_auth_callback_uri: value["ide_auth_callback_uri"], + }; } - diff --git a/src/clients/sidecar/models/CCloudStatus.ts b/src/clients/sidecar/models/CCloudStatus.ts index efbfc74356..572c651655 100644 --- a/src/clients/sidecar/models/CCloudStatus.ts +++ b/src/clients/sidecar/models/CCloudStatus.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AuthErrors } from './AuthErrors'; +import { mapValues } from "../runtime"; +import type { AuthErrors } from "./AuthErrors"; import { - AuthErrorsFromJSON, - AuthErrorsFromJSONTyped, - AuthErrorsToJSON, - AuthErrorsToJSONTyped, -} from './AuthErrors'; -import type { ConnectedState } from './ConnectedState'; + AuthErrorsFromJSON, + AuthErrorsFromJSONTyped, + AuthErrorsToJSON, + AuthErrorsToJSONTyped, +} from "./AuthErrors"; +import type { ConnectedState } from "./ConnectedState"; import { - ConnectedStateFromJSON, - ConnectedStateFromJSONTyped, - ConnectedStateToJSON, - ConnectedStateToJSONTyped, -} from './ConnectedState'; -import type { UserInfo } from './UserInfo'; + ConnectedStateFromJSON, + ConnectedStateFromJSONTyped, + ConnectedStateToJSON, + ConnectedStateToJSONTyped, +} from "./ConnectedState"; +import type { UserInfo } from "./UserInfo"; import { - UserInfoFromJSON, - UserInfoFromJSONTyped, - UserInfoToJSON, - UserInfoToJSONTyped, -} from './UserInfo'; + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from "./UserInfo"; /** * The status related to CCloud. @@ -41,74 +41,78 @@ import { * @interface CCloudStatus */ export interface CCloudStatus { - /** - * The state of the connection to CCloud. - * @type {ConnectedState} - * @memberof CCloudStatus - */ - state: ConnectedState; - /** - * If the connection's auth context holds a valid token, this attribute holds the time at which the user must re-authenticate because, for instance, the refresh token reached the end of its absolute lifetime. - * @type {Date} - * @memberof CCloudStatus - */ - requires_authentication_at?: Date; - /** - * Information about the authenticated principal, if known. - * @type {UserInfo} - * @memberof CCloudStatus - */ - user?: UserInfo; - /** - * Errors related to the connection to the Kafka cluster. - * @type {AuthErrors} - * @memberof CCloudStatus - */ - errors?: AuthErrors; + /** + * The state of the connection to CCloud. + * @type {ConnectedState} + * @memberof CCloudStatus + */ + state: ConnectedState; + /** + * If the connection's auth context holds a valid token, this attribute holds the time at which the user must re-authenticate because, for instance, the refresh token reached the end of its absolute lifetime. + * @type {Date} + * @memberof CCloudStatus + */ + requires_authentication_at?: Date; + /** + * Information about the authenticated principal, if known. + * @type {UserInfo} + * @memberof CCloudStatus + */ + user?: UserInfo; + /** + * Errors related to the connection to the Kafka cluster. + * @type {AuthErrors} + * @memberof CCloudStatus + */ + errors?: AuthErrors; } - - /** * Check if a given object implements the CCloudStatus interface. */ export function instanceOfCCloudStatus(value: object): value is CCloudStatus { - if (!('state' in value) || value['state'] === undefined) return false; - return true; + if (!("state" in value) || value["state"] === undefined) return false; + return true; } export function CCloudStatusFromJSON(json: any): CCloudStatus { - return CCloudStatusFromJSONTyped(json, false); + return CCloudStatusFromJSONTyped(json, false); } export function CCloudStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CCloudStatus { - if (json == null) { - return json; - } - return { - - 'state': ConnectedStateFromJSON(json['state']), - 'requires_authentication_at': json['requires_authentication_at'] == null ? undefined : (new Date(json['requires_authentication_at'])), - 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), - 'errors': json['errors'] == null ? undefined : AuthErrorsFromJSON(json['errors']), - }; + if (json == null) { + return json; + } + return { + state: ConnectedStateFromJSON(json["state"]), + requires_authentication_at: + json["requires_authentication_at"] == null + ? undefined + : new Date(json["requires_authentication_at"]), + user: json["user"] == null ? undefined : UserInfoFromJSON(json["user"]), + errors: json["errors"] == null ? undefined : AuthErrorsFromJSON(json["errors"]), + }; } export function CCloudStatusToJSON(json: any): CCloudStatus { - return CCloudStatusToJSONTyped(json, false); + return CCloudStatusToJSONTyped(json, false); } -export function CCloudStatusToJSONTyped(value?: CCloudStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CCloudStatusToJSONTyped( + value?: CCloudStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'state': ConnectedStateToJSON(value['state']), - 'requires_authentication_at': value['requires_authentication_at'] == null ? undefined : ((value['requires_authentication_at']).toISOString()), - 'user': UserInfoToJSON(value['user']), - 'errors': AuthErrorsToJSON(value['errors']), - }; + return { + state: ConnectedStateToJSON(value["state"]), + requires_authentication_at: + value["requires_authentication_at"] == null + ? undefined + : value["requires_authentication_at"].toISOString(), + user: UserInfoToJSON(value["user"]), + errors: AuthErrorsToJSON(value["errors"]), + }; } - diff --git a/src/clients/sidecar/models/CollectionMetadata.ts b/src/clients/sidecar/models/CollectionMetadata.ts index 75bb5aeb81..149334ae94 100644 --- a/src/clients/sidecar/models/CollectionMetadata.ts +++ b/src/clients/sidecar/models/CollectionMetadata.ts @@ -12,70 +12,73 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface CollectionMetadata */ export interface CollectionMetadata { - /** - * - * @type {string} - * @memberof CollectionMetadata - */ - self?: string; - /** - * - * @type {string} - * @memberof CollectionMetadata - */ - next?: string; - /** - * - * @type {number} - * @memberof CollectionMetadata - */ - total_size?: number; + /** + * + * @type {string} + * @memberof CollectionMetadata + */ + self?: string; + /** + * + * @type {string} + * @memberof CollectionMetadata + */ + next?: string; + /** + * + * @type {number} + * @memberof CollectionMetadata + */ + total_size?: number; } /** * Check if a given object implements the CollectionMetadata interface. */ export function instanceOfCollectionMetadata(value: object): value is CollectionMetadata { - return true; + return true; } export function CollectionMetadataFromJSON(json: any): CollectionMetadata { - return CollectionMetadataFromJSONTyped(json, false); + return CollectionMetadataFromJSONTyped(json, false); } -export function CollectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CollectionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'next': json['next'] == null ? undefined : json['next'], - 'total_size': json['total_size'] == null ? undefined : json['total_size'], - }; +export function CollectionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CollectionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + total_size: json["total_size"] == null ? undefined : json["total_size"], + }; } export function CollectionMetadataToJSON(json: any): CollectionMetadata { - return CollectionMetadataToJSONTyped(json, false); + return CollectionMetadataToJSONTyped(json, false); } -export function CollectionMetadataToJSONTyped(value?: CollectionMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function CollectionMetadataToJSONTyped( + value?: CollectionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'next': value['next'], - 'total_size': value['total_size'], - }; + return { + self: value["self"], + next: value["next"], + total_size: value["total_size"], + }; } - diff --git a/src/clients/sidecar/models/ConnectedState.ts b/src/clients/sidecar/models/ConnectedState.ts index 407c32fcd4..ebcbd3ad22 100644 --- a/src/clients/sidecar/models/ConnectedState.ts +++ b/src/clients/sidecar/models/ConnectedState.ts @@ -13,43 +13,47 @@ */ /** - * + * * @export * @enum {string} */ export enum ConnectedState { - None = 'NONE', - Attempting = 'ATTEMPTING', - Success = 'SUCCESS', - Expired = 'EXPIRED', - Failed = 'FAILED' + None = "NONE", + Attempting = "ATTEMPTING", + Success = "SUCCESS", + Expired = "EXPIRED", + Failed = "FAILED", } - export function instanceOfConnectedState(value: any): boolean { - for (const key in ConnectedState) { - if (Object.prototype.hasOwnProperty.call(ConnectedState, key)) { - if (ConnectedState[key as keyof typeof ConnectedState] === value) { - return true; - } - } + for (const key in ConnectedState) { + if (Object.prototype.hasOwnProperty.call(ConnectedState, key)) { + if (ConnectedState[key as keyof typeof ConnectedState] === value) { + return true; + } } - return false; + } + return false; } export function ConnectedStateFromJSON(json: any): ConnectedState { - return ConnectedStateFromJSONTyped(json, false); + return ConnectedStateFromJSONTyped(json, false); } -export function ConnectedStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectedState { - return json as ConnectedState; +export function ConnectedStateFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConnectedState { + return json as ConnectedState; } export function ConnectedStateToJSON(value?: ConnectedState | null): any { - return value as any; + return value as any; } -export function ConnectedStateToJSONTyped(value: any, ignoreDiscriminator: boolean): ConnectedState { - return value as ConnectedState; +export function ConnectedStateToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): ConnectedState { + return value as ConnectedState; } - diff --git a/src/clients/sidecar/models/Connection.ts b/src/clients/sidecar/models/Connection.ts index 634d6f2275..585d670ca9 100644 --- a/src/clients/sidecar/models/Connection.ts +++ b/src/clients/sidecar/models/Connection.ts @@ -12,122 +12,122 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ConnectionSpec } from './ConnectionSpec'; +import { mapValues } from "../runtime"; +import type { ConnectionSpec } from "./ConnectionSpec"; import { - ConnectionSpecFromJSON, - ConnectionSpecFromJSONTyped, - ConnectionSpecToJSON, - ConnectionSpecToJSONTyped, -} from './ConnectionSpec'; -import type { ConnectionMetadata } from './ConnectionMetadata'; + ConnectionSpecFromJSON, + ConnectionSpecFromJSONTyped, + ConnectionSpecToJSON, + ConnectionSpecToJSONTyped, +} from "./ConnectionSpec"; +import type { ConnectionMetadata } from "./ConnectionMetadata"; import { - ConnectionMetadataFromJSON, - ConnectionMetadataFromJSONTyped, - ConnectionMetadataToJSON, - ConnectionMetadataToJSONTyped, -} from './ConnectionMetadata'; -import type { ConnectionStatus } from './ConnectionStatus'; + ConnectionMetadataFromJSON, + ConnectionMetadataFromJSONTyped, + ConnectionMetadataToJSON, + ConnectionMetadataToJSONTyped, +} from "./ConnectionMetadata"; +import type { ConnectionStatus } from "./ConnectionStatus"; import { - ConnectionStatusFromJSON, - ConnectionStatusFromJSONTyped, - ConnectionStatusToJSON, - ConnectionStatusToJSONTyped, -} from './ConnectionStatus'; + ConnectionStatusFromJSON, + ConnectionStatusFromJSONTyped, + ConnectionStatusToJSON, + ConnectionStatusToJSONTyped, +} from "./ConnectionStatus"; /** - * + * * @export * @interface Connection */ export interface Connection { - /** - * - * @type {string} - * @memberof Connection - */ - api_version: string; - /** - * - * @type {string} - * @memberof Connection - */ - kind: string; - /** - * - * @type {string} - * @memberof Connection - */ - id: string; - /** - * - * @type {ConnectionMetadata} - * @memberof Connection - */ - metadata: ConnectionMetadata; - /** - * - * @type {ConnectionSpec} - * @memberof Connection - */ - spec: ConnectionSpec; - /** - * - * @type {ConnectionStatus} - * @memberof Connection - */ - status: ConnectionStatus; + /** + * + * @type {string} + * @memberof Connection + */ + api_version: string; + /** + * + * @type {string} + * @memberof Connection + */ + kind: string; + /** + * + * @type {string} + * @memberof Connection + */ + id: string; + /** + * + * @type {ConnectionMetadata} + * @memberof Connection + */ + metadata: ConnectionMetadata; + /** + * + * @type {ConnectionSpec} + * @memberof Connection + */ + spec: ConnectionSpec; + /** + * + * @type {ConnectionStatus} + * @memberof Connection + */ + status: ConnectionStatus; } /** * Check if a given object implements the Connection interface. */ export function instanceOfConnection(value: object): value is Connection { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("id" in value) || value["id"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; } export function ConnectionFromJSON(json: any): Connection { - return ConnectionFromJSONTyped(json, false); + return ConnectionFromJSONTyped(json, false); } export function ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Connection { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'id': json['id'], - 'metadata': ConnectionMetadataFromJSON(json['metadata']), - 'spec': ConnectionSpecFromJSON(json['spec']), - 'status': ConnectionStatusFromJSON(json['status']), - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + id: json["id"], + metadata: ConnectionMetadataFromJSON(json["metadata"]), + spec: ConnectionSpecFromJSON(json["spec"]), + status: ConnectionStatusFromJSON(json["status"]), + }; } export function ConnectionToJSON(json: any): Connection { - return ConnectionToJSONTyped(json, false); + return ConnectionToJSONTyped(json, false); } -export function ConnectionToJSONTyped(value?: Connection | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConnectionToJSONTyped( + value?: Connection | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'id': value['id'], - 'metadata': ConnectionMetadataToJSON(value['metadata']), - 'spec': ConnectionSpecToJSON(value['spec']), - 'status': ConnectionStatusToJSON(value['status']), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + id: value["id"], + metadata: ConnectionMetadataToJSON(value["metadata"]), + spec: ConnectionSpecToJSON(value["spec"]), + status: ConnectionStatusToJSON(value["status"]), + }; } - diff --git a/src/clients/sidecar/models/ConnectionMetadata.ts b/src/clients/sidecar/models/ConnectionMetadata.ts index 9dc09551f0..252851518f 100644 --- a/src/clients/sidecar/models/ConnectionMetadata.ts +++ b/src/clients/sidecar/models/ConnectionMetadata.ts @@ -12,70 +12,73 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ConnectionMetadata */ export interface ConnectionMetadata { - /** - * - * @type {string} - * @memberof ConnectionMetadata - */ - self?: string; - /** - * - * @type {string} - * @memberof ConnectionMetadata - */ - resource_name?: string; - /** - * - * @type {string} - * @memberof ConnectionMetadata - */ - sign_in_uri?: string; + /** + * + * @type {string} + * @memberof ConnectionMetadata + */ + self?: string; + /** + * + * @type {string} + * @memberof ConnectionMetadata + */ + resource_name?: string; + /** + * + * @type {string} + * @memberof ConnectionMetadata + */ + sign_in_uri?: string; } /** * Check if a given object implements the ConnectionMetadata interface. */ export function instanceOfConnectionMetadata(value: object): value is ConnectionMetadata { - return true; + return true; } export function ConnectionMetadataFromJSON(json: any): ConnectionMetadata { - return ConnectionMetadataFromJSONTyped(json, false); + return ConnectionMetadataFromJSONTyped(json, false); } -export function ConnectionMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'] == null ? undefined : json['self'], - 'resource_name': json['resource_name'] == null ? undefined : json['resource_name'], - 'sign_in_uri': json['sign_in_uri'] == null ? undefined : json['sign_in_uri'], - }; +export function ConnectionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConnectionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + sign_in_uri: json["sign_in_uri"] == null ? undefined : json["sign_in_uri"], + }; } export function ConnectionMetadataToJSON(json: any): ConnectionMetadata { - return ConnectionMetadataToJSONTyped(json, false); + return ConnectionMetadataToJSONTyped(json, false); } -export function ConnectionMetadataToJSONTyped(value?: ConnectionMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConnectionMetadataToJSONTyped( + value?: ConnectionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - 'resource_name': value['resource_name'], - 'sign_in_uri': value['sign_in_uri'], - }; + return { + self: value["self"], + resource_name: value["resource_name"], + sign_in_uri: value["sign_in_uri"], + }; } - diff --git a/src/clients/sidecar/models/ConnectionSpec.ts b/src/clients/sidecar/models/ConnectionSpec.ts index 3dd12a1f6f..26489f193b 100644 --- a/src/clients/sidecar/models/ConnectionSpec.ts +++ b/src/clients/sidecar/models/ConnectionSpec.ts @@ -12,42 +12,42 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SchemaRegistryConfig } from './SchemaRegistryConfig'; +import { mapValues } from "../runtime"; +import type { SchemaRegistryConfig } from "./SchemaRegistryConfig"; import { - SchemaRegistryConfigFromJSON, - SchemaRegistryConfigFromJSONTyped, - SchemaRegistryConfigToJSON, - SchemaRegistryConfigToJSONTyped, -} from './SchemaRegistryConfig'; -import type { ConnectionType } from './ConnectionType'; + SchemaRegistryConfigFromJSON, + SchemaRegistryConfigFromJSONTyped, + SchemaRegistryConfigToJSON, + SchemaRegistryConfigToJSONTyped, +} from "./SchemaRegistryConfig"; +import type { ConnectionType } from "./ConnectionType"; import { - ConnectionTypeFromJSON, - ConnectionTypeFromJSONTyped, - ConnectionTypeToJSON, - ConnectionTypeToJSONTyped, -} from './ConnectionType'; -import type { LocalConfig } from './LocalConfig'; + ConnectionTypeFromJSON, + ConnectionTypeFromJSONTyped, + ConnectionTypeToJSON, + ConnectionTypeToJSONTyped, +} from "./ConnectionType"; +import type { LocalConfig } from "./LocalConfig"; import { - LocalConfigFromJSON, - LocalConfigFromJSONTyped, - LocalConfigToJSON, - LocalConfigToJSONTyped, -} from './LocalConfig'; -import type { CCloudConfig } from './CCloudConfig'; + LocalConfigFromJSON, + LocalConfigFromJSONTyped, + LocalConfigToJSON, + LocalConfigToJSONTyped, +} from "./LocalConfig"; +import type { CCloudConfig } from "./CCloudConfig"; import { - CCloudConfigFromJSON, - CCloudConfigFromJSONTyped, - CCloudConfigToJSON, - CCloudConfigToJSONTyped, -} from './CCloudConfig'; -import type { KafkaClusterConfig } from './KafkaClusterConfig'; + CCloudConfigFromJSON, + CCloudConfigFromJSONTyped, + CCloudConfigToJSON, + CCloudConfigToJSONTyped, +} from "./CCloudConfig"; +import type { KafkaClusterConfig } from "./KafkaClusterConfig"; import { - KafkaClusterConfigFromJSON, - KafkaClusterConfigFromJSONTyped, - KafkaClusterConfigToJSON, - KafkaClusterConfigToJSONTyped, -} from './KafkaClusterConfig'; + KafkaClusterConfigFromJSON, + KafkaClusterConfigFromJSONTyped, + KafkaClusterConfigToJSON, + KafkaClusterConfigToJSONTyped, +} from "./KafkaClusterConfig"; /** * The connection details that can be set or changed. @@ -55,97 +55,104 @@ import { * @interface ConnectionSpec */ export interface ConnectionSpec { - /** - * The unique identifier of the connection resource. - * @type {string} - * @memberof ConnectionSpec - */ - id?: string; - /** - * The user-supplied name of the connection resource. - * @type {string} - * @memberof ConnectionSpec - */ - name?: string; - /** - * The type of connection resource. - * @type {ConnectionType} - * @memberof ConnectionSpec - */ - type?: ConnectionType; - /** - * The details for connecting to CCloud. - * @type {CCloudConfig} - * @memberof ConnectionSpec - */ - ccloud_config?: CCloudConfig; - /** - * The details for connecting to Confluent Local. - * @type {LocalConfig} - * @memberof ConnectionSpec - */ - local_config?: LocalConfig; - /** - * The details for connecting to a CCloud, Confluent Platform, or Apache Kafka cluster. - * @type {KafkaClusterConfig} - * @memberof ConnectionSpec - */ - kafka_cluster?: KafkaClusterConfig; - /** - * The details for connecting to a Schema Registry. - * @type {SchemaRegistryConfig} - * @memberof ConnectionSpec - */ - schema_registry?: SchemaRegistryConfig; + /** + * The unique identifier of the connection resource. + * @type {string} + * @memberof ConnectionSpec + */ + id?: string; + /** + * The user-supplied name of the connection resource. + * @type {string} + * @memberof ConnectionSpec + */ + name?: string; + /** + * The type of connection resource. + * @type {ConnectionType} + * @memberof ConnectionSpec + */ + type?: ConnectionType; + /** + * The details for connecting to CCloud. + * @type {CCloudConfig} + * @memberof ConnectionSpec + */ + ccloud_config?: CCloudConfig; + /** + * The details for connecting to Confluent Local. + * @type {LocalConfig} + * @memberof ConnectionSpec + */ + local_config?: LocalConfig; + /** + * The details for connecting to a CCloud, Confluent Platform, or Apache Kafka cluster. + * @type {KafkaClusterConfig} + * @memberof ConnectionSpec + */ + kafka_cluster?: KafkaClusterConfig; + /** + * The details for connecting to a Schema Registry. + * @type {SchemaRegistryConfig} + * @memberof ConnectionSpec + */ + schema_registry?: SchemaRegistryConfig; } - - /** * Check if a given object implements the ConnectionSpec interface. */ export function instanceOfConnectionSpec(value: object): value is ConnectionSpec { - return true; + return true; } export function ConnectionSpecFromJSON(json: any): ConnectionSpec { - return ConnectionSpecFromJSONTyped(json, false); + return ConnectionSpecFromJSONTyped(json, false); } -export function ConnectionSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionSpec { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - 'type': json['type'] == null ? undefined : ConnectionTypeFromJSON(json['type']), - 'ccloud_config': json['ccloud_config'] == null ? undefined : CCloudConfigFromJSON(json['ccloud_config']), - 'local_config': json['local_config'] == null ? undefined : LocalConfigFromJSON(json['local_config']), - 'kafka_cluster': json['kafka_cluster'] == null ? undefined : KafkaClusterConfigFromJSON(json['kafka_cluster']), - 'schema_registry': json['schema_registry'] == null ? undefined : SchemaRegistryConfigFromJSON(json['schema_registry']), - }; +export function ConnectionSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConnectionSpec { + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + name: json["name"] == null ? undefined : json["name"], + type: json["type"] == null ? undefined : ConnectionTypeFromJSON(json["type"]), + ccloud_config: + json["ccloud_config"] == null ? undefined : CCloudConfigFromJSON(json["ccloud_config"]), + local_config: + json["local_config"] == null ? undefined : LocalConfigFromJSON(json["local_config"]), + kafka_cluster: + json["kafka_cluster"] == null ? undefined : KafkaClusterConfigFromJSON(json["kafka_cluster"]), + schema_registry: + json["schema_registry"] == null + ? undefined + : SchemaRegistryConfigFromJSON(json["schema_registry"]), + }; } export function ConnectionSpecToJSON(json: any): ConnectionSpec { - return ConnectionSpecToJSONTyped(json, false); + return ConnectionSpecToJSONTyped(json, false); } -export function ConnectionSpecToJSONTyped(value?: ConnectionSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConnectionSpecToJSONTyped( + value?: ConnectionSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'name': value['name'], - 'type': ConnectionTypeToJSON(value['type']), - 'ccloud_config': CCloudConfigToJSON(value['ccloud_config']), - 'local_config': LocalConfigToJSON(value['local_config']), - 'kafka_cluster': KafkaClusterConfigToJSON(value['kafka_cluster']), - 'schema_registry': SchemaRegistryConfigToJSON(value['schema_registry']), - }; + return { + id: value["id"], + name: value["name"], + type: ConnectionTypeToJSON(value["type"]), + ccloud_config: CCloudConfigToJSON(value["ccloud_config"]), + local_config: LocalConfigToJSON(value["local_config"]), + kafka_cluster: KafkaClusterConfigToJSON(value["kafka_cluster"]), + schema_registry: SchemaRegistryConfigToJSON(value["schema_registry"]), + }; } - diff --git a/src/clients/sidecar/models/ConnectionStatus.ts b/src/clients/sidecar/models/ConnectionStatus.ts index 5f8c8337cd..184a2bf974 100644 --- a/src/clients/sidecar/models/ConnectionStatus.ts +++ b/src/clients/sidecar/models/ConnectionStatus.ts @@ -12,92 +12,99 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SchemaRegistryStatus } from './SchemaRegistryStatus'; +import { mapValues } from "../runtime"; +import type { SchemaRegistryStatus } from "./SchemaRegistryStatus"; import { - SchemaRegistryStatusFromJSON, - SchemaRegistryStatusFromJSONTyped, - SchemaRegistryStatusToJSON, - SchemaRegistryStatusToJSONTyped, -} from './SchemaRegistryStatus'; -import type { CCloudStatus } from './CCloudStatus'; + SchemaRegistryStatusFromJSON, + SchemaRegistryStatusFromJSONTyped, + SchemaRegistryStatusToJSON, + SchemaRegistryStatusToJSONTyped, +} from "./SchemaRegistryStatus"; +import type { CCloudStatus } from "./CCloudStatus"; import { - CCloudStatusFromJSON, - CCloudStatusFromJSONTyped, - CCloudStatusToJSON, - CCloudStatusToJSONTyped, -} from './CCloudStatus'; -import type { KafkaClusterStatus } from './KafkaClusterStatus'; + CCloudStatusFromJSON, + CCloudStatusFromJSONTyped, + CCloudStatusToJSON, + CCloudStatusToJSONTyped, +} from "./CCloudStatus"; +import type { KafkaClusterStatus } from "./KafkaClusterStatus"; import { - KafkaClusterStatusFromJSON, - KafkaClusterStatusFromJSONTyped, - KafkaClusterStatusToJSON, - KafkaClusterStatusToJSONTyped, -} from './KafkaClusterStatus'; + KafkaClusterStatusFromJSON, + KafkaClusterStatusFromJSONTyped, + KafkaClusterStatusToJSON, + KafkaClusterStatusToJSONTyped, +} from "./KafkaClusterStatus"; /** - * + * * @export * @interface ConnectionStatus */ export interface ConnectionStatus { - /** - * - * @type {CCloudStatus} - * @memberof ConnectionStatus - */ - ccloud?: CCloudStatus; - /** - * - * @type {KafkaClusterStatus} - * @memberof ConnectionStatus - */ - kafka_cluster?: KafkaClusterStatus; - /** - * - * @type {SchemaRegistryStatus} - * @memberof ConnectionStatus - */ - schema_registry?: SchemaRegistryStatus; + /** + * + * @type {CCloudStatus} + * @memberof ConnectionStatus + */ + ccloud?: CCloudStatus; + /** + * + * @type {KafkaClusterStatus} + * @memberof ConnectionStatus + */ + kafka_cluster?: KafkaClusterStatus; + /** + * + * @type {SchemaRegistryStatus} + * @memberof ConnectionStatus + */ + schema_registry?: SchemaRegistryStatus; } /** * Check if a given object implements the ConnectionStatus interface. */ export function instanceOfConnectionStatus(value: object): value is ConnectionStatus { - return true; + return true; } export function ConnectionStatusFromJSON(json: any): ConnectionStatus { - return ConnectionStatusFromJSONTyped(json, false); + return ConnectionStatusFromJSONTyped(json, false); } -export function ConnectionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionStatus { - if (json == null) { - return json; - } - return { - - 'ccloud': json['ccloud'] == null ? undefined : CCloudStatusFromJSON(json['ccloud']), - 'kafka_cluster': json['kafka_cluster'] == null ? undefined : KafkaClusterStatusFromJSON(json['kafka_cluster']), - 'schema_registry': json['schema_registry'] == null ? undefined : SchemaRegistryStatusFromJSON(json['schema_registry']), - }; +export function ConnectionStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConnectionStatus { + if (json == null) { + return json; + } + return { + ccloud: json["ccloud"] == null ? undefined : CCloudStatusFromJSON(json["ccloud"]), + kafka_cluster: + json["kafka_cluster"] == null ? undefined : KafkaClusterStatusFromJSON(json["kafka_cluster"]), + schema_registry: + json["schema_registry"] == null + ? undefined + : SchemaRegistryStatusFromJSON(json["schema_registry"]), + }; } export function ConnectionStatusToJSON(json: any): ConnectionStatus { - return ConnectionStatusToJSONTyped(json, false); + return ConnectionStatusToJSONTyped(json, false); } -export function ConnectionStatusToJSONTyped(value?: ConnectionStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConnectionStatusToJSONTyped( + value?: ConnectionStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'ccloud': CCloudStatusToJSON(value['ccloud']), - 'kafka_cluster': KafkaClusterStatusToJSON(value['kafka_cluster']), - 'schema_registry': SchemaRegistryStatusToJSON(value['schema_registry']), - }; + return { + ccloud: CCloudStatusToJSON(value["ccloud"]), + kafka_cluster: KafkaClusterStatusToJSON(value["kafka_cluster"]), + schema_registry: SchemaRegistryStatusToJSON(value["schema_registry"]), + }; } - diff --git a/src/clients/sidecar/models/ConnectionType.ts b/src/clients/sidecar/models/ConnectionType.ts index 289ddcc434..e284708ac3 100644 --- a/src/clients/sidecar/models/ConnectionType.ts +++ b/src/clients/sidecar/models/ConnectionType.ts @@ -13,41 +13,45 @@ */ /** - * + * * @export * @enum {string} */ export enum ConnectionType { - Local = 'LOCAL', - Ccloud = 'CCLOUD', - Direct = 'DIRECT' + Local = "LOCAL", + Ccloud = "CCLOUD", + Direct = "DIRECT", } - export function instanceOfConnectionType(value: any): boolean { - for (const key in ConnectionType) { - if (Object.prototype.hasOwnProperty.call(ConnectionType, key)) { - if (ConnectionType[key as keyof typeof ConnectionType] === value) { - return true; - } - } + for (const key in ConnectionType) { + if (Object.prototype.hasOwnProperty.call(ConnectionType, key)) { + if (ConnectionType[key as keyof typeof ConnectionType] === value) { + return true; + } } - return false; + } + return false; } export function ConnectionTypeFromJSON(json: any): ConnectionType { - return ConnectionTypeFromJSONTyped(json, false); + return ConnectionTypeFromJSONTyped(json, false); } -export function ConnectionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionType { - return json as ConnectionType; +export function ConnectionTypeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConnectionType { + return json as ConnectionType; } export function ConnectionTypeToJSON(value?: ConnectionType | null): any { - return value as any; + return value as any; } -export function ConnectionTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ConnectionType { - return value as ConnectionType; +export function ConnectionTypeToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): ConnectionType { + return value as ConnectionType; } - diff --git a/src/clients/sidecar/models/ConnectionsList.ts b/src/clients/sidecar/models/ConnectionsList.ts index 6b5abd54ba..6010581e13 100644 --- a/src/clients/sidecar/models/ConnectionsList.ts +++ b/src/clients/sidecar/models/ConnectionsList.ts @@ -12,97 +12,100 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { CollectionMetadata } from './CollectionMetadata'; +import { mapValues } from "../runtime"; +import type { CollectionMetadata } from "./CollectionMetadata"; import { - CollectionMetadataFromJSON, - CollectionMetadataFromJSONTyped, - CollectionMetadataToJSON, - CollectionMetadataToJSONTyped, -} from './CollectionMetadata'; -import type { Connection } from './Connection'; + CollectionMetadataFromJSON, + CollectionMetadataFromJSONTyped, + CollectionMetadataToJSON, + CollectionMetadataToJSONTyped, +} from "./CollectionMetadata"; +import type { Connection } from "./Connection"; import { - ConnectionFromJSON, - ConnectionFromJSONTyped, - ConnectionToJSON, - ConnectionToJSONTyped, -} from './Connection'; + ConnectionFromJSON, + ConnectionFromJSONTyped, + ConnectionToJSON, + ConnectionToJSONTyped, +} from "./Connection"; /** - * + * * @export * @interface ConnectionsList */ export interface ConnectionsList { - /** - * - * @type {string} - * @memberof ConnectionsList - */ - api_version: string; - /** - * - * @type {string} - * @memberof ConnectionsList - */ - kind: string; - /** - * - * @type {CollectionMetadata} - * @memberof ConnectionsList - */ - metadata: CollectionMetadata; - /** - * - * @type {Array} - * @memberof ConnectionsList - */ - data: Array; + /** + * + * @type {string} + * @memberof ConnectionsList + */ + api_version: string; + /** + * + * @type {string} + * @memberof ConnectionsList + */ + kind: string; + /** + * + * @type {CollectionMetadata} + * @memberof ConnectionsList + */ + metadata: CollectionMetadata; + /** + * + * @type {Array} + * @memberof ConnectionsList + */ + data: Array; } /** * Check if a given object implements the ConnectionsList interface. */ export function instanceOfConnectionsList(value: object): value is ConnectionsList { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('metadata' in value) || value['metadata'] === undefined) return false; - if (!('data' in value) || value['data'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; } export function ConnectionsListFromJSON(json: any): ConnectionsList { - return ConnectionsListFromJSONTyped(json, false); + return ConnectionsListFromJSONTyped(json, false); } -export function ConnectionsListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectionsList { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': CollectionMetadataFromJSON(json['metadata']), - 'data': ((json['data'] as Array).map(ConnectionFromJSON)), - }; +export function ConnectionsListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ConnectionsList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: CollectionMetadataFromJSON(json["metadata"]), + data: (json["data"] as Array).map(ConnectionFromJSON), + }; } export function ConnectionsListToJSON(json: any): ConnectionsList { - return ConnectionsListToJSONTyped(json, false); + return ConnectionsListToJSONTyped(json, false); } -export function ConnectionsListToJSONTyped(value?: ConnectionsList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ConnectionsListToJSONTyped( + value?: ConnectionsList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': CollectionMetadataToJSON(value['metadata']), - 'data': ((value['data'] as Array).map(ConnectionToJSON)), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: CollectionMetadataToJSON(value["metadata"]), + data: (value["data"] as Array).map(ConnectionToJSON), + }; } - diff --git a/src/clients/sidecar/models/DataFormat.ts b/src/clients/sidecar/models/DataFormat.ts index 6284caf58c..5d16843a7e 100644 --- a/src/clients/sidecar/models/DataFormat.ts +++ b/src/clients/sidecar/models/DataFormat.ts @@ -14,7 +14,7 @@ /** * The data format that represents the bytes of a Kafka message. - * + * * * AVRO: Apache Avro schema format. * * JSONSCHEMA: JSON schema format. * * PROTOBUF: Google Protocol Buffers schema format. @@ -30,44 +30,42 @@ * And further, we tried to but could not interpret these bytes as a JSON value. * - The Kafka serializer/deserializer known to sidecar failed to parse the schematized bytes * (meaning the schema id was present in the magic bytes, but our classes could not interpret the rest of the bytes.) - * + * * @export * @enum {string} */ export enum DataFormat { - Avro = 'AVRO', - Jsonschema = 'JSONSCHEMA', - Protobuf = 'PROTOBUF', - Json = 'JSON', - Utf8String = 'UTF8_STRING', - RawBytes = 'RAW_BYTES' + Avro = "AVRO", + Jsonschema = "JSONSCHEMA", + Protobuf = "PROTOBUF", + Json = "JSON", + Utf8String = "UTF8_STRING", + RawBytes = "RAW_BYTES", } - export function instanceOfDataFormat(value: any): boolean { - for (const key in DataFormat) { - if (Object.prototype.hasOwnProperty.call(DataFormat, key)) { - if (DataFormat[key as keyof typeof DataFormat] === value) { - return true; - } - } + for (const key in DataFormat) { + if (Object.prototype.hasOwnProperty.call(DataFormat, key)) { + if (DataFormat[key as keyof typeof DataFormat] === value) { + return true; + } } - return false; + } + return false; } export function DataFormatFromJSON(json: any): DataFormat { - return DataFormatFromJSONTyped(json, false); + return DataFormatFromJSONTyped(json, false); } export function DataFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataFormat { - return json as DataFormat; + return json as DataFormat; } export function DataFormatToJSON(value?: DataFormat | null): any { - return value as any; + return value as any; } export function DataFormatToJSONTyped(value: any, ignoreDiscriminator: boolean): DataFormat { - return value as DataFormat; + return value as DataFormat; } - diff --git a/src/clients/sidecar/models/ExceededFields.ts b/src/clients/sidecar/models/ExceededFields.ts index 3102c7ef27..3f9b599623 100644 --- a/src/clients/sidecar/models/ExceededFields.ts +++ b/src/clients/sidecar/models/ExceededFields.ts @@ -12,62 +12,65 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ExceededFields */ export interface ExceededFields { - /** - * - * @type {boolean} - * @memberof ExceededFields - */ - key?: boolean; - /** - * - * @type {boolean} - * @memberof ExceededFields - */ - value?: boolean; + /** + * + * @type {boolean} + * @memberof ExceededFields + */ + key?: boolean; + /** + * + * @type {boolean} + * @memberof ExceededFields + */ + value?: boolean; } /** * Check if a given object implements the ExceededFields interface. */ export function instanceOfExceededFields(value: object): value is ExceededFields { - return true; + return true; } export function ExceededFieldsFromJSON(json: any): ExceededFields { - return ExceededFieldsFromJSONTyped(json, false); + return ExceededFieldsFromJSONTyped(json, false); } -export function ExceededFieldsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExceededFields { - if (json == null) { - return json; - } - return { - - 'key': json['key'] == null ? undefined : json['key'], - 'value': json['value'] == null ? undefined : json['value'], - }; +export function ExceededFieldsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ExceededFields { + if (json == null) { + return json; + } + return { + key: json["key"] == null ? undefined : json["key"], + value: json["value"] == null ? undefined : json["value"], + }; } export function ExceededFieldsToJSON(json: any): ExceededFields { - return ExceededFieldsToJSONTyped(json, false); + return ExceededFieldsToJSONTyped(json, false); } -export function ExceededFieldsToJSONTyped(value?: ExceededFields | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ExceededFieldsToJSONTyped( + value?: ExceededFields | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'key': value['key'], - 'value': value['value'], - }; + return { + key: value["key"], + value: value["value"], + }; } - diff --git a/src/clients/sidecar/models/Failure.ts b/src/clients/sidecar/models/Failure.ts index c0d124a55b..bb43f8f489 100644 --- a/src/clients/sidecar/models/Failure.ts +++ b/src/clients/sidecar/models/Failure.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { SidecarError } from './SidecarError'; +import { mapValues } from "../runtime"; +import type { SidecarError } from "./SidecarError"; import { - SidecarErrorFromJSON, - SidecarErrorFromJSONTyped, - SidecarErrorToJSON, - SidecarErrorToJSONTyped, -} from './SidecarError'; + SidecarErrorFromJSON, + SidecarErrorFromJSONTyped, + SidecarErrorToJSON, + SidecarErrorToJSONTyped, +} from "./SidecarError"; /** * Provides overall information about problems encountered while performing an operation. @@ -27,79 +27,81 @@ import { * @interface Failure */ export interface Failure { - /** - * - * @type {string} - * @memberof Failure - */ - status?: string; - /** - * - * @type {string} - * @memberof Failure - */ - code?: string; - /** - * - * @type {string} - * @memberof Failure - */ - title?: string; - /** - * - * @type {string} - * @memberof Failure - */ - id?: string; - /** - * - * @type {Array} - * @memberof Failure - */ - errors?: Array; + /** + * + * @type {string} + * @memberof Failure + */ + status?: string; + /** + * + * @type {string} + * @memberof Failure + */ + code?: string; + /** + * + * @type {string} + * @memberof Failure + */ + title?: string; + /** + * + * @type {string} + * @memberof Failure + */ + id?: string; + /** + * + * @type {Array} + * @memberof Failure + */ + errors?: Array; } /** * Check if a given object implements the Failure interface. */ export function instanceOfFailure(value: object): value is Failure { - return true; + return true; } export function FailureFromJSON(json: any): Failure { - return FailureFromJSONTyped(json, false); + return FailureFromJSONTyped(json, false); } export function FailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Failure { - if (json == null) { - return json; - } - return { - - 'status': json['status'] == null ? undefined : json['status'], - 'code': json['code'] == null ? undefined : json['code'], - 'title': json['title'] == null ? undefined : json['title'], - 'id': json['id'] == null ? undefined : json['id'], - 'errors': json['errors'] == null ? undefined : ((json['errors'] as Array).map(SidecarErrorFromJSON)), - }; + if (json == null) { + return json; + } + return { + status: json["status"] == null ? undefined : json["status"], + code: json["code"] == null ? undefined : json["code"], + title: json["title"] == null ? undefined : json["title"], + id: json["id"] == null ? undefined : json["id"], + errors: + json["errors"] == null ? undefined : (json["errors"] as Array).map(SidecarErrorFromJSON), + }; } export function FailureToJSON(json: any): Failure { - return FailureToJSONTyped(json, false); + return FailureToJSONTyped(json, false); } -export function FailureToJSONTyped(value?: Failure | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function FailureToJSONTyped( + value?: Failure | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'status': value['status'], - 'code': value['code'], - 'title': value['title'], - 'id': value['id'], - 'errors': value['errors'] == null ? undefined : ((value['errors'] as Array).map(SidecarErrorToJSON)), - }; + return { + status: value["status"], + code: value["code"], + title: value["title"], + id: value["id"], + errors: + value["errors"] == null ? undefined : (value["errors"] as Array).map(SidecarErrorToJSON), + }; } - diff --git a/src/clients/sidecar/models/HashAlgorithm.ts b/src/clients/sidecar/models/HashAlgorithm.ts index 89647244d9..88fba770ec 100644 --- a/src/clients/sidecar/models/HashAlgorithm.ts +++ b/src/clients/sidecar/models/HashAlgorithm.ts @@ -13,40 +13,38 @@ */ /** - * + * * @export * @enum {string} */ export enum HashAlgorithm { - _256 = 'SCRAM_SHA_256', - _512 = 'SCRAM_SHA_512' + _256 = "SCRAM_SHA_256", + _512 = "SCRAM_SHA_512", } - export function instanceOfHashAlgorithm(value: any): boolean { - for (const key in HashAlgorithm) { - if (Object.prototype.hasOwnProperty.call(HashAlgorithm, key)) { - if (HashAlgorithm[key as keyof typeof HashAlgorithm] === value) { - return true; - } - } + for (const key in HashAlgorithm) { + if (Object.prototype.hasOwnProperty.call(HashAlgorithm, key)) { + if (HashAlgorithm[key as keyof typeof HashAlgorithm] === value) { + return true; + } } - return false; + } + return false; } export function HashAlgorithmFromJSON(json: any): HashAlgorithm { - return HashAlgorithmFromJSONTyped(json, false); + return HashAlgorithmFromJSONTyped(json, false); } export function HashAlgorithmFromJSONTyped(json: any, ignoreDiscriminator: boolean): HashAlgorithm { - return json as HashAlgorithm; + return json as HashAlgorithm; } export function HashAlgorithmToJSON(value?: HashAlgorithm | null): any { - return value as any; + return value as any; } export function HashAlgorithmToJSONTyped(value: any, ignoreDiscriminator: boolean): HashAlgorithm { - return value as HashAlgorithm; + return value as HashAlgorithm; } - diff --git a/src/clients/sidecar/models/HealthCheck.ts b/src/clients/sidecar/models/HealthCheck.ts index 8f090445cf..8311ba4650 100644 --- a/src/clients/sidecar/models/HealthCheck.ts +++ b/src/clients/sidecar/models/HealthCheck.ts @@ -12,80 +12,79 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface HealthCheck */ export interface HealthCheck { - /** - * - * @type {object} - * @memberof HealthCheck - */ - data?: object | null; - /** - * - * @type {string} - * @memberof HealthCheck - */ - name?: string; - /** - * - * @type {string} - * @memberof HealthCheck - */ - status?: HealthCheckStatusEnum; + /** + * + * @type {object} + * @memberof HealthCheck + */ + data?: object | null; + /** + * + * @type {string} + * @memberof HealthCheck + */ + name?: string; + /** + * + * @type {string} + * @memberof HealthCheck + */ + status?: HealthCheckStatusEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum HealthCheckStatusEnum { - Up = 'UP', - Down = 'DOWN' + Up = "UP", + Down = "DOWN", } - /** * Check if a given object implements the HealthCheck interface. */ export function instanceOfHealthCheck(value: object): value is HealthCheck { - return true; + return true; } export function HealthCheckFromJSON(json: any): HealthCheck { - return HealthCheckFromJSONTyped(json, false); + return HealthCheckFromJSONTyped(json, false); } export function HealthCheckFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthCheck { - if (json == null) { - return json; - } - return { - - 'data': json['data'] == null ? undefined : json['data'], - 'name': json['name'] == null ? undefined : json['name'], - 'status': json['status'] == null ? undefined : json['status'], - }; + if (json == null) { + return json; + } + return { + data: json["data"] == null ? undefined : json["data"], + name: json["name"] == null ? undefined : json["name"], + status: json["status"] == null ? undefined : json["status"], + }; } export function HealthCheckToJSON(json: any): HealthCheck { - return HealthCheckToJSONTyped(json, false); + return HealthCheckToJSONTyped(json, false); } -export function HealthCheckToJSONTyped(value?: HealthCheck | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthCheckToJSONTyped( + value?: HealthCheck | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'data': value['data'], - 'name': value['name'], - 'status': value['status'], - }; + return { + data: value["data"], + name: value["name"], + status: value["status"], + }; } - diff --git a/src/clients/sidecar/models/HealthResponse.ts b/src/clients/sidecar/models/HealthResponse.ts index eb52d38911..5a211542d4 100644 --- a/src/clients/sidecar/models/HealthResponse.ts +++ b/src/clients/sidecar/models/HealthResponse.ts @@ -12,80 +12,84 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { HealthCheck } from './HealthCheck'; +import { mapValues } from "../runtime"; +import type { HealthCheck } from "./HealthCheck"; import { - HealthCheckFromJSON, - HealthCheckFromJSONTyped, - HealthCheckToJSON, - HealthCheckToJSONTyped, -} from './HealthCheck'; + HealthCheckFromJSON, + HealthCheckFromJSONTyped, + HealthCheckToJSON, + HealthCheckToJSONTyped, +} from "./HealthCheck"; /** - * + * * @export * @interface HealthResponse */ export interface HealthResponse { - /** - * - * @type {Array} - * @memberof HealthResponse - */ - checks?: Array; - /** - * - * @type {string} - * @memberof HealthResponse - */ - status?: HealthResponseStatusEnum; + /** + * + * @type {Array} + * @memberof HealthResponse + */ + checks?: Array; + /** + * + * @type {string} + * @memberof HealthResponse + */ + status?: HealthResponseStatusEnum; } /** -* @export -* @enum {string} -*/ + * @export + * @enum {string} + */ export enum HealthResponseStatusEnum { - Up = 'UP', - Down = 'DOWN' + Up = "UP", + Down = "DOWN", } - /** * Check if a given object implements the HealthResponse interface. */ export function instanceOfHealthResponse(value: object): value is HealthResponse { - return true; + return true; } export function HealthResponseFromJSON(json: any): HealthResponse { - return HealthResponseFromJSONTyped(json, false); + return HealthResponseFromJSONTyped(json, false); } -export function HealthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthResponse { - if (json == null) { - return json; - } - return { - - 'checks': json['checks'] == null ? undefined : ((json['checks'] as Array).map(HealthCheckFromJSON)), - 'status': json['status'] == null ? undefined : json['status'], - }; +export function HealthResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): HealthResponse { + if (json == null) { + return json; + } + return { + checks: + json["checks"] == null ? undefined : (json["checks"] as Array).map(HealthCheckFromJSON), + status: json["status"] == null ? undefined : json["status"], + }; } export function HealthResponseToJSON(json: any): HealthResponse { - return HealthResponseToJSONTyped(json, false); + return HealthResponseToJSONTyped(json, false); } -export function HealthResponseToJSONTyped(value?: HealthResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function HealthResponseToJSONTyped( + value?: HealthResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'checks': value['checks'] == null ? undefined : ((value['checks'] as Array).map(HealthCheckToJSON)), - 'status': value['status'], - }; + return { + checks: + value["checks"] == null ? undefined : (value["checks"] as Array).map(HealthCheckToJSON), + status: value["status"], + }; } - diff --git a/src/clients/sidecar/models/JsonNode.ts b/src/clients/sidecar/models/JsonNode.ts index 95b41ebf01..9609af0b34 100644 --- a/src/clients/sidecar/models/JsonNode.ts +++ b/src/clients/sidecar/models/JsonNode.ts @@ -12,232 +12,231 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { JsonNodeType } from './JsonNodeType'; +import { mapValues } from "../runtime"; +import type { JsonNodeType } from "./JsonNodeType"; import { - JsonNodeTypeFromJSON, - JsonNodeTypeFromJSONTyped, - JsonNodeTypeToJSON, - JsonNodeTypeToJSONTyped, -} from './JsonNodeType'; + JsonNodeTypeFromJSON, + JsonNodeTypeFromJSONTyped, + JsonNodeTypeToJSON, + JsonNodeTypeToJSONTyped, +} from "./JsonNodeType"; /** - * + * * @export * @interface JsonNode */ export interface JsonNode { - /** - * - * @type {boolean} - * @memberof JsonNode - */ - empty?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - valueNode?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - containerNode?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - missingNode?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - array?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - object?: boolean; - /** - * - * @type {JsonNodeType} - * @memberof JsonNode - */ - nodeType?: JsonNodeType; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - pojo?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - number?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - integralNumber?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - floatingPointNumber?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _short?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _int?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _long?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _float?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _double?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - bigDecimal?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - bigInteger?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - textual?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _boolean?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - _null?: boolean; - /** - * - * @type {boolean} - * @memberof JsonNode - */ - binary?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + empty?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + valueNode?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + containerNode?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + missingNode?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + array?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + object?: boolean; + /** + * + * @type {JsonNodeType} + * @memberof JsonNode + */ + nodeType?: JsonNodeType; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + pojo?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + number?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + integralNumber?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + floatingPointNumber?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _short?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _int?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _long?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _float?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _double?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + bigDecimal?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + bigInteger?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + textual?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _boolean?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + _null?: boolean; + /** + * + * @type {boolean} + * @memberof JsonNode + */ + binary?: boolean; } - - /** * Check if a given object implements the JsonNode interface. */ export function instanceOfJsonNode(value: object): value is JsonNode { - return true; + return true; } export function JsonNodeFromJSON(json: any): JsonNode { - return JsonNodeFromJSONTyped(json, false); + return JsonNodeFromJSONTyped(json, false); } export function JsonNodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonNode { - if (json == null) { - return json; - } - return { - - 'empty': json['empty'] == null ? undefined : json['empty'], - 'valueNode': json['valueNode'] == null ? undefined : json['valueNode'], - 'containerNode': json['containerNode'] == null ? undefined : json['containerNode'], - 'missingNode': json['missingNode'] == null ? undefined : json['missingNode'], - 'array': json['array'] == null ? undefined : json['array'], - 'object': json['object'] == null ? undefined : json['object'], - 'nodeType': json['nodeType'] == null ? undefined : JsonNodeTypeFromJSON(json['nodeType']), - 'pojo': json['pojo'] == null ? undefined : json['pojo'], - 'number': json['number'] == null ? undefined : json['number'], - 'integralNumber': json['integralNumber'] == null ? undefined : json['integralNumber'], - 'floatingPointNumber': json['floatingPointNumber'] == null ? undefined : json['floatingPointNumber'], - '_short': json['short'] == null ? undefined : json['short'], - '_int': json['int'] == null ? undefined : json['int'], - '_long': json['long'] == null ? undefined : json['long'], - '_float': json['float'] == null ? undefined : json['float'], - '_double': json['double'] == null ? undefined : json['double'], - 'bigDecimal': json['bigDecimal'] == null ? undefined : json['bigDecimal'], - 'bigInteger': json['bigInteger'] == null ? undefined : json['bigInteger'], - 'textual': json['textual'] == null ? undefined : json['textual'], - '_boolean': json['boolean'] == null ? undefined : json['boolean'], - '_null': json['null'] == null ? undefined : json['null'], - 'binary': json['binary'] == null ? undefined : json['binary'], - }; + if (json == null) { + return json; + } + return { + empty: json["empty"] == null ? undefined : json["empty"], + valueNode: json["valueNode"] == null ? undefined : json["valueNode"], + containerNode: json["containerNode"] == null ? undefined : json["containerNode"], + missingNode: json["missingNode"] == null ? undefined : json["missingNode"], + array: json["array"] == null ? undefined : json["array"], + object: json["object"] == null ? undefined : json["object"], + nodeType: json["nodeType"] == null ? undefined : JsonNodeTypeFromJSON(json["nodeType"]), + pojo: json["pojo"] == null ? undefined : json["pojo"], + number: json["number"] == null ? undefined : json["number"], + integralNumber: json["integralNumber"] == null ? undefined : json["integralNumber"], + floatingPointNumber: + json["floatingPointNumber"] == null ? undefined : json["floatingPointNumber"], + _short: json["short"] == null ? undefined : json["short"], + _int: json["int"] == null ? undefined : json["int"], + _long: json["long"] == null ? undefined : json["long"], + _float: json["float"] == null ? undefined : json["float"], + _double: json["double"] == null ? undefined : json["double"], + bigDecimal: json["bigDecimal"] == null ? undefined : json["bigDecimal"], + bigInteger: json["bigInteger"] == null ? undefined : json["bigInteger"], + textual: json["textual"] == null ? undefined : json["textual"], + _boolean: json["boolean"] == null ? undefined : json["boolean"], + _null: json["null"] == null ? undefined : json["null"], + binary: json["binary"] == null ? undefined : json["binary"], + }; } export function JsonNodeToJSON(json: any): JsonNode { - return JsonNodeToJSONTyped(json, false); + return JsonNodeToJSONTyped(json, false); } -export function JsonNodeToJSONTyped(value?: JsonNode | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function JsonNodeToJSONTyped( + value?: JsonNode | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'empty': value['empty'], - 'valueNode': value['valueNode'], - 'containerNode': value['containerNode'], - 'missingNode': value['missingNode'], - 'array': value['array'], - 'object': value['object'], - 'nodeType': JsonNodeTypeToJSON(value['nodeType']), - 'pojo': value['pojo'], - 'number': value['number'], - 'integralNumber': value['integralNumber'], - 'floatingPointNumber': value['floatingPointNumber'], - 'short': value['_short'], - 'int': value['_int'], - 'long': value['_long'], - 'float': value['_float'], - 'double': value['_double'], - 'bigDecimal': value['bigDecimal'], - 'bigInteger': value['bigInteger'], - 'textual': value['textual'], - 'boolean': value['_boolean'], - 'null': value['_null'], - 'binary': value['binary'], - }; + return { + empty: value["empty"], + valueNode: value["valueNode"], + containerNode: value["containerNode"], + missingNode: value["missingNode"], + array: value["array"], + object: value["object"], + nodeType: JsonNodeTypeToJSON(value["nodeType"]), + pojo: value["pojo"], + number: value["number"], + integralNumber: value["integralNumber"], + floatingPointNumber: value["floatingPointNumber"], + short: value["_short"], + int: value["_int"], + long: value["_long"], + float: value["_float"], + double: value["_double"], + bigDecimal: value["bigDecimal"], + bigInteger: value["bigInteger"], + textual: value["textual"], + boolean: value["_boolean"], + null: value["_null"], + binary: value["binary"], + }; } - diff --git a/src/clients/sidecar/models/JsonNodeType.ts b/src/clients/sidecar/models/JsonNodeType.ts index 9ff969968f..a19241d824 100644 --- a/src/clients/sidecar/models/JsonNodeType.ts +++ b/src/clients/sidecar/models/JsonNodeType.ts @@ -13,47 +13,45 @@ */ /** - * + * * @export * @enum {string} */ export enum JsonNodeType { - Array = 'ARRAY', - Binary = 'BINARY', - Boolean = 'BOOLEAN', - Missing = 'MISSING', - Null = 'NULL', - Number = 'NUMBER', - Object = 'OBJECT', - Pojo = 'POJO', - String = 'STRING' + Array = "ARRAY", + Binary = "BINARY", + Boolean = "BOOLEAN", + Missing = "MISSING", + Null = "NULL", + Number = "NUMBER", + Object = "OBJECT", + Pojo = "POJO", + String = "STRING", } - export function instanceOfJsonNodeType(value: any): boolean { - for (const key in JsonNodeType) { - if (Object.prototype.hasOwnProperty.call(JsonNodeType, key)) { - if (JsonNodeType[key as keyof typeof JsonNodeType] === value) { - return true; - } - } + for (const key in JsonNodeType) { + if (Object.prototype.hasOwnProperty.call(JsonNodeType, key)) { + if (JsonNodeType[key as keyof typeof JsonNodeType] === value) { + return true; + } } - return false; + } + return false; } export function JsonNodeTypeFromJSON(json: any): JsonNodeType { - return JsonNodeTypeFromJSONTyped(json, false); + return JsonNodeTypeFromJSONTyped(json, false); } export function JsonNodeTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JsonNodeType { - return json as JsonNodeType; + return json as JsonNodeType; } export function JsonNodeTypeToJSON(value?: JsonNodeType | null): any { - return value as any; + return value as any; } export function JsonNodeTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): JsonNodeType { - return value as JsonNodeType; + return value as JsonNodeType; } - diff --git a/src/clients/sidecar/models/KafkaClusterConfig.ts b/src/clients/sidecar/models/KafkaClusterConfig.ts index e1ff469e1b..7d22c72a6d 100644 --- a/src/clients/sidecar/models/KafkaClusterConfig.ts +++ b/src/clients/sidecar/models/KafkaClusterConfig.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TLSConfig } from './TLSConfig'; +import { mapValues } from "../runtime"; +import type { TLSConfig } from "./TLSConfig"; import { - TLSConfigFromJSON, - TLSConfigFromJSONTyped, - TLSConfigToJSON, - TLSConfigToJSONTyped, -} from './TLSConfig'; -import type { KafkaClusterConfigCredentials } from './KafkaClusterConfigCredentials'; + TLSConfigFromJSON, + TLSConfigFromJSONTyped, + TLSConfigToJSON, + TLSConfigToJSONTyped, +} from "./TLSConfig"; +import type { KafkaClusterConfigCredentials } from "./KafkaClusterConfigCredentials"; import { - KafkaClusterConfigCredentialsFromJSON, - KafkaClusterConfigCredentialsFromJSONTyped, - KafkaClusterConfigCredentialsToJSON, - KafkaClusterConfigCredentialsToJSONTyped, -} from './KafkaClusterConfigCredentials'; + KafkaClusterConfigCredentialsFromJSON, + KafkaClusterConfigCredentialsFromJSONTyped, + KafkaClusterConfigCredentialsToJSON, + KafkaClusterConfigCredentialsToJSONTyped, +} from "./KafkaClusterConfigCredentials"; /** * Kafka cluster configuration. @@ -34,72 +34,78 @@ import { * @interface KafkaClusterConfig */ export interface KafkaClusterConfig { - /** - * A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. - * @type {string} - * @memberof KafkaClusterConfig - */ - bootstrap_servers: string; - /** - * - * @type {KafkaClusterConfigCredentials} - * @memberof KafkaClusterConfig - */ - credentials?: KafkaClusterConfigCredentials; - /** - * The SSL configuration for connecting to the Kafka cluster. To disable, set `enabled` to false. To use the default SSL settings, set `enabled` to true and leave the `truststore` and `keystore` fields unset. - * @type {TLSConfig} - * @memberof KafkaClusterConfig - */ - ssl?: TLSConfig | null; - /** - * The suffix to append to the Kafka client config option client.id when interacting with this Kafka cluster. Is useful when, for instance, connecting to WarpStream agents via Kubernetes port-forwarding. - * @type {string} - * @memberof KafkaClusterConfig - */ - client_id_suffix?: string | null; + /** + * A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. + * @type {string} + * @memberof KafkaClusterConfig + */ + bootstrap_servers: string; + /** + * + * @type {KafkaClusterConfigCredentials} + * @memberof KafkaClusterConfig + */ + credentials?: KafkaClusterConfigCredentials; + /** + * The SSL configuration for connecting to the Kafka cluster. To disable, set `enabled` to false. To use the default SSL settings, set `enabled` to true and leave the `truststore` and `keystore` fields unset. + * @type {TLSConfig} + * @memberof KafkaClusterConfig + */ + ssl?: TLSConfig | null; + /** + * The suffix to append to the Kafka client config option client.id when interacting with this Kafka cluster. Is useful when, for instance, connecting to WarpStream agents via Kubernetes port-forwarding. + * @type {string} + * @memberof KafkaClusterConfig + */ + client_id_suffix?: string | null; } /** * Check if a given object implements the KafkaClusterConfig interface. */ export function instanceOfKafkaClusterConfig(value: object): value is KafkaClusterConfig { - if (!('bootstrap_servers' in value) || value['bootstrap_servers'] === undefined) return false; - return true; + if (!("bootstrap_servers" in value) || value["bootstrap_servers"] === undefined) return false; + return true; } export function KafkaClusterConfigFromJSON(json: any): KafkaClusterConfig { - return KafkaClusterConfigFromJSONTyped(json, false); + return KafkaClusterConfigFromJSONTyped(json, false); } -export function KafkaClusterConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): KafkaClusterConfig { - if (json == null) { - return json; - } - return { - - 'bootstrap_servers': json['bootstrap_servers'], - 'credentials': json['credentials'] == null ? undefined : KafkaClusterConfigCredentialsFromJSON(json['credentials']), - 'ssl': json['ssl'] == null ? undefined : TLSConfigFromJSON(json['ssl']), - 'client_id_suffix': json['client_id_suffix'] == null ? undefined : json['client_id_suffix'], - }; +export function KafkaClusterConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): KafkaClusterConfig { + if (json == null) { + return json; + } + return { + bootstrap_servers: json["bootstrap_servers"], + credentials: + json["credentials"] == null + ? undefined + : KafkaClusterConfigCredentialsFromJSON(json["credentials"]), + ssl: json["ssl"] == null ? undefined : TLSConfigFromJSON(json["ssl"]), + client_id_suffix: json["client_id_suffix"] == null ? undefined : json["client_id_suffix"], + }; } export function KafkaClusterConfigToJSON(json: any): KafkaClusterConfig { - return KafkaClusterConfigToJSONTyped(json, false); + return KafkaClusterConfigToJSONTyped(json, false); } -export function KafkaClusterConfigToJSONTyped(value?: KafkaClusterConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function KafkaClusterConfigToJSONTyped( + value?: KafkaClusterConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'bootstrap_servers': value['bootstrap_servers'], - 'credentials': KafkaClusterConfigCredentialsToJSON(value['credentials']), - 'ssl': TLSConfigToJSON(value['ssl']), - 'client_id_suffix': value['client_id_suffix'], - }; + return { + bootstrap_servers: value["bootstrap_servers"], + credentials: KafkaClusterConfigCredentialsToJSON(value["credentials"]), + ssl: TLSConfigToJSON(value["ssl"]), + client_id_suffix: value["client_id_suffix"], + }; } - diff --git a/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts b/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts index 9d7c4dcd4d..cd3d6688a2 100644 --- a/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts +++ b/src/clients/sidecar/models/KafkaClusterConfigCredentials.ts @@ -12,101 +12,111 @@ * Do not edit the class manually. */ -import type { ApiKeyAndSecret } from './ApiKeyAndSecret'; +import type { ApiKeyAndSecret } from "./ApiKeyAndSecret"; import { - instanceOfApiKeyAndSecret, - ApiKeyAndSecretFromJSON, - ApiKeyAndSecretFromJSONTyped, - ApiKeyAndSecretToJSON, -} from './ApiKeyAndSecret'; -import type { BasicCredentials } from './BasicCredentials'; + instanceOfApiKeyAndSecret, + ApiKeyAndSecretFromJSON, + ApiKeyAndSecretFromJSONTyped, + ApiKeyAndSecretToJSON, +} from "./ApiKeyAndSecret"; +import type { BasicCredentials } from "./BasicCredentials"; import { - instanceOfBasicCredentials, - BasicCredentialsFromJSON, - BasicCredentialsFromJSONTyped, - BasicCredentialsToJSON, -} from './BasicCredentials'; -import type { KerberosCredentials } from './KerberosCredentials'; + instanceOfBasicCredentials, + BasicCredentialsFromJSON, + BasicCredentialsFromJSONTyped, + BasicCredentialsToJSON, +} from "./BasicCredentials"; +import type { KerberosCredentials } from "./KerberosCredentials"; import { - instanceOfKerberosCredentials, - KerberosCredentialsFromJSON, - KerberosCredentialsFromJSONTyped, - KerberosCredentialsToJSON, -} from './KerberosCredentials'; -import type { OAuthCredentials } from './OAuthCredentials'; + instanceOfKerberosCredentials, + KerberosCredentialsFromJSON, + KerberosCredentialsFromJSONTyped, + KerberosCredentialsToJSON, +} from "./KerberosCredentials"; +import type { OAuthCredentials } from "./OAuthCredentials"; import { - instanceOfOAuthCredentials, - OAuthCredentialsFromJSON, - OAuthCredentialsFromJSONTyped, - OAuthCredentialsToJSON, -} from './OAuthCredentials'; -import type { ScramCredentials } from './ScramCredentials'; + instanceOfOAuthCredentials, + OAuthCredentialsFromJSON, + OAuthCredentialsFromJSONTyped, + OAuthCredentialsToJSON, +} from "./OAuthCredentials"; +import type { ScramCredentials } from "./ScramCredentials"; import { - instanceOfScramCredentials, - ScramCredentialsFromJSON, - ScramCredentialsFromJSONTyped, - ScramCredentialsToJSON, -} from './ScramCredentials'; + instanceOfScramCredentials, + ScramCredentialsFromJSON, + ScramCredentialsFromJSONTyped, + ScramCredentialsToJSON, +} from "./ScramCredentials"; /** * @type KafkaClusterConfigCredentials * The credentials for the Kafka cluster, or null if no authentication is required * @export */ -export type KafkaClusterConfigCredentials = ApiKeyAndSecret | BasicCredentials | KerberosCredentials | OAuthCredentials | ScramCredentials; +export type KafkaClusterConfigCredentials = + | ApiKeyAndSecret + | BasicCredentials + | KerberosCredentials + | OAuthCredentials + | ScramCredentials; export function KafkaClusterConfigCredentialsFromJSON(json: any): KafkaClusterConfigCredentials { - return KafkaClusterConfigCredentialsFromJSONTyped(json, false); + return KafkaClusterConfigCredentialsFromJSONTyped(json, false); } -export function KafkaClusterConfigCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KafkaClusterConfigCredentials { - if (json == null) { - return json; - } - if (instanceOfApiKeyAndSecret(json)) { - return ApiKeyAndSecretFromJSONTyped(json, true); - } - if (instanceOfBasicCredentials(json)) { - return BasicCredentialsFromJSONTyped(json, true); - } - if (instanceOfKerberosCredentials(json)) { - return KerberosCredentialsFromJSONTyped(json, true); - } - if (instanceOfOAuthCredentials(json)) { - return OAuthCredentialsFromJSONTyped(json, true); - } - if (instanceOfScramCredentials(json)) { - return ScramCredentialsFromJSONTyped(json, true); - } +export function KafkaClusterConfigCredentialsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): KafkaClusterConfigCredentials { + if (json == null) { + return json; + } + if (instanceOfApiKeyAndSecret(json)) { + return ApiKeyAndSecretFromJSONTyped(json, true); + } + if (instanceOfBasicCredentials(json)) { + return BasicCredentialsFromJSONTyped(json, true); + } + if (instanceOfKerberosCredentials(json)) { + return KerberosCredentialsFromJSONTyped(json, true); + } + if (instanceOfOAuthCredentials(json)) { + return OAuthCredentialsFromJSONTyped(json, true); + } + if (instanceOfScramCredentials(json)) { + return ScramCredentialsFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function KafkaClusterConfigCredentialsToJSON(json: any): any { - return KafkaClusterConfigCredentialsToJSONTyped(json, false); + return KafkaClusterConfigCredentialsToJSONTyped(json, false); } -export function KafkaClusterConfigCredentialsToJSONTyped(value?: KafkaClusterConfigCredentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function KafkaClusterConfigCredentialsToJSONTyped( + value?: KafkaClusterConfigCredentials | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - if (instanceOfApiKeyAndSecret(value)) { - return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); - } - if (instanceOfBasicCredentials(value)) { - return BasicCredentialsToJSON(value as BasicCredentials); - } - if (instanceOfKerberosCredentials(value)) { - return KerberosCredentialsToJSON(value as KerberosCredentials); - } - if (instanceOfOAuthCredentials(value)) { - return OAuthCredentialsToJSON(value as OAuthCredentials); - } - if (instanceOfScramCredentials(value)) { - return ScramCredentialsToJSON(value as ScramCredentials); - } + if (instanceOfApiKeyAndSecret(value)) { + return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); + } + if (instanceOfBasicCredentials(value)) { + return BasicCredentialsToJSON(value as BasicCredentials); + } + if (instanceOfKerberosCredentials(value)) { + return KerberosCredentialsToJSON(value as KerberosCredentials); + } + if (instanceOfOAuthCredentials(value)) { + return OAuthCredentialsToJSON(value as OAuthCredentials); + } + if (instanceOfScramCredentials(value)) { + return ScramCredentialsToJSON(value as ScramCredentials); + } - return {}; + return {}; } - diff --git a/src/clients/sidecar/models/KafkaClusterStatus.ts b/src/clients/sidecar/models/KafkaClusterStatus.ts index c21ff2b183..efcc7a9290 100644 --- a/src/clients/sidecar/models/KafkaClusterStatus.ts +++ b/src/clients/sidecar/models/KafkaClusterStatus.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AuthErrors } from './AuthErrors'; +import { mapValues } from "../runtime"; +import type { AuthErrors } from "./AuthErrors"; import { - AuthErrorsFromJSON, - AuthErrorsFromJSONTyped, - AuthErrorsToJSON, - AuthErrorsToJSONTyped, -} from './AuthErrors'; -import type { ConnectedState } from './ConnectedState'; + AuthErrorsFromJSON, + AuthErrorsFromJSONTyped, + AuthErrorsToJSON, + AuthErrorsToJSONTyped, +} from "./AuthErrors"; +import type { ConnectedState } from "./ConnectedState"; import { - ConnectedStateFromJSON, - ConnectedStateFromJSONTyped, - ConnectedStateToJSON, - ConnectedStateToJSONTyped, -} from './ConnectedState'; -import type { UserInfo } from './UserInfo'; + ConnectedStateFromJSON, + ConnectedStateFromJSONTyped, + ConnectedStateToJSON, + ConnectedStateToJSONTyped, +} from "./ConnectedState"; +import type { UserInfo } from "./UserInfo"; import { - UserInfoFromJSON, - UserInfoFromJSONTyped, - UserInfoToJSON, - UserInfoToJSONTyped, -} from './UserInfo'; + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from "./UserInfo"; /** * The status related to the specified Kafka cluster. @@ -41,66 +41,67 @@ import { * @interface KafkaClusterStatus */ export interface KafkaClusterStatus { - /** - * The state of the connection to the Kafka cluster. - * @type {ConnectedState} - * @memberof KafkaClusterStatus - */ - state: ConnectedState; - /** - * Information about the authenticated principal, if known. - * @type {UserInfo} - * @memberof KafkaClusterStatus - */ - user?: UserInfo; - /** - * Errors related to the connection to the Kafka cluster. - * @type {AuthErrors} - * @memberof KafkaClusterStatus - */ - errors?: AuthErrors; + /** + * The state of the connection to the Kafka cluster. + * @type {ConnectedState} + * @memberof KafkaClusterStatus + */ + state: ConnectedState; + /** + * Information about the authenticated principal, if known. + * @type {UserInfo} + * @memberof KafkaClusterStatus + */ + user?: UserInfo; + /** + * Errors related to the connection to the Kafka cluster. + * @type {AuthErrors} + * @memberof KafkaClusterStatus + */ + errors?: AuthErrors; } - - /** * Check if a given object implements the KafkaClusterStatus interface. */ export function instanceOfKafkaClusterStatus(value: object): value is KafkaClusterStatus { - if (!('state' in value) || value['state'] === undefined) return false; - return true; + if (!("state" in value) || value["state"] === undefined) return false; + return true; } export function KafkaClusterStatusFromJSON(json: any): KafkaClusterStatus { - return KafkaClusterStatusFromJSONTyped(json, false); + return KafkaClusterStatusFromJSONTyped(json, false); } -export function KafkaClusterStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): KafkaClusterStatus { - if (json == null) { - return json; - } - return { - - 'state': ConnectedStateFromJSON(json['state']), - 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), - 'errors': json['errors'] == null ? undefined : AuthErrorsFromJSON(json['errors']), - }; +export function KafkaClusterStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): KafkaClusterStatus { + if (json == null) { + return json; + } + return { + state: ConnectedStateFromJSON(json["state"]), + user: json["user"] == null ? undefined : UserInfoFromJSON(json["user"]), + errors: json["errors"] == null ? undefined : AuthErrorsFromJSON(json["errors"]), + }; } export function KafkaClusterStatusToJSON(json: any): KafkaClusterStatus { - return KafkaClusterStatusToJSONTyped(json, false); + return KafkaClusterStatusToJSONTyped(json, false); } -export function KafkaClusterStatusToJSONTyped(value?: KafkaClusterStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function KafkaClusterStatusToJSONTyped( + value?: KafkaClusterStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'state': ConnectedStateToJSON(value['state']), - 'user': UserInfoToJSON(value['user']), - 'errors': AuthErrorsToJSON(value['errors']), - }; + return { + state: ConnectedStateToJSON(value["state"]), + user: UserInfoToJSON(value["user"]), + errors: AuthErrorsToJSON(value["errors"]), + }; } - diff --git a/src/clients/sidecar/models/KerberosCredentials.ts b/src/clients/sidecar/models/KerberosCredentials.ts index 2dd29b9989..f57494aff3 100644 --- a/src/clients/sidecar/models/KerberosCredentials.ts +++ b/src/clients/sidecar/models/KerberosCredentials.ts @@ -12,72 +12,75 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Kerberos authentication credentials * @export * @interface KerberosCredentials */ export interface KerberosCredentials { - /** - * The Kerberos principal to use. - * @type {string} - * @memberof KerberosCredentials - */ - principal: string; - /** - * The Kerberos keytab file path. - * @type {string} - * @memberof KerberosCredentials - */ - keytab_path: string; - /** - * Service name that matches the primary name of the Kafka brokers configured in the Broker JAAS file. Defaults to 'kafka'. - * @type {string} - * @memberof KerberosCredentials - */ - service_name?: string; + /** + * The Kerberos principal to use. + * @type {string} + * @memberof KerberosCredentials + */ + principal: string; + /** + * The Kerberos keytab file path. + * @type {string} + * @memberof KerberosCredentials + */ + keytab_path: string; + /** + * Service name that matches the primary name of the Kafka brokers configured in the Broker JAAS file. Defaults to 'kafka'. + * @type {string} + * @memberof KerberosCredentials + */ + service_name?: string; } /** * Check if a given object implements the KerberosCredentials interface. */ export function instanceOfKerberosCredentials(value: object): value is KerberosCredentials { - if (!('principal' in value) || value['principal'] === undefined) return false; - if (!('keytab_path' in value) || value['keytab_path'] === undefined) return false; - return true; + if (!("principal" in value) || value["principal"] === undefined) return false; + if (!("keytab_path" in value) || value["keytab_path"] === undefined) return false; + return true; } export function KerberosCredentialsFromJSON(json: any): KerberosCredentials { - return KerberosCredentialsFromJSONTyped(json, false); + return KerberosCredentialsFromJSONTyped(json, false); } -export function KerberosCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): KerberosCredentials { - if (json == null) { - return json; - } - return { - - 'principal': json['principal'], - 'keytab_path': json['keytab_path'], - 'service_name': json['service_name'] == null ? undefined : json['service_name'], - }; +export function KerberosCredentialsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): KerberosCredentials { + if (json == null) { + return json; + } + return { + principal: json["principal"], + keytab_path: json["keytab_path"], + service_name: json["service_name"] == null ? undefined : json["service_name"], + }; } export function KerberosCredentialsToJSON(json: any): KerberosCredentials { - return KerberosCredentialsToJSONTyped(json, false); + return KerberosCredentialsToJSONTyped(json, false); } -export function KerberosCredentialsToJSONTyped(value?: KerberosCredentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function KerberosCredentialsToJSONTyped( + value?: KerberosCredentials | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'principal': value['principal'], - 'keytab_path': value['keytab_path'], - 'service_name': value['service_name'], - }; + return { + principal: value["principal"], + keytab_path: value["keytab_path"], + service_name: value["service_name"], + }; } - diff --git a/src/clients/sidecar/models/KeyOrValueMetadata.ts b/src/clients/sidecar/models/KeyOrValueMetadata.ts index e7bf437b27..d16f3441fd 100644 --- a/src/clients/sidecar/models/KeyOrValueMetadata.ts +++ b/src/clients/sidecar/models/KeyOrValueMetadata.ts @@ -12,80 +12,81 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { DataFormat } from './DataFormat'; +import { mapValues } from "../runtime"; +import type { DataFormat } from "./DataFormat"; import { - DataFormatFromJSON, - DataFormatFromJSONTyped, - DataFormatToJSON, - DataFormatToJSONTyped, -} from './DataFormat'; + DataFormatFromJSON, + DataFormatFromJSONTyped, + DataFormatToJSON, + DataFormatToJSONTyped, +} from "./DataFormat"; /** - * + * * @export * @interface KeyOrValueMetadata */ export interface KeyOrValueMetadata { - /** - * - * @type {number} - * @memberof KeyOrValueMetadata - */ - schema_id?: number; - /** - * - * @type {string} - * @memberof KeyOrValueMetadata - */ - schema_guid?: string; - /** - * - * @type {DataFormat} - * @memberof KeyOrValueMetadata - */ - data_format?: DataFormat; + /** + * + * @type {number} + * @memberof KeyOrValueMetadata + */ + schema_id?: number; + /** + * + * @type {string} + * @memberof KeyOrValueMetadata + */ + schema_guid?: string; + /** + * + * @type {DataFormat} + * @memberof KeyOrValueMetadata + */ + data_format?: DataFormat; } - - /** * Check if a given object implements the KeyOrValueMetadata interface. */ export function instanceOfKeyOrValueMetadata(value: object): value is KeyOrValueMetadata { - return true; + return true; } export function KeyOrValueMetadataFromJSON(json: any): KeyOrValueMetadata { - return KeyOrValueMetadataFromJSONTyped(json, false); + return KeyOrValueMetadataFromJSONTyped(json, false); } -export function KeyOrValueMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyOrValueMetadata { - if (json == null) { - return json; - } - return { - - 'schema_id': json['schema_id'] == null ? undefined : json['schema_id'], - 'schema_guid': json['schema_guid'] == null ? undefined : json['schema_guid'], - 'data_format': json['data_format'] == null ? undefined : DataFormatFromJSON(json['data_format']), - }; +export function KeyOrValueMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): KeyOrValueMetadata { + if (json == null) { + return json; + } + return { + schema_id: json["schema_id"] == null ? undefined : json["schema_id"], + schema_guid: json["schema_guid"] == null ? undefined : json["schema_guid"], + data_format: json["data_format"] == null ? undefined : DataFormatFromJSON(json["data_format"]), + }; } export function KeyOrValueMetadataToJSON(json: any): KeyOrValueMetadata { - return KeyOrValueMetadataToJSONTyped(json, false); + return KeyOrValueMetadataToJSONTyped(json, false); } -export function KeyOrValueMetadataToJSONTyped(value?: KeyOrValueMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function KeyOrValueMetadataToJSONTyped( + value?: KeyOrValueMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'schema_id': value['schema_id'], - 'schema_guid': value['schema_guid'], - 'data_format': DataFormatToJSON(value['data_format']), - }; + return { + schema_id: value["schema_id"], + schema_guid: value["schema_guid"], + data_format: DataFormatToJSON(value["data_format"]), + }; } - diff --git a/src/clients/sidecar/models/KeyStore.ts b/src/clients/sidecar/models/KeyStore.ts index 69d7f349f3..7fa84edb8e 100644 --- a/src/clients/sidecar/models/KeyStore.ts +++ b/src/clients/sidecar/models/KeyStore.ts @@ -12,89 +12,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { StoreType } from './StoreType'; +import { mapValues } from "../runtime"; +import type { StoreType } from "./StoreType"; import { - StoreTypeFromJSON, - StoreTypeFromJSONTyped, - StoreTypeToJSON, - StoreTypeToJSONTyped, -} from './StoreType'; + StoreTypeFromJSON, + StoreTypeFromJSONTyped, + StoreTypeToJSON, + StoreTypeToJSONTyped, +} from "./StoreType"; /** - * + * * @export * @interface KeyStore */ export interface KeyStore { - /** - * The path to the local key store file. Only specified if client needs to be authenticated by the server (mutual TLS). - * @type {string} - * @memberof KeyStore - */ - path: string; - /** - * The password for the local key store file. If a password is not set, key store file configured will still be used, but integrity checking is disabled. A key store password is not supported for PEM format. - * @type {string} - * @memberof KeyStore - */ - password?: string | null; - /** - * The file format of the local key store file. - * @type {StoreType} - * @memberof KeyStore - */ - type?: StoreType | null; - /** - * The password of the private key in the local key store file. - * @type {string} - * @memberof KeyStore - */ - key_password?: string | null; + /** + * The path to the local key store file. Only specified if client needs to be authenticated by the server (mutual TLS). + * @type {string} + * @memberof KeyStore + */ + path: string; + /** + * The password for the local key store file. If a password is not set, key store file configured will still be used, but integrity checking is disabled. A key store password is not supported for PEM format. + * @type {string} + * @memberof KeyStore + */ + password?: string | null; + /** + * The file format of the local key store file. + * @type {StoreType} + * @memberof KeyStore + */ + type?: StoreType | null; + /** + * The password of the private key in the local key store file. + * @type {string} + * @memberof KeyStore + */ + key_password?: string | null; } - - /** * Check if a given object implements the KeyStore interface. */ export function instanceOfKeyStore(value: object): value is KeyStore { - if (!('path' in value) || value['path'] === undefined) return false; - return true; + if (!("path" in value) || value["path"] === undefined) return false; + return true; } export function KeyStoreFromJSON(json: any): KeyStore { - return KeyStoreFromJSONTyped(json, false); + return KeyStoreFromJSONTyped(json, false); } export function KeyStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyStore { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'password': json['password'] == null ? undefined : json['password'], - 'type': json['type'] == null ? undefined : StoreTypeFromJSON(json['type']), - 'key_password': json['key_password'] == null ? undefined : json['key_password'], - }; + if (json == null) { + return json; + } + return { + path: json["path"], + password: json["password"] == null ? undefined : json["password"], + type: json["type"] == null ? undefined : StoreTypeFromJSON(json["type"]), + key_password: json["key_password"] == null ? undefined : json["key_password"], + }; } export function KeyStoreToJSON(json: any): KeyStore { - return KeyStoreToJSONTyped(json, false); + return KeyStoreToJSONTyped(json, false); } -export function KeyStoreToJSONTyped(value?: KeyStore | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function KeyStoreToJSONTyped( + value?: KeyStore | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'password': value['password'], - 'type': StoreTypeToJSON(value['type']), - 'key_password': value['key_password'], - }; + return { + path: value["path"], + password: value["password"], + type: StoreTypeToJSON(value["type"]), + key_password: value["key_password"], + }; } - diff --git a/src/clients/sidecar/models/LocalConfig.ts b/src/clients/sidecar/models/LocalConfig.ts index 350d413b7a..1fdff7471a 100644 --- a/src/clients/sidecar/models/LocalConfig.ts +++ b/src/clients/sidecar/models/LocalConfig.ts @@ -12,54 +12,55 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Configuration when using Confluent Local and optionally a local Schema Registry. * @export * @interface LocalConfig */ export interface LocalConfig { - /** - * The URL of the Schema Registry running locally. - * @type {string} - * @memberof LocalConfig - */ - schema_registry_uri?: string; + /** + * The URL of the Schema Registry running locally. + * @type {string} + * @memberof LocalConfig + */ + schema_registry_uri?: string; } /** * Check if a given object implements the LocalConfig interface. */ export function instanceOfLocalConfig(value: object): value is LocalConfig { - return true; + return true; } export function LocalConfigFromJSON(json: any): LocalConfig { - return LocalConfigFromJSONTyped(json, false); + return LocalConfigFromJSONTyped(json, false); } export function LocalConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocalConfig { - if (json == null) { - return json; - } - return { - - 'schema_registry_uri': json['schema-registry-uri'] == null ? undefined : json['schema-registry-uri'], - }; + if (json == null) { + return json; + } + return { + schema_registry_uri: + json["schema-registry-uri"] == null ? undefined : json["schema-registry-uri"], + }; } export function LocalConfigToJSON(json: any): LocalConfig { - return LocalConfigToJSONTyped(json, false); + return LocalConfigToJSONTyped(json, false); } -export function LocalConfigToJSONTyped(value?: LocalConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function LocalConfigToJSONTyped( + value?: LocalConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'schema-registry-uri': value['schema_registry_uri'], - }; + return { + "schema-registry-uri": value["schema_registry_uri"], + }; } - diff --git a/src/clients/sidecar/models/OAuthCredentials.ts b/src/clients/sidecar/models/OAuthCredentials.ts index ade8eb0372..b53b487669 100644 --- a/src/clients/sidecar/models/OAuthCredentials.ts +++ b/src/clients/sidecar/models/OAuthCredentials.ts @@ -12,104 +12,110 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * OAuth 2.0 authentication credentials * @export * @interface OAuthCredentials */ export interface OAuthCredentials { - /** - * The URL of the OAuth 2.0 identity provider's token endpoint. - * @type {string} - * @memberof OAuthCredentials - */ - tokens_url: string; - /** - * The public identifier for the application as registered with the OAuth 2.0 identity provider. - * @type {string} - * @memberof OAuthCredentials - */ - client_id: string; - /** - * The client secret known only to the application and the OAuth 2.0 identity provider. - * @type {string} - * @memberof OAuthCredentials - */ - client_secret?: string; - /** - * The scope to use. The scope is optional and required only when your identity provider doesn't have a default scope or your groups claim is linked to a scope path to use when connecting to the external service. - * @type {string} - * @memberof OAuthCredentials - */ - scope?: string; - /** - * The timeout in milliseconds when connecting to your identity provider. - * @type {number} - * @memberof OAuthCredentials - */ - connect_timeout_millis?: number; - /** - * Additional property that can be added in the request header to identify the logical cluster ID to connect to. For example, this may be a Confluent Cloud Kafka or Schema Registry cluster ID. - * @type {string} - * @memberof OAuthCredentials - */ - ccloud_logical_cluster_id?: string; - /** - * Additional property that can be added in the request header to identify the principal ID for authorization. For example, this may be a Confluent Cloud identity pool ID. - * @type {string} - * @memberof OAuthCredentials - */ - ccloud_identity_pool_id?: string; + /** + * The URL of the OAuth 2.0 identity provider's token endpoint. + * @type {string} + * @memberof OAuthCredentials + */ + tokens_url: string; + /** + * The public identifier for the application as registered with the OAuth 2.0 identity provider. + * @type {string} + * @memberof OAuthCredentials + */ + client_id: string; + /** + * The client secret known only to the application and the OAuth 2.0 identity provider. + * @type {string} + * @memberof OAuthCredentials + */ + client_secret?: string; + /** + * The scope to use. The scope is optional and required only when your identity provider doesn't have a default scope or your groups claim is linked to a scope path to use when connecting to the external service. + * @type {string} + * @memberof OAuthCredentials + */ + scope?: string; + /** + * The timeout in milliseconds when connecting to your identity provider. + * @type {number} + * @memberof OAuthCredentials + */ + connect_timeout_millis?: number; + /** + * Additional property that can be added in the request header to identify the logical cluster ID to connect to. For example, this may be a Confluent Cloud Kafka or Schema Registry cluster ID. + * @type {string} + * @memberof OAuthCredentials + */ + ccloud_logical_cluster_id?: string; + /** + * Additional property that can be added in the request header to identify the principal ID for authorization. For example, this may be a Confluent Cloud identity pool ID. + * @type {string} + * @memberof OAuthCredentials + */ + ccloud_identity_pool_id?: string; } /** * Check if a given object implements the OAuthCredentials interface. */ export function instanceOfOAuthCredentials(value: object): value is OAuthCredentials { - if (!('tokens_url' in value) || value['tokens_url'] === undefined) return false; - if (!('client_id' in value) || value['client_id'] === undefined) return false; - return true; + if (!("tokens_url" in value) || value["tokens_url"] === undefined) return false; + if (!("client_id" in value) || value["client_id"] === undefined) return false; + return true; } export function OAuthCredentialsFromJSON(json: any): OAuthCredentials { - return OAuthCredentialsFromJSONTyped(json, false); + return OAuthCredentialsFromJSONTyped(json, false); } -export function OAuthCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthCredentials { - if (json == null) { - return json; - } - return { - - 'tokens_url': json['tokens_url'], - 'client_id': json['client_id'], - 'client_secret': json['client_secret'] == null ? undefined : json['client_secret'], - 'scope': json['scope'] == null ? undefined : json['scope'], - 'connect_timeout_millis': json['connect_timeout_millis'] == null ? undefined : json['connect_timeout_millis'], - 'ccloud_logical_cluster_id': json['ccloud_logical_cluster_id'] == null ? undefined : json['ccloud_logical_cluster_id'], - 'ccloud_identity_pool_id': json['ccloud_identity_pool_id'] == null ? undefined : json['ccloud_identity_pool_id'], - }; +export function OAuthCredentialsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): OAuthCredentials { + if (json == null) { + return json; + } + return { + tokens_url: json["tokens_url"], + client_id: json["client_id"], + client_secret: json["client_secret"] == null ? undefined : json["client_secret"], + scope: json["scope"] == null ? undefined : json["scope"], + connect_timeout_millis: + json["connect_timeout_millis"] == null ? undefined : json["connect_timeout_millis"], + ccloud_logical_cluster_id: + json["ccloud_logical_cluster_id"] == null ? undefined : json["ccloud_logical_cluster_id"], + ccloud_identity_pool_id: + json["ccloud_identity_pool_id"] == null ? undefined : json["ccloud_identity_pool_id"], + }; } export function OAuthCredentialsToJSON(json: any): OAuthCredentials { - return OAuthCredentialsToJSONTyped(json, false); + return OAuthCredentialsToJSONTyped(json, false); } -export function OAuthCredentialsToJSONTyped(value?: OAuthCredentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function OAuthCredentialsToJSONTyped( + value?: OAuthCredentials | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'tokens_url': value['tokens_url'], - 'client_id': value['client_id'], - 'client_secret': value['client_secret'], - 'scope': value['scope'], - 'connect_timeout_millis': value['connect_timeout_millis'], - 'ccloud_logical_cluster_id': value['ccloud_logical_cluster_id'], - 'ccloud_identity_pool_id': value['ccloud_identity_pool_id'], - }; + return { + tokens_url: value["tokens_url"], + client_id: value["client_id"], + client_secret: value["client_secret"], + scope: value["scope"], + connect_timeout_millis: value["connect_timeout_millis"], + ccloud_logical_cluster_id: value["ccloud_logical_cluster_id"], + ccloud_identity_pool_id: value["ccloud_identity_pool_id"], + }; } - diff --git a/src/clients/sidecar/models/PartitionConsumeData.ts b/src/clients/sidecar/models/PartitionConsumeData.ts index c82dcc16d9..35a70e18ea 100644 --- a/src/clients/sidecar/models/PartitionConsumeData.ts +++ b/src/clients/sidecar/models/PartitionConsumeData.ts @@ -12,78 +12,87 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PartitionConsumeRecord } from './PartitionConsumeRecord'; +import { mapValues } from "../runtime"; +import type { PartitionConsumeRecord } from "./PartitionConsumeRecord"; import { - PartitionConsumeRecordFromJSON, - PartitionConsumeRecordFromJSONTyped, - PartitionConsumeRecordToJSON, - PartitionConsumeRecordToJSONTyped, -} from './PartitionConsumeRecord'; + PartitionConsumeRecordFromJSON, + PartitionConsumeRecordFromJSONTyped, + PartitionConsumeRecordToJSON, + PartitionConsumeRecordToJSONTyped, +} from "./PartitionConsumeRecord"; /** - * + * * @export * @interface PartitionConsumeData */ export interface PartitionConsumeData { - /** - * - * @type {number} - * @memberof PartitionConsumeData - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof PartitionConsumeData - */ - next_offset?: number; - /** - * - * @type {Array} - * @memberof PartitionConsumeData - */ - records?: Array; + /** + * + * @type {number} + * @memberof PartitionConsumeData + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof PartitionConsumeData + */ + next_offset?: number; + /** + * + * @type {Array} + * @memberof PartitionConsumeData + */ + records?: Array; } /** * Check if a given object implements the PartitionConsumeData interface. */ export function instanceOfPartitionConsumeData(value: object): value is PartitionConsumeData { - return true; + return true; } export function PartitionConsumeDataFromJSON(json: any): PartitionConsumeData { - return PartitionConsumeDataFromJSONTyped(json, false); + return PartitionConsumeDataFromJSONTyped(json, false); } -export function PartitionConsumeDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionConsumeData { - if (json == null) { - return json; - } - return { - - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'next_offset': json['next_offset'] == null ? undefined : json['next_offset'], - 'records': json['records'] == null ? undefined : ((json['records'] as Array).map(PartitionConsumeRecordFromJSON)), - }; +export function PartitionConsumeDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PartitionConsumeData { + if (json == null) { + return json; + } + return { + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + next_offset: json["next_offset"] == null ? undefined : json["next_offset"], + records: + json["records"] == null + ? undefined + : (json["records"] as Array).map(PartitionConsumeRecordFromJSON), + }; } export function PartitionConsumeDataToJSON(json: any): PartitionConsumeData { - return PartitionConsumeDataToJSONTyped(json, false); + return PartitionConsumeDataToJSONTyped(json, false); } -export function PartitionConsumeDataToJSONTyped(value?: PartitionConsumeData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PartitionConsumeDataToJSONTyped( + value?: PartitionConsumeData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partition_id': value['partition_id'], - 'next_offset': value['next_offset'], - 'records': value['records'] == null ? undefined : ((value['records'] as Array).map(PartitionConsumeRecordToJSON)), - }; + return { + partition_id: value["partition_id"], + next_offset: value["next_offset"], + records: + value["records"] == null + ? undefined + : (value["records"] as Array).map(PartitionConsumeRecordToJSON), + }; } - diff --git a/src/clients/sidecar/models/PartitionConsumeRecord.ts b/src/clients/sidecar/models/PartitionConsumeRecord.ts index 928df4d0cc..f22f8b26fb 100644 --- a/src/clients/sidecar/models/PartitionConsumeRecord.ts +++ b/src/clients/sidecar/models/PartitionConsumeRecord.ts @@ -12,172 +12,182 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { RecordMetadata } from './RecordMetadata'; +import { mapValues } from "../runtime"; +import type { RecordMetadata } from "./RecordMetadata"; import { - RecordMetadataFromJSON, - RecordMetadataFromJSONTyped, - RecordMetadataToJSON, - RecordMetadataToJSONTyped, -} from './RecordMetadata'; -import type { ExceededFields } from './ExceededFields'; + RecordMetadataFromJSON, + RecordMetadataFromJSONTyped, + RecordMetadataToJSON, + RecordMetadataToJSONTyped, +} from "./RecordMetadata"; +import type { ExceededFields } from "./ExceededFields"; import { - ExceededFieldsFromJSON, - ExceededFieldsFromJSONTyped, - ExceededFieldsToJSON, - ExceededFieldsToJSONTyped, -} from './ExceededFields'; -import type { TimestampType } from './TimestampType'; + ExceededFieldsFromJSON, + ExceededFieldsFromJSONTyped, + ExceededFieldsToJSON, + ExceededFieldsToJSONTyped, +} from "./ExceededFields"; +import type { TimestampType } from "./TimestampType"; import { - TimestampTypeFromJSON, - TimestampTypeFromJSONTyped, - TimestampTypeToJSON, - TimestampTypeToJSONTyped, -} from './TimestampType'; -import type { JsonNode } from './JsonNode'; + TimestampTypeFromJSON, + TimestampTypeFromJSONTyped, + TimestampTypeToJSON, + TimestampTypeToJSONTyped, +} from "./TimestampType"; +import type { JsonNode } from "./JsonNode"; import { - JsonNodeFromJSON, - JsonNodeFromJSONTyped, - JsonNodeToJSON, - JsonNodeToJSONTyped, -} from './JsonNode'; -import type { PartitionConsumeRecordHeader } from './PartitionConsumeRecordHeader'; + JsonNodeFromJSON, + JsonNodeFromJSONTyped, + JsonNodeToJSON, + JsonNodeToJSONTyped, +} from "./JsonNode"; +import type { PartitionConsumeRecordHeader } from "./PartitionConsumeRecordHeader"; import { - PartitionConsumeRecordHeaderFromJSON, - PartitionConsumeRecordHeaderFromJSONTyped, - PartitionConsumeRecordHeaderToJSON, - PartitionConsumeRecordHeaderToJSONTyped, -} from './PartitionConsumeRecordHeader'; + PartitionConsumeRecordHeaderFromJSON, + PartitionConsumeRecordHeaderFromJSONTyped, + PartitionConsumeRecordHeaderToJSON, + PartitionConsumeRecordHeaderToJSONTyped, +} from "./PartitionConsumeRecordHeader"; /** - * + * * @export * @interface PartitionConsumeRecord */ export interface PartitionConsumeRecord { - /** - * - * @type {number} - * @memberof PartitionConsumeRecord - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof PartitionConsumeRecord - */ - offset?: number; - /** - * - * @type {number} - * @memberof PartitionConsumeRecord - */ - timestamp?: number; - /** - * - * @type {TimestampType} - * @memberof PartitionConsumeRecord - */ - timestamp_type?: TimestampType; - /** - * - * @type {Array} - * @memberof PartitionConsumeRecord - */ - headers?: Array; - /** - * - * @type {JsonNode} - * @memberof PartitionConsumeRecord - */ - key?: JsonNode; - /** - * - * @type {JsonNode} - * @memberof PartitionConsumeRecord - */ - value?: JsonNode; - /** - * - * @type {RecordMetadata} - * @memberof PartitionConsumeRecord - */ - metadata?: RecordMetadata; - /** - * - * @type {string} - * @memberof PartitionConsumeRecord - */ - key_decoding_error?: string; - /** - * - * @type {string} - * @memberof PartitionConsumeRecord - */ - value_decoding_error?: string; - /** - * - * @type {ExceededFields} - * @memberof PartitionConsumeRecord - */ - exceeded_fields?: ExceededFields; + /** + * + * @type {number} + * @memberof PartitionConsumeRecord + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof PartitionConsumeRecord + */ + offset?: number; + /** + * + * @type {number} + * @memberof PartitionConsumeRecord + */ + timestamp?: number; + /** + * + * @type {TimestampType} + * @memberof PartitionConsumeRecord + */ + timestamp_type?: TimestampType; + /** + * + * @type {Array} + * @memberof PartitionConsumeRecord + */ + headers?: Array; + /** + * + * @type {JsonNode} + * @memberof PartitionConsumeRecord + */ + key?: JsonNode; + /** + * + * @type {JsonNode} + * @memberof PartitionConsumeRecord + */ + value?: JsonNode; + /** + * + * @type {RecordMetadata} + * @memberof PartitionConsumeRecord + */ + metadata?: RecordMetadata; + /** + * + * @type {string} + * @memberof PartitionConsumeRecord + */ + key_decoding_error?: string; + /** + * + * @type {string} + * @memberof PartitionConsumeRecord + */ + value_decoding_error?: string; + /** + * + * @type {ExceededFields} + * @memberof PartitionConsumeRecord + */ + exceeded_fields?: ExceededFields; } - - /** * Check if a given object implements the PartitionConsumeRecord interface. */ export function instanceOfPartitionConsumeRecord(value: object): value is PartitionConsumeRecord { - return true; + return true; } export function PartitionConsumeRecordFromJSON(json: any): PartitionConsumeRecord { - return PartitionConsumeRecordFromJSONTyped(json, false); + return PartitionConsumeRecordFromJSONTyped(json, false); } -export function PartitionConsumeRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionConsumeRecord { - if (json == null) { - return json; - } - return { - - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'offset': json['offset'] == null ? undefined : json['offset'], - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'timestamp_type': json['timestamp_type'] == null ? undefined : TimestampTypeFromJSON(json['timestamp_type']), - 'headers': json['headers'] == null ? undefined : ((json['headers'] as Array).map(PartitionConsumeRecordHeaderFromJSON)), - 'key': json['key'] == null ? undefined : JsonNodeFromJSON(json['key']), - 'value': json['value'] == null ? undefined : JsonNodeFromJSON(json['value']), - 'metadata': json['metadata'] == null ? undefined : RecordMetadataFromJSON(json['metadata']), - 'key_decoding_error': json['key_decoding_error'] == null ? undefined : json['key_decoding_error'], - 'value_decoding_error': json['value_decoding_error'] == null ? undefined : json['value_decoding_error'], - 'exceeded_fields': json['exceeded_fields'] == null ? undefined : ExceededFieldsFromJSON(json['exceeded_fields']), - }; +export function PartitionConsumeRecordFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PartitionConsumeRecord { + if (json == null) { + return json; + } + return { + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + offset: json["offset"] == null ? undefined : json["offset"], + timestamp: json["timestamp"] == null ? undefined : json["timestamp"], + timestamp_type: + json["timestamp_type"] == null ? undefined : TimestampTypeFromJSON(json["timestamp_type"]), + headers: + json["headers"] == null + ? undefined + : (json["headers"] as Array).map(PartitionConsumeRecordHeaderFromJSON), + key: json["key"] == null ? undefined : JsonNodeFromJSON(json["key"]), + value: json["value"] == null ? undefined : JsonNodeFromJSON(json["value"]), + metadata: json["metadata"] == null ? undefined : RecordMetadataFromJSON(json["metadata"]), + key_decoding_error: json["key_decoding_error"] == null ? undefined : json["key_decoding_error"], + value_decoding_error: + json["value_decoding_error"] == null ? undefined : json["value_decoding_error"], + exceeded_fields: + json["exceeded_fields"] == null ? undefined : ExceededFieldsFromJSON(json["exceeded_fields"]), + }; } export function PartitionConsumeRecordToJSON(json: any): PartitionConsumeRecord { - return PartitionConsumeRecordToJSONTyped(json, false); + return PartitionConsumeRecordToJSONTyped(json, false); } -export function PartitionConsumeRecordToJSONTyped(value?: PartitionConsumeRecord | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PartitionConsumeRecordToJSONTyped( + value?: PartitionConsumeRecord | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partition_id': value['partition_id'], - 'offset': value['offset'], - 'timestamp': value['timestamp'], - 'timestamp_type': TimestampTypeToJSON(value['timestamp_type']), - 'headers': value['headers'] == null ? undefined : ((value['headers'] as Array).map(PartitionConsumeRecordHeaderToJSON)), - 'key': JsonNodeToJSON(value['key']), - 'value': JsonNodeToJSON(value['value']), - 'metadata': RecordMetadataToJSON(value['metadata']), - 'key_decoding_error': value['key_decoding_error'], - 'value_decoding_error': value['value_decoding_error'], - 'exceeded_fields': ExceededFieldsToJSON(value['exceeded_fields']), - }; + return { + partition_id: value["partition_id"], + offset: value["offset"], + timestamp: value["timestamp"], + timestamp_type: TimestampTypeToJSON(value["timestamp_type"]), + headers: + value["headers"] == null + ? undefined + : (value["headers"] as Array).map(PartitionConsumeRecordHeaderToJSON), + key: JsonNodeToJSON(value["key"]), + value: JsonNodeToJSON(value["value"]), + metadata: RecordMetadataToJSON(value["metadata"]), + key_decoding_error: value["key_decoding_error"], + value_decoding_error: value["value_decoding_error"], + exceeded_fields: ExceededFieldsToJSON(value["exceeded_fields"]), + }; } - diff --git a/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts b/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts index d82b728239..0c9d52176d 100644 --- a/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts +++ b/src/clients/sidecar/models/PartitionConsumeRecordHeader.ts @@ -12,62 +12,67 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PartitionConsumeRecordHeader */ export interface PartitionConsumeRecordHeader { - /** - * - * @type {string} - * @memberof PartitionConsumeRecordHeader - */ - key?: string; - /** - * - * @type {string} - * @memberof PartitionConsumeRecordHeader - */ - value?: string; + /** + * + * @type {string} + * @memberof PartitionConsumeRecordHeader + */ + key?: string; + /** + * + * @type {string} + * @memberof PartitionConsumeRecordHeader + */ + value?: string; } /** * Check if a given object implements the PartitionConsumeRecordHeader interface. */ -export function instanceOfPartitionConsumeRecordHeader(value: object): value is PartitionConsumeRecordHeader { - return true; +export function instanceOfPartitionConsumeRecordHeader( + value: object, +): value is PartitionConsumeRecordHeader { + return true; } export function PartitionConsumeRecordHeaderFromJSON(json: any): PartitionConsumeRecordHeader { - return PartitionConsumeRecordHeaderFromJSONTyped(json, false); + return PartitionConsumeRecordHeaderFromJSONTyped(json, false); } -export function PartitionConsumeRecordHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionConsumeRecordHeader { - if (json == null) { - return json; - } - return { - - 'key': json['key'] == null ? undefined : json['key'], - 'value': json['value'] == null ? undefined : json['value'], - }; +export function PartitionConsumeRecordHeaderFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PartitionConsumeRecordHeader { + if (json == null) { + return json; + } + return { + key: json["key"] == null ? undefined : json["key"], + value: json["value"] == null ? undefined : json["value"], + }; } export function PartitionConsumeRecordHeaderToJSON(json: any): PartitionConsumeRecordHeader { - return PartitionConsumeRecordHeaderToJSONTyped(json, false); + return PartitionConsumeRecordHeaderToJSONTyped(json, false); } -export function PartitionConsumeRecordHeaderToJSONTyped(value?: PartitionConsumeRecordHeader | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PartitionConsumeRecordHeaderToJSONTyped( + value?: PartitionConsumeRecordHeader | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'key': value['key'], - 'value': value['value'], - }; + return { + key: value["key"], + value: value["value"], + }; } - diff --git a/src/clients/sidecar/models/PartitionOffset.ts b/src/clients/sidecar/models/PartitionOffset.ts index 49a9b8c3ef..70cf6500d7 100644 --- a/src/clients/sidecar/models/PartitionOffset.ts +++ b/src/clients/sidecar/models/PartitionOffset.ts @@ -12,62 +12,65 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PartitionOffset */ export interface PartitionOffset { - /** - * - * @type {number} - * @memberof PartitionOffset - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof PartitionOffset - */ - offset?: number; + /** + * + * @type {number} + * @memberof PartitionOffset + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof PartitionOffset + */ + offset?: number; } /** * Check if a given object implements the PartitionOffset interface. */ export function instanceOfPartitionOffset(value: object): value is PartitionOffset { - return true; + return true; } export function PartitionOffsetFromJSON(json: any): PartitionOffset { - return PartitionOffsetFromJSONTyped(json, false); + return PartitionOffsetFromJSONTyped(json, false); } -export function PartitionOffsetFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartitionOffset { - if (json == null) { - return json; - } - return { - - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'offset': json['offset'] == null ? undefined : json['offset'], - }; +export function PartitionOffsetFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PartitionOffset { + if (json == null) { + return json; + } + return { + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + offset: json["offset"] == null ? undefined : json["offset"], + }; } export function PartitionOffsetToJSON(json: any): PartitionOffset { - return PartitionOffsetToJSONTyped(json, false); + return PartitionOffsetToJSONTyped(json, false); } -export function PartitionOffsetToJSONTyped(value?: PartitionOffset | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PartitionOffsetToJSONTyped( + value?: PartitionOffset | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partition_id': value['partition_id'], - 'offset': value['offset'], - }; + return { + partition_id: value["partition_id"], + offset: value["offset"], + }; } - diff --git a/src/clients/sidecar/models/Preferences.ts b/src/clients/sidecar/models/Preferences.ts index 5461a18ef6..20e03cc706 100644 --- a/src/clients/sidecar/models/Preferences.ts +++ b/src/clients/sidecar/models/Preferences.ts @@ -12,96 +12,96 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PreferencesMetadata } from './PreferencesMetadata'; +import { mapValues } from "../runtime"; +import type { PreferencesMetadata } from "./PreferencesMetadata"; import { - PreferencesMetadataFromJSON, - PreferencesMetadataFromJSONTyped, - PreferencesMetadataToJSON, - PreferencesMetadataToJSONTyped, -} from './PreferencesMetadata'; -import type { PreferencesSpec } from './PreferencesSpec'; + PreferencesMetadataFromJSON, + PreferencesMetadataFromJSONTyped, + PreferencesMetadataToJSON, + PreferencesMetadataToJSONTyped, +} from "./PreferencesMetadata"; +import type { PreferencesSpec } from "./PreferencesSpec"; import { - PreferencesSpecFromJSON, - PreferencesSpecFromJSONTyped, - PreferencesSpecToJSON, - PreferencesSpecToJSONTyped, -} from './PreferencesSpec'; + PreferencesSpecFromJSON, + PreferencesSpecFromJSONTyped, + PreferencesSpecToJSON, + PreferencesSpecToJSONTyped, +} from "./PreferencesSpec"; /** - * + * * @export * @interface Preferences */ export interface Preferences { - /** - * - * @type {string} - * @memberof Preferences - */ - api_version: string; - /** - * - * @type {string} - * @memberof Preferences - */ - kind: string; - /** - * - * @type {PreferencesMetadata} - * @memberof Preferences - */ - metadata?: PreferencesMetadata; - /** - * - * @type {PreferencesSpec} - * @memberof Preferences - */ - spec: PreferencesSpec; + /** + * + * @type {string} + * @memberof Preferences + */ + api_version: string; + /** + * + * @type {string} + * @memberof Preferences + */ + kind: string; + /** + * + * @type {PreferencesMetadata} + * @memberof Preferences + */ + metadata?: PreferencesMetadata; + /** + * + * @type {PreferencesSpec} + * @memberof Preferences + */ + spec: PreferencesSpec; } /** * Check if a given object implements the Preferences interface. */ export function instanceOfPreferences(value: object): value is Preferences { - if (!('api_version' in value) || value['api_version'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('spec' in value) || value['spec'] === undefined) return false; - return true; + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; } export function PreferencesFromJSON(json: any): Preferences { - return PreferencesFromJSONTyped(json, false); + return PreferencesFromJSONTyped(json, false); } export function PreferencesFromJSONTyped(json: any, ignoreDiscriminator: boolean): Preferences { - if (json == null) { - return json; - } - return { - - 'api_version': json['api_version'], - 'kind': json['kind'], - 'metadata': json['metadata'] == null ? undefined : PreferencesMetadataFromJSON(json['metadata']), - 'spec': PreferencesSpecFromJSON(json['spec']), - }; + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"] == null ? undefined : PreferencesMetadataFromJSON(json["metadata"]), + spec: PreferencesSpecFromJSON(json["spec"]), + }; } export function PreferencesToJSON(json: any): Preferences { - return PreferencesToJSONTyped(json, false); + return PreferencesToJSONTyped(json, false); } -export function PreferencesToJSONTyped(value?: Preferences | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PreferencesToJSONTyped( + value?: Preferences | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'api_version': value['api_version'], - 'kind': value['kind'], - 'metadata': PreferencesMetadataToJSON(value['metadata']), - 'spec': PreferencesSpecToJSON(value['spec']), - }; + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: PreferencesMetadataToJSON(value["metadata"]), + spec: PreferencesSpecToJSON(value["spec"]), + }; } - diff --git a/src/clients/sidecar/models/PreferencesMetadata.ts b/src/clients/sidecar/models/PreferencesMetadata.ts index 27095ea29b..76711ebea4 100644 --- a/src/clients/sidecar/models/PreferencesMetadata.ts +++ b/src/clients/sidecar/models/PreferencesMetadata.ts @@ -12,55 +12,58 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PreferencesMetadata */ export interface PreferencesMetadata { - /** - * - * @type {string} - * @memberof PreferencesMetadata - */ - self: string; + /** + * + * @type {string} + * @memberof PreferencesMetadata + */ + self: string; } /** * Check if a given object implements the PreferencesMetadata interface. */ export function instanceOfPreferencesMetadata(value: object): value is PreferencesMetadata { - if (!('self' in value) || value['self'] === undefined) return false; - return true; + if (!("self" in value) || value["self"] === undefined) return false; + return true; } export function PreferencesMetadataFromJSON(json: any): PreferencesMetadata { - return PreferencesMetadataFromJSONTyped(json, false); + return PreferencesMetadataFromJSONTyped(json, false); } -export function PreferencesMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreferencesMetadata { - if (json == null) { - return json; - } - return { - - 'self': json['self'], - }; +export function PreferencesMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PreferencesMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + }; } export function PreferencesMetadataToJSON(json: any): PreferencesMetadata { - return PreferencesMetadataToJSONTyped(json, false); + return PreferencesMetadataToJSONTyped(json, false); } -export function PreferencesMetadataToJSONTyped(value?: PreferencesMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PreferencesMetadataToJSONTyped( + value?: PreferencesMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'self': value['self'], - }; + return { + self: value["self"], + }; } - diff --git a/src/clients/sidecar/models/PreferencesSpec.ts b/src/clients/sidecar/models/PreferencesSpec.ts index 773496360e..5870c32e81 100644 --- a/src/clients/sidecar/models/PreferencesSpec.ts +++ b/src/clients/sidecar/models/PreferencesSpec.ts @@ -12,78 +12,84 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PreferencesSpec */ export interface PreferencesSpec { - /** - * - * @type {string} - * @memberof PreferencesSpec - */ - kerberos_config_file_path?: string; - /** - * - * @type {Array} - * @memberof PreferencesSpec - */ - tls_pem_paths?: Array; - /** - * - * @type {boolean} - * @memberof PreferencesSpec - */ - trust_all_certificates?: boolean; - /** - * - * @type {{ [key: string]: Array; }} - * @memberof PreferencesSpec - */ - flink_private_endpoints?: { [key: string]: Array; }; + /** + * + * @type {string} + * @memberof PreferencesSpec + */ + kerberos_config_file_path?: string; + /** + * + * @type {Array} + * @memberof PreferencesSpec + */ + tls_pem_paths?: Array; + /** + * + * @type {boolean} + * @memberof PreferencesSpec + */ + trust_all_certificates?: boolean; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof PreferencesSpec + */ + flink_private_endpoints?: { [key: string]: Array }; } /** * Check if a given object implements the PreferencesSpec interface. */ export function instanceOfPreferencesSpec(value: object): value is PreferencesSpec { - return true; + return true; } export function PreferencesSpecFromJSON(json: any): PreferencesSpec { - return PreferencesSpecFromJSONTyped(json, false); + return PreferencesSpecFromJSONTyped(json, false); } -export function PreferencesSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): PreferencesSpec { - if (json == null) { - return json; - } - return { - - 'kerberos_config_file_path': json['kerberos_config_file_path'] == null ? undefined : json['kerberos_config_file_path'], - 'tls_pem_paths': json['tls_pem_paths'] == null ? undefined : json['tls_pem_paths'], - 'trust_all_certificates': json['trust_all_certificates'] == null ? undefined : json['trust_all_certificates'], - 'flink_private_endpoints': json['flink_private_endpoints'] == null ? undefined : json['flink_private_endpoints'], - }; +export function PreferencesSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PreferencesSpec { + if (json == null) { + return json; + } + return { + kerberos_config_file_path: + json["kerberos_config_file_path"] == null ? undefined : json["kerberos_config_file_path"], + tls_pem_paths: json["tls_pem_paths"] == null ? undefined : json["tls_pem_paths"], + trust_all_certificates: + json["trust_all_certificates"] == null ? undefined : json["trust_all_certificates"], + flink_private_endpoints: + json["flink_private_endpoints"] == null ? undefined : json["flink_private_endpoints"], + }; } export function PreferencesSpecToJSON(json: any): PreferencesSpec { - return PreferencesSpecToJSONTyped(json, false); + return PreferencesSpecToJSONTyped(json, false); } -export function PreferencesSpecToJSONTyped(value?: PreferencesSpec | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PreferencesSpecToJSONTyped( + value?: PreferencesSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'kerberos_config_file_path': value['kerberos_config_file_path'], - 'tls_pem_paths': value['tls_pem_paths'], - 'trust_all_certificates': value['trust_all_certificates'], - 'flink_private_endpoints': value['flink_private_endpoints'], - }; + return { + kerberos_config_file_path: value["kerberos_config_file_path"], + tls_pem_paths: value["tls_pem_paths"], + trust_all_certificates: value["trust_all_certificates"], + flink_private_endpoints: value["flink_private_endpoints"], + }; } - diff --git a/src/clients/sidecar/models/ProduceRequest.ts b/src/clients/sidecar/models/ProduceRequest.ts index b54a339620..7e670cb4e9 100644 --- a/src/clients/sidecar/models/ProduceRequest.ts +++ b/src/clients/sidecar/models/ProduceRequest.ts @@ -12,101 +12,111 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ProduceRequestHeader } from './ProduceRequestHeader'; +import { mapValues } from "../runtime"; +import type { ProduceRequestHeader } from "./ProduceRequestHeader"; import { - ProduceRequestHeaderFromJSON, - ProduceRequestHeaderFromJSONTyped, - ProduceRequestHeaderToJSON, - ProduceRequestHeaderToJSONTyped, -} from './ProduceRequestHeader'; -import type { ProduceRequestData } from './ProduceRequestData'; + ProduceRequestHeaderFromJSON, + ProduceRequestHeaderFromJSONTyped, + ProduceRequestHeaderToJSON, + ProduceRequestHeaderToJSONTyped, +} from "./ProduceRequestHeader"; +import type { ProduceRequestData } from "./ProduceRequestData"; import { - ProduceRequestDataFromJSON, - ProduceRequestDataFromJSONTyped, - ProduceRequestDataToJSON, - ProduceRequestDataToJSONTyped, -} from './ProduceRequestData'; + ProduceRequestDataFromJSON, + ProduceRequestDataFromJSONTyped, + ProduceRequestDataToJSON, + ProduceRequestDataToJSONTyped, +} from "./ProduceRequestData"; /** - * + * * @export * @interface ProduceRequest */ export interface ProduceRequest { - /** - * - * @type {number} - * @memberof ProduceRequest - */ - partition_id?: number; - /** - * - * @type {Array} - * @memberof ProduceRequest - */ - headers?: Array; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - key?: ProduceRequestData; - /** - * - * @type {ProduceRequestData} - * @memberof ProduceRequest - */ - value?: ProduceRequestData; - /** - * - * @type {Date} - * @memberof ProduceRequest - */ - timestamp?: Date; + /** + * + * @type {number} + * @memberof ProduceRequest + */ + partition_id?: number; + /** + * + * @type {Array} + * @memberof ProduceRequest + */ + headers?: Array; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + key?: ProduceRequestData; + /** + * + * @type {ProduceRequestData} + * @memberof ProduceRequest + */ + value?: ProduceRequestData; + /** + * + * @type {Date} + * @memberof ProduceRequest + */ + timestamp?: Date; } /** * Check if a given object implements the ProduceRequest interface. */ export function instanceOfProduceRequest(value: object): value is ProduceRequest { - return true; + return true; } export function ProduceRequestFromJSON(json: any): ProduceRequest { - return ProduceRequestFromJSONTyped(json, false); + return ProduceRequestFromJSONTyped(json, false); } -export function ProduceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequest { - if (json == null) { - return json; - } - return { - - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'headers': json['headers'] == null ? undefined : ((json['headers'] as Array).map(ProduceRequestHeaderFromJSON)), - 'key': json['key'] == null ? undefined : ProduceRequestDataFromJSON(json['key']), - 'value': json['value'] == null ? undefined : ProduceRequestDataFromJSON(json['value']), - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - }; +export function ProduceRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceRequest { + if (json == null) { + return json; + } + return { + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + headers: + json["headers"] == null + ? undefined + : (json["headers"] as Array).map(ProduceRequestHeaderFromJSON), + key: json["key"] == null ? undefined : ProduceRequestDataFromJSON(json["key"]), + value: json["value"] == null ? undefined : ProduceRequestDataFromJSON(json["value"]), + timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), + }; } export function ProduceRequestToJSON(json: any): ProduceRequest { - return ProduceRequestToJSONTyped(json, false); + return ProduceRequestToJSONTyped(json, false); } -export function ProduceRequestToJSONTyped(value?: ProduceRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceRequestToJSONTyped( + value?: ProduceRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'partition_id': value['partition_id'], - 'headers': value['headers'] == null ? undefined : ((value['headers'] as Array).map(ProduceRequestHeaderToJSON)), - 'key': ProduceRequestDataToJSON(value['key']), - 'value': ProduceRequestDataToJSON(value['value']), - 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString().substring(0,10)), - }; + return { + partition_id: value["partition_id"], + headers: + value["headers"] == null + ? undefined + : (value["headers"] as Array).map(ProduceRequestHeaderToJSON), + key: ProduceRequestDataToJSON(value["key"]), + value: ProduceRequestDataToJSON(value["value"]), + timestamp: + value["timestamp"] == null ? undefined : value["timestamp"].toISOString().substring(0, 10), + }; } - diff --git a/src/clients/sidecar/models/ProduceRequestData.ts b/src/clients/sidecar/models/ProduceRequestData.ts index 956272f921..7c6131a62a 100644 --- a/src/clients/sidecar/models/ProduceRequestData.ts +++ b/src/clients/sidecar/models/ProduceRequestData.ts @@ -12,102 +12,106 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProduceRequestData */ export interface ProduceRequestData { - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - type?: string; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject?: string; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - subject_name_strategy?: string; - /** - * - * @type {number} - * @memberof ProduceRequestData - */ - schema_id?: number; - /** - * - * @type {number} - * @memberof ProduceRequestData - */ - schema_version?: number; - /** - * - * @type {string} - * @memberof ProduceRequestData - */ - schema?: string; - /** - * - * @type {any} - * @memberof ProduceRequestData - */ - data?: any | null; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + type?: string; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject?: string; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + subject_name_strategy?: string; + /** + * + * @type {number} + * @memberof ProduceRequestData + */ + schema_id?: number; + /** + * + * @type {number} + * @memberof ProduceRequestData + */ + schema_version?: number; + /** + * + * @type {string} + * @memberof ProduceRequestData + */ + schema?: string; + /** + * + * @type {any} + * @memberof ProduceRequestData + */ + data?: any | null; } /** * Check if a given object implements the ProduceRequestData interface. */ export function instanceOfProduceRequestData(value: object): value is ProduceRequestData { - return true; + return true; } export function ProduceRequestDataFromJSON(json: any): ProduceRequestData { - return ProduceRequestDataFromJSONTyped(json, false); + return ProduceRequestDataFromJSONTyped(json, false); } -export function ProduceRequestDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestData { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'subject': json['subject'] == null ? undefined : json['subject'], - 'subject_name_strategy': json['subject_name_strategy'] == null ? undefined : json['subject_name_strategy'], - 'schema_id': json['schema_id'] == null ? undefined : json['schema_id'], - 'schema_version': json['schema_version'] == null ? undefined : json['schema_version'], - 'schema': json['schema'] == null ? undefined : json['schema'], - 'data': json['data'] == null ? undefined : json['data'], - }; +export function ProduceRequestDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceRequestData { + if (json == null) { + return json; + } + return { + type: json["type"] == null ? undefined : json["type"], + subject: json["subject"] == null ? undefined : json["subject"], + subject_name_strategy: + json["subject_name_strategy"] == null ? undefined : json["subject_name_strategy"], + schema_id: json["schema_id"] == null ? undefined : json["schema_id"], + schema_version: json["schema_version"] == null ? undefined : json["schema_version"], + schema: json["schema"] == null ? undefined : json["schema"], + data: json["data"] == null ? undefined : json["data"], + }; } export function ProduceRequestDataToJSON(json: any): ProduceRequestData { - return ProduceRequestDataToJSONTyped(json, false); + return ProduceRequestDataToJSONTyped(json, false); } -export function ProduceRequestDataToJSONTyped(value?: ProduceRequestData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceRequestDataToJSONTyped( + value?: ProduceRequestData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'subject': value['subject'], - 'subject_name_strategy': value['subject_name_strategy'], - 'schema_id': value['schema_id'], - 'schema_version': value['schema_version'], - 'schema': value['schema'], - 'data': value['data'], - }; + return { + type: value["type"], + subject: value["subject"], + subject_name_strategy: value["subject_name_strategy"], + schema_id: value["schema_id"], + schema_version: value["schema_version"], + schema: value["schema"], + data: value["data"], + }; } - diff --git a/src/clients/sidecar/models/ProduceRequestHeader.ts b/src/clients/sidecar/models/ProduceRequestHeader.ts index 589f00afc2..2b44d6e26b 100644 --- a/src/clients/sidecar/models/ProduceRequestHeader.ts +++ b/src/clients/sidecar/models/ProduceRequestHeader.ts @@ -12,63 +12,66 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProduceRequestHeader */ export interface ProduceRequestHeader { - /** - * - * @type {string} - * @memberof ProduceRequestHeader - */ - name: string; - /** - * - * @type {Blob} - * @memberof ProduceRequestHeader - */ - value?: Blob; + /** + * + * @type {string} + * @memberof ProduceRequestHeader + */ + name: string; + /** + * + * @type {Blob} + * @memberof ProduceRequestHeader + */ + value?: Blob; } /** * Check if a given object implements the ProduceRequestHeader interface. */ export function instanceOfProduceRequestHeader(value: object): value is ProduceRequestHeader { - if (!('name' in value) || value['name'] === undefined) return false; - return true; + if (!("name" in value) || value["name"] === undefined) return false; + return true; } export function ProduceRequestHeaderFromJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderFromJSONTyped(json, false); + return ProduceRequestHeaderFromJSONTyped(json, false); } -export function ProduceRequestHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceRequestHeader { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - 'value': json['value'] == null ? undefined : json['value'], - }; +export function ProduceRequestHeaderFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceRequestHeader { + if (json == null) { + return json; + } + return { + name: json["name"], + value: json["value"] == null ? undefined : json["value"], + }; } export function ProduceRequestHeaderToJSON(json: any): ProduceRequestHeader { - return ProduceRequestHeaderToJSONTyped(json, false); + return ProduceRequestHeaderToJSONTyped(json, false); } -export function ProduceRequestHeaderToJSONTyped(value?: ProduceRequestHeader | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceRequestHeaderToJSONTyped( + value?: ProduceRequestHeader | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'name': value['name'], - 'value': value['value'], - }; + return { + name: value["name"], + value: value["value"], + }; } - diff --git a/src/clients/sidecar/models/ProduceResponse.ts b/src/clients/sidecar/models/ProduceResponse.ts index f4a9672e42..d26fb1f707 100644 --- a/src/clients/sidecar/models/ProduceResponse.ts +++ b/src/clients/sidecar/models/ProduceResponse.ts @@ -12,127 +12,131 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { ProduceResponseData } from './ProduceResponseData'; +import { mapValues } from "../runtime"; +import type { ProduceResponseData } from "./ProduceResponseData"; import { - ProduceResponseDataFromJSON, - ProduceResponseDataFromJSONTyped, - ProduceResponseDataToJSON, - ProduceResponseDataToJSONTyped, -} from './ProduceResponseData'; + ProduceResponseDataFromJSON, + ProduceResponseDataFromJSONTyped, + ProduceResponseDataToJSON, + ProduceResponseDataToJSONTyped, +} from "./ProduceResponseData"; /** - * + * * @export * @interface ProduceResponse */ export interface ProduceResponse { - /** - * - * @type {number} - * @memberof ProduceResponse - */ - error_code: number; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - message?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - cluster_id?: string; - /** - * - * @type {string} - * @memberof ProduceResponse - */ - topic_name?: string; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - partition_id?: number; - /** - * - * @type {number} - * @memberof ProduceResponse - */ - offset?: number; - /** - * - * @type {Date} - * @memberof ProduceResponse - */ - timestamp?: Date; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - key?: ProduceResponseData; - /** - * - * @type {ProduceResponseData} - * @memberof ProduceResponse - */ - value?: ProduceResponseData; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + error_code: number; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + cluster_id?: string; + /** + * + * @type {string} + * @memberof ProduceResponse + */ + topic_name?: string; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + partition_id?: number; + /** + * + * @type {number} + * @memberof ProduceResponse + */ + offset?: number; + /** + * + * @type {Date} + * @memberof ProduceResponse + */ + timestamp?: Date; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + key?: ProduceResponseData; + /** + * + * @type {ProduceResponseData} + * @memberof ProduceResponse + */ + value?: ProduceResponseData; } /** * Check if a given object implements the ProduceResponse interface. */ export function instanceOfProduceResponse(value: object): value is ProduceResponse { - if (!('error_code' in value) || value['error_code'] === undefined) return false; - return true; + if (!("error_code" in value) || value["error_code"] === undefined) return false; + return true; } export function ProduceResponseFromJSON(json: any): ProduceResponse { - return ProduceResponseFromJSONTyped(json, false); + return ProduceResponseFromJSONTyped(json, false); } -export function ProduceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponse { - if (json == null) { - return json; - } - return { - - 'error_code': json['error_code'], - 'message': json['message'] == null ? undefined : json['message'], - 'cluster_id': json['cluster_id'] == null ? undefined : json['cluster_id'], - 'topic_name': json['topic_name'] == null ? undefined : json['topic_name'], - 'partition_id': json['partition_id'] == null ? undefined : json['partition_id'], - 'offset': json['offset'] == null ? undefined : json['offset'], - 'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])), - 'key': json['key'] == null ? undefined : ProduceResponseDataFromJSON(json['key']), - 'value': json['value'] == null ? undefined : ProduceResponseDataFromJSON(json['value']), - }; +export function ProduceResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceResponse { + if (json == null) { + return json; + } + return { + error_code: json["error_code"], + message: json["message"] == null ? undefined : json["message"], + cluster_id: json["cluster_id"] == null ? undefined : json["cluster_id"], + topic_name: json["topic_name"] == null ? undefined : json["topic_name"], + partition_id: json["partition_id"] == null ? undefined : json["partition_id"], + offset: json["offset"] == null ? undefined : json["offset"], + timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]), + key: json["key"] == null ? undefined : ProduceResponseDataFromJSON(json["key"]), + value: json["value"] == null ? undefined : ProduceResponseDataFromJSON(json["value"]), + }; } export function ProduceResponseToJSON(json: any): ProduceResponse { - return ProduceResponseToJSONTyped(json, false); + return ProduceResponseToJSONTyped(json, false); } -export function ProduceResponseToJSONTyped(value?: ProduceResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceResponseToJSONTyped( + value?: ProduceResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error_code': value['error_code'], - 'message': value['message'], - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'partition_id': value['partition_id'], - 'offset': value['offset'], - 'timestamp': value['timestamp'] == null ? undefined : ((value['timestamp']).toISOString().substring(0,10)), - 'key': ProduceResponseDataToJSON(value['key']), - 'value': ProduceResponseDataToJSON(value['value']), - }; + return { + error_code: value["error_code"], + message: value["message"], + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + partition_id: value["partition_id"], + offset: value["offset"], + timestamp: + value["timestamp"] == null ? undefined : value["timestamp"].toISOString().substring(0, 10), + key: ProduceResponseDataToJSON(value["key"]), + value: ProduceResponseDataToJSON(value["value"]), + }; } - diff --git a/src/clients/sidecar/models/ProduceResponseData.ts b/src/clients/sidecar/models/ProduceResponseData.ts index 2bfd4ecc02..4a175137e6 100644 --- a/src/clients/sidecar/models/ProduceResponseData.ts +++ b/src/clients/sidecar/models/ProduceResponseData.ts @@ -12,88 +12,91 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ProduceResponseData */ export interface ProduceResponseData { - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - size: number; - /** - * - * @type {string} - * @memberof ProduceResponseData - */ - type: string; - /** - * - * @type {string} - * @memberof ProduceResponseData - */ - subject?: string; - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - schema_id?: number; - /** - * - * @type {number} - * @memberof ProduceResponseData - */ - schema_version?: number; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + size: number; + /** + * + * @type {string} + * @memberof ProduceResponseData + */ + type: string; + /** + * + * @type {string} + * @memberof ProduceResponseData + */ + subject?: string; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + schema_id?: number; + /** + * + * @type {number} + * @memberof ProduceResponseData + */ + schema_version?: number; } /** * Check if a given object implements the ProduceResponseData interface. */ export function instanceOfProduceResponseData(value: object): value is ProduceResponseData { - if (!('size' in value) || value['size'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; + if (!("size" in value) || value["size"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + return true; } export function ProduceResponseDataFromJSON(json: any): ProduceResponseData { - return ProduceResponseDataFromJSONTyped(json, false); + return ProduceResponseDataFromJSONTyped(json, false); } -export function ProduceResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProduceResponseData { - if (json == null) { - return json; - } - return { - - 'size': json['size'], - 'type': json['type'], - 'subject': json['subject'] == null ? undefined : json['subject'], - 'schema_id': json['schema_id'] == null ? undefined : json['schema_id'], - 'schema_version': json['schema_version'] == null ? undefined : json['schema_version'], - }; +export function ProduceResponseDataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ProduceResponseData { + if (json == null) { + return json; + } + return { + size: json["size"], + type: json["type"], + subject: json["subject"] == null ? undefined : json["subject"], + schema_id: json["schema_id"] == null ? undefined : json["schema_id"], + schema_version: json["schema_version"] == null ? undefined : json["schema_version"], + }; } export function ProduceResponseDataToJSON(json: any): ProduceResponseData { - return ProduceResponseDataToJSONTyped(json, false); + return ProduceResponseDataToJSONTyped(json, false); } -export function ProduceResponseDataToJSONTyped(value?: ProduceResponseData | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ProduceResponseDataToJSONTyped( + value?: ProduceResponseData | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'size': value['size'], - 'type': value['type'], - 'subject': value['subject'], - 'schema_id': value['schema_id'], - 'schema_version': value['schema_version'], - }; + return { + size: value["size"], + type: value["type"], + subject: value["subject"], + schema_id: value["schema_id"], + schema_version: value["schema_version"], + }; } - diff --git a/src/clients/sidecar/models/RecordMetadata.ts b/src/clients/sidecar/models/RecordMetadata.ts index 1ed7405741..3478d87d57 100644 --- a/src/clients/sidecar/models/RecordMetadata.ts +++ b/src/clients/sidecar/models/RecordMetadata.ts @@ -12,70 +12,77 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { KeyOrValueMetadata } from './KeyOrValueMetadata'; +import { mapValues } from "../runtime"; +import type { KeyOrValueMetadata } from "./KeyOrValueMetadata"; import { - KeyOrValueMetadataFromJSON, - KeyOrValueMetadataFromJSONTyped, - KeyOrValueMetadataToJSON, - KeyOrValueMetadataToJSONTyped, -} from './KeyOrValueMetadata'; + KeyOrValueMetadataFromJSON, + KeyOrValueMetadataFromJSONTyped, + KeyOrValueMetadataToJSON, + KeyOrValueMetadataToJSONTyped, +} from "./KeyOrValueMetadata"; /** - * + * * @export * @interface RecordMetadata */ export interface RecordMetadata { - /** - * - * @type {KeyOrValueMetadata} - * @memberof RecordMetadata - */ - key_metadata?: KeyOrValueMetadata; - /** - * - * @type {KeyOrValueMetadata} - * @memberof RecordMetadata - */ - value_metadata?: KeyOrValueMetadata; + /** + * + * @type {KeyOrValueMetadata} + * @memberof RecordMetadata + */ + key_metadata?: KeyOrValueMetadata; + /** + * + * @type {KeyOrValueMetadata} + * @memberof RecordMetadata + */ + value_metadata?: KeyOrValueMetadata; } /** * Check if a given object implements the RecordMetadata interface. */ export function instanceOfRecordMetadata(value: object): value is RecordMetadata { - return true; + return true; } export function RecordMetadataFromJSON(json: any): RecordMetadata { - return RecordMetadataFromJSONTyped(json, false); + return RecordMetadataFromJSONTyped(json, false); } -export function RecordMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordMetadata { - if (json == null) { - return json; - } - return { - - 'key_metadata': json['key_metadata'] == null ? undefined : KeyOrValueMetadataFromJSON(json['key_metadata']), - 'value_metadata': json['value_metadata'] == null ? undefined : KeyOrValueMetadataFromJSON(json['value_metadata']), - }; +export function RecordMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RecordMetadata { + if (json == null) { + return json; + } + return { + key_metadata: + json["key_metadata"] == null ? undefined : KeyOrValueMetadataFromJSON(json["key_metadata"]), + value_metadata: + json["value_metadata"] == null + ? undefined + : KeyOrValueMetadataFromJSON(json["value_metadata"]), + }; } export function RecordMetadataToJSON(json: any): RecordMetadata { - return RecordMetadataToJSONTyped(json, false); + return RecordMetadataToJSONTyped(json, false); } -export function RecordMetadataToJSONTyped(value?: RecordMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function RecordMetadataToJSONTyped( + value?: RecordMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'key_metadata': KeyOrValueMetadataToJSON(value['key_metadata']), - 'value_metadata': KeyOrValueMetadataToJSON(value['value_metadata']), - }; + return { + key_metadata: KeyOrValueMetadataToJSON(value["key_metadata"]), + value_metadata: KeyOrValueMetadataToJSON(value["value_metadata"]), + }; } - diff --git a/src/clients/sidecar/models/SchemaRegistryConfig.ts b/src/clients/sidecar/models/SchemaRegistryConfig.ts index 37238d1ca7..f3492b6db6 100644 --- a/src/clients/sidecar/models/SchemaRegistryConfig.ts +++ b/src/clients/sidecar/models/SchemaRegistryConfig.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TLSConfig } from './TLSConfig'; +import { mapValues } from "../runtime"; +import type { TLSConfig } from "./TLSConfig"; import { - TLSConfigFromJSON, - TLSConfigFromJSONTyped, - TLSConfigToJSON, - TLSConfigToJSONTyped, -} from './TLSConfig'; -import type { SchemaRegistryConfigCredentials } from './SchemaRegistryConfigCredentials'; + TLSConfigFromJSON, + TLSConfigFromJSONTyped, + TLSConfigToJSON, + TLSConfigToJSONTyped, +} from "./TLSConfig"; +import type { SchemaRegistryConfigCredentials } from "./SchemaRegistryConfigCredentials"; import { - SchemaRegistryConfigCredentialsFromJSON, - SchemaRegistryConfigCredentialsFromJSONTyped, - SchemaRegistryConfigCredentialsToJSON, - SchemaRegistryConfigCredentialsToJSONTyped, -} from './SchemaRegistryConfigCredentials'; + SchemaRegistryConfigCredentialsFromJSON, + SchemaRegistryConfigCredentialsFromJSONTyped, + SchemaRegistryConfigCredentialsToJSON, + SchemaRegistryConfigCredentialsToJSONTyped, +} from "./SchemaRegistryConfigCredentials"; /** * Schema Registry configuration. @@ -34,72 +34,78 @@ import { * @interface SchemaRegistryConfig */ export interface SchemaRegistryConfig { - /** - * The identifier of the Schema Registry cluster, if known. - * @type {string} - * @memberof SchemaRegistryConfig - */ - id?: string; - /** - * The URL of the Schema Registry. - * @type {string} - * @memberof SchemaRegistryConfig - */ - uri: string; - /** - * - * @type {SchemaRegistryConfigCredentials} - * @memberof SchemaRegistryConfig - */ - credentials?: SchemaRegistryConfigCredentials; - /** - * The SSL configuration for connecting to Schema Registry. If null, the connection will use SSL with the default settings. To disable, set `enabled` to false. - * @type {TLSConfig} - * @memberof SchemaRegistryConfig - */ - ssl?: TLSConfig | null; + /** + * The identifier of the Schema Registry cluster, if known. + * @type {string} + * @memberof SchemaRegistryConfig + */ + id?: string; + /** + * The URL of the Schema Registry. + * @type {string} + * @memberof SchemaRegistryConfig + */ + uri: string; + /** + * + * @type {SchemaRegistryConfigCredentials} + * @memberof SchemaRegistryConfig + */ + credentials?: SchemaRegistryConfigCredentials; + /** + * The SSL configuration for connecting to Schema Registry. If null, the connection will use SSL with the default settings. To disable, set `enabled` to false. + * @type {TLSConfig} + * @memberof SchemaRegistryConfig + */ + ssl?: TLSConfig | null; } /** * Check if a given object implements the SchemaRegistryConfig interface. */ export function instanceOfSchemaRegistryConfig(value: object): value is SchemaRegistryConfig { - if (!('uri' in value) || value['uri'] === undefined) return false; - return true; + if (!("uri" in value) || value["uri"] === undefined) return false; + return true; } export function SchemaRegistryConfigFromJSON(json: any): SchemaRegistryConfig { - return SchemaRegistryConfigFromJSONTyped(json, false); + return SchemaRegistryConfigFromJSONTyped(json, false); } -export function SchemaRegistryConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaRegistryConfig { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'uri': json['uri'], - 'credentials': json['credentials'] == null ? undefined : SchemaRegistryConfigCredentialsFromJSON(json['credentials']), - 'ssl': json['ssl'] == null ? undefined : TLSConfigFromJSON(json['ssl']), - }; +export function SchemaRegistryConfigFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SchemaRegistryConfig { + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + uri: json["uri"], + credentials: + json["credentials"] == null + ? undefined + : SchemaRegistryConfigCredentialsFromJSON(json["credentials"]), + ssl: json["ssl"] == null ? undefined : TLSConfigFromJSON(json["ssl"]), + }; } export function SchemaRegistryConfigToJSON(json: any): SchemaRegistryConfig { - return SchemaRegistryConfigToJSONTyped(json, false); + return SchemaRegistryConfigToJSONTyped(json, false); } -export function SchemaRegistryConfigToJSONTyped(value?: SchemaRegistryConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SchemaRegistryConfigToJSONTyped( + value?: SchemaRegistryConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'uri': value['uri'], - 'credentials': SchemaRegistryConfigCredentialsToJSON(value['credentials']), - 'ssl': TLSConfigToJSON(value['ssl']), - }; + return { + id: value["id"], + uri: value["uri"], + credentials: SchemaRegistryConfigCredentialsToJSON(value["credentials"]), + ssl: TLSConfigToJSON(value["ssl"]), + }; } - diff --git a/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts b/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts index bf63497c8f..bfb66b785e 100644 --- a/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts +++ b/src/clients/sidecar/models/SchemaRegistryConfigCredentials.ts @@ -12,27 +12,27 @@ * Do not edit the class manually. */ -import type { ApiKeyAndSecret } from './ApiKeyAndSecret'; +import type { ApiKeyAndSecret } from "./ApiKeyAndSecret"; import { - instanceOfApiKeyAndSecret, - ApiKeyAndSecretFromJSON, - ApiKeyAndSecretFromJSONTyped, - ApiKeyAndSecretToJSON, -} from './ApiKeyAndSecret'; -import type { BasicCredentials } from './BasicCredentials'; + instanceOfApiKeyAndSecret, + ApiKeyAndSecretFromJSON, + ApiKeyAndSecretFromJSONTyped, + ApiKeyAndSecretToJSON, +} from "./ApiKeyAndSecret"; +import type { BasicCredentials } from "./BasicCredentials"; import { - instanceOfBasicCredentials, - BasicCredentialsFromJSON, - BasicCredentialsFromJSONTyped, - BasicCredentialsToJSON, -} from './BasicCredentials'; -import type { OAuthCredentials } from './OAuthCredentials'; + instanceOfBasicCredentials, + BasicCredentialsFromJSON, + BasicCredentialsFromJSONTyped, + BasicCredentialsToJSON, +} from "./BasicCredentials"; +import type { OAuthCredentials } from "./OAuthCredentials"; import { - instanceOfOAuthCredentials, - OAuthCredentialsFromJSON, - OAuthCredentialsFromJSONTyped, - OAuthCredentialsToJSON, -} from './OAuthCredentials'; + instanceOfOAuthCredentials, + OAuthCredentialsFromJSON, + OAuthCredentialsFromJSONTyped, + OAuthCredentialsToJSON, +} from "./OAuthCredentials"; /** * @type SchemaRegistryConfigCredentials @@ -41,46 +41,53 @@ import { */ export type SchemaRegistryConfigCredentials = ApiKeyAndSecret | BasicCredentials | OAuthCredentials; -export function SchemaRegistryConfigCredentialsFromJSON(json: any): SchemaRegistryConfigCredentials { - return SchemaRegistryConfigCredentialsFromJSONTyped(json, false); +export function SchemaRegistryConfigCredentialsFromJSON( + json: any, +): SchemaRegistryConfigCredentials { + return SchemaRegistryConfigCredentialsFromJSONTyped(json, false); } -export function SchemaRegistryConfigCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaRegistryConfigCredentials { - if (json == null) { - return json; - } - if (instanceOfApiKeyAndSecret(json)) { - return ApiKeyAndSecretFromJSONTyped(json, true); - } - if (instanceOfBasicCredentials(json)) { - return BasicCredentialsFromJSONTyped(json, true); - } - if (instanceOfOAuthCredentials(json)) { - return OAuthCredentialsFromJSONTyped(json, true); - } +export function SchemaRegistryConfigCredentialsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SchemaRegistryConfigCredentials { + if (json == null) { + return json; + } + if (instanceOfApiKeyAndSecret(json)) { + return ApiKeyAndSecretFromJSONTyped(json, true); + } + if (instanceOfBasicCredentials(json)) { + return BasicCredentialsFromJSONTyped(json, true); + } + if (instanceOfOAuthCredentials(json)) { + return OAuthCredentialsFromJSONTyped(json, true); + } - return {} as any; + return {} as any; } export function SchemaRegistryConfigCredentialsToJSON(json: any): any { - return SchemaRegistryConfigCredentialsToJSONTyped(json, false); + return SchemaRegistryConfigCredentialsToJSONTyped(json, false); } -export function SchemaRegistryConfigCredentialsToJSONTyped(value?: SchemaRegistryConfigCredentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SchemaRegistryConfigCredentialsToJSONTyped( + value?: SchemaRegistryConfigCredentials | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - if (instanceOfApiKeyAndSecret(value)) { - return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); - } - if (instanceOfBasicCredentials(value)) { - return BasicCredentialsToJSON(value as BasicCredentials); - } - if (instanceOfOAuthCredentials(value)) { - return OAuthCredentialsToJSON(value as OAuthCredentials); - } + if (instanceOfApiKeyAndSecret(value)) { + return ApiKeyAndSecretToJSON(value as ApiKeyAndSecret); + } + if (instanceOfBasicCredentials(value)) { + return BasicCredentialsToJSON(value as BasicCredentials); + } + if (instanceOfOAuthCredentials(value)) { + return OAuthCredentialsToJSON(value as OAuthCredentials); + } - return {}; + return {}; } - diff --git a/src/clients/sidecar/models/SchemaRegistryStatus.ts b/src/clients/sidecar/models/SchemaRegistryStatus.ts index 9f839b08b3..5c5993f7db 100644 --- a/src/clients/sidecar/models/SchemaRegistryStatus.ts +++ b/src/clients/sidecar/models/SchemaRegistryStatus.ts @@ -12,28 +12,28 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { AuthErrors } from './AuthErrors'; +import { mapValues } from "../runtime"; +import type { AuthErrors } from "./AuthErrors"; import { - AuthErrorsFromJSON, - AuthErrorsFromJSONTyped, - AuthErrorsToJSON, - AuthErrorsToJSONTyped, -} from './AuthErrors'; -import type { ConnectedState } from './ConnectedState'; + AuthErrorsFromJSON, + AuthErrorsFromJSONTyped, + AuthErrorsToJSON, + AuthErrorsToJSONTyped, +} from "./AuthErrors"; +import type { ConnectedState } from "./ConnectedState"; import { - ConnectedStateFromJSON, - ConnectedStateFromJSONTyped, - ConnectedStateToJSON, - ConnectedStateToJSONTyped, -} from './ConnectedState'; -import type { UserInfo } from './UserInfo'; + ConnectedStateFromJSON, + ConnectedStateFromJSONTyped, + ConnectedStateToJSON, + ConnectedStateToJSONTyped, +} from "./ConnectedState"; +import type { UserInfo } from "./UserInfo"; import { - UserInfoFromJSON, - UserInfoFromJSONTyped, - UserInfoToJSON, - UserInfoToJSONTyped, -} from './UserInfo'; + UserInfoFromJSON, + UserInfoFromJSONTyped, + UserInfoToJSON, + UserInfoToJSONTyped, +} from "./UserInfo"; /** * The status related to the specified Schema Registry. @@ -41,66 +41,67 @@ import { * @interface SchemaRegistryStatus */ export interface SchemaRegistryStatus { - /** - * The state of the connection to the Schema Registry. - * @type {ConnectedState} - * @memberof SchemaRegistryStatus - */ - state: ConnectedState; - /** - * Information about the authenticated principal, if known. - * @type {UserInfo} - * @memberof SchemaRegistryStatus - */ - user?: UserInfo; - /** - * Errors related to the connection to the Schema Registry. - * @type {AuthErrors} - * @memberof SchemaRegistryStatus - */ - errors?: AuthErrors; + /** + * The state of the connection to the Schema Registry. + * @type {ConnectedState} + * @memberof SchemaRegistryStatus + */ + state: ConnectedState; + /** + * Information about the authenticated principal, if known. + * @type {UserInfo} + * @memberof SchemaRegistryStatus + */ + user?: UserInfo; + /** + * Errors related to the connection to the Schema Registry. + * @type {AuthErrors} + * @memberof SchemaRegistryStatus + */ + errors?: AuthErrors; } - - /** * Check if a given object implements the SchemaRegistryStatus interface. */ export function instanceOfSchemaRegistryStatus(value: object): value is SchemaRegistryStatus { - if (!('state' in value) || value['state'] === undefined) return false; - return true; + if (!("state" in value) || value["state"] === undefined) return false; + return true; } export function SchemaRegistryStatusFromJSON(json: any): SchemaRegistryStatus { - return SchemaRegistryStatusFromJSONTyped(json, false); + return SchemaRegistryStatusFromJSONTyped(json, false); } -export function SchemaRegistryStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaRegistryStatus { - if (json == null) { - return json; - } - return { - - 'state': ConnectedStateFromJSON(json['state']), - 'user': json['user'] == null ? undefined : UserInfoFromJSON(json['user']), - 'errors': json['errors'] == null ? undefined : AuthErrorsFromJSON(json['errors']), - }; +export function SchemaRegistryStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SchemaRegistryStatus { + if (json == null) { + return json; + } + return { + state: ConnectedStateFromJSON(json["state"]), + user: json["user"] == null ? undefined : UserInfoFromJSON(json["user"]), + errors: json["errors"] == null ? undefined : AuthErrorsFromJSON(json["errors"]), + }; } export function SchemaRegistryStatusToJSON(json: any): SchemaRegistryStatus { - return SchemaRegistryStatusToJSONTyped(json, false); + return SchemaRegistryStatusToJSONTyped(json, false); } -export function SchemaRegistryStatusToJSONTyped(value?: SchemaRegistryStatus | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SchemaRegistryStatusToJSONTyped( + value?: SchemaRegistryStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'state': ConnectedStateToJSON(value['state']), - 'user': UserInfoToJSON(value['user']), - 'errors': AuthErrorsToJSON(value['errors']), - }; + return { + state: ConnectedStateToJSON(value["state"]), + user: UserInfoToJSON(value["user"]), + errors: AuthErrorsToJSON(value["errors"]), + }; } - diff --git a/src/clients/sidecar/models/ScramCredentials.ts b/src/clients/sidecar/models/ScramCredentials.ts index 4a42910e20..0c28dc0ec2 100644 --- a/src/clients/sidecar/models/ScramCredentials.ts +++ b/src/clients/sidecar/models/ScramCredentials.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { HashAlgorithm } from './HashAlgorithm'; +import { mapValues } from "../runtime"; +import type { HashAlgorithm } from "./HashAlgorithm"; import { - HashAlgorithmFromJSON, - HashAlgorithmFromJSONTyped, - HashAlgorithmToJSON, - HashAlgorithmToJSONTyped, -} from './HashAlgorithm'; + HashAlgorithmFromJSON, + HashAlgorithmFromJSONTyped, + HashAlgorithmToJSON, + HashAlgorithmToJSONTyped, +} from "./HashAlgorithm"; /** * Scram authentication credentials @@ -27,68 +27,69 @@ import { * @interface ScramCredentials */ export interface ScramCredentials { - /** - * Hash algorithm - * @type {HashAlgorithm} - * @memberof ScramCredentials - */ - hash_algorithm: HashAlgorithm; - /** - * The username to use when connecting to the external service. - * @type {string} - * @memberof ScramCredentials - */ - scram_username: string; - /** - * The password to use when connecting to the external service. - * @type {string} - * @memberof ScramCredentials - */ - scram_password: string; + /** + * Hash algorithm + * @type {HashAlgorithm} + * @memberof ScramCredentials + */ + hash_algorithm: HashAlgorithm; + /** + * The username to use when connecting to the external service. + * @type {string} + * @memberof ScramCredentials + */ + scram_username: string; + /** + * The password to use when connecting to the external service. + * @type {string} + * @memberof ScramCredentials + */ + scram_password: string; } - - /** * Check if a given object implements the ScramCredentials interface. */ export function instanceOfScramCredentials(value: object): value is ScramCredentials { - if (!('hash_algorithm' in value) || value['hash_algorithm'] === undefined) return false; - if (!('scram_username' in value) || value['scram_username'] === undefined) return false; - if (!('scram_password' in value) || value['scram_password'] === undefined) return false; - return true; + if (!("hash_algorithm" in value) || value["hash_algorithm"] === undefined) return false; + if (!("scram_username" in value) || value["scram_username"] === undefined) return false; + if (!("scram_password" in value) || value["scram_password"] === undefined) return false; + return true; } export function ScramCredentialsFromJSON(json: any): ScramCredentials { - return ScramCredentialsFromJSONTyped(json, false); + return ScramCredentialsFromJSONTyped(json, false); } -export function ScramCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScramCredentials { - if (json == null) { - return json; - } - return { - - 'hash_algorithm': HashAlgorithmFromJSON(json['hash_algorithm']), - 'scram_username': json['scram_username'], - 'scram_password': json['scram_password'], - }; +export function ScramCredentialsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ScramCredentials { + if (json == null) { + return json; + } + return { + hash_algorithm: HashAlgorithmFromJSON(json["hash_algorithm"]), + scram_username: json["scram_username"], + scram_password: json["scram_password"], + }; } export function ScramCredentialsToJSON(json: any): ScramCredentials { - return ScramCredentialsToJSONTyped(json, false); + return ScramCredentialsToJSONTyped(json, false); } -export function ScramCredentialsToJSONTyped(value?: ScramCredentials | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ScramCredentialsToJSONTyped( + value?: ScramCredentials | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'hash_algorithm': HashAlgorithmToJSON(value['hash_algorithm']), - 'scram_username': value['scram_username'], - 'scram_password': value['scram_password'], - }; + return { + hash_algorithm: HashAlgorithmToJSON(value["hash_algorithm"]), + scram_username: value["scram_username"], + scram_password: value["scram_password"], + }; } - diff --git a/src/clients/sidecar/models/SidecarAccessToken.ts b/src/clients/sidecar/models/SidecarAccessToken.ts index 0a79504322..abb95f82a3 100644 --- a/src/clients/sidecar/models/SidecarAccessToken.ts +++ b/src/clients/sidecar/models/SidecarAccessToken.ts @@ -12,54 +12,57 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SidecarAccessToken */ export interface SidecarAccessToken { - /** - * - * @type {string} - * @memberof SidecarAccessToken - */ - auth_secret?: string; + /** + * + * @type {string} + * @memberof SidecarAccessToken + */ + auth_secret?: string; } /** * Check if a given object implements the SidecarAccessToken interface. */ export function instanceOfSidecarAccessToken(value: object): value is SidecarAccessToken { - return true; + return true; } export function SidecarAccessTokenFromJSON(json: any): SidecarAccessToken { - return SidecarAccessTokenFromJSONTyped(json, false); + return SidecarAccessTokenFromJSONTyped(json, false); } -export function SidecarAccessTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarAccessToken { - if (json == null) { - return json; - } - return { - - 'auth_secret': json['auth_secret'] == null ? undefined : json['auth_secret'], - }; +export function SidecarAccessTokenFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SidecarAccessToken { + if (json == null) { + return json; + } + return { + auth_secret: json["auth_secret"] == null ? undefined : json["auth_secret"], + }; } export function SidecarAccessTokenToJSON(json: any): SidecarAccessToken { - return SidecarAccessTokenToJSONTyped(json, false); + return SidecarAccessTokenToJSONTyped(json, false); } -export function SidecarAccessTokenToJSONTyped(value?: SidecarAccessToken | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SidecarAccessTokenToJSONTyped( + value?: SidecarAccessToken | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'auth_secret': value['auth_secret'], - }; + return { + auth_secret: value["auth_secret"], + }; } - diff --git a/src/clients/sidecar/models/SidecarError.ts b/src/clients/sidecar/models/SidecarError.ts index 64f20cbf16..09c0ab1db7 100644 --- a/src/clients/sidecar/models/SidecarError.ts +++ b/src/clients/sidecar/models/SidecarError.ts @@ -12,14 +12,14 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { JsonNode } from './JsonNode'; +import { mapValues } from "../runtime"; +import type { JsonNode } from "./JsonNode"; import { - JsonNodeFromJSON, - JsonNodeFromJSONTyped, - JsonNodeToJSON, - JsonNodeToJSONTyped, -} from './JsonNode'; + JsonNodeFromJSON, + JsonNodeFromJSONTyped, + JsonNodeToJSON, + JsonNodeToJSONTyped, +} from "./JsonNode"; /** * Describes a particular error encountered while performing an operation. @@ -27,87 +27,87 @@ import { * @interface SidecarError */ export interface SidecarError { - /** - * - * @type {string} - * @memberof SidecarError - */ - code?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - status?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - title?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - id?: string; - /** - * - * @type {string} - * @memberof SidecarError - */ - detail?: string; - /** - * - * @type {JsonNode} - * @memberof SidecarError - */ - source?: JsonNode; + /** + * + * @type {string} + * @memberof SidecarError + */ + code?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + status?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + title?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + id?: string; + /** + * + * @type {string} + * @memberof SidecarError + */ + detail?: string; + /** + * + * @type {JsonNode} + * @memberof SidecarError + */ + source?: JsonNode; } /** * Check if a given object implements the SidecarError interface. */ export function instanceOfSidecarError(value: object): value is SidecarError { - return true; + return true; } export function SidecarErrorFromJSON(json: any): SidecarError { - return SidecarErrorFromJSONTyped(json, false); + return SidecarErrorFromJSONTyped(json, false); } export function SidecarErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarError { - if (json == null) { - return json; - } - return { - - 'code': json['code'] == null ? undefined : json['code'], - 'status': json['status'] == null ? undefined : json['status'], - 'title': json['title'] == null ? undefined : json['title'], - 'id': json['id'] == null ? undefined : json['id'], - 'detail': json['detail'] == null ? undefined : json['detail'], - 'source': json['source'] == null ? undefined : JsonNodeFromJSON(json['source']), - }; + if (json == null) { + return json; + } + return { + code: json["code"] == null ? undefined : json["code"], + status: json["status"] == null ? undefined : json["status"], + title: json["title"] == null ? undefined : json["title"], + id: json["id"] == null ? undefined : json["id"], + detail: json["detail"] == null ? undefined : json["detail"], + source: json["source"] == null ? undefined : JsonNodeFromJSON(json["source"]), + }; } export function SidecarErrorToJSON(json: any): SidecarError { - return SidecarErrorToJSONTyped(json, false); + return SidecarErrorToJSONTyped(json, false); } -export function SidecarErrorToJSONTyped(value?: SidecarError | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SidecarErrorToJSONTyped( + value?: SidecarError | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'code': value['code'], - 'status': value['status'], - 'title': value['title'], - 'id': value['id'], - 'detail': value['detail'], - 'source': JsonNodeToJSON(value['source']), - }; + return { + code: value["code"], + status: value["status"], + title: value["title"], + id: value["id"], + detail: value["detail"], + source: JsonNodeToJSON(value["source"]), + }; } - diff --git a/src/clients/sidecar/models/SidecarVersionResponse.ts b/src/clients/sidecar/models/SidecarVersionResponse.ts index 7ad40370dd..009021cedb 100644 --- a/src/clients/sidecar/models/SidecarVersionResponse.ts +++ b/src/clients/sidecar/models/SidecarVersionResponse.ts @@ -12,54 +12,57 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface SidecarVersionResponse */ export interface SidecarVersionResponse { - /** - * - * @type {string} - * @memberof SidecarVersionResponse - */ - version?: string; + /** + * + * @type {string} + * @memberof SidecarVersionResponse + */ + version?: string; } /** * Check if a given object implements the SidecarVersionResponse interface. */ export function instanceOfSidecarVersionResponse(value: object): value is SidecarVersionResponse { - return true; + return true; } export function SidecarVersionResponseFromJSON(json: any): SidecarVersionResponse { - return SidecarVersionResponseFromJSONTyped(json, false); + return SidecarVersionResponseFromJSONTyped(json, false); } -export function SidecarVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SidecarVersionResponse { - if (json == null) { - return json; - } - return { - - 'version': json['version'] == null ? undefined : json['version'], - }; +export function SidecarVersionResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SidecarVersionResponse { + if (json == null) { + return json; + } + return { + version: json["version"] == null ? undefined : json["version"], + }; } export function SidecarVersionResponseToJSON(json: any): SidecarVersionResponse { - return SidecarVersionResponseToJSONTyped(json, false); + return SidecarVersionResponseToJSONTyped(json, false); } -export function SidecarVersionResponseToJSONTyped(value?: SidecarVersionResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SidecarVersionResponseToJSONTyped( + value?: SidecarVersionResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'version': value['version'], - }; + return { + version: value["version"], + }; } - diff --git a/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts b/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts index 9dd45dabb6..65019f3ede 100644 --- a/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts +++ b/src/clients/sidecar/models/SimpleConsumeMultiPartitionRequest.ts @@ -12,102 +12,117 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PartitionOffset } from './PartitionOffset'; +import { mapValues } from "../runtime"; +import type { PartitionOffset } from "./PartitionOffset"; import { - PartitionOffsetFromJSON, - PartitionOffsetFromJSONTyped, - PartitionOffsetToJSON, - PartitionOffsetToJSONTyped, -} from './PartitionOffset'; + PartitionOffsetFromJSON, + PartitionOffsetFromJSONTyped, + PartitionOffsetToJSON, + PartitionOffsetToJSONTyped, +} from "./PartitionOffset"; /** - * + * * @export * @interface SimpleConsumeMultiPartitionRequest */ export interface SimpleConsumeMultiPartitionRequest { - /** - * - * @type {Array} - * @memberof SimpleConsumeMultiPartitionRequest - */ - offsets?: Array; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - max_poll_records?: number; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - timestamp?: number; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - fetch_max_bytes?: number; - /** - * - * @type {number} - * @memberof SimpleConsumeMultiPartitionRequest - */ - message_max_bytes?: number; - /** - * - * @type {boolean} - * @memberof SimpleConsumeMultiPartitionRequest - */ - from_beginning?: boolean; + /** + * + * @type {Array} + * @memberof SimpleConsumeMultiPartitionRequest + */ + offsets?: Array; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + max_poll_records?: number; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + timestamp?: number; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + fetch_max_bytes?: number; + /** + * + * @type {number} + * @memberof SimpleConsumeMultiPartitionRequest + */ + message_max_bytes?: number; + /** + * + * @type {boolean} + * @memberof SimpleConsumeMultiPartitionRequest + */ + from_beginning?: boolean; } /** * Check if a given object implements the SimpleConsumeMultiPartitionRequest interface. */ -export function instanceOfSimpleConsumeMultiPartitionRequest(value: object): value is SimpleConsumeMultiPartitionRequest { - return true; +export function instanceOfSimpleConsumeMultiPartitionRequest( + value: object, +): value is SimpleConsumeMultiPartitionRequest { + return true; } -export function SimpleConsumeMultiPartitionRequestFromJSON(json: any): SimpleConsumeMultiPartitionRequest { - return SimpleConsumeMultiPartitionRequestFromJSONTyped(json, false); +export function SimpleConsumeMultiPartitionRequestFromJSON( + json: any, +): SimpleConsumeMultiPartitionRequest { + return SimpleConsumeMultiPartitionRequestFromJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SimpleConsumeMultiPartitionRequest { - if (json == null) { - return json; - } - return { - - 'offsets': json['offsets'] == null ? undefined : ((json['offsets'] as Array).map(PartitionOffsetFromJSON)), - 'max_poll_records': json['max_poll_records'] == null ? undefined : json['max_poll_records'], - 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'], - 'fetch_max_bytes': json['fetch_max_bytes'] == null ? undefined : json['fetch_max_bytes'], - 'message_max_bytes': json['message_max_bytes'] == null ? undefined : json['message_max_bytes'], - 'from_beginning': json['from_beginning'] == null ? undefined : json['from_beginning'], - }; +export function SimpleConsumeMultiPartitionRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SimpleConsumeMultiPartitionRequest { + if (json == null) { + return json; + } + return { + offsets: + json["offsets"] == null + ? undefined + : (json["offsets"] as Array).map(PartitionOffsetFromJSON), + max_poll_records: json["max_poll_records"] == null ? undefined : json["max_poll_records"], + timestamp: json["timestamp"] == null ? undefined : json["timestamp"], + fetch_max_bytes: json["fetch_max_bytes"] == null ? undefined : json["fetch_max_bytes"], + message_max_bytes: json["message_max_bytes"] == null ? undefined : json["message_max_bytes"], + from_beginning: json["from_beginning"] == null ? undefined : json["from_beginning"], + }; } -export function SimpleConsumeMultiPartitionRequestToJSON(json: any): SimpleConsumeMultiPartitionRequest { - return SimpleConsumeMultiPartitionRequestToJSONTyped(json, false); +export function SimpleConsumeMultiPartitionRequestToJSON( + json: any, +): SimpleConsumeMultiPartitionRequest { + return SimpleConsumeMultiPartitionRequestToJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionRequestToJSONTyped(value?: SimpleConsumeMultiPartitionRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SimpleConsumeMultiPartitionRequestToJSONTyped( + value?: SimpleConsumeMultiPartitionRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'offsets': value['offsets'] == null ? undefined : ((value['offsets'] as Array).map(PartitionOffsetToJSON)), - 'max_poll_records': value['max_poll_records'], - 'timestamp': value['timestamp'], - 'fetch_max_bytes': value['fetch_max_bytes'], - 'message_max_bytes': value['message_max_bytes'], - 'from_beginning': value['from_beginning'], - }; + return { + offsets: + value["offsets"] == null + ? undefined + : (value["offsets"] as Array).map(PartitionOffsetToJSON), + max_poll_records: value["max_poll_records"], + timestamp: value["timestamp"], + fetch_max_bytes: value["fetch_max_bytes"], + message_max_bytes: value["message_max_bytes"], + from_beginning: value["from_beginning"], + }; } - diff --git a/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts b/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts index 21f978e7c5..5536fcb6e9 100644 --- a/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts +++ b/src/clients/sidecar/models/SimpleConsumeMultiPartitionResponse.ts @@ -12,78 +12,93 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { PartitionConsumeData } from './PartitionConsumeData'; +import { mapValues } from "../runtime"; +import type { PartitionConsumeData } from "./PartitionConsumeData"; import { - PartitionConsumeDataFromJSON, - PartitionConsumeDataFromJSONTyped, - PartitionConsumeDataToJSON, - PartitionConsumeDataToJSONTyped, -} from './PartitionConsumeData'; + PartitionConsumeDataFromJSON, + PartitionConsumeDataFromJSONTyped, + PartitionConsumeDataToJSON, + PartitionConsumeDataToJSONTyped, +} from "./PartitionConsumeData"; /** - * + * * @export * @interface SimpleConsumeMultiPartitionResponse */ export interface SimpleConsumeMultiPartitionResponse { - /** - * - * @type {string} - * @memberof SimpleConsumeMultiPartitionResponse - */ - cluster_id?: string; - /** - * - * @type {string} - * @memberof SimpleConsumeMultiPartitionResponse - */ - topic_name?: string; - /** - * - * @type {Array} - * @memberof SimpleConsumeMultiPartitionResponse - */ - partition_data_list?: Array; + /** + * + * @type {string} + * @memberof SimpleConsumeMultiPartitionResponse + */ + cluster_id?: string; + /** + * + * @type {string} + * @memberof SimpleConsumeMultiPartitionResponse + */ + topic_name?: string; + /** + * + * @type {Array} + * @memberof SimpleConsumeMultiPartitionResponse + */ + partition_data_list?: Array; } /** * Check if a given object implements the SimpleConsumeMultiPartitionResponse interface. */ -export function instanceOfSimpleConsumeMultiPartitionResponse(value: object): value is SimpleConsumeMultiPartitionResponse { - return true; +export function instanceOfSimpleConsumeMultiPartitionResponse( + value: object, +): value is SimpleConsumeMultiPartitionResponse { + return true; } -export function SimpleConsumeMultiPartitionResponseFromJSON(json: any): SimpleConsumeMultiPartitionResponse { - return SimpleConsumeMultiPartitionResponseFromJSONTyped(json, false); +export function SimpleConsumeMultiPartitionResponseFromJSON( + json: any, +): SimpleConsumeMultiPartitionResponse { + return SimpleConsumeMultiPartitionResponseFromJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SimpleConsumeMultiPartitionResponse { - if (json == null) { - return json; - } - return { - - 'cluster_id': json['cluster_id'] == null ? undefined : json['cluster_id'], - 'topic_name': json['topic_name'] == null ? undefined : json['topic_name'], - 'partition_data_list': json['partition_data_list'] == null ? undefined : ((json['partition_data_list'] as Array).map(PartitionConsumeDataFromJSON)), - }; +export function SimpleConsumeMultiPartitionResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SimpleConsumeMultiPartitionResponse { + if (json == null) { + return json; + } + return { + cluster_id: json["cluster_id"] == null ? undefined : json["cluster_id"], + topic_name: json["topic_name"] == null ? undefined : json["topic_name"], + partition_data_list: + json["partition_data_list"] == null + ? undefined + : (json["partition_data_list"] as Array).map(PartitionConsumeDataFromJSON), + }; } -export function SimpleConsumeMultiPartitionResponseToJSON(json: any): SimpleConsumeMultiPartitionResponse { - return SimpleConsumeMultiPartitionResponseToJSONTyped(json, false); +export function SimpleConsumeMultiPartitionResponseToJSON( + json: any, +): SimpleConsumeMultiPartitionResponse { + return SimpleConsumeMultiPartitionResponseToJSONTyped(json, false); } -export function SimpleConsumeMultiPartitionResponseToJSONTyped(value?: SimpleConsumeMultiPartitionResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function SimpleConsumeMultiPartitionResponseToJSONTyped( + value?: SimpleConsumeMultiPartitionResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'cluster_id': value['cluster_id'], - 'topic_name': value['topic_name'], - 'partition_data_list': value['partition_data_list'] == null ? undefined : ((value['partition_data_list'] as Array).map(PartitionConsumeDataToJSON)), - }; + return { + cluster_id: value["cluster_id"], + topic_name: value["topic_name"], + partition_data_list: + value["partition_data_list"] == null + ? undefined + : (value["partition_data_list"] as Array).map(PartitionConsumeDataToJSON), + }; } - diff --git a/src/clients/sidecar/models/StoreType.ts b/src/clients/sidecar/models/StoreType.ts index a11d0997d1..3185db34f5 100644 --- a/src/clients/sidecar/models/StoreType.ts +++ b/src/clients/sidecar/models/StoreType.ts @@ -13,42 +13,40 @@ */ /** - * + * * @export * @enum {string} */ export enum StoreType { - Jks = 'JKS', - Pkcs12 = 'PKCS12', - Pem = 'PEM', - Unknown = 'UNKNOWN' + Jks = "JKS", + Pkcs12 = "PKCS12", + Pem = "PEM", + Unknown = "UNKNOWN", } - export function instanceOfStoreType(value: any): boolean { - for (const key in StoreType) { - if (Object.prototype.hasOwnProperty.call(StoreType, key)) { - if (StoreType[key as keyof typeof StoreType] === value) { - return true; - } - } + for (const key in StoreType) { + if (Object.prototype.hasOwnProperty.call(StoreType, key)) { + if (StoreType[key as keyof typeof StoreType] === value) { + return true; + } } - return false; + } + return false; } export function StoreTypeFromJSON(json: any): StoreType { - return StoreTypeFromJSONTyped(json, false); + return StoreTypeFromJSONTyped(json, false); } export function StoreTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreType { - return json as StoreType; + return json as StoreType; } export function StoreTypeToJSON(value?: StoreType | null): any { - return value as any; + return value as any; } export function StoreTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): StoreType { - return value as StoreType; + return value as StoreType; } - diff --git a/src/clients/sidecar/models/TLSConfig.ts b/src/clients/sidecar/models/TLSConfig.ts index 86d37c062e..f65598b75a 100644 --- a/src/clients/sidecar/models/TLSConfig.ts +++ b/src/clients/sidecar/models/TLSConfig.ts @@ -12,21 +12,21 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { TrustStore } from './TrustStore'; +import { mapValues } from "../runtime"; +import type { TrustStore } from "./TrustStore"; import { - TrustStoreFromJSON, - TrustStoreFromJSONTyped, - TrustStoreToJSON, - TrustStoreToJSONTyped, -} from './TrustStore'; -import type { KeyStore } from './KeyStore'; + TrustStoreFromJSON, + TrustStoreFromJSONTyped, + TrustStoreToJSON, + TrustStoreToJSONTyped, +} from "./TrustStore"; +import type { KeyStore } from "./KeyStore"; import { - KeyStoreFromJSON, - KeyStoreFromJSONTyped, - KeyStoreToJSON, - KeyStoreToJSONTyped, -} from './KeyStore'; + KeyStoreFromJSON, + KeyStoreFromJSONTyped, + KeyStoreToJSON, + KeyStoreToJSONTyped, +} from "./KeyStore"; /** * SSL configuration @@ -34,72 +34,72 @@ import { * @interface TLSConfig */ export interface TLSConfig { - /** - * Whether to verify the server certificate hostname. Defaults to true if not set. - * @type {boolean} - * @memberof TLSConfig - */ - verify_hostname?: boolean; - /** - * Whether SSL is enabled. If not set, defaults to true. - * @type {boolean} - * @memberof TLSConfig - */ - enabled: boolean; - /** - * The trust store configuration for authenticating the server's certificate. - * @type {TrustStore} - * @memberof TLSConfig - */ - truststore?: TrustStore | null; - /** - * The key store configuration that will identify and authenticate the client to the server, required for mutual TLS (mTLS) - * @type {KeyStore} - * @memberof TLSConfig - */ - keystore?: KeyStore | null; + /** + * Whether to verify the server certificate hostname. Defaults to true if not set. + * @type {boolean} + * @memberof TLSConfig + */ + verify_hostname?: boolean; + /** + * Whether SSL is enabled. If not set, defaults to true. + * @type {boolean} + * @memberof TLSConfig + */ + enabled: boolean; + /** + * The trust store configuration for authenticating the server's certificate. + * @type {TrustStore} + * @memberof TLSConfig + */ + truststore?: TrustStore | null; + /** + * The key store configuration that will identify and authenticate the client to the server, required for mutual TLS (mTLS) + * @type {KeyStore} + * @memberof TLSConfig + */ + keystore?: KeyStore | null; } /** * Check if a given object implements the TLSConfig interface. */ export function instanceOfTLSConfig(value: object): value is TLSConfig { - if (!('enabled' in value) || value['enabled'] === undefined) return false; - return true; + if (!("enabled" in value) || value["enabled"] === undefined) return false; + return true; } export function TLSConfigFromJSON(json: any): TLSConfig { - return TLSConfigFromJSONTyped(json, false); + return TLSConfigFromJSONTyped(json, false); } export function TLSConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): TLSConfig { - if (json == null) { - return json; - } - return { - - 'verify_hostname': json['verify_hostname'] == null ? undefined : json['verify_hostname'], - 'enabled': json['enabled'], - 'truststore': json['truststore'] == null ? undefined : TrustStoreFromJSON(json['truststore']), - 'keystore': json['keystore'] == null ? undefined : KeyStoreFromJSON(json['keystore']), - }; + if (json == null) { + return json; + } + return { + verify_hostname: json["verify_hostname"] == null ? undefined : json["verify_hostname"], + enabled: json["enabled"], + truststore: json["truststore"] == null ? undefined : TrustStoreFromJSON(json["truststore"]), + keystore: json["keystore"] == null ? undefined : KeyStoreFromJSON(json["keystore"]), + }; } export function TLSConfigToJSON(json: any): TLSConfig { - return TLSConfigToJSONTyped(json, false); + return TLSConfigToJSONTyped(json, false); } -export function TLSConfigToJSONTyped(value?: TLSConfig | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TLSConfigToJSONTyped( + value?: TLSConfig | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'verify_hostname': value['verify_hostname'], - 'enabled': value['enabled'], - 'truststore': TrustStoreToJSON(value['truststore']), - 'keystore': KeyStoreToJSON(value['keystore']), - }; + return { + verify_hostname: value["verify_hostname"], + enabled: value["enabled"], + truststore: TrustStoreToJSON(value["truststore"]), + keystore: KeyStoreToJSON(value["keystore"]), + }; } - diff --git a/src/clients/sidecar/models/TimestampType.ts b/src/clients/sidecar/models/TimestampType.ts index fe9ba95c32..db4012be4f 100644 --- a/src/clients/sidecar/models/TimestampType.ts +++ b/src/clients/sidecar/models/TimestampType.ts @@ -13,41 +13,39 @@ */ /** - * + * * @export * @enum {string} */ export enum TimestampType { - NoTimestampType = 'NO_TIMESTAMP_TYPE', - CreateTime = 'CREATE_TIME', - LogAppendTime = 'LOG_APPEND_TIME' + NoTimestampType = "NO_TIMESTAMP_TYPE", + CreateTime = "CREATE_TIME", + LogAppendTime = "LOG_APPEND_TIME", } - export function instanceOfTimestampType(value: any): boolean { - for (const key in TimestampType) { - if (Object.prototype.hasOwnProperty.call(TimestampType, key)) { - if (TimestampType[key as keyof typeof TimestampType] === value) { - return true; - } - } + for (const key in TimestampType) { + if (Object.prototype.hasOwnProperty.call(TimestampType, key)) { + if (TimestampType[key as keyof typeof TimestampType] === value) { + return true; + } } - return false; + } + return false; } export function TimestampTypeFromJSON(json: any): TimestampType { - return TimestampTypeFromJSONTyped(json, false); + return TimestampTypeFromJSONTyped(json, false); } export function TimestampTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimestampType { - return json as TimestampType; + return json as TimestampType; } export function TimestampTypeToJSON(value?: TimestampType | null): any { - return value as any; + return value as any; } export function TimestampTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): TimestampType { - return value as TimestampType; + return value as TimestampType; } - diff --git a/src/clients/sidecar/models/TrustStore.ts b/src/clients/sidecar/models/TrustStore.ts index 7cc6544955..d4592dd87a 100644 --- a/src/clients/sidecar/models/TrustStore.ts +++ b/src/clients/sidecar/models/TrustStore.ts @@ -12,81 +12,79 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { StoreType } from './StoreType'; +import { mapValues } from "../runtime"; +import type { StoreType } from "./StoreType"; import { - StoreTypeFromJSON, - StoreTypeFromJSONTyped, - StoreTypeToJSON, - StoreTypeToJSONTyped, -} from './StoreType'; + StoreTypeFromJSON, + StoreTypeFromJSONTyped, + StoreTypeToJSON, + StoreTypeToJSONTyped, +} from "./StoreType"; /** - * + * * @export * @interface TrustStore */ export interface TrustStore { - /** - * The path to the local trust store file. Required for authenticating the server's certificate. - * @type {string} - * @memberof TrustStore - */ - path: string; - /** - * The password for the local trust store file. If a password is not set, trust store file configured will still be used, but integrity checking is disabled. A trust store password is not supported for PEM format. - * @type {string} - * @memberof TrustStore - */ - password?: string | null; - /** - * The file format of the local trust store file - * @type {StoreType} - * @memberof TrustStore - */ - type?: StoreType | null; + /** + * The path to the local trust store file. Required for authenticating the server's certificate. + * @type {string} + * @memberof TrustStore + */ + path: string; + /** + * The password for the local trust store file. If a password is not set, trust store file configured will still be used, but integrity checking is disabled. A trust store password is not supported for PEM format. + * @type {string} + * @memberof TrustStore + */ + password?: string | null; + /** + * The file format of the local trust store file + * @type {StoreType} + * @memberof TrustStore + */ + type?: StoreType | null; } - - /** * Check if a given object implements the TrustStore interface. */ export function instanceOfTrustStore(value: object): value is TrustStore { - if (!('path' in value) || value['path'] === undefined) return false; - return true; + if (!("path" in value) || value["path"] === undefined) return false; + return true; } export function TrustStoreFromJSON(json: any): TrustStore { - return TrustStoreFromJSONTyped(json, false); + return TrustStoreFromJSONTyped(json, false); } export function TrustStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrustStore { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - 'password': json['password'] == null ? undefined : json['password'], - 'type': json['type'] == null ? undefined : StoreTypeFromJSON(json['type']), - }; + if (json == null) { + return json; + } + return { + path: json["path"], + password: json["password"] == null ? undefined : json["password"], + type: json["type"] == null ? undefined : StoreTypeFromJSON(json["type"]), + }; } export function TrustStoreToJSON(json: any): TrustStore { - return TrustStoreToJSONTyped(json, false); + return TrustStoreToJSONTyped(json, false); } -export function TrustStoreToJSONTyped(value?: TrustStore | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function TrustStoreToJSONTyped( + value?: TrustStore | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'path': value['path'], - 'password': value['password'], - 'type': StoreTypeToJSON(value['type']), - }; + return { + path: value["path"], + password: value["password"], + type: StoreTypeToJSON(value["type"]), + }; } - diff --git a/src/clients/sidecar/models/UserInfo.ts b/src/clients/sidecar/models/UserInfo.ts index 30f74c3225..85fc66ee10 100644 --- a/src/clients/sidecar/models/UserInfo.ts +++ b/src/clients/sidecar/models/UserInfo.ts @@ -12,94 +12,94 @@ * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface UserInfo */ export interface UserInfo { - /** - * - * @type {string} - * @memberof UserInfo - */ - id?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - username?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - first_name?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - last_name?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - social_connection?: string; - /** - * - * @type {string} - * @memberof UserInfo - */ - auth_type?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + id?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + username?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + first_name?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + last_name?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + social_connection?: string; + /** + * + * @type {string} + * @memberof UserInfo + */ + auth_type?: string; } /** * Check if a given object implements the UserInfo interface. */ export function instanceOfUserInfo(value: object): value is UserInfo { - return true; + return true; } export function UserInfoFromJSON(json: any): UserInfo { - return UserInfoFromJSONTyped(json, false); + return UserInfoFromJSONTyped(json, false); } export function UserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserInfo { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'username': json['username'] == null ? undefined : json['username'], - 'first_name': json['first_name'] == null ? undefined : json['first_name'], - 'last_name': json['last_name'] == null ? undefined : json['last_name'], - 'social_connection': json['social_connection'] == null ? undefined : json['social_connection'], - 'auth_type': json['auth_type'] == null ? undefined : json['auth_type'], - }; + if (json == null) { + return json; + } + return { + id: json["id"] == null ? undefined : json["id"], + username: json["username"] == null ? undefined : json["username"], + first_name: json["first_name"] == null ? undefined : json["first_name"], + last_name: json["last_name"] == null ? undefined : json["last_name"], + social_connection: json["social_connection"] == null ? undefined : json["social_connection"], + auth_type: json["auth_type"] == null ? undefined : json["auth_type"], + }; } export function UserInfoToJSON(json: any): UserInfo { - return UserInfoToJSONTyped(json, false); + return UserInfoToJSONTyped(json, false); } -export function UserInfoToJSONTyped(value?: UserInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function UserInfoToJSONTyped( + value?: UserInfo | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'id': value['id'], - 'username': value['username'], - 'first_name': value['first_name'], - 'last_name': value['last_name'], - 'social_connection': value['social_connection'], - 'auth_type': value['auth_type'], - }; + return { + id: value["id"], + username: value["username"], + first_name: value["first_name"], + last_name: value["last_name"], + social_connection: value["social_connection"], + auth_type: value["auth_type"], + }; } - diff --git a/src/clients/sidecar/models/index.ts b/src/clients/sidecar/models/index.ts index a5511c3453..b5e515871c 100644 --- a/src/clients/sidecar/models/index.ts +++ b/src/clients/sidecar/models/index.ts @@ -1,59 +1,59 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ApiKeyAndSecret'; -export * from './AuthError'; -export * from './AuthErrors'; -export * from './BasicCredentials'; -export * from './CCloudConfig'; -export * from './CCloudStatus'; -export * from './CollectionMetadata'; -export * from './ConnectedState'; -export * from './Connection'; -export * from './ConnectionMetadata'; -export * from './ConnectionSpec'; -export * from './ConnectionStatus'; -export * from './ConnectionType'; -export * from './ConnectionsList'; -export * from './DataFormat'; -export * from './ExceededFields'; -export * from './Failure'; -export * from './HashAlgorithm'; -export * from './HealthCheck'; -export * from './HealthResponse'; -export * from './JsonNode'; -export * from './JsonNodeType'; -export * from './KafkaClusterConfig'; -export * from './KafkaClusterConfigCredentials'; -export * from './KafkaClusterStatus'; -export * from './KerberosCredentials'; -export * from './KeyOrValueMetadata'; -export * from './KeyStore'; -export * from './LocalConfig'; -export * from './OAuthCredentials'; -export * from './PartitionConsumeData'; -export * from './PartitionConsumeRecord'; -export * from './PartitionConsumeRecordHeader'; -export * from './PartitionOffset'; -export * from './Preferences'; -export * from './PreferencesMetadata'; -export * from './PreferencesSpec'; -export * from './ProduceRequest'; -export * from './ProduceRequestData'; -export * from './ProduceRequestHeader'; -export * from './ProduceResponse'; -export * from './ProduceResponseData'; -export * from './RecordMetadata'; -export * from './SchemaRegistryConfig'; -export * from './SchemaRegistryConfigCredentials'; -export * from './SchemaRegistryStatus'; -export * from './ScramCredentials'; -export * from './SidecarAccessToken'; -export * from './SidecarError'; -export * from './SidecarVersionResponse'; -export * from './SimpleConsumeMultiPartitionRequest'; -export * from './SimpleConsumeMultiPartitionResponse'; -export * from './StoreType'; -export * from './TLSConfig'; -export * from './TimestampType'; -export * from './TrustStore'; -export * from './UserInfo'; +export * from "./ApiKeyAndSecret"; +export * from "./AuthError"; +export * from "./AuthErrors"; +export * from "./BasicCredentials"; +export * from "./CCloudConfig"; +export * from "./CCloudStatus"; +export * from "./CollectionMetadata"; +export * from "./ConnectedState"; +export * from "./Connection"; +export * from "./ConnectionMetadata"; +export * from "./ConnectionSpec"; +export * from "./ConnectionStatus"; +export * from "./ConnectionType"; +export * from "./ConnectionsList"; +export * from "./DataFormat"; +export * from "./ExceededFields"; +export * from "./Failure"; +export * from "./HashAlgorithm"; +export * from "./HealthCheck"; +export * from "./HealthResponse"; +export * from "./JsonNode"; +export * from "./JsonNodeType"; +export * from "./KafkaClusterConfig"; +export * from "./KafkaClusterConfigCredentials"; +export * from "./KafkaClusterStatus"; +export * from "./KerberosCredentials"; +export * from "./KeyOrValueMetadata"; +export * from "./KeyStore"; +export * from "./LocalConfig"; +export * from "./OAuthCredentials"; +export * from "./PartitionConsumeData"; +export * from "./PartitionConsumeRecord"; +export * from "./PartitionConsumeRecordHeader"; +export * from "./PartitionOffset"; +export * from "./Preferences"; +export * from "./PreferencesMetadata"; +export * from "./PreferencesSpec"; +export * from "./ProduceRequest"; +export * from "./ProduceRequestData"; +export * from "./ProduceRequestHeader"; +export * from "./ProduceResponse"; +export * from "./ProduceResponseData"; +export * from "./RecordMetadata"; +export * from "./SchemaRegistryConfig"; +export * from "./SchemaRegistryConfigCredentials"; +export * from "./SchemaRegistryStatus"; +export * from "./ScramCredentials"; +export * from "./SidecarAccessToken"; +export * from "./SidecarError"; +export * from "./SidecarVersionResponse"; +export * from "./SimpleConsumeMultiPartitionRequest"; +export * from "./SimpleConsumeMultiPartitionResponse"; +export * from "./StoreType"; +export * from "./TLSConfig"; +export * from "./TimestampType"; +export * from "./TrustStore"; +export * from "./UserInfo"; diff --git a/src/clients/sidecar/runtime.ts b/src/clients/sidecar/runtime.ts index 2157573986..d4246adf51 100644 --- a/src/clients/sidecar/runtime.ts +++ b/src/clients/sidecar/runtime.ts @@ -12,76 +12,78 @@ * Do not edit the class manually. */ - export const BASE_PATH = "http://127.0.0.1:26636".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} + constructor(private configuration: ConfigurationParameters = {}) {} - set config(configuration: Configuration) { - this.configuration = configuration; - } + set config(configuration: Configuration) { + this.configuration = configuration; + } - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } - get username(): string | undefined { - return this.configuration.username; - } + get username(): string | undefined { + return this.configuration.username; + } - get password(): string | undefined { - return this.configuration.password; - } + get password(): string | undefined { + return this.configuration.password; + } - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } + return undefined; + } - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" ? accessToken : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,342 +92,395 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach((key) => (headers[key] === undefined ? delete headers[key] : {})); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const initOverrideFn = + typeof initOverrides === "function" ? initOverrides : async () => initOverrides; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); + return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } From 96f0657392f1e94c32d581fde82d72800077d2e3 Mon Sep 17 00:00:00 2001 From: Noel Cothren Date: Tue, 3 Mar 2026 14:15:18 -0700 Subject: [PATCH 3/3] remove deprecated key from fixture --- tests/unit/testResources/flinkStatement.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/testResources/flinkStatement.ts b/tests/unit/testResources/flinkStatement.ts index 7d54e1d8a7..ae763e8293 100644 --- a/tests/unit/testResources/flinkStatement.ts +++ b/tests/unit/testResources/flinkStatement.ts @@ -61,7 +61,6 @@ export function createFlinkStatement(overrides: CreateFlinkStatementArgs = {}): compute_pool_id: overrides.computePoolId || TEST_CCLOUD_FLINK_COMPUTE_POOL_ID, statement: overrides.sqlStatement || "SELECT * FROM test_table", principal: "test-principal", - authorized_principals: [], properties: { "sql.current-catalog": TEST_CCLOUD_ENVIRONMENT.name, "sql.current-database": TEST_CCLOUD_KAFKA_CLUSTER.name,